summaryrefslogtreecommitdiff
path: root/libpthread/nptl/sysdeps/powerpc/Makefile.arch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-05-05 22:50:19 -0700
committerKhem Raj <raj.khem@gmail.com>2010-05-09 22:53:25 -0700
commite3dec33ba03ef7080a39444388a01e59135bb3aa (patch)
tree9693449a78a556a91ddba349116d9c988399071a /libpthread/nptl/sysdeps/powerpc/Makefile.arch
parentd2ab6ee38dd6ef107bac77f485ab1bb35b177e6c (diff)
powerpc: Add TLS and NPTL support
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread/nptl/sysdeps/powerpc/Makefile.arch')
-rw-r--r--libpthread/nptl/sysdeps/powerpc/Makefile.arch50
1 files changed, 50 insertions, 0 deletions
diff --git a/libpthread/nptl/sysdeps/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/powerpc/Makefile.arch
new file mode 100644
index 000000000..bd34063b5
--- /dev/null
+++ b/libpthread/nptl/sysdeps/powerpc/Makefile.arch
@@ -0,0 +1,50 @@
+# Makefile for uClibc NPTL
+#
+# Copyright (C) 2009 Bernhard Reutner-Fischer <uclibc@uclibc.org>
+#
+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+#
+
+PTHREAD_ARCH_DIR := $(top_srcdir)libpthread/nptl/sysdeps/powerpc
+PTHREAD_ARCH_OUT := $(top_builddir)libpthread/nptl/sysdeps/powerpc
+
+libpthread_SSRC =
+libpthread_CSRC = pthread_spin_lock.c pthread_spin_trylock.c
+
+PTHREAD_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC))
+PTHREAD_ARCH_OBJ += $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_CSRC))
+
+ifeq ($(DOPIC),y)
+libpthread-a-y += $(PTHREAD_ARCH_OBJ:.o=.os)
+else
+libpthread-a-y += $(PTHREAD_ARCH_OBJ)
+endif
+libpthread-so-y += $(PTHREAD_ARCH_OBJ:.o=.oS)
+
+libpthread-nomulti-y += $(PTHREAD_ARCH_OBJ)
+
+CFLAGS-powerpc = $(SSP_ALL_CFLAGS)
+
+#
+# Create 'tcb-offsets.h' header file.
+#
+CFLAGS-tcb-offsets.c = -S
+
+$(PTHREAD_ARCH_OUT)/tcb-offsets.c: $(PTHREAD_ARCH_DIR)/tcb-offsets.sym
+ $(do_awk) $(top_srcdir)extra/scripts/gen-as-const.awk $< > $@
+
+$(PTHREAD_ARCH_OUT)/tcb-offsets.s: $(PTHREAD_ARCH_OUT)/tcb-offsets.c
+ $(compile.c)
+
+$(PTHREAD_ARCH_OUT)/tcb-offsets.h: $(PTHREAD_ARCH_OUT)/tcb-offsets.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_ARCH_OUT)/tcb-offsets.h
+
+nptl_arch_headers_clean:
+ $(RM) $(PTHREAD_ARCH_OUT)/tcb-offsets.c \
+ $(PTHREAD_ARCH_OUT)/tcb-offsets.s \
+ $(PTHREAD_ARCH_OUT)/tcb-offsets.h
+
+nptl_arch_objclean:
+ $(RM) $(PTHREAD_ARCH_OUT)/*.{o,os,oS}