Skip to content
Snippets Groups Projects
Commit 37338876 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Frieder Schrempf
Browse files

rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT


[ Upstream commit aacf93e8 ]

Another oddity in these config entries is their default value can fall
back to 'n', which is a value for bool or tristate symbols.

The '|| echo n' is an incorrect workaround to avoid the syntax error.
This is not a big deal, as the entry is hidden by 'depends on RUST' in
situations where '$(RUSTC) --version' or '$(BINDGEN) --version' fails.
Anyway, it looks odd.

The default of a string type symbol should be a double-quoted string
literal. Turn it into an empty string when the version command fails.

Fixes: 2f7ab126 ("Kbuild: add Rust support")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240727140302.1806011-2-masahiroy@kernel.org


[ Rebased on top of v6.11-rc1. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 57b108e5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment