commit: d8c55bb85be9923213168c69a054a154c077cfb8
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 3 14:53:56 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 3 14:54:28 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8c55bb8
toolchain.eclass: wire up Valgrind annotations patch
In gcc-patches.git:
commit 33349526fd69a6c54790b53ca443693c80769242 (HEAD -> master, origin/master,
origin/HEAD)
Author: Sam James <sam <AT> gentoo.org>
AuthorDate: Wed Dec 3 14:48:04 2025 +0000
Commit: Sam James <sam <AT> gentoo.org>
CommitDate: Wed Dec 3 14:48:04 2025 +0000
16.0.0: add ispras's Valgrind lifetime annotations patch
C++ lifetime issues come up every so often (this time w/ openjph2) and
they're always really hard to debug. Let's give this a go.
From
https://inbox.sourceware.org/gcc-patches/20231222141038.6657-1-amonakov <AT>
ispras.ru/.
Bug: https://gcc.gnu.org/PR66487
[...]
Signed-off-by: Sam James <sam <AT> gentoo.org>
eclass/toolchain.eclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index e50067e40c0f..2afa6df1295a 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1797,6 +1797,12 @@ toolchain_src_configure() {
if in_iuse valgrind ; then
confgcc+=( $(use_enable valgrind valgrind-annotations) )
+
+ # 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) )
+ fi
fi
if in_iuse vtv ; then