From cc4ddfc0974ab139f0956e76d48fdf0ab4d9af18 Mon Sep 17 00:00:00 2001
From: Koichiro Iwao
Date: Tue, 7 Jul 2026 10:54:11 +0000
Subject: [PATCH] AlmaLinux changes: Enable vc4 and v3d for Raspberry Pi
graphics in AlmaLinux (Resolves:
https://github.com/AlmaLinux/raspberry-pi/issues/32)
---
...9dbf8af2d16b1243f2ce287ff69c6a5dc557.patch | 54 -------------------
mesa.spec | 3 --
2 files changed, 57 deletions(-)
delete mode 100644 cd129dbf8af2d16b1243f2ce287ff69c6a5dc557.patch
diff --git a/cd129dbf8af2d16b1243f2ce287ff69c6a5dc557.patch b/cd129dbf8af2d16b1243f2ce287ff69c6a5dc557.patch
deleted file mode 100644
index 59efa33..0000000
--- a/cd129dbf8af2d16b1243f2ce287ff69c6a5dc557.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From cd129dbf8af2d16b1243f2ce287ff69c6a5dc557 Mon Sep 17 00:00:00 2001
-From: no92
-Date: Wed, 27 Aug 2025 16:02:31 +0200
-Subject: [PATCH] gallivm: support LLVM 21
-
-LLVM PR#146819 changed the signature of `setObjectLinkingLayerCreator`,
-dropping the Triple argument. The PR was first included in the LLVM 21
-series, and the new signature is gated behind a version check for that.
-
-`LLVMOrcThreadSafeContextGetContext` was removed in LLVM commit b18e5b6,
-and the ORC examples in the LLVM tree seem to just create a context
-instead, which we replicate here.
-
-With this commit, mesa successfully builds the llvmpipe gallium driver
-on riscv64 with LLVM 21.1.0.
-
-Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13785
-Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13852
-
-Reviewed-by: David Heidelberg
-Part-of:
----
- src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-index 6651ea439da86..e5d8e461dd6c0 100644
---- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
-@@ -339,7 +339,12 @@ LPJit::LPJit() :jit_dylib_count(0) {
- .setJITTargetMachineBuilder(std::move(JTMB))
- #ifdef USE_JITLINK
- .setObjectLinkingLayerCreator(
-+#if LLVM_VERSION_MAJOR >= 21
-+ /* LLVM 21 removed the Triple argument */
-+ [&](ExecutionSession &ES) {
-+#else
- [&](ExecutionSession &ES, const llvm::Triple &TT) {
-+#endif
- return std::make_unique(
- ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
- })
-@@ -551,7 +556,7 @@ init_gallivm_state(struct gallivm_state *gallivm, const char *name,
- gallivm->cache = cache;
-
- gallivm->_ts_context = context->ref;
-- gallivm->context = LLVMOrcThreadSafeContextGetContext(context->ref);
-+ gallivm->context = LLVMContextCreate();
-
- gallivm->module_name = LPJit::get_unique_name(name);
- gallivm->module = LLVMModuleCreateWithNameInContext(gallivm->module_name,
---
-GitLab
-
diff --git a/mesa.spec b/mesa.spec
index bdab1ba..502dbb7 100644
--- a/mesa.spec
+++ b/mesa.spec
@@ -142,9 +142,6 @@ Source13: https://crates.io/api/v1/crates/syn/%{rust_syn_ver}/download#/sy
Source14: https://crates.io/api/v1/crates/unicode-ident/%{rust_unicode_ident_ver}/download#/unicode-ident-%{rust_unicode_ident_ver}.tar.gz
Source15: https://crates.io/api/v1/crates/rustc-hash/%{rustc_hash_ver}/download#/rustc-hash-%{rustc_hash_ver}.tar.gz
-# AlmaLinux Patch
-Patch1001: cd129dbf8af2d16b1243f2ce287ff69c6a5dc557.patch
-
BuildRequires: meson
BuildRequires: gcc
BuildRequires: gcc-c++