From: Alexander Kanavin Date: Wed, 4 Dec 2024 06:48:47 +0000 (+0100) Subject: meson.bbclass: enable qemu exe wrapper in nativesdk X-Git-Tag: yocto-5.2~1092 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f210fc1d3db2e71f484bddc0b23ab252c36f4062;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git meson.bbclass: enable qemu exe wrapper in nativesdk nativesdk builds are cross-builds like target ones, and so meson expectations regarding ability to run binaries are the same: either provide the wrapper, or disable the build time options that need executing target binaries during build time (if such options are made available by upstream). Signed-off-by: Alexander Kanavin Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 03fa2c06eb4..b343480f9a7 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass @@ -9,7 +9,6 @@ inherit python3native meson-routines qemu DEPENDS:append = " meson-native ninja-native" EXEWRAPPER_ENABLED:class-native = "False" -EXEWRAPPER_ENABLED:class-nativesdk = "False" EXEWRAPPER_ENABLED ?= "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)}" DEPENDS:append = "${@' qemu-native' if d.getVar('EXEWRAPPER_ENABLED') == 'True' else ''}" @@ -127,7 +126,7 @@ cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} EOF } -do_write_config:append:class-target() { +write_qemuwrapper() { # Write out a qemu wrapper that will be used as exe_wrapper so that meson # can run target helper binaries through that. qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" @@ -145,6 +144,14 @@ EOF chmod +x ${WORKDIR}/meson-qemuwrapper } +do_write_config:append:class-target() { + write_qemuwrapper +} + +do_write_config:append:class-nativesdk() { + write_qemuwrapper +} + # Tell externalsrc that changes to this file require a reconfigure CONFIGURE_FILES = "meson.build"