|
From: bernd K. <bay...@ho...> - 2011-08-04 13:10:03
|
Hello, Recently I build gcc 4.6.1, using gcc 4.5.2. I found out some issues with various binutils versions. Since I see a new mingw binutils (2.21.1) has been recently officially and since it seems mingw's gcc 4.6 will be released soon I think my feedback could be interesting for the devs, in case they are not aware yet. When I built gcc 4.6.1, the current official release of binutils posted on mingw was 2.21. This version was fine to compile gcc 4.6.1. But it was buggy when used with gcc 4.6.1 when link time optimization is enabled ie gcc4.6.1.exe -flto hello.c :"could not unlink output file collect2: ld returned 1 exit status" I found http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47241 that describe the same bug. Then I downloaded binutils 2.21.1, compiled and installed it. And the bug was gone. So problem resolved. The next problem was that this bintutils 2.21.1 introduces another bug (not present in 2.21). I tried to recompile gcc 4.6.1 using my freshly compiled 4.6.1 + binutils 2.21.1 (also compiled by me) and found out that libstdc++.dll.a was only 2260 bytes instead of about 2 mb. This lead me to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47753. The bug has been fixed in binutils CVS but is still present in the latest release. I had to use a snapshot that worked perfectly. Yesterday I saw that the mingw devs recently published an official release of binutils. I tested it but, as expected, it has the same problem that my own build. That's the main reason why I decided to post here, to warn that (according to my tests) binutils 2.21.1 release introduces a bug not present in 2.21. To sum up: binutils 2.21 + gcc 4.6.1: LTO bug binutils 2.21.1 + gcc 4.6.1: no LTO bug, but libstdc++.dll.a is broken when compiling gcc 4.6.1. The same problem may also occurs when compiling other dlls. binutils CVS + gcc 4.6.1: works fine! I very rarely post on mailing lists, so sorry if I do some things wrong. |