[PATCH v2 3/8] scripts/Makefile.asm-headers: pass USED_SYSCALLS to syscalltbl.sh
Yuan Tan
tanyuan at tinylab.org
Tue Oct 14 23:18:08 PDT 2025
From: Yuhang Zheng <z1652074432 at gmail.com>
Include auto.conf in asm-headers and pass CONFIG_USED_SYSCALLS to
syscalltbl.sh when CONFIG_TRIM_UNUSED_SYSCALLS is enabled.
Signed-off-by: Yuhang Zheng <z1652074432 at gmail.com>
Signed-off-by: Yuan Tan <tanyuan at tinylab.org>
Signed-off-by: Zhangjin Wu <falcon at tinylab.org>
---
scripts/Makefile.asm-headers | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
index 8a4856e74180..0ae82c6a2a15 100644
--- a/scripts/Makefile.asm-headers
+++ b/scripts/Makefile.asm-headers
@@ -13,6 +13,8 @@
PHONY := all
all:
+include $(objtree)/include/config/auto.conf
+
src := $(srctree)/$(subst /generated,,$(obj))
syscall_abis_32 += common,32
@@ -68,6 +70,8 @@ quiet_cmd_systbl = SYSTBL $@
cmd_systbl = $(CONFIG_SHELL) $(systbl) \
$(if $(systbl-args-$*),$(systbl-args-$*),$(systbl-args)) \
--abis $(subst $(space),$(comma),$(strip $(syscall_abis_$*))) \
+ $(if $(CONFIG_TRIM_UNUSED_SYSCALLS), \
+ --used-syscalls=$(subst $(space),$(comma),$(strip $(CONFIG_USED_SYSCALLS)))) \
$< $@
all: $(generic-y) $(syscall-y)
--
2.43.0
More information about the linux-riscv
mailing list