This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,take2] Re: [PATCH] Fix PR46291: broken lto-bootstrap [was Re: Discussion about merging Go frontend]


On 03/11/2010 21:10, Ian Lance Taylor wrote:
> Dave Korn <dave.korn.cygwin@gmail.com> writes:
> 
>> 2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>
>>
>> 	* lto-plugin.c (must_close_files): New global bool.
>> 	(claim_file_handler): Respect it.
>> 	(onload): Set it if loaded by GNU LD.
>>
>>   Now LTO-bootstrapping on x86_64-unknown-linux-gnu.  OK once it completes
>> successfully?
> 
> This is OK if bootstrap succeeds.

  (As you may already have seen in the audit trail), Cary says that the fd is
supposed to belong to the linker, and the plugin should never close it.  So
this simpler patch does that, and I'll fix up LD to do likewise.

2010-11-03  Dave Korn  <dave.korn.cygwin@gmail.com>

	* lto-plugin.c (claim_file_handler): Don't close file descriptor.


  OK likewise after it passes bootstrap?

    cheers,
      DaveK
Index: gcc-patched/lto-plugin/lto-plugin.c
===================================================================
--- gcc-patched/lto-plugin/lto-plugin.c	(revision 166233)
+++ gcc-patched/lto-plugin/lto-plugin.c	(working copy)
@@ -886,8 +886,6 @@ claim_file_handler (const struct ld_plugin_input_f
  cleanup:
   if (obj.objfile)
     simple_object_release_read (obj.objfile);
-  if (file->fd >= 0)
-    close (file->fd);
 
   return LDPS_OK;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]