summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@cherry.de>2025-09-04 16:03:40 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-09-11 11:31:56 +0100
commitff07745cbdd4c5eddbc6b3b2be0103654274437f (patch)
treef252c9a7dd9061667e54a6930ecc2a88ee556742
parent6e54c8c7ff5052a2b67dcda23b48fe213bf95eaa (diff)
downloadpoky-ff07745cbdd4c5eddbc6b3b2be0103654274437f.tar.gz
mesa: avoid host path poisoning when enabling OpenCL
When enabling rusticl (and the shared-llvm meson feature via the gallium-llvm PACKAGECONFIG documented dependency), the clc headers are looked on the filesystem at runtime. Unfortunately, part of the lookup path contains LLVM_LIB_DIR, a variable derived from llvm_libdir meson variable. The latter is required to figure out where the clang/llvm libraries are for the cross-compiler but the former is used when running on the target. When in a cross-compiling environment, LLVM_LIB_DIR would actually point at a non-existing path (the sysroot path on the build host) instead of the target path. This sadly triggers a buildpaths QA error in addition of being incorrect. Another option is to bundle the clc headers directly inside the binary instead of looking them up at runtime, something we can do with mesa-clc-bundle-headers meson feature. So let's do that to fix the issue and buildpaths QA error. Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> (From OE-Core rev: cd0e70d6cee5ccb698bbcfd4dbc10675649556e7) Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index beaf99b796..54af134c77 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -129,7 +129,7 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
129 129
130# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! 130# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
131# Be sure to enable them both for the target and for the native build. 131# Be sure to enable them both for the target and for the native build.
132PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native" 132PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native"
133 133
134PACKAGECONFIG[broadcom] = "" 134PACKAGECONFIG[broadcom] = ""
135PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" 135PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"