Patch "rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rust-suppress-error-messages-from-config_-rustc-bind.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 397f647ef65b36fa530811625bc2339b2c6281ab
Author: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Date:   Sat Jul 27 23:02:59 2024 +0900

    rust: suppress error messages from CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT
    
    [ Upstream commit 5ce86c6c861352c9346ebb5c96ed70cb67414aa3 ]
    
    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@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240727140302.1806011-1-masahiroy@xxxxxxxxxx
    [ Rebased on top of v6.11-rc1. - Miguel ]
    Signed-off-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/init/Kconfig b/init/Kconfig
index 19de862768239..85e8bf76aeccb 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1942,7 +1942,7 @@ config RUST
 config RUSTC_VERSION_TEXT
 	string
 	depends on RUST
-	default $(shell,command -v $(RUSTC) >/dev/null 2>&1 && $(RUSTC) --version || echo n)
+	default $(shell,$(RUSTC) --version 2>/dev/null || echo n)
 
 config BINDGEN_VERSION_TEXT
 	string
@@ -1950,7 +1950,7 @@ config BINDGEN_VERSION_TEXT
 	# 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)
+	default $(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null || echo n)
 
 #
 # Place an empty function call at each tracepoint site. Can be




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux