summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch34
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc1
2 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
new file mode 100644
index 0000000000..3631a918b0
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
@@ -0,0 +1,34 @@
1From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 23 Jun 2023 01:20:38 -0700
4Subject: [PATCH] gallium: Fix build with llvm 17
5
6These headers are not available for C files in llvm 17+
7and they seem to be not needed to compile after all with llvm 17
8so add conditions to exclude them for llvm >= 17
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++-
14 1 file changed, 3 insertions(+), 1 deletion(-)
15
16diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
17index 24d0823..3d4573e 100644
18--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
19+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
20@@ -42,8 +42,10 @@
21
22 #include <llvm/Config/llvm-config.h>
23 #include <llvm-c/Analysis.h>
24+#if LLVM_VERSION_MAJOR < 17
25 #include <llvm-c/Transforms/Scalar.h>
26-#if LLVM_VERSION_MAJOR >= 7
27+#endif
28+#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17
29 #include <llvm-c/Transforms/Utils.h>
30 #endif
31 #include <llvm-c/BitWriter.h>
32--
332.41.0
34
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a944a7bdd5..928899008e 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,6 +17,7 @@ PE = "2"
17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ 17SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ 18 file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
19 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 19 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
20 file://0001-gallium-Fix-build-with-llvm-17.patch \
20 " 21 "
21 22
22SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9" 23SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9"