Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.54.1616534900245956072 for ; Tue, 23 Mar 2021 14:28:20 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 F28F331B for ; Tue, 23 Mar 2021 14:28:18 -0700 (PDT) Received: from oss-tx204.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 ESMTPSA id 9D6C73F719 for ; Tue, 23 Mar 2021 14:28:18 -0700 (PDT) From: "Ross Burton" To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/2] meson: use native-file instead of environment variables Date: Tue, 23 Mar 2021 21:28:14 +0000 Message-Id: <20210323212814.567119-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210323212814.567119-1-ross.burton@arm.com> References: <20210323212814.567119-1-ross.burton@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Meson now supports native-files, which are the same as cross files but describe the native build. By writing and using a native file which describes the tools to use, we can drop the environment variable overriding. Signed-off-by: Ross Burton --- meta/classes/meson.bbclass | 49 ++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index a7644e70cb..290b39e1e0 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass @@ -26,7 +26,8 @@ MESONOPTS =3D " --prefix ${prefix} \ --sysconfdir ${sysconfdir} \ --localstatedir ${localstatedir} \ --sharedstatedir ${sharedstatedir} \ - --wrap-mode nodownload" + --wrap-mode nodownload \ + --native-file ${WORKDIR}/native.cross" =20 EXTRA_OEMESON_append =3D " ${PACKAGECONFIG_CONFARGS}" =20 @@ -121,9 +122,28 @@ system =3D '${@meson_operating_system('TARGET_OS', d= )}' cpu_family =3D '${@meson_cpu_family('TARGET_ARCH', d)}' cpu =3D '${TARGET_ARCH}' endian =3D '${@meson_endian('TARGET', d)}' +EOF + + cat >${WORKDIR}/native.cross <