diff options
Diffstat (limited to 'meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch')
-rw-r--r-- | meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch new file mode 100644 index 00000000..738ff267 --- /dev/null +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-pvr-23.2.1/0001-gallium-Fix-build-with-llvm-17.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 6d07f6aa7f92f40d78a2db645f16f0f3e7d3c2e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 23 Jun 2023 01:20:38 -0700 | ||
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/23827] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | --- | ||
14 | src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 +++++- | ||
15 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
18 | index cd2108f..b1a4d03 100644 | ||
19 | --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
20 | +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
21 | @@ -46,15 +46,19 @@ | ||
22 | #if GALLIVM_USE_NEW_PASS == 1 | ||
23 | #include <llvm-c/Transforms/PassBuilder.h> | ||
24 | #elif GALLIVM_HAVE_CORO == 1 | ||
25 | +#if LLVM_VERSION_MAJOR < 17 | ||
26 | #include <llvm-c/Transforms/Scalar.h> | ||
27 | -#if LLVM_VERSION_MAJOR >= 7 | ||
28 | +#endif | ||
29 | +#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 | ||
30 | #include <llvm-c/Transforms/Utils.h> | ||
31 | #endif | ||
32 | #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) | ||
33 | #include <llvm-c/Transforms/IPO.h> | ||
34 | #endif | ||
35 | +#if LLVM_VERSION_MAJOR < 17 | ||
36 | #include <llvm-c/Transforms/Coroutines.h> | ||
37 | #endif | ||
38 | +#endif | ||
39 | |||
40 | unsigned gallivm_perf = 0; | ||