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