aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-wrapper.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-05-28 12:48:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-05-28 12:48:54 +0000
commitb56119876b871d6eb330fa06bb6ea16f32d5b68a (patch)
tree5aa4ad3639ee9491cd94586d51f36ed76ad99dc0 /gcc/lto-wrapper.c
parentd4048208a4c81eca9372664003b09922b9d5d1aa (diff)
downloadgcc-b56119876b871d6eb330fa06bb6ea16f32d5b68a.zip
gcc-b56119876b871d6eb330fa06bb6ea16f32d5b68a.tar.gz
gcc-b56119876b871d6eb330fa06bb6ea16f32d5b68a.tar.bz2
lto-wrapper.c (run_gcc): With -save-temps generate a user-visible ltrans filename.
2010-05-28 Richard Guenther <rguenther@suse.de> * lto-wrapper.c (run_gcc): With -save-temps generate a user-visible ltrans filename. Fixup ltrans unit numbering. lto/ * lto.c (prefix_name_with_star): Removed. (strip_extension): Likewise. (get_filename_for_set): Likewise. (lto_write_ltrans_list): Fold into ... (lto_wpa_write_files): ... this. Name LTRANS units by suffixing the ltrans output list filename. (do_whole_program_analysis): Adjust. From-SVN: r159967
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r--gcc/lto-wrapper.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 7454b54..dda272b 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -407,13 +407,21 @@ run_gcc (unsigned argc, char *argv[])
if (linker_output)
{
char *dumpbase = (char *) xmalloc (strlen (linker_output)
- + sizeof(".wpa") + 1);
+ + sizeof (".wpa") + 1);
strcpy (dumpbase, linker_output);
strcat (dumpbase, ".wpa");
argv_ptr[0] = dumpbase;
}
- ltrans_output_file = make_temp_file (".ltrans.out");
+ if (linker_output && debug)
+ {
+ ltrans_output_file = (char *) xmalloc (strlen (linker_output)
+ + sizeof (".ltrans.out") + 1);
+ strcpy (ltrans_output_file, linker_output);
+ strcat (ltrans_output_file, ".ltrans.out");
+ }
+ else
+ ltrans_output_file = make_temp_file (".ltrans.out");
list_option_full = (char *) xmalloc (sizeof (char) *
(strlen (ltrans_output_file) + list_option_len + 1));
tmp = list_option_full;
@@ -516,7 +524,7 @@ cont:
+ sizeof(DUMPBASE_SUFFIX) + 1);
snprintf (dumpbase,
strlen (linker_output) + sizeof(DUMPBASE_SUFFIX),
- "%s.ltrans%u", linker_output, nr);
+ "%s.ltrans%u", linker_output, i);
argv_ptr[0] = dumpbase;
}