Makefile.in 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. # uClibc-ng TLS tests
  2. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  3. TESTS := tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 \
  4. tst-tls8 tst-tls9 tst-tls10 tst-tls11 tst-tls12 tst-tls13 \
  5. tst-tls14 tst-tls15 tst-tls16 tst-tls17 tst-tls18 tst-tls-at-ctor \
  6. tst-tls1-static tst-tls2-static tst-tls9-static
  7. TESTS_DISABLED := tst-tls1-static tst-tls2-static tst-tls9-static
  8. # test always fails for every architecture,
  9. # guessing some unimplemented check or feature
  10. TESTS_DISABLED += tst-tls16
  11. tlsmod17a-suffixes := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  12. tlsmod18a-suffixes := 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  13. CFLAGS_tst-tlsmod1.so := -fPIC -DSHARED -shared
  14. CFLAGS_tst-tlsmod2.so := -fPIC -DSHARED -shared
  15. CFLAGS_tst-tlsmod3.so := -fPIC -DSHARED -shared
  16. CFLAGS_tst-tlsmod4.so := -fPIC -DSHARED -shared
  17. CFLAGS_tst-tlsmod5.so := -fPIC -DSHARED -shared
  18. CFLAGS_tst-tlsmod6.so := -fPIC -DSHARED -shared
  19. CFLAGS_tst-tlsmod7.so := -fPIC -DSHARED -shared
  20. CFLAGS_tst-tlsmod8.so := -fPIC -DSHARED -shared
  21. CFLAGS_tst-tlsmod9.so := -fPIC -DSHARED -shared
  22. CFLAGS_tst-tlsmod10.so := -fPIC -DSHARED -shared
  23. CFLAGS_tst-tlsmod11.so := -fPIC -DSHARED -shared
  24. CFLAGS_tst-tlsmod12.so := -fPIC -DSHARED -shared
  25. CFLAGS_tst-tlsmod13.so := -fPIC -DSHARED -shared
  26. CFLAGS_tst-tlsmod13a.so := -fPIC -DSHARED -shared
  27. CFLAGS_tst-tlsmod14a.so := -fPIC -DSHARED -shared
  28. CFLAGS_tst-tlsmod14b.so := -fPIC -DSHARED -shared
  29. CFLAGS_tst-tlsmod15a.so := -fPIC -DSHARED -shared
  30. CFLAGS_tst-tlsmod15b.so := -fPIC -DSHARED -shared
  31. CFLAGS_tst-tlsmod16a.so := -fPIC -DSHARED -shared
  32. CFLAGS_tst-tlsmod16b.so := -fPIC -DSHARED -shared
  33. CFLAGS_tst-tlsmod17a.so := -fPIC -DSHARED -shared
  34. CFLAGS_tst-tlsmod17b.so := -fPIC -DSHARED -shared
  35. CFLAGS_tst-tlsmod18a.so := -fPIC -DSHARED -shared
  36. CFLAGS_tst-tlsmod-at-ctor.so := -fPIC -DSHARED -shared
  37. LDFLAGS_tst-tlsmod1.so := -shared -static-libgcc -L$(top_builddir)lib
  38. LDFLAGS_tst-tlsmod2.so := -shared -static-libgcc -L$(top_builddir)lib
  39. LDFLAGS_tst-tlsmod3.so := -shared -static-libgcc -L$(top_builddir)lib \
  40. tst-tlsmod2.so
  41. LDFLAGS_tst-tlsmod4.so := -shared -static-libgcc -L$(top_builddir)lib
  42. LDFLAGS_tst-tlsmod5.so := -shared -static-libgcc -L$(top_builddir)lib
  43. LDFLAGS_tst-tlsmod6.so := -shared -static-libgcc -L$(top_builddir)lib
  44. LDFLAGS_tst-tlsmod7.so := -shared -static-libgcc -L$(top_builddir)lib
  45. LDFLAGS_tst-tlsmod8.so := -shared -static-libgcc -L$(top_builddir)lib \
  46. tst-tlsmod7.so
  47. LDFLAGS_tst-tlsmod9.so := -shared -static-libgcc -L$(top_builddir)lib \
  48. tst-tlsmod8.so
  49. LDFLAGS_tst-tlsmod10.so := -shared -static-libgcc -L$(top_builddir)lib \
  50. tst-tlsmod9.so
  51. LDFLAGS_tst-tlsmod11.so := -shared -static-libgcc -L$(top_builddir)lib
  52. LDFLAGS_tst-tlsmod12.so := -shared -static-libgcc -L$(top_builddir)lib \
  53. tst-tlsmod11.so
  54. LDFLAGS_tst-tlsmod13.so := -shared -static-libgcc -L$(top_builddir)lib
  55. LDFLAGS_tst-tlsmod13a.so := -shared -static-libgcc -L$(top_builddir)lib \
  56. tst-tlsmod13.so
  57. LDFLAGS_tst-tlsmod14a.so := -shared -static-libgcc -L$(top_builddir)lib
  58. LDFLAGS_tst-tlsmod14b.so := -shared -static-libgcc -L$(top_builddir)lib
  59. LDFLAGS_tst-tlsmod15a.so := -shared -static-libgcc -L$(top_builddir)lib
  60. LDFLAGS_tst-tlsmod15b.so := -shared -static-libgcc -L$(top_builddir)lib
  61. LDFLAGS_tst-tlsmod16a.so := -shared -static-libgcc -L$(top_builddir)lib
  62. LDFLAGS_tst-tlsmod16b.so := -shared -static-libgcc -L$(top_builddir)lib
  63. LDFLAGS_tst-tlsmod17a.so := -shared -static-libgcc -L$(top_builddir)lib
  64. LDFLAGS_tst-tlsmod17b.so := -shared -static-libgcc -L$(top_builddir)lib \
  65. $(patsubst %,tst-tlsmod17a%.so,$(tlsmod17a-suffixes))
  66. LDFLAGS_tst-tlsmod18a.so := -shared -static-libgcc -L$(top_builddir)lib
  67. LDFLAGS_tst-tlsmod-at-ctor.so := -shared -static-libgcc -L$(top_builddir)lib
  68. LDFLAGS_tst-tls3 := tst-tlsmod1.so tst-tlsmod4.so
  69. LDFLAGS_tst-tls4 := -ldl
  70. LDFLAGS_tst-tls5 := -ldl
  71. LDFLAGS_tst-tls6 := -ldl
  72. LDFLAGS_tst-tls7 := -ldl
  73. LDFLAGS_tst-tls8 := -ldl
  74. LDFLAGS_tst-tls9 := -ldl
  75. LDFLAGS_tst-tls10 := -Wl,-rpath-link=. tst-tlsmod8.so tst-tlsmod7.so
  76. LDFLAGS_tst-tls11 := -Wl,-rpath-link=. tst-tlsmod9.so tst-tlsmod10.so
  77. LDFLAGS_tst-tls12 := -Wl,-rpath-link=. tst-tlsmod11.so tst-tlsmod12.so
  78. LDFLAGS_tst-tls13 := -ldl -Wl,-rpath-link=.
  79. LDFLAGS_tst-tls14 := -ldl -Wl,-rpath-link=. tst-tlsmod14a.so
  80. LDFLAGS_tst-tls15 := -ldl -Wl,-rpath-link=.
  81. LDFLAGS_tst-tls16 := -ldl -Wl,-rpath-link=.
  82. LDFLAGS_tst-tls17 := -ldl -Wl,-rpath-link=.
  83. LDFLAGS_tst-tls18 := -ldl -Wl,-rpath-link=.
  84. LDFLAGS_tst-tls-at-ctor := tst-tlsmod-at-ctor.so
  85. tst-tlsmod3.so: tst-tlsmod2.so
  86. tst-tlsmod4.so: tst-tlsmod3.so
  87. tst-tlsmod6.so: tst-tlsmod5.so
  88. tst-tlsmod8.so: tst-tlsmod7.so
  89. tst-tlsmod9.so: tst-tlsmod8.so
  90. tst-tlsmod10.so: tst-tlsmod9.so
  91. tst-tlsmod12.so: tst-tlsmod11.so
  92. tst-tlsmod13a.so: tst-tlsmod13.so
  93. tst-tlsmod14b.so: tst-tlsmod14a.so
  94. tst-tlsmod16b.so: tst-tlsmod16a.so
  95. tst-tls3: tst-tlsmod1.so tst-tlsmod4.so
  96. tst-tls4: tst-tlsmod2.so
  97. tst-tls5: tst-tlsmod2.so
  98. tst-tls6: tst-tlsmod2.so
  99. tst-tls7: tst-tlsmod2.so tst-tlsmod3.so
  100. tst-tls8: tst-tlsmod2.so tst-tlsmod3.so tst-tlsmod4.so
  101. tst-tls9: tst-tlsmod5.so tst-tlsmod6.so
  102. tst-tls10: tst-tlsmod7.so tst-tlsmod8.so
  103. tst-tls11: tst-tlsmod9.so tst-tlsmod10.so
  104. tst-tls12: tst-tlsmod11.so tst-tlsmod12.so
  105. tst-tls13: tst-tlsmod13.so tst-tlsmod13a.so
  106. tst-tls14: tst-tlsmod14a.so tst-tlsmod14b.so
  107. tst-tls15: tst-tlsmod15b.so
  108. tst-tls16: tst-tlsmod16a.so tst-tlsmod16b.so
  109. tst-tls17: tst-tlsmod17b.so
  110. tst-tlsmod17b.so: $(patsubst %,tst-tlsmod17a%.so,$(tlsmod17a-suffixes))
  111. tst-tlsmod17a%.so: tst-tlsmod17a.c
  112. $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_tst-tlsmod17a.so) $< -o $@ \
  113. -DN=$* -Wl,-soname,$@ $(LDFLAGS) $(EXTRA_LIBS) \
  114. $(LDFLAGS_tst-tlsmod17a.so)
  115. tst-tls18: $(patsubst %,tst-tlsmod18a%.so,$(tlsmod18a-suffixes))
  116. tst-tlsmod18a%.so: tst-tlsmod18a.c
  117. $(Q)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_tst-tlsmod18a.so) $< -o $@ \
  118. -DN=$* -Wl,-soname,$@ $(LDFLAGS) $(EXTRA_LIBS) \
  119. $(LDFLAGS_tst-tlsmod18a.so)
  120. tst-tls-at-ctor: tst-tlsmod-at-ctor.so
  121. ifeq ($(TARGET_ARCH),mips)
  122. RET_tst-tls15 := 1
  123. endif
  124. WRAPPER := env LD_LIBRARY_PATH="$$PWD:.:$(LD_LIBRARY_PATH)"