[git commit nptl] test: fix static build of nptl and tls tests
Austin Foxley
austinf at cetoncorp.com
Fri Jan 22 12:57:32 UTC 2010
commit: http://git.uclibc.org/uClibc/commit/?id=47fd3a30139335207002481f747747e4e2a5bbb0
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl
also add needed -lpthread lines to timer_* tests,
since the implementation uses pthread functions
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
test/nptl/Makefile.in | 33 +++++++++++++++++++--------------
test/tls/Makefile.in | 6 ++++++
2 files changed, 25 insertions(+), 14 deletions(-)
diff --git a/test/nptl/Makefile.in b/test/nptl/Makefile.in
index c6d832b..0bca63b 100644
--- a/test/nptl/Makefile.in
+++ b/test/nptl/Makefile.in
@@ -43,15 +43,20 @@ TESTS += tst-clock tst-clock_nanosleep tst-cpuclock1 tst-cpuclock2 \
tst-timer4 tst-timer5
ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),)
-TESTS_DISABLED := tst-exec2 tst-exec3 tst-exec4
+TESTS_DISABLED += tst-exec2 tst-exec3 tst-exec4
endif
GLIBC_TESTS_DISABLED := tst-eintr1_glibc tst-eintr2_glibc \
tst-eintr3_glibc tst-eintr4_glibc tst-eintr5_glibc \
- tst-tls1_glibc tst-tls2_glibc tst-tls3_glibc \
- tst-tls4_glibc tst-tls5_glibc
+ tst-tls1_glibc tst-tls2_glibc
+ifeq ($(HAVE_SHARED),)
+TESTS_DISABLED += tst-tls3 tst-tls4 tst-tls5
+else
+GLIBC_TESTS_DISABLED += tst-tls3_glibc tst-tls4_glibc tst-tls5_glibc
+endif
+
PTDIR := $(top_builddir)libpthread/nptl
EXTRA_CFLAGS := -DNOT_IN_libc=1 -D_LIBC -D__USE_GNU -std=gnu99 \
@@ -101,23 +106,23 @@ LDFLAGS_tst-tls5 := tst-tls5mod.so
LDFLAGS_tst-clock := -lrt
LDFLAGS_tst-clock_nanosleep := -lrt
LDFLAGS_tst-cpuclock1 := -lrt
-LDFLAGS_tst-cpuclock2 := -lrt
-LDFLAGS_tst-cputimer1 := -lrt
-LDFLAGS_tst-cputimer2 := -lrt
-LDFLAGS_tst-cputimer3 := -lrt
+LDFLAGS_tst-cpuclock2 := -lrt -lpthread
+LDFLAGS_tst-cputimer1 := -lrt -lpthread
+LDFLAGS_tst-cputimer2 := -lrt -lpthread
+LDFLAGS_tst-cputimer3 := -lrt -lpthread
LDFLAGS_tst-mqueue1 := -lrt
LDFLAGS_tst-mqueue2 := -lrt
-LDFLAGS_tst-mqueue3 := -lrt
+LDFLAGS_tst-mqueue3 := -lrt -lpthread
LDFLAGS_tst-mqueue4 := -lrt
-LDFLAGS_tst-mqueue5 := -lrt
-LDFLAGS_tst-mqueue6 := -lrt
+LDFLAGS_tst-mqueue5 := -lrt -lpthread
+LDFLAGS_tst-mqueue6 := -lrt -lpthread
LDFLAGS_tst-mqueue7 := -lrt
LDFLAGS_tst-mqueue8 := -lrt
LDFLAGS_tst-mqueue9 := -lrt
-LDFLAGS_tst-timer2 := -lrt
-LDFLAGS_tst-timer3 := -lrt
-LDFLAGS_tst-timer4 := -lrt
-LDFLAGS_tst-timer5 := -lrt
+LDFLAGS_tst-timer2 := -lrt -lpthread
+LDFLAGS_tst-timer3 := -lrt -lpthread
+LDFLAGS_tst-timer4 := -lrt -lpthread
+LDFLAGS_tst-timer5 := -lrt -lpthread
LDFLAGS_tst-tls3mod.so := -shared -static-libgcc -lpthread
LDFLAGS_tst-tls4moda.so := -shared -static-libgcc
LDFLAGS_tst-tls4modb.so := -shared -static-libgcc
diff --git a/test/tls/Makefile.in b/test/tls/Makefile.in
index 69a8eaf..839824d 100644
--- a/test/tls/Makefile.in
+++ b/test/tls/Makefile.in
@@ -7,10 +7,16 @@ TESTS := tst-tls1 tst-tls2 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 \
tst-tls1-static tst-tls2-static tst-tls9-static
TESTS_DISABLED := tst-tls1-static tst-tls2-static tst-tls9-static
+#all these tests require shared libraries
+ifeq ($(HAVE_SHARED),)
+TESTS_DISABLED := $(TESTS)
+endif
+
# All these tests need tls.h, which is not installed with glibc
GLIBC_TESTS_DISABLED := $(addsuffix _glibc,$(filter-out $(TESTS_DISABLED),$(TESTS)))
+
PTDIR := $(top_builddir)libpthread/nptl
EXTRA_CFLAGS := -DNOT_IN_libc=1 \
--
1.6.3.3
More information about the uClibc-cvs
mailing list