bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

binutils-2.17.50 build fails: bfd/coffcode.h


From: anirkko
Subject: binutils-2.17.50 build fails: bfd/coffcode.h
Date: Fri, 20 Apr 2007 23:26:06 +0200 (MET DST)


Hi

Build of snapshot binutils-2.17.50 fails (using gcc-4.1.2)
when compiling bfd/pe-sh.c inside coffcode.h line 4911
because of the following difference regarding CALC_ADDEND()
in file bfd/coff-sh.c which is included by bfd/pe-sh.c

/* This is the same as the macro in coffcode.h, except that it copies
   r_offset into reloc_entry->addend for some relocs.  */
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)                \

Workaround:
as usual, without further insightful thought, setting
  dst.r_offset = 0;
to zero in file bfd/coffcode.h just before the first use in the call
  coff_swap_reloc_in (abfd, src, &dst)
makes the problem go away for the moment, and the build continues.
But might there a potential problem behind it somewhere?

Greets,
Arto


The output is:
------------------------------------------------------------------------
...
...
/bin/ksh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. 
-I/build/binutils-2.17.50/bfd -I. -I. -I/build/binutils-2.17.50/bfd 
-I/build/binutils-2.17.50/bfd/../include     -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -Werror -O3 -mcpu=supersparc -mno-app-regs -c -o pe-sh.lo 
/build/binutils-2.17.50/bfd/pe-sh.c
gcc -DHAVE_CONFIG_H -I. -I/build/binutils-2.17.50/bfd -I. -I. 
-I/build/binutils-2.17.50/bfd -I/build/binutils-2.17.50/bfd/../include -W -Wall 
-Wstrict-prototypes -Wmissing-prototypes -Werror -O3 -mcpu=supersparc 
-mno-app-regs -c /build/binutils-2.17.50/bfd/pe-sh.c -o pe-sh.o
cc1: warnings being treated as errors
/build/binutils-2.17.50/bfd/coffcode.h: In function 'coff_canonicalize_reloc':
/build/binutils-2.17.50/bfd/coffcode.h:4911: warning: 'dst.r_offset' is used 
uninitialized in this function
gmake[4]: *** [pe-sh.lo] Error 1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]