diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-08-14 12:14:46 +0200 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2025-08-18 10:02:57 -0700 |
| commit | 27758d8c2583d10472b745a43ff86fef96c11ef7 (patch) | |
| tree | 50876177973af40cd288d16a4c34428e7d91fde3 | |
| parent | 3f0ff4cc6ffb43ea250fdf69d9f7ae8e5a05f1f9 (diff) | |
| download | linux-27758d8c2583.tar.gz | |
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>
| -rw-r--r-- | scripts/Makefile.extrawarn | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 96ff3f5582d651..1434cb6208cb82 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -224,3 +224,8 @@ KBUILD_USERLDFLAGS += -Wl,--fatal-warnings KBUILD_RUSTFLAGS += -Dwarnings endif + +# Hostprog flags are used during build bootstrapping and can not rely on CONFIG_ symbols. +KBUILD_HOSTCFLAGS += -Werror +KBUILD_HOSTLDFLAGS += -Wl,--fatal-warnings +KBUILD_HOSTRUSTFLAGS += -Dwarnings |
