diff options
Diffstat (limited to 'eclass/toolchain.eclass')
| -rw-r--r-- | eclass/toolchain.eclass | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2afa6df1295a..959e86e5d972 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -424,7 +424,7 @@ if tc_has_feature zstd ; then fi if tc_has_feature valgrind ; then - BDEPEND+=" valgrind? ( dev-debug/valgrind )" + DEPEND+=" valgrind? ( dev-debug/valgrind )" fi if [[ ${PN} != gnat-gpl ]] && tc_has_feature ada ; then @@ -1738,7 +1738,7 @@ toolchain_src_configure() { # build without a C library, and you can't build that w/o # already having a compiler... if ! is_crosscompile || \ - $(tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null + $(unset CC; unset CPP; tc-getCPP ${CTARGET}) -E - <<<"#include <pthread.h>" >& /dev/null then confgcc+=( $(use_enable openmp libgomp) ) else @@ -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 || $(unset CC; unset CPP; 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 |
