From c00c9d03658915b0763d5f86503035d848e062de Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 26 Jul 2018 14:13:14 +0200 Subject: Add linker_output as prefix for LTO temps (PR lto/86548). 2018-07-26 Martin Liska PR lto/86548 * lto-wrapper.c: Add linker_output as prefix for ltrans_output_file. 2018-07-26 Martin Liska PR lto/86548 * libiberty.h (make_temp_file_with_prefix): New function. 2018-07-26 Martin Liska 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 --- gcc/lto-wrapper.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'gcc/lto-wrapper.c') 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; -- cgit v1.1