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/collect2.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/collect2.c')
-rw-r--r-- | gcc/collect2.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gcc/collect2.c b/gcc/collect2.c index 6d074a7..3a43a5a 100644 --- a/gcc/collect2.c +++ b/gcc/collect2.c @@ -644,7 +644,7 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, /* Run the LTO back end. */ pex = collect_execute (prog, lto_c_argv, NULL, NULL, PEX_SEARCH, - at_file_supplied); + at_file_supplied, NULL); { int c; FILE *stream; @@ -727,7 +727,8 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, /* Run the linker again, this time replacing the object files optimized by the LTO with the temporary file generated by the LTO. */ - fork_execute ("ld", out_lto_ld_argv, HAVE_GNU_LD && at_file_supplied); + fork_execute ("ld", out_lto_ld_argv, HAVE_GNU_LD && at_file_supplied, + NULL); /* We assume that temp files were created, and therefore we need to take that into account (maybe run dsymutil). */ post_ld_pass (/*temp_file*/true); @@ -739,7 +740,7 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst, { /* Our caller is relying on us to do the link even though there is no LTO back end work to be done. */ - fork_execute ("ld", lto_ld_argv, HAVE_GNU_LD && at_file_supplied); + fork_execute ("ld", lto_ld_argv, HAVE_GNU_LD && at_file_supplied, NULL); /* No LTO objects were found, so no new temp file. */ post_ld_pass (/*temp_file*/false); } @@ -756,7 +757,7 @@ do_link (char **ld_argv) const char *prog = "ld"; pex = collect_execute (prog, ld_argv, NULL, NULL, PEX_LAST | PEX_SEARCH, - HAVE_GNU_LD && at_file_supplied); + HAVE_GNU_LD && at_file_supplied, NULL); int ret = collect_wait (prog, pex); if (ret) { @@ -1722,7 +1723,7 @@ main (int argc, char **argv) strip_argv[0] = strip_file_name; strip_argv[1] = output_file; strip_argv[2] = (char *) 0; - fork_execute ("strip", real_strip_argv, false); + fork_execute ("strip", real_strip_argv, false, NULL); } #ifdef COLLECT_EXPORT_LIST @@ -1805,7 +1806,7 @@ main (int argc, char **argv) /* Assemble the constructor and destructor tables. Link the tables in with the rest of the program. */ - fork_execute ("gcc", c_argv, at_file_supplied); + fork_execute ("gcc", c_argv, at_file_supplied, NULL); #ifdef COLLECT_EXPORT_LIST /* On AIX we must call link because of possible templates resolution. */ do_link (ld2_argv); @@ -1818,7 +1819,7 @@ main (int argc, char **argv) maybe_run_lto_and_relink (ld2_argv, object_lst, object, true); else { - fork_execute ("ld", ld2_argv, HAVE_GNU_LD && at_file_supplied); + fork_execute ("ld", ld2_argv, HAVE_GNU_LD && at_file_supplied, NULL); post_ld_pass (/*temp_file*/false); } @@ -3040,7 +3041,7 @@ do_dsymutil (const char *output_file) { argv[2] = (char *) 0; pex = collect_execute (dsymutil, real_argv, NULL, NULL, - PEX_LAST | PEX_SEARCH, false); + PEX_LAST | PEX_SEARCH, false, NULL); do_wait (dsymutil, pex); } |