meson.bbclass: add exe_wrapper helper
PATCH 1/1 meson.bbclass: add exe_wrapper helper
Sometimes when we use the exe_wrapper we need a way to costumize or circumvent some limitations of the qemu usermode. The ideia of this help script is to handle such cases before the qemu usermode was launched.
--- meta/classes/meson.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)
meta/classes/meson.bbclass +6 -0
@@ -114,6 +114,8 @@ cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} EOF } +MESON_QEMU_WRAPPER_HELPER ?= "" + do_write_config:append:class-target() { # Write out a qemu wrapper that will be used as exe_wrapper so that meson # can run target helper binaries through that.
@@ -127,10 +129,14 @@ export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy # meson sets this wrongly (only to libs in build-dir), qemu_wrapper_cmdline() and GIR_EXTRA_LIBS_PATH take care of it properly unset LD_LIBRARY_PATH +# import any customization provided in the helper +test -f "${MESON_QEMU_WRAPPER_HELPER}" && . ${MESON_QEMU_WRAPPER_HELPER} + $qemu_binary "\$@" EOF chmod +x ${WORKDIR}/meson-qemuwrapper } +do_write_config:class-target[vardeps] += "MESON_QEMU_WRAPPER_HELPER" # Tell externalsrc that changes to this file require a reconfigure CONFIGURE_FILES = "meson.build"
Signature · 1 line
2.35.1
Quoted 25 lines · Jose Quaresma
Sometimes when we use the
exe_wrapperwe need a way to costumize or circumvent some limitations of the qemu usermode. The ideia of this help script is to handle such cases before the qemu usermode was launched.Signed-off-by Jose Quaresma <[email protected]>--- meta/classes/meson.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)meta/classes/meson.bbclass +2
-0@@ -114,6 +114,8 @@ cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} EOF } +MESON_QEMU_WRAPPER_HELPER ?= "" + do_write_config:append:class-target() { # Write out a qemu wrapper that will be used as exe_wrapper so that meson # can run target helper binaries through that.@@ -127,10 +129,14 @@ export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy # meson sets this wrongly (only to libs in build-dir), qemu_wrapper_cmdline() and GIR_EXTRA_LIBS_PATH take care of it properly
meta/classes/meson.bbclass export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy · line 139
Quoted 10 lines
meta/classes/meson.bbclass +4
-0unset LD_LIBRARY_PATH +# import any customization provided in the helper +test -f "${MESON_QEMU_WRAPPER_HELPER}" && . ${MESON_QEMU_WRAPPER_HELPER} + $qemu_binary "\$@" EOF chmod +x ${WORKDIR}/meson-qemuwrapper } +do_write_config:class-target[vardeps] += "MESON_QEMU_WRAPPER_HELPER"
You can't use overrides with flags like that, I'm surprised that even parses!
Cheers,
Richard
Richard Purdie <[email protected]> escreveu no dia sábado, 12/03/2022 à(s) 17:11:
Quoted 31 lines · Jose Quaresma
Quoted 15 lines
Sometimes when we use the
exe_wrapperwe need a way to costumize or circumvent some limitations of the qemu usermode. The ideia of this help script is to handle such cases before the qemu usermode was launched.Signed-off-by Jose Quaresma <[email protected]>--- meta/classes/meson.bbclass | 6 ++++++ 1 file changed, 6 insertions(+)meta/classes/meson.bbclass +0
-0meta/classes/meson.bbclass cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} · line 120
Quoted 7 lines
meta/classes/meson.bbclass +2
-0@@ -114,6 +114,8 @@ cpp_link_args = ${@meson_array('BUILD_LDFLAGS', d)} EOF } +MESON_QEMU_WRAPPER_HELPER ?= "" + do_write_config:append:class-target() { # Write out a qemu wrapper that will be used as exe_wrapper so thatmeson
meta/classes/meson.bbclass export
Quoted 2 lines
meta/classes/meson.bbclass +0
-0# can run target helper binaries through that.@@ -127,10 +129,14 @@ exportGIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
meta/classes/meson.bbclass export · line 129
Quoted 1 line
meta/classes/meson.bbclass +0
-0# meson sets this wrongly (only to libs in build-dir),
qemu_wrapper_cmdline()andGIR_EXTRA_LIBS_PATHtake care of it properlyQuoted 2 lines
meta/classes/meson.bbclass +0
-0unset LD_LIBRARY_PATH
Quoted 11 lines
meta/classes/meson.bbclass export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy · line 139
Quoted 8 lines
meta/classes/meson.bbclass +4
-0+# import any customization provided in the helper +test -f "${MESON_QEMU_WRAPPER_HELPER}" && . ${MESON_QEMU_WRAPPER_HELPER} + $qemu_binary "\$@" EOF chmod +x ${WORKDIR}/meson-qemuwrapper } +do_write_config:class-target[vardeps] += "MESON_QEMU_WRAPPER_HELPER"You can't use overrides with flags like that, I'm surprised that even parses!
I will drop this line because my intention is to rerun the do_write_config when
the content of the file changes, which is not possible at all.
I will take the opportunity to ask if the following would work? do_write_config[vardeps]:class-target += "MESON_QEMU_WRAPPER_HELPER"
Jose
Quoted 6 lines
Cheers,
Richard
Signature · 3 lines
Best regards, José Quaresma
Quoted 13 lines · Jose Quaresma
Richard Purdie <[email protected]> escreveu no dia sábado, 12/03/2022 à(s) 17:11:
Quoted 7 lines · Jose Quaresma
Quoted 2 lines
+do_write_config:class-target[vardeps] += "
MESON_QEMU_WRAPPER_HELPER"You can't use overrides with flags like that, I'm surprised that even parses!
Quoted 6 lines
I will drop this line because my intention is to rerun the
do_write_configwhen
the content of the file changes, which is not possible at all.I will take the opportunity to ask if the following would work? do_write_config[vardeps]:class-target += "
MESON_QEMU_WRAPPER_HELPER"
No, that won't work either.
Cheers,
Richard
Richard Purdie <[email protected]> escreveu no dia segunda, 14/03/2022 à(s) 23:24:
Quoted 16 lines · Jose Quaresma
Quoted 3 lines
Richard Purdie <[email protected]> escreveu no dia
sábado,
Quoted 11 lines
12/03/2022 à(s) 17:11:
Quoted 7 lines · Jose Quaresma
Quoted 2 lines
+do_write_config:class-target[vardeps] += "
MESON_QEMU_WRAPPER_HELPER"You can't use overrides with flags like that, I'm surprised that even parses!
I will drop this line because my intention is to rerun the
Quoted 9 lines
do_write_configQuoted 5 lines
when
the content of the file changes, which is not possible at all.I will take the opportunity to ask if the following would work? do_write_config[vardeps]:class-target += "
MESON_QEMU_WRAPPER_HELPER"No, that won't work either.
Thanks
Quoted 6 lines
Cheers,
Richard
Signature · 3 lines
Best regards, José Quaresma