diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-07-02 19:59:58 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-07-10 11:36:34 +0100 |
commit | 773594fd74279f54844cc16949567f70c81176fc (patch) | |
tree | 5b8a576d673eb58f66a55164b6fde56b843e6c49 /meta/recipes-graphics/mesa | |
parent | 5591c1eebfd89ac1b522bdec1ea09a22a6cd8547 (diff) | |
download | poky-773594fd74279f54844cc16949567f70c81176fc.tar.gz |
mesa: Fix build with upcoming LLVM 17
(From OE-Core rev: c030397f08abfeea95be03e57781f58eb3c039f1)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r-- | meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch | 34 | ||||
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 1 |
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 @@ | |||
1 | From 865762e0a767a121206d818bdd58301afbf30104 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 | src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++- | ||
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c | ||
17 | index 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 | -- | ||
33 | 2.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" | |||
17 | SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ | 17 | SRC_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 | ||
22 | SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9" | 23 | SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9" |