From: "Anton Antonov" <anton.antonov@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: rust: conflicts between Yocto and CC-RS compiler parameters
Date: Tue, 25 Oct 2022 05:22:11 -0700 [thread overview]
Message-ID: <31059.1666700531342911157@lists.openembedded.org> (raw)
In-Reply-To: <f2681c2921cabc8fb5daca99d599096a566249a6.camel@linuxfoundation.org>
[-- Attachment #1: Type: text/plain, Size: 1862 bytes --]
On Tue, Oct 25, 2022 at 03:56 AM, Richard Purdie wrote:
>
> I'm a bit worried that we're seeing conflicting flags, it makes me
> wonder whether we have the right ones in our tune, or, are we mapping
> between RUST_HOST_SYS and HOST_SYS correctly.
>
> I'm guessing this is from "-mfpu=vfpv3-d16" and that we choose a
> different fpu option?
>
> If the difference really is something that rust simply made a different
> choice on, we should set CRATE_CC_NO_DEFAULTS. rust-native is a bit
> messy and whilst I would prefer we found out why the flags don't work,
> I think setting the value for target and probably nativesdk might at
> least be an improvement:
>
> CRATE_CC_NO_DEFAULTS:class-target = "X"
> CRATE_CC_NO_DEFAULTS:class-nativesdk = "X"
>
> or we could just clear it for native:
>
> CRATE_CC_NO_DEFAULTS:class-native = ""
with CRATE_CC_NO_DEFAULTS defined rustc_driver can't be built for rust-native with an error:
error: linking with `/data/shared/yocto/poky/build/tmp/work/x86_64-linux/rust-native/1.63.0-r0/wrapper/build-rust-ccld` failed: exit status: 1
= note: /data/shared/yocto/poky/build/tmp/hosttools/ld: /data/shared/yocto/poky/build/tmp/work/x86_64-linux/rust-native/1.63.0-r0/rustc-1.63.0-src/build/x86_64-unknown-linux-gnu/stage0-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_llvm-c2bba4d8034ef27f.rlib(RustWrapper.o): relocation R_X86_64_TPOFF32 against `_ZL9LastError' can not be used when making a shared object; recompile with -fPIC
collect2: error: ld returned 1 exit status
with
CRATE_CC_NO_DEFAULTS:class-target = "true"
CRATE_CC_NO_DEFAULTS:class-nativesdk = "true"
in rust-target-config.bbclass I can successively build native and target recipes.
I've raised an issue to follow this discussion:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14947
Cheers,
Anton
[-- Attachment #2: Type: text/html, Size: 2055 bytes --]
prev parent reply other threads:[~2022-10-25 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 17:10 rust: conflicts between Yocto and CC-RS compiler parameters Anton Antonov
2022-10-24 19:02 ` [OE-core] " Alexander Kanavin
[not found] ` <17211696138001AA.16920@lists.openembedded.org>
2022-10-24 19:09 ` Alexander Kanavin
2022-10-25 10:56 ` Richard Purdie
2022-10-25 12:22 ` Anton Antonov [this message]
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=31059.1666700531342911157@lists.openembedded.org \
--to=anton.antonov@arm.com \
--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.