summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@oss.nxp.com>2025-05-10 09:43:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-05-12 22:01:55 +0100
commite07389d1be646e6eeb3dbbb63beb39ef83c78e96 (patch)
tree26c479f39c262b7cc16ad46658cace7dceedeced
parent12bcad4ea5a9d413a08375cc14c56d3158466d0c (diff)
downloadpoky-e07389d1be646e6eeb3dbbb63beb39ef83c78e96.tar.gz
meson: Fix host_machine setting for native cross-file
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) (From OE-Core rev: 0b882df19b5c339d2e7e00f56136afa890404f7b) Signed-off-by: Tom Hochstein <tom.hochstein@oss.nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/meson/meson_1.8.0.bb16
1 files 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 6e3886e0a5..eb88890cd7 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
107sys_root = @OECORE_TARGET_SYSROOT 107sys_root = @OECORE_TARGET_SYSROOT
108 108
109[host_machine] 109[host_machine]
110system = '$host_system' 110system = @OECORE_MESON_HOST_SYSTEM
111cpu_family = '$host_cpu_family' 111cpu_family = @OECORE_MESON_HOST_CPU_FAMILY
112cpu = '$host_cpu' 112cpu = @OECORE_MESON_HOST_CPU
113endian = '$host_endian' 113endian = @OECORE_MESON_HOST_ENDIAN
114EOF 114EOF
115} 115}
116 116
117do_install:append:class-nativesdk() { 117do_install:append:class-nativesdk() {
118 host_system=${SDK_OS}
119 host_cpu_family=${@meson_cpu_family("SDK_ARCH", d)}
120 host_cpu=${SDK_ARCH}
121 host_endian=${@meson_endian("SDK", d)}
122 install_templates 118 install_templates
123 119
124 install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d 120 install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
@@ -132,10 +128,6 @@ do_install:append:class-nativesdk() {
132FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" 128FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}"
133 129
134do_install:append:class-native() { 130do_install:append:class-native() {
135 host_system=${HOST_OS}
136 host_cpu_family=${@meson_cpu_family("HOST_ARCH", d)}
137 host_cpu=${HOST_ARCH}
138 host_endian=${@meson_endian("HOST", d)}
139 install_templates 131 install_templates
140 132
141 install -d ${D}${datadir}/post-relocate-setup.d 133 install -d ${D}${datadir}/post-relocate-setup.d