http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238
--- Comment #8 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-08 18:18:04 UTC --- I did a non-bootstrap build to speed things up a bit. (The system already has GCC 4.5.2.) First: Your patch needs a couple of ";;" sprinkled in there :-) Second: With the patch, after working around some unrelated integer-type issues, I get the following error: [...] Making all in include gmake[4]: Entering directory `/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include' mkdir -p ./powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch /tmp/gcc-4.7.0/_build/./gcc/xgcc -shared-libgcc -B/tmp/gcc-4.7.0/_build/./gcc -nostdinc++ -L/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src -L/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs -B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -B/opt/tg/powerpc-ibm-aix4.3.2.0/lib/ -isystem /opt/tg/powerpc-ibm-aix4.3.2.0/include -isystem /opt/tg/powerpc-ibm-aix4.3.2.0/sys-include -x c++-header -nostdinc++ -g -O2 -I/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0 -I/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include -I/tmp/gcc-4.7.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x /tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h \ -o powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch/O2ggnu++0x.gch In file included from /tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:102:0: /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:62:13: error: '__gthread_cond_t' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:67:5: error: '__native_type' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:71:13: error: '__native_type' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:141:5: error: 'native_handle_type' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable: In member function 'std::cv_status std::condition_variable::__wait_until_impl(std::unique_lock<std::mutex>&, const std::chrono::time_point<_Clock, _Duration>&)': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:157:2: error: '__gthread_time_t' was not declared in this scope /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:157:19: error: expected ';' before '__ts' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:163:28: error: '_M_cond' was not declared in this scope /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:7: error: '__ts' was not declared in this scope /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:11: error: there are no arguments to '__gthread_cond_timedwait' that depend on a template parameter, so a declaration of '__gthread_cond_timedwait' must be available [-fpermissive] /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:11: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) In file included from /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/future:41:0, from /tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:104: /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: At global scope: /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:63:13: error: '__gthread_t' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:70:7: error: 'native_handle_type' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:76:29: error: expected ')' before '__id' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:174:5: error: 'native_handle_type' does not name a type /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In constructor 'std::thread::id::id()': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:73:23: error: class 'std::thread::id' does not have any field named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In function 'bool std::operator==(std::thread::id, std::thread::id)': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:36: error: 'class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:51: error: 'class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:60: error: '__gthread_equal' was not declared in this scope /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In function 'bool std::operator<(std::thread::id, std::thread::id)': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:88:20: error: 'class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:88:36: error: 'class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In member function 'std::size_t std::hash<std::thread::id>::operator()(const std::thread::id&) const': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:225:43: error: 'const class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In function 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, std::thread::id)': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:235:23: error: 'class std::thread::id' has no member named '_M_thread' /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In function 'std::thread::id std::this_thread::get_id()': /tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:250:58: error: '__gthread_self' was not declared in this scope gmake[4]: *** [powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1 gmake[4]: Leaving directory `/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include' gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory `/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3' gmake[2]: *** [all] Error 2 gmake[2]: Leaving directory `/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3' gmake[1]: *** [all-target-libstdc++-v3] Error 2 gmake[1]: Leaving directory `/tmp/gcc-4.7.0/_build' gmake: *** [all] Error 2 __gthread_cond_t appears to be a typedef defined in gthr-posix.h. Re-running the compiler invocation with -E shows that this header file isn't getting pulled in anywhere.