On Thu, Jul 26, 2018 at 12:55 PM Martin Liška <mli...@suse.cz> wrote: > > Hi. > > As requested in the PR, now we produce prefixes for temp files in LTO: > > Example: > $ gcc -flto main.o a.o --save-temps -o mybinary > > generates: > $ ls /tmp/mybinary* > /tmp/mybinary /tmp/mybinary.ltrans0.o /tmp/mybinary.ltrans0.s > /tmp/mybinary.ltrans.out
It will be /tmp/mybinary.abc421.ltrans0.o /tmp/mybinary.abc421.ltrans1.o, etc., correct? Otherwise there's the chance to trash user files which isn't good. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? OK if the above is correct. Thanks, Richard. > Martin > > gcc/ChangeLog: > > 2018-07-26 Martin Liska <mli...@suse.cz> > > PR lto/86548 > * lto-wrapper.c: Add linker_output as prefix > for ltrans_output_file. > > include/ChangeLog: > > 2018-07-26 Martin Liska <mli...@suse.cz> > > PR lto/86548 > * libiberty.h (make_temp_file_with_prefix): New function. > > libiberty/ChangeLog: > > 2018-07-26 Martin Liska <mli...@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. > --- > gcc/lto-wrapper.c | 14 +++++++++++++- > include/libiberty.h | 5 +++++ > libiberty/make-temp-file.c | 24 ++++++++++++++++++------ > 3 files changed, 36 insertions(+), 7 deletions(-) > >