aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-01-07 16:37:03 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 17:45:41 +0000
commit1239157805a4c363da853de6db05c53083b01189 (patch)
tree9478c948b20e01aad206467b65ff4ac2fa67ec09
parent8596f871ef834a38e3375443f7eb08e43816347a (diff)
downloadopenembedded-core-contrib-1239157805a4c363da853de6db05c53083b01189.tar.gz
meson: write correct host endian into SDK cross file
Meson doesn't ignore this but will emit a warning, so write the correct value. Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb
index 55c57775e0..1549357a55 100644
--- a/meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb
+++ b/meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb
@@ -1,13 +1,20 @@
include meson.inc
inherit nativesdk
+inherit siteinfo
SRC_URI += "file://meson-setup.py \
file://meson-wrapper"
-# both are required but not used by meson
-MESON_SDK_ENDIAN = "bogus-endian"
-MESON_TARGET_ENDIAN = "bogus-endian"
+def meson_endian(prefix, d):
+ arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+ sitedata = siteinfo_data_for_machine(arch, os, d)
+ if "endian-little" in sitedata:
+ return "little"
+ elif "endian-big" in sitedata:
+ return "big"
+ else:
+ bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}"
MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}"
@@ -44,7 +51,7 @@ cpp_link_args = @LDFLAGS
system = '${SDK_OS}'
cpu_family = '${SDK_ARCH}'
cpu = '${SDK_ARCH}'
-endian = '${MESON_SDK_ENDIAN}'
+endian = '${@meson_endian("SDK", d)}'
EOF
install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d