Attempting to build even a trivial executable with -flto yields: pb@lander:~$ cat t.c #include <stdio.h> int main() { printf("Hello world"); } pb@lander:~$ arm-oe-linux-gnueabi-gcc -flto t.c /home/pb/oe/build-giga/tmp-eglibc/sysroots/x86_64-linux/libexec/armv6-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.6.0/arm-oe-linux-gnueabi-ld: error: Source object /tmp/cc60ozAJ.o.ironly has EABI version 0, but target a.out has EABI version 5 /home/pb/oe/build-giga/tmp-eglibc/sysroots/x86_64-linux/libexec/armv6-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.6.0/arm-oe-linux-gnueabi-ld: failed to merge target specific data of file /tmp/cc60ozAJ.o.ironly collect2: ld returned 1 exit status pb@lander:~$
It looks like a linker error but ... Hmmm with a later version of gcc 4.6 branch that I have lying around the same example doesn't spew out such error messages. I don't have a 4.6.0 build handy to try this. I seem to be running binutils 2.21.51.20110525 FTR. cheers Ramana
There wasn't any change on the branch that would change this.
I just tried a different linker and that does seem to have made the problem go away. So I guess there is no gcc bug here. Thanks.