1 |
commit: 2104b7bb6990014b7e1c83dfa22f44d9af8d58ad |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 2 23:57:09 2017 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Mar 3 00:03:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2104b7bb |
7 |
|
8 |
media-libs/mesa: Apply patch to fix Clover build with AltiVec. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/587210 |
11 |
Bug: https://bugs.freedesktop.org/68504 |
12 |
|
13 |
...er-Work-around-build-failure-with-AltiVec.patch | 70 ++++++++++++++++++++++ |
14 |
...er-Work-around-build-failure-with-AltiVec.patch | 69 +++++++++++++++++++++ |
15 |
media-libs/mesa/mesa-13.0.5.ebuild | 4 +- |
16 |
media-libs/mesa/mesa-17.0.0.ebuild | 5 +- |
17 |
4 files changed, 146 insertions(+), 2 deletions(-) |
18 |
|
19 |
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 |
20 |
new file mode 100644 |
21 |
index 00000000000..0d2c65ac56e |
22 |
--- /dev/null |
23 |
+++ b/media-libs/mesa/files/mesa-13-clover-Work-around-build-failure-with-AltiVec.patch |
24 |
@@ -0,0 +1,70 @@ |
25 |
+From 71a2b2e8a580d2c0bee84b898d8531b27f3c7811 Mon Sep 17 00:00:00 2001 |
26 |
+From: Matt Turner <mattst88@×××××.com> |
27 |
+Date: Thu, 2 Mar 2017 04:43:21 +0000 |
28 |
+Subject: [PATCH] clover: Work around build failure with AltiVec. |
29 |
+ |
30 |
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210 |
31 |
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504 |
32 |
+Acked-by: Francisco Jerez <currojerez@××××××.net> |
33 |
+(cherry picked from commit 7d1195c1e4d071fe796bf5f210c468ea1cc86225) |
34 |
+--- |
35 |
+ configure.ac | 14 ++++++++++++++ |
36 |
+ src/gallium/state_trackers/clover/Makefile.am | 3 +++ |
37 |
+ 2 files changed, 17 insertions(+) |
38 |
+ |
39 |
+diff --git a/configure.ac b/configure.ac |
40 |
+index fd78fbb..3646e45 100644 |
41 |
+--- a/configure.ac |
42 |
++++ b/configure.ac |
43 |
+@@ -1974,6 +1974,20 @@ if test "x$enable_opencl" = xyes; then |
44 |
+ if test "x$have_libelf" != xyes; then |
45 |
+ AC_MSG_ERROR([Clover requires libelf]) |
46 |
+ fi |
47 |
++ |
48 |
++ if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then |
49 |
++ altivec_enabled=no |
50 |
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
51 |
++ #if !defined(__VEC__) || !defined(__ALTIVEC__) |
52 |
++ #error "AltiVec not enabled" |
53 |
++ #endif |
54 |
++ ])], altivec_enabled=yes) |
55 |
++ |
56 |
++ if test "$altivec_enabled" = yes; then |
57 |
++ CLOVER_STD_OVERRIDE="-std=gnu++11" |
58 |
++ fi |
59 |
++ AC_SUBST([CLOVER_STD_OVERRIDE]) |
60 |
++ fi |
61 |
+ fi |
62 |
+ AM_CONDITIONAL(HAVE_CLOVER, test "x$enable_opencl" = xyes) |
63 |
+ AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes) |
64 |
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am |
65 |
+index 8abcfec..edf1e26 100644 |
66 |
+--- a/src/gallium/state_trackers/clover/Makefile.am |
67 |
++++ b/src/gallium/state_trackers/clover/Makefile.am |
68 |
+@@ -33,6 +33,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la |
69 |
+ |
70 |
+ libcltgsi_la_CXXFLAGS = \ |
71 |
+ -std=c++11 \ |
72 |
++ $(CLOVER_STD_OVERRIDE) \ |
73 |
+ $(VISIBILITY_CXXFLAGS) |
74 |
+ |
75 |
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES) |
76 |
+@@ -41,6 +42,7 @@ libclllvm_la_CXXFLAGS = \ |
77 |
+ -std=c++11 \ |
78 |
+ $(VISIBILITY_CXXFLAGS) \ |
79 |
+ $(LLVM_CXXFLAGS) \ |
80 |
++ $(CLOVER_STD_OVERRIDE) \ |
81 |
+ $(DEFINES) \ |
82 |
+ $(LIBELF_CFLAGS) \ |
83 |
+ -DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \ |
84 |
+@@ -51,6 +53,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES) |
85 |
+ |
86 |
+ libclover_la_CXXFLAGS = \ |
87 |
+ -std=c++11 \ |
88 |
++ $(CLOVER_STD_OVERRIDE) \ |
89 |
+ $(VISIBILITY_CXXFLAGS) |
90 |
+ |
91 |
+ libclover_la_LIBADD = \ |
92 |
+-- |
93 |
+2.10.2 |
94 |
+ |
95 |
|
96 |
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 |
97 |
new file mode 100644 |
98 |
index 00000000000..87f5f9d0143 |
99 |
--- /dev/null |
100 |
+++ b/media-libs/mesa/files/mesa-17-clover-Work-around-build-failure-with-AltiVec.patch |
101 |
@@ -0,0 +1,69 @@ |
102 |
+From 7d1195c1e4d071fe796bf5f210c468ea1cc86225 Mon Sep 17 00:00:00 2001 |
103 |
+From: Matt Turner <mattst88@×××××.com> |
104 |
+Date: Thu, 2 Mar 2017 04:43:21 +0000 |
105 |
+Subject: [PATCH] clover: Work around build failure with AltiVec. |
106 |
+ |
107 |
+Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=587210 |
108 |
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68504 |
109 |
+Acked-by: Francisco Jerez <currojerez@××××××.net> |
110 |
+--- |
111 |
+ configure.ac | 14 ++++++++++++++ |
112 |
+ src/gallium/state_trackers/clover/Makefile.am | 3 +++ |
113 |
+ 2 files changed, 17 insertions(+) |
114 |
+ |
115 |
+diff --git a/configure.ac b/configure.ac |
116 |
+index a3d1a00..57c4b1e 100644 |
117 |
+--- a/configure.ac |
118 |
++++ b/configure.ac |
119 |
+@@ -2033,6 +2033,20 @@ if test "x$enable_opencl" = xyes; then |
120 |
+ AC_MSG_ERROR([Clover requires libelf]) |
121 |
+ fi |
122 |
+ |
123 |
++ if test "x${ac_cv_cxx_compiler_gnu}" = xyes; then |
124 |
++ altivec_enabled=no |
125 |
++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([ |
126 |
++ #if !defined(__VEC__) || !defined(__ALTIVEC__) |
127 |
++ #error "AltiVec not enabled" |
128 |
++ #endif |
129 |
++ ])], altivec_enabled=yes) |
130 |
++ |
131 |
++ if test "$altivec_enabled" = yes; then |
132 |
++ CLOVER_STD_OVERRIDE="-std=gnu++11" |
133 |
++ fi |
134 |
++ AC_SUBST([CLOVER_STD_OVERRIDE]) |
135 |
++ fi |
136 |
++ |
137 |
+ llvm_require_version $LLVM_REQUIRED_OPENCL "opencl" |
138 |
+ |
139 |
+ llvm_add_default_components "opencl" |
140 |
+diff --git a/src/gallium/state_trackers/clover/Makefile.am b/src/gallium/state_trackers/clover/Makefile.am |
141 |
+index a657e5b..3213935 100644 |
142 |
+--- a/src/gallium/state_trackers/clover/Makefile.am |
143 |
++++ b/src/gallium/state_trackers/clover/Makefile.am |
144 |
+@@ -32,6 +32,7 @@ noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la |
145 |
+ |
146 |
+ libcltgsi_la_CXXFLAGS = \ |
147 |
+ -std=c++11 \ |
148 |
++ $(CLOVER_STD_OVERRIDE) \ |
149 |
+ $(VISIBILITY_CXXFLAGS) |
150 |
+ |
151 |
+ libcltgsi_la_SOURCES = $(TGSI_SOURCES) |
152 |
+@@ -40,6 +41,7 @@ libclllvm_la_CXXFLAGS = \ |
153 |
+ -std=c++11 \ |
154 |
+ $(VISIBILITY_CXXFLAGS) \ |
155 |
+ $(LLVM_CXXFLAGS) \ |
156 |
++ $(CLOVER_STD_OVERRIDE) \ |
157 |
+ $(DEFINES) \ |
158 |
+ $(LIBELF_CFLAGS) \ |
159 |
+ -DLIBCLC_INCLUDEDIR=\"$(LIBCLC_INCLUDEDIR)/\" \ |
160 |
+@@ -50,6 +52,7 @@ libclllvm_la_SOURCES = $(LLVM_SOURCES) |
161 |
+ |
162 |
+ libclover_la_CXXFLAGS = \ |
163 |
+ -std=c++11 \ |
164 |
++ $(CLOVER_STD_OVERRIDE) \ |
165 |
+ $(VISIBILITY_CXXFLAGS) |
166 |
+ |
167 |
+ libclover_la_LIBADD = \ |
168 |
+-- |
169 |
+2.10.2 |
170 |
+ |
171 |
|
172 |
diff --git a/media-libs/mesa/mesa-13.0.5.ebuild b/media-libs/mesa/mesa-13.0.5.ebuild |
173 |
index 9e3022a4336..83fa8ce7bd7 100644 |
174 |
--- a/media-libs/mesa/mesa-13.0.5.ebuild |
175 |
+++ b/media-libs/mesa/mesa-13.0.5.ebuild |
176 |
@@ -198,7 +198,9 @@ pkg_setup() { |
177 |
} |
178 |
|
179 |
src_prepare() { |
180 |
- [[ ${PV} == 9999 ]] && eautoreconf |
181 |
+ epatch "${FILESDIR}"/${PN}-13-clover-Work-around-build-failure-with-AltiVec.patch |
182 |
+ |
183 |
+ eautoreconf |
184 |
} |
185 |
|
186 |
multilib_src_configure() { |
187 |
|
188 |
diff --git a/media-libs/mesa/mesa-17.0.0.ebuild b/media-libs/mesa/mesa-17.0.0.ebuild |
189 |
index c3c5a2c4faa..0aea8a38fb1 100644 |
190 |
--- a/media-libs/mesa/mesa-17.0.0.ebuild |
191 |
+++ b/media-libs/mesa/mesa-17.0.0.ebuild |
192 |
@@ -206,7 +206,10 @@ pkg_setup() { |
193 |
} |
194 |
|
195 |
src_prepare() { |
196 |
- [[ ${PV} == 9999 ]] && eautoreconf |
197 |
+ eapply "${FILESDIR}"/${PN}-17-clover-Work-around-build-failure-with-AltiVec.patch |
198 |
+ |
199 |
+ eautoreconf |
200 |
+ |
201 |
eapply_user |
202 |
} |