Skip to content

Commit ec4a399

Browse files
t-8chnathanchance
authored andcommitted
kbuild: respect CONFIG_WERROR for linker and assembler
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>
1 parent 592b571 commit ec4a399

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

scripts/Makefile.extrawarn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@ endif
217217
ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
218218

219219
KBUILD_CPPFLAGS += -Werror
220+
KBUILD_AFLAGS += -Wa,--fatal-warnings
221+
KBUILD_LDFLAGS += --fatal-warnings
220222
KBUILD_RUSTFLAGS += -Dwarnings
221223

222224
endif

0 commit comments

Comments
 (0)