aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2022-01-10 08:59:52 +0000
committerMiguel Ojeda <ojeda@kernel.org>2022-05-23 02:24:56 +0200
commit9a5fe747d99e1d562dde1f39259bbe2d098262ae (patch)
treecb95f8c3f7adddc0a53ca0a1f471f805586a4261
parentf19584603a37c11d6cf6d5f46747fa63929d6246 (diff)
init/Kconfig: Specify the interpreter for rust-is-available.sh
Some common tools like 'diff' don't support permissions of the files. Due to that, 'rust-is-available.sh' in some trees including '-mm' result in having no execution permission, and therefore build fails like below: $ make O=../linux.out/ olddefconfig make[1]: Entering directory 'linux.out' GEN Makefile sh: 1: linux/scripts/rust-is-available.sh: Permission denied init/Kconfig:71: syntax error init/Kconfig:70: invalid statement linux/scripts/kconfig/Makefile:77: recipe for target 'olddefconfig' failed make[2]: *** [olddefconfig] Error 1 linux/Makefile:666: recipe for target 'olddefconfig' failed make[1]: *** [olddefconfig] Error 2 make[1]: Leaving directory 'linux.out' Makefile:226: recipe for target '__sub-make' failed make: *** [__sub-make] Error 2 It's not a big deal, but not so fun. This commit works around the issue by specifying the interpreter for 'rust-is-available.sh' in the Kconfig file. The ugly work around wouldn't be needed once 'rust-is-available.sh' file is merged in the mainline with the execution permission. Signed-off-by: SeongJae Park <sj@kernel.org> Reviewed-by: Wei Liu <wei.liu@kernel.org> [Edited for new script] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
-rw-r--r--init/Kconfig8
1 files changed, 7 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 3457cf596588..70788df0db5a 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -61,7 +61,13 @@ config LLD_VERSION
default 0
config RUST_IS_AVAILABLE
- def_bool $(success,$(srctree)/scripts/rust-is-available.sh)
+ # Because some common tools like 'diff' don't support permissions of
+ # the files, 'rust-is-available.sh' in some trees that managed with such
+ # tools result in having no execution permission. As a temporal work
+ # around, we specify the interpreter ('/bin/sh'). It will be unneeded
+ # once 'rust-is-available.sh' is merged in the mainline with its execution
+ # permission.
+ def_bool $(success,/bin/sh $(srctree)/scripts/rust-is-available.sh)
help
This shows whether a suitable Rust toolchain is available (found).