8a8cfb
commit 95da14dac04b494149290d85bc5306226e30839e
8a8cfb
Author: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
8a8cfb
Date:   Mon Jul 22 16:30:45 2019 -0300
8a8cfb
8a8cfb
    test-container: Avoid copying unintended system libraries
8a8cfb
    
8a8cfb
    Some DSOs are distributed in hardware capability directories, e.g.
8a8cfb
    /usr/lib64/power7/libc.so.6
8a8cfb
    Whenever the processor is able to use one of these hardware-enabled
8a8cfb
    DSOs, testroot.pristine ends up with copies of glibc-provided libraries
8a8cfb
    from the system because it can't overwrite or remove them.
8a8cfb
    
8a8cfb
    This patch avoids the unintended copies by executing ld.so with the same
8a8cfb
    arguments passed to each glibc test.
8a8cfb
    
8a8cfb
    	* Makefile (testroot.pristine/install.stamp): Execute ld.so with
8a8cfb
    	the same arguments used in all tests.
8a8cfb
8a8cfb
diff --git a/Makefile b/Makefile
8a8cfb
index dc5de7a..a4ed747 100644
8a8cfb
--- a/Makefile
8a8cfb
+++ b/Makefile
8a8cfb
@@ -383,7 +383,7 @@ $(objpfx)testroot.pristine/install.stamp :
8a8cfb
 ifeq ($(run-built-tests),yes)
8a8cfb
 	# Copy these DSOs first so we can overwrite them with our own.
8a8cfb
 	for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1  \
8a8cfb
-		$(objpfx)elf/$(rtld-installed-name) \
8a8cfb
+		$(rtld-prefix) \
8a8cfb
 		$(objpfx)testroot.pristine/bin/sh \
8a8cfb
 	        | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
8a8cfb
 	  do \
8a8cfb
@@ -392,7 +392,7 @@ ifeq ($(run-built-tests),yes)
8a8cfb
 	    $(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
8a8cfb
 	  done
8a8cfb
 	for dso in `$(test-wrapper-env) LD_TRACE_LOADED_OBJECTS=1  \
8a8cfb
-		$(objpfx)elf/$(rtld-installed-name) \
8a8cfb
+		$(rtld-prefix) \
8a8cfb
 		$(objpfx)support/$(LINKS_DSO_PROGRAM) \
8a8cfb
 	        | grep / | sed 's/^[^/]*//' | sed 's/ .*//'` ;\
8a8cfb
 	  do \