summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.in12
-rwxr-xr-xset_soenv.in1
2 files changed, 13 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index cf308dcc3..841156ace 100755
--- a/configure.in
+++ b/configure.in
@@ -3224,6 +3224,17 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([no])
fi
+ AC_MSG_CHECKING([whether $CC supports -mno-avx])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -Werror -mno-avx"
+ AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_AVX=TRUE ], [])
+ CFLAGS=$save_CFLAGS
+ if test "$HAVE_GCC_AVX" = "TRUE"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757])
save_CXXFLAGS=$CFLAGS
CXXFLAGS="$CXXFLAGS -std=c++0x"
@@ -3266,6 +3277,7 @@ fi
AC_SUBST(HAVE_CXX0X)
AC_SUBST(HAVE_GCC_NO_LONG_DOUBLE)
+AC_SUBST(HAVE_GCC_AVX)
# ===================================================================
# use ccache?
diff --git a/set_soenv.in b/set_soenv.in
index 4994709d0..729241c79 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1825,6 +1825,7 @@ ToFile( "ALIGNOF_INT", "@ALIGNOF_INT@", "e" );
ToFile( "ALIGNOF_LONG", "@ALIGNOF_LONG@", "e" );
ToFile( "ALIGNOF_DOUBLE", "@ALIGNOF_DOUBLE@", "e" );
ToFile( "HAVE_GCC_NO_LONG_DOUBLE", "@HAVE_GCC_NO_LONG_DOUBLE@", "e" );
+ToFile( "HAVE_GCC_AVX", "@HAVE_GCC_AVX@", "e" );
ToFile( "HAVE_GCC_VISIBILITY_FEATURE",
"@HAVE_GCC_VISIBILITY_FEATURE@", "e" );
ToFile( "HAVE_GCC_VISIBILITY_BROKEN",