]> git.lizzy.rs Git - rust.git/blobdiff - configure
reference: make tuple usage examples more meaningful
[rust.git] / configure
index b0549205ace1e26a8f2821a2c30bafde14075016..891f524a706e0848d0ed12e650e841f6735cfd09 100755 (executable)
--- a/configure
+++ b/configure
@@ -899,6 +899,18 @@ then
     fi
 fi
 
+# If the clang isn't already enabled, check for GCC, and if it is missing, turn
+# on clang as a backup.
+if [ -z "$CFG_ENABLE_CLANG" ]
+then
+  CFG_GCC_VERSION=$("$CFG_GCC" --version 2>&1)
+  if [ $? -ne 0 ]
+  then
+    step_msg "GCC not installed, will try using Clang"
+    CFG_ENABLE_CLANG=1
+  fi
+fi
+
 # Okay, at this point, we have made up our minds about whether we are
 # going to force CFG_ENABLE_CLANG or not; save the setting if so.
 if [ ! -z "$CFG_ENABLE_CLANG" ]
@@ -920,7 +932,7 @@ then
     LLVM_VERSION=$($LLVM_CONFIG --version)
 
     case $LLVM_VERSION in
-        (3.[5-6]*)
+        (3.[5-7]*)
             msg "found ok version of LLVM: $LLVM_VERSION"
             ;;
         (*)
@@ -1037,6 +1049,14 @@ for target_file in ${CFG_SRC_DIR}mk/cfg/*.mk; do
   CFG_SUPPORTED_TARGET="${CFG_SUPPORTED_TARGET} $(basename "$target_file" .mk)"
 done
 
+# copy build-triples to host-triples so that builds are a subset of hosts
+V_TEMP=""
+for i in $CFG_BUILD $CFG_HOST;
+do
+   echo "$V_TEMP" | grep -qF $i || V_TEMP="$V_TEMP${V_TEMP:+ }$i"
+done
+CFG_HOST=$V_TEMP
+
 # copy host-triples to target-triples so that hosts are a subset of targets
 V_TEMP=""
 for i in $CFG_HOST $CFG_TARGET;