summaryrefslogtreecommitdiff
blob: 1bc7be2c7454043c40eee7c313e5ee578fe30a24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From a4ec232302f8b30f6fc7eb7a53aadf99b3fad312 Mon Sep 17 00:00:00 2001
From: "Stephanie J. Lockwood-Childs" <wormo@gentoo.org>
Date: Tue, 13 Mar 2007 01:57:21 -0400
Subject: [PATCH 02/12] Gentoo: support running tests under sandbox

when glibc runs its tests, it does so by invoking the local library loader.
in Gentoo, we build/run inside of our "sandbox" which itself is linked against
libdl (so that it can load libraries and pull out symbols).  the trouble
is that when you upgrade from an older glibc to the new one, often times
internal symbols change name or abi.  this is normally OK as you cannot use
libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
we always say "keep all of the glibc libraries from the same build".  but
when glibc runs its tests, it uses dynamic paths to point to its new local
copies of libraries.  if the test doesnt use libdl, then glibc doesnt add
its path, and when sandbox triggers the loading of libdl, glibc does so
from the host system system.  this gets us into the case of all libraries
are from the locally compiled version of glibc except for libdl.so.

http://bugs.gentoo.org/56898
---
 Makeconfig                  | 2 +-
 iconvdata/run-iconv-test.sh | 2 +-
 nptl/tst-tls6.sh            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makeconfig b/Makeconfig
index f252842979..5076902c87 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -728,7 +728,7 @@ comma = ,
 sysdep-library-path = \
 $(subst $(empty) ,:,$(strip $(patsubst -Wl$(comma)-rpath-link=%, %,\
 				       $(filter -Wl$(comma)-rpath-link=%,\
-						$(sysdep-LDFLAGS)))))
+						$(sysdep-LDFLAGS)))) $(common-objpfx)/dlfcn)
 # $(run-via-rtld-prefix) is a command that, when prepended to the name
 # of a program built with the newly built library, produces a command
 # that, executed on the host for which the library is built, runs that
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh
index 56b6630a6d..be74dbf302 100755
--- a/iconvdata/run-iconv-test.sh
+++ b/iconvdata/run-iconv-test.sh
@@ -31,7 +31,7 @@ temp2=$codir/iconvdata/iconv-test.yyy
 trap "rm -f $temp1 $temp2" 1 2 3 15
 
 # We have to have some directories in the library path.
-LIBPATH=$codir:$codir/iconvdata
+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
 
 # How the start the iconv(1) program.
 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
diff --git a/nptl/tst-tls6.sh b/nptl/tst-tls6.sh
index e6dc20572a..a25b167b2d 100755
--- a/nptl/tst-tls6.sh
+++ b/nptl/tst-tls6.sh
@@ -26,7 +26,7 @@ run_program_env=$1; shift
 logfile=$common_objpfx/nptl/tst-tls6.out
 
 # We have to find libc and nptl
-library_path=${common_objpfx}:${common_objpfx}nptl
+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
 tst_tls5="${test_via_rtld_prefix} ${common_objpfx}/nptl/tst-tls5"
 
 > $logfile
-- 
2.26.2