diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2024-12-04 07:48:47 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-05 17:07:10 +0000 |
| commit | abce844914cd058b08ad548a1df75021e30eaf91 (patch) | |
| tree | 5f3a641a52d2eb0fa1100c9bcc080798e6cc5111 | |
| parent | 166e5bdd7e6a587b2150840fa4bb4ced876d45e9 (diff) | |
| download | poky-abce844914cd058b08ad548a1df75021e30eaf91.tar.gz | |
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).
(From OE-Core rev: f210fc1d3db2e71f484bddc0b23ab252c36f4062)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes-recipe/meson.bbclass | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 03fa2c06eb..b343480f9a 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass | |||
| @@ -9,7 +9,6 @@ inherit python3native meson-routines qemu | |||
| 9 | DEPENDS:append = " meson-native ninja-native" | 9 | DEPENDS:append = " meson-native ninja-native" |
| 10 | 10 | ||
| 11 | EXEWRAPPER_ENABLED:class-native = "False" | 11 | EXEWRAPPER_ENABLED:class-native = "False" |
| 12 | EXEWRAPPER_ENABLED:class-nativesdk = "False" | ||
| 13 | EXEWRAPPER_ENABLED ?= "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)}" | 12 | EXEWRAPPER_ENABLED ?= "${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d)}" |
| 14 | DEPENDS:append = "${@' qemu-native' if d.getVar('EXEWRAPPER_ENABLED') == 'True' else ''}" | 13 | DEPENDS:append = "${@' qemu-native' if d.getVar('EXEWRAPPER_ENABLED') == 'True' else ''}" |
| 15 | 14 | ||
| @@ -127,7 +126,7 @@ cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} | |||
| 127 | EOF | 126 | EOF |
| 128 | } | 127 | } |
| 129 | 128 | ||
| 130 | do_write_config:append:class-target() { | 129 | write_qemuwrapper() { |
| 131 | # Write out a qemu wrapper that will be used as exe_wrapper so that meson | 130 | # Write out a qemu wrapper that will be used as exe_wrapper so that meson |
| 132 | # can run target helper binaries through that. | 131 | # can run target helper binaries through that. |
| 133 | qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" | 132 | qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" |
| @@ -145,6 +144,14 @@ EOF | |||
| 145 | chmod +x ${WORKDIR}/meson-qemuwrapper | 144 | chmod +x ${WORKDIR}/meson-qemuwrapper |
| 146 | } | 145 | } |
| 147 | 146 | ||
| 147 | do_write_config:append:class-target() { | ||
| 148 | write_qemuwrapper | ||
| 149 | } | ||
| 150 | |||
| 151 | do_write_config:append:class-nativesdk() { | ||
| 152 | write_qemuwrapper | ||
| 153 | } | ||
| 154 | |||
| 148 | # Tell externalsrc that changes to this file require a reconfigure | 155 | # Tell externalsrc that changes to this file require a reconfigure |
| 149 | CONFIGURE_FILES = "meson.build" | 156 | CONFIGURE_FILES = "meson.build" |
| 150 | 157 | ||
