http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51296
--- Comment #34 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
Uni-Bielefeld.DE> 2012-02-03 09:48:15 UTC ---
> Since a similar problem exists for darwin11's
> PTHREAD_RECURSIVE_MUTEX_INITIALIZER this solution is not OSF-specific. This
> allows config/os/*/os_defines.h to define one or more of:
>
> _GTHREAD_USE_MUTEX_INIT_FUNC
> _GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC
> _GTHREAD_USE_COND_INIT_FUNC
>
> which will cause gthr-posix.h to #undef the INIT macro and define an
> INIT_FUNCTION instead.
>
> Would this work here too? You could either add a config/os/osf/os_defines.h
I guess so. I'll try it with this weekend's bootstrap.
> file (which would also need the other files in config/os/generic to be copied
> for osf) or you could just put this in gthr-posix.h
>
> #ifdef __osf__
> # define _GTHREAD_USE_MUTEX_INIT_FUNC
> # define _GTHREAD_USE_COND_INIT_FUNC
> #endif
Since that file already has osf-specific code (and the port will go away
after 4.7 anyway), I'll probably go this route.
Thanks.
Rainer