From 773594fd74279f54844cc16949567f70c81176fc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 2 Jul 2023 19:59:58 -0700 Subject: mesa: Fix build with upcoming LLVM 17 (From OE-Core rev: c030397f08abfeea95be03e57781f58eb3c039f1) Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../0001-gallium-Fix-build-with-llvm-17.patch | 34 ++++++++++++++++++++++ meta/recipes-graphics/mesa/mesa.inc | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch (limited to 'meta/recipes-graphics/mesa') 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 @@ +From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 23 Jun 2023 01:20:38 -0700 +Subject: [PATCH] gallium: Fix build with llvm 17 + +These headers are not available for C files in llvm 17+ +and they seem to be not needed to compile after all with llvm 17 +so add conditions to exclude them for llvm >= 17 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23827] +Signed-off-by: Khem Raj +--- + src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c +index 24d0823..3d4573e 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c ++++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c +@@ -42,8 +42,10 @@ + + #include + #include ++#if LLVM_VERSION_MAJOR < 17 + #include +-#if LLVM_VERSION_MAJOR >= 7 ++#endif ++#if LLVM_VERSION_MAJOR >= 7 && LLVM_VERSION_MAJOR < 17 + #include + #endif + #include +-- +2.41.0 + 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" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \ file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ + file://0001-gallium-Fix-build-with-llvm-17.patch \ " SRC_URI[sha256sum] = "2f6d7381bc10fbd2d6263ad1022785b8b511046c1a904162f8f7da18eea8aed9" -- cgit v1.2.3-54-g00ecf