toolchain.eclass: wire up Valgrind annotations patch

In gcc-patches.git:

commit 33349526fd69a6c54790b53ca443693c80769242 (HEAD -> master, origin/master, origin/HEAD)
Author:     Sam James <sam@gentoo.org>
AuthorDate: Wed Dec 3 14:48:04 2025 +0000
Commit:     Sam James <sam@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@ispras.ru/.
    Bug: https://gcc.gnu.org/PR66487
[...]

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-12-03 14:53:56 +00:00
parent 5b32d26493
commit d8c55bb85b
No known key found for this signature in database
GPG Key ID: 738409F520DF9190

View File

@ -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