diff options
author | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-04 08:05:52 +0000 |
---|---|---|
committer | hainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-05-04 08:05:52 +0000 |
commit | 2b98e22bd8af0c0d0b0e02720a508dcea3672658 (patch) | |
tree | 9b72ad775413c2a0a25e1d2594e350d5480b8620 /gcc/tlink.c | |
parent | e2efe9af04a8879ce46534dd3a19558b58fa9734 (diff) | |
download | gcc-2b98e22bd8af0c0d0b0e02720a508dcea3672658.tar.gz |
* collect2.c (may_unlink_output_file): New global.
(maybe_unlink): Honor it.
* collect2.h: Add extern for it.
* tlink.c (do_tlink): Set it to true if the link succeeded.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r-- | gcc/tlink.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c index 67c7086ceb1..c4c6afc0148 100644 --- a/gcc/tlink.c +++ b/gcc/tlink.c @@ -859,4 +859,10 @@ do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED) error ("ld returned %d exit status", exit); collect_exit (exit); } + else + { + /* We have just successfully produced an output file, so assume that we + may unlink it if need be for now on. */ + may_unlink_output_file = true; + } } |