From patchwork Fri Dec 20 17:15:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 182313 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp800387ilf; Fri, 20 Dec 2019 09:15:23 -0800 (PST) X-Google-Smtp-Source: APXvYqzJG8Ubn2RS168Qdt+DP3CPi5CpkuBigqHrpoZSmRUUz2b0IfiHucUVDH755ri2JO4B/seA X-Received: by 2002:a17:90a:3244:: with SMTP id k62mr4606465pjb.43.1576862123735; Fri, 20 Dec 2019 09:15:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576862123; cv=none; d=google.com; s=arc-20160816; b=XzhUDtF7+xVK53C0i5ADmLyXCuqBqu/0GTOXqr3022zVAhSEL5Olsyjfp9rDD1/JCN gcW/Ewg515yv1aDEIH80Bdh5KDI4TccSFHxXtWTHxkRkFQbv29TwCeH/9l5ctNeMD0gB zIebt70V3gf2+maboR/yplsV6fu51UNh+ph6Sn+rbfGzR8ioxk5AT3xmnu4YyVn+CvbG MDuR0qqbfwI+G73ayF3hA7bQHqrAgeXI0gbb47Wjj9DfmNpmiE1lSYQKgN/i9RUfqXnz JiR0VZAf+GATEpNyAVs6YfpnjfVMKMYDs/YeS3skiK820Jo5gmCeDPcs2ah9PshI5Y9A sU9g== 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=1fiJpvu8wjmxjIXlo2zZaPiIkdt1cDyY9ZKdPzzDvZQ=; b=fc5tOGLJARB0rKl1aje9YhWWieY9ZbZ4Erl/mEoFAj0hVWWYFG6EcWV8t7XFSYVV/b 4U4us/gu0Blq9Xg2YetQ2s1MjbGoWmRb951x8xkH8lPLFxjCwczQIADYWrlE44RZQ90e VEyEPQkPi8T3HZwgJ6tgNQd7au7Ra10uWbRr94S3ISEuHSt4BsEWAmmccTSwINnFjbQU jemonksa5FGkKcD5XERM8N0eMuEfNFiUDKyguP0+Z7KRdO6jutUKL05wcDfC2dS4hrgj 9D4F5KA5LxmQtOARMWZ+A/Bz6jNbkKSCI+uy0W7NXEMCwOi9T8iflIF8hSV533kKfFQV qmQA== 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=QYfbLN9l; 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 62si9861502pgf.251.2019.12.20.09.15.23; Fri, 20 Dec 2019 09:15:23 -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=QYfbLN9l; 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 069907FD3B; Fri, 20 Dec 2019 17:15:19 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mail.openembedded.org (Postfix) with ESMTP id AE3B67FCBA for ; Fri, 20 Dec 2019 17:15:16 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id p17so10004056wma.1 for ; Fri, 20 Dec 2019 09:15:17 -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=coTMf/v+3cFSczdU+0UgqQjT9WqGu1g6TV4p5cDZY3I=; b=QYfbLN9l5gmbl0H1CzuT5pJhuG/Z1KLyp8ERwgBtFr2EldBJfoWLFvMp/IbKllX9j8 tP0BRY7TPVa9bcWNj2wi4EXbRPbnvL//tRVr/3qTTFSjMH11OPnvXsmb+4CaKRh3JxQC KFp/DCwU6znOrcWcvYAPLgCVZ2a48IE8F3Glhm0+lYe9zMCuq6L4BiI8l1ymhouCXFDk 9HZyu2duk2UaQFadEIMY0Tu+7faYYMG7ZqS038NluKLqSrFpBgO6SAj8iJPpF3iPZrOh gGkYU4F72O1dI0n2kMq7T2E/Uz+lzrcfT2+M5jQ/nYyYsImkE1LA2ZhT4fC/8Xp0JDsS Zi2A== 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=coTMf/v+3cFSczdU+0UgqQjT9WqGu1g6TV4p5cDZY3I=; b=L4QrV6QnIXvVaFpljZWXr992J8eqlxATYz4XujyYNFq72ibj3L8BRuxCkSWr8IyHyf Muo5YVeaRTSain8ETTvJdARXqtuM5COdvUVZk9Eu2wqm1c8R4wGq3q4eqq1Wh3WoRO91 TmYD5bAkLVNN+7BIfKZTBQm09FJuMn3AJkY2wcb5Y6RlRUtqIFngf18vS1t0lec1SELI EksneH9J+zaJRzE3qK7wdIukKnS4pN5PS5ouHQOgT/WNezT8WJ9TjpQD1LfHcGXLriDi 9JCTQmwb8n1cZ9JCKeMf05r8ItNcmmjCHn4GAHD+ar2KktzvKLT1h+etUZ2zdb7zwfkX SyTQ== X-Gm-Message-State: APjAAAVPuP/uYTCgfMwVcdlMY91ZB4YVPpLhqFcpjPrKz4AnNKP5Mhm9 xZi89wUOQaAYaHiyh+BNL4AjDxtwYao= X-Received: by 2002:a1c:1bc3:: with SMTP id b186mr17607482wmb.79.1576862116868; Fri, 20 Dec 2019 09:15:16 -0800 (PST) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id p18sm2487469wmg.4.2019.12.20.09.15.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 09:15:15 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 20 Dec 2019 17:15:13 +0000 Message-Id: <20191220171513.1140-1-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [OE-core] [PATCH] 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 | 14 ++++++++++++-- 1 file changed, 12 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..9e7ce42a701 100644 --- a/meta/classes/meson.bbclass +++ b/meta/classes/meson.bbclass @@ -62,6 +62,16 @@ 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): + import re + 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 +107,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)}'