summaryrefslogtreecommitdiffstats
path: root/meta/packages/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/gdb')
-rw-r--r--meta/packages/gdb/files/gdbserver-cflags-last.diff13
-rw-r--r--meta/packages/gdb/files/kill_arm_map_symbols.patch24
-rw-r--r--meta/packages/gdb/files/libiberty-cross.patch630
-rw-r--r--meta/packages/gdb/files/sim-install.patch34
-rw-r--r--meta/packages/gdb/files/uclibc.patch194
-rw-r--r--meta/packages/gdb/gdb-6.3/uclibc.patch194
-rw-r--r--meta/packages/gdb/gdb-cross_6.3.bb36
-rw-r--r--meta/packages/gdb/gdb_6.3.bb50
8 files changed, 1175 insertions, 0 deletions
diff --git a/meta/packages/gdb/files/gdbserver-cflags-last.diff b/meta/packages/gdb/files/gdbserver-cflags-last.diff
new file mode 100644
index 0000000000..42bd740a7c
--- /dev/null
+++ b/meta/packages/gdb/files/gdbserver-cflags-last.diff
@@ -0,0 +1,13 @@
1--- gdb/gdbserver/Makefile.in.orig 2004-10-05 18:52:56.298419032 +0200
2+++ gdb/gdbserver/Makefile.in 2004-10-05 18:53:10.442268840 +0200
3@@ -97,8 +97,8 @@
4 CFLAGS = @CFLAGS@
5
6 # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros.
7-INTERNAL_CFLAGS = $(WARN_CFLAGS) ${CFLAGS} ${GLOBAL_CFLAGS} \
8- ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS}
9+INTERNAL_CFLAGS = $(WARN_CFLAGS) ${GLOBAL_CFLAGS} \
10+ ${PROFILE_CFLAGS} ${INCLUDE_CFLAGS} ${BFD_CFLAGS} ${CFLAGS}
11
12 # LDFLAGS is specifically reserved for setting from the command line
13 # when running make.
diff --git a/meta/packages/gdb/files/kill_arm_map_symbols.patch b/meta/packages/gdb/files/kill_arm_map_symbols.patch
new file mode 100644
index 0000000000..177142192d
--- /dev/null
+++ b/meta/packages/gdb/files/kill_arm_map_symbols.patch
@@ -0,0 +1,24 @@
1Index: gdb-6.3/gdb/arm-tdep.c
2===================================================================
3--- gdb-6.3.orig/gdb/arm-tdep.c 2004-08-03 02:02:20.000000000 +0000
4+++ gdb-6.3/gdb/arm-tdep.c 2005-11-09 15:13:29.000000000 +0000
5@@ -2491,6 +2491,19 @@
6 static void
7 arm_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
8 {
9+
10+ /* FIXME: We want gdb to ignore the ARM ELF mapping symbols when
11+ displaying disassembly so we use this horrible hack here to
12+ artifically set their address to the highest possible value.
13+ This is wrong of course, and it prevents the symbols from being
14+ used for their intended purpose - to distinguish between ARM
15+ and THUMB code. So we ought to find a better way to do this. */
16+ if (bfd_asymbol_name (sym)
17+ && bfd_asymbol_name (sym)[0] == '$'
18+ && bfd_asymbol_name (sym)[1] != 0
19+ && bfd_asymbol_name (sym)[2] == 0)
20+ SYMBOL_VALUE_ADDRESS(msym) = (CORE_ADDR) 0x7ffffffc;
21+
22 /* Thumb symbols are of type STT_LOPROC, (synonymous with
23 STT_ARM_TFUNC). */
24 if (ELF_ST_TYPE (((elf_symbol_type *)sym)->internal_elf_sym.st_info)
diff --git a/meta/packages/gdb/files/libiberty-cross.patch b/meta/packages/gdb/files/libiberty-cross.patch
new file mode 100644
index 0000000000..0d1897f9e0
--- /dev/null
+++ b/meta/packages/gdb/files/libiberty-cross.patch
@@ -0,0 +1,630 @@
1--- libiberty/configure.in.old 2004-03-31 21:25:25.000000000 +0100
2+++ libiberty/configure.in 2004-03-31 21:18:02.000000000 +0100
3@@ -100,6 +100,7 @@
4 AC_CHECK_TOOL(RANLIB, ranlib, :)
5
6 LIB_AC_PROG_CC
7+AC_PROG_CC_WORKS
8
9 AC_PROG_CC_C_O
10 # autoconf is lame and doesn't give us any substitution variable for this.
11@@ -402,7 +403,6 @@
12
13 # We haven't set the list of objects yet. Use the standard autoconf
14 # tests. This will only work if the compiler works.
15- AC_PROG_CC_WORKS
16 AC_REPLACE_FUNCS($funcs)
17 libiberty_AC_FUNC_C_ALLOCA
18 AC_FUNC_VFORK
19
20--- libiberty/configure.old 2003-06-19 21:05:35.000000000 +0100
21+++ libiberty/configure 2004-03-31 21:35:12.000000000 +0100
22@@ -1000,13 +1000,60 @@
23 fi
24
25
26+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
27+echo "configure:1005: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
28+
29+ac_ext=c
30+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
31+ac_cpp='$CPP $CPPFLAGS'
32+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
33+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
34+cross_compiling=$ac_cv_prog_cc_cross
35+
36+cat > conftest.$ac_ext << EOF
37+
38+#line 1016 "configure"
39+#include "confdefs.h"
40+
41+main(){return(0);}
42+EOF
43+if { (eval echo configure:1021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
44+ ac_cv_prog_cc_works=yes
45+ # If we can't run a trivial program, we are probably using a cross compiler.
46+ if (./conftest; exit) 2>/dev/null; then
47+ ac_cv_prog_cc_cross=no
48+ else
49+ ac_cv_prog_cc_cross=yes
50+ fi
51+else
52+ echo "configure: failed program was:" >&5
53+ cat conftest.$ac_ext >&5
54+ ac_cv_prog_cc_works=no
55+fi
56+rm -fr conftest*
57+ac_ext=c
58+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
59+ac_cpp='$CPP $CPPFLAGS'
60+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
61+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
62+cross_compiling=$ac_cv_prog_cc_cross
63+
64+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
65+if test $ac_cv_prog_cc_works = no; then
66+ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
67+fi
68+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
69+echo "configure:1047: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
70+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
71+cross_compiling=$ac_cv_prog_cc_cross
72+
73
74 if test "x$CC" != xcc; then
75 echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
76-echo "configure:1007: checking whether $CC and cc understand -c and -o together" >&5
77+echo "configure:1054: checking whether $CC and cc understand -c and -o together" >&5
78 else
79 echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
80-echo "configure:1010: checking whether cc understands -c and -o together" >&5
81+echo "configure:1057: checking whether cc understands -c and -o together" >&5
82 fi
83 set dummy $CC; ac_cc="`echo $2 |
84 sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
85@@ -1018,16 +1065,16 @@
86 # We do the test twice because some compilers refuse to overwrite an
87 # existing .o file with -o, though they will create one.
88 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
89-if { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
90- test -f conftest.o && { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
91+if { (eval echo configure:1069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
92+ test -f conftest.o && { (eval echo configure:1070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
93 then
94 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
95 if test "x$CC" != xcc; then
96 # Test first that cc exists at all.
97- if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
98+ if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
99 ac_try='cc -c conftest.c -o conftest.o 1>&5'
100- if { (eval echo configure:1030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
101- test -f conftest.o && { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
102+ if { (eval echo configure:1077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
103+ test -f conftest.o && { (eval echo configure:1078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
104 then
105 # cc works too.
106 :
107@@ -1063,7 +1110,7 @@
108
109
110 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
111-echo "configure:1067: checking for POSIXized ISC" >&5
112+echo "configure:1114: checking for POSIXized ISC" >&5
113 if test -d /etc/conf/kconfig.d &&
114 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
115 then
116@@ -1084,12 +1131,12 @@
117 fi
118
119 echo $ac_n "checking for working const""... $ac_c" 1>&6
120-echo "configure:1088: checking for working const" >&5
121+echo "configure:1135: checking for working const" >&5
122 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
123 echo $ac_n "(cached) $ac_c" 1>&6
124 else
125 cat > conftest.$ac_ext <<EOF
126-#line 1093 "configure"
127+#line 1140 "configure"
128 #include "confdefs.h"
129
130 int main() {
131@@ -1138,7 +1185,7 @@
132
133 ; return 0; }
134 EOF
135-if { (eval echo configure:1142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
136+if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
137 rm -rf conftest*
138 ac_cv_c_const=yes
139 else
140@@ -1159,21 +1206,21 @@
141 fi
142
143 echo $ac_n "checking for inline""... $ac_c" 1>&6
144-echo "configure:1163: checking for inline" >&5
145+echo "configure:1210: checking for inline" >&5
146 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
147 echo $ac_n "(cached) $ac_c" 1>&6
148 else
149 ac_cv_c_inline=no
150 for ac_kw in inline __inline__ __inline; do
151 cat > conftest.$ac_ext <<EOF
152-#line 1170 "configure"
153+#line 1217 "configure"
154 #include "confdefs.h"
155
156 int main() {
157 } $ac_kw foo() {
158 ; return 0; }
159 EOF
160-if { (eval echo configure:1177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
161+if { (eval echo configure:1224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
162 rm -rf conftest*
163 ac_cv_c_inline=$ac_kw; break
164 else
165@@ -1199,14 +1246,14 @@
166 esac
167
168 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
169-echo "configure:1203: checking whether byte ordering is bigendian" >&5
170+echo "configure:1250: checking whether byte ordering is bigendian" >&5
171 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
172 echo $ac_n "(cached) $ac_c" 1>&6
173 else
174 ac_cv_c_bigendian=unknown
175 # See if sys/param.h defines the BYTE_ORDER macro.
176 cat > conftest.$ac_ext <<EOF
177-#line 1210 "configure"
178+#line 1257 "configure"
179 #include "confdefs.h"
180 #include <sys/types.h>
181 #include <sys/param.h>
182@@ -1217,11 +1264,11 @@
183 #endif
184 ; return 0; }
185 EOF
186-if { (eval echo configure:1221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
187+if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
188 rm -rf conftest*
189 # It does; now see whether it defined to BIG_ENDIAN or not.
190 cat > conftest.$ac_ext <<EOF
191-#line 1225 "configure"
192+#line 1272 "configure"
193 #include "confdefs.h"
194 #include <sys/types.h>
195 #include <sys/param.h>
196@@ -1232,7 +1279,7 @@
197 #endif
198 ; return 0; }
199 EOF
200-if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
201+if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
202 rm -rf conftest*
203 ac_cv_c_bigendian=yes
204 else
205@@ -1252,7 +1299,7 @@
206 echo $ac_n "cross-compiling... " 2>&6
207 else
208 cat > conftest.$ac_ext <<EOF
209-#line 1256 "configure"
210+#line 1303 "configure"
211 #include "confdefs.h"
212 main () {
213 /* Are we little or big endian? From Harbison&Steele. */
214@@ -1265,7 +1312,7 @@
215 exit (u.c[sizeof (long) - 1] == 1);
216 }
217 EOF
218-if { (eval echo configure:1269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
219+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
220 then
221 ac_cv_c_bigendian=no
222 else
223@@ -1283,7 +1330,7 @@
224 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
225 if test $ac_cv_c_bigendian = unknown; then
226 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
227-echo "configure:1287: checking to probe for byte ordering" >&5
228+echo "configure:1334: checking to probe for byte ordering" >&5
229
230 cat >conftest.c <<EOF
231 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
232@@ -1352,7 +1399,7 @@
233 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
234 # ./install, which can be erroneously created by make from ./install.sh.
235 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
236-echo "configure:1356: checking for a BSD compatible install" >&5
237+echo "configure:1403: checking for a BSD compatible install" >&5
238 if test -z "$INSTALL"; then
239 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
240 echo $ac_n "(cached) $ac_c" 1>&6
241@@ -1413,7 +1460,7 @@
242 # able to link anything, it had better be able to at least compile
243 # something.
244 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
245-echo "configure:1417: checking how to run the C preprocessor" >&5
246+echo "configure:1464: checking how to run the C preprocessor" >&5
247 # On Suns, sometimes $CPP names a directory.
248 if test -n "$CPP" && test -d "$CPP"; then
249 CPP=
250@@ -1428,13 +1475,13 @@
251 # On the NeXT, cc -E runs the code through the compiler's parser,
252 # not just through cpp.
253 cat > conftest.$ac_ext <<EOF
254-#line 1432 "configure"
255+#line 1479 "configure"
256 #include "confdefs.h"
257 #include <assert.h>
258 Syntax Error
259 EOF
260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
261-{ (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
262+{ (eval echo configure:1485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
264 if test -z "$ac_err"; then
265 :
266@@ -1445,13 +1492,13 @@
267 rm -rf conftest*
268 CPP="${CC-cc} -E -traditional-cpp"
269 cat > conftest.$ac_ext <<EOF
270-#line 1449 "configure"
271+#line 1496 "configure"
272 #include "confdefs.h"
273 #include <assert.h>
274 Syntax Error
275 EOF
276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
277-{ (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
278+{ (eval echo configure:1502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
280 if test -z "$ac_err"; then
281 :
282@@ -1462,13 +1509,13 @@
283 rm -rf conftest*
284 CPP="${CC-cc} -nologo -E"
285 cat > conftest.$ac_ext <<EOF
286-#line 1466 "configure"
287+#line 1513 "configure"
288 #include "confdefs.h"
289 #include <assert.h>
290 Syntax Error
291 EOF
292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
293-{ (eval echo configure:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
294+{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
296 if test -z "$ac_err"; then
297 :
298@@ -1496,17 +1543,17 @@
299 do
300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
302-echo "configure:1500: checking for $ac_hdr" >&5
303+echo "configure:1547: checking for $ac_hdr" >&5
304 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
305 echo $ac_n "(cached) $ac_c" 1>&6
306 else
307 cat > conftest.$ac_ext <<EOF
308-#line 1505 "configure"
309+#line 1552 "configure"
310 #include "confdefs.h"
311 #include <$ac_hdr>
312 EOF
313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
314-{ (eval echo configure:1510: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
315+{ (eval echo configure:1557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
317 if test -z "$ac_err"; then
318 rm -rf conftest*
319@@ -1533,12 +1580,12 @@
320 done
321
322 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
323-echo "configure:1537: checking for sys/wait.h that is POSIX.1 compatible" >&5
324+echo "configure:1584: checking for sys/wait.h that is POSIX.1 compatible" >&5
325 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
326 echo $ac_n "(cached) $ac_c" 1>&6
327 else
328 cat > conftest.$ac_ext <<EOF
329-#line 1542 "configure"
330+#line 1589 "configure"
331 #include "confdefs.h"
332 #include <sys/types.h>
333 #include <sys/wait.h>
334@@ -1554,7 +1601,7 @@
335 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
336 ; return 0; }
337 EOF
338-if { (eval echo configure:1558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
339+if { (eval echo configure:1605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
340 rm -rf conftest*
341 ac_cv_header_sys_wait_h=yes
342 else
343@@ -1575,12 +1622,12 @@
344 fi
345
346 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
347-echo "configure:1579: checking whether time.h and sys/time.h may both be included" >&5
348+echo "configure:1626: checking whether time.h and sys/time.h may both be included" >&5
349 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
350 echo $ac_n "(cached) $ac_c" 1>&6
351 else
352 cat > conftest.$ac_ext <<EOF
353-#line 1584 "configure"
354+#line 1631 "configure"
355 #include "confdefs.h"
356 #include <sys/types.h>
357 #include <sys/time.h>
358@@ -1589,7 +1636,7 @@
359 struct tm *tp;
360 ; return 0; }
361 EOF
362-if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
363+if { (eval echo configure:1640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
364 rm -rf conftest*
365 ac_cv_header_time=yes
366 else
367@@ -1611,19 +1658,19 @@
368
369
370 echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
371-echo "configure:1615: checking whether errno must be declared" >&5
372+echo "configure:1662: checking whether errno must be declared" >&5
373 if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
374 echo $ac_n "(cached) $ac_c" 1>&6
375 else
376 cat > conftest.$ac_ext <<EOF
377-#line 1620 "configure"
378+#line 1667 "configure"
379 #include "confdefs.h"
380 #include <errno.h>
381 int main() {
382 int x = errno;
383 ; return 0; }
384 EOF
385-if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
386+if { (eval echo configure:1674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
387 rm -rf conftest*
388 libiberty_cv_declare_errno=no
389 else
390@@ -1645,12 +1692,12 @@
391
392
393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
394-echo "configure:1649: checking for ANSI C header files" >&5
395+echo "configure:1696: checking for ANSI C header files" >&5
396 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
397 echo $ac_n "(cached) $ac_c" 1>&6
398 else
399 cat > conftest.$ac_ext <<EOF
400-#line 1654 "configure"
401+#line 1701 "configure"
402 #include "confdefs.h"
403 #include <stdlib.h>
404 #include <stdarg.h>
405@@ -1658,7 +1705,7 @@
406 #include <float.h>
407 EOF
408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
409-{ (eval echo configure:1662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
410+{ (eval echo configure:1709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
412 if test -z "$ac_err"; then
413 rm -rf conftest*
414@@ -1675,7 +1722,7 @@
415 if test $ac_cv_header_stdc = yes; then
416 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
417 cat > conftest.$ac_ext <<EOF
418-#line 1679 "configure"
419+#line 1726 "configure"
420 #include "confdefs.h"
421 #include <string.h>
422 EOF
423@@ -1693,7 +1740,7 @@
424 if test $ac_cv_header_stdc = yes; then
425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
426 cat > conftest.$ac_ext <<EOF
427-#line 1697 "configure"
428+#line 1744 "configure"
429 #include "confdefs.h"
430 #include <stdlib.h>
431 EOF
432@@ -1714,7 +1761,7 @@
433 :
434 else
435 cat > conftest.$ac_ext <<EOF
436-#line 1718 "configure"
437+#line 1765 "configure"
438 #include "confdefs.h"
439 #include <ctype.h>
440 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
441@@ -1725,7 +1772,7 @@
442 exit (0); }
443
444 EOF
445-if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
446+if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
447 then
448 :
449 else
450@@ -1749,12 +1796,12 @@
451 fi
452
453 echo $ac_n "checking for uintptr_t""... $ac_c" 1>&6
454-echo "configure:1753: checking for uintptr_t" >&5
455+echo "configure:1800: checking for uintptr_t" >&5
456 if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
457 echo $ac_n "(cached) $ac_c" 1>&6
458 else
459 cat > conftest.$ac_ext <<EOF
460-#line 1758 "configure"
461+#line 1805 "configure"
462 #include "confdefs.h"
463 #include <sys/types.h>
464 #if STDC_HEADERS
465@@ -1790,12 +1837,12 @@
466
467
468 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
469-echo "configure:1794: checking for pid_t" >&5
470+echo "configure:1841: checking for pid_t" >&5
471 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
472 echo $ac_n "(cached) $ac_c" 1>&6
473 else
474 cat > conftest.$ac_ext <<EOF
475-#line 1799 "configure"
476+#line 1846 "configure"
477 #include "confdefs.h"
478 #include <sys/types.h>
479 #if STDC_HEADERS
480@@ -1895,12 +1942,12 @@
481 realpath canonicalize_file_name
482 do
483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
484-echo "configure:1899: checking for $ac_func" >&5
485+echo "configure:1946: checking for $ac_func" >&5
486 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
487 echo $ac_n "(cached) $ac_c" 1>&6
488 else
489 cat > conftest.$ac_ext <<EOF
490-#line 1904 "configure"
491+#line 1951 "configure"
492 #include "confdefs.h"
493 /* System header to define __stub macros and hopefully few prototypes,
494 which can conflict with char $ac_func(); below. */
495@@ -1923,7 +1970,7 @@
496
497 ; return 0; }
498 EOF
499-if { (eval echo configure:1927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
500+if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
501 rm -rf conftest*
502 eval "ac_cv_func_$ac_func=yes"
503 else
504@@ -2152,53 +2199,6 @@
505
506 # We haven't set the list of objects yet. Use the standard autoconf
507 # tests. This will only work if the compiler works.
508- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
509-echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
510-
511-ac_ext=c
512-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
513-ac_cpp='$CPP $CPPFLAGS'
514-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
515-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
516-cross_compiling=$ac_cv_prog_cc_cross
517-
518-cat > conftest.$ac_ext << EOF
519-
520-#line 2168 "configure"
521-#include "confdefs.h"
522-
523-main(){return(0);}
524-EOF
525-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
526- ac_cv_prog_cc_works=yes
527- # If we can't run a trivial program, we are probably using a cross compiler.
528- if (./conftest; exit) 2>/dev/null; then
529- ac_cv_prog_cc_cross=no
530- else
531- ac_cv_prog_cc_cross=yes
532- fi
533-else
534- echo "configure: failed program was:" >&5
535- cat conftest.$ac_ext >&5
536- ac_cv_prog_cc_works=no
537-fi
538-rm -fr conftest*
539-ac_ext=c
540-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
541-ac_cpp='$CPP $CPPFLAGS'
542-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
543-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
544-cross_compiling=$ac_cv_prog_cc_cross
545-
546-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
547-if test $ac_cv_prog_cc_works = no; then
548- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
549-fi
550-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
551-echo "configure:2199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
552-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
553-cross_compiling=$ac_cv_prog_cc_cross
554-
555 for ac_func in $funcs
556 do
557 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
558@@ -2900,7 +2900,7 @@
559 esac
560
561
562-for ac_hdr in stdlib.h unistd.h sys/stat.h sys/types.h
563+for ac_hdr in unistd.h
564 do
565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
567@@ -3032,24 +3032,11 @@
568 #include <fcntl.h>
569 #include <sys/mman.h>
570
571-#if HAVE_SYS_TYPES_H
572-# include <sys/types.h>
573-#endif
574-
575-#if HAVE_STDLIB_H
576-# include <stdlib.h>
577-#endif
578-
579-#if HAVE_SYS_STAT_H
580-# include <sys/stat.h>
581-#endif
582-
583-#if HAVE_UNISTD_H
584-# include <unistd.h>
585-#endif
586-
587 /* This mess was copied from the GNU getpagesize.h. */
588 #ifndef HAVE_GETPAGESIZE
589+# ifdef HAVE_UNISTD_H
590+# include <unistd.h>
591+# endif
592
593 /* Assume that all systems that can run configure have sys/param.h. */
594 # ifndef HAVE_SYS_PARAM_H
595@@ -3157,7 +3144,7 @@
596 }
597
598 EOF
599-if { (eval echo configure:3161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
600+if { (eval echo configure:3148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
601 then
602 ac_cv_func_mmap_fixed_mapped=yes
603 else
604@@ -3181,7 +3168,7 @@
605
606
607 echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
608-echo "configure:3185: checking for working strncmp" >&5
609+echo "configure:3172: checking for working strncmp" >&5
610 if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
611 echo $ac_n "(cached) $ac_c" 1>&6
612 else
613@@ -3189,7 +3176,7 @@
614 ac_cv_func_strncmp_works=no
615 else
616 cat > conftest.$ac_ext <<EOF
617-#line 3193 "configure"
618+#line 3180 "configure"
619 #include "confdefs.h"
620
621 /* Test by Jim Wilson and Kaveh Ghazi.
622@@ -3253,7 +3240,7 @@
623 }
624
625 EOF
626-if { (eval echo configure:3257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
627+if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
628 then
629 ac_cv_func_strncmp_works=yes
630 else
diff --git a/meta/packages/gdb/files/sim-install.patch b/meta/packages/gdb/files/sim-install.patch
new file mode 100644
index 0000000000..3c88c4c059
--- /dev/null
+++ b/meta/packages/gdb/files/sim-install.patch
@@ -0,0 +1,34 @@
1--- gdb-6.1/sim/common/Makefile.in~ 2004-01-15 21:25:06.000000000 +0000
2+++ gdb-6.1/sim/common/Makefile.in 2004-07-22 17:07:46.237809032 +0100
3@@ -34,7 +34,7 @@
4
5 datadir = @datadir@
6 mandir = @mandir@
7-man1dir = $(mandir)/man1
8+man1dir = $(DESTDIR)$(mandir)/man1
9 infodir = @infodir@
10 includedir = @includedir@
11
12
13--- gdb-6.1/sim/common/Make-common.in~sim-install.patch 2003-09-08 18:24:59.000000000 +0100
14+++ gdb-6.1/sim/common/Make-common.in 2004-07-22 17:56:18.947423032 +0100
15@@ -581,14 +581,14 @@
16
17 install-common: installdirs
18 n=`echo run | sed '$(program_transform_name)'`; \
19- $(INSTALL_PROGRAM) run$(EXEEXT) $(bindir)/$$n$(EXEEXT)
20+ $(INSTALL_PROGRAM) run$(EXEEXT) $(DESTDIR)$(bindir)/$$n$(EXEEXT)
21 n=`echo libsim.a | sed s/libsim.a/lib$(target_alias)-sim.a/`; \
22- $(INSTALL_DATA) libsim.a $(libdir)/$$n ; \
23- ( cd $(libdir) ; $(RANLIB) $$n )
24+ $(INSTALL_DATA) libsim.a $(DESTDIR)$(libdir)/$$n ; \
25+ ( cd $(DESTDIR)$(libdir) ; $(RANLIB) $$n )
26
27 installdirs:
28- $(SHELL) $(srcdir)/../../mkinstalldirs $(bindir)
29- $(SHELL) $(srcdir)/../../mkinstalldirs $(libdir)
30+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(bindir)
31+ $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir)
32
33 check:
34 cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)"
diff --git a/meta/packages/gdb/files/uclibc.patch b/meta/packages/gdb/files/uclibc.patch
new file mode 100644
index 0000000000..3d6b7ba187
--- /dev/null
+++ b/meta/packages/gdb/files/uclibc.patch
@@ -0,0 +1,194 @@
1--- binutils-2.15.91.0.1/bfd/config.bfd~binutils-2.15.90.0.3-uclibc-100-conf
2+++ binutils-2.15.91.0.1/bfd/config.bfd
3@@ -128,7 +128,7 @@
4 targ_defvec=ecoffalpha_little_vec
5 targ_selvecs=bfd_elf64_alpha_vec
6 ;;
7- alpha*-*-linux-gnu* | alpha*-*-elf*)
8+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
9 targ_defvec=bfd_elf64_alpha_vec
10 targ_selvecs=ecoffalpha_little_vec
11 ;;
12@@ -138,7 +138,7 @@
13 alpha*-*-*)
14 targ_defvec=ecoffalpha_little_vec
15 ;;
16- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
17+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
18 targ_defvec=bfd_elf64_ia64_little_vec
19 targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
20 ;;
21@@ -215,7 +215,7 @@
22 targ_defvec=bfd_elf32_littlearm_vec
23 targ_selvecs=bfd_elf32_bigarm_vec
24 ;;
25- armeb-*-elf | arm*b-*-linux-gnu*)
26+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
27 targ_defvec=bfd_elf32_bigarm_vec
28 targ_selvecs=bfd_elf32_littlearm_vec
29 ;;
30@@ -223,8 +223,8 @@
31 targ_defvec=bfd_elf32_littlearm_vec
32 targ_selvecs=bfd_elf32_bigarm_vec
33 ;;
34- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
35- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
36+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
37+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
38 targ_defvec=bfd_elf32_littlearm_vec
39 targ_selvecs=bfd_elf32_bigarm_vec
40 ;;
41@@ -367,7 +367,7 @@
42 ;;
43
44 #ifdef BFD64
45- hppa*64*-*-linux-gnu*)
46+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
47 targ_defvec=bfd_elf64_hppa_linux_vec
48 targ_selvecs=bfd_elf64_hppa_vec
49 ;;
50@@ -378,7 +378,7 @@
51 ;;
52 #endif
53
54- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
55+ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*)
56 targ_defvec=bfd_elf32_hppa_linux_vec
57 targ_selvecs=bfd_elf32_hppa_vec
58 ;;
59@@ -501,7 +501,7 @@
60 targ_selvecs=bfd_elf32_i386_vec
61 targ_underscore=yes
62 ;;
63- i[3-7]86-*-linux-gnu*)
64+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
65 targ_defvec=bfd_elf32_i386_vec
66 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
67 targ64_selvecs=bfd_elf64_x86_64_vec
68@@ -515,7 +515,7 @@
69 targ_defvec=bfd_elf64_x86_64_vec
70 targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
71 ;;
72- x86_64-*-linux-gnu*)
73+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
74 targ_defvec=bfd_elf64_x86_64_vec
75 targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
76 ;;
77@@ -690,7 +690,7 @@
78 targ_selvecs=bfd_elf32_m68k_vec
79 targ_underscore=yes
80 ;;
81- m68*-*-linux-gnu*)
82+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
83 targ_defvec=bfd_elf32_m68k_vec
84 targ_selvecs=m68klinux_vec
85 ;;
86@@ -966,7 +966,8 @@
87 ;;
88 #endif
89 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
90- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
91+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
92+ powerpc-*-rtems* | \
93 powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
94 targ_defvec=bfd_elf32_powerpc_vec
95 targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
96@@ -1003,8 +1004,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@@ -1165,7 +1166,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@@ -1212,7 +1213,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--- binutils-2.15.91.0.1/bfd/configure~binutils-2.15.90.0.3-uclibc-100-conf
126+++ binutils-2.15.91.0.1/bfd/configure
127@@ -1687,6 +1687,11 @@
128 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
129 ;;
130
131+linux-uclibc*)
132+ lt_cv_deplibs_check_method=pass_all
133+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
134+ ;;
135+
136 netbsd*)
137 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
138 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
139@@ -5266,7 +5271,7 @@
140 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
141 COREFILE=''
142 ;;
143- alpha*-*-linux-gnu*)
144+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
145 COREFILE=trad-core.lo
146 TRAD_HEADER='"hosts/alphalinux.h"'
147 ;;
148@@ -5326,7 +5331,7 @@
149 COREFILE=trad-core.lo
150 TRAD_HEADER='"hosts/i386mach3.h"'
151 ;;
152- i[3-7]86-*-linux-gnu*)
153+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
154 COREFILE=trad-core.lo
155 TRAD_HEADER='"hosts/i386linux.h"'
156 ;;
157@@ -5364,7 +5369,7 @@
158 COREFILE=trad-core.lo
159 TRAD_HEADER='"hosts/hp300bsd.h"'
160 ;;
161- m68*-*-linux-gnu*)
162+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
163 COREFILE=trad-core.lo
164 TRAD_HEADER='"hosts/m68klinux.h"'
165 ;;
166--- binutils-2.15.91.0.1/bfd/configure.in~binutils-2.15.90.0.3-uclibc-100-conf
167+++ binutils-2.15.91.0.1/bfd/configure.in
168@@ -164,7 +164,7 @@
169 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
170 COREFILE=''
171 ;;
172- alpha*-*-linux-gnu*)
173+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
174 COREFILE=trad-core.lo
175 TRAD_HEADER='"hosts/alphalinux.h"'
176 ;;
177@@ -245,7 +245,7 @@
178 TRAD_HEADER='"hosts/i386mach3.h"'
179 ;;
180 changequote(,)dnl
181- i[3-7]86-*-linux-gnu*)
182+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
183 changequote([,])dnl
184 COREFILE=trad-core.lo
185 TRAD_HEADER='"hosts/i386linux.h"'
186@@ -286,7 +286,7 @@
187 COREFILE=trad-core.lo
188 TRAD_HEADER='"hosts/hp300bsd.h"'
189 ;;
190- m68*-*-linux-gnu*)
191+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
192 COREFILE=trad-core.lo
193 TRAD_HEADER='"hosts/m68klinux.h"'
194 ;;
diff --git a/meta/packages/gdb/gdb-6.3/uclibc.patch b/meta/packages/gdb/gdb-6.3/uclibc.patch
new file mode 100644
index 0000000000..b3981202ff
--- /dev/null
+++ b/meta/packages/gdb/gdb-6.3/uclibc.patch
@@ -0,0 +1,194 @@
1--- gdb-6.3/bfd/config.bfd.orig 2004-10-15 06:47:11.000000000 +0100
2+++ gdb-6.3/bfd/config.bfd 2005-01-05 19:30:32.000000000 +0000
3@@ -129,7 +129,7 @@
4 targ_defvec=ecoffalpha_little_vec
5 targ_selvecs=bfd_elf64_alpha_vec
6 ;;
7- alpha*-*-linux-gnu* | alpha*-*-elf*)
8+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
9 targ_defvec=bfd_elf64_alpha_vec
10 targ_selvecs=ecoffalpha_little_vec
11 ;;
12@@ -139,7 +139,7 @@
13 alpha*-*-*)
14 targ_defvec=ecoffalpha_little_vec
15 ;;
16- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
17+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu)
18 targ_defvec=bfd_elf64_ia64_little_vec
19 targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
20 ;;
21@@ -216,7 +216,7 @@
22 targ_defvec=bfd_elf32_littlearm_vec
23 targ_selvecs=bfd_elf32_bigarm_vec
24 ;;
25- armeb-*-elf | arm*b-*-linux-gnu*)
26+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
27 targ_defvec=bfd_elf32_bigarm_vec
28 targ_selvecs=bfd_elf32_littlearm_vec
29 ;;
30@@ -224,8 +224,8 @@
31 targ_defvec=bfd_elf32_littlearm_vec
32 targ_selvecs=bfd_elf32_bigarm_vec
33 ;;
34- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
35- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
36+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \
37+ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \
38 arm*-*-eabi* )
39 targ_defvec=bfd_elf32_littlearm_vec
40 targ_selvecs=bfd_elf32_bigarm_vec
41@@ -378,7 +378,7 @@
42 ;;
43
44 #ifdef BFD64
45- hppa*64*-*-linux-gnu*)
46+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
47 targ_defvec=bfd_elf64_hppa_linux_vec
48 targ_selvecs=bfd_elf64_hppa_vec
49 ;;
50@@ -389,7 +389,7 @@
51 ;;
52 #endif
53
54- hppa*-*-linux-gnu*)
55+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*)
56 targ_defvec=bfd_elf32_hppa_linux_vec
57 targ_selvecs=bfd_elf32_hppa_vec
58 ;;
59@@ -522,7 +522,7 @@
60 targ_selvecs=bfd_elf32_i386_vec
61 targ_underscore=yes
62 ;;
63- i[3-7]86-*-linux-gnu*)
64+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
65 targ_defvec=bfd_elf32_i386_vec
66 targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
67 targ64_selvecs=bfd_elf64_x86_64_vec
68@@ -536,7 +536,7 @@
69 targ_defvec=bfd_elf64_x86_64_vec
70 targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
71 ;;
72- x86_64-*-linux-gnu*)
73+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
74 targ_defvec=bfd_elf64_x86_64_vec
75 targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
76 ;;
77@@ -711,7 +711,7 @@
78 targ_selvecs=bfd_elf32_m68k_vec
79 targ_underscore=yes
80 ;;
81- m68*-*-linux-gnu*)
82+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
83 targ_defvec=bfd_elf32_m68k_vec
84 targ_selvecs=m68klinux_vec
85 ;;
86@@ -987,7 +987,8 @@
87 ;;
88 #endif
89 powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
90- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
91+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
92+ powerpc-*-rtems* | \
93 powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
94 targ_defvec=bfd_elf32_powerpc_vec
95 targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
96@@ -1024,8 +1025,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@@ -1192,7 +1193,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@@ -1239,7 +1240,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--- gdb-6.3/bfd/configure.in.orig 2004-10-08 15:53:59.000000000 +0100
126+++ gdb-6.3/bfd/configure.in 2005-01-05 19:28:50.000000000 +0000
127@@ -163,7 +163,7 @@
128 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
129 COREFILE=''
130 ;;
131- alpha*-*-linux-gnu*)
132+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
133 COREFILE=trad-core.lo
134 TRAD_HEADER='"hosts/alphalinux.h"'
135 ;;
136@@ -248,7 +248,7 @@
137 TRAD_HEADER='"hosts/i386mach3.h"'
138 ;;
139 changequote(,)dnl
140- i[3-7]86-*-linux-gnu*)
141+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
142 changequote([,])dnl
143 COREFILE=trad-core.lo
144 TRAD_HEADER='"hosts/i386linux.h"'
145@@ -289,7 +289,7 @@
146 COREFILE=trad-core.lo
147 TRAD_HEADER='"hosts/hp300bsd.h"'
148 ;;
149- m68*-*-linux-gnu*)
150+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
151 COREFILE=trad-core.lo
152 TRAD_HEADER='"hosts/m68klinux.h"'
153 ;;
154--- gdb-6.3/bfd/configure.orig 2004-10-08 15:53:56.000000000 +0100
155+++ gdb-6.3/bfd/configure 2005-01-05 19:29:27.000000000 +0000
156@@ -3583,6 +3583,11 @@
157 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
158 ;;
159
160+linux-uclibc*)
161+ lt_cv_deplibs_check_method=pass_all
162+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
163+ ;;
164+
165 netbsd* | knetbsd*-gnu)
166 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
167 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
168@@ -9914,7 +9919,7 @@
169 alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
170 COREFILE=''
171 ;;
172- alpha*-*-linux-gnu*)
173+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
174 COREFILE=trad-core.lo
175 TRAD_HEADER='"hosts/alphalinux.h"'
176 ;;
177@@ -9978,7 +9983,7 @@
178 COREFILE=trad-core.lo
179 TRAD_HEADER='"hosts/i386mach3.h"'
180 ;;
181- i[3-7]86-*-linux-gnu*)
182+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
183 COREFILE=trad-core.lo
184 TRAD_HEADER='"hosts/i386linux.h"'
185 ;;
186@@ -10016,7 +10021,7 @@
187 COREFILE=trad-core.lo
188 TRAD_HEADER='"hosts/hp300bsd.h"'
189 ;;
190- m68*-*-linux-gnu*)
191+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
192 COREFILE=trad-core.lo
193 TRAD_HEADER='"hosts/m68klinux.h"'
194 ;;
diff --git a/meta/packages/gdb/gdb-cross_6.3.bb b/meta/packages/gdb/gdb-cross_6.3.bb
new file mode 100644
index 0000000000..a6823b6373
--- /dev/null
+++ b/meta/packages/gdb/gdb-cross_6.3.bb
@@ -0,0 +1,36 @@
1LICENSE = "GPL"
2DESCRIPTION = "gdb - GNU debugger"
3SECTION = "base"
4PRIORITY = "optional"
5MAINTAINER = "Phil Blundell <pb@nexus.co.uk>"
6DEPENDS = "ncurses-native"
7
8inherit autotools sdk
9
10S = "${WORKDIR}/gdb-${PV}"
11SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
12 file://sim-install.patch;patch=1"
13
14FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gdb-${PV}"
15
16export CC_FOR_BUILD = "${BUILD_CC}"
17export CXX_FOR_BUILD = "${BUILD_CXX}"
18export CPP_FOR_BUILD = "${BUILD_CPP}"
19export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
20export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
21export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
22
23EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils' LDFLAGS='${BUILD_LDFLAGS}'"
24
25EXTRA_OECONF = "--with-curses --with-readline"
26
27do_configure () {
28# override this function to avoid the autoconf/automake/aclocal/autoheader
29# calls for now
30 gnu-configize
31 oe_runconf
32}
33
34do_stage() {
35 :
36}
diff --git a/meta/packages/gdb/gdb_6.3.bb b/meta/packages/gdb/gdb_6.3.bb
new file mode 100644
index 0000000000..3e755cee67
--- /dev/null
+++ b/meta/packages/gdb/gdb_6.3.bb
@@ -0,0 +1,50 @@
1DESCRIPTION = "gdb - GNU debugger"
2HOMEPAGE = "http://www.gnu.org/software/gdb/"
3LICENSE="GPL"
4SECTION = "devel"
5PRIORITY = "optional"
6MAINTAINER = "Pawel Osiczko <p.osiczko@tetrapyloctomy.org>"
7DEPENDS = "ncurses readline"
8RDEPENDS_openmn = "libthread-db1"
9PR = "r2"
10
11PACKAGES =+ 'gdbserver '
12FILES_gdbserver = '${bindir}/gdbserver'
13
14inherit autotools gettext
15
16SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
17 file://uclibc.patch;patch=1 \
18 file://kill_arm_map_symbols.patch;patch=1 \
19 file://gdbserver-cflags-last.diff;patch=1;pnum=0"
20
21LDFLAGS_append = " -s"
22export CC_FOR_BUILD = "${BUILD_CC}"
23export CXX_FOR_BUILD = "${BUILD_CXX}"
24export CPP_FOR_BUILD = "${BUILD_CPP}"
25export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
26export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
27export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
28export CFLAGS_append=" -L${STAGING_LIBDIR}"
29EXTRA_OEMAKE = "'SUBDIRS=intl mmalloc libiberty opcodes bfd sim gdb etc utils'"
30
31EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x \
32 --with-curses --disable-multilib --with-readline --disable-sim \
33 --program-prefix=''"
34
35S = "${WORKDIR}/gdb-${PV}"
36B = "${WORKDIR}/build-${TARGET_SYS}"
37
38do_configure () {
39# override this function to avoid the autoconf/automake/aclocal/autoheader
40# calls for now
41 (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
42 CPPFLAGS="" oe_runconf
43}
44
45do_install () {
46 make -C bfd/doc chew LDFLAGS= CFLAGS=-O2
47 oe_runmake DESTDIR='${D}' install
48 install -d ${D}${bindir}
49 install -m 0755 gdb/gdbserver/gdbserver ${D}${bindir}
50}