binutils fails to set ld.gold as default
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
Quoted 18 lines · Florin Sarbu
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'sconf/local.confDISTRO_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.goldAll 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
Quoted 6 lines
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
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
Quoted 35 lines · Richard Purdie
Quoted 18 lines · Florin Sarbu
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'sconf/local.confDISTRO_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.goldAll 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
Quoted 6 lines
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
Quoted 6 lines · Florin Sarbu
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
What exactly do you wanna see in the output? I can post the variables you are looking for.
Florin
Quoted 10 lines · Khem Raj
Quoted 6 lines · Florin Sarbu
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
Quoted 2 lines · Florin Sarbu
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
Quoted 24 lines
Florin
Quoted 17 lines · Khem Raj
Quoted 11 lines · Florin Sarbu
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
You're right, the symbolic link pointing to this "regular" ld confused me. Looking at it's version, it clearly says gold.
Thank you.
Quoted 41 lines · Khem Raj
Quoted 2 lines · Florin Sarbu
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 binaries1. Default linker - <cross>-ld
2. Gold linker - <cross>-ld.gold
3. GNU ld - <cross>-ld.bfd1 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
Quoted 19 lines
Florin
Quoted 14 lines · Khem Raj
Quoted 10 lines · Florin Sarbu
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