From 579f103fb9c570e54c81866627efb1ea1e00a26b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Fri, 27 Feb 2026 07:38:05 +0100 Subject: [PATCH] kbuild: uapi: use custom stub headers instead of libc ones MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now that custom stub headers are provided for all libc headers used from the UAPI headers, the dependency on the toolchain libc can be dropped. 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-7-c17de0d19776@weissschuh.net Signed-off-by: Nicolas Schier --- usr/include/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/include/Makefile b/usr/include/Makefile index fdc79cffcc977..d352280b0e4a3 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -138,14 +138,13 @@ endif always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/dev/null)) target-no-libc = $(filter-out $(uses-libc), $*.h) -target-can-compile = $(and $(filter-out $(no-header-test), $*.h), \ - $(or $(CONFIG_CC_CAN_LINK), $(target-no-libc))) +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 \ - $(if $(target-no-libc), -nostdinc, -I $(srctree)/usr/dummy-include) \ + -nostdinc $(if $(target-no-libc), , -I $(srctree)/usr/dummy-include) \ $(if $(target-can-compile), -include $< -include $<); \ $(PERL) $(src)/headers_check.pl $(obj) $<; \ touch $@ -- 2.47.3