linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Nathan Chancellor" <nathan@kernel.org>,
	"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>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org
Subject: Re: [PATCH v2 6/6] kbuild: enable -Werror for hostprogs
Date: Thu, 14 Aug 2025 14:10:13 +0200	[thread overview]
Message-ID: <aJ3SJWu8-o2S-KU5@levanger> (raw)
In-Reply-To: <20250814-kbuild-werror-v2-6-c01e596309d2@linutronix.de>

On Thu, Aug 14, 2025 at 12:14:46PM +0200, Thomas Weißschuh wrote:
> 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>
> 
> ---
> For testing in -next, as discussed in
> https://lore.kernel.org/lkml/20250812-kbuild-werror-v1-2-36c9ff653700@linutronix.de/

yeah, I am not sure if this is a good change, but I am ok with testing
it in next, as Nathan suggested.

For the rest of the series:

Reviewed-by: Nicolas Schier <nsc@kernel.org>

Thanks.

> ---
>  scripts/Makefile.extrawarn | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
> index 96ff3f5582d651f0016c8ccd49d46022cc6fe070..1434cb6208cb82f20aeb29cc8c059220d1a1f6d2 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
> 
> -- 
> 2.50.1
> 

  reply	other threads:[~2025-08-14 12:39 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 ` [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 [this message]
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=aJ3SJWu8-o2S-KU5@levanger \
    --to=nsc@kernel.org \
    --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=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=thomas.weissschuh@linutronix.de \
    --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).