summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/meson-wrapper
diff options
context:
space:
mode:
authorMartin Kelly <mkelly@xevo.com>2018-06-04 16:06:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-07 08:52:55 +0100
commite14171cc594e8c3dfee8119847c26e10b15bacf4 (patch)
treef29803be476eac841f621f140a63d3de5b5b8697 /meta/recipes-devtools/meson/meson/meson-wrapper
parent2a73be1b0e5adecd29e3dfb3f987d6bc761bc8f3 (diff)
downloadpoky-e14171cc594e8c3dfee8119847c26e10b15bacf4.tar.gz
meson: enable nativesdk
Currently, we can't build meson into SDKs because we don't autogenerate the required meson.cross file. Enable this by using the post-relocate hooks and generating a meson.cross file based on the SDK environment passed into the post-relocate hook. (From OE-Core rev: aabb846b165fec218024a7a57f3c9fdaa2514179) Signed-off-by: Martin Kelly <mkelly@xevo.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/meson/meson/meson-wrapper')
-rwxr-xr-xmeta/recipes-devtools/meson/meson/meson-wrapper14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper
new file mode 100755
index 0000000000..b2e00da513
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/meson-wrapper
@@ -0,0 +1,14 @@
1#!/bin/sh
2
3if [ -z "$OECORE_NATIVE_SYSROOT" ]; then
4 echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2
5fi
6
7# If these are set to a cross-compile path, meson will get confused and try to
8# use them as native tools. Unset them to prevent this, as all the cross-compile
9# config is already in meson.cross.
10unset CC CXX CPP LD AR NM STRIP
11
12exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \
13 --cross-file "$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.cross" \
14 "$@"