]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
mesa: avoid host path poisoning when enabling OpenCL
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 4 Sep 2025 14:03:40 +0000 (16:03 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Sep 2025 09:45:09 +0000 (10:45 +0100)
commitcd0e70d6cee5ccb698bbcfd4dbc10675649556e7
treeade03f7c95cdbdc9da5f7f0a29ceb70e4d656441
parent5948e618b7746ac333c1ec3ca99b66bd3faeb2ba
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>
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>
meta/recipes-graphics/mesa/mesa.inc