commit: b1619cb5f7d2fafae4adeaa9b25182eb6f658c17
Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
AuthorDate: Mon Aug 19 05:53:15 2024 +0000
Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Mon Aug 19 06:02:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1619cb5
toolchain-funcs.eclass: fix detecting ld.bfd
There is some more output from the compiler here.
We must use a regular expression to avoid a false positive from mold.
Acked-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org>
eclass/toolchain-funcs.eclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index bc1fb064fc45..5e36fa275dcd 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -472,7 +472,7 @@ tc-ld-is-bfd() {
EOF
out=$($(tc-getCC "$@") ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -Wl,--version
"${base}.c" -o "${base}" 2>&1)
rm -f "${base}"*
- if [[ ${out} != "GNU ld"* ]] ; then
+ if [[ ! ${out} =~ .*^"GNU ld".* ]] ; then
return 1
fi