From patchwork Thu Sep 4 14:03:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 69655 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE471CAC580 for ; Thu, 4 Sep 2025 14:04:00 +0000 (UTC) Received: from smtp-42af.mail.infomaniak.ch (smtp-42af.mail.infomaniak.ch [84.16.66.175]) by mx.groups.io with SMTP id smtpd.web11.40130.1756994639844893879 for ; Thu, 04 Sep 2025 07:04:00 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: 0leil.net, ip: 84.16.66.175, mailfrom: foss+yocto@0leil.net) Received: from smtp-4-0000.mail.infomaniak.ch (smtp-4-0000.mail.infomaniak.ch [10.7.10.107]) by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4cHh6Q373NzvTj; Thu, 4 Sep 2025 16:03:58 +0200 (CEST) Received: from unknown by smtp-4-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4cHh6P6X16zn9x; Thu, 4 Sep 2025 16:03:57 +0200 (CEST) From: Quentin Schulz Date: Thu, 04 Sep 2025 16:03:40 +0200 Subject: [PATCH v7 11/13] mesa: avoid host path poisoning when enabling OpenCL MIME-Version: 1.0 Message-Id: <20250904-mesa-libclc-panfrost-v7-11-e921a65412f7@cherry.de> References: <20250904-mesa-libclc-panfrost-v7-0-e921a65412f7@cherry.de> In-Reply-To: <20250904-mesa-libclc-panfrost-v7-0-e921a65412f7@cherry.de> To: openembedded-core@lists.openembedded.org Cc: Dmitry Baryshkov , Markus Volk , Trevor Woerner , Ross Burton , Quentin Schulz X-Mailer: b4 0.14.2 X-Infomaniak-Routing: alpha List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 04 Sep 2025 14:04:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222944 From: Quentin Schulz 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 Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Signed-off-by: Quentin Schulz --- meta/recipes-graphics/mesa/mesa.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index beaf99b796f117ab4b7b10bf9c9ea57d65995ddb..54af134c77e90938534db1b0009ec08272f271e0 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" # "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! # Be sure to enable them both for the target and for the native build. -PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native" +PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true -Dmesa-clc-bundle-headers=enabled, -Dgallium-rusticl=false, bindgen-cli-native" PACKAGECONFIG[broadcom] = "" PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"