about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-06-24 21:17:00 +0000
committerbors <bors@rust-lang.org>2015-06-24 21:17:00 +0000
commit4757d9bcc41ca59b6d52bd85d57faab0b71802e9 (patch)
treee587b7a3048657d33a60a3d7a2a59c3e4a61c23e
parent21dd4e2a0627daa2f9023084e253e75ccfaa5137 (diff)
parent44d487d37ca2a29c26ca46106955d85482b3754f (diff)
downloadrust-4757d9bcc41ca59b6d52bd85d57faab0b71802e9.tar.gz
rust-4757d9bcc41ca59b6d52bd85d57faab0b71802e9.zip
Auto merge of #26185 - dhuseby:fixing_freebsd_configure, r=brson
On FreeBSD machines without GCC installed, the configure script will now fall back to using clang.
-rwxr-xr-xconfigure12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure b/configure
index d72fe075983..891f524a706 100755
--- 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" ]