diff mbox series

[03/12] kbuild: userprogs: respect CONFIG_WERROR

Message ID 20250217-kunit-kselftests-v1-3-42b4524c3b0a@linutronix.de (mailing list archive)
State New
Headers show
Series kunit: Introduce UAPI testing framework | expand

Commit Message

Thomas Weißschuh Feb. 17, 2025, 10:59 a.m. UTC
Reuse the general CONFIG_WERROR to also apply to userprogs.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.userprogs | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/scripts/Makefile.userprogs b/scripts/Makefile.userprogs
index f3a7e1ef3753b54303718fae97f4b3c9d4eac07c..debbf083bcfa01c89c204a322a1b17e2bdbe95a1 100644
--- a/scripts/Makefile.userprogs
+++ b/scripts/Makefile.userprogs
@@ -21,6 +21,10 @@  user_ccflags	= -Wp,-MMD,$(depfile) $(KBUILD_USERCFLAGS) $(userccflags) \
 user_ldflags	= $(KBUILD_USERLDFLAGS) $(userldflags) $($(target-stem)-userldflags)
 user_ldlibs	= $(userldlibs) $($(target-stem)-userldlibs)
 
+ifdef CONFIG_WERROR
+KBUILD_USERCFLAGS += -Werror
+endif
+
 # Create an executable from a single .c file
 quiet_cmd_user_cc_c = CC [U]  $@
       cmd_user_cc_c = $(CC) $(user_ccflags) $(user_ldflags) -o $@ $< \