http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59807
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- It a target's pthread_mutex requires cleanup then it should not define __GTHREAD_MUTEX_INIT, it should use the init function, and then it gets a chance to also run a destroy function. That can be controlled by defining _GTHREAD_USE_MUTEX_INIT_FUNC in the relevant libstdc++-v3/config/os/xxx/os_defines.h header.