diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2026-02-27 07:38:03 +0100 |
|---|---|---|
| committer | Nicolas Schier <nsc@kernel.org> | 2026-03-12 12:48:08 +0100 |
| commit | 0ef1b7a66b604593c62a6375e4b6afa0a5f2e04a (patch) | |
| tree | a747223a3bcc1d6399f4ac3afbdbf053684f4a2e /usr | |
| parent | 60a16beedf37db82edf39346fdc9e3916ab41994 (diff) | |
| download | linux-next-history-0ef1b7a66b604593c62a6375e4b6afa0a5f2e04a.tar.gz | |
kbuild: uapi: only use dummy-include for headers which use libc
The headers which do not rely on libc are using built using -nostdinc.
For them the dummy headers are pointless.
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-5-c17de0d19776@weissschuh.net
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'usr')
| -rw-r--r-- | usr/include/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/include/Makefile b/usr/include/Makefile index a8619aa85c873..fdc79cffcc977 100644 --- a/usr/include/Makefile +++ b/usr/include/Makefile @@ -8,7 +8,7 @@ # We cannot go as far as adding -Wpedantic since it emits too many warnings. UAPI_CFLAGS := -std=c90 -Werror=implicit-function-declaration -override c_flags = $(KBUILD_USERCFLAGS) $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) -I $(srctree)/usr/dummy-include +override c_flags = $(KBUILD_USERCFLAGS) $(UAPI_CFLAGS) -Wp,-MMD,$(depfile) -I $(obj) # The following are excluded for now because they fail to build. # @@ -145,7 +145,7 @@ target-can-compile = $(and $(filter-out $(no-header-test), $*.h), \ quiet_cmd_hdrtest = HDRTEST $< cmd_hdrtest = \ $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \ - $(if $(target-no-libc), -nostdinc) \ + $(if $(target-no-libc), -nostdinc, -I $(srctree)/usr/dummy-include) \ $(if $(target-can-compile), -include $< -include $<); \ $(PERL) $(src)/headers_check.pl $(obj) $<; \ touch $@ |
