[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <652ElsLaWV50vwbKOQc-kTFLeaf8wUGPKNhc8B8tS6EqgqzSj5k_tHgqCTUcxfSZkYvB1xC_N2pmNIA-oq2q9irSPp2XNaaiv67pZojm_9I=@protonmail.com>
Date: Sat, 10 Aug 2024 13:44:15 +0000
From: Björn Roy Baron <bjorn3_gh@...tonmail.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>, Wedson Almeida Filho <wedsonaf@...il.com>, Masahiro Yamada <masahiroy@...nel.org>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Benno Lossin <benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...sung.com>, Alice Ryhl <aliceryhl@...gle.com>, rust-for-linux@...r.kernel.org, Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>, linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH 2/6] kbuild: rust: make command for `RUSTC_VERSION_TEXT` closer to the `CC` one
On Friday, August 9th, 2024 at 00:11, Miguel Ojeda <ojeda@...nel.org> wrote:
> `CC_VERSION_TEXT` is defined as:
>
> CC_VERSION_TEXT = $(subst $(pound),,$(shell LC_ALL=C $(CC) --version 2>/dev/null | head -n 1))
>
> Make `RUSTC_VERSION_TEXT` closer to that, i.e. add `LC_ALL=C` and `|
> head -n 1` in case it matters in the future, and for consistency.
Cargo depends on the rustc version string not getting localized. Or to be precise it depends on the version string being fixed for a given rustc version, which would not be the case if the value of LC_ALL could change the version string. If the version string changes, cargo will rebuild everything from scratch. There is also not really anything to localize in the non-verbose version string. I guess setting LC_ALL doesn't hurt either though.
>
> This reduces the difference in the next commit.
>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> ---
> init/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 47e2c3227b99..2f974f412374 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -1926,7 +1926,7 @@ config RUST
> config RUSTC_VERSION_TEXT
> string
> depends on RUST
> - default "$(shell,$(RUSTC) --version 2>/dev/null)"
> + default "$(shell,LC_ALL=C $(RUSTC) --version 2>/dev/null | head -n 1)"
>
> config BINDGEN_VERSION_TEXT
> string
> --
> 2.46.0
Powered by blists - more mailing lists