Accepting request 886349 from home:aaronpuchert:llvm-next
- Move osmesa build back to Mesa, which we can now do after choosing another dummy driver there. - Use LLVM-versioned libclc runtime dependency to ensure bitcode compatibility. We have that in Tumbleweed and soon Leap. - U_clover-Fix-build-with-llvm-12.patch * Fixes build with LLVM 12. - U_clover-Add-missing-include-for-llvm-12-build-fix.patch * Fixes a missing header in the previous patch. - Move osmesa build back to Mesa, which we can now do after choosing another dummy driver there. - Use LLVM-versioned libclc runtime dependency to ensure bitcode compatibility. We have that in Tumbleweed and soon Leap. - U_clover-Fix-build-with-llvm-12.patch * Fixes build with LLVM 12. - U_clover-Add-missing-include-for-llvm-12-build-fix.patch * Fixes a missing header in the previous patch. OBS-URL: https://build.opensuse.org/request/show/886349 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1032
This commit is contained in:
parent
7e6509ce4c
commit
8969889762
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 17 16:41:33 UTC 2021 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- Move osmesa build back to Mesa, which we can now do after
|
||||
choosing another dummy driver there.
|
||||
- Use LLVM-versioned libclc runtime dependency to ensure
|
||||
bitcode compatibility. We have that in Tumbleweed and soon Leap.
|
||||
- U_clover-Fix-build-with-llvm-12.patch
|
||||
* Fixes build with LLVM 12.
|
||||
- U_clover-Add-missing-include-for-llvm-12-build-fix.patch
|
||||
* Fixes a missing header in the previous patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 17 14:39:04 UTC 2021 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
@ -128,6 +128,8 @@ Patch2: n_add-Mesa-headers-again.patch
|
||||
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
|
||||
Patch58: u_dep_xcb.patch
|
||||
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
|
||||
Patch101: U_clover-Fix-build-with-llvm-12.patch
|
||||
Patch102: U_clover-Add-missing-include-for-llvm-12-build-fix.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
@ -269,6 +271,7 @@ Requires: Mesa-libGL-devel = %{version}
|
||||
Requires: Mesa-libGLESv1_CM-devel = %{version}
|
||||
Requires: Mesa-libGLESv2-devel = %{version}
|
||||
Requires: Mesa-libglapi-devel = %{version}
|
||||
Requires: libOSMesa-devel = %{version}
|
||||
Requires: libgbm-devel
|
||||
Provides: Mesa-devel-static = %{version}
|
||||
Provides: xorg-x11-Mesa-devel = %{version}
|
||||
@ -615,7 +618,11 @@ This package contains the VDPAU state tracker for radeonsi.
|
||||
%package -n Mesa-libOpenCL
|
||||
Summary: Mesa OpenCL implementation
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
|
||||
Requires: libclc(llvm%{_llvm_sonum})
|
||||
%else
|
||||
Requires: libclc
|
||||
%endif
|
||||
|
||||
%description -n Mesa-libOpenCL
|
||||
This package contains the Mesa OpenCL implementation or GalliumCompute.
|
||||
@ -709,6 +716,8 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
%patch54 -p1
|
||||
%patch58 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
|
||||
# Remove requires to vulkan libs from baselibs.conf on platforms
|
||||
# where vulkan build is disabled; ugly ...
|
||||
@ -733,13 +742,13 @@ egl_platforms=x11,wayland
|
||||
-Dgles2=false \
|
||||
-Degl=true \
|
||||
-Dglx=disabled \
|
||||
-Dosmesa=true \
|
||||
-Dosmesa=false \
|
||||
%else
|
||||
-Dglvnd=true \
|
||||
-Dgles1=true \
|
||||
-Dgles2=true \
|
||||
-Degl=true \
|
||||
-Dosmesa=false \
|
||||
-Dosmesa=true \
|
||||
-Dglx=auto \
|
||||
-Dllvm=false \
|
||||
-Dvulkan-drivers= \
|
||||
@ -856,11 +865,6 @@ rm -rf %{buildroot}/%{_includedir}/KHR
|
||||
# workaround needed since Mesa 19.0.2
|
||||
rm -f %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so
|
||||
|
||||
# for some reason osmesa.h is missing after installation
|
||||
mkdir -p -m 755 %{buildroot}/%{_includedir}/GL
|
||||
install -m 644 include/GL/osmesa.h \
|
||||
%{buildroot}/%{_includedir}/GL/osmesa.h
|
||||
|
||||
%else
|
||||
|
||||
rm -f %{buildroot}/%{_libdir}/dri/*_dri.so
|
||||
@ -950,6 +954,7 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%files libGL-devel
|
||||
%dir %{_includedir}/GL
|
||||
%{_includedir}/GL/*.h
|
||||
%exclude %{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/pkgconfig/gl.pc
|
||||
%{_mandir}/man3/gl[A-Z]*
|
||||
|
||||
@ -964,6 +969,15 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%files libGLESv3-devel
|
||||
%{_includedir}/GLES3
|
||||
|
||||
%files -n libOSMesa8
|
||||
%{_libdir}/libOSMesa.so.8.0.0
|
||||
%{_libdir}/libOSMesa.so.8
|
||||
|
||||
%files -n libOSMesa-devel
|
||||
%{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/libOSMesa.so
|
||||
%{_libdir}/pkgconfig/osmesa.pc
|
||||
|
||||
%files -n libgbm1
|
||||
%{_libdir}/libgbm.so.1*
|
||||
|
||||
@ -974,15 +988,6 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%endif
|
||||
|
||||
%if %{drivers}
|
||||
%files -n libOSMesa8
|
||||
%{_libdir}/libOSMesa.so.8.0.0
|
||||
%{_libdir}/libOSMesa.so.8
|
||||
|
||||
%files -n libOSMesa-devel
|
||||
%{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/libOSMesa.so
|
||||
%{_libdir}/pkgconfig/osmesa.pc
|
||||
|
||||
%ifarch aarch64 %{ix86} x86_64 %{arm} ppc64 ppc64le riscv64
|
||||
%files -n libxatracker2
|
||||
%{_libdir}/libxatracker.so.2*
|
||||
|
12
Mesa.changes
12
Mesa.changes
@ -1,3 +1,15 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 17 16:41:33 UTC 2021 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- Move osmesa build back to Mesa, which we can now do after
|
||||
choosing another dummy driver there.
|
||||
- Use LLVM-versioned libclc runtime dependency to ensure
|
||||
bitcode compatibility. We have that in Tumbleweed and soon Leap.
|
||||
- U_clover-Fix-build-with-llvm-12.patch
|
||||
* Fixes build with LLVM 12.
|
||||
- U_clover-Add-missing-include-for-llvm-12-build-fix.patch
|
||||
* Fixes a missing header in the previous patch.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 17 14:39:04 UTC 2021 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
37
Mesa.spec
37
Mesa.spec
@ -127,6 +127,8 @@ Patch2: n_add-Mesa-headers-again.patch
|
||||
Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch
|
||||
Patch58: u_dep_xcb.patch
|
||||
Patch100: U_fix-mpeg1_2-decode-mesa-20.2.patch
|
||||
Patch101: U_clover-Fix-build-with-llvm-12.patch
|
||||
Patch102: U_clover-Add-missing-include-for-llvm-12-build-fix.patch
|
||||
BuildRequires: bison
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: flex
|
||||
@ -268,6 +270,7 @@ Requires: Mesa-libGL-devel = %{version}
|
||||
Requires: Mesa-libGLESv1_CM-devel = %{version}
|
||||
Requires: Mesa-libGLESv2-devel = %{version}
|
||||
Requires: Mesa-libglapi-devel = %{version}
|
||||
Requires: libOSMesa-devel = %{version}
|
||||
Requires: libgbm-devel
|
||||
Provides: Mesa-devel-static = %{version}
|
||||
Provides: xorg-x11-Mesa-devel = %{version}
|
||||
@ -614,7 +617,11 @@ This package contains the VDPAU state tracker for radeonsi.
|
||||
%package -n Mesa-libOpenCL
|
||||
Summary: Mesa OpenCL implementation
|
||||
Group: System/Libraries
|
||||
%if 0%{?suse_version} >= 1550 || 0%{?sle_version} >= 150300
|
||||
Requires: libclc(llvm%{_llvm_sonum})
|
||||
%else
|
||||
Requires: libclc
|
||||
%endif
|
||||
|
||||
%description -n Mesa-libOpenCL
|
||||
This package contains the Mesa OpenCL implementation or GalliumCompute.
|
||||
@ -708,6 +715,8 @@ rm -rf docs/README.{VMS,WIN32,OS2}
|
||||
%patch54 -p1
|
||||
%patch58 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
|
||||
# Remove requires to vulkan libs from baselibs.conf on platforms
|
||||
# where vulkan build is disabled; ugly ...
|
||||
@ -732,13 +741,13 @@ egl_platforms=x11,wayland
|
||||
-Dgles2=false \
|
||||
-Degl=true \
|
||||
-Dglx=disabled \
|
||||
-Dosmesa=true \
|
||||
-Dosmesa=false \
|
||||
%else
|
||||
-Dglvnd=true \
|
||||
-Dgles1=true \
|
||||
-Dgles2=true \
|
||||
-Degl=true \
|
||||
-Dosmesa=false \
|
||||
-Dosmesa=true \
|
||||
-Dglx=auto \
|
||||
-Dllvm=false \
|
||||
-Dvulkan-drivers= \
|
||||
@ -855,11 +864,6 @@ rm -rf %{buildroot}/%{_includedir}/KHR
|
||||
# workaround needed since Mesa 19.0.2
|
||||
rm -f %{buildroot}/%{_libdir}/vdpau/libvdpau_gallium.so
|
||||
|
||||
# for some reason osmesa.h is missing after installation
|
||||
mkdir -p -m 755 %{buildroot}/%{_includedir}/GL
|
||||
install -m 644 include/GL/osmesa.h \
|
||||
%{buildroot}/%{_includedir}/GL/osmesa.h
|
||||
|
||||
%else
|
||||
|
||||
rm -f %{buildroot}/%{_libdir}/dri/*_dri.so
|
||||
@ -949,6 +953,7 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%files libGL-devel
|
||||
%dir %{_includedir}/GL
|
||||
%{_includedir}/GL/*.h
|
||||
%exclude %{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/pkgconfig/gl.pc
|
||||
%{_mandir}/man3/gl[A-Z]*
|
||||
|
||||
@ -963,6 +968,15 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%files libGLESv3-devel
|
||||
%{_includedir}/GLES3
|
||||
|
||||
%files -n libOSMesa8
|
||||
%{_libdir}/libOSMesa.so.8.0.0
|
||||
%{_libdir}/libOSMesa.so.8
|
||||
|
||||
%files -n libOSMesa-devel
|
||||
%{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/libOSMesa.so
|
||||
%{_libdir}/pkgconfig/osmesa.pc
|
||||
|
||||
%files -n libgbm1
|
||||
%{_libdir}/libgbm.so.1*
|
||||
|
||||
@ -973,15 +987,6 @@ echo "The \"Mesa\" package does not have the ability to render, but is supplemen
|
||||
%endif
|
||||
|
||||
%if %{drivers}
|
||||
%files -n libOSMesa8
|
||||
%{_libdir}/libOSMesa.so.8.0.0
|
||||
%{_libdir}/libOSMesa.so.8
|
||||
|
||||
%files -n libOSMesa-devel
|
||||
%{_includedir}/GL/osmesa.h
|
||||
%{_libdir}/libOSMesa.so
|
||||
%{_libdir}/pkgconfig/osmesa.pc
|
||||
|
||||
%ifarch aarch64 %{ix86} x86_64 %{arm} ppc64 ppc64le riscv64
|
||||
%files -n libxatracker2
|
||||
%{_libdir}/libxatracker.so.2*
|
||||
|
28
U_clover-Add-missing-include-for-llvm-12-build-fix.patch
Normal file
28
U_clover-Add-missing-include-for-llvm-12-build-fix.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From f0dccd957879ff642cfd921dda6e8b04dd35fec4 Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Tue, 2 Mar 2021 20:09:39 +0100
|
||||
Subject: [PATCH] clover: Add missing include for llvm-12 build fix
|
||||
|
||||
Fixes: d1eab2b1eb1 ("clover: Fix build with llvm-12.")
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9372>
|
||||
---
|
||||
src/gallium/frontends/clover/llvm/compat.hpp | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
index d537819f292..380d16a8346 100644
|
||||
--- a/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
+++ b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
+#include <clang/Lex/PreprocessorOptions.h>
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
#include <llvm/Support/CodeGen.h>
|
||||
--
|
||||
2.31.1
|
||||
|
90
U_clover-Fix-build-with-llvm-12.patch
Normal file
90
U_clover-Fix-build-with-llvm-12.patch
Normal file
@ -0,0 +1,90 @@
|
||||
From d1eab2b1eb1dec10197db7d25e27d97f6ca1a2ea Mon Sep 17 00:00:00 2001
|
||||
From: Karol Herbst <kherbst@redhat.com>
|
||||
Date: Wed, 24 Feb 2021 12:44:41 +0100
|
||||
Subject: [PATCH] clover: Fix build with llvm-12.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fix build error after LLVM commit c495dfe0268b ("[clang][cli] NFC:
|
||||
Decrease the scope of ParseLangArgs parameters").
|
||||
|
||||
../src/gallium/frontends/clover/llvm/invocation.cpp: In function ‘std::unique_ptr<clang::CompilerInstance> {anonymous}::create_compiler_instance(const clover::device&, const string&, const std::vector<std::__cxx11::basic_string<char> >&, std::string&)’:
|
||||
../src/gallium/frontends/clover/llvm/invocation.cpp:252:55: error: cannot convert ‘clang::PreprocessorOptions’ to ‘std::vector<std::__cxx11::basic_string<char> >&’
|
||||
252 | c->getPreprocessorOpts(),
|
||||
| ~~~~~~~~~~~~~~~~~~~~~~^~
|
||||
| |
|
||||
| clang::PreprocessorOptions
|
||||
|
||||
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4114
|
||||
Signed-off-by: Karol Herbst <kherbst@redhat.com>
|
||||
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
|
||||
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8543>
|
||||
---
|
||||
src/gallium/frontends/clover/llvm/compat.hpp | 22 +++++++++++++++----
|
||||
.../frontends/clover/llvm/invocation.cpp | 5 ++---
|
||||
2 files changed, 20 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
index 78eb8c982a8..d537819f292 100644
|
||||
--- a/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
+++ b/src/gallium/frontends/clover/llvm/compat.hpp
|
||||
@@ -38,14 +38,14 @@
|
||||
|
||||
#include <llvm/Config/llvm-config.h>
|
||||
|
||||
+#include <llvm/ADT/Triple.h>
|
||||
+#include <llvm/Analysis/TargetLibraryInfo.h>
|
||||
+#include <llvm/IR/LegacyPassManager.h>
|
||||
#include <llvm/IR/LLVMContext.h>
|
||||
#include <llvm/Linker/Linker.h>
|
||||
+#include <llvm/Target/TargetMachine.h>
|
||||
#include <llvm/Transforms/IPO.h>
|
||||
#include <llvm/Transforms/Utils/Cloning.h>
|
||||
-#include <llvm/Target/TargetMachine.h>
|
||||
-
|
||||
-#include <llvm/IR/LegacyPassManager.h>
|
||||
-#include <llvm/Analysis/TargetLibraryInfo.h>
|
||||
|
||||
#include <clang/Basic/TargetInfo.h>
|
||||
#include <clang/Frontend/CompilerInstance.h>
|
||||
@@ -88,6 +88,20 @@ namespace clover {
|
||||
cinv, copts.data(), copts.data() + copts.size(), diag);
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+ static inline void
|
||||
+ compiler_set_lang_defaults(std::unique_ptr<clang::CompilerInstance> &c,
|
||||
+ clang::InputKind ik, const ::llvm::Triple& triple,
|
||||
+ clang::LangStandard::Kind d)
|
||||
+ {
|
||||
+ c->getInvocation().setLangDefaults(c->getLangOpts(), ik, triple,
|
||||
+#if LLVM_VERSION_MAJOR >= 12
|
||||
+ c->getPreprocessorOpts().Includes,
|
||||
+#else
|
||||
+ c->getPreprocessorOpts(),
|
||||
+#endif
|
||||
+ d);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||
index 536e952b100..30592e4343b 100644
|
||||
--- a/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||
+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
|
||||
@@ -247,9 +247,8 @@ namespace {
|
||||
// http://www.llvm.org/bugs/show_bug.cgi?id=19735
|
||||
c->getDiagnosticOpts().ShowCarets = false;
|
||||
|
||||
- c->getInvocation().setLangDefaults(c->getLangOpts(),
|
||||
- compat::ik_opencl, ::llvm::Triple(target.triple),
|
||||
- c->getPreprocessorOpts(),
|
||||
+ compat::compiler_set_lang_defaults(c, compat::ik_opencl,
|
||||
+ ::llvm::Triple(target.triple),
|
||||
get_language_version(opts, device_clc_version));
|
||||
|
||||
c->createDiagnostics(new clang::TextDiagnosticPrinter(
|
||||
--
|
||||
2.31.1
|
||||
|
Loading…
Reference in New Issue
Block a user