[PATCH 2/2] kbuild: enable CONFIG_WERROR for more build steps

Thomas Weißschuh posted 2 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH 2/2] kbuild: enable CONFIG_WERROR for more build steps
Posted by Thomas Weißschuh 1 month, 3 weeks ago
CONFIG_WERROR is useful for all build steps, not only compilation of C and
Rust sources linked into the kernel.

Also enable it for assembler and linker invocations, userprogs, as well as
C and Rust hostprogs.

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

diff --git a/scripts/Makefile.werror b/scripts/Makefile.werror
index db14b5490ba83444be39a18109f103cabc5b95e9..e741ae45757c7864f5132d37f39fa3fea5b9d247 100644
--- a/scripts/Makefile.werror
+++ b/scripts/Makefile.werror
@@ -7,5 +7,12 @@
 # ==========================================================================
 
 KBUILD_CPPFLAGS		+= -Werror
+KBUILD_AFLAGS		+= -Wa,--fatal-warnings
+KBUILD_LDFLAGS		+= --fatal-warnings
+KBUILD_USERCFLAGS	+= -Werror
+KBUILD_USERLDFLAGS	+= -Wl,--fatal-warnings
+KBUILD_HOSTCFLAGS	+= -Werror
+KBUILD_HOSTLDFLAGS	+= -Wl,--fatal-warnings
 
 KBUILD_RUSTFLAGS	+= -Dwarnings
+KBUILD_HOSTRUSTFLAGS	+= -Dwarnings

-- 
2.50.1