diff mbox series

[meta-selinux] mingw32-common.inc: disable meson exe wrapper for mingw targets

Message ID 20260427055125.2349479-1-rong.fu.cn@windriver.com
State New
Headers show
Series [meta-selinux] mingw32-common.inc: disable meson exe wrapper for mingw targets | expand

Commit Message

Rong Fu April 27, 2026, 5:51 a.m. UTC
From: Rong Fu <rong.fu.cn@windriver.com>

The meson bbclass uses qemu as an exe_wrapper to run cross-compiled
binaries for sanity checks. However, qemu-i386 cannot execute Windows
PE format executables (.exe), causing meson setup to fail with:

  Executables created by c compiler i686-w64-mingw32-gcc are not runnable.

This affects all meson-based nativesdk recipes when SDKMACHINE is set
to a mingw target (e.g. i686-mingw32), such as nativesdk-dtc.

Disable EXEWRAPPER_ENABLED for mingw32 to skip the qemu exe wrapper
since it is not functional for Windows targets.

Signed-off-by: Rong Fu <rong.fu.cn@windriver.com>
---
 conf/machine-sdk/include/mingw32-common.inc | 3 +++
 1 file changed, 3 insertions(+)

Comments

Rong Fu April 27, 2026, 5:54 a.m. UTC | #1
Reproduce steps:
1. mkdir -p <workdir>
2. cd <workdir>
3. git clone https://git.openembedded.org/bitbake
4. ./bitbake/bin/bitbake-setup init --non-interactive poky-master poky machine/qemux86-64 distro/poky
5. cd bitbake-builds/poky-master-poky-distro_poky-machine_qemux86-64
6. git clone https://git.yoctoproject.org/meta-mingw layers/meta-mingw
7. source build/init-build-env
8. bitbake-layers add-layer ../layers/meta-mingw
9. echo 'SDKMACHINE = "i686-mingw32"' >> conf/local.conf
10. bitbake nativesdk-dtc
diff mbox series

Patch

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index bf3f14e..6014c51 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -57,6 +57,9 @@  DISABLE_STATIC:mingw32 = ""
 # disable security flags
 GCCPIE:mingw32 = ""
 
+# qemu cannot run Windows PE executables, disable meson exe wrapper
+EXEWRAPPER_ENABLED:mingw32 = "False"
+
 # wine and wineserver are required to test MinGW SDKs
 HOSTTOOLS_NONFATAL += "wine wineserver"