This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use the LTO linker plugin by default
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>, Jakub Jelinek <jakub at redhat dot com>, Paolo Bonzini <bonzini at gnu dot org>
- Date: Wed, 12 Mar 2014 12:20:15 +0100
- Subject: Re: [PATCH] Use the LTO linker plugin by default
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1403041241510 dot 11121 at zhemvz dot fhfr dot qr> <ydd8usl9bqu dot fsf at CeBiTec dot Uni-Bielefeld dot DE> <alpine dot LSU dot 2 dot 11 dot 1403101541080 dot 6041 at zhemvz dot fhfr dot qr> <yddvbvmrsms dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <yddr46arp3n dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <alpine dot LSU dot 2 dot 11 dot 1403111226140 dot 6041 at zhemvz dot fhfr dot qr>
Richard Biener <rguenther@suse.de> writes:
> On Mon, 10 Mar 2014, Rainer Orth wrote:
>
>> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>>
>> > It does use the host compiler for me, too.
>> >
>> >> but maybe _that_ is the issue for you? (see also how it uses
>> >> -static-libgcc, for me it doesn't even depend on libgcc_s)
>> >
>> > But as you can see above, libtool, being its usual helpful self, simply
>> > drops -static-libgcc ;-( If I use -Wc,-static-libgcc, all seems fine.
>>
>> The following patch implements this. The override is necessary to avoid
>> LDFLAGS passed in from the toplevel to replace the Makefile value.
>>
>> Bootstraps on i386-pc-solaris2.10 and x86_64-unknown-linux-gnu are now
>> well beyond stage1. Ok for mainline if they pass?
>
> If we go that route I wonder if we should rely on the toplevel passing
> -static-libgcc but instead force -static-libgcc for the plugin
> anyway? (conditional on compiling with GCC, of course)
That would mean either duplicating the test from the toplevel or adding
a test for gcc in lto-plugin. Either is ugly, so I'd like to avoid it
if possible.
It occured to me that some of the complexcity would go away if gcc just
accepted and stripped -Wc (which is currently a libtool-only option),
but even if so we'd have to deal with gcc's that don't have this for a
long time.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University