diff options
author | Rafael Espindola <espindola@google.com> | 2009-03-25 09:24:31 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@google.com> | 2009-03-25 09:24:31 +0000 |
commit | 7347932280a70f72383defd4d7392e200c8b7341 (patch) | |
tree | 65f00ebaa05dbc68ba6a6abbd0a86843bb13b649 /gcc | |
parent | b15776a7ab358fccdecbba6163ab8172011002a0 (diff) |
2009-03-23 Rafael Avila de Espindola <espindola@google.com>
* lto-plugin.c (libgcc_filename): New.
(all_symbols_read_handler): Pass libgcc to the linker.
(all_symbols_read_handler): Parse -libgcc
2009-03-23 Rafael Avila de Espindola <espindola@google.com>
* gcc.c (LINK_COMMAND_SPEC): Pass the libgcc to the linker.
(lto_libgcc_spec): New.
(static_specs): Add lto_libgcc.
(main): Set lto_libgcc_spec.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@145054 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.lto | 7 | ||||
-rw-r--r-- | gcc/gcc.c | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index a7801aa97c4..868b1ad82c1 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,3 +1,10 @@ +2009-03-23 Rafael Avila de Espindola <espindola@google.com> + + * gcc.c (LINK_COMMAND_SPEC): Pass the libgcc to the linker. + (lto_libgcc_spec): New. + (static_specs): Add lto_libgcc. + (main): Set lto_libgcc_spec. + 2009-03-24 Diego Novillo <dnovillo@google.com> * toplev.c (announce_function): Call get_name. diff --git a/gcc/gcc.c b/gcc/gcc.c index 0da1feb3663..b55fdd45ada 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -750,6 +750,7 @@ proper position among the other output files. */ -plugin %(linker_plugin_file) \ -plugin-opt=%(lto_wrapper) \ -plugin-opt=%(lto_gcc) \ + %{static|static-libgcc:-plugin-opt=-libgcc=%(lto_libgcc)} \ %{O*:-plugin-opt=-O%*} \ %{w:-plugin-opt=-w} \ %{f*:-plugin-opt=-f%*} \ @@ -806,6 +807,7 @@ static const char *linker_name_spec = LINKER_NAME; static const char *linker_plugin_file_spec = ""; static const char *lto_wrapper_spec = ""; static const char *lto_gcc_spec = ""; +static const char *lto_libgcc_spec = ""; static const char *link_command_spec = LINK_COMMAND_SPEC; static const char *link_libgcc_spec = LINK_LIBGCC_SPEC; static const char *startfile_prefix_spec = STARTFILE_PREFIX_SPEC; @@ -1660,6 +1662,7 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("linker_plugin_file", &linker_plugin_file_spec), INIT_STATIC_SPEC ("lto_wrapper", <o_wrapper_spec), INIT_STATIC_SPEC ("lto_gcc", <o_gcc_spec), + INIT_STATIC_SPEC ("lto_libgcc", <o_libgcc_spec), INIT_STATIC_SPEC ("link_libgcc", &link_libgcc_spec), INIT_STATIC_SPEC ("md_exec_prefix", &md_exec_prefix), INIT_STATIC_SPEC ("md_startfile_prefix", &md_startfile_prefix), @@ -7068,6 +7071,11 @@ main (int argc, char **argv) false); if (!linker_plugin_file_spec) fatal ("-use-linker-plugin, but liblto_plugin.so not found."); + + lto_libgcc_spec = find_a_file (&startfile_prefixes, "libgcc.a", + R_OK, true); + if (!lto_libgcc_spec) + fatal ("could not find libgcc.a."); } lto_gcc_spec = argv[0]; |