summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads/pthread.c11
-rw-r--r--libpthread/nptl/sem_open.c2
-rw-r--r--libpthread/nptl/sem_unlink.c2
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch6
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c1
-rw-r--r--libpthread/nptl_db/Makefile.in3
7 files changed, 17 insertions, 12 deletions
diff --git a/libpthread/linuxthreads/pthread.c b/libpthread/linuxthreads/pthread.c
index 614cad1f4..db436342f 100644
--- a/libpthread/linuxthreads/pthread.c
+++ b/libpthread/linuxthreads/pthread.c
@@ -49,7 +49,7 @@ extern int _h_errno;
/* We need the global/static resolver state here. */
# include <resolv.h>
# undef _res
-extern struct __res_state _res;
+extern struct __res_state *__resp;
# endif
#endif
@@ -73,9 +73,6 @@ struct _pthread_descr_struct __pthread_initial_thread = {
#if !(USE_TLS && HAVE___THREAD)
.p_errnop = &_errno,
.p_h_errnop = &_h_errno,
-# if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__
- .p_resp = &_res,
-# endif
#endif
.p_userstack = 1,
.p_resume_count = __ATOMIC_INITIALIZER,
@@ -544,14 +541,14 @@ static void pthread_initialize(void)
THREAD_SETMEM (((pthread_descr) NULL), p_pid, __getpid());
# if !defined HAVE___THREAD && (defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__)
/* Likewise for the resolver state _res. */
- THREAD_SETMEM (((pthread_descr) NULL), p_resp, &_res);
+ THREAD_SETMEM (((pthread_descr) NULL), p_resp, __resp);
# endif
#else
/* Update the descriptor for the initial thread. */
__pthread_initial_thread.p_pid = __getpid();
# if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__
/* Likewise for the resolver state _res. */
- __pthread_initial_thread.p_resp = &_res;
+ __pthread_initial_thread.p_resp = __resp;
# endif
#endif
#if !__ASSUME_REALTIME_SIGNALS
@@ -1129,7 +1126,7 @@ void __pthread_reset_main_thread(void)
THREAD_SETMEM(self, p_errnop, &_errno);
THREAD_SETMEM(self, p_h_errnop, &_h_errno);
# if defined __UCLIBC_HAS_IPv4__ || defined __UCLIBC_HAS_IPV6__
- THREAD_SETMEM(self, p_resp, &_res);
+ THREAD_SETMEM(self, p_resp, __resp);
# endif
#endif
diff --git a/libpthread/nptl/sem_open.c b/libpthread/nptl/sem_open.c
index 28dd3aa90..71bebb00a 100644
--- a/libpthread/nptl/sem_open.c
+++ b/libpthread/nptl/sem_open.c
@@ -248,7 +248,7 @@ sem_open (const char *name, int oflag, ...)
int fd;
/* Determine where the shmfs is mounted. */
- __pthread_once (&__namedsem_once, __where_is_shmfs);
+ INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs);
/* If we don't know the mount points there is nothing we can do. Ever. */
if (mountpoint.dir == NULL)
diff --git a/libpthread/nptl/sem_unlink.c b/libpthread/nptl/sem_unlink.c
index beed02ee5..f3e7f1a70 100644
--- a/libpthread/nptl/sem_unlink.c
+++ b/libpthread/nptl/sem_unlink.c
@@ -33,7 +33,7 @@ sem_unlink (
size_t namelen;
/* Determine where the shmfs is mounted. */
- __pthread_once (&__namedsem_once, __where_is_shmfs);
+ INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs);
/* If we don't know the mount points there is nothing we can do. Ever. */
if (mountpoint.dir == NULL)
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index 8ccf96d76..fc0c6ac3e 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -95,6 +95,10 @@ $(patsubst %,$(libpthread_pthread_OUT)/pt-%.oS,$(pthread-lc-fwd)): $(libpthread_
$(compile.c)
$(patsubst %,$(libpthread_pthread_OUT)/pt-%.o,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.o: $(libpthread_pthread_OUT)/pt-%.c
$(compile.c)
+ifeq ($(DOPIC),y)
+$(patsubst %,$(libpthread_pthread_OUT)/pt-%.os,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.os: $(libpthread_pthread_OUT)/pt-%.c
+ $(compile.c)
+endif
objclean-y += CLEAN_libpthread/nptl/sysdeps/pthread
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
index 88ca01a51..102c0dad1 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
@@ -7,16 +7,20 @@
libpthread_linux_arch_SSRC = pt-vfork.S clone.S
libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
- pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c
+ pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
+ pt-__syscall_error.c
libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
libc_linux_arch_SSRC = clone.S vfork.S
+librt_linux_arch_CSRC = pt-__syscall_error.c
+
ASFLAGS += -DUSE___THREAD
ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
CFLAGS-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
+CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
ASFLAGS-clone.S = -D_LIBC_REENTRANT
ASFLAGS-vfork.S = -D_LIBC_REENTRANT
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c
new file mode 100644
index 000000000..872e4eff6
--- /dev/null
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-__syscall_error.c
@@ -0,0 +1 @@
+#include <../../../../../../../libc/sysdeps/linux/sparc/__syscall_error.c>
diff --git a/libpthread/nptl_db/Makefile.in b/libpthread/nptl_db/Makefile.in
index 644ec5552..a3fc1cd74 100644
--- a/libpthread/nptl_db/Makefile.in
+++ b/libpthread/nptl_db/Makefile.in
@@ -12,8 +12,7 @@ CFLAGS-nptl_db := -DLIBPTHREAD_SO="\"libpthread.so.$(ABI_VERSION)\""
CFLAGS-nptl_db += -I$(top_srcdir)libpthread/nptl -D_GNU_SOURCE
CFLAGS-nptl_db += -DIS_IN_libthread_db=1 -DNOT_IN_libc -std=gnu99 -I$(top_srcdir)ldso/include
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
-
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
LIBS-libthread_db.so := $(LIBS)
libthread_db_FULL_NAME := libthread_db-$(VERSION).so