Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

checksyscalls: only run when necessary

Currently checksyscalls.sh is unconditionally executed during each build.
Most of these executions are unnecessary.

Only run checksyscalls.sh if one of its inputs have changed.

This new logic does not work for the multiple invocations done for MIPS.
The effect is that checksyscalls.sh is still executed unconditionally.
However this is not worse than before.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20260402-kbuild-missing-syscalls-v3-2-6641be1de2db@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Thomas Weißschuh and committed by
Nicolas Schier
b34db3fa e856b6ca

+14 -3
+9 -3
Kbuild
··· 47 47 48 48 # Check for missing system calls 49 49 50 + missing-syscalls-file := .tmp_missing-syscalls 51 + 52 + targets += $(missing-syscalls-file) 53 + 50 54 quiet_cmd_syscalls = CALL $< 51 - cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags) 55 + cmd_syscalls = DEPFILE=$(depfile) $(CONFIG_SHELL) $< $(CC) $(c_flags) $(missing_syscalls_flags); touch $@ 56 + 57 + $(missing-syscalls-file): scripts/checksyscalls.sh $(rq-offsets-file) FORCE 58 + $(call if_changed_dep,syscalls) 52 59 53 60 PHONY += missing-syscalls 54 - missing-syscalls: scripts/checksyscalls.sh $(rq-offsets-file) 55 - $(call cmd,syscalls) 61 + missing-syscalls: $(missing-syscalls-file) 56 62 57 63 # Check the manual modification of atomic headers 58 64
+5
scripts/checksyscalls.sh
··· 275 275 276 276 (ignore_list && syscall_list ${reference_table}) | \ 277 277 $* -Wno-error -Wno-unused-macros -E -x c - > /dev/null 278 + 279 + # For fixdep 280 + if [ -n "${DEPFILE}" ]; then 281 + echo "${0}: ${0} ${reference_table}" >> "${DEPFILE}" 282 + fi