rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
To: "Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nicolas.schier@linux.dev>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Subject: [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn`
Date: Thu, 14 Aug 2025 12:14:43 +0200	[thread overview]
Message-ID: <20250814-kbuild-werror-v2-3-c01e596309d2@linutronix.de> (raw)
In-Reply-To: <20250814-kbuild-werror-v2-0-c01e596309d2@linutronix.de>

From: Miguel Ojeda <ojeda@kernel.org>

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 <ojeda@kernel.org>
---
 Makefile                   | 3 ---
 scripts/Makefile.extrawarn | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 6bfe776bf3c5ff0cf187dc6719dd5817cd4af2ca..6630a66659c6d1ca7e72448b04d16c3fdd1fbe24 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 1ffc7beca43bc9e373064194dc8975182815a872..b04b3062e0e49c3ae7471973251017e8738cd244 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

-- 
2.50.1


  parent reply	other threads:[~2025-08-14 10:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 10:14 [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 1/6] kbuild: align W=e with CONFIG_WERROR Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 2/6] kbuild: unify W=e and CONFIG_WERROR Thomas Weißschuh
2025-08-14 10:14 ` Thomas Weißschuh [this message]
2025-08-14 10:14 ` [PATCH v2 4/6] kbuild: respect CONFIG_WERROR for linker and assembler Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 5/6] kbuild: respect CONFIG_WERROR for userprogs Thomas Weißschuh
2025-08-14 10:14 ` [PATCH v2 6/6] kbuild: enable -Werror for hostprogs Thomas Weißschuh
2025-08-14 12:10   ` Nicolas Schier
2025-08-14 18:30     ` Nathan Chancellor
2025-08-17 16:31   ` Miguel Ojeda
2025-08-18 17:45     ` Nathan Chancellor
2025-08-14 19:11 ` [PATCH v2 0/6] kbuild: enable CONFIG_WERROR for more build steps Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250814-kbuild-werror-v2-3-c01e596309d2@linutronix.de \
    --to=thomas.weissschuh@linutronix.de \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).