From: Miguel Ojeda Date: Thu, 14 Aug 2025 10:14:43 +0000 (+0200) Subject: kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=592b571f20c5b905c47a1370210456f9f90ce04f;p=users%2Fhch%2Fmisc.git kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` Following commit e88ca24319e4 ("kbuild: consolidate warning flags in scripts/Makefile.extrawarn"), move `-Dwarnings` handling into `Makefile.extrawarn` like C's `-Werror`. No functional change intended. Signed-off-by: Miguel Ojeda Reviewed-by: Nicolas Schier Link: https://lore.kernel.org/r/20250814-kbuild-werror-v2-3-c01e596309d2@linutronix.de Signed-off-by: Nathan Chancellor --- diff --git a/Makefile b/Makefile index 6bfe776bf3c5..6630a66659c6 100644 --- a/Makefile +++ b/Makefile @@ -901,9 +901,6 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong KBUILD_CFLAGS += $(stackp-flags-y) -KBUILD_RUSTFLAGS-$(CONFIG_WERROR) += -Dwarnings -KBUILD_RUSTFLAGS += $(KBUILD_RUSTFLAGS-y) - ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls KBUILD_RUSTFLAGS += -Cforce-frame-pointers=y diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 1ffc7beca43b..b04b3062e0e4 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -217,5 +217,6 @@ endif ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),) KBUILD_CPPFLAGS += -Werror +KBUILD_RUSTFLAGS += -Dwarnings endif