diff options
author | Matt Turner <mattst88@gmail.com> | 2017-03-02 04:43:21 +0000 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2017-03-15 23:59:57 +0000 |
commit | 3b782f6bc405971e70a090be90a2899bb6d751fc (patch) | |
tree | 6a13b5d9ad412ea72d356b28d060013a181476e4 /configure.ac | |
parent | 97d68c863ce2d42e83ae567e9a542198d0f98ca7 (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 <currojerez@riseup.net>
(cherry picked from commit 7d1195c1e4d071fe796bf5f210c468ea1cc86225)
[Emil Velikov: resolve trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
configure.ac
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index fd78fbb05b1..16ceea8f833 100644 --- a/configure.ac +++ b/configure.ac @@ -1974,6 +1974,21 @@ if test "x$enable_opencl" = xyes; then if test "x$have_libelf" != 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 + fi AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) |