mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
kbuild: uapi: simplify libc dependency logic
The only left user of the condition inverts it. Invert the condition completely and simplify its user. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nicolas Schier <nsc@kernel.org> Tested-by: Nicolas Schier <nsc@kernel.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260227-kbuild-uapi-libc-v1-8-c17de0d19776@weissschuh.net Signed-off-by: Nicolas Schier <nsc@kernel.org>
This commit is contained in:
committed by
Nicolas Schier
parent
579f103fb9
commit
510c7a5736
@@ -137,14 +137,14 @@ endif
|
||||
|
||||
always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null))
|
||||
|
||||
target-no-libc = $(filter-out $(uses-libc), $*.h)
|
||||
target-libc = $(filter $(uses-libc), $*.h)
|
||||
target-can-compile = $(filter-out $(no-header-test), $*.h)
|
||||
|
||||
# Include the header twice to detect missing include guard.
|
||||
quiet_cmd_hdrtest = HDRTEST $<
|
||||
cmd_hdrtest = \
|
||||
$(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \
|
||||
-nostdinc $(if $(target-no-libc), , -I $(srctree)/usr/dummy-include) \
|
||||
-nostdinc $(if $(target-libc), -I $(srctree)/usr/dummy-include) \
|
||||
$(if $(target-can-compile), -include $< -include $<); \
|
||||
$(PERL) $(src)/headers_check.pl $(obj) $<; \
|
||||
touch $@
|
||||
|
||||
Reference in New Issue
Block a user