summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-07-27 16:02:59 +0200
committerMiguel Ojeda <ojeda@kernel.org>2024-07-29 00:48:12 +0200
commit5ce86c6c861352c9346ebb5c96ed70cb67414aa3 (patch)
tree4258cb0430f3c5a196fde61eb53059574a8f617a /init/main.c
parentLinux 6.11-rc1 (diff)
downloadlinux-5ce86c6c861352c9346ebb5c96ed70cb67414aa3.tar.xz
linux-5ce86c6c861352c9346ebb5c96ed70cb67414aa3.zip
rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT
While this is a somewhat unusual case, I encountered odd error messages when I ran Kconfig in a foreign architecture chroot. $ make allmodconfig sh: 1: rustc: not found sh: 1: bindgen: not found # # configuration written to .config # The successful execution of 'command -v rustc' does not necessarily mean that 'rustc --version' will succeed. $ sh -c 'command -v rustc' /home/masahiro/.cargo/bin/rustc $ sh -c 'rustc --version' sh: 1: rustc: not found Here, 'rustc' is built for x86, and I ran it in an arm64 system. The current code: command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version || echo n can be turned into: command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version 2>/dev/null || echo n However, I did not understand the necessity of 'command -v $(RUSTC)'. I simplified it to: $(RUSTC) --version 2>/dev/null || echo n Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Link: https://lore.kernel.org/r/20240727140302.1806011-1-masahiroy@kernel.org [ Rebased on top of v6.11-rc1. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'init/main.c')
0 files changed, 0 insertions, 0 deletions