Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thomas Weißschuh and committed by
Nathan Chancellor
e7a10929 f852ce05

+2 -4
+2 -4
scripts/Makefile.extrawarn
··· 25 25 KBUILD_CFLAGS += -Wframe-larger-than=$(CONFIG_FRAME_WARN) 26 26 endif 27 27 28 - KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror 29 - KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y) 30 28 KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds 31 29 32 30 ifdef CONFIG_CC_IS_CLANG ··· 212 214 endif 213 215 214 216 # 215 - # W=e - error out on warnings 217 + # W=e and CONFIG_WERROR - error out on warnings 216 218 # 217 - ifneq ($(findstring e, $(KBUILD_EXTRA_WARN)),) 219 + ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),) 218 220 219 221 KBUILD_CPPFLAGS += -Werror 220 222