From patchwork Fri Aug 22 12:53:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 69031 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 D924DCA0FEB for ; Fri, 22 Aug 2025 12:53:33 +0000 (UTC) Received: from smtp-190c.mail.infomaniak.ch (smtp-190c.mail.infomaniak.ch [185.125.25.12]) by mx.groups.io with SMTP id smtpd.web11.9378.1755867210985062121 for ; Fri, 22 Aug 2025 05:53:31 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: 0leil.net, ip: 185.125.25.12, mailfrom: foss+yocto@0leil.net) Received: from smtp-3-0000.mail.infomaniak.ch (unknown [IPv6:2001:1600:4:17::246b]) by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4c7g953xmGzBLp; Fri, 22 Aug 2025 14:53:29 +0200 (CEST) Received: from unknown by smtp-3-0000.mail.infomaniak.ch (Postfix) with ESMTPA id 4c7g9506m8zjs0; Fri, 22 Aug 2025 14:53:28 +0200 (CEST) From: Quentin Schulz Date: Fri, 22 Aug 2025 14:53:17 +0200 Subject: [PATCH v6 11/14] mesa: avoid host path poisoning when enabling OpenCL MIME-Version: 1.0 Message-Id: <20250822-mesa-libclc-panfrost-v6-11-393cf47e2fa2@cherry.de> References: <20250822-mesa-libclc-panfrost-v6-0-393cf47e2fa2@cherry.de> In-Reply-To: <20250822-mesa-libclc-panfrost-v6-0-393cf47e2fa2@cherry.de> To: openembedded-core@lists.openembedded.org Cc: Dmitry Baryshkov , Markus Volk , Trevor Woerner , Ross Burton , Otavio Salvador , 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 ; Fri, 22 Aug 2025 12:53:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/222326 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 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"