diff options
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.patch | 58 |
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 @@ | |||
1 | From 2dfe0f899aeb415a5491b8c67e208673d2a2914f Mon Sep 17 00:00:00 2001 | ||
2 | From: Ryan Eatmon <reatmon@ti.com> | ||
3 | Date: Fri, 22 Sep 2023 21:50:08 -0500 | ||
4 | Subject: [PATCH] gallium: Fix build with llvm 17 | ||
5 | |||
6 | These headers are not available for C files in llvm 17+ | ||
7 | and they seem to be not needed to compile after all with llvm 17 | ||
8 | so add conditions to exclude them for llvm >= 17 | ||
9 | |||
10 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21262] | ||
11 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980] | ||
12 | Signed-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 | |||
18 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
19 | index 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 | ||
41 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | ||
42 | index 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 | -- | ||
58 | 2.17.1 | ||