build failure for ia64 (due to -Werror)

James E Wilson wilson@specifixinc.com
Sat Mar 19 04:04:00 GMT 2005


On Fri, 2005-03-18 at 16:17, Andreas Schwab wrote:
> Ok, this is broken too.  I've reviewed all uses of bfd_vma and came up
> with this patch.  I think that should cover all those problems.  Maybe we
> should even dump ia64_insn and use bfd_uint64_t throughout instead?

You missed the point.  First of all, there is no bfd_uint64_t type when
there is no 64-bit BFD.  Secondly, all bfd_get_64 calls will fail when
there is no 64-bit BFD.  They call BFD_FAIL() in this case.  So all
bfd_get_64 calls need to be replaced with bfd_get_32 calls, and likewise
for other related functions, bfd_put_64, bfd_getl64, bfd_putl64, etc. 
Also, all long long constants (search for LL) will need to be removed. 
We can not have any uses of any 64-bit integer type at all.  There is
quite a bit of rewriting to make this all work, and we will need to
remember not to accidentally reintroduce any 64-bit code in the future. 
See for instance the elfNN_ia64_relax_brl change that Alan made last
month.

I think this is all pointless.  The elf32_ia64 vectors in config.bfd are
already protected by BFD64.  I think the problem is just what Ian
pointed out, which is that elf32-ia64.c is misclassified as a 32-bit
target in BFD32_BACKENDS etc.  It really is a 64-bit target that
generates 32-bit code, and requires a 64-bit BFD.  Hence the proper
solution is to stop compiling it on 32-bit hosts without long long. 
(Note: bfd assumes no long long is needed when --enable-targets=all is
used, unless you use --enable-64-bit-bfd.)

There are no changes needed in elfxx-ia64.c, not even the obvious one
that you already checked in, nor the one that Alan made last month, nor
the one you just proposed.

The only change we need here is a Makefile.am change.

But first I need to figure out how this stuff works.  All 3 machines on
my desk are 64-bit machines (even the embedded one), so I need to try
doing a build elsewhere.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com




More information about the Binutils mailing list