summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2018-02-20 14:16:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-24 10:31:47 +0000
commiteaa93567449293c482e0175158c5abef1dddcbdf (patch)
tree77a95d9ce7afb0ede5cdb302d6127bb9c93cffd7 /meta/classes
parentb487251b868dcd8eb541246a49e9708a688cec36 (diff)
downloadpoky-eaa93567449293c482e0175158c5abef1dddcbdf.tar.gz
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. (From OE-Core rev: abcb330c462c2c06d36f8f3681a6bd07d562c1fe) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/meson.bbclass13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index cd3497a802..31d32a56f6 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -39,6 +39,7 @@ EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
39 39
40MESON_CROSS_FILE = "" 40MESON_CROSS_FILE = ""
41MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross" 41MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
42MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
42 43
43CCOMPILER ?= "gcc" 44CCOMPILER ?= "gcc"
44CXXCOMPILER ?= "g++" 45CXXCOMPILER ?= "g++"
@@ -105,6 +106,18 @@ meson_do_configure_prepend_class-target() {
105 export AR="${BUILD_AR}" 106 export AR="${BUILD_AR}"
106} 107}
107 108
109meson_do_configure_prepend_class-nativesdk() {
110 # Set these so that meson uses the native tools for its build sanity tests,
111 # which require executables to be runnable. The cross file will still
112 # override these for the nativesdk build. Note that we do *not* set CFLAGS,
113 # LDFLAGS, etc. as they will be slurped in by meson and applied to the
114 # nativesdk build, causing errors.
115 export CC="${BUILD_CC}"
116 export CXX="${BUILD_CXX}"
117 export LD="${BUILD_LD}"
118 export AR="${BUILD_AR}"
119}
120
108meson_do_configure_prepend_class-native() { 121meson_do_configure_prepend_class-native() {
109 export PKG_CONFIG="pkg-config-native" 122 export PKG_CONFIG="pkg-config-native"
110} 123}