The tc-ld-is-gold() function checks the --version output from the linker against the pattern *"GNU gold"* to see if it's ld.gold. But, $ ld.mold --version mold 1.0.1 (compatible with GNU ld and GNU gold) Cruel, but legal I guess.
Obsolete with https://github.com/rui314/mold/commit/cea6a569afa544826c91fda7ef0f9941f50c9459 (not in a release yet), I think.
(In reply to Sam James from comment #1) > Obsolete with > https://github.com/rui314/mold/commit/ > cea6a569afa544826c91fda7ef0f9941f50c9459 (not in a release yet), I think. Ah, good. I wish "GNU ld" were removed too, but this solves the immediate problem. Should we backport it to mold-1.0.1? For now it's mainly causing problems with Qt, since qt5-build.eclass does, $(tc-ld-is-gold && echo -use-gold-linker || echo -no-use-gold-linker) and that doesn't work so well without gold installed.
(In reply to Michael Orlitzky from comment #2) > (In reply to Sam James from comment #1) > > Obsolete with > > https://github.com/rui314/mold/commit/ > > cea6a569afa544826c91fda7ef0f9941f50c9459 (not in a release yet), I think. > > Ah, good. I wish "GNU ld" were removed too, but this solves the immediate > problem. Should we backport it to mold-1.0.1? For now it's mainly causing > problems with Qt, since qt5-build.eclass does, > > $(tc-ld-is-gold && echo -use-gold-linker || echo -no-use-gold-linker) > > and that doesn't work so well without gold installed. Fine with me! Would you mind doing it? I'm currently playing with a new machine :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ad0c179fe9c6c5cbfe3edde28f2759386675bb1 commit 5ad0c179fe9c6c5cbfe3edde28f2759386675bb1 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2022-01-20 14:37:42 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2022-01-20 14:40:30 +0000 sys-devel/mold: new revision sans "GNU gold" in --version. The new mold-1.0.1-r1 includes upstream commit cea6a569afa5 which removes the string "GNU gold" from mold's --version string. This is necessary on Gentoo to prevent false positives from tc-ld-is-gold() in the toolchain-funcs eclass. Closes: https://bugs.gentoo.org/831478 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> .../mold/files/mold-1.0.1-no-gold-in-version.patch | 50 ++++++++++++++++++++++ .../{mold-1.0.1.ebuild => mold-1.0.1-r1.ebuild} | 4 +- 2 files changed, 53 insertions(+), 1 deletion(-)