summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorLiam Beguin <liambeguin@gmail.com>2022-09-28 22:50:56 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-04 23:31:48 +0000
commit33711d546dccc13918ae8e8bc64d13976bbb6f63 (patch)
treeed5ae81e1434d099d685d36d4231d1bf4001194f /meta
parent1c94f9d64bca84c63c50d4471c71f48853e38606 (diff)
downloadpoky-33711d546dccc13918ae8e8bc64d13976bbb6f63.tar.gz
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. (From OE-Core rev: 4475250ee0d83cc90322f2fcd9ec8df7c05b6903) Signed-off-by: Liam Beguin <liambeguin@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> (cherry picked from commit 7bcda141f2019862b4fb5d8dec7956cd8344b420) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rwxr-xr-xmeta/recipes-devtools/meson/meson/meson-wrapper21
1 files changed, 17 insertions, 4 deletions
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
index c62007f507..fca64a5692 100755
--- a/meta/recipes-devtools/meson/meson/meson-wrapper
+++ b/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -5,7 +5,7 @@ if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
5fi 5fi
6 6
7if [ -z "$SSL_CERT_DIR" ]; then 7if [ -z "$SSL_CERT_DIR" ]; then
8 export SSL_CERT_DIR="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/" 8 export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/etc/ssl/certs/"
9fi 9fi
10 10
11# If these are set to a cross-compile path, meson will get confused and try to 11# If these are set to a cross-compile path, meson will get confused and try to
@@ -13,7 +13,20 @@ fi
13# config is already in meson.cross. 13# config is already in meson.cross.
14unset CC CXX CPP LD AR NM STRIP 14unset CC CXX CPP LD AR NM STRIP
15 15
16for arg in "$@"; do
17 case "$arg" in
18 -*) continue ;;
19 *) SUBCMD="$arg"; break ;;
20 esac
21done
22
23if [ "$SUBCMD" = "setup" ] || [ -d "$SUBCMD" ]; then
24 MESON_SUB_OPTS=" \
25 --cross-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/${TARGET_PREFIX}meson.cross" \
26 --native-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.native" \
27 "
28fi
29
16exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ 30exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
17 --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \ 31 "$@" \
18 --native-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \ 32 $MESON_SUB_OPTS
19 "$@"