Bug 12664 - ld bug ?
Summary: ld bug ?
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.21
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 02:05 UTC by ralph engels
Modified: 2011-06-30 15:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ralph engels 2011-04-12 02:05:30 UTC
first time here so bear with me.

im encountering some trouble bootstrapping gcc-4.6.0 on mingw64,
unfortunatly the error is a bit obscure. see below.

collect2: ld returned 116 exit status
make[3]: *** [lto1.exe] Error 1
make[3]: *** Waiting for unfinished jobs....
collect2: ld returned 116 exit status
make[3]: *** [cc1.exe] Error 1
rm gcc.pod
make[3]: Leaving directory `/e/sources/build64/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/e/sources/build64'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/e/sources/build64'
make: *** [all] Error 2

error allways happens in stage 1 bootstrap when building the 64 bit version of 

gcc.

the real weird one is that the 32 bit bootstrap of gcc works fine.

binutils 2.20 works it seems, but only with an older version of gcc to 

bootstrap gcc-4.6.0.  

what im not sure about is it a bug in binutils on windows or a gcc bug ?.
Comment 1 Nick Clifton 2011-06-30 13:33:02 UTC
Hi Ralph,

  It is is hard to be sure without a simpler test case, but I suspect that this is actually a gcc problem - specifically the link-time-optimization feature.  Are you able to bootstrap without using the -flto gcc command line flag ?

Cheers
  Nick
Comment 2 ralph engels 2011-06-30 15:31:19 UTC
it was indeed a gcc bug and fixed in 4.6.1 took me quite a while to hunt it down but as it turned out it was a typo in cppspec.c causing cpp.exe to be unable to parse files.

i use the git version of binutils and the lto trouble seems to be solved in that version.
2.21.51 failed at using lto though if i used the 64 bit build the 32 bit build worked ok.

allways a few things to hammer down on new tech :)