[packages/Mesa] fix build with llvm 10

atler atler at pld-linux.org
Fri Apr 10 18:59:52 CEST 2020


commit 1a2ebb25c08c035597e73e3a7e7811b0b7453499
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Apr 10 18:58:48 2020 +0200

    fix build with llvm 10

 Mesa.spec    |  2 ++
 llvm10.patch | 24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
---
diff --git a/Mesa.spec b/Mesa.spec
index cdbf7a2..da0f032 100644
--- a/Mesa.spec
+++ b/Mesa.spec
@@ -74,6 +74,7 @@ Source0:	https://gitlab.freedesktop.org/mesa/mesa/-/archive/mesa-%{version}/mesa
 # Source0-md5:	4468786b0e8faeed8f417f5e1414eab4
 Patch0:		nouveau_no_rtti.patch
 Patch1:		i9x5-tex-ignore-the-diff-between-GL_TEXTURE_2D-and-GL_TEXTURE_RECTANGLE.patch
+Patch2:		llvm10.patch
 URL:		http://www.mesa3d.org/
 %{?with_opencl_spirv:BuildRequires:	SPIRV-LLVM-Translator-devel >= 0.2.1}
 %{?with_gallium_zink:BuildRequires:	Vulkan-Loader-devel}
@@ -1360,6 +1361,7 @@ radv - eksperymentalny sterownik Vulkan dla GPU firmy AMD.
 %setup -q -n mesa-mesa-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %if %{with opencl}
diff --git a/llvm10.patch b/llvm10.patch
new file mode 100644
index 0000000..2819ce3
--- /dev/null
+++ b/llvm10.patch
@@ -0,0 +1,24 @@
+--- mesa-mesa-20.0.4.orig/src/gallium/targets/opencl/meson.build	2020-04-03 11:25:46.000000000 +0200
++++ mesa-mesa-20.0.4/src/gallium/targets/opencl/meson.build	2020-04-10 17:40:42.912810510 +0200
+@@ -31,6 +31,13 @@
+ 
+ llvm_libdir = dep_llvm.get_configtool_variable('libdir')
+ 
++polly_dep = null_dep
++polly_isl_dep = null_dep
++if dep_llvm.version().version_compare('>=10.0.0')
++  polly_dep = cpp.find_library('Polly', dirs : llvm_libdir, required : false)
++  polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
++endif
++
+ opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
+ 
+ libopencl = shared_library(
+@@ -56,6 +63,7 @@
+     cpp.find_library('clangEdit', dirs : llvm_libdir),
+     cpp.find_library('clangLex', dirs : llvm_libdir),
+     cpp.find_library('clangBasic', dirs : llvm_libdir),
++    polly_dep, polly_isl_dep,
+   ],
+   version : '@0 at .0.0'.format(opencl_version),
+   install : true,
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Mesa.git/commitdiff/1a2ebb25c08c035597e73e3a7e7811b0b7453499



More information about the pld-cvs-commit mailing list