Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: enable -Werror for hostprogs

The hostprog compilers and linkers do not share the regular compiler flags,
so they are not affected by CONFIG_WERROR or W=e. As hostprogs are used
during the bootstrap of the build, they can't depend on kconfig options.

Enable -Werror unconditionally.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Link: https://lore.kernel.org/rust-for-linux/CANiq72k-PdSH2BNgbq=X+FhpyEErifSCKfO5ObXz6bu9_J8+fA@mail.gmail.com/
Link: https://lore.kernel.org/r/20250814-kbuild-werror-v2-6-c01e596309d2@linutronix.de
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

authored by

Thomas Weißschuh and committed by
Nathan Chancellor
27758d8c 3f0ff4cc

+5
+5
scripts/Makefile.extrawarn
··· 224 224 KBUILD_RUSTFLAGS += -Dwarnings 225 225 226 226 endif 227 + 228 + # Hostprog flags are used during build bootstrapping and can not rely on CONFIG_ symbols. 229 + KBUILD_HOSTCFLAGS += -Werror 230 + KBUILD_HOSTLDFLAGS += -Wl,--fatal-warnings 231 + KBUILD_HOSTRUSTFLAGS += -Dwarnings