diff options
| -rw-r--r-- | meta/classes/meson.bbclass | 13 |
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 | ||
| 40 | MESON_CROSS_FILE = "" | 40 | MESON_CROSS_FILE = "" |
| 41 | MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross" | 41 | MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross" |
| 42 | MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross" | ||
| 42 | 43 | ||
| 43 | CCOMPILER ?= "gcc" | 44 | CCOMPILER ?= "gcc" |
| 44 | CXXCOMPILER ?= "g++" | 45 | CXXCOMPILER ?= "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 | ||
| 109 | meson_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 | |||
| 108 | meson_do_configure_prepend_class-native() { | 121 | meson_do_configure_prepend_class-native() { |
| 109 | export PKG_CONFIG="pkg-config-native" | 122 | export PKG_CONFIG="pkg-config-native" |
| 110 | } | 123 | } |
