summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-17 23:41:56 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-17 23:41:56 +0200
commit2695bf4142b3d7154ef123dcc34d531c155af510 (patch)
treea0f7237e770533b262d22becdb14954b504c65b8 /libpthread/nptl/sysdeps
parentdef0d92193606e184d356c4d2d1752526573f87c (diff)
parenta9bdc5d28e692c04f51bcea1bb8e87f9c72ad09f (diff)
Merge remote-tracking branch 'origin/upstream'
Diffstat (limited to 'libpthread/nptl/sysdeps')
-rw-r--r--libpthread/nptl/sysdeps/Makefile.commonarch18
-rw-r--r--libpthread/nptl/sysdeps/arc/Makefile.arch5
-rw-r--r--libpthread/nptl/sysdeps/arm/Makefile.arch7
-rw-r--r--libpthread/nptl/sysdeps/metag/Makefile.arch7
-rw-r--r--libpthread/nptl/sysdeps/mips/Makefile.arch8
-rw-r--r--libpthread/nptl/sysdeps/pthread/Makefile.in4
-rw-r--r--libpthread/nptl/sysdeps/sh/Makefile.arch3
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch75
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch17
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch12
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch14
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch13
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch10
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch12
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch27
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch12
-rw-r--r--libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch16
17 files changed, 24 insertions, 236 deletions
diff --git a/libpthread/nptl/sysdeps/Makefile.commonarch b/libpthread/nptl/sysdeps/Makefile.commonarch
index 8f5d61dcd..a5952a67b 100644
--- a/libpthread/nptl/sysdeps/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/Makefile.commonarch
@@ -40,15 +40,12 @@ librt_arch_COBJ = $(patsubst %.c,$(libpthread_arch_OUT)/%.o,$(librt_arch_CSRC))
librt_arch_SOBJ = $(patsubst %.S,$(libpthread_arch_OUT)/%.o,$(librt_arch_SSRC))
librt_arch_OBJS = $(librt_arch_COBJ) $(librt_arch_SOBJ)
-CFLAGS-gen_tcb-offsets.c = -S
-$(libpthread_arch_OUT)/gen_tcb-offsets.c: $(libpthread_arch_DIR)/tcb-offsets.sym | $(libpthread_arch_OUT)
- $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
-
-$(libpthread_arch_OUT)/gen_tcb-offsets.s: $(libpthread_arch_OUT)/gen_tcb-offsets.c | headers
- $(compile.c)
-libpthread-generated-y += $(libpthread_arch_OUT)/gen_tcb-offsets.s
-$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_OUT)/gen_tcb-offsets.s
- $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
+$(libpthread_arch_OUT)/tcb-offsets.h: $(top_srcdir)extra/scripts/gen-as-const.awk | headers
+$(libpthread_arch_OUT)/tcb-offsets.h: $(libpthread_arch_DIR)/tcb-offsets.sym
+ @$(disp_gen)
+ $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \
+ | $(CC) $(CFLAGS) -x c - -S -o - \
+ | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@
@if test ! -s $@ ; then rm -f $@ ; false ; fi
pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread_arch_OUT)/tcb-offsets.h
@@ -59,8 +56,7 @@ headers_clean-y+= HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT))
CLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)):
$(do_rm) $(addprefix $(libpthread_arch_OUT)/*., o os oS)
HEADERCLEAN_$(subst $(top_builddir),,$(libpthread_arch_OUT)):
- $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h \
- $(addprefix $(libpthread_arch_OUT)/gen_tcb-offsets., c h s)
+ $(do_rm) $(libpthread_arch_OUT)/tcb-offsets.h
ifneq ($(TARGET_SUBARCH),)
objclean-y += CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT))
CLEAN_$(subst $(top_builddir),,$(libpthread_subarch_OUT)):
diff --git a/libpthread/nptl/sysdeps/arc/Makefile.arch b/libpthread/nptl/sysdeps/arc/Makefile.arch
index 1c728847e..08ec7e7d9 100644
--- a/libpthread/nptl/sysdeps/arc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/arc/Makefile.arch
@@ -5,9 +5,4 @@
# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
#
-CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
-
-ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-
libc_arch_a_CSRC = libc-tls.c
diff --git a/libpthread/nptl/sysdeps/arm/Makefile.arch b/libpthread/nptl/sysdeps/arm/Makefile.arch
index fbe497583..62a2822df 100644
--- a/libpthread/nptl/sysdeps/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/arm/Makefile.arch
@@ -7,11 +7,4 @@
#
librt_arch_SSRC = aeabi_read_tp.S thumb_atomics.S
-
-CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
-
-ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-aeabi_read_tp.S = -DNOT_IN_libc=1
-
libc_arch_a_CSRC = libc-tls.c
diff --git a/libpthread/nptl/sysdeps/metag/Makefile.arch b/libpthread/nptl/sysdeps/metag/Makefile.arch
index 0a42e686a..ed5b52c5e 100644
--- a/libpthread/nptl/sysdeps/metag/Makefile.arch
+++ b/libpthread/nptl/sysdeps/metag/Makefile.arch
@@ -5,13 +5,6 @@
# Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
#
-CFLAGS-pthread_spin_init.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-
ASFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE
-CFLAGS-metag = $(SSP_ALL_CFLAGS)
-
libc_arch_a_CSRC := libc-tls.c
diff --git a/libpthread/nptl/sysdeps/mips/Makefile.arch b/libpthread/nptl/sysdeps/mips/Makefile.arch
index 2762a2fe0..10f8abf3b 100644
--- a/libpthread/nptl/sysdeps/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/mips/Makefile.arch
@@ -5,13 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CFLAGS-pt-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
-
-ASFLAGS-pthread_spin_lock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-nptl-sysdep.S = -DNOT_IN_libc -DIS_IN_libpthread \
- -D_LIBC_REENTRANT \
- -I$(top_srcdir)libc/sysdeps/linux/mips
+ASFLAGS-nptl-sysdep.S = -I$(top_srcdir)libc/sysdeps/linux/mips
libc_arch_a_CSRC = libc-tls.c
diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in
index add3a8e5f..84adfe0c6 100644
--- a/libpthread/nptl/sysdeps/pthread/Makefile.in
+++ b/libpthread/nptl/sysdeps/pthread/Makefile.in
@@ -34,7 +34,7 @@ libpthread_pthread_CSRC = \
pthread_spin_unlock.c \
pt-longjmp.c \
tpp.c
-CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread
+
CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
@@ -54,7 +54,7 @@ librt-pt-routines-y = librt-cancellation.c
librt-pt-shared-only-routines-y = rt-unwind-resume.c
ifeq ($(UCLIBC_CTOR_DTOR),y)
-CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-pthread)
+CFLAGS-OMIT-pt-initfini.c = $(CFLAGS-y-libpthread/nptl/sysdeps/pthread)
CFLAGS-pt-initfini.c = -S -g0 $(PICFLAG) -fno-inline-functions \
$(call check_gcc,-fno-unit-at-a-time,) \
$(SSP_DISABLE_FLAGS) \
diff --git a/libpthread/nptl/sysdeps/sh/Makefile.arch b/libpthread/nptl/sysdeps/sh/Makefile.arch
index 411622adc..b50dd51e0 100644
--- a/libpthread/nptl/sysdeps/sh/Makefile.arch
+++ b/libpthread/nptl/sysdeps/sh/Makefile.arch
@@ -5,9 +5,6 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pthread_spin_trylock.S = -DNOT_IN_libc -DIS_IN_libpthread
-
CFLAGS-pthread_spin_lock.c += -D_GNU_SOURCE
libc_arch_a_CSRC := libc-tls.c
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
index 337221432..e4a5fc55d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch
@@ -122,73 +122,27 @@ headers_clean-y += HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux
CFLAGS-pthread_getcpuclockid.c = -I$(top_srcdir)librt
CFLAGS-pt-pread_pwrite.c = -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
-I$(top_srcdir)libc/sysdeps/linux/common
-CFLAGS-mq_notify.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_create.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_delete.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_gettime.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_routines.c = -I$(top_srcdir)librt -DIS_IN_librt
-CFLAGS-timer_settime.c = -I$(top_srcdir)librt -DIS_IN_librt
+CFLAGS-mq_notify.c = -I$(top_srcdir)librt
+CFLAGS-timer_create.c = -I$(top_srcdir)librt
+CFLAGS-timer_delete.c = -I$(top_srcdir)librt
+CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt
+CFLAGS-timer_gettime.c = -I$(top_srcdir)librt
+CFLAGS-timer_routines.c = -I$(top_srcdir)librt
+CFLAGS-timer_settime.c = -I$(top_srcdir)librt
ifneq ($(UCLIBC_HAS_BACKTRACE),)
CFLAGS-raise.c = -fasynchronous-unwind-tables
endif
-CFLAGS-linux = -DNOT_IN_libc -DIS_IN_libpthread $(SSP_ALL_CFLAGS)
-
-CFLAGS-OMIT-libc_pthread_init.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc_multiple_threads.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-register-atfork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-unregister-atfork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-getpid.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-raise.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-sleep.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-jmp-unwind.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
-
-#CFLAGS-OMIT-close.S = -DNOT_IN_libc -DIS_IN_libpthread
-#CFLAGS-OMIT-open.S = -DNOT_IN_libc -DIS_IN_libpthread
-#CFLAGS-OMIT-read.S = -DNOT_IN_libc -DIS_IN_libpthread
-#CFLAGS-OMIT-write.S = -DNOT_IN_libc -DIS_IN_libpthread
-#CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc -DIS_IN_libpthread
-
-CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_delete.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_getoverr.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_gettime.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread
-CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread
-
-#ASFLAGS-open.S = -D_LIBC_REENTRANT
-#ASFLAGS-close.S = -D_LIBC_REENTRANT
-#ASFLAGS-read.S = -D_LIBC_REENTRANT
-#ASFLAGS-write.S = -D_LIBC_REENTRANT
-#ASFLAGS-waitpid.S = -D_LIBC_REENTRANT
-
-#
-# Create header files.
-#
-CFLAGS-gen_lowlevelbarrier.c = -S
-CFLAGS-gen_lowlevelcond.c = -S
-CFLAGS-gen_lowlevelrobustlock.c = -S
-CFLAGS-gen_lowlevelrwlock.c = -S
-CFLAGS-gen_pthread-pi-defines.c = -S
-CFLAGS-gen_structsem.c = -S
-CFLAGS-gen_unwindbuf.c = -S
-
PTHREAD_LINUX_SYM := $(notdir $(wildcard $(libpthread_linux_DIR)/*.sym))
-PTHREAD_LINUX_SYM_C := $(addprefix $(libpthread_linux_OUT)/gen_,$(PTHREAD_LINUX_SYM:.sym=.c))
-PTHREAD_LINUX_SYM_S := $(PTHREAD_LINUX_SYM_C:.c=.s)
PTHREAD_LINUX_SYM_H := $(addprefix $(libpthread_linux_OUT)/,$(PTHREAD_LINUX_SYM:.sym=.h))
-$(PTHREAD_LINUX_SYM_C): $(libpthread_linux_OUT)/gen_%.c: $(libpthread_linux_DIR)/%.sym | $(libpthread_linux_OUT)
- $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
-$(PTHREAD_LINUX_SYM_S): $(libpthread_linux_OUT)/gen_%.s: $(libpthread_linux_OUT)/gen_%.c | headers
- $(compile.c)
-libpthread-generated-y += $(PTHREAD_LINUX_SYM_S)
-$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_OUT)/gen_%.s
- $(do_sed) $(PTHREAD_GENERATE_MANGLE) $< > $@
+$(PTHREAD_LINUX_SYM_H): $(top_srcdir)extra/scripts/gen-as-const.awk | headers
+$(PTHREAD_LINUX_SYM_H): $(libpthread_linux_OUT)/%.h: $(libpthread_linux_DIR)/%.sym
+ @$(disp_gen)
+ $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< \
+ | $(CC) $(CFLAGS) -x c - -S -o - \
+ | $(SED) $(PTHREAD_GENERATE_MANGLE) > $@
@if test ! -s $@ ; then rm -f $@ ; false ; fi
pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += $(PTHREAD_LINUX_SYM_H)
@@ -200,8 +154,7 @@ $(ALL_HEADERS_BITS_PTHREAD): $(top_builddir)include/bits/%: | $(top_builddir)inc
$(do_ln) $(call rel_srcdir)$(libpthread_linux_DIR)/bits/$(@F) $@
HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux:
- $(do_rm) $(PTHREAD_LINUX_SYM_C) $(PTHREAD_LINUX_SYM_S) \
- $(PTHREAD_LINUX_SYM_H)
+ $(do_rm) $(PTHREAD_LINUX_SYM_H)
CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux:
$(do_rm) $(addprefix $(libpthread_linux_OUT)/*., o os oS)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
index 25e6fadbf..8e3c7b0bc 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arc/Makefile.arch
@@ -13,20 +13,3 @@ libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
libc_linux_arch_SSRC = clone.S vfork.S
libc_linux_arch_SSRC-OMIT = waitpid.S
-CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-pt-__syscall_rt_sigaction.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-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
-
-ASFLAGS-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
-ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
-
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
-# We always compile it in arm mode because of SAVE_PID macro
-# This macro should be alternatively implemented in THUMB
-# assembly.
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
index 329d8a94e..c8d5d4ab5 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
@@ -14,18 +14,6 @@ libc_linux_arch_CSRC = fork.c libc-lowlevellock.c
libc_linux_arch_SSRC = clone.S vfork.S
libc_linux_arch_SSRC-OMIT = waitpid.S
-
-CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-pt-__syscall_rt_sigaction.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-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -marm
-
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
# We always compile it in arm mode because of SAVE_PID macro
# This macro should be alternatively implemented in THUMB
# assembly.
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
index 9a34595f1..fff0dae89 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
@@ -13,17 +13,3 @@ libc_linux_arch_SSRC = clone.S vfork.S
ASFLAGS += -DUSE___THREAD
-CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-pthread_spin_unlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-
-ASFLAGS-clone.S = -D_LIBC_REENTRANT
-ASFLAGS-vfork.S = -D_LIBC_REENTRANT
-ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
index df9887596..4d02d0c9a 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/Makefile.arch
@@ -16,16 +16,3 @@ libc_linux_arch_SSRC-OMIT = waitpid.S
CFLAGS += $(SSP_ALL_CFLAGS)
-CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-pt-__syscall_rt_sigaction.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-vfork.S = -DIS_IN_libc -DNOT_IN_libpthread
-ASFLAGS-clone.S = -DIS_IN_libc -DNOT_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread
-
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
index fc26a8e13..4a3d0f248 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
@@ -15,13 +15,3 @@ libc_linux_arch_SSRC-OMIT = waitpid.S
endif
ASFLAGS += -DUSE___THREAD
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-pthread_once.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-pt-__syscall_rt_sigaction.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -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/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
index 8581aea6f..21b9b7239 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
@@ -16,15 +16,3 @@ librt_linux_arch_CSRC = pt-__syscall_error.c
ASFLAGS += -DUSE___THREAD
-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-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-#ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-
-#ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
-ASFLAGS-clone.S = -D_LIBC_REENTRANT
-ASFLAGS-vfork.S = -D_LIBC_REENTRANT
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
index a8249e0f4..154dd6e66 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
@@ -17,30 +17,3 @@ libc_linux_arch_SSRC = libc-lowlevellock.S clone.S vfork.S
ASFLAGS += -DUSE___THREAD
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-pthread_once.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_rwlock_wrlock.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_rwlock_rdlock.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_rwlock_unlock.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_barrier_wait.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_broadcast.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_signal.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_wait.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_timedwait.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_rwlock_timedwrlock.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_rwlock_timedrdlock.S = -D_LIBC_REENTRANT
-ASFLAGS-sem_post.S = -D_LIBC_REENTRANT
-ASFLAGS-sem_timedwait.S = -D_LIBC_REENTRANT
-ASFLAGS-sem_trywait.S = -D_LIBC_REENTRANT
-ASFLAGS-sem_wait.S = -D_LIBC_REENTRANT
-
-ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
-
-ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-lowlevelrobustlock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-
-ASFLAGS-clone.S = -D_LIBC_REENTRANT
-ASFLAGS-vfork.S = -D_LIBC_REENTRANT
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
index 102c0dad1..2b2b5f579 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
@@ -17,15 +17,3 @@ 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
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread
-CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc -DIS_IN_libpthread
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 71df9861d..ebd506047 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
@@ -20,19 +20,3 @@ librt_linux_arch_SSRC = librt-cancellation.S
ASFLAGS += -DUSE___THREAD
-CFLAGS-pt-__syscall_error.c = -DNOT_IN_libc -DIS_IN_libpthread
-ASFLAGS-pt-vfork.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-lowlevellock.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-pthread_once.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-cancellation.S = -DNOT_IN_libc -DIS_IN_libpthread -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_timedwait.S = -D_LIBC_REENTRANT
-ASFLAGS-pthread_cond_wait.S = -D_LIBC_REENTRANT
-
-ASFLAGS-clone.S = -D_LIBC_REENTRANT
-ASFLAGS-vfork.S = -D_LIBC_REENTRANT
-ASFLAGS-libc-lowlevellock.S = -D_LIBC_REENTRANT
-ASFLAGS-libc-cancellation.S = -D_LIBC_REENTRANT
-ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
-CFLAGS-fork.c = -D__USE_STDIO_FUTEXES__
-endif
-CFLAGS-OMIT-fork.c = -DNOT_IN_libc -DIS_IN_libpthread