Support for testing static binaries
H . J . Lu
hjl@valinux.com
Fri Sep 1 07:54:00 GMT 2000
This patch adds the support for testing static binaries even when
shared library is enabled. It is useful to check static linking.
--
H.J. Lu (hjl@gnu.org)
---
2000-09-01 H.J. Lu <hjl@gnu.org>
* Makeconfig (built-program-cmd): Don't use the dynamic linker
to run a binary if it is in $(tests-static).
* Rules (binaries-static): Add $(tests-static).
Index: Makeconfig
===================================================================
RCS file: /work/cvs/gnu/glibc/Makeconfig,v
retrieving revision 1.1.1.9
diff -u -p -r1.1.1.9 Makeconfig
--- Makeconfig 2000/08/26 01:11:19 1.1.1.9
+++ Makeconfig 2000/08/26 01:14:30
@@ -495,8 +495,12 @@ sysdep-library-path = \
$(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
$(filter -Wl$(comma)-rpath-link=%,\
$(sysdep-LDFLAGS)))))
+ifeq (,$(findstring $(notdir $(built-program-file)), $(tests-static)))
run-program-prefix = $(elf-objpfx)$(rtld-installed-name) \
--library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path))
+else
+run-program-prefix =
+endif
else
run-program-prefix =
endif
Index: Rules
===================================================================
RCS file: /work/cvs/gnu/glibc/Rules,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 Rules
--- Rules 2000/07/29 16:19:49 1.1.1.4
+++ Rules 2000/07/29 16:29:31
@@ -96,7 +96,7 @@ endif
ifeq ($(build-programs),yes)
binaries-all = $(others) $(sysdep-others) $(tests) $(test-srcs)
-binaries-static = $(others-static)
+binaries-static = $(others-static) $(tests-static)
else
binaries-all = $(tests) $(test-srcs)
binaries-static =
More information about the Libc-hacker
mailing list