summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2024-07-09 18:06:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-08-29 17:33:29 +0200
commit34e1335905f2311a3d788108ae0a5102719f068d (patch)
treed79a76c4e385d0b3864a2dc3b705fc37e49d12a1 /init
parent7d805d92552936ace0307611b616d5aa8ced89f7 (diff)
downloadlinux-34e1335905f2311a3d788108ae0a5102719f068d.tar.gz
linux-34e1335905f2311a3d788108ae0a5102719f068d.tar.bz2
linux-34e1335905f2311a3d788108ae0a5102719f068d.zip
rust: work around `bindgen` 0.69.0 issue
[ Upstream commit 9e98db17837093cb0f4dcfcc3524739d93249c45 ] `bindgen` 0.69.0 contains a bug: `--version` does not work without providing a header [1]: error: the following required arguments were not provided: <HEADER> Usage: bindgen <FLAGS> <OPTIONS> <HEADER> -- <CLANG_ARGS>... Thus, in preparation for supporting several `bindgen` versions, work around the issue by passing a dummy argument. Include a comment so that we can remove the workaround in the future. Link: https://github.com/rust-lang/rust-bindgen/pull/2678 [1] Reviewed-by: Finn Behrens <me@kloenk.dev> Tested-by: Benno Lossin <benno.lossin@proton.me> Tested-by: Andreas Hindborg <a.hindborg@samsung.com> Link: https://lore.kernel.org/r/20240709160615.998336-9-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Stable-dep-of: 5ce86c6c8613 ("rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index e173364abd6c..777113dceca5 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1921,7 +1921,10 @@ config RUSTC_VERSION_TEXT
config BINDGEN_VERSION_TEXT
string
depends on RUST
- default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version || echo n)
+ # The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
+ # (https://github.com/rust-lang/rust-bindgen/pull/2678). It can be removed when
+ # the minimum version is upgraded past that (0.69.1 already fixed the issue).
+ default $(shell,command -v $(BINDGEN) >/dev/null 2>&1 && $(BINDGEN) --version workaround-for-0.69.0 || echo n)
#
# Place an empty function call at each tracepoint site. Can be