Patch "rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT" has been added to the 6.6-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: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT

to the 6.6-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-fix-the-default-format-for-config_-rustc-bindge.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 817dfccb5cb3f1aa138f12f3317e2860becd8c71
Author: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Date:   Sat Jul 27 23:03:00 2024 +0900

    rust: fix the default format for CONFIG_{RUSTC,BINDGEN}_VERSION_TEXT
    
    [ Upstream commit aacf93e87f0d808ef46e621aa56caea336b4433c ]
    
    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: 2f7ab1267dc9 ("Kbuild: add Rust support")
    Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240727140302.1806011-2-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 b5bcc863bf608..6054ba684c539 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1916,7 +1916,7 @@ config RUST
 config RUSTC_VERSION_TEXT
 	string
 	depends on RUST
-	default $(shell,$(RUSTC) --version 2>/dev/null || echo n)
+	default "$(shell,$(RUSTC) --version 2>/dev/null)"
 
 config BINDGEN_VERSION_TEXT
 	string
@@ -1924,7 +1924,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,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null || echo n)
+	default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
 
 #
 # 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