From 2fe6f141f8f33a4f733341568eca3de6c060a938 Mon Sep 17 00:00:00 2001 From: midipix Date: Thu, 19 Mar 2015 22:00:05 -0400 Subject: gcc/gthr.h, libgcc/morestack: + require pthread to be present; + require all pthread symbols to be strongly defined. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information. --- libgcc/generic-morestack-thread.c | 17 ++++------------- libgcc/generic-morestack.c | 3 +-- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'libgcc') diff --git a/libgcc/generic-morestack-thread.c b/libgcc/generic-morestack-thread.c index bc237957e..2096ab347 100644 --- a/libgcc/generic-morestack-thread.c +++ b/libgcc/generic-morestack-thread.c @@ -40,17 +40,9 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "generic-morestack.h" -/* We declare the pthread functions we need as weak, so that - libgcc_s.so does not need to be linked against -lpthread. */ - -extern int pthread_once (pthread_once_t *, void (*) (void)) - __attribute__ ((weak)); - -extern int pthread_key_create (pthread_key_t *, void (*) (void *)) - __attribute__ ((weak)); - -extern int pthread_setspecific (pthread_key_t, const void *) - __attribute__ ((weak)); +extern int pthread_once (pthread_once_t *, void (*) (void)); +extern int pthread_key_create (pthread_key_t *, void (*) (void *)); +extern int pthread_setspecific (pthread_key_t, const void *); /* The key for the list of stack segments to free when the thread exits. This is created by pthread_key_create. */ @@ -134,8 +126,7 @@ int __wrap_pthread_create (pthread_t *, const pthread_attr_t *, __attribute__ ((visibility ("hidden"))); extern int __real_pthread_create (pthread_t *, const pthread_attr_t *, - void *(*start_routine) (void *), void *) - __attribute__ ((weak)); + void *(*start_routine) (void *), void *); int __wrap_pthread_create (pthread_t *tid, const pthread_attr_t *attr, diff --git a/libgcc/generic-morestack.c b/libgcc/generic-morestack.c index 77344a925..1bac2fbe9 100644 --- a/libgcc/generic-morestack.c +++ b/libgcc/generic-morestack.c @@ -607,8 +607,7 @@ __generic_releasestack (size_t *pavailable) try to invoke a signal handler which itself wants to split the stack. */ -extern int pthread_sigmask (int, const sigset_t *, sigset_t *) - __attribute__ ((weak)); +extern int pthread_sigmask (int, const sigset_t *, sigset_t *); void __morestack_block_signals (void) -- cgit v1.2.3