Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH 21/29] rust-target-config: Make target workaround generic
Date: Fri, 5 Aug 2022 14:47:05 +0000	[thread overview]
Message-ID: <7faac5488c5d4b879da630a216ff15c7@axis.com> (raw)
In-Reply-To: <20220805131252.3706794-21-richard.purdie@linuxfoundation.org>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Richard Purdie
> Sent: den 5 augusti 2022 15:13
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 21/29] rust-target-config: Make target workaround generic
> 
> Ensure the 'target' data is set for both HOST and TARGET queries
> as appropriate to work correctly in cross configurations.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/classes/rust-target-config.bbclass | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/rust-target-config.bbclass b/meta/classes/rust-target-config.bbclass
> index bc6bd77abbf..b3c738f02a4 100644
> --- a/meta/classes/rust-target-config.bbclass
> +++ b/meta/classes/rust-target-config.bbclass
> @@ -290,6 +290,10 @@ llvm_cpu[vardepvalue] = "${@llvm_cpu(d)}"
> 
>  def rust_gen_target(d, thing, wd, arch):
>      import json
> +
> +    build_sys = d.getVar('BUILD_SYS')
> +    target_sys = d.getVar('TARGET_SYS')
> +
>      sys = d.getVar('{}_SYS'.format(thing))
>      prefix = d.getVar('{}_PREFIX'.format(thing))
>      rustsys = d.getVar('RUST_{}_SYS'.format(thing))
> @@ -298,7 +302,9 @@ def rust_gen_target(d, thing, wd, arch):
>      cpu = "generic"
>      features = ""
> 
> -    if thing == "TARGET":
> +    # Need to apply the target tuning conssitently, only if the triplet applies to the target

Typo: conssitently -> consistently

> +    # and not in the native case
> +    if sys == target_sys and sys != build_sys:
>          abi = d.getVar('ABIEXTENSION')
>          cpu = llvm_cpu(d)
>          if bb.data.inherits_class('native', d):
> --
> 2.34.1

//Peter



  reply	other threads:[~2022-08-05 14:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-05 13:12 [PATCH 01/29] nativesdk: Clear TUNE_FEATURES Richard Purdie
2022-08-05 13:12 ` [PATCH 02/29] populate_sdk_base: Disable rust SDK for MIPS n32 Richard Purdie
2022-08-07  0:39   ` [OE-core] " Khem Raj
2022-08-05 13:12 ` [PATCH 03/29] selftest/reproducible: Exclude rust/rust-dbg for now until we can fix Richard Purdie
2022-08-05 13:12 ` [PATCH 04/29] conf/distro/no-static-libs: Allow static musl for rust Richard Purdie
2022-08-07  0:41   ` [OE-core] " Khem Raj
2022-08-05 13:12 ` [PATCH 05/29] rust-target-config: Add mips n32 best guess at target information Richard Purdie
2022-08-07  0:47   ` [OE-core] " Khem Raj
2022-08-05 13:12 ` [PATCH 06/29] rust-common: Add CXXFLAGS Richard Purdie
2022-08-05 13:12 ` [PATCH 07/29] rust-common: Drop export directive from wrappers Richard Purdie
2022-08-05 13:12 ` [PATCH 08/29] rust-common: Rework wrappers top handle musl Richard Purdie
2022-08-05 13:12 ` [PATCH 09/29] rust: Work around reproducibility issues Richard Purdie
2022-08-05 13:12 ` [PATCH 10/29] rust: Switch to use RUST_XXX_SYS consistently Richard Purdie
2022-08-05 13:12 ` [PATCH 11/29] rust.inc: Rename variables to make code clearer Richard Purdie
2022-08-05 13:12 ` [PATCH 12/29] rust.inc: Fix cross build llvm-config handling Richard Purdie
2022-08-07  0:56   ` [OE-core] " Khem Raj
2022-08-05 13:12 ` [PATCH 13/29] rust/mesa: Drop obsolete YOCTO_ALTERNATE_MULTILIB_NAME Richard Purdie
2022-08-05 13:12 ` [PATCH 14/29] rust-target-config: Show clear error when target isn't defined Richard Purdie
2022-08-05 13:12 ` [PATCH 15/29] rust: Generate per recipe target configuration files Richard Purdie
2022-08-05 13:12 ` [PATCH 16/29] rust-common/rust: Improve bootstrap BUILD_SYS handling Richard Purdie
2022-08-05 13:12 ` [PATCH 17/29] cargo_common: Handle build SYS as well as HOST/TARGET Richard Purdie
2022-08-05 13:12 ` [PATCH 18/29] rust-llvm: Enable nativesdk variant Richard Purdie
2022-08-05 14:51   ` [OE-core] " Peter Kjellerstedt
2022-08-05 13:12 ` [PATCH 19/29] rust.inc: Fix for cross compilation configuration Richard Purdie
2022-08-05 13:12 ` [PATCH 20/29] rust-common: Update to match cross targets Richard Purdie
2022-08-05 13:12 ` [PATCH 21/29] rust-target-config: Make target workaround generic Richard Purdie
2022-08-05 14:47   ` Peter Kjellerstedt [this message]
2022-08-05 13:12 ` [PATCH 22/29] rust-common: Simplify libc handling Richard Purdie
2022-08-05 13:12 ` [PATCH 23/29] cargo: Drop cross-canadian variant and fix/use nativesdk Richard Purdie
2022-08-05 13:12 ` [PATCH 24/29] rust-common: Set rustlibdir to match target expectation Richard Purdie
2022-08-05 13:12 ` [PATCH 25/29] rust-cross-canadian: Simplify and fix Richard Purdie
2022-08-05 13:12 ` [PATCH 26/29] rust: Drop cross/crosssdk Richard Purdie
2022-08-05 13:12 ` [PATCH 27/29] rust: Enable nativesdk and target builds + replace rust-tools-cross-canadian Richard Purdie
2022-08-05 13:12 ` [PATCH 28/29] rust: Fix musl builds Richard Purdie
2022-08-05 13:12 ` [PATCH 29/29] rust: Ensure buildpaths are handled in debug symbols correctly Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7faac5488c5d4b879da630a216ff15c7@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox