summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}