summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch41
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch b/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch
new file mode 100644
index 0000000000..82ad88a079
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-amd-Include-missing-llvm-IR-header-Module.h.patch
@@ -0,0 +1,41 @@
1From 777d69cf15b80ab1f109a4936d6e4801c4b0e0f3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 1 Jul 2024 23:09:29 -0700
4Subject: [PATCH] amd: Include missing llvm IR header Module.h
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9With LLVM-19, Module.h header is not being pulled, which results in
10compile errors e.g.
11
12src/amd/llvm/ac_llvm_helper.cpp:102:10: error: no matching function for call to ‘unwrap(LLVMOpaqueModule*&)’
13 102 | unwrap(module)->setTargetTriple(TM->getTargetTriple().getTriple());
14 | ~~~~~~^~~~~~~~
15In file included from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/Type.h:18,
16 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/DerivedTypes.h:23,
17 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/IR/InstrTypes.h:26,
18 from /mnt/b/yoe/master/build/tmp/work/x86_64-linux/mesa-native/24.0.7/recipe-sysroot-native/usr/include/llvm/Analysis/TargetLibraryInfo.h:14,
19 from ../mesa-24.0.7/src/amd/llvm/ac_llvm_helper.cpp:8:
20
21Its getting the definition from llvm/IR/Type.h instead of Module.h and caused
22confusion to compiler
23
24Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29993]
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 src/amd/llvm/ac_llvm_helper.cpp | 1 +
28 1 file changed, 1 insertion(+)
29
30diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp
31index 5d065279ad1..af4a50f8409 100644
32--- a/src/amd/llvm/ac_llvm_helper.cpp
33+++ b/src/amd/llvm/ac_llvm_helper.cpp
34@@ -8,6 +8,7 @@
35 #include <llvm/Analysis/TargetLibraryInfo.h>
36 #include <llvm/IR/IRBuilder.h>
37 #include <llvm/IR/LegacyPassManager.h>
38+#include <llvm/IR/Module.h>
39 #include <llvm/IR/Verifier.h>
40 #include <llvm/Target/TargetMachine.h>
41 #include <llvm/MC/MCSubtargetInfo.h>
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 2581ccb120..272d57c749 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -19,6 +19,7 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
19 file://0001-drisw-fix-build-without-dri3.patch \ 19 file://0001-drisw-fix-build-without-dri3.patch \
20 file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \ 20 file://0002-glxext-don-t-try-zink-if-not-enabled-in-mesa.patch \
21 file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \ 21 file://0001-Revert-meson-do-not-pull-in-clc-for-clover.patch \
22 file://0001-amd-Include-missing-llvm-IR-header-Module.h.patch \
22" 23"
23 24
24SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a" 25SRC_URI[sha256sum] = "7454425f1ed4a6f1b5b107e1672b30c88b22ea0efea000ae2c7d96db93f6c26a"