[oe-commits] [openembedded-core] 67/74: meson: map the system property in the cross file

git at git.openembedded.org git at git.openembedded.org
Sat Dec 28 14:33:00 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit fda58d7d97d6b3c5155f452d11a499c94fb30f37
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Dec 20 14:57:35 2019 +0000

    meson: map the system property in the cross file
    
    We can't just use HOST_OS, as in meta-mingw SDKs that is 'mingw32' but Meson
    expects 'windows'.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/classes/meson.bbclass | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index e1a13bb..71f9de1 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -62,6 +62,15 @@ def meson_cpu_family(var, d):
     else:
         return arch
 
+# Map our OS values to what Meson expects:
+# https://mesonbuild.com/Reference-tables.html#operating-system-names
+def meson_operating_system(var, d):
+    os = d.getVar(var)
+    if "mingw" in os:
+        return "windows"
+    else:
+        return os
+
 def meson_endian(prefix, d):
     arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
     sitedata = siteinfo_data_for_machine(arch, os, d)
@@ -97,13 +106,13 @@ cpp_link_args = ${@meson_array('LDFLAGS', d)}
 gtkdoc_exe_wrapper = '${B}/gtkdoc-qemuwrapper'
 
 [host_machine]
-system = '${HOST_OS}'
+system = '${@meson_operating_system('HOST_OS', d)}'
 cpu_family = '${@meson_cpu_family('HOST_ARCH', d)}'
 cpu = '${HOST_ARCH}'
 endian = '${@meson_endian('HOST', d)}'
 
 [target_machine]
-system = '${TARGET_OS}'
+system = '${@meson_operating_system('TARGET_OS', d)}'
 cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'
 cpu = '${TARGET_ARCH}'
 endian = '${@meson_endian('TARGET', d)}'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list