[oe-commits] [meta-openembedded] 05/19: meson.bbclass: Support building for native
git at git.openembedded.org
git at git.openembedded.org
Thu Mar 16 23:40:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
martin_jansa pushed a commit to branch master
in repository meta-openembedded.
commit 7fb45590ff7d10b4a32a6f702b79ab855fd62948
Author: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
AuthorDate: Sat Mar 11 05:58:54 2017 +0100
meson.bbclass: Support building for native
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta-oe/classes/meson.bbclass | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
index 8da06da..e3489dd 100644
--- a/meta-oe/classes/meson.bbclass
+++ b/meta-oe/classes/meson.bbclass
@@ -9,9 +9,11 @@ do_configure[cleandirs] = "${B}"
# Where the meson.build build configuration is
MESON_SOURCEPATH = "${S}"
-# These variables in the environment override the *native* tools not the cross,
-# so they need to be unexported.
-CC[unexport] = "1"
+# These variables in the environment override the *native* tools, not the cross.
+export CC = "${BUILD_CC}"
+export CXX = "${BUILD_CXX}"
+export LD = "${BUILD_LD}"
+export AR = "${BUILD_AR}"
def noprefix(var, d):
return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
@@ -37,6 +39,9 @@ MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'big',
EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
+MESON_CROSS_FILE = ""
+MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+
def meson_array(var, d):
return "', '".join(d.getVar(var, True).split()).join(("'", "'"))
@@ -75,7 +80,7 @@ EOF
CONFIGURE_FILES = "meson.build"
meson_do_configure() {
- if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" --cross-file ${WORKDIR}/meson.cross ${EXTRA_OEMESON}; then
+ if ! meson ${MESONOPTS} "${MESON_SOURCEPATH}" "${B}" ${MESON_CROSS_FILE} ${EXTRA_OEMESON}; then
cat ${B}/meson-logs/meson-log.txt
bbfatal_log meson failed
fi
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list