From 8e3d11580a618ef60a4581c69d9db5fced2ddd9c Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 28 Aug 1992 00:08:13 +0000 Subject: Thu Aug 27 17:01:04 1992 Ian Lance Taylor (ian@cygnus.com) * targets.c, config/i960-bout.mt, hosts/*: added HOST_BIG_ENDIAN_DEFAULT_VECTOR and HOST_LITTLE_ENDIAN_DEFAULT_VECTOR because bout archive format depends on the endianness of the host. Added #define HOST_BIG_ENDIAN_P and #undef HOST_BIG_ENDIAN_P to a number of configuration files in hosts/ (it was already in some). --- bfd/targets.c | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) (limited to 'bfd/targets.c') diff --git a/bfd/targets.c b/bfd/targets.c index 8cd9fff..49a8196 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -401,10 +401,27 @@ extern bfd_target hppa_vec; #ifdef DEFAULT_VECTOR extern bfd_target DEFAULT_VECTOR; #endif +#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR +extern bfd_target HOST_BIG_ENDIAN_DEFAULT_VECTOR; +#endif +#ifdef HOST_LITTLE_ENDIAN_DEFAULT_VECTOR +extern bfd_target HOST_LITTLE_ENDIAN_DEFAULT_VECTOR; +#endif #ifdef SELECT_VECS bfd_target *target_vector[] = { + + /* 960 bout format depends on the host, so let targets choose a + default vector even if the provide SELECT_VECS. */ +#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR +#ifdef HOST_BIG_ENDIAN_P + &HOST_BIG_ENDIAN_DEFAULT_VECTOR, +#else /* ! defined (HOST_BIG_ENDIAN_P) */ + &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR, +#endif /* ! defined (HOST_BIG_ENDIAN_P) */ +#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */ + SELECT_VECS, 0 }; @@ -415,7 +432,15 @@ bfd_target *target_vector[] = { #ifdef DEFAULT_VECTOR &DEFAULT_VECTOR, -#endif +#else /* ! defined (DEFAULT_VECTOR) */ +#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR +#ifdef HOST_BIG_ENDIAN_P + &HOST_BIG_ENDIAN_DEFAULT_VECTOR, +#else /* ! defined (HOST_BIG_ENDIAN_P) */ + &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR, +#endif /* ! defined (HOST_BIG_ENDIAN_P) */ +#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */ +#endif /* ! defined (DEFAULT_VECTOR) */ &i386coff_vec, &i386aout_vec, @@ -465,7 +490,15 @@ bfd_target *target_vector[] = { bfd_target *default_vector[] = { #ifdef DEFAULT_VECTOR &DEFAULT_VECTOR, -#endif +#else /* ! defined (DEFAULT_VECTOR) */ +#ifdef HOST_BIG_ENDIAN_DEFAULT_VECTOR +#ifdef HOST_BIG_ENDIAN_P + &HOST_BIG_ENDIAN_DEFAULT_VECTOR, +#else /* ! defined (HOST_BIG_ENDIAN_P) */ + &HOST_LITTLE_ENDIAN_DEFAULT_VECTOR, +#endif /* ! defined (HOST_BIG_ENDIAN_P) */ +#endif /* defined (HOST_BIG_ENDIAN_DEFAULT_VECTOR) */ +#endif /* ! defined (DEFAULT_VECTOR) */ 0, }; -- cgit v1.1