[Git][ghc/ghc][master] configure: Fix #21712 again
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Oct 4 09:43:51 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
f6b2751f by Ben Gamari at 2023-10-04T05:43:05-04:00
configure: Fix #21712 again
This is a bit of a shot in the dark to fix #24033, which appears to be
another instance of #21712. For some reason the ld-override logic
*still* appears to be active on Darwin targets (or at least one).
Consequently, on misconfigured systems we may choose a non-`ld64`
linker.
It's a bit unclear exactly what happened in #24033 but ultimately the
check added for #21712 was not quite right, checking for the
`ghc_host_os` (the value of which depends upon the bootstrap compiler)
instead of the target platform. Fix this.
Fixes #24033.
- - - - -
1 changed file:
- m4/find_ld.m4
Changes:
=====================================
m4/find_ld.m4
=====================================
@@ -70,19 +70,23 @@ AC_DEFUN([FIND_LD],[
AC_CHECK_TARGET_TOOL([LD], [ld])
}
- if test "$ghc_host_os" = "darwin" ; then
+ case "$target" in
+ *-darwin)
dnl N.B. Don't even try to find a more efficient linker on Darwin where
dnl broken setups (e.g. unholy mixtures of Homebrew and the native
dnl toolchain) are far too easy to come across.
dnl
dnl See #21712.
AC_CHECK_TARGET_TOOL([LD], [ld])
- elif test "x$enable_ld_override" = "xyes"; then
- find_ld
- else
- AC_CHECK_TARGET_TOOL([LD], [ld])
- fi
-
+ ;;
+ *)
+ if test "x$enable_ld_override" = "xyes"; then
+ find_ld
+ else
+ AC_CHECK_TARGET_TOOL([LD], [ld])
+ fi
+ ;;
+ esac
CHECK_LD_COPY_BUG([$1])
])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f6b2751f58df5f4f83caa7a7ca56e66659d02b09
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f6b2751f58df5f4f83caa7a7ca56e66659d02b09
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231004/a904744d/attachment-0001.html>
More information about the ghc-commits
mailing list