http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51906
--- Comment #49 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-03 17:50:07 UTC --- (In reply to comment #46) > (In reply to comment #45) > > Then I think we have to disable __GTHREAD_RECURSIVE_MUTEX_INIT > > unconditionally > > on darwin. > > I hope not. > putting -mmacosx-version-min=10.6 - will cause the macro value to be 1060 - so > defeating it. One would not expect it to run on 10.7. So using -mmacosx-version-min=10.6 without also using the 10.6 SDK is pilot error? But if I understand correctly, 10.6 didn't define PTHREAD_MUTEX_RECURSIVE_INITIALIZER anyway, so using the 10.6 SDK would cause it to be undefined, so why not just disable __GTHREAD_RECURSIVE_MUTEX_INIT unconditionally? The only system that defines it (10.7) can't use it. > If one puts -mmacosx-version-min=10.6 and sysroots to the 10.6 SDK - *and* > then transfers the executable to a 10.6 system - then that should work. If > not, then I agree. Presumably it doesn't even need to be transferred to a 10.6 system, using the 10.6 SDK should mean the headers don't have the static initializer, so the pthread_mutex_init_function() will always be used to create a recursive mutex, and Greg says that works on 10.7