summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2016-06-16 14:56:39 -0500
committerTim Rowley <[email protected]>2016-06-17 10:34:17 -0500
commit5a64549f54bf1f67a4d0d098ab480affaaabd8ab (patch)
treea15678def78514cba54a72555ebedc2698283490 /configure.ac
parent481e924951067ebc909fc2eaf986bedc9e441648 (diff)
swr: switch from overriding -march to selecting features
Acked-by: Chuck Atkins <[email protected]> Tested-by: Chuck Atkins <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 7 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index c492e158f76..cc9bc4758b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2400,8 +2400,8 @@ if test -n "$with_gallium_drivers"; then
swr_llvm_check "swr"
AC_MSG_CHECKING([whether $CXX supports c++11/AVX/AVX2])
- AVX_CXXFLAGS="-march=core-avx-i"
- AVX2_CXXFLAGS="-march=core-avx2"
+ SWR_AVX_CXXFLAGS="-mavx"
+ SWR_AVX2_CXXFLAGS="-mavx2 -mfma -mbmi2 -mf16c"
AC_LANG_PUSH([C++])
save_CXXFLAGS="$CXXFLAGS"
@@ -2411,18 +2411,21 @@ if test -n "$with_gallium_drivers"; then
CXXFLAGS="$save_CXXFLAGS"
save_CXXFLAGS="$CXXFLAGS"
- CXXFLAGS="$AVX_CXXFLAGS $CXXFLAGS"
+ CXXFLAGS="$SWR_AVX_CXXFLAGS $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
[AC_MSG_ERROR([AVX compiler support not detected])])
CXXFLAGS="$save_CXXFLAGS"
save_CFLAGS="$CXXFLAGS"
- CXXFLAGS="$AVX2_CXXFLAGS $CXXFLAGS"
+ CXXFLAGS="$SWR_AVX2_CXXFLAGS $CXXFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],[],
[AC_MSG_ERROR([AVX2 compiler support not detected])])
CXXFLAGS="$save_CXXFLAGS"
AC_LANG_POP([C++])
+ AC_SUBST([SWR_AVX_CXXFLAGS])
+ AC_SUBST([SWR_AVX2_CXXFLAGS])
+
HAVE_GALLIUM_SWR=yes
;;
xvc4)