Package: mingw32-binutils
Version: 2.15.94-20050118.1-1
Severity: normal
Tags: patch

When building 'mingw32-binutils' on amd64/unstable with gcc-4.0,
I get the following error:

make[4]: Leaving directory 
`/mingw32-binutils-2.15.94-20050118.1/build_dir/objs/gas/po'
make[4]: Entering directory 
`/mingw32-binutils-2.15.94-20050118.1/build_dir/objs/gas'
gcc -DHAVE_CONFIG_H -I. 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas
 -I. -D_GNU_SOURCE -I. 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas
 -I../bfd 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/config
 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/../include
 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/..
 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/../bfd
 
-I/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/../intl
 -I../intl -DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -g -O2  -c 
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/app.c
In file included from ./targ-cpu.h:1,
                 from 
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/config/obj-coff.h:38,
                 from ./obj-format.h:1,
                 from 
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/config/te-pe.h:7,
                 from ./targ-env.h:1,
                 from 
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/as.h:625,
                 from 
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/app.c:30:
/mingw32-binutils-2.15.94-20050118.1/build_dir/src/binutils-2.15.94-20050118-1/gas/config/tc-i386.h:443:
 error: array type has incomplete element type
make[4]: *** [app.o] Error 1
make[4]: Leaving directory 
`/mingw32-binutils-2.15.94-20050118.1/build_dir/objs/gas'

With the attached patch from upstream the 'mingw32-binutils' 
can be compiled on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/mingw32-binutils-2.15.94-20050118.1/debian/rules 
./debian/rules
--- ../tmp-orig/mingw32-binutils-2.15.94-20050118.1/debian/rules        
2005-04-05 11:21:22.052172269 +0200
+++ ./debian/rules      2005-04-05 11:14:11.000000000 +0200
@@ -83,6 +83,7 @@
                                exit 1;                                         
\
                        fi;                                                     
\
                   done;
+       cd $(build_src)/$(binutils); patch -p1 <../../../gcc4-fix.diff
 
        touch $@
 
diff -urN ../tmp-orig/mingw32-binutils-2.15.94-20050118.1/gcc4-fix.diff 
./gcc4-fix.diff
--- ../tmp-orig/mingw32-binutils-2.15.94-20050118.1/gcc4-fix.diff       
1970-01-01 01:00:00.000000000 +0100
+++ ./gcc4-fix.diff     2005-04-05 11:20:56.426976861 +0200
@@ -0,0 +1,52 @@
+diff -urN tmp/gas/tc.h binutils-2.15.94-20050118-1/gas/tc.h
+--- tmp/gas/tc.h       2005-04-05 11:14:18.002679000 +0200
++++ binutils-2.15.94-20050118-1/gas/tc.h       2005-04-05 11:18:51.019490121 
+0200
+@@ -27,22 +27,6 @@
+ /* JF moved this here from as.h under the theory that nobody except MACHINE.c
+    and write.c care about it anyway.  */
+ 
+-struct relax_type
+-{
+-  /* Forward reach. Signed number. > 0.  */
+-  long rlx_forward;
+-  /* Backward reach. Signed number. < 0.  */
+-  long rlx_backward;
+-
+-  /* Bytes length of this address.  */
+-  unsigned char rlx_length;
+-
+-  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
+-  relax_substateT rlx_more;
+-};
+-
+-typedef struct relax_type relax_typeS;
+-
+ extern const int md_reloc_size;       /* Size of a relocation record.  */
+ 
+ char * md_atof (int, char *, int *);
+diff -urN ../tmp-orig/binutils-2.15/gas/as.h ./gas/as.h
+--- ../tmp-orig/binutils-2.15/gas/as.h 2003-11-23 03:14:21.000000000 +0100
++++ ./gas/as.h 2005-04-05 10:22:06.207874813 +0200
+@@ -397,6 +397,22 @@
+ /* Enough bits for address, but still an integer type.
+    Could be a problem, cross-assembling for 64-bit machines.  */
+ typedef addressT relax_addressT;
++
++struct relax_type
++{
++  /* Forward reach. Signed number. > 0.  */
++  long rlx_forward;
++  /* Backward reach. Signed number. < 0.  */
++  long rlx_backward;
++
++  /* Bytes length of this address.  */
++  unsigned char rlx_length;
++
++  /* Next longer relax-state.  0 means there is no 'next' relax-state.  */
++  relax_substateT rlx_more;
++};
++
++typedef struct relax_type relax_typeS;
+ 
+ /* main program "as.c" (command arguments etc) */
+ 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to