From: Alice Ryhl <aliceryhl@google.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: "Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org
Subject: Re: [PATCH] x86/rust: avoid duplication of RETPOLINE_RUSTFLAGS in recursive kbuild
Date: Thu, 15 Oct 2026 06:42:32 +0000 [thread overview]
Message-ID: <atB12Dve5tdS_lJk@google.com> (raw)
In-Reply-To: <20261013-rust-x86-rethunk-rebuilds-v1-1-d2042a72640b@weissschuh.net>
On Tue, Oct 13, 2026 at 10:42:26AM +0200, Thomas Weißschuh wrote:
> Currently the only modificiation of REPTOLINE_RUSTFLAGS is an append.
> There is no initial (re)set of the value. When kbuild is invoked
> recursively, for example through a top-level `make pacman-pkg`
> invocation, then the inner instance of kbuild will inherit the value
> from the outer one and append the same values again.
>
> Switching between recursive and non-recursive invocations of kbuild in
> the same build tree the command line changes and Rust code is rebuilt.
> While this is harmless, it is slow and unnecessary.
>
> Replace the append operation with a regular assignment. This avoids the
> duplicated values in a recursive kbuild invocation and therefore also
> the spurious rebuilds.
>
> RETPOLINE_CFLAGS is not affected as it is always reset to a fixed value
> further up in the Makefile.
>
> Fixes: d7868550d573 ("x86/rust: support MITIGATION_RETHUNK")
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
prev parent reply other threads:[~2026-10-15 6:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 8:42 [PATCH] x86/rust: avoid duplication of RETPOLINE_RUSTFLAGS in recursive kbuild Thomas Weißschuh
2026-10-15 6:42 ` Alice Ryhl [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=atB12Dve5tdS_lJk@google.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=bp@alien8.de \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dave.hansen@linux.intel.com \
--cc=gary@garyguo.net \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lossin@kernel.org \
--cc=mingo@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
--cc=x86@kernel.org \
/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.