|
From: <sv...@va...> - 2014-01-29 18:09:09
|
Author: petarj
Date: Wed Jan 29 18:08:50 2014
New Revision: 13783
Log:
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.
Modified:
trunk/configure.ac
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Wed Jan 29 18:08:50 2014
@@ -1490,6 +1490,45 @@
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])
|