This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 6 Jan 2011 13:44:12 +0000
- Subject: [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
- Auto-submitted: auto-generated
- References: <bug-47188-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> 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 correctly with plugin and then once again with collect2
path.
I am testing the attached patch. It will also make non-WHOPR mode twice as
fast ;))
Honza
Index: collect2.c
===================================================================
--- collect2.c (revision 168508)
+++ collect2.c (working copy)
@@ -1236,7 +1236,7 @@ main (int argc, char **argv)
#endif
}
vflag = debug;
- if (no_partition)
+ if (no_partition && lto_mode == LTO_MODE_WHOPR)
lto_mode = LTO_MODE_LTO;
}