patches/binutils/2.15/binutils-2.15-allow-gcc-4.0.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
yann@1
     2
yann@1
     3
Fixes:
yann@1
     4
In file included from ./targ-cpu.h:1,
yann@1
     5
                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/obj-elf.h:42,
yann@1
     6
                 from ./obj-format.h:1,
yann@1
     7
                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/te-linux.h:4,
yann@1
     8
                 from ./targ-env.h:1,
yann@1
     9
                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/as.h:626,
yann@1
    10
                 from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/app.c:30:
yann@1
    11
/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/tc-i386.h:451: error: array type has incomplete element type
yann@1
    12
make[3]: *** [app.o] Error 1
yann@1
    13
make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
yann@1
    14
yann@1
    15
when building binutils-2.15 with gcc-4.0
yann@1
    16
yann@1
    17
yann@1
    18
diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
yann@1
    19
--- binutils-2.15.old/gas/as.h	2003-11-22 18:14:21.000000000 -0800
yann@1
    20
+++ binutils-2.15/gas/as.h	2006-02-14 22:05:35.000000000 -0800
yann@1
    21
@@ -605,7 +605,26 @@
yann@1
    22
 struct expressionS;
yann@1
    23
 struct fix;
yann@1
    24
 typedef struct symbol symbolS;
yann@1
    25
-struct relax_type;
yann@1
    26
+
yann@1
    27
+/* JF moved this here from as.h under the theory that nobody except MACHINE.c
yann@1
    28
+   and write.c care about it anyway.  */
yann@1
    29
+/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
yann@1
    30
+            incomplete element types in arrays, if relax_type isn't defined
yann@1
    31
+            here. So I moved the definition back from tc.h to here. */
yann@1
    32
+struct relax_type
yann@1
    33
+{
yann@1
    34
+  /* Forward reach. Signed number. > 0.  */
yann@1
    35
+  long rlx_forward;
yann@1
    36
+  /* Backward reach. Signed number. < 0.  */
yann@1
    37
+  long rlx_backward;
yann@1
    38
+
yann@1
    39
+  /* Bytes length of this address.  */
yann@1
    40
+  unsigned char rlx_length;
yann@1
    41
+
yann@1
    42
+  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
yann@1
    43
+  relax_substateT rlx_more;
yann@1
    44
+};
yann@1
    45
+
yann@1
    46
 typedef struct frag fragS;
yann@1
    47
 
yann@1
    48
 #ifdef BFD_ASSEMBLER
yann@1
    49
diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
yann@1
    50
--- binutils-2.15.old/gas/tc.h	2003-12-03 15:39:38.000000000 -0800
yann@1
    51
+++ binutils-2.15/gas/tc.h	2006-02-14 22:03:35.000000000 -0800
yann@1
    52
@@ -24,23 +24,6 @@
yann@1
    53
 
yann@1
    54
 extern const pseudo_typeS md_pseudo_table[];
yann@1
    55
 
yann@1
    56
-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
yann@1
    57
-   and write.c care about it anyway.  */
yann@1
    58
-
yann@1
    59
-struct relax_type
yann@1
    60
-{
yann@1
    61
-  /* Forward reach. Signed number. > 0.  */
yann@1
    62
-  long rlx_forward;
yann@1
    63
-  /* Backward reach. Signed number. < 0.  */
yann@1
    64
-  long rlx_backward;
yann@1
    65
-
yann@1
    66
-  /* Bytes length of this address.  */
yann@1
    67
-  unsigned char rlx_length;
yann@1
    68
-
yann@1
    69
-  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
yann@1
    70
-  relax_substateT rlx_more;
yann@1
    71
-};
yann@1
    72
-
yann@1
    73
 typedef struct relax_type relax_typeS;
yann@1
    74
 
yann@1
    75
 extern const int md_reloc_size;	/* Size of a relocation record */