From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6378 invoked by alias); 29 Apr 2010 08:29:32 -0000 Received: (qmail 6232 invoked by alias); 29 Apr 2010 08:29:12 -0000 Date: Thu, 29 Apr 2010 08:29:00 -0000 Message-ID: <20100429082912.6231.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug lto/41376] collect2 does not handle static libraries In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-04/txt/msg03097.txt.bz2 ------- Comment #5 from rguenther at suse dot de 2010-04-29 08:29 ------- Subject: Re: collect2 does not handle static libraries On Thu, 29 Apr 2010, davek at gcc dot gnu dot org wrote: > ------- Comment #4 from davek at gcc dot gnu dot org 2010-04-29 05:28 ------- > Created an attachment (id=20512) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20512&action=view) > --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20512&action=view) > Extends GNU LD to parse archives for LTO. > > (In reply to comment #3) > > Ow. I think we need to get LD to help us out here. > > So this is a rough first draft of the-kind-of-thing-i-was-thinking-of. We get > collect2 to run a dummy link early, and extract the output from the > --lto-assist flag to get a list of archive members that we need lto to > recompile for us. If we go that way (extending LD), then it might be worthwhile to go the full way and have it dump a complete symbol resolution file like we get from the gold linker plugin. Note that collect2 was intended to work with any linker (and it does already query symbols of everything via nm), so I think we have to emulate static archive linking properly. Or alternatively move static archive support completely into lto1 (though that would require to make symbol resolution follow incremental linking semantics). Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41376