[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kZjOwSerDEM517uEVffGYzUhm2Pb+1z=7hboJKuQwBMw@mail.gmail.com>
Date: Tue, 7 Oct 2025 18:00:44 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Nicolas Schier <nicolas.schier@...ux.dev>,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
Askar Safin <safinaskar@...il.com>, Sam James <sam@...too.org>, Miguel Ojeda <ojeda@...nel.org>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts/Makefile.extrawarn: Respect CONFIG_WERROR / W=e
for hostprogs
On Mon, Oct 6, 2025 at 11:40 PM Nathan Chancellor <nathan@...nel.org> wrote:
>
> Commit 27758d8c2583 ("kbuild: enable -Werror for hostprogs")
> unconditionally enabled -Werror for the compiler, assembler, and linker
> when building the host programs, as the build footprint of the host
> programs is small (thus risk of build failures from warnings are low)
> and that stage of the build may not have Kconfig values (thus
> CONFIG_WERROR could not be used as a precondition).
>
> While turning warnings into errors unconditionally happens in a few
> places within the kernel, it can be disruptive to people who may be
> building with newer compilers, such as while doing a bisect. While it is
> possible to avoid this behavior by passing HOSTCFLAGS=-w or
> HOSTCFLAGS=-Wno-error, it may not be the most intuitive for regular
> users not intimately familiar with Kbuild.
>
> Avoid being disruptive to the entire build by depending on the explicit
> opt-in of CONFIG_WERROR or W=e to enable -Werror and the like while
> building the host programs. While this means there is a small portion of
> the build that does not have -Werror enabled (namely scripts/kconfig/*
> and scripts/basic/fixdep), it is better than not having it altogether.
>
> Fixes: 27758d8c2583 ("kbuild: enable -Werror for hostprogs")
> Link: https://lore.kernel.org/20251005011100.1035272-1-safinaskar@gmail.com/
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>
Acked-by: Miguel Ojeda <ojeda@...nel.org>
Cheers,
Miguel
Powered by blists - more mailing lists