blob: 2992f35f15f6e8c9d25b4715a58382339b88fd72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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_SSRC = pthread_spin_lock.S pthread_spin_trylock.S \
nptl-sysdep.S
libc_a_CSRC = libc-tls.c
CFLAGS-pt-raise.c = -DNOT_IN_libc=1 -DIS_IN_libpthread=1
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
ASFLAGS-nptl-sysdep.S = -DNOT_IN_libc=1 -DIS_IN_libpthread=1 \
-D_LIBC_REENTRANT \
-I$(top_srcdir)libc/sysdeps/linux/mips
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
PTHREAD_ARCH_OBJ := $(patsubst %.S,$(PTHREAD_ARCH_OUT)/%.o,$(libpthread_SSRC))
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)
LIBC_ARCH_OBJ := $(patsubst %.c,$(PTHREAD_ARCH_OUT)/%.o,$(libc_a_CSRC))
libc-static-y += $(LIBC_ARCH_OBJ)
libc-nomulti-y += $(LIBC_ARCH_OBJ)
objclean-y += nptl_arch_objclean
headers_clean-y += nptl_arch_headers_clean
#
# 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}
|