diff options
author | Matt Turner <[email protected]> | 2017-03-02 04:43:21 +0000 |
---|---|---|
committer | Matt Turner <[email protected]> | 2017-03-02 15:49:00 -0800 |
commit | 7d1195c1e4d071fe796bf5f210c468ea1cc86225 (patch) | |
tree | 9ccbf827536d6d256712c56ee8a513ffd34d880c /configure.ac | |
parent | d7d64f1091006fb6faa48705c53f19ff5c657bc8 (diff) |
clover: Work around build failure with AltiVec.
Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504
Acked-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a3d1a00bdd0..57c4b1e0622 100644 --- a/configure.ac +++ b/configure.ac @@ -2033,6 +2033,20 @@ if test "x$enable_opencl" = xyes; then AC_MSG_ERROR([Clover requires libelf]) fi + if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then + altivec_enabled=no + AC_COMPILE_IFELSE([AC_LANG_SOURCE([ + #if !defined(__VEC__) || !defined(__ALTIVEC__) + #error "AltiVec not enabled" + #endif + ])], altivec_enabled=yes) + + if test "$altivec_enabled" = yes; then + CLOVER_STD_OVERRIDE="-std=gnu++11" + fi + AC_SUBST([CLOVER_STD_OVERRIDE]) + fi + llvm_require_version $LLVM_REQUIRED_OPENCL "opencl" llvm_add_default_components "opencl" |