From: "Thomas Weißschuh" <linux@weissschuh.net>
To: Nathan Chancellor <nathan@kernel.org>,
Nicolas Schier <nsc@kernel.org>, Brian Cain <bcain@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
"Arnd Bergmann" <arnd@arndb.de>,
linux-hexagon@vger.kernel.org,
"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH 5/9] kbuild: uapi: only use dummy-include for headers which use libc
Date: Fri, 27 Feb 2026 07:38:03 +0100 [thread overview]
Message-ID: <20260227-kbuild-uapi-libc-v1-5-c17de0d19776@weissschuh.net> (raw)
In-Reply-To: <20260227-kbuild-uapi-libc-v1-0-c17de0d19776@weissschuh.net>
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>
---
usr/include/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/usr/include/Makefile b/usr/include/Makefile
index a8619aa85c87..fdc79cffcc97 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 $@
--
2.53.0
next prev parent reply other threads:[~2026-02-27 6:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 6:37 [PATCH 0/9] kbuild: uapi: remove usage of toolchain headers Thomas Weißschuh
2026-02-27 6:37 ` [PATCH 1/9] hexagon: uapi: Fix structure alignment attribute Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 2/9] kbuild: uapi: test linux/bpf_perf_event.h on powerpc Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 3/9] kbuild: uapi: deduplicate linux/bpf_perf_event.h exclusions Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 4/9] kbuild: uapi: completely exclude linux/bpf_perf_event.h on nios2 Thomas Weißschuh
2026-02-27 6:38 ` Thomas Weißschuh [this message]
2026-02-27 6:38 ` [PATCH 6/9] kbuild: uapi: provide stub includes for some libc headers Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 7/9] kbuild: uapi: use custom stub headers instead of libc ones Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 8/9] kbuild: uapi: simplify libc dependency logic Thomas Weißschuh
2026-02-27 6:38 ` [PATCH 9/9] kbuild: uapi: remove now unneeded guard headers Thomas Weißschuh
2026-02-27 9:18 ` [PATCH 0/9] kbuild: uapi: remove usage of toolchain headers Arnd Bergmann
2026-02-27 9:38 ` Thomas Weißschuh
2026-02-27 10:04 ` Arnd Bergmann
2026-03-05 9:41 ` Nicolas Schier
2026-03-10 1:00 ` Nathan Chancellor
2026-03-12 12:08 ` Nicolas Schier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260227-kbuild-uapi-libc-v1-5-c17de0d19776@weissschuh.net \
--to=linux@weissschuh.net \
--cc=arnd@arndb.de \
--cc=bcain@kernel.org \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=nsc@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®