This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Run ld.so tests only if $(build-shared) is yes
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 10 Sep 2012 06:06:29 -0700
- Subject: [PATCH] Run ld.so tests only if $(build-shared) is yes
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
We should run ld.so tests only if $(build-shared) is yes. OK to
install?
Thanks.
H.J.
----
* elf/Makefile (tests): Add tst-tls9, $(objpfx)noload-mem
and $(objpfx)tst-unused-dep.out only if $(build-shared) is yes.
* sysdeps/x86_64/Makefile (tests): Add tst-quad1, tst-quad2,
$(objpfx)tst-xmmymm.out only if $(build-shared) is yes.
diff --git a/elf/Makefile b/elf/Makefile
index b999376..4e9d64f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -112,7 +112,10 @@ $(inst_auditdir)/sotruss-lib.so: $(objpfx)sotruss-lib.so $(+force)
$(do-install-program)
endif
-tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1
+tests = tst-tls1 tst-tls2 tst-leaks1
+ifeq (yes,$(build-shared))
+tests += tst-tls9
+endif
ifeq (yes,$(have-initfini-array))
tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
endif
@@ -158,7 +161,10 @@ endif
endif
endif
ifeq ($(cross-compiling),no)
-tests: $(objpfx)tst-leaks1-mem $(objpfx)noload-mem
+tests: $(objpfx)tst-leaks1-mem
+ifeq (yes,$(build-shared))
+tests: $(objpfx)noload-mem
+endif
endif
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
@@ -1161,7 +1167,7 @@ $(objpfx)tst-relsort1mod2.so: $(libm)
$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
$(objpfx)tst-relsort1mod2.so
-ifeq ($(cross-compiling),no)
+ifeq ($(cross-compiling)$(build-shared),noyes)
tests: $(objpfx)tst-unused-dep.out
endif
diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile
index d4525bc..0c4f345 100644
--- a/sysdeps/x86_64/Makefile
+++ b/sysdeps/x86_64/Makefile
@@ -25,20 +25,26 @@ sysdep-dl-routines += tlsdesc dl-tlsdesc
sysdep_routines += tlsdesc dl-tlsdesc
sysdep-rtld-routines += tlsdesc dl-tlsdesc
+ifeq (yes,$(build-shared))
tests += tst-quad1 tst-quad2
+endif
modules-names += tst-quadmod1 tst-quadmod2
$(objpfx)tst-quad1: $(objpfx)tst-quadmod1.so
$(objpfx)tst-quad2: $(objpfx)tst-quadmod2.so
quad-pie-test += tst-quad1pie tst-quad2pie
+ifeq (yes,$(build-shared))
tests += $(quad-pie-test)
+endif
tests-pie += $(quad-pie-test)
$(objpfx)tst-quad1pie: $(objpfx)tst-quadmod1pie.o
$(objpfx)tst-quad2pie: $(objpfx)tst-quadmod2pie.o
+ifeq (yes,$(build-shared))
tests: $(objpfx)tst-xmmymm.out
+endif
$(objpfx)tst-xmmymm.out: ../sysdeps/x86_64/tst-xmmymm.sh $(objpfx)ld.so
@echo "Checking ld.so for SSE register use. This will take a few seconds..."
$(SHELL) -e $< $(objpfx) > $@