public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/7] mesa: drop the bindgen patch
Date: Sat, 12 Apr 2025 01:09:12 +0300	[thread overview]
Message-ID: <20250412-mesa-25-fixes-v1-3-791840391271@oss.qualcomm.com> (raw)
In-Reply-To: <20250412-mesa-25-fixes-v1-0-791840391271@oss.qualcomm.com>

Drop the bingen-target and bindgen-includedir options in favour of the
bindgen_clang_args being passed through the meson target file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 ...vide-cross-compilation-arguments-to-LLVM-.patch | 67 ----------------------
 meta/recipes-graphics/mesa/mesa.inc                |  6 +-
 2 files changed, 1 insertion(+), 72 deletions(-)

diff --git a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch b/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
deleted file mode 100644
index d527b3408734dfa0aa756053c1b0f3ea3a59563b..0000000000000000000000000000000000000000
--- a/meta/recipes-graphics/mesa/files/0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From b9cf34f39ca7e7546508ce2ab1f053edef5fc201 Mon Sep 17 00:00:00 2001
-From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
-Date: Wed, 26 Mar 2025 17:47:09 +0200
-Subject: [PATCH] rusticl: provide cross-compilation arguments to LLVM bindgen
- invocation
-
-Correctly generating LLVM bindings requires several croos-compilation
-arguments. Provide them to rust.bindgen(). Karol Herbst on IRC suggested
-that a proper fix should be to fix meson's rust.bindgen() to support
-cross-compilation. Carry this patch until meson is fixed.
-
-Upstream-Status: Inappropriate [OE-Specific]
-Link: https://github.com/mesonbuild/meson/issues/13591
-Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
----
- meson_options.txt                         | 14 ++++++++++++++
- src/gallium/frontends/rusticl/meson.build |  8 ++++++++
- 2 files changed, 22 insertions(+)
-
-diff --git a/meson_options.txt b/meson_options.txt
-index 0147cafcb146..f73e83fded18 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -796,3 +796,17 @@ option(
-   value : false,
-   description : 'Install the drivers internal shader compilers (if needed for cross builds).'
- )
-+
-+option(
-+  'bindgen-includedir',
-+  type : 'string',
-+  value : '',
-+  description : 'system-wide include directory for cross-generating LLVM bindings'
-+  )
-+
-+option(
-+  'bindgen-target',
-+  type : 'string',
-+  value : '',
-+  description : 'Clang target for cross-generating LLVM bindings'
-+  )
-diff --git a/src/gallium/frontends/rusticl/meson.build b/src/gallium/frontends/rusticl/meson.build
-index a5d1dcf3abb9..480c220b7f5f 100644
---- a/src/gallium/frontends/rusticl/meson.build
-+++ b/src/gallium/frontends/rusticl/meson.build
-@@ -115,6 +115,11 @@ rusticl_bindgen_c_args = [
-   '-fno-builtin-malloc',
- ]
- 
-+bindgen_target = get_option('bindgen-target')
-+if bindgen_target != ''
-+  rusticl_bindgen_c_args += [ '-target', bindgen_target ]
-+endif
-+
- cl_c_args = [
-   '-DCL_USE_DEPRECATED_OPENCL_1_0_APIS',
-   '-DCL_USE_DEPRECATED_OPENCL_1_1_APIS',
-@@ -187,6 +192,9 @@ rusticl_llvm_bindings_rs = rust.bindgen(
-     rusticl_bindgen_c_args,
-     pre_args,
-   ],
-+  include_directories : [
-+    get_option('bindgen-includedir'),
-+  ],
-   dependencies : [
-     dep_clang,
-     dep_llvm,
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index a88cc8660e26bae43c713b2bfdbf396e804f6c09..d2de6a096a6343b6d1bf9e7a638abc0e3c7eb492 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -18,7 +18,6 @@ SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            file://0001-meson-disable-SIMD-blake-optimisations-on-x32-host.patch \
            file://0001-freedreno-don-t-encode-build-path-into-binaries.patch\
-           file://0001-rusticl-provide-cross-compilation-arguments-to-LLVM-.patch \
 "
 
 SRC_URI[sha256sum] = "adf904d083b308df95898600ffed435f4b5c600d95fb6ec6d4c45638627fdc97"
@@ -148,13 +147,10 @@ PACKAGECONFIG[gles] = "-Dgles1=enabled -Dgles2=enabled, -Dgles1=disabled -Dgles2
 # "egl" requires "opengl"
 PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
 
-BINDGEN_TARGET = "${TARGET_ARCH}-${TARGET_OS}${@['-gnu', ''][d.getVar('LIBCEXTENSION') != '']}"
-BINDGEN_TARGET:class-native = ""
-
 # "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-opencl=icd -Dgallium-rusticl=true -Dbindgen-includedir=${STAGING_INCDIR} -Dbindgen-target=${BINDGEN_TARGET},\
+    -Dgallium-opencl=icd -Dgallium-rusticl=true, \
     -Dgallium-opencl=disabled -Dgallium-rusticl=false, \
     bindgen-cli-native \
 "

-- 
2.39.5



  parent reply	other threads:[~2025-04-11 22:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-11 22:09 [PATCH 0/7] mesa: small improvements after 25.0 merge Dmitry Baryshkov
2025-04-11 22:09 ` [PATCH 1/7] mesa: drop kmsro PACKAGECONFIG Dmitry Baryshkov
2025-04-12 10:27   ` Martin Jansa
2025-04-12 13:52     ` Dmitry Baryshkov
2025-04-12 17:25       ` [OE-core] " Khem Raj
2025-04-12 18:46         ` Martin Jansa
2025-04-14 20:11           ` Khem Raj
2025-04-15  8:55             ` Dmitry Baryshkov
2025-04-11 22:09 ` [PATCH 2/7] meson: pass -target and -I to bindgen calls Dmitry Baryshkov
2025-04-11 22:53   ` [OE-core] " Khem Raj
2025-04-12 15:50     ` Dmitry Baryshkov
2025-04-12 16:29     ` Dmitry Baryshkov
2025-04-12 18:02       ` Khem Raj
2025-04-13 11:15         ` Dmitry Baryshkov
2025-04-11 22:09 ` Dmitry Baryshkov [this message]
2025-04-11 22:09 ` [PATCH 4/7] mesa: update patch status Dmitry Baryshkov
2025-04-11 22:09 ` [PATCH 5/7] mesa: don't buid Intel drivers outside of x86 world Dmitry Baryshkov
2025-04-11 22:09 ` [PATCH 6/7] mesa: introduce amd PACKAGECONFIG Dmitry Baryshkov
2025-04-11 22:09 ` [PATCH 7/7] mesa: hanlde svga Gallium driver through PACKAGECONFIG too Dmitry Baryshkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250412-mesa-25-fixes-v1-3-791840391271@oss.qualcomm.com \
    --to=dmitry.baryshkov@oss.qualcomm.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox