diff options
author | Martin Kelly <mkelly@xevo.com> | 2018-06-04 16:06:02 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-07 08:52:55 +0100 |
commit | e14171cc594e8c3dfee8119847c26e10b15bacf4 (patch) | |
tree | f29803be476eac841f621f140a63d3de5b5b8697 /meta/recipes-devtools/meson/meson/meson-wrapper | |
parent | 2a73be1b0e5adecd29e3dfb3f987d6bc761bc8f3 (diff) | |
download | poky-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-x | meta/recipes-devtools/meson/meson/meson-wrapper | 14 |
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 | |||
3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then | ||
4 | echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2 | ||
5 | fi | ||
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. | ||
10 | unset CC CXX CPP LD AR NM STRIP | ||
11 | |||
12 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ | ||
13 | --cross-file "$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.cross" \ | ||
14 | "$@" | ||