From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28301 invoked by alias); 15 Sep 2013 14:02:11 -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 28275 invoked by uid 48); 15 Sep 2013 14:02:08 -0000 From: "rose.garcia-eggl2fk at yopmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/58427] New: xgcc target compilation depends on installed libgcc_s.so Date: Sun, 15 Sep 2013 14:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 4.5.4 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rose.garcia-eggl2fk at yopmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: 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: 2013-09/txt/msg01092.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58427 Bug ID: 58427 Summary: xgcc target compilation depends on installed libgcc_s.so Product: gcc Version: 4.5.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: rose.garcia-eggl2fk at yopmail dot com during target compilation (for example libssp or libstdc++) xgcc is invoked with the usual specs: /src/build/gcc454/gcc-4.5.4/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/src/build/gcc454/gcc-4.5.4/host-x86_64-unknown-linux-gnu/gcc/ ... conftest.c specs: %{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared- libgcc:-lgcc_s%{!shared: -lgcc}}}} in case binutils ld decides for some reason that libgcc_s is needed, it will hardcode a reference to libgcc_s into DT_NEEDED. binutils itself finds the libgcc_s.so in the -B path, and adds it, but launching the resulting executable will fail because the *dynamic linker* has no way of knowing that it should look for the .so in host-x86_64-unknown-linux-gnu/gcc. this causes the configure check for libssp and libstdc++ to fail with "C compiler cannot create working executables". possible solutions: 1) the spec file used by xgcc to compile target libraries should use libgcc_eh.a instead of libgcc_s.so 2) LD_LIBRARY_PATH has to be set to host-x86_64-unknown-linux-gnu/gcc (the -B path) so the dynamic linker can find libgcc_s.so imo, 1) is preferable.