Skip to content

Commit 3f0ff4c

Browse files
t-8chnathanchance
authored andcommitted
kbuild: respect CONFIG_WERROR for userprogs
The userprogs compiler and linker do not share the regular 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-5-c01e596309d2@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
1 parent ec4a399 commit 3f0ff4c

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
@@ -219,6 +219,8 @@ ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
219219
KBUILD_CPPFLAGS += -Werror
220220
KBUILD_AFLAGS += -Wa,--fatal-warnings
221221
KBUILD_LDFLAGS += --fatal-warnings
222+
KBUILD_USERCFLAGS += -Werror
223+
KBUILD_USERLDFLAGS += -Wl,--fatal-warnings
222224
KBUILD_RUSTFLAGS += -Dwarnings
223225

224226
endif

0 commit comments

Comments
 (0)