From: "Khem Raj" <raj.khem@gmail.com>
To: Christian Eggers <ceggers@arri.de>,
openembedded-core@lists.openembedded.org
Cc: Christopher Larson <kergoth@gmail.com>
Subject: Re: [OE-core] [SDK] How to use the gold linker
Date: Fri, 18 Dec 2020 08:32:08 -0800 [thread overview]
Message-ID: <52f8e74e-284e-60d7-757e-843a8b5a7de3@gmail.com> (raw)
In-Reply-To: <1664221.2vONSAOZnb@n95hx1g2>
On 12/18/20 3:30 AM, Christian Eggers wrote:
> Hi Khem, hi Christopher,
>
> On Tuesday, 15 December 2020, 18:15:52 CET, Khem Raj wrote:
>>
>> On 12/15/20 8:50 AM, Christopher Larson wrote:
>>> This can be fixed via two changes, first removing real-ld, then adding
>>> the missing links to fix -fuse-ld=. I have this in one of my
>>> not-yet-submitted bbappends:
>>>
>>> # Remove real-ld, as it prevents checking for ld or gold in the
>>> search path
>>> rm -f ${dest}real-ld$suffix
>>> # Then add links to fix builds with -fuse-ld=
>>> ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld.gold$suffix
>>> ${dest}ld.gold$suffix
>>> ln -sf ${BINRELPATH}/${TARGET_PREFIX}ld.bfd$suffix ${dest}ld.bfd$suffix
>>>
>>
>> right this looks ok. Can you submit this for upstreaming please
>
> while this change works "fine for me" (I can now use ld.gold which is about
> 3 times faster for my project), there are side effects:
>
>> ${CC} -fuse-ld=bfd -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.bfd
>
>> ${CC} -fuse-ld=bfd -o test test.c
> works fine
>
>> ${CC} -fuse-ld=gold -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.gold
>
>> ${CC} -fuse-ld=gold -o test test.c
> also works fine
>
>> ${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} -o test test.c
> collect2: fatal error: cannot find ‘ld’
> compilation terminated.
>
>> ls -l /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
> /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 -> ../../../../../bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld
>
we could patch it out in gcc sources so always use the real one because
the default is one of gold or bfd linker anyway
>
>
> 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
>
prev parent reply other threads:[~2020-12-18 16:32 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 ` [OE-core] " Khem Raj
[not found] ` <CABcZAN=QdWzV=LObrdHMWfcDx_1VV3Ce-i_nYL3H7WYUcCtSSA@mail.gmail.com>
2020-12-15 17:15 ` Khem Raj
2020-12-18 11:30 ` Christian Eggers
2020-12-18 16:32 ` Khem Raj [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=52f8e74e-284e-60d7-757e-843a8b5a7de3@gmail.com \
--to=raj.khem@gmail.com \
--cc=ceggers@arri.de \
--cc=kergoth@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