summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/signal/allocrtsig.c4
-rw-r--r--libc/sysdeps/linux/common/Makefile.in4
-rw-r--r--libc/sysdeps/linux/common/sigprocmask.c25
-rw-r--r--libc/unistd/Makefile.in4
-rw-r--r--libpthread/nptl/Banner2
-rw-r--r--libpthread/nptl/Makefile.in11
-rw-r--r--libpthread/nptl/compat/libc-symbols.h58
-rw-r--r--libpthread/nptl/pthread_getattr_np.c2
-rw-r--r--libpthread/nptl/sysdeps/mips/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in68
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in22
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c4
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h9
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch1
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c2
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/raise.c2
17 files changed, 93 insertions, 129 deletions
diff --git a/libc/signal/allocrtsig.c b/libc/signal/allocrtsig.c
index ac6ba50d7..0bdbd2842 100644
--- a/libc/signal/allocrtsig.c
+++ b/libc/signal/allocrtsig.c
@@ -32,7 +32,11 @@
static int current_rtmin = -1;
static int current_rtmax = -1;
#else
+# ifdef __UCLIBC_HAS_THREADS_NATIVE__
static int current_rtmin = __SIGRTMIN + 2;
+# else
+static int current_rtmin = __SIGRTMIN;
+# endif
static int current_rtmax = __SIGRTMAX;
#endif
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index b287d5de9..ee11899e7 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -29,6 +29,10 @@ CSRC:=$(filter-out $(COMMON_NO_MULTI),$(CSRC))
CSRC:=$(filter-out $(COMMON_SSP),$(CSRC))
endif
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+CSRC:=$(filter-out getpid.c raise.c,$(CSRC))
+endif
+
# fails for some reason
ifneq ($(strip $(ARCH_OBJS)),)
CSRC:=$(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
diff --git a/libc/sysdeps/linux/common/sigprocmask.c b/libc/sysdeps/linux/common/sigprocmask.c
index 3f42b09b8..c555bb51b 100644
--- a/libc/sysdeps/linux/common/sigprocmask.c
+++ b/libc/sysdeps/linux/common/sigprocmask.c
@@ -15,6 +15,7 @@
#ifdef __NR_rt_sigprocmask
#define __NR___rt_sigprocmask __NR_rt_sigprocmask
+static inline
_syscall4(int, __rt_sigprocmask, int, how, const sigset_t *, set,
sigset_t *, oldset, size_t, size);
@@ -42,18 +43,6 @@ int __sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
}
#endif
- if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
- (((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
- ((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
- && (how != SIG_SETMASK))
-#endif
- ) {
- __set_errno(EINVAL);
- return -1;
- }
return __rt_sigprocmask(how, set, oldset, _NSIG / 8);
}
@@ -89,18 +78,6 @@ int __sigprocmask(int how, const sigset_t * set, sigset_t * oldset)
}
#endif
- if (set &&
-#if (SIG_BLOCK == 0) && (SIG_UNBLOCK == 1) && (SIG_SETMASK == 2)
- (((unsigned int) how) > 2)
-#else
-#warning "compile time assumption violated.. slow path..."
- ((how != SIG_BLOCK) && (how != SIG_UNBLOCK)
- && (how != SIG_SETMASK))
-#endif
- ) {
- __set_errno(EINVAL);
- return -1;
- }
return (__syscall_sigprocmask(how, set, oldset));
}
#endif
diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in
index 1bc052749..84b83b854 100644
--- a/libc/unistd/Makefile.in
+++ b/libc/unistd/Makefile.in
@@ -22,6 +22,10 @@ else
CSRC+=getopt-susv3.c
endif
+ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
+CSRC:=$(filter-out sleep.c,$(CSRC))
+endif
+
UNISTD_DIR:=$(top_srcdir)libc/unistd
UNISTD_OUT:=$(top_builddir)libc/unistd
diff --git a/libpthread/nptl/Banner b/libpthread/nptl/Banner
index 7c1487e7b..8b6518942 100644
--- a/libpthread/nptl/Banner
+++ b/libpthread/nptl/Banner
@@ -1 +1 @@
-Native POSIX Threads Library by Ulrich Drepper et al
+Native POSIX Threads Library by Ulrich Drepper et al, uClibc port by Steven Hill
diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
index 94bb3aa96..53f684d39 100644
--- a/libpthread/nptl/Makefile.in
+++ b/libpthread/nptl/Makefile.in
@@ -87,7 +87,7 @@ libpthread-routines = init vars events version \
pt-raise pt-system \
flockfile ftrylockfile funlockfile \
sigaction \
- herrno res pt-allocrtsig \
+ herrno res \
pthread_kill_other_threads \
pthread_getaffinity pthread_setaffinity \
pthread_attr_getaffinity pthread_attr_setaffinity \
@@ -168,6 +168,7 @@ CFLAGS-pthread_barrierattr_setpshared.c = -D_GNU_SOURCE
CFLAGS-sem_open.c = -D_GNU_SOURCE
CFLAGS-nptl = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS) -DIS_IN_libpthread=1
+#CFLAGS:=$(CFLAGS:-O1=-O2)
CFLAGS-OMIT-alloca_cutoff.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-forward.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
@@ -238,7 +239,8 @@ libpthread_so_SRC = $(patsubst %, $(libpthread_DIR)/%.c, \
libc-a-y += $(patsubst %.c, $(libpthread_OUT)/%.o, alloca_cutoff.c \
forward.c libc-cancellation.c)
-libc-so-y += $(patsubst %.c, $(libpthread_OUT)/%.oS, forward.c)
+libc-so-y += $(patsubst %.c, $(libpthread_OUT)/%.oS, forward.c \
+ libc-cancellation.c)
libpthread-a-y := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.o,$(libpthread_a_SRC))
libpthread-so-y := $(patsubst $(libpthread_DIR)/%.c,$(libpthread_OUT)/%.oS,$(libpthread_so_SRC))
@@ -252,7 +254,6 @@ lib-a-y += $(top_builddir)lib/libpthread.a
lib-so-y += $(top_builddir)lib/libpthread.so
objclean-y += libpthread_clean
-
headers-y += nptl_headers
headers_clean-y += nptl_headers_clean
@@ -290,8 +291,8 @@ nptl_headers:
$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/stdio-lock.h $(top_builddir)include/bits/
nptl_headers_clean:
- $(RM) ../$(PTDIR)/banner.h $(top_builddir)include/pthread.h \
- ../$(PTDIR)/version.h $(top_builddir)include/semaphore.h
+ $(RM) $(PTDIR)/banner.h $(top_builddir)include/pthread.h \
+ $(PTDIR)/version.h $(top_builddir)include/semaphore.h
libpthread_clean:
$(RM) $(libpthread_OUT)/*.{o,os,oS}
diff --git a/libpthread/nptl/compat/libc-symbols.h b/libpthread/nptl/compat/libc-symbols.h
index 2c245d9d7..e281a3046 100644
--- a/libpthread/nptl/compat/libc-symbols.h
+++ b/libpthread/nptl/compat/libc-symbols.h
@@ -51,74 +51,20 @@
#define text_set_element(set, symbol) _elf_set_element(set, symbol)
#define __sec_comment "\n\t#"
-#if 0
-# ifndef __ASSEMBLER__
-# if !defined HAVE_VISIBILITY_ATTRIBUTE \
- || defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE
-# define __hidden_proto_hiddenattr(attrs...)
-# else
-# define __hidden_proto_hiddenattr(attrs...) \
- __attribute__ ((visibility ("hidden"), ##attrs))
-# endif
-# define hidden_proto(name, attrs...) \
- __hidden_proto (name, __GI_##name, ##attrs)
-# define __hidden_proto(name, internal, attrs...) \
- extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
- __hidden_proto_hiddenattr (attrs);
-# define __hidden_asmname(name) \
- __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
-# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
-# define __hidden_asmname2(prefix, name) #prefix name
-# define __hidden_ver1(local, internal, name) \
- extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
- extern __typeof (name) __EI_##name \
- __attribute__((alias (__hidden_asmname (#local))))
-# define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name);
-# define hidden_data_ver(local, name) hidden_ver(local, name)
-# define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
-# define hidden_data_def(name) hidden_def(name)
-# define hidden_weak(name) \
- __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
-# define hidden_data_weak(name) hidden_weak(name)
-# else
-/* For assembly, we need to do the opposite of what we do in C:
- in assembly gcc __REDIRECT stuff is not in place, so functions
- are defined by its normal name and we need to create the
- __GI_* alias to it, in C __REDIRECT causes the function definition
- to use __GI_* name and we need to add alias to the real name.
- There is no reason to use hidden_weak over hidden_def in assembly,
- but we provide it for consistency with the C usage.
- hidden_proto doesn't make sense for assembly but the equivalent
- is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */
-# define hidden_def(name) strong_alias (name, __GI_##name)
-# define hidden_weak(name) hidden_def (name)
-# define hidden_ver(local, name) strong_alias (local, __GI_##name)
-# define hidden_data_def(name) strong_data_alias (name, __GI_##name)
-# define hidden_data_weak(name) hidden_data_def (name)
-# define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
-# ifdef HAVE_ASM_GLOBAL_DOT_NAME
-# define HIDDEN_JUMPTARGET(name) .__GI_##name
-# else
-# define HIDDEN_JUMPTARGET(name) __GI_##name
-# endif
-# endif
-#else
# ifndef __ASSEMBLER__
# define hidden_proto(name, attrs...)
# else
# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name)
# endif /* Not __ASSEMBLER__ */
# define hidden_weak(name)
-# define hidden_def(name)
# define hidden_ver(local, name)
# define hidden_data_weak(name)
# define hidden_data_def(name)
# define hidden_data_ver(local, name)
-#endif
#if defined NOT_IN_libc && defined IS_IN_rtld
# define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define rtld_hidden_def(name) hidden_def (name)
+# define rtld_hidden_def(name)
# define rtld_hidden_weak(name) hidden_weak (name)
# define rtld_hidden_ver(local, name) hidden_ver (local, name)
# define rtld_hidden_data_def(name) hidden_data_def (name)
@@ -136,7 +82,7 @@
#if !defined NOT_IN_libc
# define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
-# define libc_hidden_def(name) hidden_def (name)
+# define libc_hidden_def(name)
# define libc_hidden_weak(name) hidden_weak (name)
# define libc_hidden_ver(local, name) hidden_ver (local, name)
# define libc_hidden_data_def(name) hidden_data_def (name)
diff --git a/libpthread/nptl/pthread_getattr_np.c b/libpthread/nptl/pthread_getattr_np.c
index ba720af6c..969459fe8 100644
--- a/libpthread/nptl/pthread_getattr_np.c
+++ b/libpthread/nptl/pthread_getattr_np.c
@@ -100,7 +100,7 @@ pthread_getattr_np (thread_id, attr)
while (! feof_unlocked (fp))
{
- if (__getdelim (&line, &linelen, '\n', fp) <= 0)
+ if (getdelim (&line, &linelen, '\n', fp) <= 0)
break;
uintptr_t from;
diff --git a/libpthread/nptl/sysdeps/mips/Makefile.arch b/libpthread/nptl/sysdeps/mips/Makefile.arch
index c12ae370f..2b1238640 100644
--- a/libpthread/nptl/sysdeps/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/mips/Makefile.arch
@@ -16,6 +16,7 @@ ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-mips = $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
PTHREAD_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/mips
PTHREAD_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/mips
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index ef4e0c72e..3650fb669 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -10,33 +10,63 @@
# pt-longjmp.c in libc and libpthread. For uClibc, they are
# in libc only.
#
-CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c pthread_cond_signal.c \
- pthread_cond_timedwait.c pthread_cond_wait.c \
- pthread_rwlock_rdlock.c pthread_rwlock_timedrdlock.c \
- pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \
- pthread_rwlock_wrlock.c pthread_sigmask.c pthread_spin_destroy.c \
- pthread_spin_init.c pthread_spin_unlock.c sigaction.c \
- sigfillset.c sigprocmask.c unwind-forcedunwind.c
+libpthread_CSRC = pthread_barrier_wait.c pthread_cond_broadcast.c \
+ pthread_cond_signal.c pthread_cond_timedwait.c \
+ pthread_cond_wait.c pthread_rwlock_rdlock.c \
+ pthread_rwlock_timedrdlock.c \
+ pthread_rwlock_timedwrlock.c pthread_rwlock_unlock.c \
+ pthread_rwlock_wrlock.c pthread_sigmask.c \
+ pthread_spin_destroy.c pthread_spin_init.c \
+ pthread_spin_unlock.c sigaction.c sigfillset.c \
+ sigprocmask.c unwind-forcedunwind.c
-CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
-CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
-CFLAGS-sigaction.c = -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
+CFLAGS-common = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS)
+
+CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_broadcast.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_signal.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_timedwait.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_cond_wait.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_rdlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_timedrdlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_timedwrlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_unlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_rwlock_wrlock.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_sigmask.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE $(CFLAGS-common) \
+ -DIS_IN_libpthread=1
+CFLAGS-sigaction.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-I$(top_srcdir)libc/signal
-CFLAGS-sigfillset.c = -I$(top_srcdir)libc/signal
-CFLAGS-sigprocmask.c = -I$(top_srcdir)libc/sysdeps/linux/common
+CFLAGS-sigfillset.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/signal
+CFLAGS-sigprocmask.c = $(CFLAGS-common) -DIS_IN_libpthread=1 \
+ -I$(top_srcdir)libc/sysdeps/linux/common
+CFLAGS-unwind-forcedunwind.c = $(CFLAGS-common) -DIS_IN_libpthread=1
+CFLAGS-librt-cancellation.c = -DIS_IN_librt=1 $(CFLAGS-common) \
+ -fexceptions -fasynchronous-unwind-tables
+CFLAGS-rt-unwind-resume.c = -DIS_IN_librt=1 $(CFLAGS-common) \
+ -fexceptions -fasynchronous-unwind-tables
-CFLAGS-pthread = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS) -DIS_IN_libpthread=1
+#CFLAGS:=$(CFLAGS:-O1=-O2)
pthread_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/pthread
pthread_OUT := $(top_builddir)/libpthread/nptl/sysdeps/pthread
-PTHREAD_SRC = $(patsubst %.c, $(pthread_DIR)/%.c, $(CSRC))
-PTHREAD_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(CSRC))
+pthread_SRC = $(patsubst %.c, $(pthread_DIR)/%.c, $(libpthread_CSRC))
+pthread_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC))
+
+libpthread-a-y += $(pthread_OBJ)
+libpthread-so-y += $(pthread_OBJ:.o=.oS)
-libpthread-a-y += $(PTHREAD_OBJ)
-libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
+librt-a-y += $(pthread_OUT)/librt-cancellation.o
+librt-so-y += $(pthread_OUT)/librt-cancellation.oS \
+ $(pthread_OUT)/rt-unwind-resume.oS
ifeq ($(UCLIBC_CTOR_DTOR),y)
CFLAGS-pt-initfini.c = -S -g0 -fPIC -fno-inline-functions \
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
index b2f25dc50..66c083f4a 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in
@@ -10,10 +10,12 @@ libpthread_CSRC = pt-raise.c pthread_attr_getaffinity.c \
pthread_getcpuclockid.c pthread_kill.c \
pthread_mutex_cond_lock.c pthread_setaffinity.c \
pthread_yield.c sem_post.c sem_timedwait.c \
- sem_trywait.c sem_wait.c pt-fork.c
+ sem_trywait.c sem_wait.c pt-fork.c \
+ sigtimedwait.c sigwaitinfo.c sigwait.c sleep.c
libc_CSRC = libc_pthread_init.c libc_multiple_threads.c \
- register-atfork.c unregister-atfork.c
+ register-atfork.c unregister-atfork.c getpid.c \
+ raise.c sleep.c
ifeq ($(TARGET_ARCH),alpha)
libpthread_CSRC += lowlevellock.c
@@ -39,16 +41,20 @@ CFLAGS-pt-fork.c = -D_GNU_SOURCE
CFLAGS-pthread_getcpuclockid.c = -I$(top_srcdir)/librt
CFLAGS-linux = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-libc_multiple_threads.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-register-atfork.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS-OMIT-unregister-atfork.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-getpid.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
+CFLAGS-OMIT-sleep.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
-pthread_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/unix/sysv/linux
-pthread_OUT := $(top_builddir)/libpthread/nptl/sysdeps/unix/sysv/linux
+linux_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/unix/sysv/linux
+linux_OUT := $(top_builddir)/libpthread/nptl/sysdeps/unix/sysv/linux
-PTHREAD_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC))
+PTHREAD_OBJ = $(patsubst %.c, $(linux_OUT)/%.o, $(libpthread_CSRC))
libpthread-a-y += $(PTHREAD_OBJ)
libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
@@ -56,13 +62,13 @@ libpthread-so-y += $(PTHREAD_OBJ:.o=.oS)
#
# Special suffix rules.
#
-LIBC_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libc_CSRC))
+LIBC_OBJ = $(patsubst %.c, $(linux_OUT)/%.o, $(libc_CSRC))
libc-a-y += $(LIBC_OBJ)
-libc-so-y += $(LIBC_OBJ:.o=.oS)
+libc-so-y += $(LIBC_OBJ:.o=.os)
objclean-y += pthread_linux_objclean
pthread_linux_objclean:
- $(RM) $(pthread_OUT)/*.{o,os,oS}
+ $(RM) $(linux_OUT)/*.{o,os,oS}
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
index 98307ff21..e39f63229 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/getpid.c
@@ -46,7 +46,7 @@ really_getpid (pid_t oldval)
}
#endif
-pid_t
+pid_t attribute_hidden
__getpid (void)
{
#ifdef NOT_IN_libc
@@ -60,6 +60,4 @@ __getpid (void)
return result;
}
-libc_hidden_def (__getpid)
weak_alias (__getpid, getpid)
-libc_hidden_def (getpid)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
index dd2d40a44..3fc7f8e67 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-features.h
@@ -25,13 +25,8 @@
# include <sgidefs.h>
#endif
-# include <linux/version.h>
-# define __LINUX_KERNEL_VERSION LINUX_VERSION_CODE
-
-#ifndef __LINUX_KERNEL_VERSION
-/* We assume the worst; all kernels should be supported. */
-# define __LINUX_KERNEL_VERSION 0
-#endif
+#include <linux/version.h>
+#define __LINUX_KERNEL_VERSION LINUX_VERSION_CODE
/* We assume for __LINUX_KERNEL_VERSION the same encoding used in
linux/version.h. I.e., the major, minor, and subminor all get a
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
index b3f48700c..7f431bd1f 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -18,6 +18,7 @@ CFLAGS-pthread_once.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
ASFLAGS += -DNOT_IN_libc=1 -DIS_IN_libpthread=1
CFLAGS += $(SSP_ALL_CFLAGS)
+#CFLAGS:=$(CFLAGS:-O1=-O2)
LINUX_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux/mips
LINUX_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux/mips
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
index 02508e215..5fee89235 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
@@ -17,10 +17,9 @@
02111-1307 USA. */
#include <sysdep.h>
-#include <sysdeps/generic/sysdep.h>
#include <tls.h>
#ifndef __ASSEMBLER__
-# include <nptl/pthreadP.h>
+# include <pthreadP.h>
#endif
#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
index e9c2b6e79..9d16fee56 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mq_notify.c
@@ -282,6 +282,4 @@ mq_notify (mqd_t mqdes, const struct sigevent *notification)
return retval;
}
-#else
-# include <sysdeps/generic/mq_notify.c>
#endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
index 28d03c383..29b1cd6b9 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/raise.c
@@ -21,7 +21,7 @@
#include <limits.h>
#include <signal.h>
#include <sysdep.h>
-#include <nptl/pthreadP.h>
+#include <pthreadP.h>
#include <kernel-features.h>