summaryrefslogtreecommitdiffstats
path: root/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch')
-rw-r--r--meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
new file mode 100644
index 00000000..bdfe7bb8
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch
@@ -0,0 +1,58 @@
1From 2dfe0f899aeb415a5491b8c67e208673d2a2914f Mon Sep 17 00:00:00 2001
2From: Ryan Eatmon <reatmon@ti.com>
3Date: Fri, 22 Sep 2023 21:50:08 -0500
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/21262]
11Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980]
12Signed-off-by: Ryan Eatmon <reatmon@ti.com>
13---
14 src/gallium/auxiliary/gallivm/lp_bld_init.c | 8 ++++----
15 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 4 ++++
16 2 files changed, 8 insertions(+), 4 deletions(-)
17
18diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
19index 584ea738668..fe8bb2b11af 100644
20--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
21+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
22@@ -42,14 +42,14 @@
23
24 #include <llvm/Config/llvm-config.h>
25 #include <llvm-c/Analysis.h>
26-#include <llvm-c/Transforms/Scalar.h>
27-#if LLVM_VERSION_MAJOR >= 7
28-#include <llvm-c/Transforms/Utils.h>
29-#endif
30 #include <llvm-c/BitWriter.h>
31 #if GALLIVM_USE_NEW_PASS == 1
32 #include <llvm-c/Transforms/PassBuilder.h>
33 #elif GALLIVM_HAVE_CORO == 1
34+#include <llvm-c/Transforms/Scalar.h>
35+#if LLVM_VERSION_MAJOR >= 7
36+#include <llvm-c/Transforms/Utils.h>
37+#endif
38 #if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_MIPS64))
39 #include <llvm-c/Transforms/IPO.h>
40 #endif
41diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
42index 2279e5acb28..0caeaf94263 100644
43--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
44+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
45@@ -56,7 +56,11 @@
46 #include <llvm-c/ExecutionEngine.h>
47 #include <llvm/Target/TargetOptions.h>
48 #include <llvm/ExecutionEngine/ExecutionEngine.h>
49+#if LLVM_VERSION_MAJOR >= 17
50+#include <llvm/TargetParser/Triple.h>
51+#else
52 #include <llvm/ADT/Triple.h>
53+#endif
54 #include <llvm/Analysis/TargetLibraryInfo.h>
55 #include <llvm/ExecutionEngine/SectionMemoryManager.h>
56 #include <llvm/Support/CommandLine.h>
57--
582.17.1