From: Nathan Chancellor <nathan@kernel.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: "Nicolas Schier" <nsc@kernel.org>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Miguel Ojeda" <ojeda@kernel.org>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: Never respect CONFIG_WERROR / W=e to fixdep
Date: Wed, 22 Apr 2026 13:05:26 -0700 [thread overview]
Message-ID: <20260422200526.GA310618@ax162> (raw)
In-Reply-To: <20260422-kbuild-scripts-basic-werror-v1-1-8c6912ff22e0@weissschuh.net>
On Wed, Apr 22, 2026 at 05:10:27PM +0200, Thomas Weißschuh wrote:
> The fixdep hostprog may be built multiple times during a single build.
> Once during the configuration phase and later during the regular phase.
> As only the regular build phase respects CONFIG_WERROR / W=e, the
> compiler flags might change between the phases, leading to rebuilds.
>
> Example, the rebuilds will happen twice on each invocation of the build:
>
> $ make allyesconfig prepare
> make[1]: Entering directory '/tmp/deleteme'
> HOSTCC scripts/basic/fixdep
> #
> # No change to .config
> #
> HOSTCC scripts/basic/fixdep
> DESCEND objtool
> INSTALL libsubcmd_headers
> make[1]: Leaving directory '/tmp/deleteme'
>
> Fix the compilation flags used for scripts/basic/ before
> scripts/Makefile.warn is evaluated to stop CONFIG_WERROR / W=e
> influencing the fixdep build to avoid the spurious rebuilds.
>
> Fixes: 7ded7d37e5f5 ("scripts/Makefile.extrawarn: Respect CONFIG_WERROR / W=e for hostprogs")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 54e1ae602000..6c8a1b2e7c8a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -657,6 +657,8 @@ export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o \
>
> # Basic helpers built in scripts/basic/
> PHONY += scripts_basic
> +scripts_basic: KBUILD_HOSTCFLAGS := $(KBUILD_HOSTCFLAGS)
> +scripts_basic: KBUILD_HOSTLDFLAGS := $(KBUILD_HOSTLDFLAGS)
> scripts_basic:
> $(Q)$(MAKE) $(build)=scripts/basic
>
>
> ---
> base-commit: 6596a02b207886e9e00bb0161c7fd59fea53c081
> change-id: 20260422-kbuild-scripts-basic-werror-f8f7bfc39cfc
>
> Best regards,
> --
> Thomas Weißschuh <linux@weissschuh.net>
>
prev parent reply other threads:[~2026-04-22 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 15:10 [PATCH] kbuild: Never respect CONFIG_WERROR / W=e to fixdep Thomas Weißschuh
2026-04-22 20:05 ` 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=20260422200526.GA310618@ax162 \
--to=nathan@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=nsc@kernel.org \
--cc=ojeda@kernel.org \
--cc=thomas.weissschuh@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.