All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kanavin <alex.kanavin@gmail.com>
To: Andrew Jeffery <andrew@aj.id.au>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [RFC PATCH 6/8] rust: Mitigate duplicate sections on matching architectures
Date: Tue, 22 Feb 2022 10:57:16 +0100	[thread overview]
Message-ID: <CANNYZj8uEbibb6POcuhc+fEvViJCXb8_yAC28wMyGSgiAJA35Q@mail.gmail.com> (raw)
In-Reply-To: <20220222035234.463162-7-andrew@aj.id.au>

This needs a better explanation. What is the problem and how is it being fixed?

Alex

On Tue, 22 Feb 2022 at 04:52, Andrew Jeffery <andrew@aj.id.au> wrote:
>
> 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 <andrew@aj.id.au>
> ---
>  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")
> --
> 2.32.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#162120): https://lists.openembedded.org/g/openembedded-core/message/162120
> Mute This Topic: https://lists.openembedded.org/mt/89310362/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


  reply	other threads:[~2022-02-22  9:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-22  3:52 [RFC PATCH 0/8] rust: Fix powerpc64le support Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 1/8] rust: Migrate arch_to_rust_target_arch() to rust-common class Andrew Jeffery
2022-02-22 10:05   ` [OE-core] " Richard Purdie
2022-02-23  0:41     ` Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 2/8] rust: Rename arch_to_rust_target_arch() for generality Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 3/8] rust: Handle Power arch variants in arch_to_rust_arch() Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 4/8] rust: Consistently use RUST_{BUILD,HOST,TARGET}_{ARCH,SYS} Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 5/8] rust: libstd-rs: Install deps under {RUST_,}TARGET_SYS mismatch Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 6/8] rust: Mitigate duplicate sections on matching architectures Andrew Jeffery
2022-02-22  9:57   ` Alexander Kanavin [this message]
2022-02-23  0:38     ` [OE-core] " Andrew Jeffery
2022-02-28  0:13       ` Andrew Jeffery
2022-02-28  8:21         ` Alexander Kanavin
2022-02-28 13:57           ` Andrew Jeffery
2022-02-22  3:52 ` [RFC PATCH 7/8] rust: Add snapshot checksums for powerpc64le Andrew Jeffery
2022-02-22  9:59   ` [OE-core] " Alexander Kanavin
2022-02-22 12:28     ` Richard Purdie
2022-02-22 14:23       ` Alexander Kanavin
2022-02-22 18:34         ` Khem Raj
2022-02-22 23:41           ` Andrew Jeffery
2022-02-23  0:17         ` Andrew Jeffery
2022-02-22 23:49       ` Andrew Jeffery
2022-02-23  0:03         ` Richard Purdie
2022-02-23  0:27           ` Andrew Jeffery
2022-02-23  0:43             ` Richard Purdie
2022-02-22  3:52 ` [RFC PATCH 8/8] rust: Introduce RUST_BUILD_ARCH Andrew Jeffery

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=CANNYZj8uEbibb6POcuhc+fEvViJCXb8_yAC28wMyGSgiAJA35Q@mail.gmail.com \
    --to=alex.kanavin@gmail.com \
    --cc=andrew@aj.id.au \
    --cc=openembedded-core@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.