From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/
Date: Fri, 3 Mar 2017 00:03:29 +0000 (UTC) [thread overview]
Message-ID: <1488499391.2104b7bb6990014b7e1c83dfa22f44d9af8d58ad.mattst88@gentoo> (raw)
commit: 2104b7bb6990014b7e1c83dfa22f44d9af8d58ad
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 2 23:57:09 2017 +0000
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Mar 3 00:03:11 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2104b7bb
media-libs/mesa: Apply patch to fix Clover build with AltiVec.
Bug: https://bugs.gentoo.org/587210
Bug: https://bugs.freedesktop.org/68504
...er-Work-around-build-failure-with-AltiVec.patch | 70 ++++++++++++++++++++++
...er-Work-around-build-failure-with-AltiVec.patch | 69 +++++++++++++++++++++
media-libs/mesa/mesa-13.0.5.ebuild | 4 +-
media-libs/mesa/mesa-17.0.0.ebuild | 5 +-
4 files changed, 146 insertions(+), 2 deletions(-)
diff --git a/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch
new file mode 100644
index 00000000000..0d2c65ac56e
--- /dev/null
+++ b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch
@@ -0,0 +1,70 @@
+From 71a2b2e8a580d2c0bee84b898d8531b27f3c7811 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2017 04:43:21 +0000
+Subject: [PATCH] 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)
+---
+ configure.ac | 14 ++++++++++++++
+ src/gallium/state_trackers/clover/Makefile.am | 3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index fd78fbb..3646e45 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1974,6 +1974,20 @@ 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)
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index 8abcfec..edf1e26 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -33,6 +33,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
+
+ libcltgsi_la_CXXFLAGS = \
+ -std=c++11 \
++ $(CLOVER_STD_OVERRIDE) \
+ $(VISIBILITY_CXXFLAGS)
+
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES)
+@@ -41,6 +42,7 @@ libclllvm_la_CXXFLAGS = \
+ -std=c++11 \
+ $(VISIBILITY_CXXFLAGS) \
+ $(LLVM_CXXFLAGS) \
++ $(CLOVER_STD_OVERRIDE) \
+ $(DEFINES) \
+ $(LIBELF_CFLAGS) \
+ -DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
+@@ -51,6 +53,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
+
+ libclover_la_CXXFLAGS = \
+ -std=c++11 \
++ $(CLOVER_STD_OVERRIDE) \
+ $(VISIBILITY_CXXFLAGS)
+
+ libclover_la_LIBADD = \
+--
+2.10.2
+
diff --git a/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
new file mode 100644
index 00000000000..87f5f9d0143
--- /dev/null
+++ b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch
@@ -0,0 +1,69 @@
+From 7d1195c1e4d071fe796bf5f210c468ea1cc86225 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Thu, 2 Mar 2017 04:43:21 +0000
+Subject: [PATCH] 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>
+---
+ configure.ac | 14 ++++++++++++++
+ src/gallium/state_trackers/clover/Makefile.am | 3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index a3d1a00..57c4b1e 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"
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am
+index a657e5b..3213935 100644
+--- a/src/gallium/state_trackers/clover/Makefile.am
++++ b/src/gallium/state_trackers/clover/Makefile.am
+@@ -32,6 +32,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
+
+ libcltgsi_la_CXXFLAGS = \
+ -std=c++11 \
++ $(CLOVER_STD_OVERRIDE) \
+ $(VISIBILITY_CXXFLAGS)
+
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES)
+@@ -40,6 +41,7 @@ libclllvm_la_CXXFLAGS = \
+ -std=c++11 \
+ $(VISIBILITY_CXXFLAGS) \
+ $(LLVM_CXXFLAGS) \
++ $(CLOVER_STD_OVERRIDE) \
+ $(DEFINES) \
+ $(LIBELF_CFLAGS) \
+ -DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \
+@@ -50,6 +52,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES)
+
+ libclover_la_CXXFLAGS = \
+ -std=c++11 \
++ $(CLOVER_STD_OVERRIDE) \
+ $(VISIBILITY_CXXFLAGS)
+
+ libclover_la_LIBADD = \
+--
+2.10.2
+
diff --git a/media-libs/mesa/mesa-13.0.5.ebuild b/media-libs/mesa/mesa-13.0.5.ebuild
index 9e3022a4336..83fa8ce7bd7 100644
--- a/media-libs/mesa/mesa-13.0.5.ebuild
+++ b/media-libs/mesa/mesa-13.0.5.ebuild
@@ -198,7 +198,9 @@ pkg_setup() {
}
src_prepare() {
- [[ ${PV} == 9999 ]] && eautoreconf
+ epatch "${FILESDIR}"/${PN}-13-clover-Work-around-build-failure-with-AltiVec.patch
+
+ eautoreconf
}
multilib_src_configure() {
diff --git a/media-libs/mesa/mesa-17.0.0.ebuild b/media-libs/mesa/mesa-17.0.0.ebuild
index c3c5a2c4faa..0aea8a38fb1 100644
--- a/media-libs/mesa/mesa-17.0.0.ebuild
+++ b/media-libs/mesa/mesa-17.0.0.ebuild
@@ -206,7 +206,10 @@ pkg_setup() {
}
src_prepare() {
- [[ ${PV} == 9999 ]] && eautoreconf
+ eapply "${FILESDIR}"/${PN}-17-clover-Work-around-build-failure-with-AltiVec.patch
+
+ eautoreconf
+
eapply_user
}
next reply other threads:[~2017-03-03 0:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 0:03 Matt Turner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-06-10 14:27 [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/files/, media-libs/mesa/ Matt Turner
2025-04-27 2:21 Matt Turner
2024-11-09 16:48 Matt Turner
2024-09-18 17:45 Matt Turner
2024-01-11 4:41 Matt Turner
2023-08-16 22:07 Matt Turner
2023-04-27 6:20 Sam James
2023-04-11 19:04 Sam James
2021-11-18 7:48 Matt Turner
2021-09-22 21:22 Matt Turner
2020-04-13 16:32 Matt Turner
2018-11-29 5:17 Matt Turner
2017-03-20 19:01 Matt Turner
2017-03-16 20:37 Matt Turner
2016-11-15 14:32 Michał Górny
2016-08-01 4:34 Mike Frysinger
2016-04-21 4:46 Matt Turner
2016-02-22 17:53 Matt Turner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1488499391.2104b7bb6990014b7e1c83dfa22f44d9af8d58ad.mattst88@gentoo \
--to=mattst88@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox