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.

kbuild: fix rebuild of generic syscall headers

Commit fbb5c0606fa4 ("kbuild: add syscall table generation to
scripts/Makefile.asm-headers") started to generate syscall headers
for architectures using generic syscalls.

However, these headers are always rebuilt using GNU Make 4.4.1 or newer.

When using GNU Make 4.4 or older, these headers are not rebuilt when the
command to generate them is changed, despite the use of the if_changed
macro.

scripts/Makefile.asm-headers now uses FORCE, but it is not marked as
.PHONY. To handle the command line change correctly, .*.cmd files must
be included.

Fixes: fbb5c0606fa4 ("kbuild: add syscall table generation to scripts/Makefile.asm-headers")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Closes: https://lore.kernel.org/lkml/CAHk-=wibB7SvXnUftBgAt+4-3vEKRpvEgBeDEH=i=j2GvDitoA@mail.gmail.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Tested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Masahiro Yamada and committed by
Linus Torvalds
49208b67 b3ce7a30

+8
+8
scripts/Makefile.asm-headers
··· 87 87 $(obj)/syscall_table_%.h: $(syscalltbl) $(systbl) FORCE 88 88 $(call if_changed,systbl) 89 89 90 + targets := $(syscall-y) 91 + 90 92 # Create output directory. Skip it if at least one old header exists 91 93 # since we know the output directory already exists. 92 94 ifeq ($(old-headers),) 93 95 $(shell mkdir -p $(obj)) 94 96 endif 95 97 98 + PHONY += FORCE 99 + 96 100 FORCE: 101 + 102 + existing-targets := $(wildcard $(sort $(targets))) 103 + 104 + -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd) 97 105 98 106 .PHONY: $(PHONY)