From patchwork Mon Oct 7 10:11:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 175319 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp4070778ill; Mon, 7 Oct 2019 03:12:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXG6ylFEfsNWx1PdVopUH33QeK9mZN+UIU29AJrci3oxBDEIZocExSHt7MOXG8F/lqnIKD X-Received: by 2002:a63:91:: with SMTP id 139mr8272073pga.71.1570443141331; Mon, 07 Oct 2019 03:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570443141; cv=none; d=google.com; s=arc-20160816; b=yfQ/CUFhToRr2HjoGASis7likOzgpBhy6But8adhDI3Ke6pA4oU4JQEphVcD+sp9PN rz/RIPImYBbSOJt+Zp2dT8PaV49yX/qn6T54W+lukeJFu9f0hv7A8XubH/X8VZpavWcK UOAZ71co373nUfw9PO9podRIWBwAvBmNHW3SHAJYfPnVASMrPkvtnc1CrZYFyClqCl5o 0pc/mv9vgcv4q8xeZJMRDJ7qjy9ibpMOdeqCQeviVk7S8Jt0tJqceZC9yb2IdNeBkjU9 hXgyLArC7DF5xnw4YfKF4AzIGjE0SB/79gOOT2oGpeod9Sja+ty1O3dB8t6B3if+KgQ5 osdw== 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:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to; bh=DUvOEoQQ/ZrxTUXNhVvFlVBEIUhFzwxKPEPk/Ow5uCk=; b=KbbAV7tA2Kc4w94Sf3y/l6NKP50vqbAb5QF5OSj4XbEHZseMcM6uCxbXWdr0kp+9sb LqjAwgjo16QAxbZhG06pe191BU0BiB3MCp8F4g3yQyANwpvhDUiXJt+e12rzzgFtp4oB l0GLb6ACFdG4gCW/K4xXOkRXSnaQjGKzUD7SrzVAKAw2BBlTn4+QJotY/A+lghMp4mDJ A01jYeuGJu4C2cz+LgV1aVT1pBcrnN64gm5WS3gcvLc8NUpZzhrRMl2WDRV6nnNZ6+Jw 2uYBzbt28xrupOF3I7yKpvhMCWo7kqlHRXA8vd9tr+WYqtsTwn5/r//HA0sA27gGy7we usuQ== 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=syLUEaDp; 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 i13si15479240pfq.54.2019.10.07.03.12.21; Mon, 07 Oct 2019 03:12:21 -0700 (PDT) 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=syLUEaDp; 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 C319D7D729; Mon, 7 Oct 2019 10:12:17 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mail.openembedded.org (Postfix) with ESMTP id 1556D7D537 for ; Mon, 7 Oct 2019 10:11:44 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id r5so14479940wrm.12 for ; Mon, 07 Oct 2019 03:11:46 -0700 (PDT) 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:in-reply-to:references:mime-version :content-transfer-encoding; bh=ADPa29YN6zvZTfFXViCfZh9sYv3PBPpBd9lwFisx1dw=; b=syLUEaDpRjN2rrD2JuOp0Xd83WW/8YNjx5Hy/oSWwxZ93BvXMpwKEtcmo6TZEKhJhE 7j73sZ1LhFa6DuUNzCGKvFXnB9h9oKHAx2eVWaEbyD5SQ+dO5Ix+1I4NGMTdnws5OPMu 7mp13Os0pSE9Kn6NlqXc7Tpi3pQVYM8EmPOiyWNj+FdEjcACSlrsyCqoAvJ5AKPuuPhs P9a3o0b3MTkB6+F1HNqvBxyeOZQvRg83mZLkaBciuse05VODAXLIl0iDMJByc7XIqHF1 7HSGYjEzWuI+EZIgp+I9duATVo8n56eXYOfqnr9wCCXbZ4O4i+HK801j3saSm/WJxh5H xxZg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ADPa29YN6zvZTfFXViCfZh9sYv3PBPpBd9lwFisx1dw=; b=ZL7S3327zPCXiZHusy1OPee+MQT82vSS+MNlpNz1AeAjw8ncvoMkadUj8072Tk8mO+ o45YZENN4r8d6YCtLh32xLaatQwKs5zQZA5l4SH40NrCzt7ORBPbQrwycol1c1Qss6E/ ykAO8Laq+4DFz/NYskPGnyEgcEW4aORHNn1wyB1HrPVRVCM4Q6YmbTcrywBAaN7ph7ZD tU7+goDkPVVzaVoKVTiOLqmL8LjtBIplLCZPmWhB7bmKnuh95J3I3ArDah/mJHn9uD30 IYunbD0fb3r3e1kG1QfbGKwnqKDyJQgPsQtpoJZ/XDnDK68y3VSJih1+1fTIk5cbdANX YUAg== X-Gm-Message-State: APjAAAVBRJ/O1hNWT1qZcpjJ07ENeYBLSm4RY7cVXCH1DUWCEyzecBKt uwqcxZ5fG9s3+Ddtep6vAlWs5y1tMDw= X-Received: by 2002:a5d:6b49:: with SMTP id x9mr11025511wrw.80.1570443105278; Mon, 07 Oct 2019 03:11:45 -0700 (PDT) Received: from flashheart.burtonini.com (35.106.2.81.in-addr.arpa. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id q22sm13823289wmj.31.2019.10.07.03.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2019 03:11:44 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 7 Oct 2019 11:11:38 +0100 Message-Id: <20191007101138.3722-3-ross.burton@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191007101138.3722-1-ross.burton@intel.com> References: <20191007101138.3722-1-ross.burton@intel.com> MIME-Version: 1.0 Subject: [OE-core] [PATCH 3/3] meson: fix cross detection 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 Meson 0.51 onwards detects if a build is cross by whether the host and build machines match. However this doesn't work in a number of cross compilation cases: notably where host is Windows but build is Linux, but also the common OpenEmbedded case where the host and build machine are both x86-64. Previously we'd patched this to instead look at whether an executable wrapper is needed: our cross files always set this to true so all cross builds would be identified as cross. However, this breaks build on the target as without a cross file the early cross build detection fails as we don't yet know if an exe wrapper is needed. The neater solution is to simply go back to the older logic: a cross build has cross files defined. [ YOCTO #13571 ] Signed-off-by: Ross Burton --- meta/recipes-devtools/meson/meson.inc | 2 +- ...efined-by-the-existance-of-a-cross-f.patch | 28 +++++++++++++++++++ ...onment.py-do-not-determine-whether-a.patch | 28 ------------------- 3 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 meta/recipes-devtools/meson/meson/0001-Cross-build-is-defined-by-the-existance-of-a-cross-f.patch delete mode 100644 meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch -- 2.20.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index d365bcd8a35..8219d87c741 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc @@ -15,7 +15,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://disable-rpath-handling.patch \ file://cross-prop-default.patch \ file://0001-environment.py-detect-windows-also-if-the-system-str.patch \ - file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ + file://0001-Cross-build-is-defined-by-the-existance-of-a-cross-f.patch \ file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ file://vala-cross-compile.patch \ diff --git a/meta/recipes-devtools/meson/meson/0001-Cross-build-is-defined-by-the-existance-of-a-cross-f.patch b/meta/recipes-devtools/meson/meson/0001-Cross-build-is-defined-by-the-existance-of-a-cross-f.patch new file mode 100644 index 00000000000..a5dbb81b088 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-Cross-build-is-defined-by-the-existance-of-a-cross-f.patch @@ -0,0 +1,28 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 0b4d1e8afd5428a495f8624ee061f63977b4c268 Mon Sep 17 00:00:00 2001 +From: Jussi Pakkanen +Date: Sun, 6 Oct 2019 15:17:32 +0300 +Subject: [PATCH] Cross build is defined by the existance of a cross file. + +--- + mesonbuild/environment.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py +index e5d041b4..03c65688 100644 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -611,7 +611,7 @@ class Environment: + self.first_invocation = True + + def is_cross_build(self) -> bool: +- return not self.machines.matches_build_machine(MachineChoice.HOST) ++ return self.coredata.is_cross_build() + + def dump_coredata(self): + return coredata.save(self.coredata, self.get_build_dir()) +-- +2.20.1 + diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch deleted file mode 100644 index 8cb11879f4d..00000000000 --- a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch +++ /dev/null @@ -1,28 +0,0 @@ -From ec9c4a22424a5d55fcf213a55d03f096ec24bcae Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Mon, 25 Mar 2019 18:18:33 +0100 -Subject: [PATCH] mesonbuild/environment.py: do not determine whether a build - is cross by comparing architectures - -This can, and does, go wrong when our host architecture is same as the target one(e.g. x86_64). - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - mesonbuild/environment.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index 84a7596..9a029f4 100644 ---- a/mesonbuild/environment.py -+++ b/mesonbuild/environment.py -@@ -520,7 +520,7 @@ class Environment: - self.first_invocation = True - - def is_cross_build(self) -> bool: -- return not self.machines.matches_build_machine(MachineChoice.HOST) -+ return self.need_exe_wrapper() - - def dump_coredata(self): - return coredata.save(self.coredata, self.get_build_dir())