http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982
--- Comment #12 from David Edelsohn <dje at gcc dot gnu.org> 2011-11-04 14:26:58 UTC --- Bootstrap broke with trunk revision 180821. * include/<target>/bits/gthr-default.h should be a modified copy of gthr-aix.h, right? Yes, gthr-default.h is gthr-aix.h. * What's the exact command line for the failing atomic.cc compile? In particular, is -pthread included? That would lead to gthr-default.h including gthr-posix.h, which again includes <pthread.h>. Yes, this is a pthread multilib. libtool: compile: /tmp/20111103/./gcc/xgcc -shared-libgcc -B/tmp/20111103/./gcc -nostdinc++ -L/tmp/20111103/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/src -L/ tmp/20111103/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/src/.libs -B/farm/dje/i nstall/powerpc-ibm-aix5.3.0.0-20111103/powerpc-ibm-aix5.3.0.0/bin/ -B/farm/dje/i nstall/powerpc-ibm-aix5.3.0.0-20111103/powerpc-ibm-aix5.3.0.0/lib/ -isystem /far m/dje/install/powerpc-ibm-aix5.3.0.0-20111103/powerpc-ibm-aix5.3.0.0/include -is ystem /farm/dje/install/powerpc-ibm-aix5.3.0.0-20111103/powerpc-ibm-aix5.3.0.0/s ys-include -pthread -I/tmp/20111103/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/ include/powerpc-ibm-aix5.3.0.0 -I/tmp/20111103/powerpc-ibm-aix5.3.0.0/pthread/li bstdc++-v3/include -I/farm/dje/src/src/libstdc++-v3/libsupc++ -fno-implicit-temp lates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=atomic.lo -g -O2 -pthread -st d=gnu++0x -c /farm/dje/src/src/libstdc++-v3/src/atomic.cc -DPIC -o .libs/atomic .o * Perhaps repeat the command with -g3 -save-temps and check for a pthread_once declaration. AIX /usr/include/pthread.h extern int pthread_once __((pthread_once_t *, void (*)(void))); This header file is surrounded by #ifdef __cplusplus extern "C" { #endif This is why the error implies that something about the libgcc change is causing the header file to be treated as C++ instead of extern "C". * If I were to debug this myself, the quickest way (given enough CPU power) is usually to have a succeeding and failing build in parallel and compare command lines and -g3 -save-temps output.