summaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-09 14:14:27 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-09 14:14:27 +0000
commitd9f0ee99c0fe3b26e7330561ceb6679f77ea3769 (patch)
tree6add15c7ab1e9064a443e4dd2dbadfcb69479c7e /gcc/gcc.c
parent868357d3b0cfd84e11ca3b966294914b8a6b0664 (diff)
downloadgcc-d9f0ee99c0fe3b26e7330561ceb6679f77ea3769.tar.gz
2010-05-09 Richard Guenther <rguenther@suse.de>
* gcc.c (store_arg): Handle temporary file deletion for joined arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159201 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index a0083e1d0f6..e2644c4a73e 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -2082,7 +2082,15 @@ store_arg (const char *arg, int delete_always, int delete_failure)
if (strcmp (arg, "-o") == 0)
have_o_argbuf_index = argbuf_index;
if (delete_always || delete_failure)
- record_temp_file (arg, delete_always, delete_failure);
+ {
+ const char *p;
+ /* If the temporary file we should delete is specified as
+ part of a joined argument extract the filename. */
+ if (arg[0] == '-'
+ && (p = strrchr (arg, '=')))
+ arg = p + 1;
+ record_temp_file (arg, delete_always, delete_failure);
+ }
}
/* Load specs from a file name named FILENAME, replacing occurrences of