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: 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>

authored by

Thomas Weißschuh and committed by
Nicolas Schier
510c7a57 579f103f

+2 -2
+2 -2
usr/include/Makefile
··· 137 137 138 138 always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null)) 139 139 140 - target-no-libc = $(filter-out $(uses-libc), $*.h) 140 + target-libc = $(filter $(uses-libc), $*.h) 141 141 target-can-compile = $(filter-out $(no-header-test), $*.h) 142 142 143 143 # Include the header twice to detect missing include guard. 144 144 quiet_cmd_hdrtest = HDRTEST $< 145 145 cmd_hdrtest = \ 146 146 $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \ 147 - -nostdinc $(if $(target-no-libc), , -I $(srctree)/usr/dummy-include) \ 147 + -nostdinc $(if $(target-libc), -I $(srctree)/usr/dummy-include) \ 148 148 $(if $(target-can-compile), -include $< -include $<); \ 149 149 $(PERL) $(src)/headers_check.pl $(obj) $<; \ 150 150 touch $@