diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-08-14 12:14:42 +0200 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2025-08-14 11:21:07 -0700 |
| commit | e7a10929c574cf30981a8e19ef39bc35e63e8b46 (patch) | |
| tree | c29a862d7030f5726323bec5c49e0148fedf90da /scripts | |
| parent | f852ce052a8b78d6fade371bd1fad583541e78fa (diff) | |
| download | random-e7a10929c574cf30981a8e19ef39bc35e63e8b46.tar.gz | |
kbuild: unify W=e and CONFIG_WERROR
The two mechanisms have the same effect, unify their implementation.
Also avoid spurious rebuilds when switching between the two.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Link: https://lore.kernel.org/r/20250814-kbuild-werror-v2-2-c01e596309d2@linutronix.de
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Makefile.extrawarn | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 4b4e8e136ce6b4..1ffc7beca43bc9 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -25,8 +25,6 @@ ifneq ($(CONFIG_FRAME_WARN),0) KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN) endif -KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror -KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y) KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds ifdef CONFIG_CC_IS_CLANG @@ -214,9 +212,9 @@ KBUILD_CFLAGS += -Wno-unused-parameter 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 |
