build failure for ia64 (due to -Werror)

Alan Modra amodra@bigpond.net.au
Sat Mar 19 00:42:00 GMT 2005


On Fri, Mar 18, 2005 at 10:33:26PM +0100, Andreas Schwab wrote:
> James E Wilson <wilson@specifixinc.com> writes:
> 
> > On Fri, 2005-03-18 at 04:21, Alan Modra wrote:
> >> I would guess 32-bit host, no --enable-64-bit-bfd.  Then "bfd_vma insn"
> >> is 32-bit and ia64_insn is long long.  There's worse things in that code
> >> than type-punned pointers..
> >
> > I believe this can only happen if --enable-targets=all is used.
> >
> > I see this is a documented feature in configure.in.  This seems like a
> > flaw to me.  The elfxx-ia64.c file won't work without a 64-bit integer
> > type, and it seems unreasonable to try to fix this.
> 
> The use of 32-bit vs 64-bit bfd_vma has nothing to do with the general
> availability of a 64-bit type.  This bug is trivial to fix.  I've checked
> in this patch as obvious.
> 
> Andreas.
> 
> 2005-03-18  Andreas Schwab  <schwab@suse.de>
> 
> 	* elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
> 	from bfd_vma to ia64_insn, remove broken cast.

This only hides other more serious bugs in this function if bfd_vma is
32-bit.  For instance,

    case IA64_OPND_IMMU64:
      hit_addr -= (long) hit_addr & 0x3;
      t0 = bfd_getl64 (hit_addr);
      t1 = bfd_getl64 (hit_addr + 8);

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list