]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips: make sure configure script checks for correct ABIs
authorPetar Jovanovic <mips32r2@gmail.com>
Mon, 2 Oct 2017 11:28:50 +0000 (13:28 +0200)
committerPetar Jovanovic <mips32r2@gmail.com>
Mon, 2 Oct 2017 11:28:50 +0000 (13:28 +0200)
For mips64, we currently build for n64.
For mips32, we currently build for o32.

Pass these flags explicitly in configure checks.

configure.ac

index 483d9bd880753a961060d1398c0a56670aa9b022..392081db461a86049f747450343bbc2dfd3e789c 100644 (file)
@@ -1720,15 +1720,15 @@ AC_SUBST(FLAG_M64)
 
 
 # does this compiler support -march=mips32 (mips32 default) ?
-AC_MSG_CHECKING([if gcc accepts -march=mips32])
+AC_MSG_CHECKING([if gcc accepts -march=mips32 -mabi=32])
 
 safe_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -march=mips32 -Werror"
+CFLAGS="$CFLAGS -march=mips32 -mabi=32 -Werror"
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
   return 0;
 ]])], [
-FLAG_MIPS32="-march=mips32"
+FLAG_MIPS32="-march=mips32 -mabi=32"
 AC_MSG_RESULT([yes])
 ], [
 FLAG_MIPS32=""
@@ -1740,15 +1740,15 @@ AC_SUBST(FLAG_MIPS32)
 
 
 # does this compiler support -march=mips64r2 (mips64r2 default) ?
-AC_MSG_CHECKING([if gcc accepts -march=mips64r2])
+AC_MSG_CHECKING([if gcc accepts -march=mips64r2 -mabi=64])
 
 safe_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -march=mips64r2 -Werror"
+CFLAGS="$CFLAGS -march=mips64r2 -mabi=64 -Werror"
 
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
   return 0;
 ]])], [
-FLAG_MIPS64="-march=mips64r2"
+FLAG_MIPS64="-march=mips64r2 -mabi=64"
 AC_MSG_RESULT([yes])
 ], [
 FLAG_MIPS64=""