8204091: Configure broken on MIPS when uname returns mipsel or mips64el
authorerikj
Wed, 30 May 2018 09:45:24 -0700
changeset 50311 04c8eba70a59
parent 50310 5a9acf84c34a
child 50312 06b01795c957
8204091: Configure broken on MIPS when uname returns mipsel or mips64el Reviewed-by: erikj, ihse Contributed-by: aoqi@loongson.cn
make/autoconf/build-aux/config.guess
--- a/make/autoconf/build-aux/config.guess	Wed May 30 12:40:04 2018 -0300
+++ b/make/autoconf/build-aux/config.guess	Wed May 30 09:45:24 2018 -0700
@@ -86,6 +86,17 @@
   fi
 fi
 
+# Test and fix little endian MIPS.
+if [ "x$OUT" = x ]; then
+  if [ `uname -s` = Linux ]; then
+    if [ `uname -m` = mipsel ]; then
+      OUT=mipsel-unknown-linux-gnu
+    elif [ `uname -m` = mips64el ]; then
+      OUT=mips64el-unknown-linux-gnu
+    fi
+  fi
+fi
+
 # Test and fix cpu on Macosx when C preprocessor is not on the path
 echo $OUT | grep i386-apple-darwin > /dev/null 2> /dev/null
 if test $? = 0; then