------- 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