From: Thomas Weißschuh Date: Fri, 27 Feb 2026 06:38:06 +0000 (+0100) Subject: kbuild: uapi: simplify libc dependency logic X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=510c7a57362d4620f66cf8a083363b8e20bd9778;p=thirdparty%2Fkernel%2Fstable.git 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 Reviewed-by: Nathan Chancellor Reviewed-by: Nicolas Schier Tested-by: Nicolas Schier Acked-by: Arnd Bergmann Link: https://patch.msgid.link/20260227-kbuild-uapi-libc-v1-8-c17de0d19776@weissschuh.net Signed-off-by: Nicolas Schier --- diff --git a/usr/include/Makefile b/usr/include/Makefile index d352280b0e4a..845d06b63c2b 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -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 $@