OSDN Git Service

2010-05-27 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 10:33:08 +0000 (10:33 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 May 2010 10:33:08 +0000 (10:33 +0000)
* lto-wrapper.c (maybe_unlink_file): Ignore unlink failure
for non-existant files.
(fork_execute): Mark args_name file as deleted.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159913 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/lto-wrapper.c

index 9489194..027c810 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-27  Richard Guenther  <rguenther@suse.de>
+
+       * lto-wrapper.c (maybe_unlink_file): Ignore unlink failure
+       for non-existant files.
+       (fork_execute): Mark args_name file as deleted.
+
 2010-05-27  Kai Tietz  <kai.tietz@onevision.com>
 
        PR bootstrp/44287
index 536ca09..7454b54 100644 (file)
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 
 #include "config.h"
 #include "system.h"
+#include <errno.h>
 #include "coretypes.h"
 #include "tm.h"
 #include "intl.h"
@@ -222,7 +223,8 @@ maybe_unlink_file (const char *file)
 {
   if (! debug)
     {
-      if (unlink_if_ordinary (file))
+      if (unlink_if_ordinary (file)
+         && errno != ENOENT)
        fatal_perror ("deleting LTRANS file %s", file);
     }
   else
@@ -262,6 +264,7 @@ fork_execute (char **argv)
   collect_wait (new_argv[0], pex);
 
   maybe_unlink_file (args_name);
+  args_name = NULL;
   free (at_args);
 }