patches/binutils/2.15/160-allow-gcc-4.0.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jul 28 21:32:33 2008 +0000 (2008-07-28)
changeset 747 d3e603e7c17c
parent 745 patches/binutils/2.15/710-allow-gcc-4.0.patch@e445c00d134d
permissions -rw-r--r--
Fourth step at renaming patches: renumber all patches with a 10-step.
     1 Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
     2 
     3 Fixes:
     4 In file included from ./targ-cpu.h: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,
     6                  from ./obj-format.h: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,
     8                  from ./targ-env.h: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,
    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:
    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
    12 make[3]: *** [app.o] Error 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'
    14 
    15 when building binutils-2.15 with gcc-4.0
    16 
    17 
    18 diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
    19 --- binutils-2.15.old/gas/as.h	2003-11-22 18:14:21.000000000 -0800
    20 +++ binutils-2.15/gas/as.h	2006-02-14 22:05:35.000000000 -0800
    21 @@ -605,7 +605,26 @@
    22  struct expressionS;
    23  struct fix;
    24  typedef struct symbol symbolS;
    25 -struct relax_type;
    26 +
    27 +/* JF moved this here from as.h under the theory that nobody except MACHINE.c
    28 +   and write.c care about it anyway.  */
    29 +/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
    30 +            incomplete element types in arrays, if relax_type isn't defined
    31 +            here. So I moved the definition back from tc.h to here. */
    32 +struct relax_type
    33 +{
    34 +  /* Forward reach. Signed number. > 0.  */
    35 +  long rlx_forward;
    36 +  /* Backward reach. Signed number. < 0.  */
    37 +  long rlx_backward;
    38 +
    39 +  /* Bytes length of this address.  */
    40 +  unsigned char rlx_length;
    41 +
    42 +  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
    43 +  relax_substateT rlx_more;
    44 +};
    45 +
    46  typedef struct frag fragS;
    47  
    48  #ifdef BFD_ASSEMBLER
    49 diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
    50 --- binutils-2.15.old/gas/tc.h	2003-12-03 15:39:38.000000000 -0800
    51 +++ binutils-2.15/gas/tc.h	2006-02-14 22:03:35.000000000 -0800
    52 @@ -24,23 +24,6 @@
    53  
    54  extern const pseudo_typeS md_pseudo_table[];
    55  
    56 -/* JF moved this here from as.h under the theory that nobody except MACHINE.c
    57 -   and write.c care about it anyway.  */
    58 -
    59 -struct relax_type
    60 -{
    61 -  /* Forward reach. Signed number. > 0.  */
    62 -  long rlx_forward;
    63 -  /* Backward reach. Signed number. < 0.  */
    64 -  long rlx_backward;
    65 -
    66 -  /* Bytes length of this address.  */
    67 -  unsigned char rlx_length;
    68 -
    69 -  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
    70 -  relax_substateT rlx_more;
    71 -};
    72 -
    73  typedef struct relax_type relax_typeS;
    74  
    75  extern const int md_reloc_size;	/* Size of a relocation record */