From patchwork Tue Feb 22 03:52:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4004 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6EEBEC433F5 for ; Tue, 22 Feb 2022 03:52:48 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.8750.1645501967849671087 for ; Mon, 21 Feb 2022 19:52:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=sKodxMPS; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 03FF35C019D for ; Mon, 21 Feb 2022 22:52:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Feb 2022 22:52:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=9YF2XHu479vEOQOlsEApPHQYBQthnO TXvFIf0xKwTTk=; b=sKodxMPSOtCwGm3jMwS/CiIG2rsqegl6jOOgANRWQt2og5 zOyd4gfmMdEv8/Nazmqyp+mXijmmJbQBLs50EKVGuj1qQP4V+135mVFkZth3BYSm O47e+zahqXYdrF5R36vRFLtubgmcff4G7N4L8A2NQGB2b6k3swIZHunroqJhXTBX MsYuPQvfVoQ1WEtGLNkFcylKi2Q0luIJnuScs02QiCZgxRZlO3OQY5kuExNhi8dH OCWYdGeq8WCYyRDZkphywgrt8XbFnvJF7OGd8+xkHeKEu2YBqD9DLS9e5EGXjSoC X7m+okSsvQFcducuF29Tgnxl2F17+kYe6k6nKohA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9YF2XH u479vEOQOlsEApPHQYBQthnOTXvFIf0xKwTTk=; b=IoyJPxrxmZWYUa4AE4yQbx FssQZDRbNmKVI9smo9AwRnIWwdY2Uy2Hjp5peZVNy7RUThoXAiSI1BQJCU2TrT/A PBbHINLPGL5H5YA+tctQG8DIFU6OnxEnn41DzWanuedfH6RNY3+B3efe7SnA0sgm QML8S3Kb1kV+RbfHZ9wlcKyjsBmFt1mgB6Nf53pakatQmJ2CTZZzX+s/suATs+jT tZfxCgGeB/uvEjys6YwUvaccpQoRY3H0fZtptReL2UWQvi3ZkQpH8A74aZJ86WP8 gBQsOZDQVt3yLpGK/bISaXwmJP5tWSN+QX57aI5E+Z2qGcdzVIC+Dhc8VCs4LM3Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:45 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 1/8] rust: Migrate arch_to_rust_target_arch() to rust-common class Date: Tue, 22 Feb 2022 14:22:27 +1030 Message-Id: <20220222035234.463162-2-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162115 This will allow us to use it elsewhere for architecture name translation. This move is motivated by powerpc64le support. Signed-off-by: Andrew Jeffery --- meta/classes/rust-common.bbclass | 16 ++++++++++++++++ meta/recipes-devtools/rust/rust-common.inc | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index 98d65970e8c0..2f2a31867ad0 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -1,5 +1,21 @@ inherit python3native +# Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something +# rust's internals won't choke on. +def arch_to_rust_target_arch(arch): + if arch == "i586" or arch == "i686": + return "x86" + elif arch == "mipsel": + return "mips" + elif arch == "mip64sel": + return "mips64" + elif arch == "armv7": + return "arm" + elif arch == "powerpc64le": + return "powerpc64" + else: + return arch + # Common variables used by all Rust builds export rustlibdir = "${libdir}/rust" FILES:${PN} += "${rustlibdir}/*.so" diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index ceeee9786376..742933f1bd22 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -254,22 +254,6 @@ def sys_for(d, thing): def prefix_for(d, thing): return d.getVar('{}_PREFIX'.format(thing)) -# Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something -# rust's internals won't choke on. -def arch_to_rust_target_arch(arch): - if arch == "i586" or arch == "i686": - return "x86" - elif arch == "mipsel": - return "mips" - elif arch == "mip64sel": - return "mips64" - elif arch == "armv7": - return "arm" - elif arch == "powerpc64le": - return "powerpc64" - else: - return arch - # generates our target CPU value def llvm_cpu(d): cpu = d.getVar('PACKAGE_ARCH') From patchwork Tue Feb 22 03:52:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4005 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68532C433FE for ; Tue, 22 Feb 2022 03:52:50 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.8761.1645501969322530640 for ; Mon, 21 Feb 2022 19:52:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=IcmJ9Mxi; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A54585C0183 for ; Mon, 21 Feb 2022 22:52:48 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Feb 2022 22:52:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=v9xxZpHREzTfywtbVZhMBmie79KTrV +rWavI2EkcXW4=; b=IcmJ9Mxig7jib2P9lgLPN5kcbMYVOKEPH9jbkkRM+XToWU MTXt3Txr+nXISfSj6vIBRhQtmdH4Pew5m3OzRr1N5aYczot3Wvm3NmhQf2Hmrf7m Wf2+aVEF+XzZExzaxzBM19kJrC4WkTO19RLWyPGYnFQHi8wBRo4I05sDBKFDachl +xd64IdfVX/3hWe19CzX1tWSn0sOuOCYIs5XqYt35oK/u+vDOx8H2LkX41fTzjAN EaLPSqrFaW2MIpuE9RsJA1mbng8R3zYGqazYGLQzjW6dH3q9ZQkxyVpq9pIM3nV+ 2DZrcqUJx5N92Xw+yUaRSoxipFqmfVk363ArRhVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=v9xxZp HREzTfywtbVZhMBmie79KTrV+rWavI2EkcXW4=; b=fb1nfXFsgq6TLMZpFBhL57 fBC2ov1C/mtZEeJhVCTv9QAL2Ccd0aArdpZpdaOuC/bgaXcsemlZ7krEXmuQNBB5 HEhTihUsFdEPOcfJeAs3r1nJ+ylzSHZOlRCOqjoXydcLlQRktdcXtDCR2liLL94Y Xgo9bn+4jEkEIMFLhGhYVvAVtsHImIZSuxgnxt/5m7m5PThLjF9j6QZyk8nTTJwz VdadCQUyHpjcPP02PbJbKDFEFBaLPISyTRectPf2NlG5GkjNzBnqZjaDC77knE3l lYoE2djgTD/dNE+ABkPWwfGwEG2zxmEqHWq3ychM/+APXdzoJJqy+m9yuk+hJp7A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:47 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 2/8] rust: Rename arch_to_rust_target_arch() for generality Date: Tue, 22 Feb 2022 14:22:28 +1030 Message-Id: <20220222035234.463162-3-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162116 It's not just for translating TARGET names, but any of BUILD, HOST or TARGET. Signed-off-by: Andrew Jeffery --- meta/classes/rust-common.bbclass | 2 +- meta/recipes-devtools/rust/rust-common.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index 2f2a31867ad0..e50d606ce26f 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -2,7 +2,7 @@ inherit python3native # Convert a normal arch (HOST_ARCH, TARGET_ARCH, BUILD_ARCH, etc) to something # rust's internals won't choke on. -def arch_to_rust_target_arch(arch): +def arch_to_rust_arch(arch): if arch == "i586" or arch == "i686": return "x86" elif arch == "mipsel": diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index 742933f1bd22..c36d836fcf41 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -313,7 +313,7 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) - tspec['arch'] = arch_to_rust_target_arch(arch) + tspec['arch'] = arch_to_rust_arch(arch) tspec['os'] = "linux" if "musl" in tspec['llvm-target']: tspec['env'] = "musl" From patchwork Tue Feb 22 03:52:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4006 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 673DCC433EF for ; Tue, 22 Feb 2022 03:52:51 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.8752.1645501970765039930 for ; Mon, 21 Feb 2022 19:52:51 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=Cj7kqf+d; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1DCAB5C010E for ; Mon, 21 Feb 2022 22:52:50 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 21 Feb 2022 22:52:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=miJN5OFLrY440gU7TyKuAbytf/Gr2C 0onaoTqg5no1E=; b=Cj7kqf+dcn/lKguZLtS5Uvm8uztv4MuxM36ogLg7ug8wT8 pwGB2H5Zinh1XLl1j0/Lq/e6adi8LzGsbTAguMR88Batm6nJpITy//zW1O7SBJT3 /lfSH5WUgUDR5Z+Cq/Qn/lSLh0f/qu6P29U82/GzwfycdQE8R6bkhhYS2dB2nith mM0mT6KUOJoEGOMYY4C0qWBUmR1gz6liQ7Y7bROUjdBenorNAn8b7T/vIfnvJX74 wuIRhCWIXAZDMin7rzpTngzSWsKqXJrQ0wytVZ879+oxNgtSZiDK2uKkJ6FzuP1X E/JO4taIfp9Uz4kwNVJV/q1RqoSTHymm3oQquJ7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=miJN5O FLrY440gU7TyKuAbytf/Gr2C0onaoTqg5no1E=; b=kIh073V33hbF/PVULNxr94 6VzzzuB5n4yxFUnk2fwv86pHA2+ttpr4jQx0xEHGDzM6jW+dKxevzLdIHGJnE/1h QyNDdKdMNiMNuv6LUL7ynrENGec+v9OJIORkgWZJ7xWBznUtVroHwqPGQu5xCGOC 6ccFQeb2aahJA1c9g/hD7SsuN4UKM9W1ibUu7GrB8kFgxL6MTv/tlaWHqhWOBRzR uCdBzPyypNc7xbaZZ5mLUn6gXExG0Dut2WrKSW1QXlv7mcRKX3VlTIndGQTECeWv v3YYPAFb8pXdx2MOTamRLkkvc/4Jq8LNHMmKw5G0hdTtkCOUxyAipsuzRW/ZXczA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:48 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 3/8] rust: Handle Power arch variants in arch_to_rust_arch() Date: Tue, 22 Feb 2022 14:22:29 +1030 Message-Id: <20220222035234.463162-4-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162117 Modern Power ecosystems can be either BE or LE, so handle both. Further, rust understands these as "powerpc64" and "powerpc64le" respectively. Signed-off-by: Andrew Jeffery --- meta/classes/rust-common.bbclass | 4 +++- meta/recipes-devtools/rust/rust-common.inc | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index e50d606ce26f..3c7d133f0445 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -11,8 +11,10 @@ def arch_to_rust_arch(arch): return "mips64" elif arch == "armv7": return "arm" - elif arch == "powerpc64le": + elif arch == "ppc64": return "powerpc64" + elif arch == "ppc64le": + return "powerpc64le" else: return arch diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index c36d836fcf41..4b758260d276 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -265,7 +265,8 @@ def llvm_cpu(d): trans['x86-64'] = "x86-64" trans['i686'] = "i686" trans['i586'] = "i586" - trans['powerpc'] = "powerpc" + trans['powerpc64'] = "powerpc" + trans['powerpc64le'] = "powerpc" trans['mips64'] = "mips64" trans['mips64el'] = "mips64" trans['riscv64'] = "generic-rv64" From patchwork Tue Feb 22 03:52:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4007 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68CC8C433EF for ; Tue, 22 Feb 2022 03:52:53 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.8753.1645501972273821763 for ; Mon, 21 Feb 2022 19:52:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=ih5Hlzxy; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 91B775C019D for ; Mon, 21 Feb 2022 22:52:51 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 21 Feb 2022 22:52:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=PdL20hwYIsFDNrMqxkcxkG0IXTgkR5 SFvySuUpSZRaM=; b=ih5HlzxyHiyUb9ygNxRxBVL/f1gX5yu5TXG9nRGvH5v9AO XGt8u0CskOQUhVnzkqnRno36hESP5ss2nIp6cxBAGmuePJyyVH26ePMgQuTCPVH7 VP0tGuNmSq6BPztrIu4NUGvrSuCovf89ui8pXzRR93w3AtnjYeJjkBAPPZOtNYhk Zr1EJFigmQM1G2u0D2AFHbU62JLBlwERWzXtOumBs8zXfsEV9DyGSFjUEXdrYRjx ei+ZYjN5sLeFoleicwc+pOiPlbr4Zz3yr+szUBMqtDMAKhTcx6V7cdQSoWM+SjGM WewBXcRZngibD84xw7QrCWEsSZcj7ldhZbJrBLbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=PdL20h wYIsFDNrMqxkcxkG0IXTgkR5SFvySuUpSZRaM=; b=FGBX9zzK1DJaRmlyEf+IPR 0keB/X+BRZJtRXhIs+p01GrDKUuNP1z2eSPhCOr1EHbokhLlWb7AOOU2UrePPE5e AjYFfu67SM7mh9LsjNhWRtUoAioZ/8oQIdRTnS7ggmqfawO0N61/rHq9w2EksDa9 6L2VEUUPbKZM3m+288/VsUSvCYwoNFfiX0HukBljGKcgqu+7DazWSyxR2TWnJgd7 QQ6B0MRQyJnjiut4uWcxyYAK/H2qEkdUHwyn6aV9KQkKC6qT2dBdDWmxxfO+pWT/ medWI54MtZRPiThwlTsNNO4sTPKHeFnoBydNCI+U6GWyFBb6vAVJ+scyv8IKTsQQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:50 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 4/8] rust: Consistently use RUST_{BUILD,HOST,TARGET}_{ARCH,SYS} Date: Tue, 22 Feb 2022 14:22:30 +1030 Message-Id: <20220222035234.463162-5-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162118 With achitecture name translation, the RUST_-prefixed variables and their unadorned equivalents may not be the same. Signed-off-by: Andrew Jeffery --- meta/classes/cargo.bbclass | 4 ++-- meta/classes/cargo_common.bbclass | 6 ++--- meta/classes/rust-common.bbclass | 2 +- meta/classes/rust.bbclass | 8 +++---- meta/recipes-devtools/rust/rust-common.inc | 10 ++++---- .../rust/rust-cross-canadian-common.inc | 6 ++--- .../rust/rust-cross-canadian.inc | 23 ++++++++++--------- meta/recipes-devtools/rust/rust-cross.inc | 2 +- meta/recipes-devtools/rust/rust.inc | 16 ++++++------- 9 files changed, 40 insertions(+), 37 deletions(-) diff --git a/meta/classes/cargo.bbclass b/meta/classes/cargo.bbclass index 0ca38143c0b3..1507ff0e4ca1 100644 --- a/meta/classes/cargo.bbclass +++ b/meta/classes/cargo.bbclass @@ -31,12 +31,12 @@ MANIFEST_PATH ??= "${S}/${CARGO_SRC_DIR}/Cargo.toml" RUSTFLAGS ??= "" BUILD_MODE = "${@['--release', ''][d.getVar('DEBUG_BUILD') == '1']}" -CARGO_BUILD_FLAGS = "-v --target ${HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" +CARGO_BUILD_FLAGS = "-v --target ${RUST_HOST_SYS} ${BUILD_MODE} --manifest-path=${MANIFEST_PATH}" # This is based on the content of CARGO_BUILD_FLAGS and generally will need to # change if CARGO_BUILD_FLAGS changes. BUILD_DIR = "${@['release', 'debug'][d.getVar('DEBUG_BUILD') == '1']}" -CARGO_TARGET_SUBDIR="${HOST_SYS}/${BUILD_DIR}" +CARGO_TARGET_SUBDIR="${RUST_HOST_SYS}/${BUILD_DIR}" oe_cargo_build () { export RUSTFLAGS="${RUSTFLAGS}" export RUST_TARGET_PATH="${RUST_TARGET_PATH}" diff --git a/meta/classes/cargo_common.bbclass b/meta/classes/cargo_common.bbclass index 90fad7541530..103240ce491e 100644 --- a/meta/classes/cargo_common.bbclass +++ b/meta/classes/cargo_common.bbclass @@ -69,15 +69,15 @@ cargo_common_do_configure () { cat <<- EOF >> ${CARGO_HOME}/config # HOST_SYS - [target.${HOST_SYS}] + [target.${RUST_HOST_SYS}] linker = "${CARGO_RUST_TARGET_CCLD}" EOF - if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then + if [ "${RUST_HOST_SYS}" != "${RUST_BUILD_SYS}" ]; then cat <<- EOF >> ${CARGO_HOME}/config # BUILD_SYS - [target.${BUILD_SYS}] + [target.${RUST_BUILD_SYS}] linker = "${RUST_BUILD_CCLD}" EOF fi diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index 3c7d133f0445..58ece01097c8 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -83,7 +83,7 @@ def rust_base_triple(d, thing): if thing == "TARGET" and target_is_armv7(d): arch = "armv7" else: - arch = d.getVar('{}_ARCH'.format(thing)) + arch = arch_to_rust_arch(d.getVar('{}_ARCH'.format(thing))) # All the Yocto targets are Linux and are 'unknown' vendor = "-unknown" diff --git a/meta/classes/rust.bbclass b/meta/classes/rust.bbclass index 5c8938d09fe5..bb1276215b0f 100644 --- a/meta/classes/rust.bbclass +++ b/meta/classes/rust.bbclass @@ -2,14 +2,14 @@ inherit rust-common RUSTC = "rustc" -RUSTC_ARCHFLAGS += "--target=${HOST_SYS} ${RUSTFLAGS}" +RUSTC_ARCHFLAGS += "--target=${RUST_HOST_SYS} ${RUSTFLAGS}" def rust_base_dep(d): # Taken from meta/classes/base.bbclass `base_dep_prepend` and modified to # use rust instead of gcc deps = "" if not d.getVar('INHIBIT_DEFAULT_RUST_DEPS'): - if (d.getVar('HOST_SYS') != d.getVar('BUILD_SYS')): + if (d.getVar('RUST_HOST_SYS') != d.getVar('RUST_BUILD_SYS')): deps += " virtual/${TARGET_PREFIX}rust ${RUSTLIB_DEP}" else: deps += " rust-native" @@ -37,9 +37,9 @@ HOST_CFLAGS ?= "${CFLAGS}" HOST_CXXFLAGS ?= "${CXXFLAGS}" HOST_CPPFLAGS ?= "${CPPFLAGS}" -rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib" +rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${RUST_HOST_SYS}/lib" # Native sysroot standard library path rustlib_src="${prefix}/lib/${rustlib_suffix}" # Host sysroot standard library path rustlib="${libdir}/${rustlib_suffix}" -rustlib:class-native="${libdir}/rustlib/${BUILD_SYS}/lib" +rustlib:class-native="${libdir}/rustlib/${RUST_BUILD_SYS}/lib" diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index 4b758260d276..8ba78b978708 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -249,14 +249,14 @@ TARGET_C_INT_WIDTH[riscv64] = "64" MAX_ATOMIC_WIDTH[riscv64] = "64" def sys_for(d, thing): - return d.getVar('{}_SYS'.format(thing)) + return d.getVar('RUST_{}_SYS'.format(thing)) def prefix_for(d, thing): return d.getVar('{}_PREFIX'.format(thing)) # generates our target CPU value def llvm_cpu(d): - cpu = d.getVar('PACKAGE_ARCH') + cpu = arch_to_rust_arch(d.getVar('PACKAGE_ARCH')) target = d.getVar('TRANSLATED_TARGET_ARCH') trans = {} @@ -298,6 +298,8 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): sys = sys_for(d, thing) prefix = prefix_for(d, thing) + arch = arch_to_rust_arch(arch) + if abi: arch_abi = "{}-{}".format(arch, abi) else: @@ -314,7 +316,7 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) - tspec['arch'] = arch_to_rust_arch(arch) + tspec['arch'] = arch tspec['os'] = "linux" if "musl" in tspec['llvm-target']: tspec['env'] = "musl" @@ -345,7 +347,7 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): python do_rust_gen_targets () { wd = d.getVar('WORKDIR') + '/targets/' - build_arch = d.getVar('BUILD_ARCH') + build_arch = d.getVar('RUST_BUILD_ARCH') rust_gen_target(d, 'BUILD', wd, "", "generic", build_arch) } diff --git a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc index 827000f7bd1e..72226da68926 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc @@ -30,7 +30,7 @@ python do_rust_gen_targets () { wd = d.getVar('WORKDIR') + '/targets/' rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) - rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) + rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('RUST_BUILD_ARCH')) } INHIBIT_DEFAULT_RUST_DEPS = "1" @@ -42,8 +42,8 @@ export WRAPPER_TARGET_LDFLAGS = "${TARGET_LDFLAGS}" export WRAPPER_TARGET_AR = "${TARGET_PREFIX}ar" python do_configure:prepend() { - targets = [d.getVar("TARGET_SYS", True), "{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))] - hosts = ["{}-unknown-linux-gnu".format(d.getVar("HOST_ARCH", True))] + targets = [d.getVar("RUST_TARGET_SYS", True), "{}-unknown-linux-gnu".format(d.getVar("RUST_HOST_ARCH", True))] + hosts = ["{}-unknown-linux-gnu".format(d.getVar("RUST_HOST_ARCH", True))] } INSANE_SKIP:${RUSTLIB_TARGET_PN} = "file-rdeps arch ldflags" diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc b/meta/recipes-devtools/rust/rust-cross-canadian.inc index 8bbbd61bdc39..ed8b720d51c2 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc @@ -22,7 +22,7 @@ do_install () { # The required structure is retained for simplicity. SYS_LIBDIR=$(dirname ${D}${libdir}) SYS_BINDIR=$(dirname ${D}${bindir}) - RUSTLIB_DIR=${SYS_LIBDIR}/${TARGET_SYS}/rustlib + RUSTLIB_DIR=${SYS_LIBDIR}/${RUST_TARGET_SYS}/rustlib install -d "${SYS_BINDIR}" cp build/${SNAPSHOT_BUILD_SYS}/stage2/bin/* ${SYS_BINDIR} @@ -31,8 +31,8 @@ do_install () { done install -d "${D}${libdir}" - cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${TARGET_SYS}/*.so ${SYS_LIBDIR} - cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${TARGET_SYS}/rustlib ${RUSTLIB_DIR} + cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${RUST_TARGET_SYS}/*.so ${SYS_LIBDIR} + cp -pRd build/${SNAPSHOT_BUILD_SYS}/stage2/lib/${RUST_TARGET_SYS}/rustlib ${RUSTLIB_DIR} for i in ${SYS_LIBDIR}/*.so; do chrpath -r "\$ORIGIN/../lib" ${i} @@ -41,7 +41,7 @@ do_install () { chrpath -d ${i} done - install -m 0644 "${WORKDIR}/targets/${TARGET_SYS}.json" "${RUSTLIB_DIR}" + install -m 0644 "${WORKDIR}/targets/${RUST_TARGET_SYS}.json" "${RUSTLIB_DIR}" SRC_DIR=${RUSTLIB_DIR}/src/rust install -d ${SRC_DIR}/src/llvm-project @@ -56,8 +56,9 @@ do_install () { ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh" cat <<- EOF > "${ENV_SETUP_SH}" - export RUSTFLAGS="--sysroot=\$OECORE_NATIVE_SYSROOT/usr -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT -L\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib/${TARGET_SYS}/lib" - export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib" + export RUSTFLAGS="--sysroot=\$OECORE_NATIVE_SYSROOT/usr -C + link-arg=--sysroot=\$OECORE_TARGET_SYSROOT -L\$OECORE_NATIVE_SYSROOT/usr/lib/${RUST_TARGET_SYS}/rustlib/${RUST_TARGET_SYS}/lib" + export RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${RUST_TARGET_SYS}/rustlib" EOF chown -R root.root ${D} @@ -65,14 +66,14 @@ do_install () { PKG_SYS_LIBDIR = "${SDKPATHNATIVE}/usr/lib" PKG_SYS_BINDIR = "${SDKPATHNATIVE}/usr/bin" -PKG_RUSTLIB_DIR = "${PKG_SYS_LIBDIR}/${TARGET_SYS}/rustlib" +PKG_RUSTLIB_DIR = "${PKG_SYS_LIBDIR}/${RUST_TARGET_SYS}/rustlib" FILES:${PN} = "${PKG_SYS_LIBDIR}/*.so ${PKG_SYS_BINDIR} ${base_prefix}/environment-setup.d" -FILES:${RUSTLIB_TARGET_PN} = "${PKG_RUSTLIB_DIR}/${TARGET_SYS} ${PKG_RUSTLIB_DIR}/${TARGET_SYS}.json" -FILES:${RUSTLIB_HOST_PN} = "${PKG_RUSTLIB_DIR}/${BUILD_ARCH}-unknown-linux-gnu" +FILES:${RUSTLIB_TARGET_PN} = "${PKG_RUSTLIB_DIR}/${RUST_TARGET_SYS} ${PKG_RUSTLIB_DIR}/${RUST_TARGET_SYS}.json" +FILES:${RUSTLIB_HOST_PN} = "${PKG_RUSTLIB_DIR}/${RUST_BUILD_ARCH}-unknown-linux-gnu" FILES:${RUSTLIB_SRC_PN} = "${PKG_RUSTLIB_DIR}/src" -SUMMARY:${RUSTLIB_TARGET_PN} = "Rust cross canadian libaries for ${TARGET_SYS}" -SUMMARY:${RUSTLIB_HOST_PN} = "Rust cross canadian libaries for ${HOST_SYS}" +SUMMARY:${RUSTLIB_TARGET_PN} = "Rust cross canadian libaries for ${RUST_TARGET_SYS}" +SUMMARY:${RUSTLIB_HOST_PN} = "Rust cross canadian libaries for ${RUST_HOST_SYS}" SUMMARY:${RUSTLIB_SRC_PN} = "Rust standard library sources for cross canadian toolchain" SUMMARY:${PN} = "Rust crost canadian compiler" diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc index a77f7d512233..f7eda58246fa 100644 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ b/meta/recipes-devtools/rust/rust-cross.inc @@ -64,7 +64,7 @@ do_compile () { do_install () { mkdir -p ${D}${prefix}/${base_libdir_native}/rustlib - cp ${WORKDIR}/targets/${TARGET_SYS}.json ${D}${prefix}/${base_libdir_native}/rustlib + cp ${WORKDIR}/targets/${RUST_TARGET_SYS}.json ${D}${prefix}/${base_libdir_native}/rustlib } rust_cross_sysroot_preprocess() { diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index 1d6f99afad31..cc0730e9cd2d 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc @@ -27,7 +27,7 @@ CARGO_DISABLE_BITBAKE_VENDORING = "1" # We can't use RUST_BUILD_SYS here because that may be "musl" if # TCLIBC="musl". Snapshots are always -unknown-linux-gnu -SNAPSHOT_BUILD_SYS = "${BUILD_ARCH}-unknown-linux-gnu" +SNAPSHOT_BUILD_SYS = "${RUST_BUILD_ARCH}-unknown-linux-gnu" setup_cargo_environment () { # The first step is to build bootstrap and some early stage tools, # these are build for the same target as the snapshot, e.g. @@ -48,8 +48,8 @@ do_rust_setup_snapshot () { # Some versions of rust (e.g. 1.18.0) tries to find cargo in stage0/bin/cargo # and fail without it there. - mkdir -p ${RUSTSRC}/build/${BUILD_SYS} - ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${BUILD_SYS}/stage0 + mkdir -p ${RUSTSRC}/build/${RUST_BUILD_SYS} + ln -sf ${WORKDIR}/rust-snapshot/ ${RUSTSRC}/build/${RUST_BUILD_SYS}/stage0 # Need to use uninative's loader if enabled/present since the library paths # are used internally by rust and result in symbol mismatches if we don't @@ -79,7 +79,7 @@ python do_configure() { config = configparser.RawConfigParser() # [target.ARCH-poky-linux] - target_section = "target.{}".format(d.getVar('TARGET_SYS', True)) + target_section = "target.{}".format(d.getVar('RUST_TARGET_SYS', True)) config.add_section(target_section) llvm_config = d.expand("${YOCTO_ALTERNATE_EXE_PATH}") @@ -124,11 +124,11 @@ python do_configure() { config.set("build", "vendor", e(True)) if not "targets" in locals(): - targets = [d.getVar("TARGET_SYS", True)] + targets = [d.getVar("RUST_TARGET_SYS", True)] config.set("build", "target", e(targets)) if not "hosts" in locals(): - hosts = [d.getVar("HOST_SYS", True)] + hosts = [d.getVar("RUST_HOST_SYS", True)] config.set("build", "host", e(hosts)) # We can't use BUILD_SYS since that is something the rust snapshot knows @@ -177,10 +177,10 @@ do_compile () { rust_do_install () { mkdir -p ${D}${bindir} - cp build/${HOST_SYS}/stage2/bin/* ${D}${bindir} + cp build/${RUST_HOST_SYS}/stage2/bin/* ${D}${bindir} mkdir -p ${D}${libdir}/rustlib - cp -pRd build/${HOST_SYS}/stage2/lib/* ${D}${libdir} + cp -pRd build/${RUST_HOST_SYS}/stage2/lib/* ${D}${libdir} # Remove absolute symlink so bitbake doesn't complain rm -f ${D}${libdir}/rustlib/src/rust } From patchwork Tue Feb 22 03:52:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4008 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 728D6C433F5 for ; Tue, 22 Feb 2022 03:52:54 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web09.8808.1645501973685192048 for ; Mon, 21 Feb 2022 19:52:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=w0+Q6S+P; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 0AB785C019A for ; Mon, 21 Feb 2022 22:52:53 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 21 Feb 2022 22:52:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=ZFa+wXhP3MbLHQw+z5VIGSTuI0Lxfk /Q+Vk8CWHbtWs=; b=w0+Q6S+PeHBaZnX9+NOmdQDwtad0ZvZG7WIXyPl9h9zVFH nGylt0H71/HgcBbAfbc6J7J+nZJxb1iLCxxJSeYR7jyIPW5y5kyHFuTSxA9M1XAP qodgesXPmWLkt09zwkhemBkM9yW2tkBYTY4KLt7x0TgdiK/OLd2fpZefFWEgzS51 Uy38lJLR/b7a2nF9ChAvP49eCh8BEAN2zY4MdYacC9tHgWfMOCfKoS9iZSrzsdYs mdTFPI3rx/2wLt9zx4CHpCeH4PKFnRGweX6EGSzi5X5iGhNHLGOqbNkjNYb7C2TG O7Blsoz+47gm31GN4LSAP8a0pBYw9/mmOm1xFSTg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ZFa+wX hP3MbLHQw+z5VIGSTuI0Lxfk/Q+Vk8CWHbtWs=; b=OWd0uDHA7qUR3NjDkhmI1M yJ2Oo+zixmiojkrXnEN5fB9ubCpgIV4fJUKPC4XbB2e1xAao/MC9xXsJK/gsfb9U mj+kl0epHtVbZ3zdChUcXnE0043DELP0EoxGvTm97ukKQst3QevU0RS1IRPyKbs1 fW74gSballArp/wgIMXvYZSYmPPRzsosQrw0cHpxwsWWUaSPr3RJ1FkYDAQKkO5z asKEBkD62dt/UhvXPsMphJld8CLfJj7A0uPmHAxHJVN2Cnj+i8DgTNVYkfVWJ0cG aa2YxMs85LQgcS+T9H71L1toawwrs5pCsHVNWAQ+Ptf9EXjvpiM+fU/AWmuD4kCw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:51 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 5/8] rust: libstd-rs: Install deps under {RUST_,}TARGET_SYS mismatch Date: Tue, 22 Feb 2022 14:22:31 +1030 Message-Id: <20220222035234.463162-6-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162119 The architecture mangling gets a bit too much here. Use globs to paper over the problem. Signed-off-by: Andrew Jeffery --- meta/recipes-devtools/rust/libstd-rs.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc index 987956344a24..e94fb8d5612e 100644 --- a/meta/recipes-devtools/rust/libstd-rs.inc +++ b/meta/recipes-devtools/rust/libstd-rs.inc @@ -35,6 +35,14 @@ do_install () { # With the incremental build support added in 1.24, the libstd deps directory also includes dependency # files that get installed. Those are really only needed to incrementally rebuild the libstd library # itself and don't need to be installed. - rm -f ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/*.d - cp ${B}/${TARGET_SYS}/${BUILD_DIR}/deps/* ${D}${rustlibdir} + # + # ${B} contains two directories, one for the target architecture and one for the build mode + # (e.g. "release"). In some cases (e.g. ARMv7) the build directory matches neither ${TARGET_SYS} + # (due to "unknown" vendor from rust_base_triple()) nor ${RUST_TARGET_SYS} (due to architecture + # name mangling in rust_base_triple()). Further, rust_base_triple() always assumes a linux + # OS, so exploit both "unknown" and "linux" in a triple glob to select the right source + # directory. + DEPS=${B}/*-unknown-linux-*/${BUILD_DIR}/deps + rm -f ${DEPS}/*.d + cp ${DEPS}/* ${D}${rustlibdir} } From patchwork Tue Feb 22 03:52:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4009 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DDA4C433F5 for ; Tue, 22 Feb 2022 03:52:56 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.8755.1645501975180031473 for ; Mon, 21 Feb 2022 19:52:55 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=I8rE1VMX; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7E1825C0183 for ; Mon, 21 Feb 2022 22:52:54 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 21 Feb 2022 22:52:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=iUnDvb1HjtKi5hq3R3j3ylK3mNhf4m Sxb58qkdLWlVw=; b=I8rE1VMX2OKoDGnQNF7pHSXztmWJML2V3vFV11hUoe8ftF VmMjeA4XpmC1U+v5+TR9pOha1g/YIBMF5QouNDBJ+2+44TVK6kgK0QDQu6uRxbPr WWZ6F+c5lfI+Nrxi//K4COsya9x1ZCcc1EA1/lx3y4JfoNw/fWoBJiqE7o+gBq1l wEkFj95qcs26VeDRQxrAphf6AKHjMzCP8VURBdeWH/k0VWCDM+PhNXRvC41n8+8Q SZig8bwjGikcPUpM6hrQGoVXlQUd+3s7QeLiIax7A/GM6OGB9ZMrWtt0OscoCZzN fg+KcjGCamEX8XLt6IUxi1l2iCxvhJHHOBEdf2Xw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=iUnDvb 1HjtKi5hq3R3j3ylK3mNhf4mSxb58qkdLWlVw=; b=Q/smWJM36q2LHQOWd8pr77 nt+rsETAhuGFxxc6npBYKMFLba/6dVvNnQAgKK1+fMwuQvZd697IznEfjcTFcO+g W08dQIps4Vb4TCUNdLV3NJkSDERaJ9DjotMPDgZ/wtmfWuDm8pJ8ktR6ZC/GOlQP G2xQUztNbS6EHR+OscVBbQh+Q6QXA8tfDaVRsXGHg0Wtm1aqqIwgdq2XeApd4ViU MA/bPzOwZD+29AfvOhsbJHcjkjqdSb+/tj+dVaipo8jo7O23/mdcsqoAvfIqA3Kj pvp5m9AVbF3lLymzLAjgyj6jniF7YyPMNWQwDvSsStl7mBevJi5qBsKoFiurXwMw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeejgfdvveehteekveeggeellefgleette ejffelffdvudduveeiffegteelvefhteenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:53 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 6/8] rust: Mitigate duplicate sections on matching architectures Date: Tue, 22 Feb 2022 14:22:32 +1030 Message-Id: <20220222035234.463162-7-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162120 This seemed to be an issue for Power once the arch mappings were fixed (by a patch later in this series). Signed-off-by: Andrew Jeffery --- meta/recipes-devtools/rust/rust.inc | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/meta/recipes-devtools/rust/rust.inc b/meta/recipes-devtools/rust/rust.inc index cc0730e9cd2d..fd934082bddf 100644 --- a/meta/recipes-devtools/rust/rust.inc +++ b/meta/recipes-devtools/rust/rust.inc @@ -35,8 +35,11 @@ setup_cargo_environment () { # Later stages are build for the native target (i.e. target.x86_64-linux) cargo_common_do_configure - printf '[target.%s]\n' "${SNAPSHOT_BUILD_SYS}" >> ${CARGO_HOME}/config - printf "linker = '%s'\n" "${RUST_BUILD_CCLD}" >> ${CARGO_HOME}/config + if [ ${SNAPSHOT_BUILD_SYS} != ${RUST_BUILD_SYS} ] + then + printf '[target.%s]\n' "${SNAPSHOT_BUILD_SYS}" >> ${CARGO_HOME}/config + printf "linker = '%s'\n" "${RUST_BUILD_CCLD}" >> ${CARGO_HOME}/config + fi } include rust-common.inc @@ -88,15 +91,16 @@ python do_configure() { config.set(target_section, "cxx", e(d.expand("${RUST_TARGET_CXX}"))) config.set(target_section, "cc", e(d.expand("${RUST_TARGET_CC}"))) - # If we don't do this rust-native will compile it's own llvm for BUILD. - # [target.${BUILD_ARCH}-unknown-linux-gnu] - target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) - config.add_section(target_section) + if (d.getVar('SNAPSHOT_BUILD_SYS') != d.getVar('RUST_TARGET_SYS')): + # If we don't do this rust-native will compile it's own llvm for BUILD. + # [target.${BUILD_ARCH}-unknown-linux-gnu] + target_section = "target.{}".format(d.getVar('SNAPSHOT_BUILD_SYS', True)) + config.add_section(target_section) - config.set(target_section, "llvm-config", e(llvm_config)) + config.set(target_section, "llvm-config", e(llvm_config)) - config.set(target_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) - config.set(target_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) + config.set(target_section, "cxx", e(d.expand("${RUST_BUILD_CXX}"))) + config.set(target_section, "cc", e(d.expand("${RUST_BUILD_CC}"))) # [rust] config.add_section("rust") From patchwork Tue Feb 22 03:52:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73049C433FE for ; Tue, 22 Feb 2022 03:52:57 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.8763.1645501976605642768 for ; Mon, 21 Feb 2022 19:52:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=jbQEiddA; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id EA6C55C010E for ; Mon, 21 Feb 2022 22:52:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Feb 2022 22:52:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=ynByY8P1DN/Zjsf5CH5Z9pp6IVOvLW 4pbIpsqlN9EU4=; b=jbQEiddAdQUBINYKE/xSgoD7yaoG02EH9H6N+Loz42b4XS qbQPWeblUg+PxyAyDZMgv3xkPKLFIo7LLmm2nCiLrf1BjIpqN4UCU8doreAgsk8s 4X92TzJx7MAVQyWQbXEDhyvSFwEGQx4yQOIKYbRU9WMahsjzGrfHetZT1Yclq3e5 pgYmtXHMh0/s4ercarByxeh1gVMh8ibRUYx/Hru31wpnLeJS2lCmgF3zNvm6Bm3h hdXT6JoGYI96Yd4xkEcNGjTE1LDuWsHmW1niA/U3KkKD5ZWt/dStc945/TZ8PSfI rE0nMfxlnXmJVM/CSQbdvvST6OxXLyaTrw9Erh7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=ynByY8 P1DN/Zjsf5CH5Z9pp6IVOvLW4pbIpsqlN9EU4=; b=W/WopTpMJILIqVSqRzPaJ5 x+zaSXvYTicO/9ICsLcwgLpaPUzmdHjly3bREvq5V8OWlCQ1nF386toBByobybH4 h3CWbUfPrFnIhDLX1cEoW3hP9OKYRha+XWXMpOWcD5n1jLJgFNDN65/atYTHTJfF XkZCaCrEmEs5NHxswvqEhzvf2gFdZmgtqQ09PzBl5boIl+dZk+k/hyrHKa3/xRO7 uRpfMAOeTPu6go6EtAsEddFBg3yXe4vfucR55Qwfuo6PdkDsIzp0d4blHUCfoj2t 9U4NIW6Olxeya3Umw+7y2gFCZ1aBbBeMfvi/p+IF1lJq4k3P5KPDq/DRrx53mfWw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeelffdvgfehleetlefgheefgeefhfduue ekgedvveffuddtudeivefftedvueduueenucffohhmrghinheprhhushhtqdhlrghnghdr ohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:54 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 7/8] rust: Add snapshot checksums for powerpc64le Date: Tue, 22 Feb 2022 14:22:33 +1030 Message-Id: <20220222035234.463162-8-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162121 Signed-off-by: Andrew Jeffery --- meta/recipes-devtools/rust/rust-snapshot.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/recipes-devtools/rust/rust-snapshot.inc b/meta/recipes-devtools/rust/rust-snapshot.inc index 74b558262f62..d6ffe92d07ee 100644 --- a/meta/recipes-devtools/rust/rust-snapshot.inc +++ b/meta/recipes-devtools/rust/rust-snapshot.inc @@ -14,6 +14,10 @@ SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "3618da916a0f92f241cf1d67d04bb578 SRC_URI[rustc-snapshot-aarch64.sha256sum] = "f26811e48d03c56c125de03d389e1ae7c6df36990953c1670c6a5676bc12d4cb" SRC_URI[cargo-snapshot-aarch64.sha256sum] = "6d11cd94618d80cda273eeeae7285980445f61a49ebacc616777b482a41cbf3f" +SRC_URI[rust-std-snapshot-powerpc64le.sha256sum] = "fc07eb3e9f3d227428cc5b53ca868e3de375bc198ce4dce7b87a9246e6fec81a" +SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "f43cb99109c3438c77c7079cdce4673df3320e310158e0b4d949c1babc4300fc" +SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e" + SRC_URI += " \ https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ From patchwork Tue Feb 22 03:52:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 4011 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 683B8C433F5 for ; Tue, 22 Feb 2022 03:52:59 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web09.8810.1645501978049869275 for ; Mon, 21 Feb 2022 19:52:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=conNEolJ; spf=pass (domain: aj.id.au, ip: 66.111.4.29, mailfrom: andrew@aj.id.au) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 63BD95C010E for ; Mon, 21 Feb 2022 22:52:57 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Feb 2022 22:52:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc :content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=7zhbA8vxaWnKtdp4NeABdSdo2wCRBU 9kSTvlVdGyVDk=; b=conNEolJmWT97JlK1WAUHa9qNC2mgUn1rez7iaPEDDoCwI dUVySL94MuPi7wqokrUVoDfP18rrBmwnS175TL12ZcvIk9gEhC+3tkGRYvmSw/DM /ic2wxzd2n8MVJ1af5QP83A/pC8/YV63nL88BLxrJWDSX9mHHb3Vunti2yQDmpk6 t+FgjhvCcOShzR0DQ/tmv22V8bdw/jX64Pc27mflxU+WhBltrH9PGYhKdSrPl0eP ax6ybe1tjvlcvg+JGcdHmXOf4RYN6TKwgUa//tbOAAkR5G7K+G64Kyugt9/ssAAC d+iJtBlIrQo2/R5JNi0RgalVlROT9NT7q35uU/kg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=7zhbA8 vxaWnKtdp4NeABdSdo2wCRBU9kSTvlVdGyVDk=; b=B+Hk7LhqaPECQNhpUIr0wA z6u35xJTpwFq1xnlfBOs9dFJgw66YJJQrtsmwdb4mfsU4mvdpPgdN7wmBlwpTPuN /3Rm6zpKyPkeg2sew+M1VDdvzbZW504G6v3iNIREKYyoF7mTtnLa7A0DW1VoLvR+ 4L9/6z49bdAK8D8FDVMiMZdu1/1Infajwbs9qIOCfLy9uPq57/0k8dOQrsbXERhr LcPmASkgANMZ9+ygzUiJqsp5DR9WaAgak/v48rZT0WZ6URzOYRuPE4buBGHLVlBc SQnjqGHsMCYvjdfFvfqlJQOAergv9NDtCvx35VCstuJUTaOPoJBxHzO4xqFyvR1A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrkeejgdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertd ertddtnecuhfhrohhmpeetnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghj rdhiugdrrghuqeenucggtffrrghtthgvrhhnpeelffdvgfehleetlefgheefgeefhfduue ekgedvveffuddtudeivefftedvueduueenucffohhmrghinheprhhushhtqdhlrghnghdr ohhrghenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 21 Feb 2022 22:52:56 -0500 (EST) From: Andrew Jeffery To: openembedded-core@lists.openembedded.org Subject: [RFC PATCH 8/8] rust: Introduce RUST_BUILD_ARCH Date: Tue, 22 Feb 2022 14:22:34 +1030 Message-Id: <20220222035234.463162-9-andrew@aj.id.au> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220222035234.463162-1-andrew@aj.id.au> References: <20220222035234.463162-1-andrew@aj.id.au> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 22 Feb 2022 03:52:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/162122 On modern Power systems `uname -m` yields 'ppc64le' while the toolchain knows the architecture as 'powerpc64le'. Provide a mapping from one to the other to download the correct snapshot artifacts. Signed-off-by: Andrew Jeffery --- meta/classes/rust-common.bbclass | 3 +++ meta/recipes-devtools/rust/rust-snapshot.inc | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/classes/rust-common.bbclass b/meta/classes/rust-common.bbclass index 58ece01097c8..2ee7e178e536 100644 --- a/meta/classes/rust-common.bbclass +++ b/meta/classes/rust-common.bbclass @@ -107,6 +107,9 @@ def rust_base_triple(d, thing): libc = bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d) return arch + vendor + '-' + os + libc +# In some cases uname and the toolchain differ on their idea of the arch name +RUST_BUILD_ARCH = "${@arch_to_rust_arch(d.getVar('BUILD_ARCH'))}" + # Naming explanation # Yocto # - BUILD_SYS - Yocto triple of the build environment diff --git a/meta/recipes-devtools/rust/rust-snapshot.inc b/meta/recipes-devtools/rust/rust-snapshot.inc index d6ffe92d07ee..d0c05aec7866 100644 --- a/meta/recipes-devtools/rust/rust-snapshot.inc +++ b/meta/recipes-devtools/rust/rust-snapshot.inc @@ -19,11 +19,11 @@ SRC_URI[rustc-snapshot-powerpc64le.sha256sum] = "f43cb99109c3438c77c7079cdce4673 SRC_URI[cargo-snapshot-powerpc64le.sha256sum] = "599cf1b5a8cdbf76d591621bc9222aefa60e2f5fd378ae71c4dcf4514c47122e" SRC_URI += " \ - https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ - https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ - https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ + https://static.rust-lang.org/dist/${CARGO_SNAPSHOT}.tar.xz;name=cargo-snapshot-${RUST_BUILD_ARCH};subdir=rust-snapshot-components \ " -RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" -RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" -CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${BUILD_ARCH}-unknown-linux-gnu" +RUST_STD_SNAPSHOT = "rust-std-${RS_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" +RUSTC_SNAPSHOT = "rustc-${RS_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu" +CARGO_SNAPSHOT = "cargo-${CARGO_VERSION}-${RUST_BUILD_ARCH}-unknown-linux-gnu"