[git commit nptl_glibc_sync] Get new nptl building on SH4
Khem Raj
raj.khem at gmail.com
Sat Feb 20 03:25:17 UTC 2010
On Thu, Feb 18, 2010 at 12:18 AM, Carmelo AMOROSO
<carmelo.amoroso at st.com> wrote:
> On 2/10/2010 3:24 PM, Khem Raj wrote:
>>
>> commit: http://git.uclibc.org/uClibc/commit/?id=ed0915ba70d0ff6ed0a78f45d46822763a580737
>> branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl_glibc_sync
>>
>> Signed-off-by: Khem Raj <raj.khem at gmail.com>
>
> Hi Khem,
> I have limited capabilities to contribute currently due to a healthy
> issue at my shoulder, I'll ask some engineers in my team to do a lot of
> tests on sh4.
thanks Carmelo. is it booting on sh yet or not ?
>
> Cheers,
> Carmelo
>
>> ---
>> libc/sysdeps/linux/common/pause.c | 1 +
>> libc/sysdeps/linux/sh/sysdep.h | 21 +++++++++++++++++++-
>> .../nptl/sysdeps/unix/sysv/linux/Makefile.in | 6 ++--
>> .../nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S | 1 +
>> .../nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h | 1 -
>> .../unix/sysv/linux/sh/lowlevelrobustlock.S | 1 +
>> .../nptl/sysdeps/unix/sysv/linux/sh/not-cancel.h | 1 -
>> .../unix/sysv/linux/sh/pthread_cond_broadcast.S | 1 +
>> .../unix/sysv/linux/sh/pthread_cond_signal.S | 1 +
>> .../nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S | 1 +
>> .../unix/sysv/linux/sh/pthread_rwlock_unlock.S | 1 +
>> libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S | 2 +-
>> 12 files changed, 31 insertions(+), 7 deletions(-)
>> delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/not-cancel.h
>>
>> diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
>> index cd0ea4a..132ffa8 100644
>> --- a/libc/sysdeps/linux/common/pause.c
>> +++ b/libc/sysdeps/linux/common/pause.c
>> @@ -37,3 +37,4 @@ weak_alias (__libc_pause, pause)
>> #ifdef __UCLIBC_HAS_THREADS_NATIVE__
>> LIBC_CANCEL_HANDLED (); /* sigsuspend handles our cancellation. */
>> #endif
>> +
>> diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h
>> index 1d49055..bd62342 100644
>> --- a/libc/sysdeps/linux/sh/sysdep.h
>> +++ b/libc/sysdeps/linux/sh/sysdep.h
>> @@ -273,5 +273,24 @@
>> .align 2; \
>> 1: .long SYS_ify (syscall_name); \
>> 2:
>> -
>> #endif /* __ASSEMBLER__ */
>> +
>> +/* Pointer mangling support. */
>> +#if defined NOT_IN_libc && defined IS_IN_rtld
>> +/* We cannot use the thread descriptor because in ld.so we use setjmp
>> + earlier than the descriptor is initialized. Using a global variable
>> + is too complicated here since we have no PC-relative addressing mode. */
>> +#else
>> +# ifdef __ASSEMBLER__
>> +# define PTR_MANGLE(reg, tmp) \
>> + stc gbr,tmp; mov.l @(POINTER_GUARD,tmp),tmp; xor tmp,reg
>> +# define PTR_MANGLE2(reg, tmp) xor tmp,reg
>> +# define PTR_DEMANGLE(reg, tmp) PTR_MANGLE (reg, tmp)
>> +# define PTR_DEMANGLE2(reg, tmp) PTR_MANGLE2 (reg, tmp)
>> +# else
>> +# define PTR_MANGLE(var) \
>> + (var) = (void *) ((uintptr_t) (var) ^ THREAD_GET_POINTER_GUARD ())
>> +# define PTR_DEMANGLE(var) PTR_MANGLE (var)
>> +# endif
>> +#endif
>> +
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
>> index faa8ea5..0b3b771 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
>> @@ -12,8 +12,7 @@ libpthread_CSRC = pthread_attr_getaffinity.c \
>> pthread_yield.c sem_post.c sem_timedwait.c \
>> pthread_sigqueue.c \
>> sem_trywait.c sem_wait.c pt-fork.c \
>> - sigtimedwait.c sigwaitinfo.c sigwait.c pt-sleep.c \
>> - lowlevelrobustlock.c
>> + sigtimedwait.c sigwaitinfo.c sigwait.c pt-sleep.c
>>
>> libpthread_SSRC = #ptw-close.S ptw-open.S ptw-waitid.S ptw-waidpid.S ptw-write.S
>>
>> @@ -37,10 +36,11 @@ endif
>>
>> ifeq ($(TARGET_ARCH),arm)
>> libc_SSRC := $(filter-out waitpid.S,$(libc_SSRC))
>> +libpthread_CSRC += lowlevelrobustlock.c
>> endif
>>
>> ifeq ($(TARGET_ARCH),mips)
>> -libpthread_CSRC += lowlevellock.c
>> +libpthread_CSRC += lowlevellock.c lowlevelrobustlock.c
>> libc_CSRC += libc-lowlevellock.c
>> endif
>>
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
>> index 6d40364..5428048 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
>> @@ -21,6 +21,7 @@
>> #include <pthread-errnos.h>
>> #include <bits/kernel-features.h>
>> #include <lowlevellock.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>> .text
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
>> index d7fada9..19ce7fe 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.h
>> @@ -27,7 +27,6 @@
>> #include <bits/kernel-features.h>
>> #endif
>>
>> -#define SYS_futex 240
>> #define FUTEX_WAIT 0
>> #define FUTEX_WAKE 1
>> #define FUTEX_CMP_REQUEUE 4
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
>> index dab1ae4..1e05a56 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
>> @@ -22,6 +22,7 @@
>> #include <lowlevellock.h>
>> #include <lowlevelrobustlock.h>
>> #include <bits/kernel-features.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>> .text
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/not-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/not-cancel.h
>> deleted file mode 100644
>> index acf1a61..0000000
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/not-cancel.h
>> +++ /dev/null
>> @@ -1 +0,0 @@
>> -#include "../i386/not-cancel.h"
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
>> index 3825124..1242fc2 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
>> @@ -22,6 +22,7 @@
>> #include <bits/kernel-features.h>
>> #include <pthread-pi-defines.h>
>> #include <pthread-errnos.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>> .text
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
>> index 914a1ba..1c3bacb 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
>> @@ -21,6 +21,7 @@
>> #include <lowlevelcond.h>
>> #include <bits/kernel-features.h>
>> #include <pthread-errnos.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>> .text
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
>> index caebb93..a1477b3 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_once.S
>> @@ -20,6 +20,7 @@
>> #include <sysdep.h>
>> #include <bits/kernel-features.h>
>> #include <lowlevellock.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>>
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
>> index 239090b..bc6c6c2 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
>> @@ -20,6 +20,7 @@
>> #include <lowlevellock.h>
>> #include <lowlevelrwlock.h>
>> #include <bits/kernel-features.h>
>> +#include <tcb-offsets.h>
>> #include "lowlevel-atomic.h"
>>
>>
>> diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
>> index 5433eac..a45c09f 100644
>> --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
>> +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/vfork.S
>> @@ -66,6 +66,6 @@ ENTRY (__vfork)
>> .word PID - TLS_PRE_TCB_SIZE
>> .align 2
>> PSEUDO_END (__vfork)
>> -libc_hidden_def (__vfork)
>> +hidden_def (vfork)
>>
>> weak_alias (__vfork, vfork)
>
>
More information about the uClibc-cvs
mailing list