mips32/64: Remove default flags -mips32 and -mips64 from the Makefile.all.am.

During configuration of Valgrind we check does the compiler support -march=mips32 and
-march=mips64. If compiler supports these flags we are using them as default flags for
mips32 and mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13815 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.ac b/configure.ac
index fb17ce4..cfab5c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,6 +1490,46 @@
 AC_SUBST(FLAG_M64)
 
 
+# does this compiler support -march=mips32 (mips32 default) ?
+AC_MSG_CHECKING([if gcc accepts -march=mips32])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -march=mips32"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+  return 0;
+]])], [
+FLAG_MIPS32="-march=mips32"
+AC_MSG_RESULT([yes])
+], [
+FLAG_MIPS32=""
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AC_SUBST(FLAG_MIPS32)
+
+
+# does this compiler support -march=mips64 (mips64 default) ?
+AC_MSG_CHECKING([if gcc accepts -march=mips64])
+
+safe_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -march=mips64"
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
+  return 0;
+]])], [
+FLAG_MIPS64="-march=mips64"
+AC_MSG_RESULT([yes])
+], [
+FLAG_MIPS64=""
+AC_MSG_RESULT([no])
+])
+CFLAGS=$safe_CFLAGS
+
+AC_SUBST(FLAG_MIPS64)
+
+
 # does this compiler support -march=octeon (Cavium OCTEON I Specific) ?
 AC_MSG_CHECKING([if gcc accepts -march=octeon])
 
@@ -1509,6 +1549,7 @@
 
 AC_SUBST(FLAG_OCTEON)
 
+
 # does this compiler support -march=octeon2 (Cavium OCTEON II Specific) ?
 AC_MSG_CHECKING([if gcc accepts -march=octeon2])