From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [SDK] How to use the gold linker
Date: Mon, 14 Dec 2020 14:09:35 -0800 [thread overview]
Message-ID: <942f87d1-4b9d-1b7b-7fcb-9714543f3107@gmail.com> (raw)
In-Reply-To: <5776519.IOBmFsySL6@n95hx1g2>
On 12/14/20 3:14 AM, Christian Eggers wrote:
> Branch: dunfell
> Arch: arm
>
> When I set -fuse-ld=gold with the Yocto SDK, the bfd linker is used anyway:
>
>> . /opt/poky-tiny/3.1.4/environment-setup-cortexa7t2hf-neon-vfpv4-poky-linux-musleabi
>> ${CC} -fuse-ld=gold -Wl,--threads -o test test.c
> /opt/poky-tiny/3.1.4/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/real-ld: unrecognized option '--threads'
> /opt/poky-tiny/3.1.4/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/real-ld: use the --help option for usage information
>
> When I call the "real-ld" with -h, I can see that it's the BFD linker.
>
>> ${CC} -print-prog-name=ld
> /opt/poky-tiny/3.1.4/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld
>
>> ${CC} -fuse-ld=bfd -print-prog-name=ld
> ld.bfd
>
>> ${CC} -fuse-ld=gold -print-prog-name=ld
> ld.gold
>
> Compared to other cross toolchains I use, the output of the previous two commands
> miss the full path to the linker. The gold linker is part of my SDK:
>
>> arm-poky-linux-musleabi-ld.gold --help
> Usage: arm-poky-linux-musleabi-ld.gold [options] file...
> Options:
> --help Report usage information
> ...
>
> How can I use the gold linker from gcc (without making it default)?
>
This is kind of known and kind of works as intended, see
https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-cross-canadian.inc#n132
You might want to try commenting it out and see if it works for you in
resulting SDK
> regards
> Christian
>
>
>
> ________________________________
> [http://assets.arri.com/media/sign/2020-04-03-E-mail-signature-Stellar2_V1.jpg] <https://microsites.arri.com/stellar/>
>
> Get all the latest information from www.arri.com<https://www.arri.com/>, Facebook<https://www.facebook.com/TeamARRI>, Twitter<https://twitter.com/ARRIChannel>, Instagram<https://instagram.com/arri> and YouTube<https://www.youtube.com/user/ARRIChannel>.
>
> Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRA 57918
> Persönlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
> Sitz: München - Registergericht: Amtsgericht München - Handelsregisternummer: HRB 54477
> Geschäftsführer: Dr. Michael Neuhäuser; Stephan Schenk; Walter Trauninger; Markus Zeiler
>
>
>
>
>
next prev parent reply other threads:[~2020-12-14 22:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 11:14 [SDK] How to use the gold linker Christian Eggers
2020-12-14 22:09 ` Khem Raj [this message]
[not found] ` <CABcZAN=QdWzV=LObrdHMWfcDx_1VV3Ce-i_nYL3H7WYUcCtSSA@mail.gmail.com>
2020-12-15 17:15 ` [OE-core] " Khem Raj
2020-12-18 11:30 ` Christian Eggers
2020-12-18 16:32 ` Khem Raj
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=942f87d1-4b9d-1b7b-7fcb-9714543f3107@gmail.com \
--to=raj.khem@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox