commit:     b1233da6149beccfb96fe2e70de2ac87df18ed2b
Author:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 25 19:02:30 2025 +0000
Commit:     Guilherme Amadio <amadio <AT> gentoo <DOT> org>
CommitDate: Sat Oct 25 19:13:19 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b1233da6

dev-util/perf: use append-cppflags, move to src_compile

Signed-off-by: Guilherme Amadio <amadio <AT> gentoo.org>

 dev-util/perf/perf-6.16-r1.ebuild | 8 ++++----
 dev-util/perf/perf-6.17.ebuild    | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/dev-util/perf/perf-6.16-r1.ebuild 
b/dev-util/perf/perf-6.16-r1.ebuild
index 7a897e8a3a78..8ef5a9c46b81 100644
--- a/dev-util/perf/perf-6.16-r1.ebuild
+++ b/dev-util/perf/perf-6.16-r1.ebuild
@@ -196,9 +196,6 @@ src_prepare() {
 
        # The code likes to compile local assembly files which lack ELF 
markings.
        find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' 
{} +
-
-       # capstone-6 compatibility (#964350)
-       append-flags -DCAPSTONE_AARCH64_COMPAT_HEADER 
-DCAPSTONE_SYSTEMZ_COMPAT_HEADER
 }
 
 puse() { usex $1 "" 1; }
@@ -255,7 +252,7 @@ perf_make() {
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"
-               EXTRA_CFLAGS="${CFLAGS}"
+               EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}"
                EXTRA_LDFLAGS="${LDFLAGS}"
                ARCH="${arch}"
                BUILD_BPF_SKEL=$(usex bpf 1 "") \
@@ -303,6 +300,9 @@ perf_make() {
 src_compile() {
        filter-lto
 
+       # capstone-6 compatibility (#964350)
+       append-cppflags -DCAPSTONE_AARCH64_COMPAT_HEADER 
-DCAPSTONE_SYSTEMZ_COMPAT_HEADER
+
        perf_make -f Makefile.perf
        perf_make -C Documentation man
 }

diff --git a/dev-util/perf/perf-6.17.ebuild b/dev-util/perf/perf-6.17.ebuild
index 7a897e8a3a78..8ef5a9c46b81 100644
--- a/dev-util/perf/perf-6.17.ebuild
+++ b/dev-util/perf/perf-6.17.ebuild
@@ -196,9 +196,6 @@ src_prepare() {
 
        # The code likes to compile local assembly files which lack ELF 
markings.
        find -name '*.S' -exec sed -i '$a.section .note.GNU-stack,"",%progbits' 
{} +
-
-       # capstone-6 compatibility (#964350)
-       append-flags -DCAPSTONE_AARCH64_COMPAT_HEADER 
-DCAPSTONE_SYSTEMZ_COMPAT_HEADER
 }
 
 puse() { usex $1 "" 1; }
@@ -255,7 +252,7 @@ perf_make() {
                PKG_CONFIG="$(tc-getPKG_CONFIG)"
                prefix="${EPREFIX}/usr" bindir_relative="bin"
                tipdir="share/doc/${PF}"
-               EXTRA_CFLAGS="${CFLAGS}"
+               EXTRA_CFLAGS="${CPPFLAGS} ${CFLAGS}"
                EXTRA_LDFLAGS="${LDFLAGS}"
                ARCH="${arch}"
                BUILD_BPF_SKEL=$(usex bpf 1 "") \
@@ -303,6 +300,9 @@ perf_make() {
 src_compile() {
        filter-lto
 
+       # capstone-6 compatibility (#964350)
+       append-cppflags -DCAPSTONE_AARCH64_COMPAT_HEADER 
-DCAPSTONE_SYSTEMZ_COMPAT_HEADER
+
        perf_make -f Makefile.perf
        perf_make -C Documentation man
 }

Reply via email to