[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 Richard Guenther changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|

[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 --- Comment #5 from Jan Hubicka 2011-01-06 18:50:22 UTC --- Author: hubicka Date: Thu Jan 6 18:50:20 2011 New Revision: 168548 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168548 Log: PR lto/47188 * collect2.c (main): Do not e

[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread d.g.gorbachev at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 --- Comment #4 from Dmitry Gorbachev 2011-01-06 14:45:17 UTC --- Collect2-based LTO (when CFLAGS = -flto -fwhole-program) fails, too.

[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 --- Comment #3 from Jan Hubicka 2011-01-06 13:44:09 UTC --- The problem is that collect2 should be in LTO_MODE_NONE when plugin is used but it confuses itself and sets itself into LTO_MODE_LTO. Consequently compilation is done twice, once correct

Re: [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread Jan Hubicka
The problem is that collect2 should be in LTO_MODE_NONE when plugin is used but it confuses itself and sets itself into LTO_MODE_LTO. Consequently compilation is done twice, once correctly with plugin and then once again with collect2 path. I am testing the attached patch. It will also make non-

[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 --- Comment #2 from Jan Hubicka 2011-01-06 13:31:36 UTC --- This is driver bug. With -flto-partition=none it for whatever reason forgets about -fresolution: ../lto1 -quiet -dumpdir ./ -dumpbase prog -mtune=generic -march=x86-64 -auxbase-strip

Re: [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread Jan Hubicka
This is driver bug. With -flto-partition=none it for whatever reason forgets about -fresolution: ../lto1 -quiet -dumpdir ./ -dumpbase prog -mtune=generic -march=x86-64 -auxbase-strip /tmp/cctgIO6R.lto.o -version -flto-partition=none -fuse-linker-plugin -fwhole-program -fdump-ipa-all-details @

[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files

2011-01-06 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188 --- Comment #1 from Jan Hubicka 2011-01-06 13:18:03 UTC --- The bug seems to be that lto-symtab incorrectly sets resolution info of the callgraph node as unknown. Looking into it. Honza