aboutsummaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2012-05-04 08:05:52 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2012-05-04 08:05:52 +0000
commit9178a345850d1c35cc1fe2bed529a8a0029c4251 (patch)
tree9b72ad775413c2a0a25e1d2594e350d5480b8620 /gcc/tlink.c
parentb50ff8bbb379d7be46b3e516e02e4c9ed08d3c14 (diff)
downloadgcc-9178a345850d1c35cc1fe2bed529a8a0029c4251.zip
gcc-9178a345850d1c35cc1fe2bed529a8a0029c4251.tar.gz
gcc-9178a345850d1c35cc1fe2bed529a8a0029c4251.tar.bz2
collect2.c (may_unlink_output_file): New global.
* 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. From-SVN: r187148
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 67c7086..c4c6afc 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;
+ }
}