libgo: use gc's arch names as the default GOARCHs on MIPS

This means that the gc tools and gofrontend agree on the architecture names
for the 3 MIPS ABIs which should allow a gofrontend compiler to build go.

Change-Id: I68e8249af7e4b3f19809ad03509a884e25d2422f
Reviewed-on: https://go-review.googlesource.com/46153
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/configure b/libgo/configure
index 0700b7b..f120ed4 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -13769,9 +13769,9 @@
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     case "$mips_abi" in
-    "o32") GOARCH=mipso32 ;;
-    "n32") GOARCH=mipsn32 ;;
-    "n64") GOARCH=mipsn64 ;;
+    "o32") GOARCH=mips ;;
+    "n32") GOARCH=mips64p32 ;;
+    "n64") GOARCH=mips64 ;;
     "o64") GOARCH=mipso64 ;;
     esac
     case "$mips_abi" in
@@ -13785,7 +13785,8 @@
         ;;
     esac
     case "${host}" in
-    mips*el)
+    mips*el-*-*)
+	GOARCH="${GOARCH}le"
         ;;
     *)
 	GOARCH_BIGENDIAN=1
diff --git a/libgo/configure.ac b/libgo/configure.ac
index d16547f..bded202 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -299,9 +299,9 @@
 	[AC_MSG_ERROR([unknown MIPS ABI])
 [mips_abi="n32"]])])])])
     case "$mips_abi" in
-    "o32") GOARCH=mipso32 ;;
-    "n32") GOARCH=mipsn32 ;;
-    "n64") GOARCH=mipsn64 ;;
+    "o32") GOARCH=mips ;;
+    "n32") GOARCH=mips64p32 ;;
+    "n64") GOARCH=mips64 ;;
     "o64") GOARCH=mipso64 ;;
     esac
     case "$mips_abi" in
@@ -315,7 +315,8 @@
         ;;
     esac
     case "${host}" in
-    mips*el)
+    mips*el-*-*)
+        GOARCH="${GOARCH}le"
         ;;
     *)
 	GOARCH_BIGENDIAN=1