From: Ian Rogers <irogers@google.com>
To: irogers@google.com, acme@kernel.org, namhyung@kernel.org
Cc: adrian.hunter@intel.com, andrii@kernel.org,
cupertino.miranda@oracle.com, eddyz87@gmail.com,
james.clark@linaro.org, jolsa@kernel.org,
jose.marchesi@oracle.com, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, mingo@redhat.com,
peterz@infradead.org, yonghong.song@linux.dev
Subject: [PATCH v4 2/5] perf build: Sync bpf_skel.mak get_sys_includes with selftests/bpf
Date: Wed, 11 Nov 2026 17:15:11 -0800 [thread overview]
Message-ID: <20261112011514.4032822-3-irogers@google.com> (raw)
In-Reply-To: <20261112011514.4032822-1-irogers@google.com>
Forward __loongarch_grlen as -D__BITS_PER_LONG and the MIPS ABI, size,
and endianness macros in bpf_skel.mak's get_sys_includes, matching
tools/testing/selftests/bpf/Makefile so system headers receive the
expected architecture macros when compiling BPF skeletons.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/bpf_skel.mak | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/bpf_skel.mak b/tools/perf/bpf_skel.mak
index f2559de39f96..60d104ec573d 100644
--- a/tools/perf/bpf_skel.mak
+++ b/tools/perf/bpf_skel.mak
@@ -22,7 +22,9 @@ bpf-skel-prepare: $(BPFTOOL) $(VMLINUX_H)
define get_sys_includes
$(shell $(1) $(2) -v -E - </dev/null 2>&1 \
| sed -n '/<...> search starts here:/,/End of search list./{ s| \(/.*\)|-idirafter \1|p }') \
-$(shell $(1) $(2) -dM -E - </dev/null | grep '__riscv_xlen ' | awk '{printf("-D__riscv_xlen=%d -D__BITS_PER_LONG=%d", $$3, $$3)}')
+$(shell $(1) $(2) -dM -E - </dev/null | grep '__riscv_xlen ' | awk '{printf("-D__riscv_xlen=%d -D__BITS_PER_LONG=%d", $$3, $$3)}') \
+$(shell $(1) $(2) -dM -E - </dev/null | grep '__loongarch_grlen ' | awk '{printf("-D__BITS_PER_LONG=%d", $$3)}') \
+$(shell $(1) $(2) -dM -E - </dev/null | grep -E 'MIPS(EL|EB)|_MIPS_SZ(PTR|LONG) |_MIPS_SIM |_ABI(O32|N32|64) ' | awk '{printf("-D%s=%s ", $$2, $$3)}')
endef
ifneq ($(CROSS_COMPILE),)
--
2.56.0.567.gdb80ae8cd5-goog
next prev parent reply other threads:[~2026-11-12 1:15 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 22:16 [PATCH v1 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-10-13 22:16 ` [PATCH v1 1/2] " Ian Rogers
2026-10-13 22:27 ` sashiko-bot
2026-10-13 22:16 ` [PATCH v1 2/2] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-10-13 22:23 ` sashiko-bot
2026-10-13 23:14 ` [PATCH v2 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-10-13 23:14 ` [PATCH v2 1/2] " Ian Rogers
2026-10-13 23:22 ` sashiko-bot
2026-10-13 23:14 ` [PATCH v2 2/2] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-10-13 23:24 ` sashiko-bot
2026-10-22 20:46 ` [PATCH v3 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-10-22 20:46 ` [PATCH v3 1/2] " Ian Rogers
2026-10-22 20:54 ` sashiko-bot
2026-11-11 6:01 ` Namhyung Kim
2026-10-22 20:46 ` [PATCH v3 2/2] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-10-22 20:53 ` sashiko-bot
2026-11-04 3:52 ` [PATCH v3 0/2] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-11-10 22:10 ` Ian Rogers
2026-11-12 1:15 ` [PATCH v4 0/5] " Ian Rogers
2026-11-12 1:15 ` [PATCH v4 1/5] tools build: Fix version-ge3 and version-lt3 for <3-part versions Ian Rogers
2026-11-12 1:18 ` sashiko-bot
2026-11-12 1:15 ` Ian Rogers [this message]
2026-11-12 1:18 ` [PATCH v4 2/5] perf build: Sync bpf_skel.mak get_sys_includes with selftests/bpf sashiko-bot
2026-11-12 1:15 ` [PATCH v4 3/5] perf build: Support building BPF skeletons with bpf-gcc Ian Rogers
2026-11-12 1:38 ` sashiko-bot
2026-11-12 1:15 ` [PATCH v4 4/5] perf test make: Reuse Makefile.feature for libbfd and llvm probes Ian Rogers
2026-11-12 1:32 ` sashiko-bot
2026-11-12 1:15 ` [PATCH v4 5/5] perf test make: Add BPF skeleton build tests for clang and bpf-gcc Ian Rogers
2026-11-12 1:38 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261112011514.4032822-3-irogers@google.com \
--to=irogers@google.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=andrii@kernel.org \
--cc=cupertino.miranda@oracle.com \
--cc=eddyz87@gmail.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=jose.marchesi@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox