Makefile.in 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. # uClibc NPTL tests
  2. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  3. TESTS := tst-align tst-align2 tst-atfork1 tst-attr1 tst-attr2 tst-attr3 \
  4. tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 tst-basic1 \
  5. tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
  6. tst-cancel1 tst-cancel2 tst-cancel3 tst-cancel6 tst-cancel7 \
  7. tst-cancel8 tst-cancel9 tst-cancel10 tst-cancel11 tst-cancel12 \
  8. tst-cancel13 tst-cancel14 tst-cancel15 tst-cancel16 \
  9. tst-cancel19 tst-cancel20 tst-cancel21 tst-cancel22 \
  10. tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 \
  11. tst-cleanup4 tst-clock1 tst-clock2 tst-cond1 tst-cond2 \
  12. tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 tst-cond8 \
  13. tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
  14. tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 \
  15. tst-cond19 tst-cond20 tst-cond21 tst-detach1 tst-eintr1 \
  16. tst-eintr2 tst-eintr3 tst-eintr4 tst-eintr5 tst-exec2 tst-exec3 \
  17. tst-exec4 tst-exit1 tst-exit2 tst-exit3 tst-flock1 tst-flock2 \
  18. tst-fork1 tst-fork2 tst-fork3 tst-fork4 tst-initializers1 \
  19. tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-key1 \
  20. tst-key2 tst-key3 tst-key4 tst-kill1 tst-kill2 tst-kill3 \
  21. tst-kill4 tst-kill5 tst-kill6 tst-mutex1 tst-mutex2 tst-mutex3 \
  22. tst-mutex4 tst-mutex5 tst-mutex6 tst-mutex7 tst-mutex8 \
  23. tst-mutex9 tst-mutex5a tst-mutex7a tst-once1 tst-once2 \
  24. tst-once3 tst-once4 tst-popen1 tst-raise1 tst-rwlock1 \
  25. tst-rwlock2 tst-rwlock3 tst-rwlock4 tst-rwlock5 tst-rwlock6 \
  26. tst-rwlock7 tst-rwlock8 tst-rwlock9 tst-rwlock10 tst-rwlock11 \
  27. tst-rwlock12 tst-rwlock13 tst-rwlock14 tst-sched1 tst-sem1 \
  28. tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 tst-sem8 \
  29. tst-sem9 tst-signal1 tst-signal2 tst-signal3 tst-signal4 \
  30. tst-signal5 tst-signal6 tst-spin1 tst-spin2 tst-spin3 \
  31. tst-stack1 tst-stack2 tst-stdio1 tst-stdio2 tst-sysconf \
  32. tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tsd1 tst-tsd2 \
  33. tst-tsd3 tst-tsd4 tst-tsd5 tst-umask1 tst-cond-deadlock \
  34. tst-align3 tst-cancel4 tst-cancel5 tst-cancel18 tst-cancel23 \
  35. tst-cancel25 tst-cancelx2 tst-cancelx3 tst-cancelx4 tst-cancelx6 \
  36. tst-cancelx7 tst-cancelx8 tst-cancelx9 tst-cancelx10 tst-cancelx11 \
  37. tst-cancelx12 tst-cancelx13 tst-cancelx14 tst-cancelx15 tst-cancelx16 \
  38. tst-cancelx18 tst-cancelx20 tst-cancelx21 tst-cleanupx0 tst-cleanupx1 \
  39. tst-cleanupx2 tst-cleanupx3 tst-cleanupx4 tst-cond22 tst-cond23 \
  40. tst-getpid1 tst-getpid2 tst-getpid3 tst-join6 tst-tsd6 \
  41. tst-oddstacklimit tst-oncex3 tst-oncex4 tst-rwlock2a \
  42. tst-basic7 tst-signal7 tst-vfork1x tst-vfork2x tst-sem10 tst-sem11 \
  43. tst-sem12 tst-typesizes tst-initializers1-c89 tst-initializers1-c99 \
  44. tst-initializers1-gnu89 tst-initializers1-gnu99 \
  45. tst-atfork2
  46. #
  47. # These are for the RT library and POSIX timers.
  48. #
  49. TESTS += tst-clock tst-clock_nanosleep tst-cpuclock1 tst-cpuclock2 \
  50. tst-cputimer1 tst-cputimer2 tst-cputimer3 tst-mqueue1 \
  51. tst-mqueue2 tst-mqueue3 tst-mqueue4 tst-mqueue5 tst-mqueue6 \
  52. tst-mqueue7 tst-mqueue8 tst-mqueue9 tst-timer2 tst-timer3 \
  53. tst-timer4 tst-timer5
  54. ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),)
  55. TESTS_DISABLED += tst-exec2 tst-exec3 tst-exec4
  56. endif
  57. ifeq ($(UCLIBC_SUSV4_LEGACY),)
  58. TESTS_DISABLED += tst-basic5 tst-cancel4 tst-cancel5 tst-cancelx4
  59. endif
  60. GLIBC_TESTS_DISABLED := tst-eintr1_glibc tst-eintr2_glibc \
  61. tst-eintr3_glibc tst-eintr4_glibc tst-eintr5_glibc \
  62. tst-tls1_glibc tst-tls2_glibc
  63. ifeq ($(HAVE_SHARED),)
  64. TESTS_DISABLED += tst-tls3 tst-tls4 tst-tls5 tst-dlsym1 tst-fini1 \
  65. tst-unload
  66. else
  67. GLIBC_TESTS_DISABLED += tst-tls3_glibc tst-tls4_glibc tst-tls5_glibc
  68. endif
  69. EXTRA_CFLAGS := -DNOT_IN_libc=1 -D_LIBC -D__USE_GNU -std=gnu99 \
  70. $(PTINC) \
  71. -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) \
  72. -I$(top_srcdir)libc/sysdeps/linux \
  73. -I$(top_builddir)include \
  74. -include $(top_builddir)include/libc-symbols.h
  75. ifeq ($(TARGET_ARCH),i386)
  76. CFLAGS_tst-align := -malign-double -mpreferred-stack-boundary=4
  77. endif
  78. ifeq ($(TARGET_ARCH),i686)
  79. CFLAGS_tst-align := -malign-double -mpreferred-stack-boundary=4 -msse
  80. endif
  81. CFLAGS_tst-cleanup4aux.o := -W
  82. CFLAGS_tst-initializers1 := -W -Werror
  83. CFLAGS_tst-tls3mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  84. CFLAGS_tst-tls4moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  85. CFLAGS_tst-tls4modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  86. CFLAGS_tst-tls5mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  87. CFLAGS_tst-tls5moda.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  88. CFLAGS_tst-tls5modb.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  89. CFLAGS_tst-tls5modc.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  90. CFLAGS_tst-tls5modd.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  91. CFLAGS_tst-tls5mode.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  92. CFLAGS_tst-tls5modf.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  93. CFLAGS_tst-fini1mod.so := -fPIC -DPIC -DSHARED -shared -DNOT_IN_libc
  94. LDFLAGS_tst-cond11 = -lrt
  95. LDFLAGS_tst-cond19 = -lrt
  96. LDFLAGS_tst-cancelx2 = -lc
  97. LDFLAGS_tst-cancelx3 = -lc
  98. LDFLAGS_tst-cancelx4 = -lc
  99. LDFLAGS_tst-cancelx6 = -lc
  100. LDFLAGS_tst-cancelx6 = -lc
  101. LDFLAGS_tst-cancelx7 = -lc
  102. LDFLAGS_tst-cancelx8 = -lc
  103. LDFLAGS_tst-cancelx9 = -lc
  104. LDFLAGS_tst-cancelx10 = -lc
  105. LDFLAGS_tst-cancelx11 = -lc
  106. LDFLAGS_tst-cancelx12 = -lc
  107. LDFLAGS_tst-cancelx13 = -lc
  108. LDFLAGS_tst-cancelx14 = -lc
  109. LDFLAGS_tst-cancelx15 = -lc
  110. LDFLAGS_tst-cancelx16 = -lc
  111. LDFLAGS_tst-cancelx18 = -lc
  112. LDFLAGS_tst-cancelx20 = -lc
  113. LDFLAGS_tst-cancelx21 = -lc
  114. LDFLAGS_tst-cleanupx0 = -lc
  115. LDFLAGS_tst-cleanupx1 = -lc
  116. LDFLAGS_tst-cleanupx2 = -lc
  117. LDFLAGS_tst-cleanupx3 = -lc
  118. LDFLAGS_tst-oncex3 = -lc
  119. LDFLAGS_tst-oncex4 = -lc
  120. LDFLAGS_tst-rwlock14 = -lrt
  121. LDFLAGS_tst-fini1 = -Wl,-rpath=./ tst-fini1mod.so
  122. LDFLAGS_tst-fini1mod.so = -Wl,-soname=tst-fini1mod.so
  123. LDFLAGS_tst-unload = -ldl
  124. LDFLAGS_tst-cancel5 := -lpthread
  125. LDFLAGS_tst-cancel23 := -lc -lpthread
  126. LDFLAGS_tst-vfork1x := -lc -lpthread
  127. LDFLAGS_tst-vfork2x := -lc -lpthread
  128. CFLAGS_tst-cancelx2 += -fexceptions
  129. CFLAGS_tst-cancelx3 += -fexceptions
  130. CFLAGS_tst-cancelx4 += -fexceptions
  131. CFLAGS_tst-cancelx6 += -fexceptions
  132. CFLAGS_tst-cancelx7 += -fexceptions
  133. CFLAGS_tst-cancelx8 += -fexceptions
  134. CFLAGS_tst-cancelx9 += -fexceptions
  135. CFLAGS_tst-cancelx10 += -fexceptions
  136. CFLAGS_tst-cancelx11 += -fexceptions
  137. CFLAGS_tst-cancelx12 += -fexceptions
  138. CFLAGS_tst-cancelx13 += -fexceptions
  139. CFLAGS_tst-cancelx14 += -fexceptions
  140. CFLAGS_tst-cancelx15 += -fexceptions
  141. CFLAGS_tst-cancelx16 += -fexceptions
  142. CFLAGS_tst-cancelx18 += -fexceptions
  143. CFLAGS_tst-cancelx20 += -fexceptions -fasynchronous-unwind-tables
  144. CFLAGS_tst-cancelx21 += -fexceptions -fasynchronous-unwind-tables
  145. CFLAGS_tst-cleanupx0 += -fexceptions -fasynchronous-unwind-tables
  146. CFLAGS_tst-cleanupx1 += -fexceptions -fasynchronous-unwind-tables
  147. CFLAGS_tst-cleanupx2 += -fexceptions
  148. CFLAGS_tst-cleanupx3 += -fexceptions
  149. CFLAGS_tst-oncex3 += -fexceptions
  150. CFLAGS_tst-oncex4 += -fexceptions
  151. CFLAGS_tst-align += $(stack-align-test-flags)
  152. CFLAGS_tst-align3 += $(stack-align-test-flags)
  153. CFLAGS_tst-initializers1 = -W -Wall -Werror
  154. CFLAGS_tst-sem11 += -fexceptions -fasynchronous-unwind-tables
  155. CFLAGS_tst-sem12 += -fexceptions -fasynchronous-unwind-tables
  156. CFLAGS_tst-initializers1 = -W -Wall -Werror
  157. CFLAGS_tst-initializers1-c89 = $(CFLAGS-tst-initializers1) -std=c89
  158. CFLAGS_tst-initializers1-c99 = $(CFLAGS-tst-initializers1) -std=c99
  159. CFLAGS_tst-initializers1-gnu89 = $(CFLAGS-tst-initializers1) -std=gnu89
  160. CFLAGS_tst-initializers1-gnu99 = $(CFLAGS-tst-initializers1) -std=gnu99
  161. EXTRA_LDFLAGS = $(if $(findstring -lpthread,$(LDFLAGS_$@)),,-lpthread)
  162. LDFLAGS_tst-atfork2 := -ldl -rdynamic
  163. LDFLAGS_tst-atfork2mod.so := -shared -static-libgcc -lpthread
  164. LDFLAGS_tst-cleanup4 := tst-cleanup4aux.o
  165. LDFLAGS_tst-cleanupx4 := tst-cleanup4aux.o
  166. LDFLAGS_tst-clock2 := -lrt
  167. LDFLAGS_tst-cond11 := -lrt
  168. LDFLAGS_tst-cond19 := -lrt
  169. LDFLAGS_tst-rwlock14 := -lrt
  170. LDFLAGS_tst-tls3 := -ldl -rdynamic
  171. LDFLAGS_tst-tls4 := -ldl
  172. LDFLAGS_tst-tls5 := tst-tls5mod.so
  173. LDFLAGS_tst-clock := -lrt
  174. LDFLAGS_tst-clock_nanosleep := -lrt
  175. LDFLAGS_tst-cpuclock1 := -lrt
  176. LDFLAGS_tst-cpuclock2 := -lrt -lpthread
  177. LDFLAGS_tst-cputimer1 := -lrt -lpthread
  178. LDFLAGS_tst-cputimer2 := -lrt -lpthread
  179. LDFLAGS_tst-cputimer3 := -lrt -lpthread
  180. LDFLAGS_tst-mqueue1 := -lrt
  181. LDFLAGS_tst-mqueue2 := -lrt
  182. LDFLAGS_tst-mqueue3 := -lrt -lpthread
  183. LDFLAGS_tst-mqueue4 := -lrt
  184. LDFLAGS_tst-mqueue5 := -lrt -lpthread
  185. LDFLAGS_tst-mqueue6 := -lrt -lpthread
  186. LDFLAGS_tst-mqueue7 := -lrt
  187. LDFLAGS_tst-mqueue8 := -lrt
  188. LDFLAGS_tst-mqueue9 := -lrt
  189. LDFLAGS_tst-timer2 := -lrt -lpthread
  190. LDFLAGS_tst-timer3 := -lrt -lpthread
  191. LDFLAGS_tst-timer4 := -lrt -lpthread
  192. LDFLAGS_tst-timer5 := -lrt -lpthread
  193. LDFLAGS_tst-dlsym1 := -ldl -rdynamic
  194. LDFLAGS_tst-tls3mod.so := -shared -static-libgcc -lpthread
  195. LDFLAGS_tst-tls4moda.so := -shared -static-libgcc
  196. LDFLAGS_tst-tls4modb.so := -shared -static-libgcc
  197. LDFLAGS_tst-tls5mod.so := -shared -static-libgcc -Wl,-soname,tst-tls5mod.so
  198. LDFLAGS_tst-tls5moda.so := -shared -static-libgcc
  199. LDFLAGS_tst-tls5modb.so := -shared -static-libgcc
  200. LDFLAGS_tst-tls5modc.so := -shared -static-libgcc
  201. LDFLAGS_tst-tls5modd.so := -shared -static-libgcc
  202. LDFLAGS_tst-tls5mode.so := -shared -static-libgcc
  203. LDFLAGS_tst-tls5modf.so := -shared -static-libgcc
  204. LDFLAGS_tst-cleanupx4 := tst-cleanup4aux.o
  205. #
  206. # Special case
  207. #
  208. tst-cleanup4aux.o:
  209. $(Q)$(CC) $(CFLAGS) $(CFLAGS_$@) $(EXTRA_CFLAGS) -c tst-cleanup4aux.c -o $@
  210. tst-cleanup4: tst-cleanup4aux.o
  211. tst-tls3: tst-tls3mod.so
  212. tst-tls4: tst-tls4moda.so tst-tls4modb.so
  213. tst-tls5: tst-tls5mod.so
  214. tst-cleanupx4 : tst-cleanup4aux.o
  215. tst-fini1: tst-fini1mod.so
  216. tst-atfork2: tst-atfork2mod.so
  217. tst-atfork2_glibc: tst-atfork2mod.so.glibc
  218. OPTS_tst-cancel7 = -c ./tst-cancel7
  219. OPTS_tst-mqueue7 = -- ./tst-mqueue7
  220. OPTS_tst-exec4 = ./tst-exec4
  221. WRAPPER := env LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)" TIMEOUTFACTOR=10