From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7459 invoked by alias); 14 Feb 2008 18:11:04 -0000 Received: (qmail 7112 invoked by uid 48); 14 Feb 2008 18:10:20 -0000 Date: Thu, 14 Feb 2008 18:11:00 -0000 Subject: [Bug libstdc++/35197] New: Native linker can't locate file for -lstdc++ with --enable-version-specific-runtime-libs X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "skunk at iskunk dot org" 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-02/txt/msg01552.txt.bz2 I have a build of GCC 4.2.3 compiled with --enable-version-specific-runtime-libs. It fails to link a trivial C++ program, because the (non-GNU) linker does not know about libstdc++, and the GCC frontend is not passing an appropriate -L... flag to the linker so that it can find the library. $ g++ -o hello hello.cxx /usr/bin/ld: Can't locate file for: -lstdc++ collect2: ld returned 1 exit status $ g++ -v -o hello hello.cxx [superfluous verbiage elided] mips-tfile (GCC) 4.2.3 /opt/tg/bin/../libexec/gcc/alphaev56-dec-osf4.0g/4.2.3/collect2 -G 8 -O1 -S -call_shared -o hello /usr/lib/cmplrs/cc/crt0.o -L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/opt/tg/bin/../lib/gcc -L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3 -L/usr/lib/cmplrs/cc -L/opt/tg/bin/../lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../.. -L/opt/tg/lib/gcc/alphaev56-dec-osf4.0g/4.2.3/../../.. /tmp//ccu9eHi9.o -lstdc++ -lm -lgcc -lc -lgcc /usr/bin/ld: Can't locate file for: -lstdc++ collect2: ld returned 1 exit status (I notice that libstdc++ is present immediately under /opt/tg/lib/gcc/alphaev56-dec-osf4.0g/, which the -L... flags narrowly miss.) -- Summary: Native linker can't locate file for -lstdc++ with -- enable-version-specific-runtime-libs Product: gcc Version: 4.2.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: skunk at iskunk dot org GCC build triplet: alphaev56-dec-osf4.0g GCC host triplet: alphaev56-dec-osf4.0g GCC target triplet: alphaev56-dec-osf4.0g http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35197