summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch')
-rw-r--r--meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch34
1 files changed, 34 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