From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126001 invoked by alias); 1 Sep 2015 08:22:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 125990 invoked by uid 89); 1 Sep 2015 08:22:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Tue, 01 Sep 2015 08:22:33 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A3F74AB9D; Tue, 1 Sep 2015 08:22:30 +0000 (UTC) Date: Tue, 01 Sep 2015 08:22:00 -0000 From: Richard Biener To: Markus Trippelsdorf cc: gcc-patches@gcc.gnu.org, Jan Hubicka , ccoutant@gmail.com, hjl.tools@gmail.com Subject: Re: [PATCH] Updated LTO early debug patch In-Reply-To: <20150901081524.GA410@x4> Message-ID: References: <20150831161713.GB1940@x4> <20150901081524.GA410@x4> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-09/txt/msg00009.txt.bz2 On Tue, 1 Sep 2015, Markus Trippelsdorf wrote: > On 2015.09.01 at 10:00 +0200, Richard Biener wrote: > > On Mon, 31 Aug 2015, Markus Trippelsdorf wrote: > > > > > On 2015.08.31 at 16:44 +0200, Richard Biener wrote: > > > > > > > > So the state below now will pass LTO bootstrap (fingers crossing, > > > > stage3 running) as well as regular bootstrap. Iff I didn't break > > > > sth in the last minute. You need up-to-date trunk (watch out, > > > > fortran seems to be broken) to pull the fixes for trunk LTO bootstrap. > > > > > > Gold doesn't work at all (internal error in read_script_file, at script.cc:1608). > > > > > > Even simple programs don't link anymore: > > > > > > trippels@gcc2-power8 ~ % echo "int main () {}" | g++ -x c++ - -flto > > > /home/trippels/bin/ld: /home/trippels/tmp/ccPhF9Ar.o: plugin needed to handle lto object > > > /home/trippels/bin/ld: /home/trippels/tmp/ccjOv4bXdebugobj: plugin needed to handle lto object > > > > Ah, I didn't notice that because I failed to pass -fuse-ld=gold to the > > linker command doing the incremental debug link (and my default linker > > is GNU ld). With that fixed I can reproduce the error. > > The "plugin needed to handle lto object" also happen when using ld.bfd, > because you pass -fno-use-linker-plugin. Both linkers depend on > autoloading liblto_plugin.so.0.0.0 from lib/bfd-plugins. Yes, I know. But it "works" with GNU ld, probably because of /* Support -fno-use-linker-plugin by failing to load the plugin for the case where it is auto-loaded by BFD. */ char *collect_gcc_options = getenv ("COLLECT_GCC_OPTIONS"); if (collect_gcc_options && (strstr (collect_gcc_options, "'-fno-use-linker-plugin'") || strstr (collect_gcc_options, "'-fno-lto'"))) return LDPS_ERR; As said, I'm trying to get the thing working with existing linkers to be able to do any work on this. And I'm hoping on the linker folks to come up with a design that fits my need and an implementation. Richard. -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)