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

--- Comment #31 from Mike Stump <mikestump at comcast dot net> 2010-12-04 
00:18:07 UTC ---
On Dec 3, 2010, at 3:20 PM, rguenther at suse dot de wrote:
> yes, I would have expected that this happens already.  Now, I (or
> somebody else) needs to take the time and investigate why this
> doesn't happen.

Ah, I can explain it, collect2 does `stuff', and what it does is to remove the
lto temporary files, early.  The below are the files that are too early, and
will `fix' the issue.

Index: collect2.c
===================================================================
--- collect2.c    (revision 167409)
+++ collect2.c    (working copy)
@@ -1056,7 +1056,9 @@
       fork_execute ("ld", out_lto_ld_argv);
       free (lto_ld_argv);

+#if 0
       maybe_unlink_list (lto_o_files);
+#endif
     }
   else if (force)
     {

If collect2 was folded into gcc.c and all the lto stuff was flat, inside gcc.c
and then we let record_temp_file register _all_ the temporary files, and the
let gcc.c delete the temporary files at the end, all work work just fine.

Reply via email to