From: Petar Jovanovic Date: Mon, 2 Oct 2017 11:28:50 +0000 (+0200) Subject: mips: make sure configure script checks for correct ABIs X-Git-Tag: VALGRIND_3_14_0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3637a085306f3dbb22c52d953b23bd76a85178c;p=thirdparty%2Fvalgrind.git mips: make sure configure script checks for correct ABIs For mips64, we currently build for n64. For mips32, we currently build for o32. Pass these flags explicitly in configure checks. --- diff --git a/configure.ac b/configure.ac index 483d9bd880..392081db46 100644 --- a/configure.ac +++ b/configure.ac @@ -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=""