summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-07-27 20:20:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-31 10:48:35 +0100
commite418232bf43367133605b203e23592c6ccd62dd8 (patch)
tree682b6fbc19d7be9c1bd5ab5c3574816281472617 /meta
parent4c42f1ee746c637c03d017a0b4d54c6a61273a37 (diff)
downloadpoky-e418232bf43367133605b203e23592c6ccd62dd8.tar.gz
mesa: Fix a build issue with clang-21
This is a backport, helps compiling with upcoming clang-21 (From OE-Core rev: 5b25a4fa6ab3a149e1dcf18826b78617f8c1acf7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch39
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch b/meta/recipes-graphics/mesa/files/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch
new file mode 100644
index 0000000000..2633869625
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch
@@ -0,0 +1,39 @@
1From 531c6696d42953cd642dea7bf70153285c7949ae Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Kai=20Wasserb=C3=A4ch?= <kai@dev.carbon-project.org>
3Date: Tue, 6 May 2025 14:36:57 +0200
4Subject: [PATCH] fix(FTBFS): clc: switch to new non-owned `TargetOptions` for
5 LLVM 21
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Upstream hid the `TargetOptions` in commit 985410f87f2d19910a8d327527fd30062b042b63
11
12Use the new `getTargetOpts()` to obtain the `TargetOptions` for
13`setTarget()`.
14
15Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835]
16
17Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
18Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13079
19Reference: https://github.com/llvm/llvm-project/commit/985410f87f2d19910a8d327527fd30062b042b63
20Reviewed-by: Karol Herbst <kherbst@redhat.com>
21Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34835>
22---
23 src/compiler/clc/clc_helpers.cpp | 4 ++++
24 1 file changed, 4 insertions(+)
25
26--- a/src/compiler/clc/clc_helpers.cpp
27+++ b/src/compiler/clc/clc_helpers.cpp
28@@ -874,7 +874,11 @@ clc_compile_to_llvm_module(LLVMContext &
29 diag_opts));
30
31 c->setTarget(clang::TargetInfo::CreateTargetInfo(
32+#if LLVM_VERSION_MAJOR >= 21
33+ c->getDiagnostics(), c->getInvocation().getTargetOpts()));
34+#else
35 c->getDiagnostics(), c->getInvocation().TargetOpts));
36+#endif
37
38 c->getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;
39
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 58e3d9f745..0d6f013ae1 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,6 +18,7 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
18 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 18 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
19 file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ 19 file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
20 file://0001-dont-build-clover-frontend.patch \ 20 file://0001-dont-build-clover-frontend.patch \
21 file://0001-fix-FTBFS-clc-switch-to-new-non-owned-TargetOptions-.patch \
21" 22"
22 23
23SRC_URI[sha256sum] = "9f2b69eb39d2d8717d30a9868fdda3e0c0d3708ba32778bbac8ddb044538ce84" 24SRC_URI[sha256sum] = "9f2b69eb39d2d8717d30a9868fdda3e0c0d3708ba32778bbac8ddb044538ce84"