commit: c1010ab3cf08a281deb47825f782dd8581bc3138
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 7 08:33:00 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 7 08:33:57 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1010ab3
toolchain.eclass: handle missing Valgrind headers
I saw this on a i686-w64-mingw32 cross w/ trunk + USE=valgrind. Followup
to d8c55bb85be9923213168c69a054a154c077cfb8.
Copy the libgomp check.
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 06d5392ef316..4b90df79f0e7 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1801,7 +1801,11 @@ toolchain_src_configure() {
# We patch this in w/
PR66487-object-lifetime-instrumentation-for-Valgrind.patch,
# so it may not always be available.
if grep -q -- '--enable-valgrind-interop'
"${S}"/libgcc/configure.ac ; then
- confgcc+=( $(use_enable valgrind valgrind-interop) )
+ if ! is_crosscompile || $(tc-getCPP ${CTARGET}) -E -
<<<"#include <valgrind/memcheck.h>" >& /dev/null ; then
+ confgcc+=( $(use_enable valgrind
valgrind-interop) )
+ else
+ confgcc+=( --disable-valgrind-interop )
+ fi
fi
fi