From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16130 invoked by alias); 9 Feb 2009 20:26:10 -0000 Received: (qmail 15912 invoked by uid 48); 9 Feb 2009 20:25:54 -0000 Date: Mon, 09 Feb 2009 20:26:00 -0000 Message-ID: <20090209202554.15911.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/35942] Self Reference In Dynamic Linked Library builds for building Cross-Compiler In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jzb2 at aexorsyst dot com" 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: 2009-02/txt/msg00819.txt.bz2 ------- Comment #12 from jzb2 at aexorsyst dot com 2009-02-09 20:25 ------- So it appears that the root cause of this issue is the long standing libtool DESTDIR problem. I've reworked the original patch above into to following, which works with my ./configure options: Index: gcc_native-4.2.2/libstdc++-v3/src/Makefile.in =================================================================== RCS file: /data/scdb/PKGS/gcc_native/libstdc++-v3/src/Makefile.in,v retrieving revision 1.1.1.4 diff -r1.1.1.4 Makefile.in 460a461 > sed -i 's@^postdeps=.*$$@postdeps=""@' `echo $(LIBTOOL) | cut -d' ' -f2` 503a505 > sed -i 's@^postdeps=.*$$@postdeps=""@' `echo $(LIBTOOL) | cut -d' ' -f2` Index: gcc_native-4.2.2/libstdc++-v3/libsupc++/Makefile.in =================================================================== RCS file: /data/scdb/PKGS/gcc_native/libstdc++-v3/libsupc++/Makefile.in,v retrieving revision 1.1.1.3 diff -r1.1.1.3 Makefile.in 492a493 > sed -i 's@^postdeps=.*$$@postdeps=""@' `echo $(LIBTOOL) | cut -d' ' -f2` 494a496 > sed -i 's@^postdeps=.*$$@postdeps=""@' `echo $(LIBTOOL) | cut -d' ' -f2` Note that this patch drops the forced linking with -lc, -lm, -lintl, and -lgcc_s as well as the problem child -lstdc++. I have not noticed any ill effects. Also note that the -lm and -lintl are still included in the final link due to other reasons. If anybody knows which (if any) other shared libraries the libstdc++.so actually does need to link with, instead of just relying on the (buggy) libtool results (when used with a DESTDIR), could you please post that. I was under the impression that the libstdc++.so was a standalone library, like libc.so, but maybe that's not the case for newer versions of GCC. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35942