From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2016 invoked by alias); 15 Apr 2008 08:10:25 -0000 Received: (qmail 1823 invoked by uid 48); 15 Apr 2008 08:09:42 -0000 Date: Tue, 15 Apr 2008 08:10:00 -0000 Subject: [Bug libstdc++/35942] New: Self Reference In Dinamic Linked Library builds for building Cross-Compiler X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "earthengine at gmail 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: 2008-04/txt/msg01038.txt.bz2 While building a cross-compiler, the the libstdc++-v3 includes a copy of Libtool script, which includes a reference to libstdc++ itself. This prevent the user to build a new compiler without existing libstdc++ for the target triplet. The following is a patch that tested to be working for this problem, but I think it should be done in a better way. #######BEGIN OF PATCH CODE###### diff -Naur gcc-4.3-20080410.orig/libstdc++-v3/src/Makefile.in gcc-4.3-20080410/libstdc++-v3/src/Makefile.in --- gcc-4.3-20080410.orig/libstdc++-v3/src/Makefile.in 2008-03-01 05:26:50.000000000 +1100 +++ gcc-4.3-20080410/libstdc++-v3/src/Makefile.in 2008-04-14 23:16:35.000000000 +1000 @@ -212,6 +212,7 @@ LIBS = @LIBS@ LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@ LIBTOOL = @LIBTOOL@ +LIBTOOLLINK = @LIBTOOL@-link LN_S = @LN_S@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ @@ -472,7 +473,7 @@ # course is problematic at this point. So, we get the top-level # directory to configure libstdc++-v3 to use gcc as the C++ # compilation driver. -CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \ +CXXLINK = $(LIBTOOLLINK) --tag CXX --mode=link $(CXX) \ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@ debugdir = debug @@ -536,7 +537,8 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) +libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) + sed '/postdeps=/s@\-.*\-lm@\-lm@' `echo $(LIBTOOL) | cut -d\ -f2` > `echo $(LIBTOOLLINK) | cut -d\ -f2` $(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) mostlyclean-compile: #######END OF PATCH CODE###### -- Summary: Self Reference In Dinamic Linked Library builds for building Cross-Compiler Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: earthengine at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35942