[PATCH 7/9] kbuild: uapi: use custom stub headers instead of libc ones
Thomas Weißschuh <[email protected]> Fri, 27 Feb 2026 07:38:05 +0100
| Newsgroups | org.kernel.vger.linux-hexagon,org.kernel.vger.linux-kbuild,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- usr/include/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr/include/Makefile b/usr/include/Makefile index fdc79cffcc97..d352280b0e4a 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.53.0