diff options
author | Sam James <sam@gentoo.org> | 2022-11-21 04:02:47 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-16 18:21:19 +0100 |
commit | 2d141fdf8928615cb394cc7da03c2299a69c612e (patch) | |
tree | 0ac061eb2ea46c93ba089346f0904048cdb0b7fe /eclass | |
parent | toolchain-funcs.eclass: add tc-ld-is-mold (diff) | |
download | gentoo-2d141fdf8928615cb394cc7da03c2299a69c612e.tar.gz gentoo-2d141fdf8928615cb394cc7da03c2299a69c612e.tar.bz2 gentoo-2d141fdf8928615cb394cc7da03c2299a69c612e.zip |
toolchain-funcs.eclass: fix tc-ld-force-bfd returning early for unknown linkers
For say, mold, until now tc-ld-force-bfd actually didn't work, because
it bailed early if not lld and not gold (assuming the linker was therefore bfd).
Closes: https://bugs.gentoo.org/877539
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index d54175cf992f..da8c24257ae0 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -594,11 +594,10 @@ tc-ld-disable-gold() { # @FUNCTION: tc-ld-force-bfd # @USAGE: [toolchain prefix] # @DESCRIPTION: -# If the gold or lld linker is currently selected, configure the compilation +# If a linker other than bfd is currently selected, configure the compilation # settings so that we use the bfd linker instead. tc-ld-force-bfd() { - if ! tc-ld-is-gold "$@" && ! tc-ld-is-lld "$@" ; then - # They aren't using gold or lld, so nothing to do! + if tc-ld-is-bfd "$@" ; then return fi |