summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2020-07-06 17:35:52 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2020-07-06 17:39:07 +0100
commit96d5303a2e1daee48a79e8cbb5a24be652535b95 (patch)
tree9e8853f7fbc53b6ccfa2a4914643eff9248ee080 /eclass
parentdev-libs/libfmt: 7.0.0 version bump (diff)
downloadgentoo-96d5303a2e1daee48a79e8cbb5a24be652535b95.tar.gz
gentoo-96d5303a2e1daee48a79e8cbb5a24be652535b95.tar.bz2
gentoo-96d5303a2e1daee48a79e8cbb5a24be652535b95.zip
toolchain.eclass: add USE=valgrind for annotations for valgrind
This adds annotation hints to memory handling code into gcc to ease debugging it under valgrind. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass9
1 files changed, 9 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 8384e565d867..5bd4e18eb0d5 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -200,6 +200,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 9.0 && IUSE+=" d"
tc_version_is_at_least 9.1 && IUSE+=" lto"
tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=(zstd)
+ tc_version_is_at_least 11 && IUSE+=" valgrind" TC_FEATURES+=(valgrind)
fi
if tc_version_is_at_least 10; then
@@ -272,6 +273,10 @@ if tc_has_feature zstd ; then
DEPEND+=" zstd? ( app-arch/zstd )"
fi
+if tc_has_feature valgrind; then
+ BDEPEND+=" valgrind? ( dev-util/valgrind )"
+fi
+
case ${EAPI:-0} in
5*|6) DEPEND+=" ${BDEPEND}" ;;
esac
@@ -1278,6 +1283,10 @@ toolchain_src_configure() {
confgcc+=( $(use_enable systemtap) )
fi
+ if in_iuse valgrind ; then
+ confgcc+=( $(use_enable valgrind valgrind-annotations) )
+ fi
+
if in_iuse vtv ; then
confgcc+=(
$(use_enable vtv vtable-verify)