summaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2018-07-26 14:13:14 +0200
committerMartin Liska <marxin@gcc.gnu.org>2018-07-26 12:13:14 +0000
commitc00c9d03658915b0763d5f86503035d848e062de (patch)
tree2ed49df7c6193dcb1395b26386f0cda4a3c03605 /gcc/lto-wrapper.c
parente98edc20cd615f43afce32c5de40d59fa25e40ed (diff)
Add linker_output as prefix for LTO temps (PR lto/86548).
2018-07-26 Martin Liska <mliska@suse.cz> PR lto/86548 * lto-wrapper.c: Add linker_output as prefix for ltrans_output_file. 2018-07-26 Martin Liska <mliska@suse.cz> PR lto/86548 * libiberty.h (make_temp_file_with_prefix): New function. 2018-07-26 Martin Liska <mliska@suse.cz> PR lto/86548 * make-temp-file.c (TEMP_FILE): Remove leading 'cc'. (make_temp_file): Call make_temp_file_with_prefix with first argument set to NULL. (make_temp_file_with_prefix): Support also prefix. From-SVN: r262999
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index c3eb00dc0c2..cf4a8c659e0 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1373,7 +1373,19 @@ cont1:
strcat (ltrans_output_file, ".ltrans.out");
}
else
- ltrans_output_file = make_temp_file (".ltrans.out");
+ {
+ char *prefix = NULL;
+ if (linker_output)
+ {
+ prefix = (char *) xmalloc (strlen (linker_output) + 2);
+ strcpy (prefix, linker_output);
+ strcat (prefix, ".");
+ }
+
+ ltrans_output_file = make_temp_file_with_prefix (prefix,
+ ".ltrans.out");
+ free (prefix);
+ }
list_option_full = (char *) xmalloc (sizeof (char) *
(strlen (ltrans_output_file) + list_option_len + 1));
tmp = list_option_full;