This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Applied: PATCH for thread-safe C++ static local initialization
On Mon, 30 Aug 2004 09:55:41 -0400, Jason Merrill <jason@redhat.com> wrote:
> On Sun, 29 Aug 2004 21:53:39 +0100, Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk> wrote:
>
>> /work/rearnsha/gnu/egcs/i386-unknown-netbsdelf2.0./libstdc++-v3/src/.libs/l
>> ibstdc++.so: undefined reference to `pthread_mutex_init'
>
> Ah, I need to add some more #pragma weaks to gthr-posix.h.
Like so. Applied to trunk.
2004-08-30 Jason Merrill <jason@redhat.com>
* gthr-posix.h: Add #pragma weaks.
*** gthr-posix.h.~1~ 2004-08-30 12:31:22.979861063 -0400
--- gthr-posix.h 2004-08-30 09:56:58.805811971 -0400
*************** typedef pthread_mutex_t __gthread_recurs
*** 70,75 ****
--- 70,80 ----
#pragma weak pthread_mutex_lock
#pragma weak pthread_mutex_trylock
#pragma weak pthread_mutex_unlock
+ #pragma weak pthread_mutexattr_init
+ #pragma weak pthread_mutexattr_settype
+ #pragma weak pthread_mutexattr_destroy
+
+ #pragma weak pthread_mutex_init
#if defined(_LIBOBJC) || defined(_LIBOBJC_WEAK)
/* Objective-C. */
*************** typedef pthread_mutex_t __gthread_recurs
*** 79,85 ****
#pragma weak pthread_cond_signal
#pragma weak pthread_cond_wait
#pragma weak pthread_exit
- #pragma weak pthread_mutex_init
#pragma weak pthread_mutex_destroy
#pragma weak pthread_self
#ifdef _POSIX_PRIORITY_SCHEDULING
--- 84,89 ----