Initial revision
[openwrt.git] / toolchain / gdb / 6.1.1 / 100-uclibc-conf.patch
1 diff -urN gdb-6.1.1-dist/bfd/config.bfd gdb-6.1.1/bfd/config.bfd
2 --- gdb-6.1.1-dist/bfd/config.bfd       2004-03-13 06:37:09.000000000 -0600
3 +++ gdb-6.1.1/bfd/config.bfd    2004-08-08 05:01:47.000000000 -0500
4 @@ -121,7 +121,7 @@
5      targ_defvec=ecoffalpha_little_vec
6      targ_selvecs=bfd_elf64_alpha_vec
7      ;;
8 -  alpha*-*-linux-gnu* | alpha*-*-elf*)
9 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
10      targ_defvec=bfd_elf64_alpha_vec
11      targ_selvecs=ecoffalpha_little_vec
12      ;;
13 @@ -131,7 +131,7 @@
14    alpha*-*-*)
15      targ_defvec=ecoffalpha_little_vec
16      ;;
17 -  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
18 +  ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu | ia64*-*-linux-uclibc*)
19      targ_defvec=bfd_elf64_ia64_little_vec
20      targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
21      ;;
22 @@ -208,7 +208,7 @@
23      targ_defvec=bfd_elf32_littlearm_vec
24      targ_selvecs=bfd_elf32_bigarm_vec
25      ;;
26 -  armeb-*-elf | arm*b-*-linux-gnu*)
27 +  armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
28      targ_defvec=bfd_elf32_bigarm_vec
29      targ_selvecs=bfd_elf32_littlearm_vec
30      ;;
31 @@ -216,7 +216,7 @@
32      targ_defvec=bfd_elf32_littlearm_vec
33      targ_selvecs=bfd_elf32_bigarm_vec
34      ;;
35 -  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
36 +  arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
37    arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
38      targ_defvec=bfd_elf32_littlearm_vec
39      targ_selvecs=bfd_elf32_bigarm_vec
40 @@ -350,7 +350,7 @@
41      ;;
42  
43  #ifdef BFD64
44 -  hppa*64*-*-linux-gnu*)
45 +  hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
46      targ_defvec=bfd_elf64_hppa_linux_vec
47      targ_selvecs=bfd_elf64_hppa_vec
48      ;;
49 @@ -361,7 +361,7 @@
50      ;;
51  #endif
52  
53 -  hppa*-*-linux-gnu* | hppa*-*-netbsd*)
54 +  hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
55      targ_defvec=bfd_elf32_hppa_linux_vec
56      targ_selvecs=bfd_elf32_hppa_vec
57      ;;
58 @@ -483,7 +483,7 @@
59      targ_selvecs=bfd_elf32_i386_vec
60      targ_underscore=yes
61      ;;
62 -  i[3-7]86-*-linux-gnu*)
63 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
64      targ_defvec=bfd_elf32_i386_vec
65      targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
66      targ64_selvecs=bfd_elf64_x86_64_vec
67 @@ -497,7 +497,7 @@
68      targ_defvec=bfd_elf64_x86_64_vec
69      targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
70      ;;
71 -  x86_64-*-linux-gnu*)
72 +  x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
73      targ_defvec=bfd_elf64_x86_64_vec
74      targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
75      ;;
76 @@ -667,7 +667,7 @@
77      targ_defvec=hp300hpux_vec
78      targ_underscore=yes
79      ;;
80 -  m68*-*-linux*aout*)
81 +  m68*-*-linux*aout* | m68*-*-linux-uclibc*)
82      targ_defvec=m68klinux_vec
83      targ_selvecs=bfd_elf32_m68k_vec
84      targ_underscore=yes
85 @@ -952,8 +952,8 @@
86      ;;
87  #endif
88    powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
89 -  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
90 -  powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
91 +  powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | powerpc-*-rtems* | \
92 +  powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss* )
93      targ_defvec=bfd_elf32_powerpc_vec
94      targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
95      targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
96 @@ -984,8 +984,8 @@
97      targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
98      ;;
99    powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
100 -  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
101 -  powerpcle-*-rtems*)
102 +  powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* | \
103 +  powerpcle-*-vxworks* | powerpcle-*-rtems*)
104      targ_defvec=bfd_elf32_powerpcle_vec
105      targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
106      targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
107 @@ -1141,7 +1141,7 @@
108      targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
109      targ_underscore=yes
110      ;;
111 -  sparc-*-linux-gnu*)
112 +  sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
113      targ_defvec=bfd_elf32_sparc_vec
114      targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
115      ;;
116 @@ -1188,7 +1188,7 @@
117      targ_defvec=sunos_big_vec
118      targ_underscore=yes
119      ;;
120 -  sparc64-*-linux-gnu*)
121 +  sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
122      targ_defvec=bfd_elf64_sparc_vec
123      targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
124      ;;
125 @@ -1257,7 +1257,7 @@
126      targ_underscore=yes
127      ;;
128  
129 -  vax-*-linux-gnu*)
130 +  vax-*-linux-gnu* | vax-*-linux-uclibc*)
131      targ_defvec=bfd_elf32_vax_vec
132      ;;
133  
134 diff -urN gdb-6.1.1-dist/bfd/configure gdb-6.1.1/bfd/configure
135 --- gdb-6.1.1-dist/bfd/configure        2004-03-13 06:37:09.000000000 -0600
136 +++ gdb-6.1.1/bfd/configure     2004-08-08 05:01:47.000000000 -0500
137 @@ -1710,6 +1710,11 @@
138    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
139    ;;
140  
141 +linux-uclibc*)
142 +  lt_cv_deplibs_check_method=pass_all
143 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
144 +  ;;
145 +
146  netbsd*)
147    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
148      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
149 @@ -5276,7 +5281,7 @@
150    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
151         COREFILE=''
152         ;;
153 -  alpha*-*-linux-gnu*)
154 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
155         COREFILE=trad-core.lo
156         TRAD_HEADER='"hosts/alphalinux.h"'
157         ;;
158 @@ -5336,7 +5341,7 @@
159         COREFILE=trad-core.lo
160         TRAD_HEADER='"hosts/i386mach3.h"'
161         ;;
162 -  i[3-7]86-*-linux-gnu*)
163 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
164         COREFILE=trad-core.lo
165         TRAD_HEADER='"hosts/i386linux.h"'
166         ;;
167 @@ -5386,7 +5391,7 @@
168         COREFILE=trad-core.lo
169         TRAD_HEADER='"hosts/hp300bsd.h"'
170         ;;
171 -  m68*-*-linux-gnu*)
172 +  m68*-*-linux-gnu* | m68*-*-linux-uclibc)
173         COREFILE=trad-core.lo
174         TRAD_HEADER='"hosts/m68klinux.h"'
175         ;;
176 @@ -5487,7 +5492,7 @@
177         COREFILE=trad-core.lo
178         TRAD_HEADER='"hosts/vaxult2.h"'
179         ;;
180 -  vax-*-linux-gnu*)
181 +  vax-*-linux-gnu* | vax-*-linux-uclibc*)
182         COREFILE=trad-core.lo
183         TRAD_HEADER='"hosts/vaxlinux.h"'
184         ;;
185 diff -urN gdb-6.1.1-dist/bfd/configure.in gdb-6.1.1/bfd/configure.in
186 --- gdb-6.1.1-dist/bfd/configure.in     2004-03-13 06:37:09.000000000 -0600
187 +++ gdb-6.1.1/bfd/configure.in  2004-08-08 05:01:47.000000000 -0500
188 @@ -178,7 +178,7 @@
189    alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
190         COREFILE=''
191         ;;
192 -  alpha*-*-linux-gnu*)
193 +  alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
194         COREFILE=trad-core.lo
195         TRAD_HEADER='"hosts/alphalinux.h"'
196         ;;
197 @@ -259,7 +259,7 @@
198         TRAD_HEADER='"hosts/i386mach3.h"'
199         ;;
200  changequote(,)dnl
201 -  i[3-7]86-*-linux-gnu*)
202 +  i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
203  changequote([,])dnl
204         COREFILE=trad-core.lo
205         TRAD_HEADER='"hosts/i386linux.h"'
206 @@ -312,7 +312,7 @@
207         COREFILE=trad-core.lo
208         TRAD_HEADER='"hosts/hp300bsd.h"'
209         ;;
210 -  m68*-*-linux-gnu*)
211 +  m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
212         COREFILE=trad-core.lo
213         TRAD_HEADER='"hosts/m68klinux.h"'
214         ;;
215 @@ -397,7 +397,7 @@
216         COREFILE=trad-core.lo
217         TRAD_HEADER='"hosts/vaxult2.h"'
218         ;;
219 -  vax-*-linux-gnu*)
220 +  vax-*-linux-gnu* | vax-*-linux-uclibc*)
221         COREFILE=trad-core.lo
222         TRAD_HEADER='"hosts/vaxlinux.h"'
223         ;;
224 diff -urN gdb-6.1.1-dist/libtool.m4 gdb-6.1.1/libtool.m4
225 --- gdb-6.1.1-dist/libtool.m4   2003-04-10 22:58:39.000000000 -0500
226 +++ gdb-6.1.1/libtool.m4        2004-08-08 05:01:47.000000000 -0500
227 @@ -645,6 +645,11 @@
228    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
229    ;;
230  
231 +linux-uclibc*)
232 +  lt_cv_deplibs_check_method=pass_all
233 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
234 +  ;;
235 +
236  netbsd*)
237    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
238      [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
239 diff -urN gdb-6.1.1-dist/ltconfig gdb-6.1.1/ltconfig
240 --- gdb-6.1.1-dist/ltconfig     2003-10-03 23:54:47.000000000 -0500
241 +++ gdb-6.1.1/ltconfig  2004-08-08 05:01:47.000000000 -0500
242 @@ -602,7 +602,7 @@
243  
244  # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
245  case $host_os in
246 -linux-gnu*) ;;
247 +linux-gnu*|linux-uclibc*) ;;
248  linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
249  esac
250  
251 @@ -1259,6 +1259,24 @@
252    dynamic_linker='GNU/Linux ld.so'
253    ;;
254  
255 +linux-uclibc*)
256 +  version_type=linux
257 +  need_lib_prefix=no
258 +  need_version=no
259 +  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
260 +  soname_spec='${libname}${release}.so$major'
261 +  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
262 +  shlibpath_var=LD_LIBRARY_PATH
263 +  shlibpath_overrides_runpath=no
264 +  # This implies no fast_install, which is unacceptable.
265 +  # Some rework will be needed to allow for fast_install
266 +  # before this can be enabled.
267 +  # Note: copied from linux-gnu, and may not be appropriate.
268 +  hardcode_into_libs=yes
269 +  # Assume using the uClibc dynamic linker.
270 +  dynamic_linker="uClibc ld.so"
271 +  ;;
272 +
273  netbsd*)
274    need_lib_prefix=no
275    need_version=no
276 diff -urN gdb-6.1.1-dist/opcodes/configure gdb-6.1.1/opcodes/configure
277 --- gdb-6.1.1-dist/opcodes/configure    2003-08-05 04:39:31.000000000 -0500
278 +++ gdb-6.1.1/opcodes/configure 2004-08-08 05:01:47.000000000 -0500
279 @@ -1700,6 +1700,11 @@
280    lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
281    ;;
282  
283 +linux-uclibc*)
284 +  lt_cv_deplibs_check_method=pass_all
285 +  lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
286 +  ;;
287 +
288  netbsd*)
289    if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
290      lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'