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: use custom stub headers instead of libc ones

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 <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-7-c17de0d19776@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Thomas Weißschuh and committed by
Nicolas Schier
579f103f aad94ba6

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