[commit: ghc] master: configure: Disable LD_NO_GOLD logic when cross-compiling (0d7fb47)
git at git.haskell.org
git at git.haskell.org
Thu Dec 13 04:27:36 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0d7fb471f368237462c700bac5500a90d29a1114/ghc
>---------------------------------------------------------------
commit 0d7fb471f368237462c700bac5500a90d29a1114
Author: Ben Gamari <ben at smart-cactus.org>
Date: Wed Dec 12 12:17:21 2018 -0500
configure: Disable LD_NO_GOLD logic when cross-compiling
This is generally terrible: see #16025. In short, we previously just blindly
used an un-prefixed ld for LD_NO_GOLD. This is blatantly wrong. Ideally we would
actually verify that ld.gold is indeed broken (by binutils #22266) before
insisting on using another linker but sadly we cannot do so when cross-compiling
since this would require running host code.
For now we simply disable the LD_NO_GOLD logic when cross-compiling and hope
that the user has verified that their ld.gold isn't affected by #22266.
>---------------------------------------------------------------
0d7fb471f368237462c700bac5500a90d29a1114
aclocal.m4 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/aclocal.m4 b/aclocal.m4
index 447fd61..7aa3fb4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -2408,7 +2408,11 @@ AC_DEFUN([FIND_LD],[
FP_CC_LINKER_FLAG_TRY(bfd, $2) ;;
"GNU gold"*)
FP_CC_LINKER_FLAG_TRY(gold, $2)
- LD_NO_GOLD=ld
+ if test "$cross_compiling" = "yes"; then
+ AC_MSG_NOTICE([Using ld.gold and assuming that it is not affected by binutils issue 22266]);
+ else
+ LD_NO_GOLD=ld;
+ fi
;;
"LLD"*)
FP_CC_LINKER_FLAG_TRY(lld, $2) ;;
More information about the ghc-commits
mailing list