about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-25 06:24:56 +0000
committerbors <bors@rust-lang.org>2015-12-25 06:24:56 +0000
commit711f11e8d607b3ecf297366fa704b5200709d12d (patch)
tree60066a3f39833f08c3e57def13c92a02f1e9c6fa /configure
parent8037e62d29f7e0f7084c95b87c243dc83bdd8e3c (diff)
parent944b337c9559db56b26f2a06fff65bf6ea8eb5a6 (diff)
downloadrust-711f11e8d607b3ecf297366fa704b5200709d12d.tar.gz
rust-711f11e8d607b3ecf297366fa704b5200709d12d.zip
Auto merge of #30544 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #30251, #30461, #30465, #30473, #30529, #30537, #30539, #30541, #30543
- Failed merges:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 11 insertions, 8 deletions
diff --git a/configure b/configure
index c4944f53463..df76d805f82 100755
--- a/configure
+++ b/configure
@@ -521,15 +521,18 @@ then
     # if configure is running in an interactive bash shell. /usr/bin/env
     # exists *everywhere*.
     BIN_TO_PROBE="$SHELL"
-    if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then
-       BIN_TO_PROBE="/usr/bin/env"
+    if [ ! -r "$BIN_TO_PROBE" ]; then
+        if [ -r "/usr/bin/env" ]; then
+            BIN_TO_PROBE="/usr/bin/env"
+        else
+            warn "Cannot check if the userland is i686 or x86_64"
+        fi
+    fi
+    file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
+    if [ $? != 0 ]; then
+        msg "i686 userland on x86_64 Linux kernel"
+        CFG_CPUTYPE=i686
     fi
-    if [ -n "$BIN_TO_PROBE" ]; then
-       file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
-       if [ $? != 0 ]; then
-            CFG_CPUTYPE=i686
-       fi
-     fi
 fi