OSDN Git Service

Merge commit 'origin/master' into nptl
[uclinux-h8/uClibc.git] / test / nptl / Makefile.in
1 # uClibc NPTL tests
2 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
3
4 TESTS := tst-align tst-align2 tst-atfork1 tst-attr1 tst-attr2 tst-attr3 \
5         tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 tst-basic1  \
6         tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6          \
7         tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel6 tst-cancel7     \
8         tst-cancel8 tst-cancel9 tst-cancel10 tst-cancel11 tst-cancel12  \
9         tst-cancel13 tst-cancel14 tst-cancel15 tst-cancel16             \
10         tst-cancel19 tst-cancel20 tst-cancel21 tst-cancel22             \
11         tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3             \
12         tst-cleanup4 tst-clock1 tst-clock2 tst-cond1 tst-cond2          \
13         tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 tst-cond8     \
14         tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13           \
15         tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18          \
16         tst-cond19 tst-cond20 tst-cond21 tst-detach1 tst-eintr1         \
17         tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 tst-exec2 tst-exec3 \
18         tst-exec4 tst-exit1 tst-exit2 tst-exit3 tst-flock1 tst-flock2   \
19         tst-fork1 tst-fork2 tst-fork3 tst-fork4 tst-initializers1       \
20         tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-key1      \
21         tst-key2 tst-key3 tst-key4 tst-kill1 tst-kill2 tst-kill3        \
22         tst-kill4 tst-kill5 tst-kill6 tst-mutex1 tst-mutex2 tst-mutex3  \
23         tst-mutex4 tst-mutex5 tst-mutex6 tst-mutex7 tst-mutex8          \
24         tst-mutex9 tst-mutex5a tst-mutex7a tst-once1 tst-once2          \
25         tst-once3 tst-once4 tst-popen1 tst-raise1 tst-rwlock1           \
26         tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 tst-rwlock6     \
27         tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 tst-rwlock11   \
28         tst-rwlock12 tst-rwlock13 tst-rwlock14 tst-sched1 tst-sem1      \
29         tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 tst-sem8  \
30         tst-sem9 tst-signal1 tst-signal2 tst-signal3 tst-signal4        \
31         tst-signal5 tst-signal6 tst-spin1 tst-spin2 tst-spin3           \
32         tst-stack1 tst-stack2 tst-stdio1 tst-stdio2 tst-sysconf         \
33         tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tsd1 tst-tsd2  \
34         tst-tsd3 tst-tsd4 tst-tsd5 tst-umask1
35
36 #
37 # These are for the RT library and POSIX timers.
38 #
39 TESTS += tst-clock tst-clock_nanosleep tst-cpuclock1 tst-cpuclock2      \
40         tst-cputimer1 tst-cputimer2 tst-cputimer3 tst-mqueue1           \
41         tst-mqueue2 tst-mqueue3 tst-mqueue4 tst-mqueue5 tst-mqueue6     \
42         tst-mqueue7 tst-mqueue8 tst-mqueue9 tst-timer2 tst-timer3       \
43         tst-timer4 tst-timer5
44
45 ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),)
46 TESTS_DISABLED += tst-exec2 tst-exec3 tst-exec4
47 endif
48
49 GLIBC_TESTS_DISABLED := tst-eintr1_glibc tst-eintr2_glibc \
50         tst-eintr3_glibc tst-eintr4_glibc tst-eintr5_glibc \
51         tst-tls1_glibc tst-tls2_glibc
52
53
54 ifeq ($(HAVE_SHARED),)
55 TESTS_DISABLED += tst-tls3 tst-tls4 tst-tls5
56 else
57 GLIBC_TESTS_DISABLED += tst-tls3_glibc tst-tls4_glibc tst-tls5_glibc
58 endif
59
60 PTDIR := $(top_builddir)libpthread/nptl
61
62 EXTRA_CFLAGS := -DNOT_IN_libc=1 -D_LIBC -D__USE_GNU -std=gnu99 \
63         -I$(PTDIR) -I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH)    \
64         -I$(PTDIR)/sysdeps/$(TARGET_ARCH)                               \
65         -I$(PTDIR)/sysdeps/unix/sysv/linux                              \
66         -I$(PTDIR)/sysdeps/pthread                                      \
67         -I$(PTDIR)/sysdeps/pthread/bits                                 \
68         -I$(PTDIR)/sysdeps/generic                                      \
69         -I$(top_builddir)ldso/include                                   \
70         -I$(top_builddir)ldso/ldso/$(TARGET_ARCH)                       \
71         -I$(top_builddir)include                                        \
72         -include $(top_builddir)include/libc-symbols.h
73
74 ifeq ($(TARGET_ARCH),i386)
75 CFLAGS_tst-align.o := -malign-double -mpreferred-stack-boundary=4
76 endif
77 ifeq ($(TARGET_ARCH),i686)
78 CFLAGS_tst-align.o := -malign-double -mpreferred-stack-boundary=4 -msse
79 endif
80 CFLAGS_tst-cleanup4aux.o := -W -Wall -sjh
81 CFLAGS_tst-initializers1.o := -W -Wall -Werror
82 CFLAGS_tst-tls3.o := tst-tls3mod.so
83 CFLAGS_tst-tls4.o := tst-tls4moda.so tst-tls4modb.so
84 CFLAGS_tst-tls5.o := tst-tls5mod.so
85 CFLAGS_tst-tls3mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
86 CFLAGS_tst-tls4moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
87 CFLAGS_tst-tls4modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
88 CFLAGS_tst-tls5mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
89 CFLAGS_tst-tls5moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
90 CFLAGS_tst-tls5modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
91 CFLAGS_tst-tls5modc.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
92 CFLAGS_tst-tls5modd.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
93 CFLAGS_tst-tls5mode.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
94 CFLAGS_tst-tls5modf.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
95
96 EXTRA_LDFLAGS := -lpthread
97
98 LDFLAGS_tst-cleanup4 := tst-cleanup4aux.o
99 LDFLAGS_tst-clock2 := -lrt
100 LDFLAGS_tst-cond11 := -lrt
101 LDFLAGS_tst-cond19 := -lrt
102 LDFLAGS_tst-rwlock14 := -lrt
103 LDFLAGS_tst-tls3 := -ldl -rdynamic tst-tls3mod.so
104 LDFLAGS_tst-tls4 := -ldl
105 LDFLAGS_tst-tls5 :=  tst-tls5mod.so
106 LDFLAGS_tst-clock := -lrt
107 LDFLAGS_tst-clock_nanosleep := -lrt
108 LDFLAGS_tst-cpuclock1 := -lrt
109 LDFLAGS_tst-cpuclock2 := -lrt -lpthread
110 LDFLAGS_tst-cputimer1 := -lrt -lpthread
111 LDFLAGS_tst-cputimer2 := -lrt -lpthread
112 LDFLAGS_tst-cputimer3 := -lrt -lpthread
113 LDFLAGS_tst-mqueue1 := -lrt
114 LDFLAGS_tst-mqueue2 := -lrt
115 LDFLAGS_tst-mqueue3 := -lrt -lpthread
116 LDFLAGS_tst-mqueue4 := -lrt
117 LDFLAGS_tst-mqueue5 := -lrt -lpthread
118 LDFLAGS_tst-mqueue6 := -lrt -lpthread
119 LDFLAGS_tst-mqueue7 := -lrt
120 LDFLAGS_tst-mqueue8 := -lrt
121 LDFLAGS_tst-mqueue9 := -lrt
122 LDFLAGS_tst-timer2 := -lrt -lpthread
123 LDFLAGS_tst-timer3 := -lrt -lpthread
124 LDFLAGS_tst-timer4 := -lrt -lpthread
125 LDFLAGS_tst-timer5 := -lrt -lpthread
126 LDFLAGS_tst-tls3mod.so := -shared -static-libgcc -lpthread
127 LDFLAGS_tst-tls4moda.so := -shared -static-libgcc
128 LDFLAGS_tst-tls4modb.so := -shared -static-libgcc
129 LDFLAGS_tst-tls5mod.so := -shared -static-libgcc -Wl,-soname,tst-tls5mod.so
130 LDFLAGS_tst-tls5moda.so := -shared -static-libgcc
131 LDFLAGS_tst-tls5modb.so := -shared -static-libgcc
132 LDFLAGS_tst-tls5modc.so := -shared -static-libgcc
133 LDFLAGS_tst-tls5modd.so := -shared -static-libgcc
134 LDFLAGS_tst-tls5mode.so := -shared -static-libgcc
135 LDFLAGS_tst-tls5modf.so := -shared -static-libgcc
136
137 #
138 # Special case
139 #
140 tst-cleanup4aux.o:
141         $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c tst-cleanup4aux.c -o $@
142
143 tst-cleanup4: tst-cleanup4aux.o
144 tst-tls3: tst-tls3mod.so
145 tst-tls4: tst-tls4moda.so tst-tls4modb.so
146 tst-tls5: tst-tls5mod.so tst-tls5moda.so tst-tls5modb.so        \
147           tst-tls5modc.so tst-tls5modd.so tst-tls5mode.so tst-tls5modf.so
148
149 OPTS_tst-cancel7 = --command ./tst-cancel7
150 OPTS_tst-mqueue7 = -- ./tst-mqueue7
151 OPTS_tst-exec4 = ./tst-exec4
152
153 RET_tst-clock2 := 1
154 RET_tst-cputimer1 := 1
155 RET_tst-cputimer2 := 1
156 RET_tst-cputimer3 := 1
157
158 WRAPPER := env LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)" TIMEOUTFACTOR=100