Bug 49392 - [arm] spurious EABI version mismatches when LTO enabled
Summary: [arm] spurious EABI version mismatches when LTO enabled
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-13 14:33 UTC by philb
Modified: 2011-06-15 14:57 UTC (History)
1 user (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description philb 2011-06-13 14:33:42 UTC
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:~$
Comment 1 Ramana Radhakrishnan 2011-06-14 11:31:55 UTC
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
Comment 2 Richard Biener 2011-06-14 12:40:03 UTC
There wasn't any change on the branch that would change this.
Comment 3 philb 2011-06-15 14:57:32 UTC
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.