Skip to contentSkip to conversation

gold and -flto option

DISCUSSION Enrico Scholz 2 participants 2 messages May 18, 2012

lore
Share & tools
lore
#0 lore raw

Hi,

after enabling gold linker (ld-is-gold DISTRO_FEATURE), the '-flto -fuse-linker-plugin' build options do not work anymore as with the old bfd linker. I am using the toolchain layer of oe-meta.

Is this expected or just some issue with our gcc?

Enrico

---- with ld-is-gold ----

$ arm-linux-gnueabi-gcc -flto -fuse-linker-plugin /tmp/x.c
.../4.7.1/arm-linux-gnueabi-ld: -plugin: unknown option
.../4.7.1/arm-linux-gnueabi-ld: use the --help option for usage information
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (GCC) 4.7.1 20120421 (prerelease)
...
$ arm-linux-gnueabi-ld --version
GNU gold (GNU Binutils 2.22) 1.11

---- without ld-is-gold ----

$ arm-linux-gnueabi-gcc -flto -fuse-linker-plugin /tmp/x.c
$
$ arm-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22
#1 lore raw
Quoted 24 lines · Enrico Scholz

Hi,

after enabling gold linker (ld-is-gold DISTRO_FEATURE), the '-flto -fuse-linker-plugin' build options do not work anymore as with the old bfd linker.  I am using the toolchain layer of oe-meta.

Is this expected or just some issue with our gcc?

Enrico

---- with ld-is-gold ----

$ arm-linux-gnueabi-gcc -flto -fuse-linker-plugin /tmp/x.c
.../4.7.1/arm-linux-gnueabi-ld: -plugin: unknown option
.../4.7.1/arm-linux-gnueabi-ld: use the --help option for usage information
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (GCC) 4.7.1 20120421 (prerelease)
...
$ arm-linux-gnueabi-ld --version
GNU gold (GNU Binutils 2.22) 1.11
Quoted 7 lines

---- without ld-is-gold ----

$ arm-linux-gnueabi-gcc -flto -fuse-linker-plugin /tmp/x.c
$
$ arm-linux-gnueabi-ld --version
GNU ld (GNU Binutils) 2.22

you need something like
https://lists.yoctoproject.org/pipermail/poky/2012-January/007488.html

this needs to go into OE-Core in some form.

Quoted 4 lines

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core