From: Nathan Chancellor <nathan@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"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>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH 0/2] kbuild: enable CONFIG_WERROR for more build steps
Date: Tue, 12 Aug 2025 13:56:04 -0700 [thread overview]
Message-ID: <20250812205604.GA532342@ax162> (raw)
In-Reply-To: <CANiq72=rhY_k1RRJoTzsY8PnEW5D=m2Org9m0v3erJsWxW4HkQ@mail.gmail.com>
On Tue, Aug 12, 2025 at 12:50:44PM +0200, Miguel Ojeda wrote:
> On Tue, Aug 12, 2025 at 12:25 PM Thomas Weißschuh
> > Another possibility would be to use -Werror
> > for hostprogs unconditionally. Various tools/ are doing that for example.
>
> Not sure what Kbuild thinks about that -- we have a small risk of
> breaking things with newer compilers, but that may be not too bad for
> just hostprogs (unlike when it was attempted to make it default `y`).
...
> appear -- so that should be fine, but it does make it way more urgent
> if they are errors every time, though, since it blocks other testing
> too).
Yeah I am conflicted. On the one hand, KBUILD_HOSTCFLAGS only has -Wall
and a couple of extra warnings so the risk of new warnings breaking the
build is pretty low. You can see the rate at which warnings get added or
removed from -Wall in clang in the warning-wall.c test:
https://github.com/llvm/llvm-project/commits/main/clang/test/Misc/warning-wall.c
I'm obviously on top of testing upstream LLVM against hostprogs because
LLVM= makes it easy to set HOSTCC. I suspect that GCC trunk sees less
testing against the hostprogs unless the user has it in their PATH
somehow.
On the other hand, the recent changes to -Wuninitialized and the
addition of -Wuninitialized-const-pointer were extremely disruptive only
because of -Werror... I would have no problems with fast tracking fixes
for hostprogs -Werror usage but I am not sure all maintainers will. This
would also impact vendored host programs like dtc, which may be harder
to update.
We could try it for a development cycle in -next to see if anything gets
noticed. Always easy to back out retrospectively as well. Alternatively,
we could just recommend people use HOSTCFLAGS=-Werror if they desire it.
Cheers,
Nathan
prev parent reply other threads:[~2025-08-12 20:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 5:31 [PATCH 0/2] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
2025-08-12 5:31 ` [PATCH 1/2] kbuild: move existing CONFIG_WERROR flags into dedicated Makefile Thomas Weißschuh
2025-08-12 5:31 ` [PATCH 2/2] kbuild: enable CONFIG_WERROR for more build steps Thomas Weißschuh
2025-08-12 9:21 ` [PATCH 0/2] " Miguel Ojeda
2025-08-12 10:25 ` Thomas Weißschuh
2025-08-12 10:50 ` Miguel Ojeda
2025-08-12 20:56 ` Nathan Chancellor [this message]
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=20250812205604.GA532342@ax162 \
--to=nathan@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=miguel.ojeda.sandonis@gmail.com \
--cc=nicolas.schier@linux.dev \
--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).