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

configure: Don't use ld.gold on i386

ld.gold appears to produce invalid static constructor tables on i386.
While ideally we would add an autoconf check to check for this
brokenness, sadly such a check isn't easy to compose. Instead to
summarily reject such linkers on i386.

Somewhat hackily closes #23579.
parent a9bc20cb
No related branches found
No related tags found
No related merge requests found
Pipeline #80962 failed
......@@ -21,10 +21,19 @@ AC_DEFUN([FIND_LD],[
return
fi
case $CPU in
i386)
# We refuse to use ld.gold on i386 due to #23579, which we don't
# have a good autoconf check for.
linkers="ld.lld ld" ;;
*)
linkers="ld.lld ld.gold ld" ;;
esac
# Manually iterate over possible names since we want to ensure that, e.g.,
# if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we
# then still try ld.gold and -fuse-ld=gold.
for possible_ld in ld.lld ld.gold ld; do
for possible_ld in $linkers; do
TmpLd="" # In case the user set LD
AC_CHECK_TARGET_TOOL([TmpLd], [$possible_ld])
if test "x$TmpLd" = "x"; then continue; fi
......
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