[Bug lto/47241] lto not work on mingw32, reporting 'ld.exe: could not unlink output file'

dongsheng.song at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Feb 15 08:33:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47241

--- Comment #19 from Dongsheng Song <dongsheng.song at gmail dot com> 2011-02-15 08:23:35 UTC ---
(In reply to comment #18)
> Well, I see the issue you are describing here, but it isn't any longer related
> to this PR. So please open an new PR for it.
> 
> So I close this bug as fixed.
> 
> Regards,
> Kai
> 
> PS:I assume that you won't have the issue by using -static option on gcc
> command-line.

No, maybe the another bug mix up you eyes:-)

Even for static link, lto still not works fine for Hello.c:

C:\>g++ -pipe -O2 -flto -o Hello.c.exe Hello.c
C:\>Hello.c.exe
<Pop up a NULL pointer dialog>

C:\>g++ -pipe -O2 -flto -static -o Hello.c.static.exe Hello.c
C:\>Hello.c.static.exe
<Pop up a NULL pointer dialog>

C:\>g++ -pipe -O2 -o Hello.exe Hello.c
C:\>Hello.exe
Hello, World!



More information about the Gcc-bugs mailing list