i've noticed an error during binutils crosscompilation
on i686-gnu-linux for x86-64-pc-mingw32 target:
cc1: warnings being treated as errors
compress.c: In function 'bfd_compress_section_contents':
compress.c:106:3: error: passing argument 2 of 'compress' from incompatible
/usr/include/zlib.h:1102:21: note: expected 'uLongf *' but argument is of type
afaics zlib expects address of ulong32 for argument 'compressed_size'
while bfd_compress_section_contents() passes address of bfd_size_type
which has 64-bits.
temporary patch for clean build:
This should no longer be a problem because the code has been rewritten and the compress function is no longer being used.
Binutils isn't compatible with zlib 1.2.5.
*** Bug 12170 has been marked as a duplicate of this bug. ***
I have no problem with zlib 1.2.3. Is this a new problem
with zlib 1.2.5?
(In reply to comment #4)
> I have no problem with zlib 1.2.3. Is this a new problem
> with zlib 1.2.5?
Bug 12170 is already reported using zlib 1.2.3, so the answer is no.
Changing the type of compressed_size from bfd_size_type to uLong should solve it because we are playing with zlib's rules here anyway. Like:
RCS file: /cvs/src/src/bfd/compress.c,v
retrieving revision 1.5
diff -u -p -r1.5 compress.c
--- bfd/compress.c 29 Oct 2010 12:10:23 -0000 1.5
+++ bfd/compress.c 29 Oct 2010 19:23:33 -0000
@@ -94,7 +94,7 @@ bfd_compress_section_contents (bfd *abfd
- bfd_size_type compressed_size;
+ uLong compressed_size;
compressed_size = compressBound (uncompressed_size) + 12;
Compiled fine for me on fedora9 for x86_64-w64-mingw32.