1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/binutils/2.15/binutils-2.15-allow-gcc-4.0.patch Fri May 18 15:59:22 2007 +0000
1.3 @@ -0,0 +1,75 @@
1.4 +Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
1.5 +
1.6 +Fixes:
1.7 +In file included from ./targ-cpu.h:1,
1.8 + 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,
1.9 + from ./obj-format.h:1,
1.10 + 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,
1.11 + from ./targ-env.h:1,
1.12 + 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,
1.13 + 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:
1.14 +/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
1.15 +make[3]: *** [app.o] Error 1
1.16 +make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
1.17 +
1.18 +when building binutils-2.15 with gcc-4.0
1.19 +
1.20 +
1.21 +diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
1.22 +--- binutils-2.15.old/gas/as.h 2003-11-22 18:14:21.000000000 -0800
1.23 ++++ binutils-2.15/gas/as.h 2006-02-14 22:05:35.000000000 -0800
1.24 +@@ -605,7 +605,26 @@
1.25 + struct expressionS;
1.26 + struct fix;
1.27 + typedef struct symbol symbolS;
1.28 +-struct relax_type;
1.29 ++
1.30 ++/* JF moved this here from as.h under the theory that nobody except MACHINE.c
1.31 ++ and write.c care about it anyway. */
1.32 ++/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
1.33 ++ incomplete element types in arrays, if relax_type isn't defined
1.34 ++ here. So I moved the definition back from tc.h to here. */
1.35 ++struct relax_type
1.36 ++{
1.37 ++ /* Forward reach. Signed number. > 0. */
1.38 ++ long rlx_forward;
1.39 ++ /* Backward reach. Signed number. < 0. */
1.40 ++ long rlx_backward;
1.41 ++
1.42 ++ /* Bytes length of this address. */
1.43 ++ unsigned char rlx_length;
1.44 ++
1.45 ++ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
1.46 ++ relax_substateT rlx_more;
1.47 ++};
1.48 ++
1.49 + typedef struct frag fragS;
1.50 +
1.51 + #ifdef BFD_ASSEMBLER
1.52 +diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
1.53 +--- binutils-2.15.old/gas/tc.h 2003-12-03 15:39:38.000000000 -0800
1.54 ++++ binutils-2.15/gas/tc.h 2006-02-14 22:03:35.000000000 -0800
1.55 +@@ -24,23 +24,6 @@
1.56 +
1.57 + extern const pseudo_typeS md_pseudo_table[];
1.58 +
1.59 +-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
1.60 +- and write.c care about it anyway. */
1.61 +-
1.62 +-struct relax_type
1.63 +-{
1.64 +- /* Forward reach. Signed number. > 0. */
1.65 +- long rlx_forward;
1.66 +- /* Backward reach. Signed number. < 0. */
1.67 +- long rlx_backward;
1.68 +-
1.69 +- /* Bytes length of this address. */
1.70 +- unsigned char rlx_length;
1.71 +-
1.72 +- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
1.73 +- relax_substateT rlx_more;
1.74 +-};
1.75 +-
1.76 + typedef struct relax_type relax_typeS;
1.77 +
1.78 + extern const int md_reloc_size; /* Size of a relocation record */