From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Liam Beguin <liambeguin@gmail.com>,
"openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Cc: "alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>
Subject: RE: [OE-core] [PATCH v2] meson: make wrapper options sub-command specific
Date: Wed, 28 Sep 2022 09:08:59 +0000 [thread overview]
Message-ID: <67ea95876495448f93c1412f49c3c8ea@axis.com> (raw)
In-Reply-To: <20220928025205.1286043-1-liambeguin@gmail.com>
> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Liam Beguin
> Sent: den 28 september 2022 04:52
> To: liambeguin@gmail.com; openembedded-core@lists.openembedded.org
> Cc: alexandre.belloni@bootlin.com
> Subject: [OE-core] [PATCH v2] meson: make wrapper options sub-command specific
>
> The meson-wrapper adds setup options to facilitate cross-compilation.
> The current options are exclusive to the setup sub-command and might
> cause issues with other sub-commands.
>
> Update the wrapper to make options sub-command specific.
>
> Signed-off-by: Liam Beguin <liambeguin@gmail.com>
> ---
> .../meson/meson/meson-wrapper | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
> index c62007f5077e..866dc33cf4be 100755
> --- a/meta/recipes-devtools/meson/meson/meson-wrapper
> +++ b/meta/recipes-devtools/meson/meson/meson-wrapper
> @@ -13,7 +13,20 @@ fi
> # config is already in meson.cross.
> unset CC CXX CPP LD AR NM STRIP
>
> +for arg in "${@}"; do
> + case ${arg} in
> + -*) continue ;;
> + *) SUBCMD=${arg}; break ;;
> + esac
> +done
Change all "${...}" to "$..." above.
> +
> +if [ "x${SUBCMD}" == "xsetup" ] || [ -d ${SUBCMD} ]; then
== is a bashism, use = instead. Also, you know that $SUBCMD will never
have a - as its first character (due to the case statement above) so it
is safe to simplify the above to:
if [ "$SUBCMD" = setup ] || [ -d "$SUBCMD" ]; then
> + MESON_SUB_OPTS=" \
> + --cross-file="${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
> + --native-file="${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \
Change "${OECORE_NATIVE_SYSROOT}" to "$OECORE_NATIVE_SYSROOT".
And while at it, change it in the export line earlier in the file
as well.
> + "
> +fi
> +
> exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
> - --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \
> - --native-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \
> - "$@"
> + "$@" \
> + ${MESON_SUB_OPTS}
Change "${MESON_SUB_OPTS}" to "$MESON_SUB_OPTS".
>
> base-commit: a2659cc2bf5d3f1cedf5c52c3b45e0427d40732d
> --
> 2.37.1.223.g6a475b71f8c4
//Peter
prev parent reply other threads:[~2022-09-28 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-28 2:52 [PATCH v2] meson: make wrapper options sub-command specific Liam Beguin
2022-09-28 9:08 ` Peter Kjellerstedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67ea95876495448f93c1412f49c3c8ea@axis.com \
--to=peter.kjellerstedt@axis.com \
--cc=alexandre.belloni@bootlin.com \
--cc=liambeguin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox