* [PATCH] meson.bbclass: add exe_wrapper helper
@ 2022-03-12 15:40 Jose Quaresma
2022-03-12 17:11 ` [OE-core] " Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Jose Quaresma @ 2022-03-12 15:40 UTC (permalink / raw)
To: openembedded-core; +Cc: Jose Quaresma
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.
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
---
meta/classes/meson.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 0bfe945811..877f5e7794 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -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"
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: add exe_wrapper helper
2022-03-12 15:40 [PATCH] meson.bbclass: add exe_wrapper helper Jose Quaresma
@ 2022-03-12 17:11 ` Richard Purdie
2022-03-14 23:14 ` Jose Quaresma
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2022-03-12 17:11 UTC (permalink / raw)
To: Jose Quaresma, openembedded-core
On Sat, 2022-03-12 at 15:40 +0000, Jose Quaresma wrote:
> 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.
>
> Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
> ---
> meta/classes/meson.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> index 0bfe945811..877f5e7794 100644
> --- a/meta/classes/meson.bbclass
> +++ b/meta/classes/meson.bbclass
> @@ -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"
You can't use overrides with flags like that, I'm surprised that even parses!
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: add exe_wrapper helper
2022-03-12 17:11 ` [OE-core] " Richard Purdie
@ 2022-03-14 23:14 ` Jose Quaresma
2022-03-14 23:23 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Jose Quaresma @ 2022-03-14 23:14 UTC (permalink / raw)
To: Richard Purdie; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2107 bytes --]
Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia sábado,
12/03/2022 à(s) 17:11:
> On Sat, 2022-03-12 at 15:40 +0000, Jose Quaresma wrote:
> > 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.
> >
> > Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
> > ---
> > meta/classes/meson.bbclass | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
> > index 0bfe945811..877f5e7794 100644
> > --- a/meta/classes/meson.bbclass
> > +++ b/meta/classes/meson.bbclass
> > @@ -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"
>
> 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
> Cheers,
>
> Richard
>
>
>
--
Best regards,
José Quaresma
[-- Attachment #2: Type: text/html, Size: 3139 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: add exe_wrapper helper
2022-03-14 23:14 ` Jose Quaresma
@ 2022-03-14 23:23 ` Richard Purdie
2022-03-14 23:52 ` Jose Quaresma
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2022-03-14 23:23 UTC (permalink / raw)
To: Jose Quaresma; +Cc: OE-core
On Mon, 2022-03-14 at 23:14 +0000, Jose Quaresma wrote:
>
>
> Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia sábado,
> 12/03/2022 à(s) 17:11:
> > On Sat, 2022-03-12 at 15:40 +0000, Jose Quaresma wrote:
> > >
> > > +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"
No, that won't work either.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] meson.bbclass: add exe_wrapper helper
2022-03-14 23:23 ` Richard Purdie
@ 2022-03-14 23:52 ` Jose Quaresma
0 siblings, 0 replies; 5+ messages in thread
From: Jose Quaresma @ 2022-03-14 23:52 UTC (permalink / raw)
To: Richard Purdie; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 989 bytes --]
Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia
segunda, 14/03/2022 à(s) 23:24:
> On Mon, 2022-03-14 at 23:14 +0000, Jose Quaresma wrote:
> >
> >
> > Richard Purdie <richard.purdie@linuxfoundation.org> escreveu no dia
> sábado,
> > 12/03/2022 à(s) 17:11:
> > > On Sat, 2022-03-12 at 15:40 +0000, Jose Quaresma wrote:
> > > >
> > > > +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"
>
> No, that won't work either.
>
Thanks
>
> Cheers,
>
> Richard
>
>
--
Best regards,
José Quaresma
[-- Attachment #2: Type: text/html, Size: 1827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-14 23:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 15:40 [PATCH] meson.bbclass: add exe_wrapper helper Jose Quaresma
2022-03-12 17:11 ` [OE-core] " Richard Purdie
2022-03-14 23:14 ` Jose Quaresma
2022-03-14 23:23 ` Richard Purdie
2022-03-14 23:52 ` Jose Quaresma
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.