On Sun, Jul 3, 2011 at 6:27 AM, Ian Lance Taylor <i...@google.com> wrote: > Jon Grant <j...@jguk.org> writes: > >> On 2 February 2010 22:47, Ian Lance Taylor <i...@google.com> wrote: >>> Jon <j...@jguk.org> writes: >>> >>>> Is there a way to get collect2 to save the temporary .c file it >>>> generates to have a look at it? I believe it may be the __main() >>>> function, with the -debug option it gives the attached >>>> gplusplus_collect2_log.txt, looking at the [/tmp/ccyBAI9V.c] file >>>> though it is empty, any ideas? >>> >>> Using -debug will direct collect2 to save the temporary .c file when >>> it creates one. However, in ordinary use on GNU/Linux, collect2 will >>> never generate a temporary .c file. >> >> Hello Ian, >> >> Another reply for this old thread. I wondered, if collect2 is >> possibly not needed in normal use on GNU/Linux, could GCC be >> configured to call ld directly in those cases to save launching >> another binary. > > collect2 is needed if you use -frepo or -flto.
For -flto only if you do not use a linker plugin to make lto work. Richard. > Ian >