Subject: Re: alpha (any 64 bit?) host and mips target
To: matthew green <mrg@eterna.com.au>
From: Rafal Boni <rafal@mediaone.net>
List: tech-toolchain
Date: 11/13/2001 12:30:45
In message <29629.1005666619@splode.eterna.com.au>, you write: 

-> 64bit support *should* work....  :-)

The problem is that BFD64 is overloaded to mean "support a 64-bit BFD" and
"support 64-bit target vectors".  Since we don't include the 64-bit vectors
and elf32-mips.c makes references to them #ifdef BFD64, we lose...

The "right" fix seems to be to add an extra flag (or use the 
-DHAVE_xxx_target defines) to only include tests against bfd_elf64 when
those are included in the compiled-in targets.

For example, take this snippet (~ line 239 of elf32-mips.c):

#ifdef BFD64
#define IRIX_COMPAT(abfd) \
  (((abfd->xvec == &bfd_elf64_tradbigmips_vec) || \
    (abfd->xvec == &bfd_elf64_tradlittlemips_vec) || \
    (abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
    (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
  ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
#else
#define IRIX_COMPAT(abfd) \
  (((abfd->xvec == &bfd_elf32_tradbigmips_vec) || \
    (abfd->xvec == &bfd_elf32_tradlittlemips_vec)) ? ict_none : \
  ((ABI_N32_P (abfd) || ABI_64_P (abfd)) ? ict_irix6 : ict_irix5))
#endif

--rafal

----
Rafal Boni                                                  rafal@mediaone.net