summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in16
1 files changed, 12 insertions, 4 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 36c77ba..ba30c4f 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -63,8 +63,15 @@ CT_DoExecLog DEBUG rm -f "${CT_WORK_DIR}/foo"
# What's our shell?
# Will be plain /bin/sh on most systems, except if we have /bin/ash and we
# _explictly_ required using it
-CT_SHELL="/bin/sh"
-[ "${CT_CONFIG_SHELL_ASH}" = "y" -a -x "/bin/ash" ] && CT_SHELL="/bin/ash"
+case "${CT_CONFIG_SHELL}" in
+ sh) CT_SHELL="/bin/sh";;
+ ash) CT_SHELL="/bin/ash";;
+ bash) CT_SHELL="${BASH}";;
+ custom) CT_SHELL="${CT_CONFIG_SHELL_CUSTOM_PATH}";;
+esac
+
+# Check the user is using an existing SHELL to be used by ./configure and Makefiles
+CT_TestOrAbort "The CONFIG_SHELL '${CT_CONFIG_SHELL}' (${CT_SHELL}) is not valid" -f "${CT_SHELL}" -a -x "${CT_SHELL}"
# Create the bin-overide early
# Contains symlinks to the tools found by ./configure
@@ -405,7 +412,7 @@ if [ -z "${CT_RESTART}" ]; then
else
case "${tool}" in
# We'll at least need some of them...
- ar|as|gcc|ld|nm|objcopy|objdump|ranlib)
+ ar|as|gcc|g++|ld|nm|objcopy|objdump|ranlib)
CT_Abort "Missing: '${t}${tool}${!s}' or '${t}${tool}' or '${tool}' : either needed!"
;;
# Some are conditionnally required
@@ -452,7 +459,8 @@ if [ -z "${CT_RESTART}" ]; then
# Set the shell to be used by ./configure scripts and by Makefiles (those
# that support it!).
- export CONFIG_SHELL="${CT_SHELL}"
+ export CONFIG_SHELL="${CT_SHELL}" # for ./configure
+ export SHELL="${CT_SHELL}" # for Makefiles
# And help make go faster
PARALLELMFLAGS=