commit: 2d141fdf8928615cb394cc7da03c2299a69c612e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Mon Nov 21 04:02:47 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Aug 16 17:21:19 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d141fdf
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 <AT> gentoo.org> eclass/toolchain-funcs.eclass | 5 ++--- 1 file 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
