New targets: shle-elf / sh64le-elf
Joern Rennecke
joern.rennecke@superh.com
Wed Jun 5 13:00:00 GMT 2002
I have checked in the attached patch, which allows to configure
for SH so that the default endianness is little endian.
Right now, only the shle-elf configuration is operational, for
the sh64le-elf configuration, I'm waiting for approval of a config.sub
patch.
--
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330
-------------- next part --------------
gcc:
Wed Jun 5 20:42:31 2002 J"orn Rennecke <joern.rennecke@superh.com>
* config.gcc (sh-*-elf*, sh64*-*-elf*): Unify.
(shl*-*-elf*): Add.
* config/sh/t-be (MULTILIB_ENDIAN): Set.
* config/sh/t-le (MULTILIB_ENDIAN): Likewise.
* t-sh (MULTILIB_ENDIAN): Set.
(MULTILIB_OPTIONS): Use it.
* t-sh64 (MULTILIB_OPTIONS): Likewise.
(MULTILIB_DIRNAMES): Likewise.
bfd:
Wed Jun 5 20:42:31 2002 J"orn Rennecke <joern.rennecke@superh.com>
* config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
ld:
Wed Jun 5 20:42:31 2002 J"orn Rennecke <joern.rennecke@superh.com>
configure.tgt (shle*-*-elf*, sh64le-*-elf*): New configurations.
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.202
diff -p -r1.202 config.gcc
*** gcc/config.gcc 31 May 2002 04:00:40 -0000 1.202
--- gcc/config.gcc 5 Jun 2002 19:19:30 -0000
*************** s390x-*-linux*)
*** 2206,2225 ****
thread_file='posix'
fi
;;
! sh-*-elf*)
tmake_file="sh/t-sh sh/t-elf"
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h"
float_format=sh
! ;;
! sh64-*-elf*)
! tmake_file="sh/t-sh sh/t-elf sh/t-sh64"
! tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h sh/sh64.h"
! float_format=sh
! extra_headers="shmedia.h ushmedia.h sshmedia.h"
! # Not strictly necessary to check this, but a good idea anyway.
! if test $machine = $target; then
! target_requires_64bit_host_wide_int=yes
! fi
;;
sh-*-rtemself*)
xm_defines=POSIX
--- 2206,2232 ----
thread_file='posix'
fi
;;
! sh-*-elf* | shl*-*-elf* | sh64*-*-elf*)
tmake_file="sh/t-sh sh/t-elf"
+ case $machine in
+ shl* | sh64l*)
+ tm_file="sh/little.h ${tm_file}"
+ tmake_file="${tmake_file} sh/t-le"
+ ;;
+ esac
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/embed-elf.h"
float_format=sh
! case $machine in
! sh64*)
! tmake_file="${tmake_file} sh/t-sh64"
! tm_file="${tm_file} sh/sh64.h"
! extra_headers="shmedia.h ushmedia.h sshmedia.h"
! # Not strictly necessary to check this, but a good idea anyway.
! if test $machine = $target; then
! target_requires_64bit_host_wide_int=yes
! fi
! ;;
! esac
;;
sh-*-rtemself*)
xm_defines=POSIX
Index: gcc/config/sh/t-be
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-be,v
retrieving revision 1.1
diff -p -r1.1 t-be
*** gcc/config/sh/t-be 28 May 2002 22:26:43 -0000 1.1
--- gcc/config/sh/t-be 5 Jun 2002 19:19:30 -0000
***************
*** 1 ****
--- 1,2 ----
MULTILIB_OPTIONS= ml
+ MULTILIB_ENDIAN = ml
Index: gcc/config/sh/t-le
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-le,v
retrieving revision 1.1
diff -p -r1.1 t-le
*** gcc/config/sh/t-le 28 May 2002 22:26:43 -0000 1.1
--- gcc/config/sh/t-le 5 Jun 2002 19:19:30 -0000
***************
*** 1 ****
--- 1,2 ----
MULTILIB_OPTIONS= mb
+ MULTILIB_ENDIAN = mb
Index: gcc/config/sh/t-sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-sh,v
retrieving revision 1.11
diff -p -r1.11 t-sh
*** gcc/config/sh/t-sh 22 May 2002 16:24:42 -0000 1.11
--- gcc/config/sh/t-sh 5 Jun 2002 19:19:30 -0000
*************** fp-bit.c: $(srcdir)/config/fp-bit.c
*** 30,36 ****
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
! MULTILIB_OPTIONS= ml m2/m3e/m4-single-only/m4-single/m4
MULTILIB_DIRNAMES=
MULTILIB_MATCHES = m2=m3 m2=m4-nofpu
--- 30,37 ----
echo '#endif' >> fp-bit.c
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
! MULTILIB_ENDIAN = ml
! MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m2/m3e/m4-single-only/m4-single/m4
MULTILIB_DIRNAMES=
MULTILIB_MATCHES = m2=m3 m2=m4-nofpu
Index: gcc/config/sh/t-sh64
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-sh64,v
retrieving revision 1.3
diff -p -r1.3 t-sh64
*** gcc/config/sh/t-sh64 22 May 2002 17:49:45 -0000 1.3
--- gcc/config/sh/t-sh64 5 Jun 2002 19:19:30 -0000
*************** LIB1ASMFUNCS = \
*** 6,11 ****
_shcompact_incoming_args _ic_invalidate _nested_trampoline \
_push_pop_shmedia_regs
! MULTILIB_OPTIONS= ml m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
! MULTILIB_DIRNAMES= ml nofpu compact nofpu/compact media64 nofpu/media64
MULTILIB_MATCHES=
--- 6,11 ----
_shcompact_incoming_args _ic_invalidate _nested_trampoline \
_push_pop_shmedia_regs
! MULTILIB_OPTIONS = $(MULTILIB_ENDIAN) m5-32media-nofpu/m5-compact/m5-compact-nofpu/m5-64media/m5-64media-nofpu
! MULTILIB_DIRNAMES= $(MULTILIB_ENDIAN) nofpu compact nofpu/compact media64 nofpu/media64
MULTILIB_MATCHES=
Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.93
diff -p -r1.93 config.bfd
*** bfd/config.bfd 24 May 2002 09:26:44 -0000 1.93
--- bfd/config.bfd 5 Jun 2002 19:19:35 -0000
*************** case "${targ}" in
*** 866,871 ****
--- 866,876 ----
#endif
#ifdef BFD64
+ sh64l*-*-elf*)
+ targ_defvec=bfd_elf32_sh64l_vec
+ targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
+ targ_underscore=yes
+ ;;
sh64-*-elf*)
targ_defvec=bfd_elf32_sh64_vec
targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec"
*************** case "${targ}" in
*** 918,923 ****
--- 923,936 ----
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
;;
+ shl*-*-elf*)
+ targ_defvec=bfd_elf32_shl_vec
+ targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
+ #ifdef BFD64
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
+ #endif
+ targ_underscore=yes
+ ;;
sh-*-elf* | sh-*-rtemself*)
targ_defvec=bfd_elf32_sh_vec
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.90
diff -p -r1.90 configure.tgt
*** ld/configure.tgt 26 May 2002 05:04:53 -0000 1.90
--- ld/configure.tgt 5 Jun 2002 19:19:35 -0000
*************** sh*-*-netbsdelf*)
*** 276,281 ****
--- 276,285 ----
targ_emul=shelf_nbsd
targ_extra_emuls=shlelf_nbsd
;;
+ shle*-*-elf*)
+ targ_emul=shlelf
+ targ_extra_emuls="shelf shl sh"
+ ;;
sh-*-elf* | sh-*-rtemself*)
targ_emul=shelf
targ_extra_emuls="shlelf sh shl"
*************** sh-*-elf* | sh-*-rtemself*)
*** 283,288 ****
--- 287,297 ----
sh-*-pe) targ_emul=shpe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
+ sh64le-*-elf*)
+ targ_emul=shlelf
+ targ_extra_emuls="shelf shlelf32 shelf32 shlelf64 shelf64"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
sh64-*-elf*)
targ_emul=shelf
targ_extra_emuls="shlelf shelf32 shlelf32 shelf64 shlelf64"
More information about the Binutils
mailing list