diff options
author | Austin Seipp <aseipp@pobox.com> | 2013-05-04 16:07:22 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2013-06-16 20:01:25 -0500 |
commit | 71a194d8ca2efd075a5c000be0b378c8706ca0b3 (patch) | |
tree | 2bc67fdf845354bbe4fb0b3f729b0e8c054dc8ca /distrib | |
parent | b097dc9a25f986f0a07dcd2ad1e7fdeeac63198a (diff) | |
download | haskell-71a194d8ca2efd075a5c000be0b378c8706ca0b3.tar.gz |
Detect linker information at runtime. Fixes Trac #6063
Previously, we did ./configure time checks to see if 'GNU ld' supported
certain options. If it does, we bake those options into the link step.
See Trac #5240.
Unfortunately, the linker we use at runtime can change for several
reasons. One is that the user specifies -pgml 'foo'. The other is if
/usr/bin/ld or whatnot changes from when GHC was built. Those options
mentioned earlier are specific to GNU ld, but many systems support GNU
gold too. This is Trac #6063.
So we need to check at runtime what linker we're using. This is actually
a little bit complicated because we normally use the C compiler as our
linker. Windows and OS X are also special here.
Finally, this patch also unconditionally gives '--hash-size=31' and
'--reduce-memory-overheads' to the system linker if it's GNU ld. These
options have been supported for 8+ years from what I can see, and there
are probably a lot of other reasons why GHC would not work with such an
ancient binutils, all things considered.
See Note [Run-time linker info] in SysTools for details. There are
plenty of comments as well in the surrounding code.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/configure.ac.in | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in index 6b20f849d4..4a6944fe17 100644 --- a/distrib/configure.ac.in +++ b/distrib/configure.ac.in @@ -72,8 +72,6 @@ AC_SUBST([LdCmd]) FP_GCC_VERSION AC_PROG_CPP -FP_PROG_LD_HashSize31 -FP_PROG_LD_ReduceMemoryOverheads FP_PROG_LD_IS_GNU FP_PROG_LD_BUILD_ID FP_PROG_LD_NO_COMPACT_UNWIND |