]> code.ossystems Code Review - openembedded-core.git/commitdiff
nativesdk-meson: correctly set cpu_family
authorAlexander Kanavin <alex.kanavin@gmail.com>
Thu, 13 May 2021 20:56:20 +0000 (22:56 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 14 May 2021 06:57:21 +0000 (07:57 +0100)
This was a warning before, but with the patch
that turns it into an error, it needs to be properly addressed.

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/meson/nativesdk-meson_0.58.0.bb

index 8778cab1247d0580090c5493870db95d2b4ab221..74e1a7104aa508e629abafe1a8955e6f21f93653 100644 (file)
@@ -1,21 +1,11 @@
 include meson.inc
 
-inherit siteinfo
+inherit meson-routines
 inherit nativesdk
 
 SRC_URI += "file://meson-setup.py \
             file://meson-wrapper"
 
-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))
-
 # The cross file logic is similar but not identical to that in meson.bbclass,
 # since it's generating for an SDK rather than a cross-compile. Important
 # differences are:
@@ -44,7 +34,7 @@ sys_root = @OECORE_TARGET_SYSROOT
 
 [host_machine]
 system = '${SDK_OS}'
-cpu_family = '${SDK_ARCH}'
+cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}'
 cpu = '${SDK_ARCH}'
 endian = '${@meson_endian("SDK", d)}'
 EOF