Add two patches agains glibc-2_9 to (try to) build for SuperH.
/trunk/patches/glibc/2_9/510-sh-no-asm-user-header.patch | 70 70 0 0 ++++++++++++++++++++++
/trunk/patches/glibc/2_9/520-sh-no-asm-elf-header.patch | 27 27 0 0 ++++++++
2 files changed, 97 insertions(+)
1 Original patch from: gentoo/src/patchsets/glibc/2.9/3020_all_glibc-tests-sandbox-libdl-paths.patch
3 -= BEGIN original header =-
4 when glibc runs its tests, it does so by invoking the local library loader.
5 in Gentoo, we build/run inside of our "sandbox" which itself is linked against
6 libdl (so that it can load libraries and pull out symbols). the trouble
7 is that when you upgrade from an older glibc to the new one, often times
8 internal symbols change name or abi. this is normally OK as you cannot use
9 libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so
10 we always say "keep all of the glibc libraries from the same build". but
11 when glibc runs its tests, it uses dynamic paths to point to its new local
12 copies of libraries. if the test doesnt use libdl, then glibc doesnt add
13 its path, and when sandbox triggers the loading of libdl, glibc does so
14 from the host system system. this gets us into the case of all libraries
15 are from the locally compiled version of glibc except for libdl.so.
19 http://bugs.gentoo.org/56898
21 -= END original header =-
23 diff -durN glibc-2_9.orig/grp/tst_fgetgrent.sh glibc-2_9/grp/tst_fgetgrent.sh
24 --- glibc-2_9.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200
25 +++ glibc-2_9/grp/tst_fgetgrent.sh 2009-02-02 22:01:23.000000000 +0100
27 rtld_installed_name=$1; shift
29 testout=${common_objpfx}/grp/tst_fgetgrent.out
30 -library_path=${common_objpfx}
31 +# make sure libdl is also in path in case sandbox is in use
32 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
36 diff -durN glibc-2_9.orig/iconvdata/run-iconv-test.sh glibc-2_9/iconvdata/run-iconv-test.sh
37 --- glibc-2_9.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200
38 +++ glibc-2_9/iconvdata/run-iconv-test.sh 2009-02-02 22:01:23.000000000 +0100
42 # We have to have some directories in the library path.
43 -LIBPATH=$codir:$codir/iconvdata
44 +LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn
46 # How the start the iconv(1) program.
47 ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \
48 diff -durN glibc-2_9.orig/iconvdata/tst-table.sh glibc-2_9/iconvdata/tst-table.sh
49 --- glibc-2_9.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200
50 +++ glibc-2_9/iconvdata/tst-table.sh 2009-02-02 22:01:23.000000000 +0100
52 irreversible=${charset}.irreversible
55 +# make sure libdl is also in path in case sandbox is in use
56 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
58 # iconv in one direction.
59 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
60 +${common_objpfx}elf/ld.so --library-path $library_path \
61 ${objpfx}tst-table-from ${charset} \
62 > ${objpfx}tst-${charset}.table
64 diff -durN glibc-2_9.orig/intl/tst-codeset.sh glibc-2_9/intl/tst-codeset.sh
65 --- glibc-2_9.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200
66 +++ glibc-2_9/intl/tst-codeset.sh 2009-02-02 22:01:23.000000000 +0100
68 LOCPATH=${common_objpfx}localedata
71 +# make sure libdl is also in path in case sandbox is in use
72 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
74 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
75 ${objpfx}tst-codeset > ${objpfx}tst-codeset.out
77 diff -durN glibc-2_9.orig/intl/tst-gettext.sh glibc-2_9/intl/tst-gettext.sh
78 --- glibc-2_9.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200
79 +++ glibc-2_9/intl/tst-gettext.sh 2009-02-02 22:01:23.000000000 +0100
81 LOCPATH=${common_objpfx}localedata
84 +# make sure libdl is also in path in case sandbox is in use
85 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
88 MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \
89 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
90 +${common_objpfx}elf/ld.so --library-path $library_path \
91 ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir
94 diff -durN glibc-2_9.orig/intl/tst-gettext2.sh glibc-2_9/intl/tst-gettext2.sh
95 --- glibc-2_9.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200
96 +++ glibc-2_9/intl/tst-gettext2.sh 2009-02-02 22:01:23.000000000 +0100
98 LOCPATH=${objpfx}domaindir
101 +# make sure libdl is also in path in case sandbox is in use
102 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
105 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
106 +${common_objpfx}elf/ld.so --library-path $library_path \
107 ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir &&
108 cmp ${objpfx}tst-gettext2.out - <<EOF
109 String1 - Lang1: 1st string
110 diff -durN glibc-2_9.orig/intl/tst-translit.sh glibc-2_9/intl/tst-translit.sh
111 --- glibc-2_9.orig/intl/tst-translit.sh 2005-05-04 19:56:10.000000000 +0200
112 +++ glibc-2_9/intl/tst-translit.sh 2009-02-02 22:01:23.000000000 +0100
114 LOCPATH=${common_objpfx}localedata
117 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
118 +# make sure libdl is also in path in case sandbox is in use
119 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
121 +${common_objpfx}elf/ld.so --library-path $library_path \
122 ${objpfx}tst-translit > ${objpfx}tst-translit.out ${objpfx}domaindir
125 diff -durN glibc-2_9.orig/malloc/tst-mtrace.sh glibc-2_9/malloc/tst-mtrace.sh
126 --- glibc-2_9.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200
127 +++ glibc-2_9/malloc/tst-mtrace.sh 2009-02-02 22:01:23.000000000 +0100
130 trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
132 +# make sure libdl is also in path in case sandbox is in use
133 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
135 MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
136 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
137 -${common_objpfx}elf/ld.so --library-path $common_objpfx \
138 +${common_objpfx}elf/ld.so --library-path $library_path \
139 ${common_objpfx}malloc/tst-mtrace || status=1
141 if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
142 diff -durN glibc-2_9.orig/nptl/tst-tls6.sh glibc-2_9/nptl/tst-tls6.sh
143 --- glibc-2_9.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200
144 +++ glibc-2_9/nptl/tst-tls6.sh 2009-02-02 22:01:23.000000000 +0100
146 rtld_installed_name=$1; shift
147 logfile=$common_objpfx/nptl/tst-tls6.out
149 -# We have to find libc and nptl
150 -library_path=${common_objpfx}:${common_objpfx}nptl
151 +# We have to find libc and nptl (also libdl in case sandbox is in use)
152 +library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn
153 tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
154 ${common_objpfx}/nptl/tst-tls5"
156 diff -durN glibc-2_9.orig/posix/globtest.sh glibc-2_9/posix/globtest.sh
157 --- glibc-2_9.orig/posix/globtest.sh 2007-02-14 20:52:33.000000000 +0100
158 +++ glibc-2_9/posix/globtest.sh 2009-02-02 22:01:23.000000000 +0100
162 # We have to find the libc and the NSS modules.
163 -library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod
164 +library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn
166 # Since we use `sort' we must make sure to use the same locale everywhere.
168 diff -durN glibc-2_9.orig/posix/tst-getconf.sh glibc-2_9/posix/tst-getconf.sh
169 --- glibc-2_9.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200
170 +++ glibc-2_9/posix/tst-getconf.sh 2009-02-02 22:01:23.000000000 +0100
173 rtld_installed_name=$1; shift
175 - ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@"
177 + # make sure libdl is also in path in case sandbox is in use
178 + library_path=${common_objpfx}:${common_objpfx}/dlfcn
179 + ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@"
183 diff -durN glibc-2_9.orig/posix/wordexp-tst.sh glibc-2_9/posix/wordexp-tst.sh
184 --- glibc-2_9.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200
185 +++ glibc-2_9/posix/wordexp-tst.sh 2009-02-02 22:01:23.000000000 +0100
190 +# make sure libdl is also in path in case sandbox is in use
191 +library_path=${common_objpfx}:${common_objpfx}/dlfcn
194 -${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \
195 +${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \
196 ${common_objpfx}posix/wordexp-test '$*' > ${testout}1
197 cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1