From: Petar Jovanovic Date: Wed, 29 Jan 2014 18:08:50 +0000 (+0000) Subject: mips64: modify configure.ac to check for cavium supported toolchain X-Git-Tag: svn/VALGRIND_3_10_0~653 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde6d8320b0040d45dbc7eedec28cb2afbc2624c;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/configure.ac b/configure.ac index 91996261c9..fb17ce4afd 100644 --- a/configure.ac +++ b/configure.ac @@ -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])