On Tue, Jun 10, 2014 at 01:36:48PM +0200, Michal Marek wrote: > On 2014-06-10 13:17, Masahiro Yamada wrote: > > IMHO: > > If all shell scripts invoked by $KBUILD_SHELL should be sh-compatible, > > "KBUILD_SHELL" should always be set to "/bin/sh" and > > users should not change it. > > > > I still don't understand why bash is preferable for KBUILD_SHELL. > > I'm just speculating, but the reason might have been that if you are > compiling Linux on some oddball UNIX system, the POSIX shell might not > be "/bin/sh", but some other path, who knows which. But if $BASH is > defined or if there is /bin/bash, then it's very likely the familiar GNU > Bash. Hence the preference. Of course, the side effect is that it makes > it easy to introduce bash-only constructs into the scripts :-/. It has been like this forever... The reasons for having CONFIG_SHELL are: - with a distribution where /bin/sh does not work with the shells provided by the kernel - the user can override this to select another shell. - avoid hardcoding /bin/sh in all the places where we run a script I recall we had problems with bash only stuff when ubuntu changed to dash. But back then the fix was always to remove the bashism from the scripts. IMO we should document that CONFG_SHELL/KBUILD_SHELL exists. But that the user needs to modify the top-level Makefiel to change it is IMO OK as this is seldomly if ever required. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html