https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66146
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-05-15 Ever confirmed|0 |1 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- Thanks, Martin. So maybe something like this: --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -726,7 +738,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __set_once_functor_lock_ptr(&__functor_lock); #endif +#ifdef __powerpc__ + int __e; + __try { + __e = __gthread_once(&__once._M_once, &__once_proxy); + } __catch(...) { + __once._M_once = once_flag{}._M_once; + __throw_exception_again; + } +#else int __e = __gthread_once(&__once._M_once, &__once_proxy); +#endif #ifndef _GLIBCXX_HAVE_TLS if (__functor_lock)