[PATCH] arm64: perf: fix syscalltbl path base
James Clark
james.clark at linaro.org
Mon Dec 15 00:47:05 PST 2025
On 15/12/2025 00:12, Joel May wrote:
> 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")
Hi Joel,
There is a similar fix on the list here:
https://lore.kernel.org/linux-perf-users/20251204-perf_fix_syscall_header-v1-1-b8e27f74ed6a@arm.com/
I'm not sure if commit 1 alone will also fix your issue, or we'd need to
collapse both of the commits in that set.
The first commit has an older fixes: tag and also fixes some other
issues so it might be better to take that one rather than this one.
Thanks
James
> 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
More information about the linux-arm-kernel
mailing list