From c06619d7ab2ebbbc93427ca6a49dcc8d479db549 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sat, 12 Jun 2010 13:29:14 +0200 Subject: nptl: simplify buildsys Signed-off-by: Bernhard Reutner-Fischer --- libpthread/nptl/sysdeps/unix/sysv/linux/Makefile | 2 +- .../sysdeps/unix/sysv/linux/Makefile.commonarch | 255 ++++++++++++++++++++ .../nptl/sysdeps/unix/sysv/linux/Makefile.in | 256 --------------------- 3 files changed, 256 insertions(+), 257 deletions(-) create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in (limited to 'libpthread/nptl/sysdeps/unix/sysv') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile index 34d647527..930ff5654 100644 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile @@ -9,5 +9,5 @@ top_srcdir=../../../../../../ top_builddir=../../../../../../ all: objs include $(top_builddir)Rules.mak -include Makefile.in +include Makefile.commonarch include $(top_srcdir)Makerules diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch new file mode 100644 index 000000000..09d967616 --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.commonarch @@ -0,0 +1,255 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2006 Steven J. Hill +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +libpthread_CSRC = pthread_attr_getaffinity.c \ + pthread_attr_setaffinity.c pthread_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 \ + pthread_sigqueue.c \ + sem_trywait.c sem_wait.c pt-fork.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 + +libc_CSRC = libc_pthread_init.c libc_multiple_threads.c \ + register-atfork.c unregister-atfork.c getpid.c \ + raise.c sleep.c jmp-unwind.c + +# These provide both a cancellable and a not cancellable implementation +libc_SSRC = close.S open.S write.S read.S waitpid.S + +librt_CSRC := mq_notify.c timer_create.c timer_delete.c \ + timer_getoverr.c timer_gettime.c timer_routines.c \ + timer_settime.c + + +ifeq ($(TARGET_ARCH),alpha) +libpthread_CSRC += lowlevellock.c +libc_CSRC += libc-lowlevellock.c +librt_CSRC := mq_notify.c +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 lowlevelrobustlock.c +libc_CSRC += libc-lowlevellock.c +endif + +ifeq ($(TARGET_ARCH),powerpc) +libpthread_CSRC += lowlevellock.c lowlevelrobustlock.c +libc_CSRC += libc-lowlevellock.c +librt_CSRC += __syscall_error.c +endif + +ifeq ($(TARGET_ARCH),sparc) +libpthread_CSRC += __syscall_error.c lowlevelrobustlock.c +librt_CSRC += __syscall_error.c +endif + +ifeq ($(TARGET_ARCH),sh) +SH_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c +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 +libpthread_CSRC := $(filter-out $(X86_PTHREAD_SPECIFIC),$(libpthread_CSRC)) +endif + +ifeq ($(TARGET_ARCH),x86_64) +libc_SSRC := $(filter-out waitpid.S,$(libc_SSRC)) +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 +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=1 +CFLAGS-timer_create.c = -I$(top_srcdir)librt -DIS_IN_librt=1 +CFLAGS-timer_delete.c = -I$(top_srcdir)librt -DIS_IN_librt=1 +CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt -DIS_IN_librt=1 +CFLAGS-timer_gettime.c = -I$(top_srcdir)librt -DIS_IN_librt=1 +CFLAGS-timer_routines.c = -I$(top_srcdir)librt -DIS_IN_librt=1 +CFLAGS-timer_settime.c = -I$(top_srcdir)librt -DIS_IN_librt=1 + +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 +CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 + +CFLAGS-OMIT-close.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-open.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-read.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-write.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 + +CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_delete.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_getoverr.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_gettime.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread=1 +CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread=1 + +PTHREAD_LINUX_DIR := $(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux +PTHREAD_LINUX_OUT := $(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux + +PTHREAD_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(libpthread_CSRC)) +PTHREAD_LINUX_OBJ += $(patsubst %.S,$(PTHREAD_LINUX_OUT)/%.o,$(libpthread_SSRC)) + +ifeq ($(DOPIC),y) +libpthread-a-y += $(PTHREAD_LINUX_OBJ:.o=.os) +else +libpthread-a-y += $(PTHREAD_LINUX_OBJ) +endif +libpthread-so-y += $(PTHREAD_LINUX_OBJ:.o=.oS) +libpthread-so-y += $(PTHREAD_LINUX_OUT)/pt-raise.oS +libpthread-nomulti-y += $(PTHREAD_LINUX_OBJ) + +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 + +LIBC_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(libc_CSRC)) +LIBC_LINUX_OBJ += $(patsubst %.S,$(PTHREAD_LINUX_OUT)/%.o,$(libc_SSRC)) + +libc-static-y += $(LIBC_LINUX_OBJ) +libc-shared-y += $(LIBC_LINUX_OBJ:.o=.oS) +libc-nomulti-y += $(LIBC_LINUX_OBJ) + +LIBRT_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(librt_CSRC)) + +librt-a-y += $(LIBRT_LINUX_OBJ) +librt-so-y += $(LIBRT_LINUX_OBJ:.o=.oS) + +objclean-y += CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux +headers_clean-y += HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux + +# +# Create header files. +# +CFLAGS-gen_lowlevelbarrier.c = -S +CFLAGS-gen_lowlevelcond.c = -S +CFLAGS-gen_lowlevelrwlock.c = -S +CFLAGS-gen_lowlevelrobustlock.c = -S +CFLAGS-gen_lunwindbuf.c = -S +CFLAGS-gen_lstructsem.c = -S +CFLAGS-gen_lpthread-pi-defines.c = -S + +$(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.c: $(PTHREAD_LINUX_DIR)/lowlevelbarrier.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lowlevelcond.c: $(PTHREAD_LINUX_DIR)/lowlevelcond.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.c: $(PTHREAD_LINUX_DIR)/lowlevelrwlock.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.c: $(PTHREAD_LINUX_DIR)/lowlevelrobustlock.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lunwindbuf.c: $(PTHREAD_LINUX_DIR)/unwindbuf.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lstructsem.c: $(PTHREAD_LINUX_DIR)/structsem.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + +$(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.c: $(PTHREAD_LINUX_DIR)/pthread-pi-defines.sym + $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ + + +$(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lowlevelcond.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelcond.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lunwindbuf.s: $(PTHREAD_LINUX_OUT)/gen_lunwindbuf.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lstructsem.s: $(PTHREAD_LINUX_OUT)/gen_lstructsem.c + $(compile.c) + +$(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.s: $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.c + $(compile.c) + + +$(PTHREAD_LINUX_OUT)/lowlevelbarrier.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/lowlevelcond.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelcond.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/lowlevelrwlock.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/unwindbuf.h: $(PTHREAD_LINUX_OUT)/gen_lunwindbuf.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/structsem.h: $(PTHREAD_LINUX_OUT)/gen_lstructsem.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +$(PTHREAD_LINUX_OUT)/pthread-pi-defines.h: $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.s + $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ + +pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += \ + $(PTHREAD_LINUX_OUT)/lowlevelbarrier.h \ + $(PTHREAD_LINUX_OUT)/lowlevelcond.h \ + $(PTHREAD_LINUX_OUT)/lowlevelrwlock.h \ + $(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h \ + $(PTHREAD_LINUX_OUT)/unwindbuf.h \ + $(PTHREAD_LINUX_OUT)/structsem.h \ + $(PTHREAD_LINUX_OUT)/pthread-pi-defines.h + +HEADERS_BITS_PTHREAD := $(notdir $(wildcard $(PTHREAD_LINUX_DIR)/bits/*.h)) +ALL_HEADERS_BITS_PTHREAD := $(addprefix include/bits/,$(HEADERS_BITS_PTHREAD)) + +$(ALL_HEADERS_BITS_PTHREAD): $(top_builddir)include/bits/%: | $(top_builddir)include/bits + $(do_ln) $(call rel_srcdir)$(PTHREAD_LINUX_DIR)/bits/$(@F) $@ + +HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: + $(do_rm) $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelcond., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lunwindbuf., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lstructsem., c s) \ + $(addprefix $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines., c s) \ + $(PTHREAD_LINUX_OUT)/lowlevelbarrier.h \ + $(PTHREAD_LINUX_OUT)/lowlevelcond.h \ + $(PTHREAD_LINUX_OUT)/lowlevelrwlock.h \ + $(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h \ + $(PTHREAD_LINUX_OUT)/unwindbuf.h \ + $(PTHREAD_LINUX_OUT)/structsem.h \ + $(PTHREAD_LINUX_OUT)/pthread-pi-defines.h + +CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: + $(do_rm) $(addprefix $(PTHREAD_LINUX_OUT)/*., o os oS) diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in deleted file mode 100644 index b1a35c352..000000000 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in +++ /dev/null @@ -1,256 +0,0 @@ -# Makefile for uClibc NPTL -# -# Copyright (C) 2006 Steven J. Hill -# -# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. -# - -libpthread_CSRC = pthread_attr_getaffinity.c \ - pthread_attr_setaffinity.c pthread_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 \ - pthread_sigqueue.c \ - sem_trywait.c sem_wait.c pt-fork.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 - -libc_CSRC = libc_pthread_init.c libc_multiple_threads.c \ - register-atfork.c unregister-atfork.c getpid.c \ - raise.c sleep.c jmp-unwind.c - -# These provide both a cancellable and a not cancellable implementation -libc_SSRC = close.S open.S write.S read.S waitpid.S - -librt_CSRC := mq_notify.c timer_create.c timer_delete.c \ - timer_getoverr.c timer_gettime.c timer_routines.c \ - timer_settime.c - - -ifeq ($(TARGET_ARCH),alpha) -libpthread_CSRC += lowlevellock.c -libc_CSRC += libc-lowlevellock.c -librt_CSRC := mq_notify.c -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 lowlevelrobustlock.c -libc_CSRC += libc-lowlevellock.c -endif - -ifeq ($(TARGET_ARCH),powerpc) -libpthread_CSRC += lowlevellock.c lowlevelrobustlock.c -libc_CSRC += libc-lowlevellock.c -librt_CSRC += __syscall_error.c -endif - -ifeq ($(TARGET_ARCH),sparc) -libpthread_CSRC += __syscall_error.c lowlevelrobustlock.c -librt_CSRC += __syscall_error.c -endif - -ifeq ($(TARGET_ARCH),sh) -SH_PTHREAD_SPECIFIC := sem_post.c sem_wait.c sem_timedwait.c sem_trywait.c -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 -libpthread_CSRC := $(filter-out $(X86_PTHREAD_SPECIFIC),$(libpthread_CSRC)) -endif - -ifeq ($(TARGET_ARCH),x86_64) -libc_SSRC := $(filter-out waitpid.S,$(libc_SSRC)) -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 -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=1 -CFLAGS-timer_create.c = -I$(top_srcdir)librt -DIS_IN_librt=1 -CFLAGS-timer_delete.c = -I$(top_srcdir)librt -DIS_IN_librt=1 -CFLAGS-timer_getoverr.c = -I$(top_srcdir)librt -DIS_IN_librt=1 -CFLAGS-timer_gettime.c = -I$(top_srcdir)librt -DIS_IN_librt=1 -CFLAGS-timer_routines.c = -I$(top_srcdir)librt -DIS_IN_librt=1 -CFLAGS-timer_settime.c = -I$(top_srcdir)librt -DIS_IN_librt=1 - -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 -CFLAGS-OMIT-libc-lowlevellock.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 - -CFLAGS-OMIT-close.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -CFLAGS-OMIT-open.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -CFLAGS-OMIT-read.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -CFLAGS-OMIT-write.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -CFLAGS-OMIT-waitpid.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 - -CFLAGS-OMIT-mq_notify.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_create.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_delete.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_getoverr.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_gettime.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_routines.c = -DIS_IN_libpthread=1 -CFLAGS-OMIT-timer_settime.c = -DIS_IN_libpthread=1 - -PTHREAD_LINUX_DIR := $(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux -PTHREAD_LINUX_OUT := $(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux - -PTHREAD_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(libpthread_CSRC)) -PTHREAD_LINUX_OBJ += $(patsubst %.S,$(PTHREAD_LINUX_OUT)/%.o,$(libpthread_SSRC)) - -ifeq ($(DOPIC),y) -libpthread-a-y += $(PTHREAD_LINUX_OBJ:.o=.os) -else -libpthread-a-y += $(PTHREAD_LINUX_OBJ) -endif -libpthread-so-y += $(PTHREAD_LINUX_OBJ:.o=.oS) -libpthread-so-y += $(PTHREAD_LINUX_OUT)/pt-raise.oS -libpthread-nomulti-y += $(PTHREAD_LINUX_OBJ) - -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 - -LIBC_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(libc_CSRC)) -LIBC_LINUX_OBJ += $(patsubst %.S,$(PTHREAD_LINUX_OUT)/%.o,$(libc_SSRC)) - -libc-static-y += $(LIBC_LINUX_OBJ) -libc-shared-y += $(LIBC_LINUX_OBJ:.o=.oS) -libc-nomulti-y += $(LIBC_LINUX_OBJ) - -LIBRT_LINUX_OBJ := $(patsubst %.c,$(PTHREAD_LINUX_OUT)/%.o,$(librt_CSRC)) - -librt-a-y += $(LIBRT_LINUX_OBJ) -librt-so-y += $(LIBRT_LINUX_OBJ:.o=.oS) - -objclean-y += CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux -headers_clean-y += HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux - -# -# Create header files. -# -CFLAGS-gen_lowlevelbarrier.c = -S -CFLAGS-gen_lowlevelcond.c = -S -CFLAGS-gen_lowlevelrwlock.c = -S -CFLAGS-gen_lowlevelrobustlock.c = -S -CFLAGS-gen_lunwindbuf.c = -S -CFLAGS-gen_lstructsem.c = -S -CFLAGS-gen_lpthread-pi-defines.c = -S - -$(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.c: $(PTHREAD_LINUX_DIR)/lowlevelbarrier.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lowlevelcond.c: $(PTHREAD_LINUX_DIR)/lowlevelcond.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.c: $(PTHREAD_LINUX_DIR)/lowlevelrwlock.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.c: $(PTHREAD_LINUX_DIR)/lowlevelrobustlock.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lunwindbuf.c: $(PTHREAD_LINUX_DIR)/unwindbuf.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lstructsem.c: $(PTHREAD_LINUX_DIR)/structsem.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - -$(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.c: $(PTHREAD_LINUX_DIR)/pthread-pi-defines.sym - $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@ - - -$(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lowlevelcond.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelcond.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.s: $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lunwindbuf.s: $(PTHREAD_LINUX_OUT)/gen_lunwindbuf.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lstructsem.s: $(PTHREAD_LINUX_OUT)/gen_lstructsem.c - $(compile.c) - -$(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.s: $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.c - $(compile.c) - - -$(PTHREAD_LINUX_OUT)/lowlevelbarrier.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/lowlevelcond.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelcond.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/lowlevelrwlock.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h: $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/unwindbuf.h: $(PTHREAD_LINUX_OUT)/gen_lunwindbuf.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/structsem.h: $(PTHREAD_LINUX_OUT)/gen_lstructsem.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -$(PTHREAD_LINUX_OUT)/pthread-pi-defines.h: $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines.s - $(do_sed) -n "s/^.*@@@name@@@\([^@]*\)@@@value@@@[^0-9Xxa-fA-F-]*\([0-9Xxa-fA-F-][0-9Xxa-fA-F-]*\).*@@@end@@@.*$\/#define \1 \2/p" $< > $@ - -pregen-headers-$(UCLIBC_HAS_THREADS_NATIVE) += \ - $(PTHREAD_LINUX_OUT)/lowlevelbarrier.h \ - $(PTHREAD_LINUX_OUT)/lowlevelcond.h \ - $(PTHREAD_LINUX_OUT)/lowlevelrwlock.h \ - $(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h \ - $(PTHREAD_LINUX_OUT)/unwindbuf.h \ - $(PTHREAD_LINUX_OUT)/structsem.h \ - $(PTHREAD_LINUX_OUT)/pthread-pi-defines.h - -HEADERS_BITS_PTHREAD := $(notdir $(wildcard $(PTHREAD_LINUX_DIR)/bits/*.h)) -ALL_HEADERS_BITS_PTHREAD := $(addprefix include/bits/,$(HEADERS_BITS_PTHREAD)) - -$(ALL_HEADERS_BITS_PTHREAD): $(top_builddir)include/bits/%: | $(top_builddir)include/bits - $(do_ln) $(call rel_srcdir)$(PTHREAD_LINUX_DIR)/bits/$(@F) $@ - -HEADERCLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: - $(do_rm) $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelbarrier., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelcond., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelrwlock., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lowlevelrobustlock., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lunwindbuf., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lstructsem., c s) \ - $(addprefix $(PTHREAD_LINUX_OUT)/gen_lpthread-pi-defines., c s) \ - $(PTHREAD_LINUX_OUT)/lowlevelbarrier.h \ - $(PTHREAD_LINUX_OUT)/lowlevelcond.h \ - $(PTHREAD_LINUX_OUT)/lowlevelrwlock.h \ - $(PTHREAD_LINUX_OUT)/lowlevelrobustlock.h \ - $(PTHREAD_LINUX_OUT)/unwindbuf.h \ - $(PTHREAD_LINUX_OUT)/structsem.h \ - $(PTHREAD_LINUX_OUT)/pthread-pi-defines.h - - -CLEAN_libpthread/nptl/sysdeps/unix/sysv/linux: - $(do_rm) $(addprefix $(PTHREAD_LINUX_OUT)/*., o os oS) -- cgit v1.2.3