diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2020-10-20 12:14:03 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2020-10-20 12:14:03 +0200 |
commit | b3032d1b84b8ab683f2d7345b6a2d9f783fe946d (patch) | |
tree | 2345e5f70560519d7a5fa83cd65ef61e147ee797 /gcc/lto-wrapper.c | |
parent | 00b355522b7843f4d9d93172aa7521b223b77587 (diff) | |
download | gcc-b3032d1b84b8ab683f2d7345b6a2d9f783fe946d.zip gcc-b3032d1b84b8ab683f2d7345b6a2d9f783fe946d.tar.gz gcc-b3032d1b84b8ab683f2d7345b6a2d9f783fe946d.tar.bz2 |
collect-utils.c, lto-wrapper + mkoffload: Improve -save-temps filename
gcc/ChangeLog:
* collect-utils.c (collect_execute, fork_execute): Add at-file suffix
argument.
* collect-utils.h (collect_execute, fork_execute): Update prototype.
* collect2.c (maybe_run_lto_and_relink, do_link, main, do_dsymutil):
Update calls by passing NULL.
* config/i386/intelmic-mkoffload.c (compile_for_target,
generate_host_descr_file, prepare_target_image, main): Likewise.
* config/gcn/mkoffload.c (compile_native, main): Pass at-file suffix.
* config/nvptx/mkoffload.c (compile_native, main): Likewise.
* lto-wrapper.c (compile_offload_image): Likewise.
Diffstat (limited to 'gcc/lto-wrapper.c')
-rw-r--r-- | gcc/lto-wrapper.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c index 4d93313..e458347 100644 --- a/gcc/lto-wrapper.c +++ b/gcc/lto-wrapper.c @@ -950,7 +950,7 @@ compile_offload_image (const char *target, const char *compiler_path, obstack_ptr_grow (&argv_obstack, NULL); argv = XOBFINISH (&argv_obstack, char **); - fork_execute (argv[0], argv, true); + fork_execute (argv[0], argv, true, "offload_args"); obstack_free (&argv_obstack, NULL); free_array_of_ptrs ((void **) paths, n_paths); @@ -1777,7 +1777,8 @@ cont1: new_argv = XOBFINISH (&argv_obstack, const char **); argv_ptr = &new_argv[new_head_argc]; - fork_execute (new_argv[0], CONST_CAST (char **, new_argv), true); + fork_execute (new_argv[0], CONST_CAST (char **, new_argv), true, + "ltrans_args"); /* Copy the early generated debug info from the objects to temporary files and append those to the partial link commandline. */ @@ -1921,8 +1922,12 @@ cont: } else { + char argsuffix[sizeof (DUMPBASE_SUFFIX) + 1]; + if (save_temps) + snprintf (dumpbase, sizeof (DUMPBASE_SUFFIX), + "ltrans%u.ltrans_args", i); fork_execute (new_argv[0], CONST_CAST (char **, new_argv), - true); + true, save_temps ? argsuffix : NULL); maybe_unlink (input_name); } @@ -1973,7 +1978,7 @@ cont: new_argv = XOBFINISH (&argv_obstack, const char **); pex = collect_execute (new_argv[0], CONST_CAST (char **, new_argv), - NULL, NULL, PEX_SEARCH, false); + NULL, NULL, PEX_SEARCH, false, NULL); do_wait (new_argv[0], pex); freeargv (make_argv); maybe_unlink (makefile); |