diff options
author | Martin Liska <mliska@suse.cz> | 2018-07-26 14:13:14 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-07-26 12:13:14 +0000 |
commit | c00c9d03658915b0763d5f86503035d848e062de (patch) | |
tree | 2ed49df7c6193dcb1395b26386f0cda4a3c03605 /gcc | |
parent | e98edc20cd615f43afce32c5de40d59fa25e40ed (diff) | |
download | gcc-c00c9d03658915b0763d5f86503035d848e062de.zip gcc-c00c9d03658915b0763d5f86503035d848e062de.tar.gz gcc-c00c9d03658915b0763d5f86503035d848e062de.tar.bz2 |
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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto-wrapper.c | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3518ecf..d9e8e10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 Segher Boessenkool <segher@kernel.crashing.org> PR rtl-optimization/85805 diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index c3eb00dc..cf4a8c6 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; |