-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CONFIGURE: Don't use the Gold linker on i386/ppc (unless using --enable-gold) #6285
base: master
Are you sure you want to change the base?
CONFIGURE: Don't use the Gold linker on i386/ppc (unless using --enable-gold) #6285
Conversation
…le-gold Debian and Fedora have been building their official ScummVM packages with --disable-gold for a while, because of build failures on (at least) i386: https://salsa.debian.org/games-team/scummvm/-/commit/a6afd58cf8cb8bb39ee1b1fd764ff1721b1001f4 https://src.fedoraproject.org/rpms/scummvm/c/e737fe0c41f2c9cff8400defaab10908b553db18?branch=rawhide I saw a similar issue on Linux ppc32 myself (linker internal error when doing a full build with all engines), and both Gentoo and Fedora think of Gold as a deprecated linker nowadays, anyway. Alternative linkers exist (mold, lld...), and ld.bfd often is a safe default (and AFAICS it's not as slow at it used to be). People really wanting to use Gold on i386/ppc can still ask for it with --enable-gold.
Thanks! Both Debian and Fedora use |
Mold is not a linker installed everywhere, bfd is a good default. |
Yes, bfd often already is the default ld binary on ELF systems. |
Yeah, but for some reason, they've hardcoded bfd in the Fedora patch. We could assume that bfd is always available on Fedora, but if this is true, why would they hardcode it in their patch? Here's the Fedora patch, for reference:
|
Yes, as discussed on Discord, I thought that they did that just because, in their case, such a big override was always guaranteed to work (instead of analyzing what we're doing with the We can't just hardcode I'll put the PR on hold until I'm done with some tests on Fedora, to be sure. Maybe they did set up |
The patch was added by Fedora in 2020. |
Debian and Fedora have been building their official ScummVM packages with
--disable-gold
for a while, because of build failures on (at least) i386:[1]
,[2]
.I saw a similar issue with Gold and the ppc32 QEMU VM myself (
internal error in relocate, at ../../gold/powerpc.cc:6773
when doing a full build with all engines), and both Gentoo and Fedora think of Gold as a deprecated linker nowadays, anyway:[1]
,[2]
,[3]
.So this PR disables the Gold linker on i386 and ppc. People really wanting to use it there can still use it with an explicit
--enable-gold
.Alternative linkers exist (
mold
,lld
...) and are already supported, and otherwiseld.bfd
often is a safe default (and AFAICS it's not as slow at it used to be).Any objection to this? The idea is to take care, by default, of the build issues that Fedora and Debian have been having with Gold. It looks like (at least) the
master-debian-i686
buildbot will be impacted by this change. (By the way, since it appears that this buildbot target never had an issue wild Gold, maybe we could disable its usage for older Gold releases only. But I can't say where to draw the line. Fedora/Debian hit the bug in 2020/2021, and Gold didn't receive many commits since then.)EDIT: the issue was also present in early 2021 Slackware:
[1]