[PATCH RFC next 11/18] kbuild: unify W=e and CONFIG_WERROR
Quentin Schulz
foss+uboot at 0leil.net
Mon May 4 15:20:38 CEST 2026
From: Quentin Schulz <quentin.schulz at cherry.de>
[ Upstream commit e7a10929c574cf30981a8e19ef39bc35e63e8b46 ]
Original commit log:
The two mechanisms have the same effect, unify their implementation.
Also avoid spurious rebuilds when switching between the two.
[git conflict trying to remove the KBUILD_CPPFLAGS for CONFIG_WERROR,
because U-Boot didn't have it before, due to missing backport for
e88ca24319e4 ("kbuild: consolidate warning flags in
scripts/Makefile.extrawarn") which we won't backport for now due to too
many conflicts]
Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
---
scripts/Makefile.extrawarn | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 65954320e0f..b5b1a762cdc 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -99,9 +99,9 @@ KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN3
endif
#
-# W=e - error out on warnings
+# W=e and CONFIG_WERROR - error out on warnings
#
-ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),)
+ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
KBUILD_CPPFLAGS += -Werror
--
2.54.0
More information about the U-Boot
mailing list