[Scummvm-git-logs] scummvm master -> 63d903d0378af9ecac856ca7e4de35960890a06a
lephilousophe
noreply at scummvm.org
Sun Feb 16 10:32:57 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
63d903d037 CONFIGURE: Make --disable-gold the default, now that Binutils deprecated it
Commit: 63d903d0378af9ecac856ca7e4de35960890a06a
https://github.com/scummvm/scummvm/commit/63d903d0378af9ecac856ca7e4de35960890a06a
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2025-02-16T11:32:54+01:00
Commit Message:
CONFIGURE: Make --disable-gold the default, now that Binutils deprecated it
This is a follow-up to previous commit eb904f67e59eecb00eb5e7e81cdd469dc91a3d8a.
GNU Binutils 2.44 officially deprecated the (mostly unmaintained for
some years) Gold linker:
https://lists.gnu.org/archive/html/info-gnu/2025-02/msg00001.html
So, make --disable-gold the default, now. Users having good reasons to
try linking with Gold anyway now need to set an explicit --enable-gold,
since we'll try to revert to GNU BFD if it's found, and if Gold appears
to be the default for some reason.
Changed paths:
configure
diff --git a/configure b/configure
index f886a85e2ed..483c445cdd3 100755
--- a/configure
+++ b/configure
@@ -216,7 +216,7 @@ _pandoc=no
_curl=yes
_lld=no
_mold=no
-_gold=auto
+_gold=no
# Default vkeybd/eventrec options
_vkeybd=no
_eventrec=no
@@ -2552,19 +2552,6 @@ else
define_in_config_if_yes yes 'NO_CXX11_ALIGNAS'
fi
-# The Gold linker had known issues on at least i386 and ppc32, in some cases.
-# Since this linker is not very maintained anymore, and since alternatives exist,
-# avoid using it on non-mainstream archs, unless --enable-gold was explicitly given.
-if test "$_gold" = auto; then
- case $_host_cpu in
- aarch64 | x86_64 | amd64)
- ;;
- *)
- _gold=no
- ;;
- esac
-fi
-
#
# Determine extra build flags for debug and/or release builds
#
@@ -2600,7 +2587,7 @@ if test "$_debug_build" != no; then
append_var LDFLAGS "-fuse-ld=mold"
append_var LDFLAGS "-Wl,--gdb-index"
echo_n -- " + Mold"
- elif test "$_gold" != no && cc_check_no_clean $debug_mode -gsplit-dwarf -fuse-ld=gold -Wl,--gdb-index; then
+ elif test "$_gold" = yes && cc_check_no_clean $debug_mode -gsplit-dwarf -fuse-ld=gold -Wl,--gdb-index; then
append_var LDFLAGS "-fuse-ld=gold"
append_var LDFLAGS "-Wl,--gdb-index"
echo_n -- " + Gold"
@@ -2629,6 +2616,28 @@ if ! echo "$LDFLAGS" | grep -q -e -fuse-ld; then
fi
fi
+if ! echo "$LDFLAGS" | grep -q -e -fuse-ld; then
+ echo "Using Gold linker... $_gold"
+ if test "$_gold" = yes ; then
+ append_var LDFLAGS -fuse-ld=gold
+ fi
+fi
+
+# The Gold linker has known issues on at least i386 and ppc32, in some
+# cases. Since it's mostly unmaintained and now deprecated with GNU
+# Binutils 2.44, avoid using it, unless --enable-gold was explicitly
+# given (and then you're on your own).
+if $LD $LDFLAGS -Wl,--version 2>/dev/null | grep -q -e 'GNU gold'; then
+ # Trying to help systems where Gold may (unwisely) be the default;
+ # thus we only try to provide a GNU LD (BFD) fallback in that case,
+ # since it appears to only impact some (past?) GNU systems anyway.
+ if test "$_gold" != yes && $LD $LDFLAGS -fuse-ld=bfd -Wl,--version >/dev/null 2>&1; then
+ append_var LDFLAGS -fuse-ld=bfd
+ else
+ echo "WARNING: Using deprecated Gold linker; build may fail on some platforms"
+ fi
+fi
+
if test "$_release_build" = yes; then
# Add a define, which indicates we are doing
# a build for a release version.
More information about the Scummvm-git-logs
mailing list