[git commit master] more fixes for x86_64 nptl

Austin Foxley austinf at cetoncorp.com
Fri Apr 23 14:31:55 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=de2101834f0c80e38008e8d1d1848ab94ce2341e
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

also cleanup some PIC (should be __PIC__) that snuck in

Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 libpthread/nptl/sysdeps/pthread/Makefile.in        |    2 +-
 .../nptl/sysdeps/unix/sysv/linux/Makefile.in       |    7 +++----
 .../unix/sysv/linux/i386/i486/lowlevellock.S       |    2 +-
 .../unix/sysv/linux/i386/i486/pthread_cond_wait.S  |    2 +-
 .../unix/sysv/linux/i386/i486/sem_timedwait.S      |    2 +-
 .../nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S |    4 ++--
 .../sysdeps/unix/sysv/linux/sh/sem_timedwait.S     |    4 ++--
 .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch   |    2 +-
 .../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S  |    2 +-
 .../unix/sysv/linux/x86_64/lowlevelrobustlock.S    |    2 +-
 .../sysv/linux/x86_64/pthread_cond_timedwait.S     |    4 ++--
 .../unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S |    1 +
 .../sysv/linux/x86_64/pthread_rwlock_timedrdlock.S |    3 ++-
 .../sysv/linux/x86_64/pthread_rwlock_timedwrlock.S |    3 ++-
 .../unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S |    1 +
 .../sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S |    2 +-
 16 files changed, 23 insertions(+), 20 deletions(-)

diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index e417e6c..656f290 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -56,7 +56,7 @@ X64_PTHREAD_EXCLUDE_LIST = pthread_spin_unlock.c pthread_spin_init.c \
 		pthread_barrier_wait.c pthread_cond_broadcast.c	\
 		pthread_cond_signal.c pthread_rwlock_timedrdlock.c	\
 		pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c pthread_rwlock_wrlock.c \
-		pthread_rwlock_rdlock.c pthread_cond_timedwait.c
+		pthread_rwlock_rdlock.c pthread_cond_timedwait.c pthread_cond_wait.c
 
 libpthread_CSRC := $(filter-out $(X64_PTHREAD_EXCLUDE_LIST),$(libpthread_CSRC))
 endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
index 31d39e8..f0ddcab 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
@@ -61,15 +61,14 @@ libpthread_CSRC := $(filter-out $(SH_PTHREAD_SPECIFIC),$(libpthread_CSRC))
 endif
 
 ifeq ($(TARGET_ARCH),i386)
-X86_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c \
-	lowlevelrobustlock.c
+X86_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c
 libpthread_CSRC := $(filter-out $(X86_PTHREAD_SPECIFIC),$(libpthread_CSRC))
 endif
 
 ifeq ($(TARGET_ARCH),x86_64)
 libc_SSRC := $(filter-out waitpid.S,$(libc_SSRC))
-X86_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c
-libpthread_CSRC := $(filter-out $(X86_PTHREAD_SPECIFIC),$(libpthread_CSRC))
+X64_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c
+libpthread_CSRC := $(filter-out $(X64_PTHREAD_SPECIFIC),$(libpthread_CSRC))
 endif
 
 CFLAGS-pthread_getcpuclockid.c = -I$(top_srcdir)librt
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
index aff01e9..00f8b56 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
@@ -180,7 +180,7 @@ __lll_timedlock_wait:
 	cfi_rel_offset(%ebx, 0)
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	LOAD_PIC_REG (bx)
 	cmpl	$0, __have_futex_clock_realtime at GOTOFF(%ebx)
 #  else
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index ab4ef0a..6261805 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -567,7 +567,7 @@ __condvar_w_cleanup:
 	.uleb128  0
 .Lcstend:
 
-#ifdef PIC
+#ifdef __PIC__
 	.section .gnu.linkonce.t.__i686.get_pc_thunk.cx,"ax", at progbits
 	.globl	__i686.get_pc_thunk.cx
 	.hidden	__i686.get_pc_thunk.cx
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
index 218b12f..a1e3225 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S
@@ -146,7 +146,7 @@ sem_timedwait:
 .Lafter_ret:
 3:	negl	%esi
 6:
-#ifdef PIC
+#ifdef __PIC__
 	call	__x86.get_pc_thunk.bx
 #else
 	movl	$4f, %ebx
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
index 5428048..25c75c5 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
@@ -234,7 +234,7 @@ __lll_timedlock_wait:
 
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
 	mov.l	.Lhave, r1
-#  ifdef PIC
+#  ifdef __PIC__
 	mova	.Lgot, r0
 	mov.l	.Lgot, r12
 	add	r0, r12
@@ -284,7 +284,7 @@ __lll_timedlock_wait:
 	 mov.l	@r15+, r12
 
 	.align	2
-# ifdef PIC
+# ifdef __PIC__
 .Lgot:
 	.long	_GLOBAL_OFFSET_TABLE_
 .Lhave:
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
index 774442f..7fb61b2 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/sem_timedwait.S
@@ -215,7 +215,7 @@ sem_wait_cleanup:
  	DEC (@(NWAITERS,r8), r2)
 .LcallUR:
 	mov.l	.Lresume, r1
-#ifdef PIC
+#ifdef __PIC__
 	add	r12, r1
 #endif
 	jsr	@r1
@@ -224,7 +224,7 @@ sem_wait_cleanup:
 
 	.align	2
 .Lresume:
-#ifdef PIC
+#ifdef __PIC__
 	.long	_Unwind_Resume at GOTOFF
 #else
 	.long	_Unwind_Resume
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
index 01a6437..2f4d5e0 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
@@ -15,7 +15,7 @@ libc_a_CSRC = fork.c
 libc_a_SSRC = clone.S vfork.S
 
 libpthread_SSRC += lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \
-		   sem_post.S sem_timedwait.S \
+		   sem_post.S sem_timedwait.S lowlevelrobustlock.S \
 		   sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
 		   pthread_rwlock_timedrdlock.S pthread_rwlock_timedwrlock.S pthread_rwlock_unlock.S \
 		   pthread_cond_timedwait.S pthread_cond_wait.S pthread_spin_unlock.S
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
index 8fbdd7e..f875323 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
@@ -162,7 +162,7 @@ __lll_lock_wait:
 __lll_timedlock_wait:
 	cfi_startproc
 # ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 	cmpl	$0, __have_futex_clock_realtime
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
index 4b43463..2eb8e29 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
@@ -22,7 +22,7 @@
 #include <pthread-errnos.h>
 #include <lowlevellock.h>
 #include <lowlevelrobustlock.h>
-#include <kernel-features.h>
+#include <bits/kernel-features.h>
 
 	.text
 
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index b9ec1fb..bc5c0b3 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -22,8 +22,8 @@
 #include <lowlevelcond.h>
 #include <pthread-pi-defines.h>
 #include <pthread-errnos.h>
-
 #include <bits/kernel-features.h>
+#include <tcb-offsets.h>
 
 /* For the calculation see asm/vsyscall.h.  */
 #define VSYSCALL_ADDR_vgettimeofday	0xffffffffff600000
@@ -96,7 +96,7 @@ __pthread_cond_timedwait:
 
 22:
 #ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 	cmpl	$0, __have_futex_clock_realtime
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
index 9b8408b..f36e7a7 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
@@ -22,6 +22,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <bits/kernel-features.h>
+#include <tcb-offsets.h>
 
 
 	.text
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
index bb12d49..3629ffb 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
@@ -22,6 +22,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <bits/kernel-features.h>
+#include <tcb-offsets.h>
 
 
 /* For the calculation see asm/vsyscall.h.  */
@@ -94,7 +95,7 @@ pthread_rwlock_timedrdlock:
 
 11:
 #ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 	cmpl	$0, __have_futex_clock_realtime
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
index 401bbc5..23e1ee1 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
@@ -22,6 +22,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <bits/kernel-features.h>
+#include <tcb-offsets.h>
 
 
 /* For the calculation see asm/vsyscall.h.  */
@@ -91,7 +92,7 @@ pthread_rwlock_timedwrlock:
 
 11:
 #ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 	cmpl	$0, __have_futex_clock_realtime
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
index b7bc852..ccfc11b 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
@@ -22,6 +22,7 @@
 #include <lowlevelrwlock.h>
 #include <pthread-errnos.h>
 #include <bits/kernel-features.h>
+#include <tcb-offsets.h>
 
 
 	.text
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
index 685eff9..704a222 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S
@@ -60,7 +60,7 @@ sem_timedwait:
 	jae	6f
 
 #ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
+#  ifdef __PIC__
 	cmpl	$0, __have_futex_clock_realtime(%rip)
 #  else
 	cmpl	$0, __have_futex_clock_realtime
-- 
1.6.3.3



More information about the uClibc-cvs mailing list