This is the mail archive of the
mailing list for the GCC project.
[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 <firstname.lastname@example.org> writes:
>> 2010-11-03 Dave Korn <email@example.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
> 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 <firstname.lastname@example.org>
* lto-plugin.c (claim_file_handler): Don't close file descriptor.
OK likewise after it passes bootstrap?
--- 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
- if (file->fd >= 0)
- close (file->fd);