[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250812-kbuild-hdrtest-fixes-v1-3-7ad2af66cd58@linutronix.de>
Date: Tue, 12 Aug 2025 07:33:06 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Nathan Chancellor <nathan@...nel.org>,
Nicolas Schier <nicolas.schier@...ux.dev>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH 3/6] kbuild: uapi: fail header test on compiler warnings
Compiler warnings also indicate issues with the headers.
Make sure they don't go unnoticed.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
---
usr/include/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/include/Makefile b/usr/include/Makefile
index 6868d183f36d532cd3d4023b936c67b8a58a9ba5..2846fe216ee4f2054effbfbb5778b4e5b24649ae 100644
--- a/usr/include/Makefile
+++ b/usr/include/Makefile
@@ -80,7 +80,7 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
# Include the header twice to detect missing include guard.
quiet_cmd_hdrtest = HDRTEST $<
cmd_hdrtest = \
- $(CC) $(c_flags) -fsyntax-only -x c /dev/null \
+ $(CC) $(c_flags) -fsyntax-only -Werror -x c /dev/null \
$(if $(filter-out $(no-header-test), $*.h), -include $< -include $<) && \
$(PERL) $(src)/headers_check.pl $(obj) $< && \
touch $@
--
2.50.1
Powered by blists - more mailing lists