Package: binutils
Version: 2.16.1cvs20051214
Severity: important
Hi,
This is my first ever debian bug report, so please be kind :-)
I fail to build a cross-platform binutils when building from
source. I am trying to build binutils (2.16.1cvs20051214) for
mips-linux-gnu on a sparc64-linux-gnu host using gcc 4.0.2-5
and get the following error (due to -Werror):
../../src/bfd/elfxx-mips.c: In function
`_bfd_mips_elf_always_size_sections':
../../src/bfd/elfxx-mips.c:6644: warning: comparison between signed and
unsigned
The problem comes from (as far as I can deduce with my limited
knowledge of binutils and elf) the fact that ELF_MIPS_GP_OFFSET
and MIPS_ELF_GOT_MAX_SIZE produces a signed value rather than an
unsigned value.
The supplied patch fixes this problem by making the two constants
unsigned (beware! lines may have been wraped).
Don't hesitate to contact me if you need more information.
---------------------
diff -ud binutils-2.16.1cvs20051214.orig/bfd/elfxx-mips.c
binutils-2.16.1cvs20051214/bfd/elfxx-mips.c
--- binutils-2.16.1cvs20051214.orig/bfd/elfxx-mips.c 2006-01-06
19:20:33.721587529 +0100
+++ binutils-2.16.1cvs20051214/bfd/elfxx-mips.c 2006-01-06
19:42:41.523116150 +0100
@@ -549,11 +549,11 @@
#define MIPS_RESERVED_GOTNO (2)
/* The offset of $gp from the beginning of the .got section. */
-#define ELF_MIPS_GP_OFFSET(abfd) (0x7ff0)
+#define ELF_MIPS_GP_OFFSET(abfd) (0x7ff0U)
/* The maximum size of the GOT for it to be addressable using 16-bit
offsets from $gp. */
-#define MIPS_ELF_GOT_MAX_SIZE(abfd) (ELF_MIPS_GP_OFFSET(abfd) + 0x7fff)
+#define MIPS_ELF_GOT_MAX_SIZE(abfd) (ELF_MIPS_GP_OFFSET(abfd) + 0x7fffU)
/* Instructions which appear in a stub. */
#define STUB_LW(abfd) \
---------------------
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]