From patchwork Fri Dec 20 17:16:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 182314 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp802031ilf; Fri, 20 Dec 2019 09:16:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxg7xZwnfW5rWzv/yexjQpMDY4iQ953NLJyzT2YjRhL18gBjfDJnnvRUsFe7+L6/vZ0B6AJ X-Received: by 2002:aa7:9afb:: with SMTP id y27mr17104534pfp.91.1576862208332; Fri, 20 Dec 2019 09:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576862208; cv=none; d=google.com; s=arc-20160816; b=NIYHLM0XED9AvN1TsT1u7BugXrdqlHoker32jNtrRSTh8ciHTyx0AHPGjJ6sraWaQt qKwHe4ryLGIsHn+x0H6nJKaDXDgw9E7l0zY9z6HOIpsrwK1gx0sIK+OEsiOP8o2h5oMK IS4LlsxLna+LCxZCZOxJbYXk0RYkI1Y4QxafKfheM/BS0wBINDh+tcdgv8OZzL3t6fxo Zl9pYenxm72g0nohE/aRFRHROEHNRf4qm/7ietHTic/fsWyqg7Ner9IvTFLaymMJd/oD 7pR/5k0HNXtSKSLvD2JzjnrQ8PHQN9UE2rJ1H0IUQ6OHSuly9aA5hUBEY/5WXWTnHTZ1 Mpgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:dkim-signature:delivered-to; bh=cJJDh/ItgQRFawrgi3w/gQJ4/j2nG8yEHXPBVJ87/O4=; b=IfpmuDWnhH684U/p2nXs+xSaT9Frkg5mX5fGEnfiVt6tnJb+hSIYKrk9A1ubxduQgA KpnP44a+5oIau2mWhsjAlBzsSsRh0qTKFYPuShZ4Su1brkgTfagnJTWV1heLG7toUZW9 gelWWdUp6ffT0W1WQFouGF5d0TfHMISCp+P9Qp1k6mAHsqpUAiRiDyrkz9LDwIrMIb2H eXO74zsqcdPi99Sc1pSB4JGQMQSugKrGYDS9X73wG463sp1qzTKUNb8aIRGykXphrIUD ULAHwZJcSFsRepmCNKM4wDNcEOP4Pd8C6xrRlR4uc2Icol3MtX1MZTkXr+UNP7UJiWGg nEjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=ZcT9ymfD; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id x9si9464350plo.369.2019.12.20.09.16.48; Fri, 20 Dec 2019 09:16:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=ZcT9ymfD; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from ec2-34-214-78-129.us-west-2.compute.amazonaws.com (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 0AA427FD3D; Fri, 20 Dec 2019 17:16:46 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mail.openembedded.org (Postfix) with ESMTP id A94B97FD06 for ; Fri, 20 Dec 2019 17:16:44 +0000 (UTC) Received: by mail-pf1-f180.google.com with SMTP id 195so4676207pfw.11 for ; Fri, 20 Dec 2019 09:16:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=bBRU6ZyKwVtTaRdc7dXO2W/PocL8RDJhhVSAH8GDjRg=; b=ZcT9ymfD603OQTqI2Lw4w3FNBwgl/MyawRMn4+Lphbqg0sz769YE6Jj/bAtjAd7nBp Z6EDm9hu+pjP3Q85cX8pshQ61q3CJ0bE1l/0MyErzF18OA3zOGEj3wKiQzjZ2wsksrSq r9gGiSafuqxh9MYxOBAMwXmzSTNfmhfJhJfxJkOfc/EcC1fZdTxmojktfUoXU1AoFIXG +jkB9hGIG0BlTDhN1gt7ClvafCQAk9fZEiJdftV4kmihg6q1lQ8h0EAuy7b7ybuRXj/L 8RQYqr969fyU9K5FXiv3MtCPdZ98xkXQDgZUcWtKML6EJ82pdlAFxzlvSRa1PYyHn3hL 8eQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=bBRU6ZyKwVtTaRdc7dXO2W/PocL8RDJhhVSAH8GDjRg=; b=MsYo29u67aHMSmtY7YE+gJMEU/8U3MRMVxd9osSNOP3xBav0J3KW3GveBsA/nrQbrp A+sFYtzoMM/cq2BJCyH4olqebdVImGV61Lhoh+jI6NAhMN128qx7jnQlICN5HIbWgHHD R3DonvAMk6wkcM+gFajPSzFK7/sx1r5PxOMnSapmO5usn91eMHtH+JCxxML/si0LVdDp aNYLDNye+y6gfGu1F8lEtzwlUi1G2SwI1kxDBStauC3C6S74eHVGJZ2C6p3mJBbt+hr3 Hq1ZiXzcQNPkZmcLDhRNzhKunhSwfzGYDfkdlpmKTjAMDUE6mZHxBfLpkaBx042+h0l1 dZqA== X-Gm-Message-State: APjAAAVqqQVmRBsX0PQgvvVuAOVdjtxSjgnidJ77u814FxN8Vr2gm2+l GyRfYBgCdrDS8byiodZzq7oUI0UWoq8= X-Received: by 2002:a62:f251:: with SMTP id y17mr17674167pfl.204.1576862205710; Fri, 20 Dec 2019 09:16:45 -0800 (PST) Received: from flashheart.ger.corp.intel.com ([192.55.55.43]) by smtp.gmail.com with ESMTPSA id z30sm14031004pff.131.2019.12.20.09.16.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 09:16:45 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 20 Dec 2019 17:16:36 +0000 Message-Id: <20191220171636.1632-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH v2] meson: map the system property in the cross file X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org We can't just use HOST_OS, as in meta-mingw SDKs that is 'mingw32' but Meson expects 'windows'. Signed-off-by: Ross Burton --- meta/classes/meson.bbclass | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass index e1a13bbbf74..71f9de1a570 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)}'