aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.extrawarn
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-10-11 15:47:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2025-10-11 15:47:12 -0700
commitc04022dccb2f9cf2b1cfe65807149500d1fc080a (patch)
tree776337dcd3df8b15e30a393850b0d2379546ae40 /scripts/Makefile.extrawarn
parentMerge tag 'rtc-6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/abellon... (diff)
parentkbuild: Use '--strip-unneeded-symbol' for removing module device table symbols (diff)
downloadlinux-c04022dccb2f9cf2b1cfe65807149500d1fc080a.tar.gz
linux-c04022dccb2f9cf2b1cfe65807149500d1fc080a.zip
Merge tag 'kbuild-fixes-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux
Pull Kbuild fixes from Nathan Chancellor: - Fix UAPI types check in headers_check.pl - Only enable -Werror for hostprogs with CONFIG_WERROR / W=e - Ignore fsync() error when output of gen_init_cpio is a pipe - Several little build fixes for recent modules.builtin.modinfo series * tag 'kbuild-fixes-6.18-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux: kbuild: Use '--strip-unneeded-symbol' for removing module device table symbols s390/vmlinux.lds.S: Move .vmlinux.info to end of allocatable sections kbuild: Add '.rel.*' strip pattern for vmlinux kbuild: Restore pattern to avoid stripping .rela.dyn from vmlinux gen_init_cpio: Ignore fsync() returning EINVAL on pipes scripts/Makefile.extrawarn: Respect CONFIG_WERROR / W=e for hostprogs kbuild: uapi: Strip comments before size type check
Diffstat (limited to 'scripts/Makefile.extrawarn')
-rw-r--r--scripts/Makefile.extrawarn8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 1434cb6208cb..6af392f9cd02 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -223,9 +223,11 @@ KBUILD_USERCFLAGS += -Werror
KBUILD_USERLDFLAGS += -Wl,--fatal-warnings
KBUILD_RUSTFLAGS += -Dwarnings
-endif
-
-# Hostprog flags are used during build bootstrapping and can not rely on CONFIG_ symbols.
+# While hostprog flags are used during build bootstrapping (thus should not
+# depend on CONFIG_ symbols), -Werror is disruptive and should be opted into.
+# Only apply -Werror to hostprogs built after the initial Kconfig stage.
KBUILD_HOSTCFLAGS += -Werror
KBUILD_HOSTLDFLAGS += -Wl,--fatal-warnings
KBUILD_HOSTRUSTFLAGS += -Dwarnings
+
+endif