On AIX, one criteria to select the multilib gcc-libraries is the '-pthread' compiler flag: When linking with -pthread, gcc uses different libgcc_s and libstdc++. One thing is: Mixing objects built with and without -pthread isn't a good idea in general. Another thing is: In Prefix, we disable multilib, so the pthread-libs are not built at all. Now when linking C++ code, simply using STL, executables with -pthread end in coredumps like this: > terminate called after throwing an instance of 'std::bad_cast' > what(): std::bad_cast
The solution is to knock out pthread as multilib-criterion, and always behave as if '-pthread' was specified, for both compiling and linking. This already is done for gcc-3.4.6: $FILESDIR/3.4.4/aix-force-pthread.patch
Fixed for gcc-4.2.4 in r43722.
any more to do here?
yes: for gcc-4.3, and 4.1 eventually.
Fixed for gcc 4.3.3/4.4.1, dropped ~ppc-aix keyword from gcc-4.3.2 in r51702.