From f3637a085306f3dbb22c52d953b23bd76a85178c Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Mon, 2 Oct 2017 13:28:50 +0200 Subject: [PATCH] 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. --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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="" -- 2.47.2