Upstream Meson fails to detect cross if host and target are compatible (x86->x86). We patch Meson to check if an exe_wrapper is needed instead (0001-mesonbuild-environment.py-do-not-determine-whether-a.patch). This appears to work for cross builds but the same patch breaks builds on target where it believes that an exe wrapper is needed and believes that a native build is cross. I've filed https://github.com/mesonbuild/meson/issues/5993 upstream to track this but we need to fix this for M4 I think.
How can I reproduce this?
Maybe we can simply apply this patch only for native and nativesdk but not for target? Meanwhile hopefully upstream will sort this out.
The reproducer is to try a build on target using Meson: it will detect as cross due to the change in 0001-mesonbuild-environment.py-do-not-determine-whether-a.patch. Removing the patch will break cross builds if the machines match. I've a patch which does this: def is_cross_build(self) -> bool: - return self.need_exe_wrapper() + return bool(self.coredata.cross_files) Appears to work.
Good news is that over the weekend Jussi merged a fix upstream.
Fixed in oe-core 9aa543aa9bd78c63343ae28fc85113ca2c9e0094.