Emacs currently checks for the Valgrind headers and sets HAVE_VALGRIND_VALGRIND_H accordingly, without a USE=valgrind. However, as of https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=638ef457876c14b9d713e2fa991f5db3ad53c4f9, this doesn't actually do anything at all - no annotations for Valgrind - unless -D_USE_VALGRIND=1 (or some other non-CPP-false value) is in *FLAGS. Could we add a USE=valgrind with: 1. export ac_cv_header_valgrind_valgrind_h=$(usex valgrind) 2. append-cppflags -DUSE_VALGRIND=$(usex valgrind) please? Unfortunately, without this, you can't really use Valgrind on Emacs at all because of its heavy internal allocator usage. There's a slight runtime penalty to having USE=valgrind on here but it's the same as all of the other USE=valgrind packages, i.e. it doesn't force Valgrind to be used, but adds annotations to ensure it works when run under it.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=937aee1b335b4cc58d2d2da130f6200b68299a39 commit 937aee1b335b4cc58d2d2da130f6200b68299a39 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2023-05-14 09:28:25 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2023-05-14 09:31:05 +0000 app-editors/emacs: Add valgrind support Closes: https://bugs.gentoo.org/906315 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs/emacs-25.3-r18.ebuild | 5 ++++- app-editors/emacs/emacs-26.3-r15.ebuild | 5 ++++- app-editors/emacs/emacs-27.2-r13.ebuild | 5 ++++- app-editors/emacs/emacs-28.2-r8.ebuild | 8 ++++++-- app-editors/emacs/emacs-28.3_rc1-r2.ebuild | 8 ++++++-- app-editors/emacs/emacs-29.0.90.ebuild | 8 ++++++-- app-editors/emacs/emacs-29.0.9999-r1.ebuild | 8 ++++++-- app-editors/emacs/emacs-30.0.9999.ebuild | 8 ++++++-- app-editors/emacs/metadata.xml | 2 ++ 9 files changed, 44 insertions(+), 13 deletions(-)