Re: Segmentation fault whew cross-compiling with included dll-s

2011-01-23 Thread Mojca Miklavec
On Sun, Jan 23, 2011 at 04:38, Alan Modra wrote: > On Fri, Jan 21, 2011 at 05:56:09PM +0100, Mojca Miklavec wrote: >> I have put the files and make-osx.sh/make-win.bat to a temporary location >>     http://ol.ijs.si/~mojca/osciloskop/linker.zip > > You would probably be better off asking these ques

Re: Segmentation fault whew cross-compiling with included dll-s

2011-01-23 Thread Alan Modra
On Sun, Jan 23, 2011 at 10:55:49AM +0100, Mojca Miklavec wrote: > http://ol.ijs.si/~mojca/osciloskop/linker-with-libs.tar.gz $ ~/build/gas/i586-mingw32/ld/ld-new -Bdynamic -o main.exe crt2.o crtbegin.o -L. ccDm0qY9.o cc0NneNj.o -lps4000 -lstdc++ -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt

Re: Segmentation fault whew cross-compiling with included dll-s

2011-01-23 Thread Mojca Miklavec
On Sun, Jan 23, 2011 at 14:58, Alan Modra wrote: > On Sun, Jan 23, 2011 at 10:55:49AM +0100, Mojca Miklavec wrote: >>     http://ol.ijs.si/~mojca/osciloskop/linker-with-libs.tar.gz > > $ ~/build/gas/i586-mingw32/ld/ld-new -Bdynamic -o main.exe crt2.o crtbegin.o > -L. ccDm0qY9.o cc0NneNj.o -lps4000

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 --- Comment #12 from H.J. Lu 2011-01-23 18:36:38 UTC --- (In reply to comment #10) > (In reply to comment #9) > > When there are "IR-object non-IR-archive IR-object" on command line, > > LTO makes it equivalent to "IR-object IR-object non-IR-a

[Bug ld/12314] No LTO, LD silently links to non-IR code

2011-01-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12314 --- Comment #3 from H.J. Lu 2011-01-23 19:12:29 UTC --- I checked in a different fix with commit baf9b44566e088687f28f9fe476122876c1d2f4d. Now you will get /usr/gcc-4.6/bin/gcc -B./ -O -flto -c -o bar.o bar.c ar cr libbar.a bar.o /usr/gcc-4

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 --- Comment #13 from H.J. Lu 2011-01-23 19:13:20 UTC --- (In reply to comment #10) > It also happens with IR-archive (though IR is not used: "ld.hjl: LTO IR > sections in libdiv.a(div.o) aren't used in stage 2 linking"). > Fixed by commit ba

Re: Segmentation fault whew cross-compiling with included dll-s

2011-01-23 Thread Alan Modra
On Sun, Jan 23, 2011 at 05:30:50PM +0100, Mojca Miklavec wrote: > Do you want to say that the latest version of ld doesn't crash Yes. > and > generates a valid binary main.exe? That I don't know. I don't have a mingw system to run it on. > If yes - may I ask for some link to instructions how t

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread d.g.gorbachev at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 --- Comment #14 from Dmitry Gorbachev 2011-01-23 23:14:20 UTC --- Now `gcc -B./ -o foo -O2 -fwhole-program -flto=jobserver -fuse-linker-plugin x.o libdiv.a y.o' uses __udivdi3 from libgcc. Plain non-LTO link takes it from libdiv.a. Inconsisten

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 --- Comment #15 from H.J. Lu 2011-01-23 23:38:41 UTC --- (In reply to comment #14) > Now `gcc -B./ -o foo -O2 -fwhole-program -flto=jobserver -fuse-linker-plugin > x.o > libdiv.a y.o' uses __udivdi3 from libgcc. Plain non-LTO link takes it fro

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread d.g.gorbachev at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 Dmitry Gorbachev changed: What|Removed |Added CC||d.g.gorbachev at gmail dot

[Bug ld/12248] Linker plugin failed to preserve linking order

2011-01-23 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=12248 --- Comment #17 from H.J. Lu 2011-01-24 01:24:01 UTC --- (In reply to comment #16) > It looks counterintuitive to me. > > > LTO in x.o doesn't reference __udivdi3 > > But a reference to __udivdi3 from bar is generated on LTO step: > /tmp/ccz