summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorsof <unknown>2005-10-27 01:39:40 +0000
committersof <unknown>2005-10-27 01:39:40 +0000
commit2909e6fb2223bd303e00b34d3a04466474c53f03 (patch)
tree3d8179244112482abdf4e0c12f66f96829f69e9f /aclocal.m4
parent53068b73f9ad46f3bea066f3270230c5d38d9b9f (diff)
downloadhaskell-2909e6fb2223bd303e00b34d3a04466474c53f03.tar.gz
[project @ 2005-10-27 01:39:40 by sof]
[mingw/msys only] Undo long-standing workaround for buggy GNU ld's on mingw/msys; i.e., the linker wasn't correctly generating relocatable object files when the number of relocs exceeded 2^16. Worked around the issue by hackily splitting up the GHCi object file for the larger packages ('base', 'ObjectIO' and 'win32') into a handful of object files, each with a manageable number of relocs. Tiresome and error-prone (but the hack has served us well!) This commit imposes a restriction on the 'ld' you use to compile up GHC with; it now has to be ld-2.15.x or later (something GHC binary dists have shipped with since 6.2.2)
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m46
1 files changed, 6 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 3937ac8ecf..858a3f0a6c 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -363,6 +363,12 @@ case $HostPlatform in
LdCmd="`cygpath -w ${fp_prog_ld_raw} | sed -e 's@\\\\@/@g'`"
AC_MSG_NOTICE([normalized ld command to $LdCmd])
fi
+ # Insist on >= ld-2.15.x, since earlier versions doesn't handle
+ # the generation of relocatable object files with large amounts
+ # of relocations correctly. (cf. HSbase.o splittage-hack)
+ fp_prog_ld_version=`${LdCmd} --version | sed -n '/GNU ld/p' | tr -cd 0-9 | cut -b1-3`
+ FP_COMPARE_VERSIONS([$fp_prog_ld_version],[-lt],[214],
+ [AC_MSG_ERROR([GNU ld version later than 2.14 required to compile GHC on Windows.])])[]dnl
;;
esac
AC_SUBST([LdCmd])