Ian Lance Taylor wrote: > "Fehringer Franz" <Franz.Fehringer@xxxxxxx> writes: > >> I have exactly the same error like described in >> http://gcc.gnu.org/ml/gcc-help/2009-05/msg00323.html >> namely >> collect2: library libstdc++ -lsupc++ not found > The bug is in the way that gcc/gpg++spec.c uses LIBSTDCXX_STATIC, or > possibly in the way that macro is defined in gcc/config/rs6000/aix.h. I > don't see a simple fix. This is something I hacked together a while ago vs. 4.3.2 when I discovered you couldn't add -lsupc++ to LIBSTDCXX_STATIC because it counts as a single word in argv. (I later decided I didn't need to do this anyway, can't remember why I thought I needed to.) It's unconditional and would need to be made so but I think it would be the basis of a solution. Franz, you could attach it to the bug report when you file it, it might be useful to somebody. cheers, DaveK
diff -purN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x '*.orig' -x '*.rej' -x '*.spec' -x '*.temp' -x '*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x libtool.m4 -x ltoptions.m4 -x ltsugar.m4 -x ltversion.m4 -x 'lt~obsolete.m4' -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x configure -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in origsrc/gcc-4.3.2/gcc/cp/g++spec.c src/gcc-4.3.2/gcc/cp/g++spec.c --- origsrc/gcc-4.3.2/gcc/cp/g++spec.c 2007-08-06 12:10:19.000000000 +0100 +++ src/gcc-4.3.2/gcc/cp/g++spec.c 2008-09-08 01:42:32.968750000 +0100 @@ -44,6 +44,9 @@ along with GCC; see the file COPYING3. #ifndef LIBSTDCXX_PROFILE #define LIBSTDCXX_PROFILE LIBSTDCXX #endif +#ifndef LIBSUPCXX +#define LIBSUPCXX "-lsupc++" +#endif void lang_specific_driver (int *in_argc, const char *const **in_argv, @@ -257,7 +260,7 @@ lang_specific_driver (int *in_argc, cons #endif /* Make sure to have room for the trailing NULL argument. */ - num_args = argc + added + need_math + shared_libgcc + (library > 0) + 1; + num_args = argc + added + need_math + shared_libgcc + (library > 0 ? 2 : 0) + 1; arglist = XNEWVEC (const char *, num_args); i = 0; @@ -319,6 +322,10 @@ lang_specific_driver (int *in_argc, cons if (arglist[j][0] != '-' || arglist[j][1] == 'l') added_libraries++; j++; + arglist[j] = LIBSUPCXX; + if (arglist[j][0] != '-' || arglist[j][1] == 'l') + added_libraries++; + j++; } if (saw_math) arglist[j++] = saw_math;