This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: GAS patch for sh*-unknown-linux-gnu
- To: NIIBE Yutaka <gniibe at m17n dot org>
- Subject: Re: GAS patch for sh*-unknown-linux-gnu
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Mon, 15 Oct 2001 23:09:28 -0400 (EDT)
- cc: <binutils at sources dot redhat dot com>, <corsepiu at faw dot uni-ulm dot de>, <bje at redhat dot com>
On Wed, 3 Oct 2001, NIIBE Yutaka wrote:
> Here's a patch for gas for the target sh*-unknown-linux-gnu.
> Besides, we'd like to set default as little endian for
> sh-unknown-linux-gnu, because it's more populer for SH-3 and SH-4.
To me, it seems that you (Niibe) are right in that sh-linux is
always little-endian. Refer to ASM_SPEC in
gcc/config/sh/linux.h. Making it the default for sh-linux seems
it would only make things simpler, for people who need to write
mixed assembly and C.
I'm not really sure about using "sh*eb-*-linux*" to denote a
GNU/Linux system using big endian code and data. Is this triple
new or has it been used somewhere else? I'm not sure I can
approve it if it's new. Do we need it; do you know of any
GNU/Linux big endian variant? It's not used in e.g. bfd. Is
there an existing (non-SH-based) port where sh* would collide?
Can Ben Elliston, the config.* maintainer, shed some light?
I'd like to hear if the sh-linux change of default would
actually cause people any problems. Ralf Corsepius, you were
opposed to this change. Do you have a big-endian SH-based port,
or do you think this change would be bad for other reasons than
there would then be different default-endians among sh-*-*
ELF-based targets?
I'll wait until at least the weekend with committing the
remaining patch below, or until things are clear enough. Right
now, I think I'll commit not this patch, but a variant, just
changing sh-*-linux* to get a little-endian-default assembler
(adding endian=little to sh-*-linux*).
2001-10-16 NIIBE Yutaka <gniibe@m17n.org>
* configure.in (sh*eb-*-linux*): New case, defaulting to
big-endian.
(sh*-*-linux*): Default to little-endian.
* configure: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.79
diff -p -c -r1.79 configure.in
*** configure.in 2001/10/16 02:36:19 1.79
--- configure.in 2001/10/16 02:47:12
*************** changequote([,])dnl
*** 399,405 ****
s390x-*-linux-gnu*) fmt=elf em=linux ;;
s390-*-linux-gnu*) fmt=elf em=linux ;;
! sh-*-linux*) fmt=elf em=linux ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff bfd_gas=yes;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
--- 399,406 ----
s390x-*-linux-gnu*) fmt=elf em=linux ;;
s390-*-linux-gnu*) fmt=elf em=linux ;;
! sh*eb-*-linux*) fmt=elf em=linux endian=big ;;
! sh*-*-linux*) fmt=elf em=linux endian=little ;;
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff bfd_gas=yes;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes endian=little ;;
brgds, H-P