diff options
-rw-r--r-- | libpthread/nptl/Makefile.in | 297 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/mips/Makefile.arch | 39 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/pthread/Makefile.in | 68 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in | 68 | ||||
-rw-r--r-- | libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch | 43 |
5 files changed, 515 insertions, 0 deletions
diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in new file mode 100644 index 000000000..94bb3aa96 --- /dev/null +++ b/libpthread/nptl/Makefile.in @@ -0,0 +1,297 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2005 Steven J. Hill <sjhill@realitydiluted.com> +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +libpthread-routines = init vars events version \ + pthread_create pthread_exit pthread_detach \ + pthread_join pthread_tryjoin pthread_timedjoin \ + pthread_self pthread_equal pthread_yield \ + pthread_getconcurrency pthread_setconcurrency \ + pthread_getschedparam pthread_setschedparam \ + pthread_setschedprio \ + pthread_attr_init pthread_attr_destroy \ + pthread_attr_getdetachstate pthread_attr_setdetachstate \ + pthread_attr_getguardsize pthread_attr_setguardsize \ + pthread_attr_getschedparam pthread_attr_setschedparam \ + pthread_attr_getschedpolicy pthread_attr_setschedpolicy \ + pthread_attr_getinheritsched \ + pthread_attr_setinheritsched \ + pthread_attr_getscope pthread_attr_setscope \ + pthread_attr_getstackaddr pthread_attr_setstackaddr \ + pthread_attr_getstacksize pthread_attr_setstacksize \ + pthread_attr_getstack pthread_attr_setstack \ + pthread_getattr_np \ + pthread_mutex_init pthread_mutex_destroy \ + pthread_mutex_lock pthread_mutex_trylock \ + pthread_mutex_timedlock pthread_mutex_unlock \ + pthread_mutexattr_init pthread_mutexattr_destroy \ + pthread_mutexattr_getpshared \ + pthread_mutexattr_setpshared \ + pthread_mutexattr_gettype pthread_mutexattr_settype \ + pthread_rwlock_init pthread_rwlock_destroy \ + pthread_rwlock_rdlock pthread_rwlock_timedrdlock \ + pthread_rwlock_wrlock pthread_rwlock_timedwrlock \ + pthread_rwlock_tryrdlock pthread_rwlock_trywrlock \ + pthread_rwlock_unlock \ + pthread_rwlockattr_init pthread_rwlockattr_destroy \ + pthread_rwlockattr_getpshared \ + pthread_rwlockattr_setpshared \ + pthread_rwlockattr_getkind_np \ + pthread_rwlockattr_setkind_np \ + pthread_cond_init pthread_cond_destroy \ + pthread_cond_wait pthread_cond_timedwait \ + pthread_cond_signal pthread_cond_broadcast \ + old_pthread_cond_init old_pthread_cond_destroy \ + old_pthread_cond_wait old_pthread_cond_timedwait \ + old_pthread_cond_signal old_pthread_cond_broadcast \ + pthread_condattr_init pthread_condattr_destroy \ + pthread_condattr_getpshared pthread_condattr_setpshared \ + pthread_condattr_getclock pthread_condattr_setclock \ + pthread_spin_init pthread_spin_destroy \ + pthread_spin_lock pthread_spin_trylock \ + pthread_spin_unlock \ + pthread_barrier_init pthread_barrier_destroy \ + pthread_barrier_wait \ + pthread_barrierattr_init pthread_barrierattr_destroy \ + pthread_barrierattr_getpshared \ + pthread_barrierattr_setpshared \ + pthread_key_create pthread_key_delete \ + pthread_getspecific pthread_setspecific \ + pthread_sigmask pthread_kill \ + pthread_cancel pthread_testcancel \ + pthread_setcancelstate pthread_setcanceltype \ + pthread_once \ + old_pthread_atfork pthread_atfork \ + pthread_getcpuclockid \ + pthread_clock_gettime pthread_clock_settime \ + sem_init sem_destroy \ + sem_open sem_close sem_unlink \ + sem_getvalue \ + sem_wait sem_trywait sem_timedwait sem_post \ + cleanup cleanup_defer cleanup_compat \ + cleanup_defer_compat unwind \ + pt-longjmp pt-cleanup\ + cancellation \ + lowlevellock \ + pt-vfork \ + ptw-write ptw-read ptw-close ptw-fcntl ptw-accept \ + ptw-connect ptw-recv ptw-recvfrom ptw-recvmsg ptw-send \ + ptw-sendmsg ptw-sendto ptw-fsync ptw-lseek ptw-llseek \ + ptw-msync ptw-nanosleep ptw-open ptw-open64 ptw-pause \ + ptw-pread ptw-pread64 ptw-pwrite ptw-pwrite64 \ + ptw-tcdrain ptw-wait ptw-waitpid ptw-msgrcv ptw-msgsnd \ + ptw-sigwait \ + pt-raise pt-system \ + flockfile ftrylockfile funlockfile \ + sigaction \ + herrno res pt-allocrtsig \ + pthread_kill_other_threads \ + pthread_getaffinity pthread_setaffinity \ + pthread_attr_getaffinity pthread_attr_setaffinity \ + cleanup_routine unwind-forcedunwind + +libpthread-shared-only-routines = version pt-allocrtsig unwind-forcedunwind +libpthread-static-only-routines = pthread_atfork + +CFLAGS-pthread_atfork.c = -DNOT_IN_libc + +# Since cancellation handling is in large parts handled using exceptions +# we have to compile some files with exception handling enabled, some +# even with asynchronous unwind tables. + +# init.c contains sigcancel_handler(). +CFLAGS-init.c = -fexceptions -fasynchronous-unwind-tables +# The unwind code itself, +CFLAGS-unwind.c = -fexceptions +CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables + +# The following three functions must be async-cancel safe. +CFLAGS-pthread_cancel.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pthread_setcancelstate.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pthread_setcanceltype.c = -fexceptions -fasynchronous-unwind-tables + +# These are internal functions which similar functionality as setcancelstate +# and setcanceltype. +CFLAGS-cancellation.c = -fasynchronous-unwind-tables +CFLAGS-libc-cancellation.c = -fasynchronous-unwind-tables + +# Calling pthread_exit() must cause the registered cancel handlers to +# be executed. Therefore exceptions have to be thrown through this +# function. +CFLAGS-pthread_exit.c = -fexceptions + +# Among others, __pthread_unwind is forwarded. This function must handle +# exceptions. +CFLAGS-forward.c = -fexceptions + +# The following are cancellation points. Some of the functions can +# block and therefore temporarily enable asynchronous cancellation. +# Those must be compiled asynchronous unwind tables. +CFLAGS-pthread_testcancel.c = -fexceptions +CFLAGS-pthread_join.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pthread_timedjoin.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pthread_once.c = $(uses-callbacks) -fexceptions \ + -fasynchronous-unwind-tables +CFLAGS-pthread_cond_wait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pthread_cond_timedwait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sem_wait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sem_timedwait.c = -fexceptions -fasynchronous-unwind-tables + +# These are the function wrappers we have to duplicate here. +CFLAGS-fcntl.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-lockf.c = -fexceptions +CFLAGS-pread.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pread64.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pwrite.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-pwrite64.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-wait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-sigwait.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-msgrcv.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables +CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables + +CFLAGS-pt-system.c = -fexceptions + +# +# The rest of this file is uClibc specific. +# +CFLAGS-pthread_barrier_init.c = -D_GNU_SOURCE +CFLAGS-pthread_barrier_destroy.c = -D_GNU_SOURCE +CFLAGS-pthread_barrierattr_init.c = -D_GNU_SOURCE +CFLAGS-pthread_barrierattr_destroy.c = -D_GNU_SOURCE +CFLAGS-pthread_barrierattr_getpshared.c = -D_GNU_SOURCE +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-OMIT-alloca_cutoff.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-forward.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-libc-lowlevelock.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-OMIT-libc-cancellation.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 + +libpthread-os-routines = pthread_yield +libpthread-misc-routines = pthread_rwlock_rdlock pthread_rwlock_timedrdlock \ + pthread_rwlock_wrlock pthread_rwlock_timedwrlock \ + pthread_rwlock_unlock pthread_cond_wait \ + pthread_cond_timedwait pthread_cond_signal \ + pthread_cond_broadcast pthread_spin_init \ + pthread_spin_destroy pthread_spin_lock \ + pthread_spin_trylock pthread_spin_unlock \ + pthread_barrier_wait pthread_sigmask \ + pthread_kill pthread_once \ + pthread_getcpuclockid sem_wait \ + sem_trywait sem_timedwait \ + sem_post pt-longjmp \ + lowlevellock pt-vfork \ + ptw-close ptw-read ptw-write \ + ptw-fcntl ptw-accept ptw-connect \ + ptw-recv ptw-recvfrom ptw-recvmsg \ + ptw-send ptw-sendmsg ptw-sendto \ + ptw-fsync ptw-lseek ptw-llseek \ + ptw-msync ptw-nanosleep ptw-open \ + ptw-open64 ptw-pause ptw-pread \ + ptw-pread64 ptw-pwrite ptw-pwrite64 \ + ptw-tcdrain ptw-wait ptw-waitpid \ + ptw-msgrcv ptw-msgsnd ptw-sigwait \ + pt-raise flockfile ftrylockfile \ + funlockfile sigaction \ + pthread_getaffinity \ + pthread_setaffinity \ + pthread_attr_getaffinity \ + pthread_attr_setaffinity \ + unwind-forcedunwind + +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) +LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -z defs +else +LDFLAGS-libpthread.so := $(LDFLAGS) +endif + +LDFLAGS-libpthread.so += $(top_builddir)lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so $(top_builddir)lib/libdl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so + +LIBS-libpthread.so := $(LIBS) + +ifneq ($(UCLIBC_CTOR_DTOR),y) +START_FILE-libpthread.so := $(top_builddir)/libpthread/nptl/sysdeps/pthread/crti.o $(SHARED_START_FILES) +END_FILE-libpthread.so := $(SHARED_END_FILES) $(top_builddir)/libpthread/nptl/sysdeps/pthread/crtn.o +endif + +libpthread_FULL_NAME := libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so + +libpthread_DIR := $(top_srcdir)libpthread/nptl +libpthread_OUT := $(top_builddir)libpthread/nptl + +libpthread_a_SRC = $(patsubst %, $(libpthread_DIR)/%.c, \ + $(filter-out $(libpthread-os-routines) \ + $(libpthread-misc-routines) \ + $(libpthread-shared-only-routines), \ + $(libpthread-routines))) +libpthread_so_SRC = $(patsubst %, $(libpthread_DIR)/%.c, \ + $(filter-out $(libpthread-os-routines) \ + $(libpthread-misc-routines) \ + $(libpthread-static-only-routines), $(libpthread-routines))) + +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) + +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)) + +-include $(libpthread_DIR)/sysdeps/pthread/Makefile.in +-include $(libpthread_DIR)/sysdeps/$(TARGET_ARCH)/Makefile.arch +-include $(libpthread_DIR)/sysdeps/unix/sysv/linux/Makefile.in +-include $(libpthread_DIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/Makefile.arch + +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 + +$(top_builddir)lib/libpthread.so: $(libpthread_OUT)/libpthread_so.a + $(call link.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION)) + +$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y) + $(Q)$(RM) $@ +ifeq ($(PTHREADS_DEBUG_SUPPORT),y) + $(do_strip:-x=-X --strip-debug) +else + $(do_strip) +endif + $(do_ar) + +ifeq ($(DOPIC),y) +$(top_builddir)lib/libpthread.a: $(libpthread-a-y:.o=.oS) +else +$(top_builddir)lib/libpthread.a: $(libpthread-a-y) +endif + $(Q)$(INSTALL) -d $(dir $@) + $(Q)$(RM) $@ + $(do_strip) + $(do_ar) + +nptl_headers: + @sed 's/\(.*\)/"\1\\n"/' $(PTDIR)/Banner > $(PTDIR)/banner.h + @echo "#define VERSION \""$(VERSION)"\"" > $(PTDIR)/version.h + $(LN) -sf ../$(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/ + $(LN) -sf ../$(PTDIR)/semaphore.h $(top_builddir)include/ + $(INSTALL) -d $(top_builddir)include/bits + $(LN) -sf ../../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/semaphore.h $(top_builddir)include/bits/ + $(LN) -sf ../../$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)/bits/pthreadtypes.h $(top_builddir)include/bits/ + $(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/libc-lock.h $(top_builddir)include/bits/ + $(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 + +libpthread_clean: + $(RM) $(libpthread_OUT)/*.{o,os,oS} diff --git a/libpthread/nptl/sysdeps/mips/Makefile.arch b/libpthread/nptl/sysdeps/mips/Makefile.arch new file mode 100644 index 000000000..c12ae370f --- /dev/null +++ b/libpthread/nptl/sysdeps/mips/Makefile.arch @@ -0,0 +1,39 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +libpthread_SSRC = pthread_spin_lock.S pthread_spin_trylock.S + +libc_a_CSRC = dl-support.c dl-tls.c libc-tls.c + +CFLAGS-pt-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 +CFLAGS-dl-support.c = -D_GNU_SOURCE + +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) + +PTHREAD_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/mips +PTHREAD_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/mips + +PTHREAD_ARCH_OBJ:=$(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC)) + +libpthread-a-y += $(PTHREAD_ARCH_OBJ) +libpthread-so-y += $(PTHREAD_ARCH_OBJ:.o=.oS) + +libpthread-nomulti-y+=$(PTHREAD_ARCH_OBJ) + +LIBC_ARCH_OBJ:=$(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libc_a_CSRC)) + +libc-a-y+=$(LIBC_ARCH_OBJ) + +libc-nomulti-y+=$(LIBC_ARCH_OBJ) + +objclean-y+=pthread_arch_objclean + +pthread_arch_objclean: + $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS} diff --git a/libpthread/nptl/sysdeps/pthread/Makefile.in b/libpthread/nptl/sysdeps/pthread/Makefile.in new file mode 100644 index 000000000..ef4e0c72e --- /dev/null +++ b/libpthread/nptl/sysdeps/pthread/Makefile.in @@ -0,0 +1,68 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +# +# NOTE: glibc puts flockfile.c, ftrylockfile.c, funlockfile.c, and +# 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 + +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) \ + -I$(top_srcdir)libc/signal +CFLAGS-sigfillset.c = -I$(top_srcdir)libc/signal +CFLAGS-sigprocmask.c = -I$(top_srcdir)libc/sysdeps/linux/common + +CFLAGS-pthread = -DNOT_IN_libc=1 $(SSP_ALL_CFLAGS) -DIS_IN_libpthread=1 + +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)) + +libpthread-a-y += $(PTHREAD_OBJ) +libpthread-so-y += $(PTHREAD_OBJ:.o=.oS) + +ifeq ($(UCLIBC_CTOR_DTOR),y) +CFLAGS-pt-initfini.c = -S -g0 -fPIC -fno-inline-functions \ + $(call check_gcc,-fno-unit-at-a-time,) \ + -finhibit-size-directive \ + $(patsubst -f%,-fno-%,$(call check_gcc,-fexceptions,)) +ASFLAGS-crti.S = -g0 +ASFLAGS-crtn.S = -g0 + +$(pthread_OUT)/pt-initfini.s: $(pthread_DIR)/pt-initfini.c + $(compile.c) + sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ + awk -f $(pthread_DIR)/defs.awk > $(pthread_OUT)/defs.h + +$(pthread_OUT)/crti.S: $(pthread_OUT)/pt-initfini.s + sed -n -e '1,/@HEADER_ENDS/p' \ + -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ + -e '/@TRAILER_BEGINS/,$$p' $< > $@ + +$(pthread_OUT)/crtn.S: $(pthread_OUT)/pt-initfini.s + sed -n -e '1,/@HEADER_ENDS/p' \ + -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \ + -e '/@TRAILER_BEGINS/,$$p' $< > $@ +endif + +objclean-y += pthread_objclean + +pthread_objclean: + $(RM) $(pthread_OUT)/*.{o,os,oS,s,S} $(pthread_OUT)/defs.h diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in new file mode 100644 index 000000000..b2f25dc50 --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/Makefile.in @@ -0,0 +1,68 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +libpthread_CSRC = pt-raise.c 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 \ + sem_trywait.c sem_wait.c pt-fork.c + +libc_CSRC = libc_pthread_init.c libc_multiple_threads.c \ + register-atfork.c unregister-atfork.c + +ifeq ($(TARGET_ARCH),alpha) +libpthread_CSRC += lowlevellock.c +libc_CSRC += libc-lowlevellock.c +endif + +ifeq ($(TARGET_ARCH),mips) +libpthread_CSRC += lowlevellock.c +libc_CSRC += libc-lowlevellock.c +endif + +ifeq ($(TARGET_ARCH),powerpc) +libpthread_CSRC += lowlevellock.c +libc_CSRC += libc-lowlevellock.c +endif + +ifeq ($(TARGET_ARCH),sparc) +libpthread_CSRC += lowlevellock.c +libc_CSRC += libc-lowlevellock.c +endif + +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-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 + +pthread_DIR := $(top_srcdir)/libpthread/nptl/sysdeps/unix/sysv/linux +pthread_OUT := $(top_builddir)/libpthread/nptl/sysdeps/unix/sysv/linux + +PTHREAD_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libpthread_CSRC)) + +libpthread-a-y += $(PTHREAD_OBJ) +libpthread-so-y += $(PTHREAD_OBJ:.o=.oS) + +# +# Special suffix rules. +# +LIBC_OBJ = $(patsubst %.c, $(pthread_OUT)/%.o, $(libc_CSRC)) + + +libc-a-y += $(LIBC_OBJ) +libc-so-y += $(LIBC_OBJ:.o=.oS) + +objclean-y += pthread_linux_objclean + +pthread_linux_objclean: + $(RM) $(pthread_OUT)/*.{o,os,oS} diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch new file mode 100644 index 000000000..b3f48700c --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch @@ -0,0 +1,43 @@ +# Makefile for uClibc NPTL +# +# Copyright (C) 2005 Steven J. Hill <sjhill@uclibc.org> +# +# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +# + +libpthread_SSRC = pt-vfork.S #clone.S +libpthread_CSRC = pthread_once.c + +libc_a_CSRC = fork-nptl.c + +ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y) +CFLAGS-fork-nptl.c = -D__USE_STDIO_FUTEXES__ +endif +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) + +LINUX_ARCH_DIR:=$(top_srcdir)libpthread/nptl/sysdeps/unix/sysv/linux/mips +LINUX_ARCH_OUT:=$(top_builddir)libpthread/nptl/sysdeps/unix/sysv/linux/mips + +LINUX_ARCH_OBJ:=$(patsubst %.S,$(LINUX_ARCH_OUT)/%.o,$(libpthread_SSRC)) +LINUX_ARCH_OBJ+=$(patsubst %.c,$(LINUX_ARCH_OUT)/%.o,$(libpthread_CSRC)) + +libpthread-a-y += $(LINUX_ARCH_OBJ) +libpthread-so-y += $(LINUX_ARCH_OBJ:.o=.oS) + +libpthread-nomulti-y+=$(LINUX_ARCH_OBJS) + +LIBC_LINUX_ARCH_OBJ:=$(patsubst %.c,$(LINUX_ARCH_OUT)/%.o,$(libc_a_CSRC)) + +libc-a-y+=$(LIBC_LINUX_ARCH_OBJ) +libc-so-y+=$(LIBC_LINUX_ARCH_OBJ:.o=.oS) + +libc-nomulti-y+=$(LIBC_LINUX_ARCH_OBJ) + +objclean-y+=pthread_linux_arch_objclean + +pthread_linux_arch_objclean: + $(RM) $(LINUX_ARCH_OUT)/*.{o,os,oS} |