public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Tom Hochstein <tom.hochstein@oss.nxp.com>
To: openembedded-core@lists.openembedded.org
Cc: Tom Hochstein <tom.hochstein@oss.nxp.com>
Subject: [PATCH v5 3/5] meson: Fix host_machine setting for native cross-file
Date: Mon,  7 Apr 2025 16:18:04 -0500	[thread overview]
Message-ID: <20250407211806.1782316-3-tom.hochstein@oss.nxp.com> (raw)
In-Reply-To: <20250407211806.1782316-1-tom.hochstein@oss.nxp.com>

For native and nativesdk, the meson cross-file settings for
`host_machine` are incorrectly set for the build machine, not the
"machine on which the compiled binary will run". See
https://mesonbuild.com/Cross-compilation.html.

Fixes: [YOCTO #15485]
Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com>
---
 meta/recipes-devtools/meson/meson_1.7.0.bb | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/meson/meson_1.7.0.bb b/meta/recipes-devtools/meson/meson_1.7.0.bb
index 44872a5f7b..3e89669807 100644
--- a/meta/recipes-devtools/meson/meson_1.7.0.bb
+++ b/meta/recipes-devtools/meson/meson_1.7.0.bb
@@ -118,18 +118,14 @@ needs_exe_wrapper = true
 sys_root = @OECORE_TARGET_SYSROOT
 
 [host_machine]
-system = '$host_system'
-cpu_family = '$host_cpu_family'
-cpu = '$host_cpu'
-endian = '$host_endian'
+system = @OECORE_MESON_HOST_SYSTEM
+cpu_family = @OECORE_MESON_HOST_CPU_FAMILY
+cpu = @OECORE_MESON_HOST_CPU
+endian = @OECORE_MESON_HOST_ENDIAN
 EOF
 }
 
 do_install:append:class-nativesdk() {
-    host_system=${SDK_OS}
-    host_cpu_family=${@meson_cpu_family("SDK_ARCH", d)}
-    host_cpu=${SDK_ARCH}
-    host_endian=${@meson_endian("SDK", d)}
     install_templates
 
     install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
@@ -143,10 +139,6 @@ do_install:append:class-nativesdk() {
 FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}"
 
 do_install:append:class-native() {
-    host_system=${HOST_OS}
-    host_cpu_family=${@meson_cpu_family("HOST_ARCH", d)}
-    host_cpu=${HOST_ARCH}
-    host_endian=${@meson_endian("HOST", d)}
     install_templates
 
     install -d ${D}${datadir}/post-relocate-setup.d
-- 
2.34.1



  parent reply	other threads:[~2025-04-07 21:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-07 21:18 [PATCH v5 1/5] toolchain-scripts: Add Meson settings for Yocto build SDK Tom Hochstein
2025-04-07 21:18 ` [PATCH v5 2/5] toolchain-scripts: Export meson settings for SDK builds Tom Hochstein
2025-04-07 21:18 ` Tom Hochstein [this message]
2025-04-07 21:18 ` [PATCH v5 4/5] oeqa/sdk/meson: improve test to validate host/build target assignments Tom Hochstein
2025-04-08 13:37   ` [OE-core] " Mathieu Dubois-Briand
2025-04-08 15:10     ` Tom Hochstein
     [not found]     ` <183460753CA35884.31078@lists.openembedded.org>
2025-04-10 13:28       ` Tom Hochstein
     [not found]       ` <1834F816ACB44615.7383@lists.openembedded.org>
2025-04-10 15:28         ` Tom Hochstein
     [not found]         ` <1834FEA34534143E.27206@lists.openembedded.org>
2025-04-10 18:58           ` Tom Hochstein
2025-04-11 10:01             ` Mathieu Dubois-Briand
     [not found]             ` <18353B5DF2EF4BC1.27206@lists.openembedded.org>
2025-04-11 10:13               ` Mathieu Dubois-Briand
2025-04-11 15:37                 ` Tom Hochstein
2025-04-15  8:29                   ` Mathieu Dubois-Briand
2025-04-07 21:18 ` [PATCH v5 5/5] meson: Allow user to override setup command options Tom Hochstein

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=20250407211806.1782316-3-tom.hochstein@oss.nxp.com \
    --to=tom.hochstein@oss.nxp.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