perf tools: Fix arm64 build by generating unistd_64.h
authorJames Clark <james.clark@linaro.org>
Thu, 17 Apr 2025 13:55:50 +0000 (14:55 +0100)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 23 Apr 2025 15:57:12 +0000 (08:57 -0700)
commitbfb713ea53c746b07ae69fe97fa9b5388e4f34f9
treee0ce57466785bc2083f0eb0a9311de4e400d50d8
parent9c32cda43eb78f78c73aee4aa344b777714e259b
perf tools: Fix arm64 build by generating unistd_64.h

Since pulling in the kernel changes in commit 22f72088ffe6 ("tools
headers: Update the syscall table with the kernel sources"), arm64 is
no longer using a generic syscall header and generates one from the
syscall table. Therefore we must also generate the syscall header for
arm64 before building Perf.

Add it as a dependency to libperf which uses one syscall number. Perf
uses more, but as libperf is a dependency of Perf it will be generated
for both.

Future platforms that need this will have to add their own syscall-y
targets in libperf manually. Unfortunately the arch specific files that
do this (e.g. arch/arm64/include/asm/Kbuild) can't easily be imported
into the Perf build. But Perf only needs a subset of the generated files
anyway, so redefining them is probably the correct thing to do.

Fixes: 22f72088ffe6 ("tools headers: Update the syscall table with the kernel sources")
Signed-off-by: James Clark <james.clark@linaro.org>
Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://lore.kernel.org/r/20250417-james-perf-fix-gen-syscall-v1-1-1d268c923901@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/lib/perf/Makefile
tools/perf/Makefile.config