Openembedded Core Discussions
 help / color / mirror / Atom feed
* binutils fails to set ld.gold as default
@ 2012-09-21 13:32 Florin Sarbu
  2012-09-21 13:58 ` Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Florin Sarbu @ 2012-09-21 13:32 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

Hi all,
I am facing an issue trying to use ld.gold as the default ld on a poky 
build. I've added to my build's conf/local.conf DISTRO_FEATURES_append = 
"ld-is-gold" so I get in 
tmp-eglibc-eglibc/sysroots/i686-linux/usr/bin/armv7a-vfp-neon-oe-linux-gnueabi 
the following (amongst others):

arm-oe-linux-gnueabi-ld
arm-oe-linux-gnueabi-ld.bfd
arm-oe-linux-gnueabi-ld.gold

All good so far. But looking into 
tmp-eglibc-eglibc/sysroots/i686-linux/usr/libexec/armv7a-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2 
I see:

ld -> 
../../../../../bin/armv7a-vfp-neon-oe-linux-gnueabi/arm-oe-linux-gnueabi-ld

 From the binutils.inc recipe, in EXTRA_OECONF: 
${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default 
--enable-threads', '', d)}
Shouldn't that have made ld point to ld.gold?

Any thoughts/ideas on why this is happening?

Thank you,
Florin



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-21 13:32 binutils fails to set ld.gold as default Florin Sarbu
@ 2012-09-21 13:58 ` Richard Purdie
  2012-09-21 19:47   ` Florin Sarbu
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2012-09-21 13:58 UTC (permalink / raw)
  To: Florin Sarbu; +Cc: Patches and discussions about the oe-core layer

On Fri, 2012-09-21 at 16:32 +0300, Florin Sarbu wrote:
> Hi all,
> I am facing an issue trying to use ld.gold as the default ld on a poky 
> build. I've added to my build's conf/local.conf DISTRO_FEATURES_append = 
> "ld-is-gold" so I get in 
> tmp-eglibc-eglibc/sysroots/i686-linux/usr/bin/armv7a-vfp-neon-oe-linux-gnueabi 
> the following (amongst others):
> 
> arm-oe-linux-gnueabi-ld
> arm-oe-linux-gnueabi-ld.bfd
> arm-oe-linux-gnueabi-ld.gold
> 
> All good so far. But looking into 
> tmp-eglibc-eglibc/sysroots/i686-linux/usr/libexec/armv7a-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2 
> I see:
> 
> ld -> 
> ../../../../../bin/armv7a-vfp-neon-oe-linux-gnueabi/arm-oe-linux-gnueabi-ld
> 
>  From the binutils.inc recipe, in EXTRA_OECONF: 
> ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default 
> --enable-threads', '', d)}
> Shouldn't that have made ld point to ld.gold?
> 
> Any thoughts/ideas on why this is happening?

Its probably not enabled. Try:

DISTRO_FEATURES_append = " ld-is-gold"

note the extra space.

Cheers,

Richard




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-21 13:58 ` Richard Purdie
@ 2012-09-21 19:47   ` Florin Sarbu
  2012-09-21 21:53     ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Florin Sarbu @ 2012-09-21 19:47 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

It is enabled. As I said earlier, ld.gold gets created, it's just that 
ld is not pointing to it even though the flag says 
--enable-gold=default. It still point to the regular cross ld. Another 
config option that creates ld.gold is --enable-ld=yes, so at this point 
default looks exactly like yes.
Just to be extra sure, I did try to add the extra space as you suggested 
but the behaviour is the same.

Thanks,
Florin

On 09/21/2012 04:58 PM, Richard Purdie wrote:
> On Fri, 2012-09-21 at 16:32 +0300, Florin Sarbu wrote:
>> Hi all,
>> I am facing an issue trying to use ld.gold as the default ld on a poky
>> build. I've added to my build's conf/local.conf DISTRO_FEATURES_append =
>> "ld-is-gold" so I get in
>> tmp-eglibc-eglibc/sysroots/i686-linux/usr/bin/armv7a-vfp-neon-oe-linux-gnueabi
>> the following (amongst others):
>>
>> arm-oe-linux-gnueabi-ld
>> arm-oe-linux-gnueabi-ld.bfd
>> arm-oe-linux-gnueabi-ld.gold
>>
>> All good so far. But looking into
>> tmp-eglibc-eglibc/sysroots/i686-linux/usr/libexec/armv7a-vfp-neon-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.7.2
>> I see:
>>
>> ld ->
>> ../../../../../bin/armv7a-vfp-neon-oe-linux-gnueabi/arm-oe-linux-gnueabi-ld
>>
>>   From the binutils.inc recipe, in EXTRA_OECONF:
>> ${@base_contains('DISTRO_FEATURES', 'ld-is-gold', '--enable-gold=default
>> --enable-threads', '', d)}
>> Shouldn't that have made ld point to ld.gold?
>>
>> Any thoughts/ideas on why this is happening?
> Its probably not enabled. Try:
>
> DISTRO_FEATURES_append = " ld-is-gold"
>
> note the extra space.
>
> Cheers,
>
> Richard
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-21 19:47   ` Florin Sarbu
@ 2012-09-21 21:53     ` Khem Raj
  2012-09-22  6:53       ` Florin Sarbu
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-09-21 21:53 UTC (permalink / raw)
  To: Florin Sarbu; +Cc: Patches and discussions about the oe-core layer

On Fri, Sep 21, 2012 at 12:47 PM, Florin Sarbu
<florin.sarbu@windriver.com> wrote:
> It is enabled. As I said earlier, ld.gold gets created, it's just that ld is
> not pointing to it even though the flag says --enable-gold=default. It still
> point to the regular cross ld. Another config option that creates ld.gold is
> --enable-ld=yes, so at this point default looks exactly like yes.
> Just to be extra sure, I did try to add the extra space as you suggested but
> the behaviour is the same.

post the output of
bitbake -e binutils-cross



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-21 21:53     ` Khem Raj
@ 2012-09-22  6:53       ` Florin Sarbu
  2012-09-23  3:41         ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Florin Sarbu @ 2012-09-22  6:53 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches, discussions about the oe-core layer

What exactly do you wanna see in the output? I can post the variables 
you are looking for.

Florin

On 09/22/2012 12:53 AM, Khem Raj wrote:
> On Fri, Sep 21, 2012 at 12:47 PM, Florin Sarbu
> <florin.sarbu@windriver.com> wrote:
>> It is enabled. As I said earlier, ld.gold gets created, it's just that ld is
>> not pointing to it even though the flag says --enable-gold=default. It still
>> point to the regular cross ld. Another config option that creates ld.gold is
>> --enable-ld=yes, so at this point default looks exactly like yes.
>> Just to be extra sure, I did try to add the extra space as you suggested but
>> the behaviour is the same.
> post the output of
> bitbake -e binutils-cross




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-22  6:53       ` Florin Sarbu
@ 2012-09-23  3:41         ` Khem Raj
  2012-09-23  7:51           ` Florin Sarbu
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2012-09-23  3:41 UTC (permalink / raw)
  To: Florin Sarbu; +Cc: Patches and discussions about the oe-core layer

On Fri, Sep 21, 2012 at 11:53 PM, Florin Sarbu
<florin.sarbu@windriver.com> wrote:
> What exactly do you wanna see in the output? I can post the variables you
> are looking for.

why cant you pastebin the whole file ? anyhow you are probably looking
at a red herring
build will create three linker binaries

1. Default linker - <cross>-ld
2. Gold linker - <cross>-ld.gold
3. GNU ld - <cross>-ld.bfd

1 above will be copy of either ld.gold or ld.bfd depending upon what
you have chosen
as default.

run <cross>-ls -v

to see the version of linker. If it is gold then it will say so



>
> Florin
>
>
> On 09/22/2012 12:53 AM, Khem Raj wrote:
>>
>> On Fri, Sep 21, 2012 at 12:47 PM, Florin Sarbu
>> <florin.sarbu@windriver.com> wrote:
>>>
>>> It is enabled. As I said earlier, ld.gold gets created, it's just that ld
>>> is
>>> not pointing to it even though the flag says --enable-gold=default. It
>>> still
>>> point to the regular cross ld. Another config option that creates ld.gold
>>> is
>>> --enable-ld=yes, so at this point default looks exactly like yes.
>>> Just to be extra sure, I did try to add the extra space as you suggested
>>> but
>>> the behaviour is the same.
>>
>> post the output of
>> bitbake -e binutils-cross
>
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: binutils fails to set ld.gold as default
  2012-09-23  3:41         ` Khem Raj
@ 2012-09-23  7:51           ` Florin Sarbu
  0 siblings, 0 replies; 7+ messages in thread
From: Florin Sarbu @ 2012-09-23  7:51 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches, discussions about the oe-core layer

You're right, the symbolic link pointing to this "regular" ld confused 
me. Looking at it's version, it clearly says gold.

Thank you.

On 09/23/2012 06:41 AM, Khem Raj wrote:
> On Fri, Sep 21, 2012 at 11:53 PM, Florin Sarbu
> <florin.sarbu@windriver.com> wrote:
>> What exactly do you wanna see in the output? I can post the variables you
>> are looking for.
> why cant you pastebin the whole file ? anyhow you are probably looking
> at a red herring
> build will create three linker binaries
>
> 1. Default linker - <cross>-ld
> 2. Gold linker - <cross>-ld.gold
> 3. GNU ld - <cross>-ld.bfd
>
> 1 above will be copy of either ld.gold or ld.bfd depending upon what
> you have chosen
> as default.
>
> run <cross>-ls -v
>
> to see the version of linker. If it is gold then it will say so
>
>
>
>> Florin
>>
>>
>> On 09/22/2012 12:53 AM, Khem Raj wrote:
>>> On Fri, Sep 21, 2012 at 12:47 PM, Florin Sarbu
>>> <florin.sarbu@windriver.com> wrote:
>>>> It is enabled. As I said earlier, ld.gold gets created, it's just that ld
>>>> is
>>>> not pointing to it even though the flag says --enable-gold=default. It
>>>> still
>>>> point to the regular cross ld. Another config option that creates ld.gold
>>>> is
>>>> --enable-ld=yes, so at this point default looks exactly like yes.
>>>> Just to be extra sure, I did try to add the extra space as you suggested
>>>> but
>>>> the behaviour is the same.
>>> post the output of
>>> bitbake -e binutils-cross
>>




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-23  8:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 13:32 binutils fails to set ld.gold as default Florin Sarbu
2012-09-21 13:58 ` Richard Purdie
2012-09-21 19:47   ` Florin Sarbu
2012-09-21 21:53     ` Khem Raj
2012-09-22  6:53       ` Florin Sarbu
2012-09-23  3:41         ` Khem Raj
2012-09-23  7:51           ` Florin Sarbu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox