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 5/6] kbuild: respect CONFIG_WERROR for userprogs
Date: Thu, 14 Aug 2025 12:14:45 +0200	[thread overview]
Message-ID: <20250814-kbuild-werror-v2-5-c01e596309d2@linutronix.de> (raw)
In-Reply-To: <20250814-kbuild-werror-v2-0-c01e596309d2@linutronix.de>

The userprogs compiler and linker do not share the regular compiler flags.

Make sure they also fail on warnings with CONFIG_WERROR and W=e.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
---
 scripts/Makefile.extrawarn | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index 6efb9e5eeeed0696a061a17e029a92caba50826f..96ff3f5582d651f0016c8ccd49d46022cc6fe070 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -219,6 +219,8 @@ ifneq ($(findstring e, $(KBUILD_EXTRA_WARN))$(CONFIG_WERROR),)
 KBUILD_CPPFLAGS		+= -Werror
 KBUILD_AFLAGS		+= -Wa,--fatal-warnings
 KBUILD_LDFLAGS		+= --fatal-warnings
+KBUILD_USERCFLAGS	+= -Werror
+KBUILD_USERLDFLAGS	+= -Wl,--fatal-warnings
 KBUILD_RUSTFLAGS	+= -Dwarnings
 
 endif

-- 
2.50.1


  parent reply	other threads:[~2025-08-14 10:15 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 ` [PATCH v2 3/6] kbuild: rust: move `-Dwarnings` handling to `Makefile.extrawarn` Thomas Weißschuh
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 ` Thomas Weißschuh [this message]
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-5-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).