This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add linker_output as prefix for LTO temps (PR lto/86548).


On Thu, Jul 26, 2018 at 12:55 PM Martin Liška <mliska@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  <mliska@suse.cz>
>
>         PR lto/86548
>         * lto-wrapper.c: Add linker_output as prefix
>         for ltrans_output_file.
>
> include/ChangeLog:
>
> 2018-07-26  Martin Liska  <mliska@suse.cz>
>
>         PR lto/86548
>         * libiberty.h (make_temp_file_with_prefix): New function.
>
> libiberty/ChangeLog:
>
> 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.
> ---
>  gcc/lto-wrapper.c          | 14 +++++++++++++-
>  include/libiberty.h        |  5 +++++
>  libiberty/make-temp-file.c | 24 ++++++++++++++++++------
>  3 files changed, 36 insertions(+), 7 deletions(-)
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]