Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/dist/toolchain Add support for building sh-*-netbsdelf (...
details: https://anonhg.NetBSD.org/src/rev/7881412e7497
branches: trunk
changeset: 519322:7881412e7497
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Dec 15 02:18:24 2001 +0000
description:
Add support for building sh-*-netbsdelf (elf32-sh-big) and
shle-*-netbsdelf (elf32-sh-little).
diffstat:
gnu/dist/toolchain/bfd/Makefile.am | 6 +
gnu/dist/toolchain/bfd/Makefile.in | 6 +
gnu/dist/toolchain/bfd/config.bfd | 11 +
gnu/dist/toolchain/bfd/configure | 2 +
gnu/dist/toolchain/bfd/configure.in | 2 +
gnu/dist/toolchain/bfd/elf32-sh-nbsd.c | 29 +++
gnu/dist/toolchain/bfd/elf32-shunx.c | 7 -
gnu/dist/toolchain/bfd/targets.c | 4 +-
gnu/dist/toolchain/configure.in | 3 +
gnu/dist/toolchain/gas/config/tc-sh.h | 4 +-
gnu/dist/toolchain/gas/configure | 4 +
gnu/dist/toolchain/gas/configure.in | 4 +
gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h | 50 +++++
gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h | 165 +++++++++++++++++++
gnu/dist/toolchain/gcc/configure | 10 +
gnu/dist/toolchain/gcc/configure.in | 10 +
gnu/dist/toolchain/ld/Makefile.am | 8 +
gnu/dist/toolchain/ld/Makefile.in | 8 +
gnu/dist/toolchain/ld/configure.tgt | 8 +
gnu/dist/toolchain/ld/emulparams/shelf_nbsd.sh | 14 +
gnu/dist/toolchain/ld/emulparams/shlelf_nbsd.sh | 14 +
21 files changed, 358 insertions(+), 11 deletions(-)
diffs (truncated from 620 to 300 lines):
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/Makefile.am
--- a/gnu/dist/toolchain/bfd/Makefile.am Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/Makefile.am Sat Dec 15 02:18:24 2001 +0000
@@ -203,6 +203,7 @@
elf32-ppc.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
+ elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
@@ -343,6 +344,7 @@
elf32-ppc.c \
elf32-sh.c \
elf32-sh-lin.c \
+ elf32-sh-nbsd.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
@@ -1072,6 +1074,10 @@
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/Makefile.in
--- a/gnu/dist/toolchain/bfd/Makefile.in Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/Makefile.in Sat Dec 15 02:18:24 2001 +0000
@@ -326,6 +326,7 @@
elf32-ppc.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
+ elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
elf32-vax.lo \
@@ -467,6 +468,7 @@
elf32-ppc.c \
elf32-sh.c \
elf32-sh-lin.c \
+ elf32-sh-nbsd.c \
elf32-sparc.c \
elf32-v850.c \
elf32-vax.c \
@@ -1610,6 +1612,10 @@
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/config.bfd
--- a/gnu/dist/toolchain/bfd/config.bfd Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/config.bfd Sat Dec 15 02:18:24 2001 +0000
@@ -47,6 +47,7 @@
pj*) targ_archs="bfd_pj_arch bfd_i386_arch";;
powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+sh*) targ_archs="bfd_sh_arch" ;;
sparc*) targ_archs=bfd_sparc_arch ;;
v850*) targ_archs=bfd_v850_arch ;;
z8k*) targ_archs=bfd_z8k_arch ;;
@@ -763,6 +764,16 @@
targ_selvecs=bfd_elf32_shlin_vec
;;
+ sh-*-netbsdelf*)
+ targ_defvec=bfd_elf32_shnbsd_vec
+ targ_selvecs="bfd_elf32_shlnbsd_vec bfd_elf32_sh_vec bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
+ ;;
+
+ shle-*-netbsdelf*)
+ targ_defvec=bfd_elf32_shlnbsd_vec
+ targ_selvecs="bfd_elf32_shnbsd_vec bfd_elf32_sh_vec bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
+ ;;
+
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"
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/configure
--- a/gnu/dist/toolchain/bfd/configure Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/configure Sat Dec 15 02:18:24 2001 +0000
@@ -5974,6 +5974,8 @@
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/configure.in
--- a/gnu/dist/toolchain/bfd/configure.in Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/configure.in Sat Dec 15 02:18:24 2001 +0000
@@ -547,6 +547,8 @@
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/elf32-sh-nbsd.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/bfd/elf32-sh-nbsd.c Sat Dec 15 02:18:24 2001 +0000
@@ -0,0 +1,29 @@
+/* Hitachi SH specific support for 32-bit NetBSD
+ Copyright 2000 Free Software Foundation, Inc.
+
+This file is part of BFD, the Binary File Descriptor library.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define TARGET_BIG_SYM bfd_elf32_shnbsd_vec
+#define TARGET_BIG_NAME "elf32-sh-nbsd"
+#define TARGET_LITTLE_SYM bfd_elf32_shlnbsd_vec
+#define TARGET_LITTLE_NAME "elf32-shl-nbsd"
+#define ELF_ARCH bfd_arch_sh
+#define ELF_MACHINE_CODE EM_SH
+#define ELF_MAXPAGESIZE 0x10000
+#define elf_symbol_leading_char 0
+
+#include "elf32-sh.c"
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/elf32-shunx.c
--- a/gnu/dist/toolchain/bfd/elf32-shunx.c Sat Dec 15 01:50:33 2001 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-#define TARGET_BIG_SYM bfd_elf32_shunx_vec
-#define TARGET_BIG_NAME "elf32-sh-unx"
-#define TARGET_LITTLE_SYM bfd_elf32_shlunx_vec
-#define TARGET_LITTLE_NAME "elf32-shl-unx"
-#define ELF_MAXPAGESIZE 0x1000
-
-#include "elf32-sh.c"
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/bfd/targets.c
--- a/gnu/dist/toolchain/bfd/targets.c Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/bfd/targets.c Sat Dec 15 02:18:24 2001 +0000
@@ -543,8 +543,8 @@
extern const bfd_target bfd_elf32_pjl_vec;
extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
-extern const bfd_target bfd_elf32_shunx_vec;
-extern const bfd_target bfd_elf32_shlunx_vec;
+extern const bfd_target bfd_elf32_shnbsd_vec;
+extern const bfd_target bfd_elf32_shlnbsd_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/configure.in
--- a/gnu/dist/toolchain/configure.in Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/configure.in Sat Dec 15 02:18:24 2001 +0000
@@ -592,6 +592,9 @@
# newlib is not 64 bit ready
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ sh*-*-netbsd*)
+ noconfigdirs="$noconfigdirs gdb"
+ ;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs target-libjava target-libffi target-zlib"
noconfigdirs="$noconfigdirs target-boehm-gc target-qthreads target-examples"
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/gas/config/tc-sh.h
--- a/gnu/dist/toolchain/gas/config/tc-sh.h Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/gas/config/tc-sh.h Sat Dec 15 02:18:24 2001 +0000
@@ -162,8 +162,8 @@
extern int target_big_endian;
#ifdef TE_NetBSD
-#define TARGET_FORMAT (shl ? "elf32-shl-unx" : "elf32-sh-unx")
-#elifdef TE_LINUX
+#define TARGET_FORMAT (shl ? "elf32-shl-nbsd" : "elf32-sh-nbsd")
+#elif defined(TE_LINUX)
#define TARGET_FORMAT (shl ? "elf32-sh-linux" : "elf32-shbig-linux")
#else
#define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh")
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/gas/configure
--- a/gnu/dist/toolchain/gas/configure Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/gas/configure Sat Dec 15 02:18:24 2001 +0000
@@ -2258,6 +2258,8 @@
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
+ sh*le) cpu_type=sh endian=little ;;
+ sh*) cpu_type=sh endian=big ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
@@ -2519,6 +2521,8 @@
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
+ sh-*-netbsdelf*) fmt=elf em=nbsd ;;
+ shle-*-netbsdelf*) fmt=elf em=nbsd ;;
sh-*-rtemself*) fmt=elf ;;
sh-*-rtems*) fmt=coff ;;
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/gas/configure.in
--- a/gnu/dist/toolchain/gas/configure.in Sat Dec 15 01:50:33 2001 +0000
+++ b/gnu/dist/toolchain/gas/configure.in Sat Dec 15 02:18:24 2001 +0000
@@ -142,6 +142,8 @@
powerpcle*) cpu_type=ppc endian=little ;;
powerpc*) cpu_type=ppc endian=big ;;
rs6000*) cpu_type=ppc ;;
+ sh*le) cpu_type=sh endian=little ;;
+ sh*) cpu_type=sh endian=big ;;
sparclite*) cpu_type=sparc arch=sparclite ;;
sparclet*) cpu_type=sparc arch=sparclet ;;
sparc64*) cpu_type=sparc arch=v9-64 ;;
@@ -394,6 +396,8 @@
sh-*-elf*) fmt=elf ;;
sh-*-coff*) fmt=coff ;;
sh-*-pe*) fmt=coff em=pe bfd_gas=yes;;
+ sh-*-netbsdelf*) fmt=elf em=nbsd ;;
+ shle-*-netbsdelf*) fmt=elf em=nbsd ;;
sh-*-rtemself*) fmt=elf ;;
sh-*-rtems*) fmt=coff ;;
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sh/netbsd-elf-little.h Sat Dec 15 02:18:24 2001 +0000
@@ -0,0 +1,50 @@
+/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor <ian%cygnus.com@localhost>.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
+%{!mb:-D__LITTLE_ENDIAN__} \
+%{m1:-D__sh1__} \
+%{m2:-D__sh2__} \
+%{m3:-D__sh3__} \
+%{m3e:-D__SH3E__} \
+%{m4-single-only:-D__SH4_SINGLE_ONLY__} \
+%{m4-single:-D__SH4_SINGLE__} \
+%{m4:-D__SH4__} \
+%{!m1:%{!m2:%{!m3:%{!m3e:%{!m4:%{!m4-single:%{!m4-single-only:-D__sh1__}}}}}}} \
+%{mhitachi:-D__HITACHI__}"
+
+/* Pass -ml and -mrelax to the assembler and linker. */
+#undef ASM_SPEC
+#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
+
+#undef LINK_SPEC
+#define LINK_SPEC \
+"%{mb:-m elf32shnbsd} %{mrelax:-relax} \
+ %{assert*} \
+ %{shared:-shared} \
+ %{!shared: \
+ -dc -dp \
+ %{!nostdlib:%{!r*:%{!e*:-e __start}}} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
+ %{static:-static}}"
diff -r 875ad963461e -r 7881412e7497 gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnu/dist/toolchain/gcc/config/sh/netbsd-elf.h Sat Dec 15 02:18:24 2001 +0000
@@ -0,0 +1,165 @@
+/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Contributed by Ian Lance Taylor <ian%cygnus.com@localhost>.
Home |
Main Index |
Thread Index |
Old Index