summaryrefslogtreecommitdiff
path: root/cross/COMMON
diff options
context:
space:
mode:
authoritojun <itojun@pkgsrc.org>2001-01-04 01:19:29 +0000
committeritojun <itojun@pkgsrc.org>2001-01-04 01:19:29 +0000
commitdd883414471fad9d5b5c281094271497f3051731 (patch)
tree4d61527d99df077f5df9cf09e393392083ed6c50 /cross/COMMON
parent20f0d51c2badab1d70f659e450575550420a7eec (diff)
downloadpkgsrc-dd883414471fad9d5b5c281094271497f3051731.tar.gz
add sh*- and shel*- targets.
XXX there seem to be gcc internal issue with sh3 code generator, specifically with -O2. sys/nfs/* bombs with internal error.
Diffstat (limited to 'cross/COMMON')
-rw-r--r--cross/COMMON/patches-binutils/patch-sh451
-rw-r--r--cross/COMMON/patches-egcs/patch-sh540
2 files changed, 991 insertions, 0 deletions
diff --git a/cross/COMMON/patches-binutils/patch-sh b/cross/COMMON/patches-binutils/patch-sh
new file mode 100644
index 00000000000..4f166a9347e
--- /dev/null
+++ b/cross/COMMON/patches-binutils/patch-sh
@@ -0,0 +1,451 @@
+$NetBSD: patch-sh,v 1.1 2001/01/04 01:19:29 itojun Exp $
+
+ftp://ftp.netbsd.org/pub/NetBSD/arch/sh3/crosskit/
+
+diff -u -r -N -x *.orig -x CVS old/bfd/Makefile.am binutils-2.9.1/bfd/Makefile.am
+--- bfd/Makefile.am Wed Jan 3 20:40:59 2001
++++ bfd/Makefile.am Wed Jan 3 20:44:17 2001
+@@ -153,6 +153,7 @@
+ elf-m10200.lo \
+ elf-m10300.lo \
+ elf32-ppc.lo \
++ elf32-shunx.lo \
+ elf32-sh.lo \
+ elf32-sparc.lo \
+ elf32-v850.lo \
+@@ -260,6 +261,7 @@
+ elf-m10200.c \
+ elf-m10300.c \
+ elf32-ppc.c \
++ elf32-shunx.c \
+ elf32-sh.c \
+ elf32-sparc.c \
+ elf32-v850.c \
+@@ -797,6 +799,9 @@
+ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/ppc.h elf32-target.h
++elf32-shunx.lo: elf32-shunx.c $(INCDIR)/bfdlink.h elf-bfd.h \
++ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
++ elf32-target.h
+ elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+diff -u -r -N -x *.orig -x CVS old/bfd/Makefile.in binutils-2.9.1/bfd/Makefile.in
+--- bfd/Makefile.in Wed Jan 3 20:40:59 2001
++++ bfd/Makefile.in Wed Jan 3 20:44:04 2001
+@@ -242,6 +242,7 @@
+ elf-m10200.lo \
+ elf-m10300.lo \
+ elf32-ppc.lo \
++ elf32-shunx.lo \
+ elf32-sh.lo \
+ elf32-sparc.lo \
+ elf32-v850.lo \
+@@ -349,6 +350,7 @@
+ elf-m10200.c \
+ elf-m10300.c \
+ elf32-ppc.c \
++ elf32-shunx.c \
+ elf32-sh.c \
+ elf32-sparc.c \
+ elf32-v850.c \
+@@ -1254,6 +1256,9 @@
+ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/ppc.h elf32-target.h
++elf32-shunx.lo: elf32-shunx.c $(INCDIR)/bfdlink.h elf-bfd.h \
++ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
++ elf32-target.h
+ elf32-sh.lo: elf32-sh.c $(INCDIR)/bfdlink.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ elf32-target.h
+diff -u -r -N -x *.orig -x CVS old/bfd/config.bfd binutils-2.9.1/bfd/config.bfd
+--- bfd/config.bfd Wed Jan 3 20:55:42 2001
++++ bfd/config.bfd Wed Jan 3 20:46:00 2001
+@@ -40,6 +40,7 @@
+ powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+ rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;;
+ sparc*) targ_archs=bfd_sparc_arch ;;
++sh*) targ_archs=bfd_sh_arch ;;
+ v850*) targ_archs=bfd_v850_arch ;;
+ z8k*) targ_archs=bfd_z8k_arch ;;
+ *) targ_archs=bfd_${targ_cpu}_arch ;;
+@@ -494,14 +495,34 @@
+ targ_defvec=rs6000coff_vec
+ ;;
+
++ sh-*-netbsdelf)
++ targ_defvec=bfd_elf32_shunx_vec
++ targ_selvecs="bfd_elf32_shlunx_vec shcoff_vec shlcoff_vec "
++ targ_underscore=yes
++ ;;
++ shel-*-netbsdelf)
++ targ_defvec=bfd_elf32_shlunx_vec
++ targ_selvecs="bfd_elf32_shunx_vec shcoff_vec shlcoff_vec "
++ targ_underscore=yes
++ ;;
+ sh-*-elf*)
+ targ_defvec=bfd_elf32_sh_vec
+- targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
++ targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec "
++ targ_underscore=yes
++ ;;
++ sh-*-netbsdcoff)
++ targ_defvec=shcoff_vec
++ targ_selvecs="shlcoff_vec "
++ targ_underscore=yes
++ ;;
++ shel-*-netbsdcoff)
++ targ_defvec=shlcoff_vec
++ targ_selvecs="shcoff_vec "
+ targ_underscore=yes
+ ;;
+ sh-*-* | sh-*-rtems*)
+ targ_defvec=shcoff_vec
+- targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
++ targ_selvecs="shlcoff_vec "
+ targ_underscore=yes
+ ;;
+
+diff -u -r -N -x *.orig -x CVS old/bfd/configure binutils-2.9.1/bfd/configure
+--- bfd/configure Wed Jan 3 20:40:59 2001
++++ bfd/configure Wed Jan 3 20:46:23 2001
+@@ -2738,6 +2738,8 @@
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
++ bfd_elf32_shunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;;
++ bfd_elf32_shlunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+diff -u -r -N -x *.orig -x CVS old/bfd/configure.in binutils-2.9.1/bfd/configure.in
+--- bfd/configure.in Wed Jan 3 20:40:59 2001
++++ bfd/configure.in Wed Jan 3 20:46:30 2001
+@@ -423,6 +423,8 @@
+ bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpc_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
+ bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf32.lo $elf" ;;
++ bfd_elf32_shunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;;
++ bfd_elf32_shlunx_vec) tb="$tb elf32-shunx.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
+diff -u -r -N -x *.orig -x CVS old/bfd/elf32-sh.c binutils-2.9.1/bfd/elf32-sh.c
+--- bfd/elf32-sh.c Sat May 2 00:48:09 1998
++++ bfd/elf32-sh.c Wed Jan 3 20:47:15 2001
+@@ -1889,13 +1889,28 @@
+ return NULL;
+ }
+
++#ifndef TARGET_BIG_SYM
+ #define TARGET_BIG_SYM bfd_elf32_sh_vec
++#endif
++
++#ifndef TARGET_BIG_NAME
+ #define TARGET_BIG_NAME "elf32-sh"
++#endif
++
++#ifndef TARGET_LITTLE_SYM
+ #define TARGET_LITTLE_SYM bfd_elf32_shl_vec
++#endif
++
++#ifndef TARGET_LITTLE_NAME
+ #define TARGET_LITTLE_NAME "elf32-shl"
++#endif
++
+ #define ELF_ARCH bfd_arch_sh
+ #define ELF_MACHINE_CODE EM_SH
++
++#ifndef ELF_MAXPAGESIZE
+ #define ELF_MAXPAGESIZE 0x1
++#endif
+
+ #define elf_symbol_leading_char '_'
+
+diff -u -r -N -x *.orig -x CVS old/bfd/elf32-shunx.c binutils-2.9.1/bfd/elf32-shunx.c
+--- bfd/elf32-shunx.c Thu Jan 1 09:00:00 1970
++++ bfd/elf32-shunx.c Wed Jan 3 20:47:30 2001
+@@ -0,0 +1,7 @@
++#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 -u -r -N -x *.orig -x CVS old/bfd/targets.c binutils-2.9.1/bfd/targets.c
+--- bfd/targets.c Wed Jan 3 20:40:59 2001
++++ bfd/targets.c Wed Jan 3 20:47:40 2001
+@@ -504,6 +504,8 @@
+ extern const bfd_target bfd_elf32_mn10300_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_sh_vec;
+ extern const bfd_target bfd_elf32_shl_vec;
+ extern const bfd_target bfd_elf32_sparc_vec;
+diff -u -r -N -x *.orig -x CVS old/config.sub binutils-2.9.1/config.sub
+--- config.sub Wed Jan 3 20:41:00 2001
++++ config.sub Wed Jan 3 20:47:56 2001
+@@ -175,7 +175,7 @@
+ | arme[lb] | pyramid | mn10200 | mn10300 \
+ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
++ | we32k | ns16k | clipper | i370 | sh | shel | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 \
+ | mips64 | mipsel | mipseb | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+@@ -229,7 +229,7 @@
+ | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
+ | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
+ | xps100-* | clipper-* | orion-* \
+- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
++ | sparclite-* | pdp11-* | sh-* | shel-* | powerpc-* | powerpcle-* \
+ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+diff -u -r -N -x *.orig -x CVS old/ld/Makefile.am binutils-2.9.1/ld/Makefile.am
+--- ld/Makefile.am Wed Jan 3 20:40:59 2001
++++ ld/Makefile.am Wed Jan 3 20:49:44 2001
+@@ -169,6 +169,10 @@
+ eshelf.o \
+ eshlelf.o \
+ eshl.o \
++ eshunx.o \
++ eshlunx.o \
++ eelf32shunx.o \
++ eelf32shlunx.o \
+ esparcaout.o \
+ esparclinux.o \
+ esparclynx.o \
+@@ -488,6 +492,18 @@
+ eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shl "$(tdir_shl)"
++eshunx.c: $(srcdir)/emulparams/shunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} shunx "$(tdir_shunx)"
++eshlunx.c: $(srcdir)/emulparams/shlunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} shlunx "$(tdir_shlunx)"
++eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)"
++eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)"
+ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
+diff -u -r -N -x *.orig -x CVS old/ld/Makefile.in binutils-2.9.1/ld/Makefile.in
+--- ld/Makefile.in Wed Jan 3 20:40:59 2001
++++ ld/Makefile.in Wed Jan 3 20:49:38 2001
+@@ -245,6 +245,10 @@
+ eshelf.o \
+ eshlelf.o \
+ eshl.o \
++ eshunx.o \
++ eshlunx.o \
++ eelf32shunx.o \
++ eelf32shlunx.o \
+ esparcaout.o \
+ esparclinux.o \
+ esparclynx.o \
+@@ -998,6 +1002,18 @@
+ eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shl "$(tdir_shl)"
++eshunx.c: $(srcdir)/emulparams/shunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} shunx "$(tdir_shunx)"
++eshlunx.c: $(srcdir)/emulparams/shlunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} shlunx "$(tdir_shlunx)"
++eelf32shunx.c: $(srcdir)/emulparams/elf32shunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf32shunx "$(tdir_elf32shunx)"
++eelf32shlunx.c: $(srcdir)/emulparams/elf32shlunx.sh \
++ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
++ ${GENSCRIPTS} elf32shlunx "$(tdir_elf32shlunx)"
+ esparcaout.c: $(srcdir)/emulparams/sparcaout.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} sparcaout "$(tdir_sparcaout)"
+diff -u -r -N -x *.orig -x CVS old/ld/configure.tgt binutils-2.9.1/ld/configure.tgt
+--- ld/configure.tgt Wed Jan 3 20:41:00 2001
++++ ld/configure.tgt Wed Jan 3 20:51:01 2001
+@@ -114,8 +114,16 @@
+ targ_extra_emuls="h8500s h8500b h8500m h8500c"
+ ;;
+ sh-*-elf*) targ_emul=shelf
+- targ_extra_emuls="shlelf sh shl"
++ targ_extra_emuls="shlelf shunx shlunx"
+ ;;
++sh-*-netbsdelf) targ_emul=elf32shunx
++ targ_extra_emuls="elf32shlunx shunx shlunx"
++ ;;
++shel-*-netbsdelf) targ_emul=elf32shlunx
++ targ_extra_emuls="elf32shunx shunx shlunx"
++ ;;
++sh-*-netbsdcoff) targ_emul=shunx; targ_extra_emuls=shlunx ;;
++shel-*-netbsdcoff) targ_emul=shlunx; targ_extra_emuls=shunx ;;
+ sh-*-*|sh-*-rtems*) targ_emul=sh; targ_extra_emuls=shl ;;
+ m68k-sony-*) targ_emul=news ;;
+ m68k-hp-bsd*) targ_emul=hp300bsd ;;
+diff -u -r -N -x *.orig -x CVS old/ld/emulparams/elf32shlunx.sh binutils-2.9.1/ld/emulparams/elf32shlunx.sh
+--- ld/emulparams/elf32shlunx.sh Thu Jan 1 09:00:00 1970
++++ ld/emulparams/elf32shlunx.sh Wed Jan 3 20:51:16 2001
+@@ -0,0 +1,15 @@
++SCRIPT_NAME=elf
++OUTPUT_FORMAT="elf32-shl-unx"
++TEXT_START_ADDR=0x1000
++MAXPAGESIZE=0x1000
++ARCH=sh
++MACHINE=
++TEMPLATE_NAME=elf32
++GENERATE_SHLIB_SCRIPT=yes
++
++# These are for compatibility with the COFF toolchain.
++ENTRY=start
++CTOR_START='___ctors = .;'
++CTOR_END='___ctors_end = .;'
++DTOR_START='___dtors = .;'
++DTOR_END='___dtors_end = .;'
+diff -u -r -N -x *.orig -x CVS old/ld/emulparams/elf32shunx.sh binutils-2.9.1/ld/emulparams/elf32shunx.sh
+--- ld/emulparams/elf32shunx.sh Thu Jan 1 09:00:00 1970
++++ ld/emulparams/elf32shunx.sh Wed Jan 3 20:51:33 2001
+@@ -0,0 +1,15 @@
++SCRIPT_NAME=elf
++OUTPUT_FORMAT="elf32-sh-unx"
++TEXT_START_ADDR=0x1000
++MAXPAGESIZE=0x1000
++ARCH=sh
++MACHINE=
++TEMPLATE_NAME=elf32
++GENERATE_SHLIB_SCRIPT=yes
++
++# These are for compatibility with the COFF toolchain.
++ENTRY=start
++CTOR_START='___ctors = .;'
++CTOR_END='___ctors_end = .;'
++DTOR_START='___dtors = .;'
++DTOR_END='___dtors_end = .;'
+diff -u -r -N -x *.orig -x CVS old/ld/emulparams/shlunx.sh binutils-2.9.1/ld/emulparams/shlunx.sh
+--- ld/emulparams/shlunx.sh Thu Jan 1 09:00:00 1970
++++ ld/emulparams/shlunx.sh Wed Jan 3 20:51:54 2001
+@@ -0,0 +1,5 @@
++SCRIPT_NAME=shunx
++OUTPUT_FORMAT="coff-shl"
++TEXT_START_ADDR=0x1000
++TARGET_PAGE_SIZE=0x1000
++ARCH=sh
+diff -u -r -N -x *.orig -x CVS old/ld/emulparams/shunx.sh binutils-2.9.1/ld/emulparams/shunx.sh
+--- ld/emulparams/shunx.sh Thu Jan 1 09:00:00 1970
++++ ld/emulparams/shunx.sh Wed Jan 3 20:52:04 2001
+@@ -0,0 +1,5 @@
++SCRIPT_NAME=shunx
++OUTPUT_FORMAT="coff-sh"
++TEXT_START_ADDR=0x1000
++TARGET_PAGE_SIZE=0x1000
++ARCH=sh
+diff -u -r -N -x *.orig -x CVS old/ld/scripttempl/shunx.sc binutils-2.9.1/ld/scripttempl/shunx.sc
+--- ld/scripttempl/shunx.sc Thu Jan 1 09:00:00 1970
++++ ld/scripttempl/shunx.sc Wed Jan 3 20:52:24 2001
+@@ -0,0 +1,53 @@
++TORS=".tors :
++ {
++ ___ctors = . ;
++ *(.ctors)
++ ___ctors_end = . ;
++ ___dtors = . ;
++ *(.dtors)
++ ___dtors_end = . ;
++ }"
++
++
++cat <<EOF
++OUTPUT_FORMAT("${OUTPUT_FORMAT}")
++OUTPUT_ARCH(${ARCH})
++${LIB_SEARCH_DIRS}
++
++SECTIONS
++{
++ . = ${TEXT_START_ADDR} + SIZEOF_HEADERS;
++ .text ALIGN(0x10):
++ {
++ *(.text)
++ *(.strings)
++ ${RELOCATING+ _etext = . ; }
++ }
++ ${CONSTRUCTING+${TORS}}
++ .data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
++ {
++ *(.data)
++ ${RELOCATING+ _edata = . ; }
++ }
++ .bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
++ {
++ ${RELOCATING+ _bss_start = . ; }
++ *(.bss)
++ *(COMMON)
++ ${RELOCATING+ _end = . ; }
++ }
++ .stack :
++ {
++ ${RELOCATING+ _stack = . ; }
++ *(.stack)
++ }
++ .stab 0 ${RELOCATING+(NOLOAD)} :
++ {
++ *(.stab)
++ }
++ .stabstr 0 ${RELOCATING+(NOLOAD)} :
++ {
++ *(.stabstr)
++ }
++}
++EOF
+--- gas/configure- Wed Jan 3 21:34:11 2001
++++ gas/configure Wed Jan 3 21:35:19 2001
+@@ -1408,2 +1408,4 @@
+ rs6000*) cpu_type=ppc ;;
++ shel*) cpu_type=sh endian=little ;;
++ sh*) cpu_type=sh endian=big ;;
+ sparclite*) cpu_type=sparc arch=sparclite ;;
+@@ -1596,2 +1598,4 @@
+ sh-*-rtems*) fmt=coff ;;
++ sh-*-netbsdelf*) fmt=elf em=nbsd ;;
++ sh-*-netbsdcoff*) fmt=coff em=nbsd ;;
+
+--- gas/configure.in- Wed Jan 3 21:34:13 2001
++++ gas/configure.in Wed Jan 3 21:35:31 2001
+@@ -88,2 +88,4 @@
+ rs6000*) cpu_type=ppc ;;
++ shel*) cpu_type=sh endian=little ;;
++ sh*) cpu_type=sh endian=big ;;
+ sparclite*) cpu_type=sparc arch=sparclite ;;
+@@ -264,2 +266,4 @@
+ sh-*-rtems*) fmt=coff ;;
++ sh-*-netbsdelf*) fmt=elf em=nbsd ;;
++ sh-*-netbsdcoff*) fmt=coff em=nbsd ;;
+
+--- gas/config/tc-sh.h- Wed Jan 3 21:35:53 2001
++++ gas/config/tc-sh.h Wed Jan 3 21:36:21 2001
+@@ -22,3 +22,6 @@
+
++/* Set the endianness we are using. Default to little endian. */
++#ifndef TARGET_BYTES_BIG_ENDIAN
+ #define TARGET_BYTES_BIG_ENDIAN 0
++#endif
+
+@@ -136,3 +139,7 @@
+
++#ifdef TE_NetBSD
++#define TARGET_FORMAT (shl ? "elf32-shl-unx" : "elf32-sh-unx")
++#else
+ #define TARGET_FORMAT (shl ? "elf32-shl" : "elf32-sh")
++#endif
+
diff --git a/cross/COMMON/patches-egcs/patch-sh b/cross/COMMON/patches-egcs/patch-sh
new file mode 100644
index 00000000000..6c1e1bcb6e1
--- /dev/null
+++ b/cross/COMMON/patches-egcs/patch-sh
@@ -0,0 +1,540 @@
+$NetBSD: patch-sh,v 1.1 2001/01/04 01:19:32 itojun Exp $
+
+--- config.sub- Wed Jan 3 21:37:56 2001
++++ config.sub Wed Jan 3 21:38:16 2001
+@@ -165,3 +165,3 @@
+ | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
+- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
++ | we32k | ns16k | clipper | i370 | sh | shel | powerpc | powerpcle \
+ | 1750a | dsp16xx | pdp11 \
+@@ -213,3 +213,3 @@
+ | xps100-* | clipper-* | orion-* \
+- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
++ | sparclite-* | pdp11-* | sh-* | shel-* | powerpc-* | powerpcle-* \
+ | sparc64-* | mips64-* | mipsel-* | mipseb-* \
+@@ -679,2 +679,5 @@
+ os=-hms
++ ;;
++ shel)
++ basic_machine=sh-hitachi
+ ;;
+--- libio/floatconv.c- Wed Jan 3 21:40:32 2001
++++ libio/floatconv.c Wed Jan 3 21:40:42 2001
+@@ -151,7 +151,7 @@
+ #if defined(MIPSEL) || defined(__alpha__)
+ #define IEEE_8087
+ #endif
+-#if defined(__sparc__) || defined(sparc) || defined(MIPSEB)
++#if defined(__sparc__) || defined(sparc) || defined(MIPSEB) || defined(__sh__)
+ #define IEEE_MC68k
+ #endif
+
+--- gcc/configure.in- Wed Jan 3 21:41:07 2001
++++ gcc/configure.in Wed Jan 3 21:42:27 2001
+@@ -318,6 +318,9 @@
+ pyramid-*-*)
+ cpu_type=pyr
+ ;;
++ sh*-*-*)
++ cpu_type=sh
++ ;;
+ sparc*-*-*)
+ cpu_type=sparc
+ ;;
+@@ -2570,6 +2573,30 @@
+ sh-*-rtems*)
+ tmake_file="sh/t-sh t-rtems"
+ tm_file=sh/rtems.h
++ float_format=sh
++ ;;
++ sh-*-netbsdcoff)
++ tm_file=sh/netbsdcoff.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ shel-*-netbsdcoff)
++ tm_file=sh/netbsdelcoff.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ sh-*-netbsdelf)
++ tm_file=sh/netbsdelf.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ shel-*-netbsdelf)
++ tm_file=sh/netbsdelelf.h
++ use_collect2=
++ fixincludes=fixinc.wrap
+ float_format=sh
+ ;;
+ sh-*-*)
+--- gcc/configure- Wed Jan 3 21:41:09 2001
++++ gcc/configure Wed Jan 3 21:42:37 2001
+@@ -2220,6 +2220,9 @@
+ pyramid-*-*)
+ cpu_type=pyr
+ ;;
++ sh*-*-*)
++ cpu_type=sh
++ ;;
+ sparc*-*-*)
+ cpu_type=sparc
+ ;;
+@@ -4482,6 +4485,30 @@
+ sh-*-rtems*)
+ tmake_file="sh/t-sh t-rtems"
+ tm_file=sh/rtems.h
++ float_format=sh
++ ;;
++ sh-*-netbsdcoff)
++ tm_file=sh/netbsdcoff.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ shel-*-netbsdcoff)
++ tm_file=sh/netbsdelcoff.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ sh-*-netbsdelf)
++ tm_file=sh/netbsdelf.h
++ use_collect2=
++ fixincludes=fixinc.wrap
++ float_format=sh
++ ;;
++ shel-*-netbsdelf)
++ tm_file=sh/netbsdelelf.h
++ use_collect2=
++ fixincludes=fixinc.wrap
+ float_format=sh
+ ;;
+ sh-*-*)
+diff -uN gcc/config/sh/lib1funcs.asm gcc/config/sh/lib1funcs.asm
+--- gcc/config/sh/lib1funcs.asm Wed Jan 3 21:39:06 2001
++++ gcc/config/sh/lib1funcs.asm Wed Jan 3 21:40:10 2001
+@@ -707,7 +707,7 @@
+ mov.l r0,@(0,r4)
+ ___movstrSI0:
+ rts
+- or r0,r0,r0
++ nop
+
+ .align 4
+
+diff -uN gcc/config/sh/netbsdcoff.h gcc/config/sh/netbsdcoff.h
+--- gcc/config/sh/netbsdcoff.h Thu Jan 1 09:00:00 1970
++++ gcc/config/sh/netbsdcoff.h Wed Jan 3 21:43:23 2001
+@@ -0,0 +1,59 @@
++#include <sh/sh.h>
++
++#undef CPP_SPEC
++#define CPP_SPEC "%{posix:-D_POSIX_SOURCE} \
++%{ml:-D__LITTLE_ENDIAN__} \
++%{m1:-D__sh1__} \
++%{m2:-D__sh2__} \
++%{m3:-D__sh3__} \
++%{m3e:-D__SH3E__} \
++%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}"
++
++#undef CPP_PREDEFINES
++#define CPP_PREDEFINES "-D__sh__ -Dunix -Dsh3 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sh) -Amachine(sh)"
++
++/* XXX -fpic -fPIC? (msaitoh) */
++#undef ASM_SPEC
++#define ASM_SPEC "%{ml:-little} %{mrelax:-relax}"
++
++#undef LIB_SPEC
++#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ "%{ml:-m shlunx} %{mrelax:-relax} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
++
++/* We have atexit(3). */
++
++#define HAVE_ATEXIT
++
++/* Implicit library calls should use memcpy, not bcopy, etc. */
++
++#define TARGET_MEM_FUNCTIONS
++
++/* Handle #pragma weak and #pragma pack. */
++
++#define HANDLE_SYSV_PRAGMA
++
++
++/* Make gcc agree with <machine/ansi.h> */
++
++#undef SIZE_TYPE
++#define SIZE_TYPE "unsigned int"
++
++#undef PTRDIFF_TYPE
++#define PTRDIFF_TYPE "int"
++
++#undef WCHAR_TYPE
++#define WCHAR_TYPE "int"
++
++#undef WCHAR_UNSIGNED
++#define WCHAR_UNSIGNED 0
++
++#undef WCHAR_TYPE_SIZE
++#define WCHAR_TYPE_SIZE 32
++
++/* Until they use ELF or something that handles dwarf2 unwinds
++ and initialization stuff better. */
++#undef DWARF2_UNWIND_INFO
++
+diff -uN gcc/config/sh/netbsdelcoff.h gcc/config/sh/netbsdelcoff.h
+--- gcc/config/sh/netbsdelcoff.h Thu Jan 1 09:00:00 1970
++++ gcc/config/sh/netbsdelcoff.h Wed Jan 3 21:43:23 2001
+@@ -0,0 +1,64 @@
++#include <sh/sh.h>
++
++#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__} \
++%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}"
++
++#undef CPP_PREDEFINES
++#define CPP_PREDEFINES "-D__sh__ -Dunix -Dsh3 -D__NetBSD__ -Asystem(unix) -Asystem(NetBSD) -Acpu(sh) -Amachine(sh)"
++
++/* XXX -fpic -fPIC? (msaitoh) */
++#undef ASM_SPEC
++#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
++
++#undef LIB_SPEC
++#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ "%{!mb:-m shlunx} %{mrelax:-relax} %{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{R*} %{static:-Bstatic} %{assert*}"
++
++/* set default to little endian */
++
++#undef TARGET_DEFAULT
++#define TARGET_DEFAULT LITTLE_ENDIAN_BIT
++
++/* We have atexit(3). */
++
++#define HAVE_ATEXIT
++
++/* Implicit library calls should use memcpy, not bcopy, etc. */
++
++#define TARGET_MEM_FUNCTIONS
++
++/* Handle #pragma weak and #pragma pack. */
++
++#define HANDLE_SYSV_PRAGMA
++
++
++/* Make gcc agree with <machine/ansi.h> */
++
++#undef SIZE_TYPE
++#define SIZE_TYPE "unsigned int"
++
++#undef PTRDIFF_TYPE
++#define PTRDIFF_TYPE "int"
++
++#undef WCHAR_TYPE
++#define WCHAR_TYPE "int"
++
++#undef WCHAR_UNSIGNED
++#define WCHAR_UNSIGNED 0
++
++#undef WCHAR_TYPE_SIZE
++#define WCHAR_TYPE_SIZE 32
++
++/* Until they use ELF or something that handles dwarf2 unwinds
++ and initialization stuff better. */
++#undef DWARF2_UNWIND_INFO
++
+diff -uN gcc/config/sh/netbsdelelf.h gcc/config/sh/netbsdelelf.h
+--- gcc/config/sh/netbsdelelf.h Thu Jan 1 09:00:00 1970
++++ gcc/config/sh/netbsdelelf.h Wed Jan 3 21:43:23 2001
+@@ -0,0 +1,142 @@
++/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
++ Copyright (C) 1996 Free Software Foundation, Inc.
++ Contributed by Ian Lance Taylor <ian@cygnus.com>.
++
++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. */
++
++/* Get generic SH definitions. */
++#include <sh/sh.h>
++
++/* No SDB debugging info. */
++#undef SDB_DEBUGGING_INFO
++
++/* Undefine some macros defined in both sh.h and svr4.h. */
++#undef IDENT_ASM_OP
++#undef ASM_FILE_END
++#undef ASM_OUTPUT_SOURCE_LINE
++#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
++#undef CTORS_SECTION_ASM_OP
++#undef DTORS_SECTION_ASM_OP
++#undef ASM_OUTPUT_SECTION_NAME
++#undef ASM_OUTPUT_CONSTRUCTOR
++#undef ASM_OUTPUT_DESTRUCTOR
++#undef ASM_DECLARE_FUNCTION_NAME
++#undef PREFERRED_DEBUGGING_TYPE
++#undef MAX_OFILE_ALIGNMENT
++
++/* Be ELF-like. */
++#include <svr4.h>
++
++/* Get generic NetBSD ELF definitions. */
++#define NETBSD_ELF
++#include <netbsd.h>
++
++/* The prefix to add to user-visible assembler symbols.
++ Note that svr4.h redefined it from the original value (that we want)
++ in sh.h */
++
++#undef USER_LABEL_PREFIX
++#define USER_LABEL_PREFIX "_"
++
++#undef LOCAL_LABEL_PREFIX
++#define LOCAL_LABEL_PREFIX "."
++
++#undef ASM_FILE_START
++#define ASM_FILE_START(FILE) do { \
++ output_file_directive ((FILE), main_input_filename); \
++ if (TARGET_LITTLE_ENDIAN) \
++ fprintf ((FILE), "\t.little\n"); \
++} while (0)
++
++#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__} \
++%{!m1:%{!m2:%{!m3:%{!m3e:-D__sh1__}}}}"
++
++/* Let code know that this is ELF. */
++#define CPP_PREDEFINES \
++"-D__sh__ -D__sh3__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \
++-Asystem(unix) -Asystem(NetBSD) -Acpu(sh3) -Amachine(sh3)"
++
++/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it
++ again. */
++#define DBX_REGISTER_NUMBER(REGNO) \
++ (((REGNO) >= 22 && (REGNO) <= 39) ? ((REGNO) + 1) : (REGNO))
++
++/* SH ELF, unlike most ELF implementations, uses underscores before
++ symbol names. */
++#undef ASM_OUTPUT_LABELREF
++#define ASM_OUTPUT_LABELREF(STREAM,NAME) \
++ asm_fprintf (STREAM, "%U%s", NAME)
++
++#undef ASM_GENERATE_INTERNAL_LABEL
++#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
++ sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM))
++
++#undef ASM_OUTPUT_INTERNAL_LABEL
++#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
++ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
++
++#undef ASM_OUTPUT_SOURCE_LINE
++#define ASM_OUTPUT_SOURCE_LINE(file, line) \
++do \
++ { \
++ static int sym_lineno = 1; \
++ asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
++ (line), sym_lineno); \
++ assemble_name ((file), \
++ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
++ asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \
++ sym_lineno += 1; \
++ } \
++while (0)
++
++#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
++#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
++do { \
++ text_section (); \
++ fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \
++} while (0)
++
++/* HANDLE_SYSV_PRAGMA (defined by svr4.h) takes precedence over HANDLE_PRAGMA.
++ We want to use the HANDLE_PRAGMA from sh.h. */
++#undef HANDLE_SYSV_PRAGMA
++
++#undef ASM_SPEC
++#define ASM_SPEC \
++ "%{!mb:-little} %{mrelax:-relax} %{fpic:-k} %{fPIC:-k}"
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ "%{!mb:-m elf32shlunx} %{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}}"
++
++#undef TARGET_DEFAULT
++#define TARGET_DEFAULT LITTLE_ENDIAN_BIT
+diff -uN gcc/config/sh/netbsdelf.h gcc/config/sh/netbsdelf.h
+--- gcc/config/sh/netbsdelf.h Thu Jan 1 09:00:00 1970
++++ gcc/config/sh/netbsdelf.h Wed Jan 3 21:43:23 2001
+@@ -0,0 +1,130 @@
++/* Definitions of target machine for gcc for Hitachi Super-H using ELF.
++ Copyright (C) 1996 Free Software Foundation, Inc.
++ Contributed by Ian Lance Taylor <ian@cygnus.com>.
++
++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. */
++
++/* Get generic SH definitions. */
++#include <sh/sh.h>
++
++/* No SDB debugging info. */
++#undef SDB_DEBUGGING_INFO
++
++/* Undefine some macros defined in both sh.h and svr4.h. */
++#undef IDENT_ASM_OP
++#undef ASM_FILE_END
++#undef ASM_OUTPUT_SOURCE_LINE
++#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
++#undef CTORS_SECTION_ASM_OP
++#undef DTORS_SECTION_ASM_OP
++#undef ASM_OUTPUT_SECTION_NAME
++#undef ASM_OUTPUT_CONSTRUCTOR
++#undef ASM_OUTPUT_DESTRUCTOR
++#undef ASM_DECLARE_FUNCTION_NAME
++#undef PREFERRED_DEBUGGING_TYPE
++#undef MAX_OFILE_ALIGNMENT
++
++/* Be ELF-like. */
++#include <svr4.h>
++
++/* Get generic NetBSD ELF definitions. */
++#define NETBSD_ELF
++#include <netbsd.h>
++
++/* The prefix to add to user-visible assembler symbols.
++ Note that svr4.h redefined it from the original value (that we want)
++ in sh.h */
++
++#undef USER_LABEL_PREFIX
++#define USER_LABEL_PREFIX "_"
++
++#undef LOCAL_LABEL_PREFIX
++#define LOCAL_LABEL_PREFIX "."
++
++#undef ASM_FILE_START
++#define ASM_FILE_START(FILE) do { \
++ output_file_directive ((FILE), main_input_filename); \
++ if (TARGET_LITTLE_ENDIAN) \
++ fprintf ((FILE), "\t.little\n"); \
++} while (0)
++
++/* Let code know that this is ELF. */
++#define CPP_PREDEFINES \
++"-D__sh__ -D__sh3__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__ \
++-Asystem(unix) -Asystem(NetBSD) -Acpu(sh3) -Amachine(sh3)"
++
++/* svr4.h undefined DBX_REGISTER_NUMBER, so we need to define it
++ again. */
++#define DBX_REGISTER_NUMBER(REGNO) \
++ (((REGNO) >= 22 && (REGNO) <= 39) ? ((REGNO) + 1) : (REGNO))
++
++/* SH ELF, unlike most ELF implementations, uses underscores before
++ symbol names. */
++#undef ASM_OUTPUT_LABELREF
++#define ASM_OUTPUT_LABELREF(STREAM,NAME) \
++ asm_fprintf (STREAM, "%U%s", NAME)
++
++#undef ASM_GENERATE_INTERNAL_LABEL
++#define ASM_GENERATE_INTERNAL_LABEL(STRING, PREFIX, NUM) \
++ sprintf ((STRING), "*%s%s%d", LOCAL_LABEL_PREFIX, (PREFIX), (NUM))
++
++#undef ASM_OUTPUT_INTERNAL_LABEL
++#define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM) \
++ asm_fprintf ((FILE), "%L%s%d:\n", (PREFIX), (NUM))
++
++#undef ASM_OUTPUT_SOURCE_LINE
++#define ASM_OUTPUT_SOURCE_LINE(file, line) \
++do \
++ { \
++ static int sym_lineno = 1; \
++ asm_fprintf ((file), ".stabn 68,0,%d,%LLM%d-", \
++ (line), sym_lineno); \
++ assemble_name ((file), \
++ XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0));\
++ asm_fprintf ((file), "\n%LLM%d:\n", sym_lineno); \
++ sym_lineno += 1; \
++ } \
++while (0)
++
++#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
++#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
++do { \
++ text_section (); \
++ fprintf ((FILE), "\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO); \
++} while (0)
++
++/* HANDLE_SYSV_PRAGMA (defined by svr4.h) takes precedence over HANDLE_PRAGMA.
++ We want to use the HANDLE_PRAGMA from sh.h. */
++#undef HANDLE_SYSV_PRAGMA
++
++#undef ASM_SPEC
++#define ASM_SPEC \
++ "%{ml:-little} %{mrelax:-relax} %{fpic:-k} %{fPIC:-k}"
++
++#undef LINK_SPEC
++#define LINK_SPEC \
++ "%{ml:-m elf32shlunx} %{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}}"