diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-26 09:16:19 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-26 09:16:19 +0000 |
commit | 572cae003b64c085a501636f9ffab6cfb7c31b62 (patch) | |
tree | f0d0a3f3ffbbb64530f9c1a1a860983cd9984b28 /gcc/collect-utils.c | |
parent | eb9ccb017b3efc536a6ccacbc61c9736cac7cecf (diff) | |
download | gcc-572cae003b64c085a501636f9ffab6cfb7c31b62.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212019 138bc75d-0d04-0410-961f-82ee72b054a4
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 004569c9957..e92513c18a3 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; |