mesa-pvr: Fix for building with new LLVM version

A recnet version change [1] caused a build failure.  Backport a patch
from the mesa repo to address it [2].

[1] https://git.openembedded.org/openembedded-core/commit/?id=d1575787a815fbe1ca60b20664665f92a95b2264
[2] https://gitlab.freedesktop.org/mesa/mesa/-/commit/f958ad11955638758c19170d9df4d67bf1ff8bcb

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
This commit is contained in:
Ryan Eatmon committed 2026-09-09 20:53:28 -05:00
1 parent c909da414d
commit 0b9bde8c75
2 files changed
+48 -1

No files matched your search

@@ -0,0 +1,45 @@
From f958ad11955638758c19170d9df4d67bf1ff8bcb Mon Sep 17 00:00:00 2001
From: Lone_Wolf <lone_wolf@klaas-de-kat.nl>
Date: Wed, 13 May 2026 22:54:45 +0200
Subject: [PATCH] clc: fix build with LLVM23 (TargetRegistry::lookupTarget)
See https://github.com/llvm/llvm-project/commit/d50631faad3003e73589528c83d3bbbad7ba72f1
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15471
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41558>
Upstream-Status: Inappropriate [OE-specific]
---
src/compiler/clc/clc_helpers.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp
index 66d4af43a36a..e5c3d158b290 100644
--- a/src/compiler/clc/clc_helpers.cpp
+++ b/src/compiler/clc/clc_helpers.cpp
@@ -1186,15 +1186,14 @@ llvm_mod_to_spirv(std::unique_ptr<::llvm::Module> mod,
if (args->use_llvm_spirv_target) {
const char *triple = args->address_bits == 32 ? "spirv-unknown-unknown" : "spirv64-unknown-unknown";
std::string error_msg("");
- auto target = TargetRegistry::lookupTarget(triple, error_msg);
- if (target) {
- auto TM = target->createTargetMachine(
#if LLVM_VERSION_MAJOR >= 21
- llvm::Triple(triple),
+ auto temp_triple = llvm::Triple(triple);
#else
- triple,
+ auto temp_triple = triple;
#endif
- "", "", {}, std::nullopt, std::nullopt,
+ auto target = TargetRegistry::lookupTarget(temp_triple, error_msg);
+ if (target) {
+ auto TM = target->createTargetMachine(temp_triple, "", "", {}, std::nullopt, std::nullopt,
#if LLVM_VERSION_MAJOR >= 18
::llvm::CodeGenOptLevel::None
#else
--
GitLab
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://docs/license.rst;md5=ffe678546d4337b732cfd12262e6af11
BRANCH = "powervr/${PV}"
SRC_URI = "git://github.com/TexasInstruments/mesa.git;protocol=https;branch=${BRANCH} \
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch"
file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
file://0001-clc-fix-build-with-LLVM13.patch \
"
SRCREV = "7b6e8de7b0acdaff684f1109c6acb575644a93ea"
PV = "25.2.8"