freebsd-ports/lang/ghc/files/patch-configure
Gabor Pali 46e9ab0ca5 - Update The Glorious Glasgow Haskell Compiler to version 7.4.1
Please note that port revision for all the Haskell ports without version changes
are also bumped.  Other per-port updates are coming soon (in separate commits)!
In addition to that, separate -docs ports are no longer needed so they are
now removed.

Thanks ashish@ for the assistance.

Obtained from:	FreeBSD Haskell
2012-06-03 20:52:29 +00:00

218 lines
6.7 KiB
Text

--- ./configure.orig 2012-02-01 19:11:45.000000000 +0100
+++ ./configure 2012-05-18 12:40:29.000000000 +0200
@@ -608,6 +608,8 @@
HavePapiLib
GTK_CONFIG
LdHasNoCompactUnwind
+LdHashSize31
+LdReduceMemoryOverheads
LdHasBuildId
LdIsGNULd
LdXFlag
@@ -3372,8 +3374,8 @@
vax)
BuildArch="vax"
;;
- x86_64)
- BuildArch="x86_64"
+ x86_64|amd64)
+ BuildArch="amd64"
;;
*)
echo "Unknown CPU $build_cpu"
@@ -3404,7 +3406,7 @@
freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
BuildOS="$build_os"
;;
- freebsd8) # like i686-gentoo-freebsd8
+ freebsd*) # like i686-gentoo-freebsd8
BuildOS="freebsd"
;;
*)
@@ -3486,8 +3488,8 @@
vax)
HostArch="vax"
;;
- x86_64)
- HostArch="x86_64"
+ x86_64|amd64)
+ HostArch="amd64"
;;
*)
echo "Unknown CPU $host_cpu"
@@ -3600,8 +3602,8 @@
vax)
TargetArch="vax"
;;
- x86_64)
- TargetArch="x86_64"
+ x86_64|amd64)
+ TargetArch="amd64"
;;
*)
echo "Unknown CPU $target_cpu"
@@ -3712,6 +3714,9 @@
+bootstrap_target=`echo "$bootstrap_target" |sed -e 's/-unknown-/-portbld-/g' -e 's/x86_64/amd64/g'`
+build=`echo "$build" |sed -e 's/\(freebsd\)[[:digit:].]*$/\1/g'`
+
# Verify that the installed (bootstrap) GHC is capable of generating
# code for the requested build platform.
if test "$BootingFromHc" = "NO"
@@ -5313,9 +5318,9 @@
echo 'foo() {}' > conftest.c
${CC-cc} -c conftest.c
if ${LdCmd} -r --hash-size=31 -o conftest2.o conftest.o > /dev/null 2>&1; then
- fp_cv_LdHashSize31=--hash-size=31
+ fp_cv_LdHashSize31=YES
else
- fp_cv_LdHashSize31=
+ fp_cv_LdHashSize31=NO
fi
rm -rf conftest*
fi
@@ -5334,9 +5339,9 @@
echo 'foo() {}' > conftest.c
${CC-cc} -c conftest.c
if ${LdCmd} -r --reduce-memory-overheads -o conftest2.o conftest.o > /dev/null 2>&1; then
- fp_cv_LdReduceMemoryOverheads=--reduce-memory-overheads
+ fp_cv_LdReduceMemoryOverheads=YES
else
- fp_cv_LdReduceMemoryOverheads=
+ fp_cv_LdReduceMemoryOverheads=NO
fi
rm -rf conftest*
fi
@@ -5387,18 +5392,6 @@
CFLAGS="$CFLAGS -fno-stack-protector"
fi
- # Reduce memory usage when linking. See trac #5240.
- if test -n "$LdHashSize31"
- then
- LDFLAGS="$LDFLAGS -Wl,$LdHashSize31"
- IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS $LdHashSize31"
- fi
- if test -n "$LdReduceMemoryOverheads"
- then
- LDFLAGS="$LDFLAGS -Wl,$LdReduceMemoryOverheads"
- IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS $LdReduceMemoryOverheads"
- fi
-
rm -f conftest.c conftest.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
@@ -5445,15 +5438,15 @@
fi
# Reduce memory usage when linking. See trac #5240.
- if test -n "$LdHashSize31"
+ if [ "$LdHashSize31" = "YES" ]
then
- CONF_GCC_LINKER_OPTS_STAGE0="$CONF_GCC_LINKER_OPTS_STAGE0 -Wl,$LdHashSize31"
- CONF_LD_LINKER_OPTS_STAGE0="$CONF_LD_LINKER_OPTS_STAGE0 $LdHashSize31"
+ CONF_GCC_LINKER_OPTS_STAGE0="$CONF_GCC_LINKER_OPTS_STAGE0 -Wl,--hash-size=31"
+ CONF_LD_LINKER_OPTS_STAGE0="$CONF_LD_LINKER_OPTS_STAGE0 --hash-size=31"
fi
- if test -n "$LdReduceMemoryOverheads"
+ if [ "$LdReduceMemoryOverheads" = "YES" ]
then
- CONF_GCC_LINKER_OPTS_STAGE0="$CONF_GCC_LINKER_OPTS_STAGE0 -Wl,$LdReduceMemoryOverheads"
- CONF_LD_LINKER_OPTS_STAGE0="$CONF_LD_LINKER_OPTS_STAGE0 $LdReduceMemoryOverheads"
+ CONF_GCC_LINKER_OPTS_STAGE0="$CONF_GCC_LINKER_OPTS_STAGE0 -Wl,--reduce-memory-overheads"
+ CONF_LD_LINKER_OPTS_STAGE0="$CONF_LD_LINKER_OPTS_STAGE0 --reduce-memory-overheads"
fi
rm -f conftest.c conftest.o
@@ -5502,15 +5495,15 @@
fi
# Reduce memory usage when linking. See trac #5240.
- if test -n "$LdHashSize31"
+ if [ "$LdHashSize31" = "YES" ]
then
- CONF_GCC_LINKER_OPTS_STAGE1="$CONF_GCC_LINKER_OPTS_STAGE1 -Wl,$LdHashSize31"
- CONF_LD_LINKER_OPTS_STAGE1="$CONF_LD_LINKER_OPTS_STAGE1 $LdHashSize31"
+ CONF_GCC_LINKER_OPTS_STAGE1="$CONF_GCC_LINKER_OPTS_STAGE1 -Wl,--hash-size=31"
+ CONF_LD_LINKER_OPTS_STAGE1="$CONF_LD_LINKER_OPTS_STAGE1 --hash-size=31"
fi
- if test -n "$LdReduceMemoryOverheads"
+ if [ "$LdReduceMemoryOverheads" = "YES" ]
then
- CONF_GCC_LINKER_OPTS_STAGE1="$CONF_GCC_LINKER_OPTS_STAGE1 -Wl,$LdReduceMemoryOverheads"
- CONF_LD_LINKER_OPTS_STAGE1="$CONF_LD_LINKER_OPTS_STAGE1 $LdReduceMemoryOverheads"
+ CONF_GCC_LINKER_OPTS_STAGE1="$CONF_GCC_LINKER_OPTS_STAGE1 -Wl,--reduce-memory-overheads"
+ CONF_LD_LINKER_OPTS_STAGE1="$CONF_LD_LINKER_OPTS_STAGE1 --reduce-memory-overheads"
fi
rm -f conftest.c conftest.o
@@ -5559,18 +5552,6 @@
CONF_CC_OPTS_STAGE2="$CONF_CC_OPTS_STAGE2 -fno-stack-protector"
fi
- # Reduce memory usage when linking. See trac #5240.
- if test -n "$LdHashSize31"
- then
- CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2 -Wl,$LdHashSize31"
- CONF_LD_LINKER_OPTS_STAGE2="$CONF_LD_LINKER_OPTS_STAGE2 $LdHashSize31"
- fi
- if test -n "$LdReduceMemoryOverheads"
- then
- CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2 -Wl,$LdReduceMemoryOverheads"
- CONF_LD_LINKER_OPTS_STAGE2="$CONF_LD_LINKER_OPTS_STAGE2 $LdReduceMemoryOverheads"
- fi
-
rm -f conftest.c conftest.o
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
$as_echo "done" >&6; }
@@ -5772,7 +5753,7 @@
i386)
test -z "$2" || eval "$2=ArchX86"
;;
- x86_64)
+ x86_64|amd64)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -5953,7 +5934,7 @@
checkVendor() {
case $1 in
- dec|unknown|hp|apple|next|sun|sgi|ibm)
+ dec|unknown|hp|apple|next|sun|sgi|ibm|portbld)
;;
*)
echo "Unknown vendor $1"
@@ -5976,7 +5957,7 @@
mingw32)
test -z "$2" || eval "$2=OSMinGW32"
;;
- freebsd)
+ freebsd*)
test -z "$2" || eval "$2=OSFreeBSD"
;;
kfreebsdgnu)
@@ -9987,7 +9968,7 @@
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt $LIBS"
+LIBS="$LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -10018,11 +9999,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
-
- LIBS="-lrt $LIBS"
+ LIBS="$LIBS"
fi