diff options
author | Bernd Schmidt <bernds@codesourcery.com> | 2014-06-26 09:16:19 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2014-06-26 09:16:19 +0000 |
commit | 608508a67719de05d2144200325662bda7204adc (patch) | |
tree | f0d0a3f3ffbbb64530f9c1a1a860983cd9984b28 /gcc/collect-utils.c | |
parent | a185856a06e7b26a06229563b2b01b92e6a4589b (diff) | |
download | gcc-608508a67719de05d2144200325662bda7204adc.zip gcc-608508a67719de05d2144200325662bda7204adc.tar.gz gcc-608508a67719de05d2144200325662bda7204adc.tar.bz2 |
Small cleanups before making collect2 use collect-utils.
* collect-utils.c (save_temps): New variable.
(do_wait): Use it instead of debug. Use fatal_error.
* collect-utils.h (save_temps): Declare.
* collect2.c (verbose): Rename from vflag. All uses changed.
(tool_cleanup): New function, copied from collect_atexit.
(collect_atexit, handler): Just call it.
* collect2.h (verbose): Declaration renamed from vflag.
* lto-wrapper.c (maybe_unlink, run_gcc): Use save_temps instead of
debug.
From-SVN: r212019
Diffstat (limited to 'gcc/collect-utils.c')
-rw-r--r-- | gcc/collect-utils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/collect-utils.c b/gcc/collect-utils.c index 004569c..e92513c 100644 --- a/gcc/collect-utils.c +++ b/gcc/collect-utils.c @@ -33,6 +33,7 @@ static char *response_file; bool debug; bool verbose; +bool save_temps; /* Delete tempfiles. */ @@ -159,12 +160,9 @@ do_wait (const char *prog, struct pex_obj *pex) { int ret = collect_wait (prog, pex); if (ret != 0) - { - error ("%s returned %d exit status", prog, ret); - exit (ret); - } + fatal_error ("%s returned %d exit status", prog, ret); - if (response_file && !debug) + if (response_file && !save_temps) { unlink (response_file); response_file = NULL; |