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>
This commit is contained in:
Thomas Weißschuh 2025-08-14 12:14:45 +02:00 committed by Nathan Chancellor
parent ec4a3992bc
commit 3f0ff4cc6f
No known key found for this signature in database
GPG Key ID: 1D6B269171C01A96
1 changed files with 2 additions and 0 deletions

View File

@ -219,6 +219,8 @@ ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
KBUILD_CPPFLAGS += -Werror
KBUILD_AFLAGS += -Wa,--fatal-warnings
KBUILD_LDFLAGS += --fatal-warnings
KBUILD_USERCFLAGS += -Werror
KBUILD_USERLDFLAGS += -Wl,--fatal-warnings
KBUILD_RUSTFLAGS += -Dwarnings
endif