From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22954 invoked by alias); 17 Aug 2014 08:19:07 -0000 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 Received: (qmail 22895 invoked by uid 48); 17 Aug 2014 08:19:00 -0000 From: "sven.c.dack at virginmedia dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/62077] --with-build-config=bootstrap-lto fails Date: Sun, 17 Aug 2014 08:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: lto X-Bugzilla-Keywords: build, lto X-Bugzilla-Severity: normal X-Bugzilla-Who: sven.c.dack at virginmedia dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg01153.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077 --- Comment #48 from Sven C. Dack --- > ... > > With the linker plugin enabled does it actually link libgcc_s.so and > > libstdc++.so dynamically to it, while for the other three it did not: > > That looks odd. Btw, -fuse-linker-plugin should be the default > if you have recent enough binutils. > > Richard I have been trying to get around this oddity by creating a statically linked compiler, but I keep running into the same problem. Is the building of a statically linked gcc (with lto and linker plugin enabled) actually supported? I keep using --with-boot-ldflags="... -static -fuse-linker-plugin", but get the message: "xgcc: error: -fuse-linker-plugin is not supported in this configuration" This happens while make is configuring for stage 3: ... rm -f stage_current make[3]: Leaving directory '/var/tmp/build-pkg-32413/obj/gcc-4.9-lto-plugin' make[2]: Leaving directory '/var/tmp/build-pkg-32413/obj/gcc-4.9-lto-plugin' make[2]: Entering directory '/var/tmp/build-pkg-32413/obj/gcc-4.9-lto-plugin' Configuring stage 3 in ./lto-plugin Configuring stage 3 in ./zlib Configuring stage 3 in ./intl Configuring stage 3 in ./libdecnumber Configuring stage 3 in ./libiberty Configuring stage 3 in ./libbacktrace ... $ more libbacktrace/config.log ... configure:2936: checking for C compiler default output file name configure:2958: /var/tmp/build-pkg-32413/obj/gcc-4.9-lto-plugin/./prev-gcc/xgcc -B/var/tmp/build-pkg-32413/obj/gcc-4.9-lto-plugin/./prev-gcc/ -B/home/sven/gcc-lto-plugin/x86_64-unknown-linux-gnu/bin/ -B/home /sven/gcc-lto-plugin/x86_64-unknown-linux-gnu/bin/ -B/home/sven/gcc-lto-plugin/x86_64-unknown-linux-gnu/lib/ -isystem /home/sven/gcc-lto-plugin/x86_64-unknown-linux-gnu/include -isystem /home/sven/gcc-lto-plu gin/x86_64-unknown-linux-gnu/sys-include -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -static -flto=1 -flto-partition=none -fuse-linker-plugin conftest.c >&5 xgcc: error: -fuse-linker-plugin is not supported in this configuration ... It can be seen for all the directories that are being configured for stage 3. Without "-fuse-linker-plugin" does it create a compiler and it also works for a non-static build.