This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41376] collect2 does not handle static libraries
- From: "davek at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Apr 2010 23:49:22 -0000
- Subject: [Bug lto/41376] collect2 does not handle static libraries
- References: <bug-41376-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from davek at gcc dot gnu dot org 2010-04-28 23:49 -------
(In reply to comment #2)
> Quoting RG from the gcc list:
>
> "[ ... ] Or you fix collect2 to do processing of archives and hand
> lto1 the required information (it expects archive components
> with LTO bytecode like archive.a@offset with offset being the
> offset of the .o file with LTO bytecode inside the archive). See
> lto/lto-elf.c:lto_obj_file_open for "details"."
Of course, without unresolved symbol info to guide us, as the linker has, we
won't know which archive members would be required in a link. So if we do try
this in collect2, it would need to effectively recompile the entire library at
link time.
Ow. I think we need to get LD to help us out here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41376