Skip to content
Snippets Groups Projects
Commit f6b2751f authored by Ben Gamari's avatar Ben Gamari Committed by Marge Bot
Browse files

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.
parent 4e46dc2b
No related branches found
No related tags found
No related merge requests found
......@@ -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])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment