diff options
Diffstat (limited to 'poky/meta/recipes-graphics/mesa/files')
2 files changed, 56 insertions, 8 deletions
diff --git a/poky/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch b/poky/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch index 3631a918b0..165708145a 100644 --- a/poky/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch +++ b/poky/meta/recipes-graphics/mesa/files/0001-gallium-Fix-build-with-llvm-17.patch @@ -1,4 +1,4 @@ -From 865762e0a767a121206d818bdd58301afbf30104 Mon Sep 17 00:00:00 2001 +From c8e9776abc3dfd3f2411797a90a03e7fa16263ef Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 23 Jun 2023 01:20:38 -0700 Subject: [PATCH] gallium: Fix build with llvm 17 @@ -10,11 +10,9 @@ 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 <raj.khem@gmail.com> --- - src/gallium/auxiliary/gallivm/lp_bld_init.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) + src/gallium/auxiliary/gallivm/lp_bld_init.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) -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 @@ @@ -29,6 +27,14 @@ index 24d0823..3d4573e 100644 #include <llvm-c/Transforms/Utils.h> #endif #include <llvm-c/BitWriter.h> --- -2.41.0 - +@@ -53,8 +55,10 @@ + #if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) + #include <llvm-c/Transforms/IPO.h> + #endif ++#if LLVM_VERSION_MAJOR < 17 + #include <llvm-c/Transforms/Coroutines.h> + #endif ++#endif + + unsigned gallivm_perf = 0; + diff --git a/poky/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch b/poky/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch new file mode 100644 index 0000000000..4cded0546d --- /dev/null +++ b/poky/meta/recipes-graphics/mesa/files/0001-meson-Disable-cmake-dependency-detector-for-llvm.patch @@ -0,0 +1,42 @@ +From 00d41cd5aa3f4b494dc276c9b4ccdc096310c91f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 28 Sep 2023 15:34:22 -0700 +Subject: [PATCH] meson: use llvm-config instead of cmake to fix linking errors with meson 1.2.1 + +meson dependency auto dependency detection uses cmake and then +config-tool to process dependencies, in mesa the logic to detect llvm is +using auto detection which means if it finds cmake then it will try to +use cmake method. Cmake method works ok except a case when llvm-dev +package is installed on the build host then it generates its own +native.meson file and ignores OE supplied meson.native file which has +correct llvm-config tool specified which is pointing to llvm-config from +native sysroot. The generated meson.native file points to one found in +/usr/bin and there onwards detector finds native install of llvm and +configures that into building native mesa package. + +Since cmake detector does not always work, disable it by default and use +config-tool which works in all cases. This is suggested in below issues +too + +A similar issue is open in meson upstream [1] and mesa [2] + +[1] https://github.com/mesonbuild/meson/issues/10483 +[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/6738 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25438] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + meson.build | 1 + + 1 file changed, 1 insertion(+) + +--- a/meson.build ++++ b/meson.build +@@ -1659,6 +1659,7 @@ with_llvm = false + if _llvm.allowed() + dep_llvm = dependency( + 'llvm', ++ method : host_machine.system() == 'windows' ? 'auto' : 'config-tool', + version : _llvm_version, + modules : llvm_modules, + optional_modules : llvm_optional_modules, |