[oe-commits] [openembedded-core] 40/55: meson.bbclass: Add support for nativesdk

git at git.openembedded.org git at git.openembedded.org
Sat Feb 24 10:38:25 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit efcbbe663c5cee72b7c0d8e1c9194bb6e502caf8
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Tue Feb 20 14:16:34 2018 +0100

    meson.bbclass: Add support for nativesdk
    
    We need to use the meson.cross file when building for nativesdk.
    Additionally, we need to trick meson's sanity tests, just as it is
    done for target builds.
    
    Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/meson.bbclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index cd3497a..31d32a5 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -39,6 +39,7 @@ EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
 
 MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
 
 CCOMPILER ?= "gcc"
 CXXCOMPILER ?= "g++"
@@ -105,6 +106,18 @@ meson_do_configure_prepend_class-target() {
     export AR="${BUILD_AR}"
 }
 
+meson_do_configure_prepend_class-nativesdk() {
+    # Set these so that meson uses the native tools for its build sanity tests,
+    # which require executables to be runnable. The cross file will still
+    # override these for the nativesdk build. Note that we do *not* set CFLAGS,
+    # LDFLAGS, etc. as they will be slurped in by meson and applied to the
+    # nativesdk build, causing errors.
+    export CC="${BUILD_CC}"
+    export CXX="${BUILD_CXX}"
+    export LD="${BUILD_LD}"
+    export AR="${BUILD_AR}"
+}
+
 meson_do_configure_prepend_class-native() {
     export PKG_CONFIG="pkg-config-native"
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list