aboutsummaryrefslogtreecommitdiff
path: root/gcc/tlink.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2013-06-19 23:51:05 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2013-06-19 19:51:05 -0400
commite1f9340b007679e863f99d26c29fd6ee2ddbd92e (patch)
tree577f4229ae37691c56e97e8f33c2bef3c116bbfc /gcc/tlink.c
parente3f9e0acec78644ef45ec984b062c856fc53a9e0 (diff)
downloadgcc-e1f9340b007679e863f99d26c29fd6ee2ddbd92e.zip
gcc-e1f9340b007679e863f99d26c29fd6ee2ddbd92e.tar.gz
gcc-e1f9340b007679e863f99d26c29fd6ee2ddbd92e.tar.bz2
re PR driver/57652 (collect2 does not clean up temporary files)
PR driver/57652 * collect2.c (collect_atexit): New. (collect_exit): Delete. (main): Register collect_atexit with atexit. (collect_wait): Change collect_exit to exit. (do_wait): Same. * collect2.h (collect_exit): Delete. * tlink.c (do_tlink): Rename exit to ret. Change collect_exit to exit. From-SVN: r200226
Diffstat (limited to 'gcc/tlink.c')
-rw-r--r--gcc/tlink.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tlink.c b/gcc/tlink.c
index 7a64c79..8365bd3 100644
--- a/gcc/tlink.c
+++ b/gcc/tlink.c
@@ -817,18 +817,18 @@ scan_linker_output (const char *fname)
void
do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED)
{
- int exit = tlink_execute ("ld", ld_argv, ldout, lderrout);
+ int ret = tlink_execute ("ld", ld_argv, ldout, lderrout);
tlink_init ();
- if (exit)
+ if (ret)
{
int i = 0;
/* Until collect does a better job of figuring out which are object
files, assume that everything on the command line could be. */
if (read_repo_files (ld_argv))
- while (exit && i++ < MAX_ITERATIONS)
+ while (ret && i++ < MAX_ITERATIONS)
{
if (tlink_verbose >= 3)
{
@@ -843,7 +843,7 @@ do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED)
break;
if (tlink_verbose)
fprintf (stderr, _("collect: relinking\n"));
- exit = tlink_execute ("ld", ld_argv, ldout, lderrout);
+ ret = tlink_execute ("ld", ld_argv, ldout, lderrout);
}
}
@@ -851,10 +851,10 @@ do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED)
unlink (ldout);
dump_ld_file (lderrout, stderr);
unlink (lderrout);
- if (exit)
+ if (ret)
{
- error ("ld returned %d exit status", exit);
- collect_exit (exit);
+ error ("ld returned %d exit status", ret);
+ exit (ret);
}
else
{