mips64: modify configure.ac to check for cavium supported toolchain

Modify configure to check if we can pass -march=octeon or -march=octeon2
flags to the compiler. This part is required as it gives us information how
to compile (i.e. whether to compile) tests specific for Cavium Octeon boards.

Patch by Zahid Anwar, with minor modifications.

Related to Bugzilla issue 326444.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13783
This commit is contained in:
Petar Jovanovic 2014-01-29 18:08:50 +00:00
parent 09034f1ee2
commit fde6d8320b

View File

@ -1490,6 +1490,45 @@ CFLAGS=$safe_CFLAGS
AC_SUBST(FLAG_M64)
# does this compiler support -march=octeon (Cavium OCTEON I Specific) ?
AC_MSG_CHECKING([if gcc accepts -march=octeon])
safe_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -march=octeon"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
]])], [
FLAG_OCTEON="-march=octeon"
AC_MSG_RESULT([yes])
], [
FLAG_OCTEON=""
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
AC_SUBST(FLAG_OCTEON)
# does this compiler support -march=octeon2 (Cavium OCTEON II Specific) ?
AC_MSG_CHECKING([if gcc accepts -march=octeon2])
safe_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -march=octeon2"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
return 0;
]])], [
FLAG_OCTEON2="-march=octeon2"
AC_MSG_RESULT([yes])
], [
FLAG_OCTEON2=""
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
AC_SUBST(FLAG_OCTEON2)
# does this compiler support -mmmx ?
AC_MSG_CHECKING([if gcc accepts -mmmx])