From patchwork Sat May 10 08:43:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 62738 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 DF79FC3ABCB for ; Sat, 10 May 2025 08:44:26 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.6817.1746866657969157174 for ; Sat, 10 May 2025 01:44:18 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ADEDD153B for ; Sat, 10 May 2025 01:44:06 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 529233F5A1 for ; Sat, 10 May 2025 01:44:17 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 20/23] meson: Fix host_machine setting for native cross-file Date: Sat, 10 May 2025 09:43:53 +0100 Message-ID: <20250510084400.269726-20-ross.burton@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250510084400.269726-1-ross.burton@arm.com> References: <20250510084400.269726-1-ross.burton@arm.com> MIME-Version: 1.0 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 ; Sat, 10 May 2025 08:44:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/216268 From: Tom Hochstein 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] (From OE-Core rev: 59d21632aecf1ca9085d17aeda19a8a29602cd17) Signed-off-by: Tom Hochstein Signed-off-by: Richard Purdie --- meta/recipes-devtools/meson/meson_1.8.0.bb | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/meta/recipes-devtools/meson/meson_1.8.0.bb b/meta/recipes-devtools/meson/meson_1.8.0.bb index 6e3886e0a58..eb88890cd7f 100644 --- a/meta/recipes-devtools/meson/meson_1.8.0.bb +++ b/meta/recipes-devtools/meson/meson_1.8.0.bb @@ -107,18 +107,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 @@ -132,10 +128,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