From patchwork Tue Dec 5 14:27:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhatnedap@gmail.com X-Patchwork-Id: 35692 X-Patchwork-Delegate: steve@sakoman.com 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 83886C4167B for ; Tue, 5 Dec 2023 14:28:50 +0000 (UTC) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web11.100705.1701786526609770977 for ; Tue, 05 Dec 2023 06:28:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=f8JMCvbn; spf=pass (domain: gmail.com, ip: 209.85.167.45, mailfrom: jhatnedap@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-50bef9b7a67so3474279e87.1 for ; Tue, 05 Dec 2023 06:28:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701786525; x=1702391325; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=iqD+05fDDF8h/8Rgh1OXmOVczzWr3DM9jKd7zs8LVLg=; b=f8JMCvbns2nRgdxea6PYu02PHHpLxt0qZs2wlfGFTRD7Krhr/U6EHSM4epKtUEfYbX KJRxzP011dVlxqXkp6n9cz5K+cWcrOhR5hNamxwDKeh2seD8ccl0K/RbJ+VqEzT6tksq Zm/n7O4OVtxkWO+ha7svtw8JFIfPtI1n1m0NRRg2NkhYAAsMr9k71YswDZYs+/5ZPCLi 4RPLf8Co0G/4mUEbDKImBQZyruzvwsRR6n6FdiqsxfxTwc6hzH2DvZb2lcsYIid2yCo2 OmEGKlrWjURmoyVutcdJjqWtSFhCtzjYGN1hkKsRG9MBkrn2lvmYJX3cTXu9+Aogm8cp Zi4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701786525; x=1702391325; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iqD+05fDDF8h/8Rgh1OXmOVczzWr3DM9jKd7zs8LVLg=; b=S1jZZqmP4f3RmlwILLwQhaK8bIVgdGlK/DiS5mGrDpYN+RazNxSW4dnk/fCKdW2FmF N++4W7fVAmIf8/BmvYVOS/EvrjEMVf+iORxnDFGm4PhKPHhg1jn42K8ZfCYp4dnqH4za zrfO6gLIlbCxcelW+CmhfnnzEFmK2wIobtNsvFEwNUuNafmQkH1MGMHVbmzlpBAQCKdA s3/gnYZqhvObUPDSaXwJeDI8/cIYXyTTUpG9Dp85OtGDHvYMTy/M6DQKelM8EeLYbh8Z yKlrImtGdOviiTQtV6WL4fRYnoFKcdAkpjpkD72ACO4H3oXMAcICBX+ThyOtDPUseiZS otmg== X-Gm-Message-State: AOJu0YwB00WpAk+kNnF6Kbo54tSRZbg80qx/LNY6hFrsH5mo69aERAaN amW9m2PJXZWeq23ulxUWz0+8jTeiCbY= X-Google-Smtp-Source: AGHT+IHzIiHIGNSgKioj5Ddcu65kqMoqYltSJKge4E9abMRF8jVaXGroHfaD32kCEtIG247Twnew6Q== X-Received: by 2002:a05:6512:3b9b:b0:50b:fcdb:8df5 with SMTP id g27-20020a0565123b9b00b0050bfcdb8df5mr1594350lfv.24.1701786524555; Tue, 05 Dec 2023 06:28:44 -0800 (PST) Received: from NVC4181.nedap.local ([149.3.168.10]) by smtp.gmail.com with ESMTPSA id v12-20020aa7cd4c000000b0054c52a78f56sm1174043edw.56.2023.12.05.06.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:28:44 -0800 (PST) From: jhatnedap@gmail.com X-Google-Original-From: jermain.horsman@nedap.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie , Jermain Horsman Subject: [kirkstone][PATCH v2 1/5] rust-common: Set llvm-target correctly for cross SDK targets Date: Tue, 5 Dec 2023 15:27:16 +0100 Message-ID: <20231205142810.826-2-jermain.horsman@nedap.com> X-Mailer: git-send-email 2.42.0.windows.2 In-Reply-To: <20231205142810.826-1-jermain.horsman@nedap.com> References: <20231205142810.826-1-jermain.horsman@nedap.com> Reply-To: jermain.horsman@nedap.com 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, 05 Dec 2023 14:28:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191823 From: Richard Purdie When a 'BUILD' target is requested we shouldn't be looking at TARGET_SYS but at BUILD_SYS. Due to the way rust mangles triplets, we need the HOST_SYS triplet to work with existing code - fixing that issue is a separate patch. Also drop the arch_abi argument, it doens't make any sense to a getVar() call and was a copy and paste error. Based on a patch from Otavio Salvador but separated out and tweaked. Fixes: bd36593ba3 ("rust-common: Drop LLVM_TARGET and simplify") Signed-off-by: Richard Purdie (cherry picked from commit d554161a045d12411f288394e253c54aa4c1257c) Signed-off-by: Jermain Horsman --- meta/recipes-devtools/rust/rust-common.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index db0bd8fc1b..ac00fd3d43 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -307,9 +307,13 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): features = features or d.getVarFlag('FEATURES', arch_abi) or "" features = features.strip() + llvm_target = d.getVar('RUST_TARGET_SYS') + if thing == "BUILD": + llvm_target = d.getVar('RUST_HOST_SYS') + # build tspec tspec = {} - tspec['llvm-target'] = d.getVar('RUST_TARGET_SYS', arch_abi) + tspec['llvm-target'] = llvm_target tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) From patchwork Tue Dec 5 14:27:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhatnedap@gmail.com X-Patchwork-Id: 35693 X-Patchwork-Delegate: steve@sakoman.com 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 83341C4167B for ; Tue, 5 Dec 2023 14:29:00 +0000 (UTC) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by mx.groups.io with SMTP id smtpd.web10.101904.1701786533500553368 for ; Tue, 05 Dec 2023 06:28:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Y12SRumh; spf=pass (domain: gmail.com, ip: 209.85.167.46, mailfrom: jhatnedap@gmail.com) Received: by mail-lf1-f46.google.com with SMTP id 2adb3069b0e04-50bfd3a5b54so2269008e87.3 for ; Tue, 05 Dec 2023 06:28:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701786532; x=1702391332; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=irb7VdIN73NU0AxQ21dCHc0bIUS9fTaVsbu2Ga9Px2Y=; b=Y12SRumhZ1j7tsWzN4wz/4fvovLIWb5Uz3q0hfnuiTpS7Sj1KJ9tDuSwRlohbYpSjn 5w21vhQIJPL8ZQjK5wqG27tDpcrztMfZvFcOxjjCY+4yqVOGXCFgdStTqWWr/s82LySk DNUMKJHA/04a7OP3EfVB0VUt/7AFL0iYruIefEaLjOTv40VFwVujf378S9d75c4zEflp yIsdZwFsW1AdHoiv209sAWLEJeIpQ/CucbcXOsDSzNhCxS/LlgHtLBoXc6LLRNbTyLQr JU0G1u0L+nKrDdDITXC43rg88H8ifBdTG1nXfsB2MShrP4d7lwNok1mHmLCwvjf7eGSJ 4aVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701786532; x=1702391332; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=irb7VdIN73NU0AxQ21dCHc0bIUS9fTaVsbu2Ga9Px2Y=; b=mpUUR3uZNlrO6h9zi9NilDVdHv12fl1DXsELxpWqkL2ZN6ExPLs/T1fi8m31vMA0cA DLf5zEtTKkuqyl1SVmAZYb2v05/F3eRx9lxpgvKE/q7W7PEOFrNwmzEmGf5XVBeJrw75 3iPCj7CuCTrNyha1dom5eEm1RDY/wVrMkonGo38xIIJ3qy05s+0N0UXy0/iun/64HEd7 5gAxTMeqbMxtMh0XYgtiLYVCF1jW7fHzi5MMtDFzQadM/Wd2juqaBdSF/cyZh8mKdFdd qAla6TesV75vBIR6i29Y9sA+TlPKZOGQxwC0OUBh6GxVxvvsDY4uHUbtpV4YLB0WHifK f3SA== X-Gm-Message-State: AOJu0YxoR8GtXRfw4o527Ke5dBTQKkwW7ehGyMpEh42odrg9n+SlxVJS wS+katNomgqJrmjIlB34styKMHnoUB4= X-Google-Smtp-Source: AGHT+IE8AVDaZsqLtNXsBxItv4ZDxCeyDm+Y/n0gowaD5/osjmk3evUrgbr8fwjxIROYTwG30imAMw== X-Received: by 2002:a05:6512:484c:b0:50b:e6ff:e53e with SMTP id ep12-20020a056512484c00b0050be6ffe53emr2224469lfb.9.1701786531572; Tue, 05 Dec 2023 06:28:51 -0800 (PST) Received: from NVC4181.nedap.local ([149.3.168.10]) by smtp.gmail.com with ESMTPSA id v12-20020aa7cd4c000000b0054c52a78f56sm1174043edw.56.2023.12.05.06.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:28:51 -0800 (PST) From: jhatnedap@gmail.com X-Google-Original-From: jermain.horsman@nedap.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie , Jermain Horsman Subject: [kirkstone][PATCH v2 2/5] rust-cross-canadian: Fix ordering of target json config generation Date: Tue, 5 Dec 2023 15:27:17 +0100 Message-ID: <20231205142810.826-3-jermain.horsman@nedap.com> X-Mailer: git-send-email 2.42.0.windows.2 In-Reply-To: <20231205142810.826-1-jermain.horsman@nedap.com> References: <20231205142810.826-1-jermain.horsman@nedap.com> Reply-To: jermain.horsman@nedap.com 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, 05 Dec 2023 14:29:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191824 From: Richard Purdie Based upon a patch from Otavio Salvador , ensure the target json files are written in the correct order with the most specific last incase it overwrites earlier files if the prefixes match. Signed-off-by: Richard Purdie (cherry picked from commit 1912c4e9e0ecf9655f3b3a41588b54d7956f5899) Signed-off-by: Jermain Horsman --- meta/recipes-devtools/rust/rust-cross-canadian-common.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc index 1f21c8af26..df4901f1fa 100644 --- a/meta/recipes-devtools/rust/rust-cross-canadian-common.inc +++ b/meta/recipes-devtools/rust/rust-cross-canadian-common.inc @@ -27,9 +27,10 @@ DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDP 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')) + # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) + rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) + rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) } INHIBIT_DEFAULT_RUST_DEPS = "1" From patchwork Tue Dec 5 14:27:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhatnedap@gmail.com X-Patchwork-Id: 35695 X-Patchwork-Delegate: steve@sakoman.com 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 91DFBC10F04 for ; Tue, 5 Dec 2023 14:29:00 +0000 (UTC) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by mx.groups.io with SMTP id smtpd.web10.101908.1701786537337315572 for ; Tue, 05 Dec 2023 06:28:57 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=N3N/0Vpp; spf=pass (domain: gmail.com, ip: 209.85.208.48, mailfrom: jhatnedap@gmail.com) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-54cde11d0f4so2651962a12.2 for ; Tue, 05 Dec 2023 06:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701786536; x=1702391336; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=UYSh2pPU5ePpuh1G8HklnMGdnlM0RFj8BrVpBlu823k=; b=N3N/0VppEXXO0+A3rLFd2iF/jXaCJdHs69al63otB+UZY6jutByv7/z1w8xSmJjyIF BICFlYPjQfJdNFH9YGfHNaoEJ+Vxrl+uNLqWHF0VeH8c0BFtY3k9CiHydLI7yqR4DyvG OWWb0gAKluxH3/97nLlzbDjHxxzcckjDTnKDonsmBTlMyqx5aLujQwBwxHinyTN/gjw+ sqOk0GhPGWZNPtiX41k1jUGnyKu84hpw5GOI40R2mpBVZZ+5oFtILZ39wccaH6kTN8f3 6qzeUE9TTSX94aIN7tbs0imcVoFGnKfD0dWz7hBYwVLPHYChbHzvw+ZgcPCQbKv7BDvB TQPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701786536; x=1702391336; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=UYSh2pPU5ePpuh1G8HklnMGdnlM0RFj8BrVpBlu823k=; b=m+XzduEVnk5DQT71xh9sm4VLpL44Aih+/gfFLMthzSXIyPcQGIdBqonk28LV5wgkZx Eneg1CKHeYggF8TOtgH88bJlVU7Gt5aXw3WgebZfLPEAzcjnLEuZv3+Bi+4d5dn4JdUn 1Vn4Woua9B1eN6wQJuZbYseSs82Z6NfUrPwj70MVS39R/rCxdJ5dBFN/py3x4G+1nZow LmFG73OTDXYYjTjnh/4L93AsGCg3E2amo+rlVQsyNkwMsJIMkYVFoR6Wz2jX6UcYG2H9 cQNKce2+txqVB8im1gvWc+/Zm/Xdxa7MLsGv35Jsakp/W/C0Skhd1aWiMmWOR7/PP5lz Ts9g== X-Gm-Message-State: AOJu0Yw9Kg5I5xx69r+ij55DqfidJQfCR86TXAXasudD0/2a26Ls3ZPt ZDewYnTgzEKEd7OTiNR7zyv6CQ5mv30= X-Google-Smtp-Source: AGHT+IGjDgTks7GWTIwuXRxX6IX0z0sORFlmnC4ObtkK3H3opHIgB1j9FQ7Kf1h168Hibp6zJPBaDA== X-Received: by 2002:a50:9b12:0:b0:54c:312a:c393 with SMTP id o18-20020a509b12000000b0054c312ac393mr5166305edi.1.1701786535429; Tue, 05 Dec 2023 06:28:55 -0800 (PST) Received: from NVC4181.nedap.local ([149.3.168.10]) by smtp.gmail.com with ESMTPSA id v12-20020aa7cd4c000000b0054c52a78f56sm1174043edw.56.2023.12.05.06.28.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:28:55 -0800 (PST) From: jhatnedap@gmail.com X-Google-Original-From: jermain.horsman@nedap.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie , Jermain Horsman Subject: [kirkstone][PATCH v2 3/5] rust-cross/rust-common: Merge arm target handling code to fix cross-canadian Date: Tue, 5 Dec 2023 15:27:18 +0100 Message-ID: <20231205142810.826-4-jermain.horsman@nedap.com> X-Mailer: git-send-email 2.42.0.windows.2 In-Reply-To: <20231205142810.826-1-jermain.horsman@nedap.com> References: <20231205142810.826-1-jermain.horsman@nedap.com> Reply-To: jermain.horsman@nedap.com 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, 05 Dec 2023 14:29:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191825 From: Richard Purdie rust-cross had special handling for armv7 targets but we also need this for cross-canadian. Merge the code into the main function so everything is consistent. Also then fix the arm definition to be arm-eabi since ABI is correctly being looked up. Signed-off-by: Richard Purdie (cherry picked from commit ff3c3dbbd2bf1bb7bb70b55cca203e9eedcf14a8) Signed-off-by: Jermain Horsman --- meta/recipes-devtools/rust/rust-common.inc | 6 ++++++ meta/recipes-devtools/rust/rust-cross.inc | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index ac00fd3d43..3252827818 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -297,6 +297,12 @@ def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): sys = sys_for(d, thing) prefix = prefix_for(d, thing) + if thing == "TARGET": + abi = d.getVar('ABIEXTENSION') + # arm and armv7 have different targets in llvm + if arch == "arm" and target_is_armv7(d): + arch = 'armv7' + rust_arch = oe.rust.arch_to_rust_arch(arch) if abi: diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc index f6babfeeda..4c026b1f38 100644 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ b/meta/recipes-devtools/rust/rust-cross.inc @@ -8,15 +8,10 @@ python do_rust_gen_targets () { features = "" cpu = "generic" arch = d.getVar('{}_ARCH'.format(thing)) - abi = "" if thing is "TARGET": - abi = d.getVar('ABIEXTENSION') - # arm and armv7 have different targets in llvm - if arch == "arm" and target_is_armv7(d): - arch = 'armv7' features = d.getVar('TARGET_LLVM_FEATURES') or "" cpu = d.getVar('TARGET_LLVM_CPU') - rust_gen_target(d, thing, wd, features, cpu, arch, abi) + rust_gen_target(d, thing, wd, features, cpu, arch) } # Otherwise we'll depend on what we provide From patchwork Tue Dec 5 14:27:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhatnedap@gmail.com X-Patchwork-Id: 35694 X-Patchwork-Delegate: steve@sakoman.com 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 84980C46CA3 for ; Tue, 5 Dec 2023 14:29:00 +0000 (UTC) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by mx.groups.io with SMTP id smtpd.web10.101911.1701786539589934596 for ; Tue, 05 Dec 2023 06:28:59 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=jr76r5o/; spf=pass (domain: gmail.com, ip: 209.85.208.53, mailfrom: jhatnedap@gmail.com) Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-548f853fc9eso7329967a12.1 for ; Tue, 05 Dec 2023 06:28:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701786538; x=1702391338; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=KoQB5UUyalI/tNQk38O1jleqiWnR0V9P4+ctVYd9N1s=; b=jr76r5o/Ww0TZtYwtlqEoH7Wk9IRBGGA5wN80ZfEN2Eo9lbqQzz2huijkEM8DJ4khJ IjF7sNTLnpCcjKX1j/sh4Igt4xf9OQ4N0osNerIp2vPrlO1hX/GCP+dVKxXX8O854z5Q L75A+IRjqw5x18FVoNQo3kX/nW28kMWRGEmylJAEbVU1IcV2YPT4BWjo7t1e2a7kC+WR m2U02R/UtmFiF528SDMLCpm3yPDhwmJJ0iEUcLRyUytevoy8J78zXrI+jz8JRmg2BlBS w++OvE/VbW2uUjDQFROUBovsA9gneTFb3F5V8jJwQ3gBsalR3ekgW/tWl/AkmWutSyXk iPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701786538; x=1702391338; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=KoQB5UUyalI/tNQk38O1jleqiWnR0V9P4+ctVYd9N1s=; b=QHiqlRSKeVcUqJTmTnHzb6vuagg6W3+GOKHPZUEQ+OIAxyyntxyXWbOAb19wv4ZFUr 0ZZAqnCtCdlG1kppHwOup0Rvz5gDEbWu4zUXTIHD8I8sgMrx1us29t1tatITiiU9rqoh Ypgc8m8a48yGDDF+AIZlk8rWiS9z/ZrOKFlaZJhPU6jvzrY5ZEixllXa/Qjksln6K9vj 7ryx6xXteg5FSAztsgZR+T2IS5YOSo7gRk4UxQOsIem/+Bkz7QKxrgUOPcNnxi43fe/d 6FIbgEZ0mH1/GnUJdzO3Y1NLwi19mUXEN7jmdesPZBh2zdpwISFSSPrc98rimaPWGGYw THug== X-Gm-Message-State: AOJu0YzTM3Q63Ynyhb3XTxL7z9ALsdeeFEwChnBQOZPL/xy+stCcXWnM +gzCN0F1feu5btq9/lXBT5d1QCBzUa4= X-Google-Smtp-Source: AGHT+IGG8HiNuUi8gvTOu2A33UkdBLjRIT2I0acPJKopF+bOqwU6TIpvAumq2k87XEU3LqUsJHEauA== X-Received: by 2002:a50:d4c5:0:b0:54b:c09e:ff3f with SMTP id e5-20020a50d4c5000000b0054bc09eff3fmr2025850edj.23.1701786537821; Tue, 05 Dec 2023 06:28:57 -0800 (PST) Received: from NVC4181.nedap.local ([149.3.168.10]) by smtp.gmail.com with ESMTPSA id v12-20020aa7cd4c000000b0054c52a78f56sm1174043edw.56.2023.12.05.06.28.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:28:57 -0800 (PST) From: jhatnedap@gmail.com X-Google-Original-From: jermain.horsman@nedap.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie , Jermain Horsman Subject: [kirkstone][PATCH v2 4/5] rust-cross: Simplfy the rust_gen_target calls Date: Tue, 5 Dec 2023 15:27:19 +0100 Message-ID: <20231205142810.826-5-jermain.horsman@nedap.com> X-Mailer: git-send-email 2.42.0.windows.2 In-Reply-To: <20231205142810.826-1-jermain.horsman@nedap.com> References: <20231205142810.826-1-jermain.horsman@nedap.com> Reply-To: jermain.horsman@nedap.com 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, 05 Dec 2023 14:29:00 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191826 From: Richard Purdie Match the code in rust-cross-canadian so that further simplifications can be considered in future. Signed-off-by: Richard Purdie (cherry picked from commit 5cb62d0a33777cb9afb1eea5f736a2580ce50dc7) Signed-off-by: Jermain Horsman --- meta/recipes-devtools/rust/rust-common.inc | 12 ++++++------ meta/recipes-devtools/rust/rust-cross.inc | 16 ++++------------ 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/meta/recipes-devtools/rust/rust-common.inc b/meta/recipes-devtools/rust/rust-common.inc index 3252827818..a73367bbd5 100644 --- a/meta/recipes-devtools/rust/rust-common.inc +++ b/meta/recipes-devtools/rust/rust-common.inc @@ -119,12 +119,12 @@ def llvm_features(d): ## arm-unknown-linux-gnueabihf -DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" -TARGET_ENDIAN[arm] = "little" -TARGET_POINTER_WIDTH[arm] = "32" -TARGET_C_INT_WIDTH[arm] = "32" -MAX_ATOMIC_WIDTH[arm] = "64" -FEATURES[arm] = "+v6,+vfp2" +DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +TARGET_ENDIAN[arm-eabi] = "little" +TARGET_POINTER_WIDTH[arm-eabi] = "32" +TARGET_C_INT_WIDTH[arm-eabi] = "32" +MAX_ATOMIC_WIDTH[arm-eabi] = "64" +FEATURES[arm-eabi] = "+v6,+vfp2" ## armv7-unknown-linux-gnueabihf DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" diff --git a/meta/recipes-devtools/rust/rust-cross.inc b/meta/recipes-devtools/rust/rust-cross.inc index 4c026b1f38..2e47a3aa5f 100644 --- a/meta/recipes-devtools/rust/rust-cross.inc +++ b/meta/recipes-devtools/rust/rust-cross.inc @@ -1,17 +1,9 @@ python do_rust_gen_targets () { wd = d.getVar('WORKDIR') + '/targets/' - # It is important 'TARGET' is last here so that it overrides our less - # informed choices for BUILD & HOST if TARGET happens to be the same as - # either of them. - for thing in ['BUILD', 'HOST', 'TARGET']: - bb.debug(1, "rust_gen_target for " + thing) - features = "" - cpu = "generic" - arch = d.getVar('{}_ARCH'.format(thing)) - if thing is "TARGET": - features = d.getVar('TARGET_LLVM_FEATURES') or "" - cpu = d.getVar('TARGET_LLVM_CPU') - rust_gen_target(d, thing, wd, features, cpu, arch) + # Order of BUILD, HOST, TARGET is important in case the files overwrite, most specific last + rust_gen_target(d, 'BUILD', wd, "", "generic", d.getVar('BUILD_ARCH')) + rust_gen_target(d, 'HOST', wd, "", "generic", d.getVar('HOST_ARCH')) + rust_gen_target(d, 'TARGET', wd, d.getVar('TARGET_LLVM_FEATURES') or "", d.getVar('TARGET_LLVM_CPU'), d.getVar('TARGET_ARCH')) } # Otherwise we'll depend on what we provide From patchwork Tue Dec 5 14:27:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jhatnedap@gmail.com X-Patchwork-Id: 35696 X-Patchwork-Delegate: steve@sakoman.com 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 A032DC4167B for ; Tue, 5 Dec 2023 14:29:10 +0000 (UTC) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mx.groups.io with SMTP id smtpd.web11.100714.1701786544146590075 for ; Tue, 05 Dec 2023 06:29:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=T/BQDwxN; spf=pass (domain: gmail.com, ip: 209.85.208.41, mailfrom: jhatnedap@gmail.com) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-54c846da5e9so2828315a12.3 for ; Tue, 05 Dec 2023 06:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701786542; x=1702391342; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=X41lwEq/6kvpJ43B530gzZLUch6eeA2glD7DPPnGEv0=; b=T/BQDwxNOjoRRvem6bRBJFVdBxjUDkf3uOCj4KdiE61oybzjYEF4KDHNZjd4htLFSD 95UMwGfHSo+seL2DgMhaCOrXIJd46e3GL0jv9gkmwwrZ0iGMi/AUDUHJKyUzdDUeLiks 2BKzEUEhPz9Nj9sNgYlMUII+DiynAB6cAwFjnV2qJRqoszGeL0WVu+NcthXIuzSAai70 hPOFczr+v8008G6nWRS/MP5Pb2dRUnwj/a8atz/0nKuMvx/ZIzsVi1YHLjjlxBC1eDqs MNZOjwHzPnSTvGqbmhJLsQxgikGsWSwxBxBE/iizNCvQeRLpUgfdQtVnvghI1iO0PsPO lMTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701786542; x=1702391342; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=X41lwEq/6kvpJ43B530gzZLUch6eeA2glD7DPPnGEv0=; b=PI9rZPmOGdvyf5VF2k070D9kdcNYiqU28Z6nnTFNYd4/jpM7/HqD2EPuI3IaXJYgJw OQAVsuh5S2h0NI3ga62ttFg+zWrtKPpVSyZqTMBsjH17LlNn/Q8Sd33j7a/5ovXaP0SI ATLBt8nx7wswkYp2vS8RAy4BTolzf3QnjOeRbePHRhHyaf4rEmxOHejYAlkWHgZTpNNH Jb2OcAcX60zux9hEuwKxfV5Ceze/GByE2dpTo9EXZ9M74cKqEF8kifrxnFMQjOew+ZhI namqWLMcA4o+h4q9T/rs8MZhw2JraRtNbbSXfP+Jr9yDVQptcskianaUaWGltk/CWEoq 6tfA== X-Gm-Message-State: AOJu0YwnT4InUKYdpGFCLm5ZNfn2uBmgRJ44VTC/Y7VmckNdkSQ1wqH7 j2Hh9HxlkLtEcdbpSYNgWFjVlzhbJwE= X-Google-Smtp-Source: AGHT+IFmf/ZD/pBeR64wfR/bsMZ7DlurNJuqnB60BKxwbL+U/Dc/fvxOctjtSPFriyInGnYQgQJ4RA== X-Received: by 2002:a50:d01a:0:b0:54b:922:1f4f with SMTP id j26-20020a50d01a000000b0054b09221f4fmr3911682edf.28.1701786542565; Tue, 05 Dec 2023 06:29:02 -0800 (PST) Received: from NVC4181.nedap.local ([149.3.168.10]) by smtp.gmail.com with ESMTPSA id v12-20020aa7cd4c000000b0054c52a78f56sm1174043edw.56.2023.12.05.06.29.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 06:29:02 -0800 (PST) From: jhatnedap@gmail.com X-Google-Original-From: jermain.horsman@nedap.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie , Jermain Horsman Subject: [kirkstone][PATCH v2 5/5] native: Clear TUNE_FEATURES/ABIEXTENSION Date: Tue, 5 Dec 2023 15:27:20 +0100 Message-ID: <20231205142810.826-6-jermain.horsman@nedap.com> X-Mailer: git-send-email 2.42.0.windows.2 In-Reply-To: <20231205142810.826-1-jermain.horsman@nedap.com> References: <20231205142810.826-1-jermain.horsman@nedap.com> Reply-To: jermain.horsman@nedap.com 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, 05 Dec 2023 14:29:10 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/191827 From: Richard Purdie Some recipes reference these. Rather than continually trying to chase down the references and taskhash issues, clear the variables for an easier life and simpler code. These wouldn't convey anything useful in a native build. Signed-off-by: Richard Purdie (cherry picked from commit f8edeead263708889d31a7ff578ef8274cb678b4) Signed-off-by: Jermain Horsman --- meta/classes/native.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index 4de96cd59b..56726301bd 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass @@ -23,6 +23,8 @@ TARGET_CFLAGS = "${BUILD_CFLAGS}" TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}" TARGET_LDFLAGS = "${BUILD_LDFLAGS}" TARGET_FPU = "" +TUNE_FEATURES = "" +ABIEXTENSION = "" HOST_ARCH = "${BUILD_ARCH}" HOST_OS = "${BUILD_OS}"