packages/binutils: Binutils 2.17 make compile on OSX
authorHolger Freyther <zecke@selfish.org>
Fri, 11 Aug 2006 08:20:11 +0000 (08:20 +0000)
committerHolger Freyther <zecke@selfish.org>
Fri, 11 Aug 2006 08:20:11 +0000 (08:20 +0000)
    OSX claims that stopc might end up uninitialized. Initialize
    it to '0' to and hope it works out. This fixes the compile and
    I have an ARM EABI toolchain on OSX that could work...

packages/binutils/binutils-2.17/warning-free.patch [new file with mode: 0644]
packages/binutils/binutils_2.17.bb

diff --git a/packages/binutils/binutils-2.17/warning-free.patch b/packages/binutils/binutils-2.17/warning-free.patch
new file mode 100644 (file)
index 0000000..e6424ff
--- /dev/null
@@ -0,0 +1,94 @@
+Index: binutils-2.17/gas/read.c
+===================================================================
+--- binutils-2.17.orig/gas/read.c      2006-08-08 11:25:56.000000000 +0200
++++ binutils-2.17/gas/read.c   2006-08-10 11:19:24.000000000 +0200
+@@ -1283,7 +1283,7 @@
+   unsigned int align_limit = ALIGN_LIMIT;
+   unsigned int align;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   offsetT fill = 0;
+   int max;
+   int fill_p;
+@@ -1427,7 +1427,7 @@
+   offsetT temp, size;
+   symbolS *symbolP = NULL;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   expressionS exp;
+   if (flag_mri)
+@@ -1542,7 +1542,7 @@
+   symbolS *sym;
+   offsetT align;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   if (!flag_mri)
+     {
+@@ -1811,7 +1811,7 @@
+ {
+   offsetT temp;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   if (flag_mri)
+     stop = mri_comment_field (&stopc);
+@@ -1933,7 +1933,7 @@
+   int c;
+   symbolS *symbolP;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   if (flag_mri)
+     stop = mri_comment_field (&stopc);
+@@ -2885,7 +2885,7 @@
+   expressionS val;
+   char *p = 0;
+   char *stop = NULL;
+-  char stopc;
++  char stopc=0;
+   int bytes;
+ #ifdef md_flush_pending_output
+@@ -3061,7 +3061,7 @@
+   int flen;
+   char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   if (flag_mri)
+     stop = mri_comment_field (&stopc);
+@@ -3138,7 +3138,7 @@
+ s_struct (int ignore ATTRIBUTE_UNUSED)
+ {
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   if (flag_mri)
+     stop = mri_comment_field (&stopc);
+@@ -3518,7 +3518,7 @@
+   int c;
+   expressionS exp;
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+ #ifdef md_flush_pending_output
+   md_flush_pending_output ();
+@@ -5014,7 +5014,7 @@
+ equals (char *sym_name, int reassign)
+ {
+   char *stop = NULL;
+-  char stopc;
++  char stopc = 0;
+   input_line_pointer++;
+   if (*input_line_pointer == '=')
index 3edbe20..d9e167f 100644 (file)
@@ -22,6 +22,9 @@ SRC_URI += "\
        file://400-mips-ELF_MAXPAGESIZE-4K.patch;patch=1 \
 "
 
+# Zecke's OSX fixes
+SRC_URI += " file://warning-free.patch;patch=1 "
+
 
 S = "${WORKDIR}/binutils-${PV}"
 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"