gdb: Add a patch to fix compilation of gdb 6.8
authorHolger Hans Peter Freyther <zecke@selfish.org>
Sun, 2 Aug 2009 02:09:03 +0000 (04:09 +0200)
committerHolger Hans Peter Freyther <zecke@selfish.org>
Sun, 2 Aug 2009 02:17:44 +0000 (04:17 +0200)
gcc warns about the subscript_array being uninitialized,
just memset this area... luckily I can not break much as
this is for fortran code.

recipes/gdb/gdb-6.8/gdb-6.8-fix-compile-karmic.patch [new file with mode: 0644]
recipes/gdb/gdb-cross-sdk_6.8.bb
recipes/gdb/gdb_6.8.bb

diff --git a/recipes/gdb/gdb-6.8/gdb-6.8-fix-compile-karmic.patch b/recipes/gdb/gdb-6.8/gdb-6.8-fix-compile-karmic.patch
new file mode 100644 (file)
index 0000000..1080b16
--- /dev/null
@@ -0,0 +1,22 @@
+fix this on karmic
+
+cc1: warnings being treated as errors
+/home/ich/build/arm/armv5t/tmp/work/i686-armv5te-sdk-oe-linux-gnueabi/gdb-cross-sdk-6.8-r2/gdb-6.8/gdb/eval.c: In function 'evaluate_subexp_standard':
+/home/ich/build/arm/armv5t/tmp/work/i686-armv5te-sdk-oe-linux-gnueabi/gdb-cross-sdk-6.8-r2/gdb-6.8/gdb/eval.c:1705: error: 'subscript_array' may be used uninitialized in this function
+/home/ich/build/arm/armv5t/tmp/work/i686-armv5te-sdk-oe-linux-gnueabi/gdb-cross-sdk-6.8-r2/gdb-6.8/gdb/eval.c:1644: note: 'subscript_array' was declared here
+
+
+
+Index: gdb-6.8/gdb/eval.c
+===================================================================
+--- gdb-6.8.orig/gdb/eval.c    2009-08-02 03:25:20.000000000 +0200
++++ gdb-6.8/gdb/eval.c 2009-08-02 03:53:39.000000000 +0200
+@@ -1656,6 +1656,8 @@
+       if (nargs != ndimensions)
+         error (_("Wrong number of subscripts"));
++        memset(&subscript_array, 0, sizeof(subscript_array));
++
+       /* Now that we know we have a legal array subscript expression 
+          let us actually find out where this element exists in the array. */
index 6aed03d..66e1454 100644 (file)
@@ -1,6 +1,7 @@
 require gdb-cross.inc
 
-SRC_URI += "file://gcc-4.3-build-error.patch;patch=1;pnum=0"
+SRC_URI += "file://gcc-4.3-build-error.patch;patch=1;pnum=0 \
+            file://gdb-6.8-fix-compile-karmic.patch;patch=1"
 
 DEPENDS = "ncurses-sdk"
 
index afa4286..ff14c0f 100644 (file)
@@ -1,6 +1,7 @@
 require gdb.inc
 LICENSE = "GPLv3"
 
-SRC_URI += "file://gcc-4.3-build-error.patch;patch=1;pnum=0"
+SRC_URI += "file://gcc-4.3-build-error.patch;patch=1;pnum=0 \
+            file://gdb-6.8-fix-compile-karmic.patch;patch=1"
 
 PR = "r3"