]> www.infradead.org Git - users/hch/misc.git/commitdiff
kbuild: respect CONFIG_WERROR for linker and assembler
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Thu, 14 Aug 2025 10:14:44 +0000 (12:14 +0200)
committerNathan Chancellor <nathan@kernel.org>
Thu, 14 Aug 2025 18:21:17 +0000 (11:21 -0700)
The linker and assembler do not share the compiler flags.

Make sure they also fail on warnings with CONFIG_WERROR and W=e.

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-4-c01e596309d2@linutronix.de
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
scripts/Makefile.extrawarn

index b04b3062e0e49c3ae7471973251017e8738cd244..6efb9e5eeeed0696a061a17e029a92caba50826f 100644 (file)
@@ -217,6 +217,8 @@ endif
 ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
 
 KBUILD_CPPFLAGS                += -Werror
+KBUILD_AFLAGS          += -Wa,--fatal-warnings
+KBUILD_LDFLAGS         += --fatal-warnings
 KBUILD_RUSTFLAGS       += -Dwarnings
 
 endif