[Bug lto/47241] lto not work on mingw32, reporting 'ld.exe: could not unlink output file'
ktietz at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 8 15:41:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47241
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011.02.08 15:38:59
CC| |ktietz at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-02-08 15:38:59 UTC ---
Hmm, this could be related to wrapper and file-removing there.
Does this patch fixes the issue you have?
Index: lto-plugin.c
===================================================================
--- lto-plugin.c (revision 169926)
+++ lto-plugin.c (working copy)
@@ -660,12 +660,14 @@
if (arguments_file_name)
{
t = unlink (arguments_file_name);
+ if (t != 0 && errno == ENOENT) t = 0;
check (t == 0, LDPL_FATAL, "could not unlink arguments file");
}
for (i = 0; i < num_output_files; i++)
{
t = unlink (output_files[i]);
+ if (t != 0 && errno == ENOENT) t = 0;
check (t == 0, LDPL_FATAL, "could not unlink output file");
}
More information about the Gcc-bugs
mailing list