summaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-05-27 10:33:08 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-05-27 10:33:08 +0000
commit62116e601b614aafe9a7453b26b43d1cfa1d0f8d (patch)
tree17f90c823067884b595a794fcd35c1eede173f96 /gcc/lto-wrapper.c
parent64c31785445fdd307b4d918747825405def267d1 (diff)
downloadgcc-62116e601b614aafe9a7453b26b43d1cfa1d0f8d.tar.gz
lto-wrapper.c (maybe_unlink_file): Ignore unlink failure for non-existant files.
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. From-SVN: r159913
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 536ca092f71..7454b54af79 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -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);
}