[PATCH] arm64: perf: fix syscalltbl path base
Joel May
joel-linux at jmay.us
Sun Dec 14 14:12:49 PST 2025
From: Joel May <joel-linux at jmay.us>
A fix for the Perf build process was introduced in commit bfb713ea53c74
("perf tools: Fix arm64 build by generating unistd_64.h"), which generates
the unistd_64.h header as necessary. This fix works fine in some
scenarios.
My problem is when building Perf from tools/perf with SRCARCH=arm64, the
path used in scripts/Makefile.asm-headers is relative to tools/perf
instead of root directory. This results in the build failing like so.
This snippet is a simplified repro of the problem, see the link to the
TrueNAS SCALE build script to see the problem in context.
jmay at debian13-aarch64:/mnt/linux/linux-vanilla/tools/perf$ ARCH=arm64 SRCARCH=arm64 make -j1
...
make[4]: *** No rule to make target '/mnt/linux/linux-vanilla/tools/perf/libperf/arch/arm64/include/generated/uapi/asm/unistd_64.h'. Stop.
make[3]: *** [Makefile:108: uapi-asm-generic] Error 2
make[2]: *** [Makefile.perf:972: /mnt/linux/linux-vanilla/tools/perf/libperf/libperf.a] Error 2
The problem is that scripts/Makefile.asm-headers is including a relative
syscalltbl path from arch/arm64/kernel/Makefile.syscalls. The syscalltbl
path needs to be based on the srctree root.
Fixes: 7fe33e9f662c0 ("arm64: convert unistd_32.h to syscall.tbl format")
Fixes: bfb713ea53c74 ("perf tools: Fix arm64 build by generating unistd_64.h")
Link: https://github.com/truenas/linux/commit/91377b555a57dfa75364d7da85b5e21e41e81625#diff-831a0e8e3eaa7a5ca92599e58771b8a6b2c4bd7533f627e33138873995aac61eR147
Signed-off-by: Joel May <joel-linux at jmay.us>
---
arch/arm64/kernel/Makefile.syscalls | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/Makefile.syscalls b/arch/arm64/kernel/Makefile.syscalls
index 0542a718871a..958f2335ec1b 100644
--- a/arch/arm64/kernel/Makefile.syscalls
+++ b/arch/arm64/kernel/Makefile.syscalls
@@ -3,4 +3,4 @@
syscall_abis_32 +=
syscall_abis_64 += renameat rlimit memfd_secret
-syscalltbl = arch/arm64/tools/syscall_%.tbl
+syscalltbl = $(srctree)/arch/arm64/tools/syscall_%.tbl
base-commit: edde060637b92607f3522252c03d64ad06369933
--
2.34.1
More information about the linux-arm-kernel
mailing list