Third go at renaming patches to contain neither the package name nor the package version.
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jul 28 21:08:01 2008 +0000 (2008-07-28)
changeset 746b150d6f590fc
parent 745 e445c00d134d
child 747 d3e603e7c17c
Third go at renaming patches to contain neither the package name nor the package version.
patches/cygwin/1.5.15-1/100-crossbuild.patch
patches/cygwin/1.5.15-1/100-cygwin-1.5.15-1-crossbuild.patch
patches/gcc/2.95.3/150-cygwin-020611.patch
patches/gcc/2.95.3/150-gcc-2.95.3-cygwin-020611.patch
patches/gcc/2.95.3/160-gcc-2.95.3-trap-posix.patch
patches/gcc/2.95.3/160-trap-posix.patch
patches/gcc/2.95.3/170-gcc-pr3106.patch
patches/gcc/2.95.3/170-pr3106.patch
patches/gcc/3.2.3/110-gcc-20020722-ppc405erratum77.patch
patches/gcc/3.2.3/110-ppc405erratum77.patch
patches/gcc/3.2.3/120-gcc-20030210-sh-linux-1.patch
patches/gcc/3.2.3/120-sh-linux-1.patch
patches/gcc/3.2.3/130-g++.exp.patch
patches/gcc/3.2.3/130-gcc-3.2.3-g++.exp.patch
patches/gcc/3.2.3/140-gcc-3.2.3-libffi-1.patch
patches/gcc/3.2.3/140-libffi-1.patch
patches/gcc/3.2.3/150-gcc-3.2.3-ppc-asm-spec.patch
patches/gcc/3.2.3/150-ppc-asm-spec.patch
patches/gcc/3.2.3/160-gcc-3.2.3-trap-posix.patch
patches/gcc/3.2.3/160-trap-posix.patch
patches/gcc/3.2.3/170-gcc-3.3-libstdc++-v3-dg.exp.patch
patches/gcc/3.2.3/170-libstdc++-v3-dg.exp.patch
patches/gcc/3.3.6/110-arm-bigendian.patch
patches/gcc/3.3.6/110-gcc-3.3.4-arm-bigendian.patch
patches/gcc/3.3.6/120-arm-pr22528.patch
patches/gcc/3.3.6/120-gcc-3.3.4-arm-pr22528.patch
patches/gcc/3.4.6/600-arm-ldm-peephole.patch
patches/gcc/3.4.6/600-gcc34-arm-ldm-peephole.patch
patches/gcc/3.4.6/601-arm-ldm.patch
patches/gcc/3.4.6/601-gcc34-arm-ldm-peephole2.patch
patches/gcc/3.4.6/601-gcc34-arm-ldm.patch
patches/gcc/3.4.6/602-arm-ldm-peephole2.patch
patches/gcc/4.0.0/110-arm-bigendian.patch
patches/gcc/4.0.0/110-gcc-4.0-arm-bigendian.patch
patches/gcc/4.1.0/100-fix-fixincl.patch
patches/gcc/4.1.0/100-gcc-4.1-fix-fixincl.patch
patches/gcc/4.2.0/940-alpha-signal_h.patch
patches/gcc/4.2.0/940-gcc-alpha-signal_h.patch
patches/gcc/4.2.1/940-alpha-signal_h.patch
patches/gcc/4.2.1/940-gcc-alpha-signal_h.patch
patches/gcc/4.2.2/940-alpha-signal_h.patch
patches/gcc/4.2.2/940-gcc-alpha-signal_h.patch
patches/gcc/4.2.3/940-alpha-signal_h.patch
patches/gcc/4.2.3/940-gcc-alpha-signal_h.patch
patches/gcc/4.2.4/940-alpha-signal_h.patch
patches/gcc/4.2.4/940-gcc-alpha-signal_h.patch
patches/gcc/4.3.0/100-alpha-mieee-default.patch
patches/gcc/4.3.0/100-gcc-4.1-alpha-mieee-default.patch
patches/gcc/4.3.0/125-gcc-trampolinewarn.patch
patches/gcc/4.3.0/125-trampolinewarn.patch
patches/gcc/4.3.0/150-gcc43-java-nomulti.patch
patches/gcc/4.3.0/150-java-nomulti.patch
patches/gcc/4.3.0/175-cross-compile.patch
patches/gcc/4.3.0/175-gcc-4.1-cross-compile.patch
patches/gcc/4.3.0/200-gcc-netbsd-symbolic.patch
patches/gcc/4.3.0/200-netbsd-symbolic.patch
patches/gcc/4.3.0/225-gcc-sparc64-bsd.patch
patches/gcc/4.3.0/225-sparc64-bsd.patch
patches/gcc/4.3.0/250-904-flatten-switch-stmt-00.patch
patches/gcc/4.3.0/250-flatten-switch-stmt-00.patch
patches/gcc/4.3.0/275-gcc-x86-emit-cld.patch
patches/gcc/4.3.0/275-x86-emit-cld.patch
patches/gcc/4.3.0/300-gcc-3.4-libiberty-pic.patch
patches/gcc/4.3.0/300-libiberty-pic.patch
patches/gcc/4.3.0/325-gcc4-superh-default-multilib.patch
patches/gcc/4.3.0/325-superh-default-multilib.patch
patches/gcc/4.3.0/350-300-libstdc++-pic.patch
patches/gcc/4.3.0/350-libstdc++-pic.patch
patches/gcc/4.3.0/375-gcc43-pr35440.patch
patches/gcc/4.3.0/375-pr35440.patch
patches/gcc/4.3.0/400-gcc43-pr24170.patch
patches/gcc/4.3.0/400-pr24170.patch
patches/gcc/4.3.0/425-gcc4-ia64-noteGNUstack.patch
patches/gcc/4.3.0/425-noteGNUstack-00.patch
patches/gcc/4.3.0/450-gcc4-noteGNUstack.patch
patches/gcc/4.3.0/450-noteGNUstack-01.patch
patches/gcc/4.3.0/475-gcc43-pr35705.patch
patches/gcc/4.3.0/475-pr35705.patch
patches/gcc/4.3.0/500-gcc43-pr34571.patch
patches/gcc/4.3.0/500-pr34571.patch
patches/gcc/4.3.0/525-gcc43-pr35982.patch
patches/gcc/4.3.0/525-pr35982.patch
patches/gcc/4.3.0/550-gcc43-pr25343.patch
patches/gcc/4.3.0/550-pr25343.patch
patches/gcc/4.3.0/600-ca-translation-typo.patch
patches/gcc/4.3.0/600-gcc-ca-translation-typo.patch
patches/gcc/4.3.0/625-103-uclibc-conf-noupstream.patch
patches/gcc/4.3.0/625-uclibc-conf-noupstream.patch
patches/gcc/4.3.0/650-200-uclibc-locale.patch
patches/gcc/4.3.0/650-uclibc-locale.patch
patches/gcc/4.3.0/675-203-uclibc-locale-no__x.patch
patches/gcc/4.3.0/675-uclibc-locale-no__x.patch
patches/gcc/4.3.0/700-204-uclibc-locale-wchar_fix.patch
patches/gcc/4.3.0/700-uclibc-locale-wchar_fix.patch
patches/gcc/4.3.0/725-205-uclibc-locale-update.patch
patches/gcc/4.3.0/725-uclibc-locale-update.patch
patches/gcc/4.3.0/750-301-missing-execinfo_h.patch
patches/gcc/4.3.0/750-missing-execinfo_h.patch
patches/gcc/4.3.0/775-303-c99-complex-ugly-hack.patch
patches/gcc/4.3.0/775-c99-complex-ugly-hack.patch
patches/gcc/4.3.0/800-304-index_macro.patch
patches/gcc/4.3.0/800-index_macro.patch
patches/gcc/4.3.0/825-305-libmudflap-susv3-legacy.patch
patches/gcc/4.3.0/825-libmudflap-susv3-legacy.patch
patches/gcc/4.3.0/850-306-libstdc++-namespace.patch
patches/gcc/4.3.0/850-libstdc++-namespace.patch
patches/gcc/4.3.0/940-alpha-signal_h.patch
patches/gcc/4.3.0/940-gcc-alpha-signal_h.patch
patches/gcc/4.3.1/100-alpha-mieee-default.patch
patches/gcc/4.3.1/100-gcc-4.1-alpha-mieee-default.patch
patches/gcc/4.3.1/125-gcc-trampolinewarn.patch
patches/gcc/4.3.1/125-trampolinewarn.patch
patches/gcc/4.3.1/150-gcc43-java-nomulti.patch
patches/gcc/4.3.1/150-java-nomulti.patch
patches/gcc/4.3.1/175-cross-compile.patch
patches/gcc/4.3.1/175-gcc-4.1-cross-compile.patch
patches/gcc/4.3.1/200-gcc-netbsd-symbolic.patch
patches/gcc/4.3.1/200-netbsd-symbolic.patch
patches/gcc/4.3.1/225-gcc-sparc64-bsd.patch
patches/gcc/4.3.1/225-sparc64-bsd.patch
patches/gcc/4.3.1/250-904-flatten-switch-stmt-00.patch
patches/gcc/4.3.1/250-flatten-switch-stmt-00.patch
patches/gcc/4.3.1/275-gcc-3.4-libiberty-pic.patch
patches/gcc/4.3.1/275-libiberty-pic.patch
patches/gcc/4.3.1/300-gcc4-superh-default-multilib.patch
patches/gcc/4.3.1/300-superh-default-multilib.patch
patches/gcc/4.3.1/325-300-libstdc++-pic.patch
patches/gcc/4.3.1/325-libstdc++-pic.patch
patches/gcc/4.3.1/350-gcc43-pr24170.patch
patches/gcc/4.3.1/350-pr24170.patch
patches/gcc/4.3.1/375-gcc4-ia64-noteGNUstack.patch
patches/gcc/4.3.1/375-noteGNUstack-00.patch
patches/gcc/4.3.1/400-gcc4-noteGNUstack.patch
patches/gcc/4.3.1/400-noteGNUstack-01.patch
patches/gcc/4.3.1/425-gcc43-pr34571.patch
patches/gcc/4.3.1/425-pr34571.patch
patches/gcc/4.3.1/450-gcc43-pr25343.patch
patches/gcc/4.3.1/450-pr25343.patch
patches/gcc/4.3.1/500-103-uclibc-conf-noupstream.patch
patches/gcc/4.3.1/500-uclibc-conf-noupstream.patch
patches/gcc/4.3.1/525-200-uclibc-locale.patch
patches/gcc/4.3.1/525-uclibc-locale.patch
patches/gcc/4.3.1/550-203-uclibc-locale-no__x.patch
patches/gcc/4.3.1/550-uclibc-locale-no__x.patch
patches/gcc/4.3.1/575-204-uclibc-locale-wchar_fix.patch
patches/gcc/4.3.1/575-uclibc-locale-wchar_fix.patch
patches/gcc/4.3.1/600-205-uclibc-locale-update.patch
patches/gcc/4.3.1/600-uclibc-locale-update.patch
patches/gcc/4.3.1/625-301-missing-execinfo_h.patch
patches/gcc/4.3.1/625-missing-execinfo_h.patch
patches/gcc/4.3.1/650-303-c99-complex-ugly-hack.patch
patches/gcc/4.3.1/650-c99-complex-ugly-hack.patch
patches/gcc/4.3.1/675-304-index_macro.patch
patches/gcc/4.3.1/675-index_macro.patch
patches/gcc/4.3.1/700-305-libmudflap-susv3-legacy.patch
patches/gcc/4.3.1/700-libmudflap-susv3-legacy.patch
patches/gcc/4.3.1/725-306-libstdc++-namespace.patch
patches/gcc/4.3.1/725-libstdc++-namespace.patch
patches/gcc/4.3.1/940-alpha-signal_h.patch
patches/gcc/4.3.1/940-gcc-alpha-signal_h.patch
patches/gdb/6.7.1/150-gdb-6.3-security-errata-20050610.patch
patches/gdb/6.7.1/150-security-errata-20050610.patch
patches/gdb/6.7.1/175-gdb-hppa-offsets.patch
patches/gdb/6.7.1/175-hppa-offsets.patch
patches/gdb/6.7.1/200-deleted-children.patch
patches/gdb/6.7.1/200-gdb-deleted-children.patch
patches/gdb/6.7.1/225-dwarf-stack-overflow.patch
patches/gdb/6.7.1/225-gdb-6.5-dwarf-stack-overflow.patch
patches/gdb/6.7/100-gdb-6.3-security-errata-20050610.patch
patches/gdb/6.7/100-security-errata-20050610.patch
patches/gdb/6.7/125-gdb-hppa-offsets.patch
patches/gdb/6.7/125-hppa-offsets.patch
patches/gdb/6.7/150-dwarf-stack-overflow.patch
patches/gdb/6.7/150-gdb-6.5-dwarf-stack-overflow.patch
patches/gdb/6.8/100-dwarf-stack-overflow.patch
patches/gdb/6.8/100-gdb-6.5-dwarf-stack-overflow.patch
patches/gdb/6.8/150-gdb-6.3-security-errata-20050610.patch
patches/gdb/6.8/150-security-errata-20050610.patch
patches/gdb/6.8/200-gdb-tdep-opcode-include-workaround.patch
patches/gdb/6.8/200-tdep-opcode-include-workaround.patch
patches/strace/4.5.15/100-autoreconf.patch
patches/strace/4.5.15/100-strace-autoreconf.patch
patches/strace/4.5.15/150-dont-use-REG_SYSCALL-for-sh.patch
patches/strace/4.5.15/150-strace-dont-use-REG_SYSCALL-for-sh.patch
patches/strace/4.5.15/200-fix-arm-bad-syscall.patch
patches/strace/4.5.15/200-strace-fix-arm-bad-syscall.patch
patches/strace/4.5.15/250-fix-disabled-largefile-syscalls.patch
patches/strace/4.5.15/250-strace-fix-disabled-largefile-syscalls.patch
patches/strace/4.5.15/300-mips-sprintsigmask-fix.patch
patches/strace/4.5.15/300-strace-mips-sprintsigmask-fix.patch
patches/strace/4.5.15/350-statfs64-check.patch
patches/strace/4.5.15/350-strace-statfs64-check.patch
patches/strace/4.5.15/400-strace-superh-update.ac.patch
patches/strace/4.5.15/400-superh-update.ac.patch
patches/strace/4.5.15/450-strace-undef-CTL_PROC.patch
patches/strace/4.5.15/450-undef-CTL_PROC.patch
patches/strace/4.5.15/500-strace-undef-PACKET_MEMBERSHIP.patch
patches/strace/4.5.15/500-undef-PACKET_MEMBERSHIP.patch
patches/strace/4.5.15/550-strace-undef-syscall.patch
patches/strace/4.5.15/550-undef-syscall.patch
patches/strace/4.5.16/100-autoreconf.patch
patches/strace/4.5.16/100-strace-autoreconf.patch
patches/strace/4.5.16/150-dont-use-REG_SYSCALL-for-sh.patch
patches/strace/4.5.16/150-strace-dont-use-REG_SYSCALL-for-sh.patch
patches/strace/4.5.16/200-fix-arm-bad-syscall.patch
patches/strace/4.5.16/200-strace-fix-arm-bad-syscall.patch
patches/strace/4.5.16/250-fix-disabled-largefile-syscalls.patch
patches/strace/4.5.16/250-strace-fix-disabled-largefile-syscalls.patch
patches/strace/4.5.16/350-statfs64-check.patch
patches/strace/4.5.16/350-strace-statfs64-check.patch
patches/strace/4.5.16/400-strace-superh-update.ac.patch
patches/strace/4.5.16/400-superh-update.ac.patch
patches/strace/4.5.16/450-strace-undef-CTL_PROC.patch
patches/strace/4.5.16/450-undef-CTL_PROC.patch
patches/strace/4.5.16/500-strace-undef-PACKET_MEMBERSHIP.patch
patches/strace/4.5.16/500-undef-PACKET_MEMBERSHIP.patch
patches/strace/4.5.16/550-strace-undef-syscall.patch
patches/strace/4.5.16/550-undef-syscall.patch
patches/uClibc/0.9.28.1/004-ctype.patch
patches/uClibc/0.9.28.1/004-uClibc_ctype.patch
patches/uClibc/0.9.28.2/004-ctype.patch
patches/uClibc/0.9.28.2/004-uClibc_ctype.patch
patches/uClibc/0.9.28.3/004-ctype.patch
patches/uClibc/0.9.28.3/004-uClibc_ctype.patch
patches/uClibc/0.9.28/004-ctype.patch
patches/uClibc/0.9.28/004-uClibc_ctype.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/cygwin/1.5.15-1/100-crossbuild.patch	Mon Jul 28 21:08:01 2008 +0000
     1.3 @@ -0,0 +1,40 @@
     1.4 +Message-ID: <4269173F.7020705@zee2.com>
     1.5 +Date: Fri, 22 Apr 2005 16:24:47 +0100
     1.6 +From: Steve Papacharalambous <stevep@zee2.com>
     1.7 +To: "Robert P. J. Day" <rpjday@mindspring.com>
     1.8 +CC: crossgcc list <crossgcc@sources.redhat.com>
     1.9 +Subject: Re: cygwin source directory has moved
    1.10 +In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
    1.11 +
    1.12 +Hi Robert,
    1.13 +
    1.14 +I've attached two patches:
    1.15 +
    1.16 +1/  For crosstool-0.31 which changes the CYGWIN_URL to one which has the
    1.17 +cygwin source archives.  The version of cygwin that is used to build the
    1.18 +cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
    1.19 +most of the mirror sites don't seem to have the original archive used.
    1.20 +[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
    1.21 +
    1.22 +
    1.23 +2/ The later cygwin source archive fails to cross build with the error:
    1.24 +/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
    1.25 +cannot find -luser32
    1.26 +
    1.27 +unless the second patch is applied,
    1.28 +
    1.29 +
    1.30 +diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
    1.31 +--- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in	2005-02-28 22:51:02.000000000 +0000
    1.32 ++++ cygwin-1.5.15-1/winsup/mingw/Makefile.in	2005-04-22 15:29:18.000000000 +0100
    1.33 +@@ -71,7 +71,7 @@
    1.34 + mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
    1.35 + 
    1.36 + CC := @CC@
    1.37 +-override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
    1.38 ++override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
    1.39 + # FIXME: Which is it, CC or CC_FOR_TARGET?
    1.40 + CC_FOR_TARGET = $(CC)
    1.41 + AS_FOR_TARGET = $(AS)
    1.42 +
    1.43 +
     2.1 --- a/patches/cygwin/1.5.15-1/100-cygwin-1.5.15-1-crossbuild.patch	Mon Jul 28 20:17:48 2008 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,40 +0,0 @@
     2.4 -Message-ID: <4269173F.7020705@zee2.com>
     2.5 -Date: Fri, 22 Apr 2005 16:24:47 +0100
     2.6 -From: Steve Papacharalambous <stevep@zee2.com>
     2.7 -To: "Robert P. J. Day" <rpjday@mindspring.com>
     2.8 -CC: crossgcc list <crossgcc@sources.redhat.com>
     2.9 -Subject: Re: cygwin source directory has moved
    2.10 -In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
    2.11 -
    2.12 -Hi Robert,
    2.13 -
    2.14 -I've attached two patches:
    2.15 -
    2.16 -1/  For crosstool-0.31 which changes the CYGWIN_URL to one which has the
    2.17 -cygwin source archives.  The version of cygwin that is used to build the
    2.18 -cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
    2.19 -most of the mirror sites don't seem to have the original archive used.
    2.20 -[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
    2.21 -
    2.22 -
    2.23 -2/ The later cygwin source archive fails to cross build with the error:
    2.24 -/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
    2.25 -cannot find -luser32
    2.26 -
    2.27 -unless the second patch is applied,
    2.28 -
    2.29 -
    2.30 -diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
    2.31 ---- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in	2005-02-28 22:51:02.000000000 +0000
    2.32 -+++ cygwin-1.5.15-1/winsup/mingw/Makefile.in	2005-04-22 15:29:18.000000000 +0100
    2.33 -@@ -71,7 +71,7 @@
    2.34 - mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
    2.35 - 
    2.36 - CC := @CC@
    2.37 --override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
    2.38 -+override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
    2.39 - # FIXME: Which is it, CC or CC_FOR_TARGET?
    2.40 - CC_FOR_TARGET = $(CC)
    2.41 - AS_FOR_TARGET = $(AS)
    2.42 -
    2.43 -
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/patches/gcc/2.95.3/150-cygwin-020611.patch	Mon Jul 28 21:08:01 2008 +0000
     3.3 @@ -0,0 +1,33 @@
     3.4 +[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
     3.5 +  on the end of every executable, even if they're linux executable.
     3.6 +  This is highly annoying, and causes glibc build failures that look like this:
     3.7 +    mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
     3.8 +    make[2]: *** [.../bin/makedb] Error 1
     3.9 +    make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
    3.10 +
    3.11 +  The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
    3.12 +  but that doesn't apply cleanly to gcc-2.95.3.
    3.13 +
    3.14 +  So, I'm using
    3.15 +  http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
    3.16 +  This is the only patch in crosstool that *isn't* suitable for the mainline.
    3.17 +  I can live with this patch simply because crosstool does not build
    3.18 +  compilers that target cygwin or VAX/VMS. 
    3.19 +  If that ever changes, I might need to try applying the real patch.
    3.20 +]
    3.21 +
    3.22 +
    3.23 +
    3.24 +#
    3.25 +# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
    3.26 +#
    3.27 +--- gcc-2.95.3/gcc/config/i386/xm-cygwin.h	1999-04-22 16:40:56.000000000 +0200
    3.28 ++++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h	2002-06-11 08:23:18.000000000 +0200
    3.29 +@@ -19,7 +19,6 @@
    3.30 + the Free Software Foundation, 59 Temple Place - Suite 330,
    3.31 + Boston, MA 02111-1307, USA. */
    3.32 + 
    3.33 +-#define EXECUTABLE_SUFFIX ".exe"
    3.34 + #define NO_SYS_SIGLIST 1
    3.35 + 
    3.36 + /* We support both "/" and "\" since everybody tests both but we
     4.1 --- a/patches/gcc/2.95.3/150-gcc-2.95.3-cygwin-020611.patch	Mon Jul 28 20:17:48 2008 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,33 +0,0 @@
     4.4 -[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
     4.5 -  on the end of every executable, even if they're linux executable.
     4.6 -  This is highly annoying, and causes glibc build failures that look like this:
     4.7 -    mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
     4.8 -    make[2]: *** [.../bin/makedb] Error 1
     4.9 -    make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
    4.10 -
    4.11 -  The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
    4.12 -  but that doesn't apply cleanly to gcc-2.95.3.
    4.13 -
    4.14 -  So, I'm using
    4.15 -  http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
    4.16 -  This is the only patch in crosstool that *isn't* suitable for the mainline.
    4.17 -  I can live with this patch simply because crosstool does not build
    4.18 -  compilers that target cygwin or VAX/VMS. 
    4.19 -  If that ever changes, I might need to try applying the real patch.
    4.20 -]
    4.21 -
    4.22 -
    4.23 -
    4.24 -#
    4.25 -# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
    4.26 -#
    4.27 ---- gcc-2.95.3/gcc/config/i386/xm-cygwin.h	1999-04-22 16:40:56.000000000 +0200
    4.28 -+++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h	2002-06-11 08:23:18.000000000 +0200
    4.29 -@@ -19,7 +19,6 @@
    4.30 - the Free Software Foundation, 59 Temple Place - Suite 330,
    4.31 - Boston, MA 02111-1307, USA. */
    4.32 - 
    4.33 --#define EXECUTABLE_SUFFIX ".exe"
    4.34 - #define NO_SYS_SIGLIST 1
    4.35 - 
    4.36 - /* We support both "/" and "\" since everybody tests both but we
     5.1 --- a/patches/gcc/2.95.3/160-gcc-2.95.3-trap-posix.patch	Mon Jul 28 20:17:48 2008 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,44 +0,0 @@
     5.4 -# 
     5.5 -# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
     5.6 -#
     5.7 -# Error:
     5.8 -#
     5.9 -# creating libintl.h
    5.10 -# Configuring etc...
    5.11 -# loading cache ../config.cache
    5.12 -# checking for a BSD compatible install... (cached) /usr/bin/install -c
    5.13 -# creating ./config.status
    5.14 -# creating Makefile
    5.15 -# trap: usage: trap [-lp] [[arg] signal_spec ...]
    5.16 -#
    5.17 -# Description:
    5.18 -#
    5.19 -# non-posix conform usage of trap causes bash >= 3.0 to fail
    5.20 -# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
    5.21 -#
    5.22 -# Status:
    5.23 -#
    5.24 -# fixed in gcc >= 3.3.5
    5.25 -# backport of gcc-3.3.5 fix
    5.26 -#
    5.27 -diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
    5.28 ---- gcc-2.95.3-orig/configure	1999-04-02 16:17:40.000000000 +0200
    5.29 -+++ gcc-2.95.3/configure	2005-04-20 18:25:45.030488235 +0200
    5.30 -@@ -687,7 +687,7 @@
    5.31 - if test -f skip-this-dir; then
    5.32 - 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    5.33 - 	# and reset the trap handler.
    5.34 --	trap 0
    5.35 -+	trap '' 0
    5.36 - 	rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    5.37 - 	# Execute the final clean-up actions
    5.38 - 	${config_shell} skip-this-dir
    5.39 -@@ -1599,7 +1599,7 @@
    5.40 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    5.41 - # and reset the trap handler.
    5.42 - rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    5.43 --trap 0
    5.44 -+trap '' 0
    5.45 - 
    5.46 - exit 0
    5.47 - 
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/patches/gcc/2.95.3/160-trap-posix.patch	Mon Jul 28 21:08:01 2008 +0000
     6.3 @@ -0,0 +1,44 @@
     6.4 +# 
     6.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
     6.6 +#
     6.7 +# Error:
     6.8 +#
     6.9 +# creating libintl.h
    6.10 +# Configuring etc...
    6.11 +# loading cache ../config.cache
    6.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
    6.13 +# creating ./config.status
    6.14 +# creating Makefile
    6.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
    6.16 +#
    6.17 +# Description:
    6.18 +#
    6.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
    6.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
    6.21 +#
    6.22 +# Status:
    6.23 +#
    6.24 +# fixed in gcc >= 3.3.5
    6.25 +# backport of gcc-3.3.5 fix
    6.26 +#
    6.27 +diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
    6.28 +--- gcc-2.95.3-orig/configure	1999-04-02 16:17:40.000000000 +0200
    6.29 ++++ gcc-2.95.3/configure	2005-04-20 18:25:45.030488235 +0200
    6.30 +@@ -687,7 +687,7 @@
    6.31 + if test -f skip-this-dir; then
    6.32 + 	# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    6.33 + 	# and reset the trap handler.
    6.34 +-	trap 0
    6.35 ++	trap '' 0
    6.36 + 	rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    6.37 + 	# Execute the final clean-up actions
    6.38 + 	${config_shell} skip-this-dir
    6.39 +@@ -1599,7 +1599,7 @@
    6.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
    6.41 + # and reset the trap handler.
    6.42 + rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
    6.43 +-trap 0
    6.44 ++trap '' 0
    6.45 + 
    6.46 + exit 0
    6.47 + 
     7.1 --- a/patches/gcc/2.95.3/170-gcc-pr3106.patch	Mon Jul 28 20:17:48 2008 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,28 +0,0 @@
     7.4 -See http://gcc.gnu.org/PR3106
     7.5 -Backported from gcc-3.0.x
     7.6 -
     7.7 -Fixes error
     7.8 -  .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
     7.9 -  /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
    7.10 -  make[1]: *** [strerror.o] Error 1
    7.11 -  make: *** [all-libiberty] Error 2
    7.12 -on Mac OS X.
    7.13 -
    7.14 ---- gcc-2.95.3/libiberty/strerror.c.old	2004-03-24 16:23:19.000000000 -0800
    7.15 -+++ gcc-2.95.3/libiberty/strerror.c	2004-03-24 16:23:48.000000000 -0800
    7.16 -@@ -13,6 +13,7 @@
    7.17 -    incompatible with our later declaration, perhaps by using const
    7.18 -    attributes.  So we hide the declaration in errno.h (if any) using a
    7.19 -    macro. */
    7.20 -+#define sys_nerr sys_nerr__
    7.21 - #define sys_errlist sys_errlist__
    7.22 - #endif
    7.23 - 
    7.24 -@@ -20,6 +21,7 @@
    7.25 - #include <errno.h>
    7.26 - 
    7.27 - #ifdef HAVE_SYS_ERRLIST
    7.28 -+#undef sys_nerr
    7.29 - #undef sys_errlist
    7.30 - #endif
    7.31 - 
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/patches/gcc/2.95.3/170-pr3106.patch	Mon Jul 28 21:08:01 2008 +0000
     8.3 @@ -0,0 +1,28 @@
     8.4 +See http://gcc.gnu.org/PR3106
     8.5 +Backported from gcc-3.0.x
     8.6 +
     8.7 +Fixes error
     8.8 +  .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
     8.9 +  /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
    8.10 +  make[1]: *** [strerror.o] Error 1
    8.11 +  make: *** [all-libiberty] Error 2
    8.12 +on Mac OS X.
    8.13 +
    8.14 +--- gcc-2.95.3/libiberty/strerror.c.old	2004-03-24 16:23:19.000000000 -0800
    8.15 ++++ gcc-2.95.3/libiberty/strerror.c	2004-03-24 16:23:48.000000000 -0800
    8.16 +@@ -13,6 +13,7 @@
    8.17 +    incompatible with our later declaration, perhaps by using const
    8.18 +    attributes.  So we hide the declaration in errno.h (if any) using a
    8.19 +    macro. */
    8.20 ++#define sys_nerr sys_nerr__
    8.21 + #define sys_errlist sys_errlist__
    8.22 + #endif
    8.23 + 
    8.24 +@@ -20,6 +21,7 @@
    8.25 + #include <errno.h>
    8.26 + 
    8.27 + #ifdef HAVE_SYS_ERRLIST
    8.28 ++#undef sys_nerr
    8.29 + #undef sys_errlist
    8.30 + #endif
    8.31 + 
     9.1 --- a/patches/gcc/3.2.3/110-gcc-20020722-ppc405erratum77.patch	Mon Jul 28 20:17:48 2008 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,105 +0,0 @@
     9.4 -# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
     9.5 -# Fixed in gcc-3.3
     9.6 -
     9.7 -diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
     9.8 ---- gcc-20020722.orig/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:32:21 2002
     9.9 -+++ gcc-20020722/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:34:45 2002
    9.10 -@@ -66,7 +66,7 @@
    9.11 - %{mcpu=rsc1: -D_ARCH_PWR} \
    9.12 - %{mcpu=401: -D_ARCH_PPC} \
    9.13 - %{mcpu=403: -D_ARCH_PPC} \
    9.14 --%{mcpu=405: -D_ARCH_PPC} \
    9.15 -+%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
    9.16 - %{mcpu=505: -D_ARCH_PPC} \
    9.17 - %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
    9.18 - %{mcpu=602: -D_ARCH_PPC} \
    9.19 -diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
    9.20 ---- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h	Thu Jul 25 09:32:30 2002
    9.21 -+++ gcc-20020722/libjava/sysdep/powerpc/locks.h	Thu Jul 25 11:39:13 2002
    9.22 -@@ -11,6 +11,17 @@
    9.23 - #ifndef __SYSDEP_LOCKS_H__
    9.24 - #define __SYSDEP_LOCKS_H__
    9.25 - 
    9.26 -+#ifdef __PPC405__
    9.27 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN.  References:
    9.28 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
    9.29 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
    9.30 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
    9.31 -+// FIXME: using dbct instead of sync would be faster
    9.32 -+#define __LIBGCJ_PPC405_ERR77_SYNC   "sync \n\t"
    9.33 -+#else
    9.34 -+#define __LIBGCJ_PPC405_ERR77_SYNC
    9.35 -+#endif
    9.36 -+
    9.37 - typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
    9.38 - 				/* address.				*/
    9.39 - 
    9.40 -@@ -25,6 +36,7 @@
    9.41 - 	   "0:    lwarx %0,0,%1 ;"
    9.42 - 	   "      xor. %0,%3,%0;"
    9.43 - 	   "      bne 1f;"
    9.44 -+  	  __LIBGCJ_PPC405_ERR77_SYNC
    9.45 - 	   "      stwcx. %2,0,%1;"
    9.46 - 	   "      bne- 0b;"
    9.47 - 	   "1:    "
    9.48 -@@ -58,6 +70,7 @@
    9.49 - 	   "0:    lwarx %0,0,%1 ;"
    9.50 - 	   "      xor. %0,%3,%0;"
    9.51 - 	   "      bne 1f;"
    9.52 -+	   __LIBGCJ_PPC405_ERR77_SYNC	 
    9.53 - 	   "      stwcx. %2,0,%1;"
    9.54 - 	   "      bne- 0b;"
    9.55 - 	   "1:    "
    9.56 -diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
    9.57 ---- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:32:31 2002
    9.58 -+++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:34:45 2002
    9.59 -@@ -32,6 +32,17 @@
    9.60 - 
    9.61 - typedef int _Atomic_word;
    9.62 - 
    9.63 -+#ifdef __PPC405__
    9.64 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank.  References:
    9.65 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
    9.66 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
    9.67 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
    9.68 -+// FIXME: using dbct instead of sync would be faster
    9.69 -+#define	__LIBSTDCPP_PPC405_ERR77_SYNC	"sync \n\t"
    9.70 -+#else
    9.71 -+#define __LIBSTDCPP_PPC405_ERR77_SYNC
    9.72 -+#endif
    9.73 -+
    9.74 - static inline _Atomic_word
    9.75 - __attribute__ ((__unused__))
    9.76 - __exchange_and_add (volatile _Atomic_word* __mem, int __val)
    9.77 -@@ -42,6 +53,7 @@
    9.78 - 	"0:\t"
    9.79 - 	"lwarx    %0,0,%2 \n\t"
    9.80 - 	"add%I3   %1,%0,%3 \n\t"
    9.81 -+	__LIBSTDCPP_PPC405_ERR77_SYNC
    9.82 - 	"stwcx.   %1,0,%2 \n\t"
    9.83 - 	"bne-     0b \n\t"
    9.84 - 	"/* End exchange & add */"
    9.85 -@@ -61,6 +73,7 @@
    9.86 - 	"0:\t"
    9.87 - 	"lwarx    %0,0,%1 \n\t"
    9.88 - 	"add%I2   %0,%0,%2 \n\t"
    9.89 -+	__LIBSTDCPP_PPC405_ERR77_SYNC
    9.90 - 	"stwcx.   %0,0,%1 \n\t"
    9.91 - 	"bne-     0b \n\t"
    9.92 - 	"/* End atomic add */"
    9.93 -@@ -78,6 +91,7 @@
    9.94 - 	"/* Inline always swap */\n"
    9.95 - 	"0:\t"
    9.96 - 	"lwarx    %0,0,%1 \n\t"
    9.97 -+	__LIBSTDCPP_PPC405_ERR77_SYNC
    9.98 - 	"stwcx.   %2,0,%1 \n\t"
    9.99 - 	"bne-     0b \n\t"
   9.100 - 	"/* End always swap */"
   9.101 -@@ -98,6 +112,7 @@
   9.102 - 	"lwarx    %0,0,%1 \n\t"
   9.103 - 	"cmpwi    %0,0 \n\t"
   9.104 - 	"bne-     1f \n\t"
   9.105 -+	__LIBSTDCPP_PPC405_ERR77_SYNC
   9.106 - 	"stwcx.   %2,0,%1 \n\t"
   9.107 - 	"bne-     0b \n"
   9.108 - 	"1:\n\t"
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/patches/gcc/3.2.3/110-ppc405erratum77.patch	Mon Jul 28 21:08:01 2008 +0000
    10.3 @@ -0,0 +1,105 @@
    10.4 +# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
    10.5 +# Fixed in gcc-3.3
    10.6 +
    10.7 +diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
    10.8 +--- gcc-20020722.orig/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:32:21 2002
    10.9 ++++ gcc-20020722/gcc/config/rs6000/rs6000.h	Thu Jul 25 09:34:45 2002
   10.10 +@@ -66,7 +66,7 @@
   10.11 + %{mcpu=rsc1: -D_ARCH_PWR} \
   10.12 + %{mcpu=401: -D_ARCH_PPC} \
   10.13 + %{mcpu=403: -D_ARCH_PPC} \
   10.14 +-%{mcpu=405: -D_ARCH_PPC} \
   10.15 ++%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
   10.16 + %{mcpu=505: -D_ARCH_PPC} \
   10.17 + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
   10.18 + %{mcpu=602: -D_ARCH_PPC} \
   10.19 +diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
   10.20 +--- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h	Thu Jul 25 09:32:30 2002
   10.21 ++++ gcc-20020722/libjava/sysdep/powerpc/locks.h	Thu Jul 25 11:39:13 2002
   10.22 +@@ -11,6 +11,17 @@
   10.23 + #ifndef __SYSDEP_LOCKS_H__
   10.24 + #define __SYSDEP_LOCKS_H__
   10.25 + 
   10.26 ++#ifdef __PPC405__
   10.27 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN.  References:
   10.28 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
   10.29 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
   10.30 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
   10.31 ++// FIXME: using dbct instead of sync would be faster
   10.32 ++#define __LIBGCJ_PPC405_ERR77_SYNC   "sync \n\t"
   10.33 ++#else
   10.34 ++#define __LIBGCJ_PPC405_ERR77_SYNC
   10.35 ++#endif
   10.36 ++
   10.37 + typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
   10.38 + 				/* address.				*/
   10.39 + 
   10.40 +@@ -25,6 +36,7 @@
   10.41 + 	   "0:    lwarx %0,0,%1 ;"
   10.42 + 	   "      xor. %0,%3,%0;"
   10.43 + 	   "      bne 1f;"
   10.44 ++  	  __LIBGCJ_PPC405_ERR77_SYNC
   10.45 + 	   "      stwcx. %2,0,%1;"
   10.46 + 	   "      bne- 0b;"
   10.47 + 	   "1:    "
   10.48 +@@ -58,6 +70,7 @@
   10.49 + 	   "0:    lwarx %0,0,%1 ;"
   10.50 + 	   "      xor. %0,%3,%0;"
   10.51 + 	   "      bne 1f;"
   10.52 ++	   __LIBGCJ_PPC405_ERR77_SYNC	 
   10.53 + 	   "      stwcx. %2,0,%1;"
   10.54 + 	   "      bne- 0b;"
   10.55 + 	   "1:    "
   10.56 +diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
   10.57 +--- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:32:31 2002
   10.58 ++++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h	Thu Jul 25 09:34:45 2002
   10.59 +@@ -32,6 +32,17 @@
   10.60 + 
   10.61 + typedef int _Atomic_word;
   10.62 + 
   10.63 ++#ifdef __PPC405__
   10.64 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank.  References:
   10.65 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
   10.66 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
   10.67 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
   10.68 ++// FIXME: using dbct instead of sync would be faster
   10.69 ++#define	__LIBSTDCPP_PPC405_ERR77_SYNC	"sync \n\t"
   10.70 ++#else
   10.71 ++#define __LIBSTDCPP_PPC405_ERR77_SYNC
   10.72 ++#endif
   10.73 ++
   10.74 + static inline _Atomic_word
   10.75 + __attribute__ ((__unused__))
   10.76 + __exchange_and_add (volatile _Atomic_word* __mem, int __val)
   10.77 +@@ -42,6 +53,7 @@
   10.78 + 	"0:\t"
   10.79 + 	"lwarx    %0,0,%2 \n\t"
   10.80 + 	"add%I3   %1,%0,%3 \n\t"
   10.81 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
   10.82 + 	"stwcx.   %1,0,%2 \n\t"
   10.83 + 	"bne-     0b \n\t"
   10.84 + 	"/* End exchange & add */"
   10.85 +@@ -61,6 +73,7 @@
   10.86 + 	"0:\t"
   10.87 + 	"lwarx    %0,0,%1 \n\t"
   10.88 + 	"add%I2   %0,%0,%2 \n\t"
   10.89 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
   10.90 + 	"stwcx.   %0,0,%1 \n\t"
   10.91 + 	"bne-     0b \n\t"
   10.92 + 	"/* End atomic add */"
   10.93 +@@ -78,6 +91,7 @@
   10.94 + 	"/* Inline always swap */\n"
   10.95 + 	"0:\t"
   10.96 + 	"lwarx    %0,0,%1 \n\t"
   10.97 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
   10.98 + 	"stwcx.   %2,0,%1 \n\t"
   10.99 + 	"bne-     0b \n\t"
  10.100 + 	"/* End always swap */"
  10.101 +@@ -98,6 +112,7 @@
  10.102 + 	"lwarx    %0,0,%1 \n\t"
  10.103 + 	"cmpwi    %0,0 \n\t"
  10.104 + 	"bne-     1f \n\t"
  10.105 ++	__LIBSTDCPP_PPC405_ERR77_SYNC
  10.106 + 	"stwcx.   %2,0,%1 \n\t"
  10.107 + 	"bne-     0b \n"
  10.108 + 	"1:\n\t"
    11.1 --- a/patches/gcc/3.2.3/120-gcc-20030210-sh-linux-1.patch	Mon Jul 28 20:17:48 2008 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,1761 +0,0 @@
    11.4 -diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
    11.5 ---- gcc-20030210.orig/boehm-gc/configure	Fri Jan 31 19:17:00 2003
    11.6 -+++ gcc-20030210/boehm-gc/configure	Sat Feb 22 01:40:14 2003
    11.7 -@@ -1922,7 +1922,7 @@
    11.8 - # This must be Linux ELF.
    11.9 - linux-gnu*)
   11.10 -   case $host_cpu in
   11.11 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
   11.12 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
   11.13 -     lt_cv_deplibs_check_method=pass_all ;;
   11.14 -   *)
   11.15 -     # glibc up to 2.1.1 does not perform some relocations on ARM
   11.16 -diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
   11.17 ---- gcc-20030210.orig/config-ml.in	Fri Jan 31 19:16:59 2003
   11.18 -+++ gcc-20030210/config-ml.in	Sat Feb 22 01:40:14 2003
   11.19 -@@ -545,6 +545,7 @@
   11.20 - 	      if [ -d ../$${dir}/$${lib} ]; then \
   11.21 - 		flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
   11.22 - 		if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
   11.23 -+				DESTDIR="$(DESTDIR)" \
   11.24 - 				CFLAGS="$(CFLAGS) $${flags}" \
   11.25 - 				prefix="$(prefix)" \
   11.26 - 				exec_prefix="$(exec_prefix)" \
   11.27 -diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
   11.28 ---- gcc-20030210.orig/debian/edit-specs.in	Thu Jan  1 09:00:00 1970
   11.29 -+++ gcc-20030210/debian/edit-specs.in	Sat Feb 22 01:40:14 2003
   11.30 -@@ -0,0 +1,45 @@
   11.31 -+/^*asm:$/ {
   11.32 -+n
   11.33 -+c\
   11.34 -+@AS_ENDIAN_FLAG@ %{mrelax:-relax}
   11.35 -+}
   11.36 -+/^*cpp:$/ {
   11.37 -+n
   11.38 -+c\
   11.39 -+%(cpp_default_cpu_spec)    %(subtarget_cpp_spec)    %(subtarget_cpp_ptr_spec)    %(subtarget_cpp_endian_spec)
   11.40 -+}
   11.41 -+/^*cc1:$/ {
   11.42 -+n
   11.43 -+c\
   11.44 -+-musermode @CC1_CPU_ENDIAN_FLAGS@  %{profile:-p}
   11.45 -+}
   11.46 -+/^*link:$/ {
   11.47 -+n
   11.48 -+c\
   11.49 -+%{!static:--eh-frame-hdr} @LINKER_CPU_ENDIAN_FLAGS@  @LINKER_RPATH_LINK_FLAG@ %{mrelax:-relax}  %{shared:-shared}  %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} %{static:-static}
   11.50 -+}
   11.51 -+/^*multilib:$/ {
   11.52 -+n
   11.53 -+c\
   11.54 -+. ;
   11.55 -+}
   11.56 -+/^*multilib_matches:$/ {
   11.57 -+n
   11.58 -+c\
   11.59 -+
   11.60 -+}
   11.61 -+/^*multilib_options:$/ {
   11.62 -+n
   11.63 -+c\
   11.64 -+
   11.65 -+}
   11.66 -+/^*subtarget_cpp_endian_spec:$/ {
   11.67 -+n
   11.68 -+c\
   11.69 -+@CPP_ENDIAN_DEF@
   11.70 -+}
   11.71 -+/^*cpp_default_cpu_spec:$/ {
   11.72 -+n
   11.73 -+c\
   11.74 -+@CPP_CPU_DEFS@
   11.75 -+}
   11.76 -diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
   11.77 ---- gcc-20030210.orig/debian/install-CPU-linux	Thu Jan  1 09:00:00 1970
   11.78 -+++ gcc-20030210/debian/install-CPU-linux	Sat Feb 22 01:40:14 2003
   11.79 -@@ -0,0 +1,111 @@
   11.80 -+#! /bin/sh
   11.81 -+
   11.82 -+VERSION=$1; shift
   11.83 -+CPU=$1
   11.84 -+
   11.85 -+# literally (binary-ly) same
   11.86 -+PROGS_C="cpp gcc"
   11.87 -+PROGS_ADDITIONAL="c++ g++ g77 gcj"
   11.88 -+
   11.89 -+DRIVERS_C="cc1 cpp0 tradcpp0"
   11.90 -+DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
   11.91 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
   11.92 -+  PROGS="$PROGS_C $PROGS_ADDITIONAL"
   11.93 -+  DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
   11.94 -+  INITIAL=""
   11.95 -+else
   11.96 -+  PROGS=$PROGS_C
   11.97 -+  DRIVERS=$DRIVERS_C
   11.98 -+  INITIAL="-initial"
   11.99 -+fi
  11.100 -+
  11.101 -+OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  11.102 -+LIBS_C="libgcc.a"
  11.103 -+LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
  11.104 -+LIBS_2="libobjc.a libstdc++.a libsupc++.a"
  11.105 -+INCLUDE="include"
  11.106 -+
  11.107 -+cd debian/gcc-sh-linux-others${INITIAL} || exit 1
  11.108 -+
  11.109 -+# Make directories.
  11.110 -+mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
  11.111 -+	 usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
  11.112 -+	 usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
  11.113 -+	 usr/${CPU}-linux usr/${CPU}-linux/lib
  11.114 -+
  11.115 -+# Make symbolic links for include dir.
  11.116 -+(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
  11.117 -+
  11.118 -+# Make symbolic links for executables.
  11.119 -+(cd usr/bin;
  11.120 -+  for p in ${PROGS}; do
  11.121 -+    ln -s shCPU-linux-GCC ${CPU}-linux-$p
  11.122 -+  done)
  11.123 -+
  11.124 -+case "${CPU}" in
  11.125 -+    sh3)
  11.126 -+	MULTILIBDIR=
  11.127 -+	AS_ENDIAN_FLAG="-little"
  11.128 -+	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
  11.129 -+	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
  11.130 -+	CC1_CPU_ENDIAN_FLAGS="-ml -m3"
  11.131 -+	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
  11.132 -+	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
  11.133 -+    ;;
  11.134 -+    sh3eb)
  11.135 -+	MULTILIBDIR=/mb
  11.136 -+	AS_ENDIAN_FLAG="-big"
  11.137 -+	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
  11.138 -+	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
  11.139 -+	CC1_CPU_ENDIAN_FLAGS="-mb -m3"
  11.140 -+	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
  11.141 -+	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
  11.142 -+    ;;
  11.143 -+    sh4)
  11.144 -+	MULTILIBDIR=/m4
  11.145 -+	AS_ENDIAN_FLAG="-little"
  11.146 -+	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
  11.147 -+	CPP_CPU_DEFS="-D__SH4__"
  11.148 -+	CC1_CPU_ENDIAN_FLAGS="-ml -m4"
  11.149 -+	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
  11.150 -+	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
  11.151 -+    ;;
  11.152 -+    sh4eb)
  11.153 -+	MULTILIBDIR=/mb/m4
  11.154 -+	AS_ENDIAN_FLAG="-big"
  11.155 -+	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
  11.156 -+	CPP_CPU_DEFS="-D__SH4__"
  11.157 -+	CC1_CPU_ENDIAN_FLAGS="-mb -m4"
  11.158 -+	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
  11.159 -+	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
  11.160 -+    ;;
  11.161 -+esac
  11.162 -+
  11.163 -+# Make symbolic links for GCC drivers, objects, libraries, and include dir.
  11.164 -+(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
  11.165 -+ for f in ${DRIVERS} ${INCLUDE}; do
  11.166 -+    ln -s ../../sh-linux/${VERSION}/$f $f;
  11.167 -+ done
  11.168 -+ for f in ${OBJS} ${LIBS_C}; do
  11.169 -+    ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
  11.170 -+ done)
  11.171 -+
  11.172 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
  11.173 -+  for f in ${LIBS_1} ${LIBS_2}; do
  11.174 -+    mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
  11.175 -+  done
  11.176 -+fi
  11.177 -+
  11.178 -+sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
  11.179 -+    -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
  11.180 -+    -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
  11.181 -+    -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
  11.182 -+    -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
  11.183 -+    -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
  11.184 -+    ../edit-specs.in >../edit-specs-${CPU}.sed
  11.185 -+
  11.186 -+sed -f ../edit-specs-${CPU}.sed \
  11.187 -+    ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
  11.188 -+    > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
  11.189 -+
  11.190 -+exit 0
  11.191 -diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
  11.192 ---- gcc-20030210.orig/debian/multilib-symlink	Thu Jan  1 09:00:00 1970
  11.193 -+++ gcc-20030210/debian/multilib-symlink	Sat Feb 22 01:40:14 2003
  11.194 -@@ -0,0 +1,10 @@
  11.195 -+#! /bin/sh
  11.196 -+
  11.197 -+cd /usr/sh-linux/lib
  11.198 -+ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
  11.199 -+cd m4
  11.200 -+ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
  11.201 -+cd ../mb
  11.202 -+ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
  11.203 -+cd m4
  11.204 -+ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
  11.205 -diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
  11.206 ---- gcc-20030210.orig/debian/shCPU-linux-GCC	Thu Jan  1 09:00:00 1970
  11.207 -+++ gcc-20030210/debian/shCPU-linux-GCC	Sat Feb 22 01:40:14 2003
  11.208 -@@ -0,0 +1,59 @@
  11.209 -+#! /bin/bash
  11.210 -+
  11.211 -+BASENAME=${0##*/}
  11.212 -+PROG=${BASENAME##*-}
  11.213 -+CPU=${BASENAME%%-*}
  11.214 -+
  11.215 -+if [ "$PROG" = gcc ]; then
  11.216 -+    if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
  11.217 -+	shift 2
  11.218 -+	exec /usr/bin/gcc "$@"
  11.219 -+    elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
  11.220 -+	echo ".;"
  11.221 -+	exit 0
  11.222 -+    elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
  11.223 -+	echo "."
  11.224 -+	exit 0
  11.225 -+    elif [ "$1" = "-dumpspecs" ]; then
  11.226 -+	cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
  11.227 -+	exit 0
  11.228 -+    fi
  11.229 -+fi
  11.230 -+
  11.231 -+case "${CPU}" in
  11.232 -+    sh3)
  11.233 -+	ARCH=m3
  11.234 -+	DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
  11.235 -+	ENDIAN=ml
  11.236 -+    ;;
  11.237 -+    sh3eb)
  11.238 -+	ARCH=m3
  11.239 -+	DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
  11.240 -+	ENDIAN=mb
  11.241 -+    ;;
  11.242 -+    sh4)
  11.243 -+	ARCH=m4
  11.244 -+	DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
  11.245 -+	ENDIAN=ml
  11.246 -+    ;;
  11.247 -+    sh4eb)
  11.248 -+	ARCH=m4
  11.249 -+	DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
  11.250 -+	ENDIAN=mb
  11.251 -+    ;;
  11.252 -+esac
  11.253 -+
  11.254 -+# Prepend the appropriate options
  11.255 -+# If user specifies some options, it will be overridden
  11.256 -+
  11.257 -+case "${PROG}" in
  11.258 -+    cpp)
  11.259 -+	exec sh-linux-${PROG} $DEFINES "$@"
  11.260 -+    ;;
  11.261 -+    c++|g++|g77|gcc|gcj)
  11.262 -+	exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
  11.263 -+    ;;
  11.264 -+esac
  11.265 -+
  11.266 -+echo "Something wrong..."
  11.267 -+exit 1
  11.268 -diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
  11.269 ---- gcc-20030210.orig/gcc/config/sh/elf.h	Fri Feb 22 01:42:28 2002
  11.270 -+++ gcc-20030210/gcc/config/sh/elf.h	Sat Feb 22 01:40:14 2003
  11.271 -@@ -170,3 +170,7 @@
  11.272 - #undef ENDFILE_SPEC
  11.273 - #define ENDFILE_SPEC \
  11.274 -   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  11.275 -+
  11.276 -+/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h.  With it, 
  11.277 -+   redundant .align will be generated.  */
  11.278 -+#undef  ASM_OUTPUT_CASE_LABEL
  11.279 -diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
  11.280 ---- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm	Fri Feb 22 01:42:28 2002
  11.281 -+++ gcc-20030210/gcc/config/sh/lib1funcs.asm	Sat Feb 22 01:40:14 2003
  11.282 -@@ -39,8 +39,13 @@
  11.283 - 
  11.284 - #ifdef __ELF__
  11.285 - #define LOCAL(X) .L_##X
  11.286 -+#define FUNC(X) .type X,@function; .hidden X
  11.287 -+#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
  11.288 -+#define ENDFUNC(X) _ENDFUNC(X)
  11.289 - #else
  11.290 - #define LOCAL(X) L_##X
  11.291 -+#define FUNC(X)
  11.292 -+#define ENDFUNC(X)
  11.293 - #endif
  11.294 - 
  11.295 - #ifdef __linux__
  11.296 -@@ -91,6 +96,40 @@
  11.297 - 	.global	GLOBAL(ashiftrt_r4_31)
  11.298 - 	.global	GLOBAL(ashiftrt_r4_32)
  11.299 - 
  11.300 -+	FUNC(GLOBAL(ashiftrt_r4_0))
  11.301 -+	FUNC(GLOBAL(ashiftrt_r4_1))
  11.302 -+	FUNC(GLOBAL(ashiftrt_r4_2))
  11.303 -+	FUNC(GLOBAL(ashiftrt_r4_3))
  11.304 -+	FUNC(GLOBAL(ashiftrt_r4_4))
  11.305 -+	FUNC(GLOBAL(ashiftrt_r4_5))
  11.306 -+	FUNC(GLOBAL(ashiftrt_r4_6))
  11.307 -+	FUNC(GLOBAL(ashiftrt_r4_7))
  11.308 -+	FUNC(GLOBAL(ashiftrt_r4_8))
  11.309 -+	FUNC(GLOBAL(ashiftrt_r4_9))
  11.310 -+	FUNC(GLOBAL(ashiftrt_r4_10))
  11.311 -+	FUNC(GLOBAL(ashiftrt_r4_11))
  11.312 -+	FUNC(GLOBAL(ashiftrt_r4_12))
  11.313 -+	FUNC(GLOBAL(ashiftrt_r4_13))
  11.314 -+	FUNC(GLOBAL(ashiftrt_r4_14))
  11.315 -+	FUNC(GLOBAL(ashiftrt_r4_15))
  11.316 -+	FUNC(GLOBAL(ashiftrt_r4_16))
  11.317 -+	FUNC(GLOBAL(ashiftrt_r4_17))
  11.318 -+	FUNC(GLOBAL(ashiftrt_r4_18))
  11.319 -+	FUNC(GLOBAL(ashiftrt_r4_19))
  11.320 -+	FUNC(GLOBAL(ashiftrt_r4_20))
  11.321 -+	FUNC(GLOBAL(ashiftrt_r4_21))
  11.322 -+	FUNC(GLOBAL(ashiftrt_r4_22))
  11.323 -+	FUNC(GLOBAL(ashiftrt_r4_23))
  11.324 -+	FUNC(GLOBAL(ashiftrt_r4_24))
  11.325 -+	FUNC(GLOBAL(ashiftrt_r4_25))
  11.326 -+	FUNC(GLOBAL(ashiftrt_r4_26))
  11.327 -+	FUNC(GLOBAL(ashiftrt_r4_27))
  11.328 -+	FUNC(GLOBAL(ashiftrt_r4_28))
  11.329 -+	FUNC(GLOBAL(ashiftrt_r4_29))
  11.330 -+	FUNC(GLOBAL(ashiftrt_r4_30))
  11.331 -+	FUNC(GLOBAL(ashiftrt_r4_31))
  11.332 -+	FUNC(GLOBAL(ashiftrt_r4_32))
  11.333 -+
  11.334 - 	.align	1
  11.335 - GLOBAL(ashiftrt_r4_32):
  11.336 - GLOBAL(ashiftrt_r4_31):
  11.337 -@@ -170,6 +209,41 @@
  11.338 - GLOBAL(ashiftrt_r4_0):
  11.339 - 	rts
  11.340 - 	nop
  11.341 -+
  11.342 -+	ENDFUNC(GLOBAL(ashiftrt_r4_0))
  11.343 -+	ENDFUNC(GLOBAL(ashiftrt_r4_1))
  11.344 -+	ENDFUNC(GLOBAL(ashiftrt_r4_2))
  11.345 -+	ENDFUNC(GLOBAL(ashiftrt_r4_3))
  11.346 -+	ENDFUNC(GLOBAL(ashiftrt_r4_4))
  11.347 -+	ENDFUNC(GLOBAL(ashiftrt_r4_5))
  11.348 -+	ENDFUNC(GLOBAL(ashiftrt_r4_6))
  11.349 -+	ENDFUNC(GLOBAL(ashiftrt_r4_7))
  11.350 -+	ENDFUNC(GLOBAL(ashiftrt_r4_8))
  11.351 -+	ENDFUNC(GLOBAL(ashiftrt_r4_9))
  11.352 -+	ENDFUNC(GLOBAL(ashiftrt_r4_10))
  11.353 -+	ENDFUNC(GLOBAL(ashiftrt_r4_11))
  11.354 -+	ENDFUNC(GLOBAL(ashiftrt_r4_12))
  11.355 -+	ENDFUNC(GLOBAL(ashiftrt_r4_13))
  11.356 -+	ENDFUNC(GLOBAL(ashiftrt_r4_14))
  11.357 -+	ENDFUNC(GLOBAL(ashiftrt_r4_15))
  11.358 -+	ENDFUNC(GLOBAL(ashiftrt_r4_16))
  11.359 -+	ENDFUNC(GLOBAL(ashiftrt_r4_17))
  11.360 -+	ENDFUNC(GLOBAL(ashiftrt_r4_18))
  11.361 -+	ENDFUNC(GLOBAL(ashiftrt_r4_19))
  11.362 -+	ENDFUNC(GLOBAL(ashiftrt_r4_20))
  11.363 -+	ENDFUNC(GLOBAL(ashiftrt_r4_21))
  11.364 -+	ENDFUNC(GLOBAL(ashiftrt_r4_22))
  11.365 -+	ENDFUNC(GLOBAL(ashiftrt_r4_23))
  11.366 -+	ENDFUNC(GLOBAL(ashiftrt_r4_24))
  11.367 -+	ENDFUNC(GLOBAL(ashiftrt_r4_25))
  11.368 -+	ENDFUNC(GLOBAL(ashiftrt_r4_26))
  11.369 -+	ENDFUNC(GLOBAL(ashiftrt_r4_27))
  11.370 -+	ENDFUNC(GLOBAL(ashiftrt_r4_28))
  11.371 -+	ENDFUNC(GLOBAL(ashiftrt_r4_29))
  11.372 -+	ENDFUNC(GLOBAL(ashiftrt_r4_30))
  11.373 -+	ENDFUNC(GLOBAL(ashiftrt_r4_31))
  11.374 -+	ENDFUNC(GLOBAL(ashiftrt_r4_32))
  11.375 -+
  11.376 - #endif
  11.377 - 
  11.378 - #ifdef L_ashiftrt_n
  11.379 -@@ -192,6 +266,7 @@
  11.380 - !
  11.381 - 
  11.382 - 	.global	GLOBAL(ashrsi3)
  11.383 -+	FUNC(GLOBAL(ashrsi3))
  11.384 - 	.align	2
  11.385 - GLOBAL(ashrsi3):
  11.386 - 	mov	#31,r0
  11.387 -@@ -319,6 +394,8 @@
  11.388 - 	rts
  11.389 - 	nop
  11.390 - 
  11.391 -+	ENDFUNC(GLOBAL(ashrsi3))
  11.392 -+
  11.393 - #endif
  11.394 - 
  11.395 - #ifdef L_ashiftlt
  11.396 -@@ -340,6 +417,7 @@
  11.397 - ! (none)
  11.398 - !
  11.399 - 	.global	GLOBAL(ashlsi3)
  11.400 -+	FUNC(GLOBAL(ashlsi3))
  11.401 - 	.align	2
  11.402 - GLOBAL(ashlsi3):
  11.403 - 	mov	#31,r0
  11.404 -@@ -476,6 +554,8 @@
  11.405 - 	rts
  11.406 - 	nop
  11.407 - 
  11.408 -+	ENDFUNC(GLOBAL(ashlsi3))
  11.409 -+
  11.410 - #endif
  11.411 - 
  11.412 - #ifdef L_lshiftrt
  11.413 -@@ -497,6 +577,7 @@
  11.414 - ! (none)
  11.415 - !
  11.416 - 	.global	GLOBAL(lshrsi3)
  11.417 -+	FUNC(GLOBAL(lshrsi3))
  11.418 - 	.align	2
  11.419 - GLOBAL(lshrsi3):
  11.420 - 	mov	#31,r0
  11.421 -@@ -633,6 +714,8 @@
  11.422 - 	rts
  11.423 - 	nop
  11.424 - 
  11.425 -+	ENDFUNC(GLOBAL(lshrsi3))
  11.426 -+
  11.427 - #endif
  11.428 - 
  11.429 - #ifdef L_movstr
  11.430 -@@ -649,76 +732,113 @@
  11.431 - 	add	#64,r4
  11.432 - 	.align	4
  11.433 - 	.global	GLOBAL(movstrSI64)
  11.434 -+	FUNC(GLOBAL(movstrSI64))
  11.435 - GLOBAL(movstrSI64):
  11.436 - 	mov.l	@(60,r5),r0
  11.437 - 	mov.l	r0,@(60,r4)
  11.438 - 	.global	GLOBAL(movstrSI60)
  11.439 -+	FUNC(GLOBAL(movstrSI60))
  11.440 - GLOBAL(movstrSI60):
  11.441 - 	mov.l	@(56,r5),r0
  11.442 - 	mov.l	r0,@(56,r4)
  11.443 - 	.global	GLOBAL(movstrSI56)
  11.444 -+	FUNC(GLOBAL(movstrSI56))
  11.445 - GLOBAL(movstrSI56):
  11.446 - 	mov.l	@(52,r5),r0
  11.447 - 	mov.l	r0,@(52,r4)
  11.448 - 	.global	GLOBAL(movstrSI52)
  11.449 -+	FUNC(GLOBAL(movstrSI52))
  11.450 - GLOBAL(movstrSI52):
  11.451 - 	mov.l	@(48,r5),r0
  11.452 - 	mov.l	r0,@(48,r4)
  11.453 - 	.global	GLOBAL(movstrSI48)
  11.454 -+	FUNC(GLOBAL(movstrSI48))
  11.455 - GLOBAL(movstrSI48):
  11.456 - 	mov.l	@(44,r5),r0
  11.457 - 	mov.l	r0,@(44,r4)
  11.458 - 	.global	GLOBAL(movstrSI44)
  11.459 -+	FUNC(GLOBAL(movstrSI44))
  11.460 - GLOBAL(movstrSI44):
  11.461 - 	mov.l	@(40,r5),r0
  11.462 - 	mov.l	r0,@(40,r4)
  11.463 - 	.global	GLOBAL(movstrSI40)
  11.464 -+	FUNC(GLOBAL(movstrSI40))
  11.465 - GLOBAL(movstrSI40):
  11.466 - 	mov.l	@(36,r5),r0
  11.467 - 	mov.l	r0,@(36,r4)
  11.468 - 	.global	GLOBAL(movstrSI36)
  11.469 -+	FUNC(GLOBAL(movstrSI36))
  11.470 - GLOBAL(movstrSI36):
  11.471 - 	mov.l	@(32,r5),r0
  11.472 - 	mov.l	r0,@(32,r4)
  11.473 - 	.global	GLOBAL(movstrSI32)
  11.474 -+	FUNC(GLOBAL(movstrSI32))
  11.475 - GLOBAL(movstrSI32):
  11.476 - 	mov.l	@(28,r5),r0
  11.477 - 	mov.l	r0,@(28,r4)
  11.478 - 	.global	GLOBAL(movstrSI28)
  11.479 -+	FUNC(GLOBAL(movstrSI28))
  11.480 - GLOBAL(movstrSI28):
  11.481 - 	mov.l	@(24,r5),r0
  11.482 - 	mov.l	r0,@(24,r4)
  11.483 - 	.global	GLOBAL(movstrSI24)
  11.484 -+	FUNC(GLOBAL(movstrSI24))
  11.485 - GLOBAL(movstrSI24):
  11.486 - 	mov.l	@(20,r5),r0
  11.487 - 	mov.l	r0,@(20,r4)
  11.488 - 	.global	GLOBAL(movstrSI20)
  11.489 -+	FUNC(GLOBAL(movstrSI20))
  11.490 - GLOBAL(movstrSI20):
  11.491 - 	mov.l	@(16,r5),r0
  11.492 - 	mov.l	r0,@(16,r4)
  11.493 - 	.global	GLOBAL(movstrSI16)
  11.494 -+	FUNC(GLOBAL(movstrSI16))
  11.495 - GLOBAL(movstrSI16):
  11.496 - 	mov.l	@(12,r5),r0
  11.497 - 	mov.l	r0,@(12,r4)
  11.498 - 	.global	GLOBAL(movstrSI12)
  11.499 -+	FUNC(GLOBAL(movstrSI12))
  11.500 - GLOBAL(movstrSI12):
  11.501 - 	mov.l	@(8,r5),r0
  11.502 - 	mov.l	r0,@(8,r4)
  11.503 - 	.global	GLOBAL(movstrSI8)
  11.504 -+	FUNC(GLOBAL(movstrSI8))
  11.505 - GLOBAL(movstrSI8):
  11.506 - 	mov.l	@(4,r5),r0
  11.507 - 	mov.l	r0,@(4,r4)
  11.508 - 	.global	GLOBAL(movstrSI4)
  11.509 -+	FUNC(GLOBAL(movstrSI4))
  11.510 - GLOBAL(movstrSI4):
  11.511 - 	mov.l	@(0,r5),r0
  11.512 - 	mov.l	r0,@(0,r4)
  11.513 -+	.global	GLOBAL(movstrSI0)
  11.514 -+	FUNC(GLOBAL(movstrSI0))
  11.515 - GLOBAL(movstrSI0):
  11.516 - 	rts
  11.517 - 	nop
  11.518 - 
  11.519 -+	ENDFUNC(GLOBAL(movstrSI64))
  11.520 -+	ENDFUNC(GLOBAL(movstrSI60))
  11.521 -+	ENDFUNC(GLOBAL(movstrSI56))
  11.522 -+	ENDFUNC(GLOBAL(movstrSI52))
  11.523 -+	ENDFUNC(GLOBAL(movstrSI48))
  11.524 -+	ENDFUNC(GLOBAL(movstrSI44))
  11.525 -+	ENDFUNC(GLOBAL(movstrSI40))
  11.526 -+	ENDFUNC(GLOBAL(movstrSI36))
  11.527 -+	ENDFUNC(GLOBAL(movstrSI32))
  11.528 -+	ENDFUNC(GLOBAL(movstrSI28))
  11.529 -+	ENDFUNC(GLOBAL(movstrSI24))
  11.530 -+	ENDFUNC(GLOBAL(movstrSI20))
  11.531 -+	ENDFUNC(GLOBAL(movstrSI16))
  11.532 -+	ENDFUNC(GLOBAL(movstrSI12))
  11.533 -+	ENDFUNC(GLOBAL(movstrSI8))
  11.534 -+	ENDFUNC(GLOBAL(movstrSI4))
  11.535 -+	ENDFUNC(GLOBAL(movstrSI0))
  11.536 -+
  11.537 - 	.align	4
  11.538 - 
  11.539 - 	.global	GLOBAL(movstr)
  11.540 -+	FUNC(GLOBAL(movstr))
  11.541 - GLOBAL(movstr):
  11.542 - 	mov.l	@(60,r5),r0
  11.543 - 	mov.l	r0,@(60,r4)
  11.544 -@@ -775,6 +895,8 @@
  11.545 - 	add	#64,r5
  11.546 - 	bra	GLOBAL(movstr)
  11.547 - 	add	#64,r4
  11.548 -+
  11.549 -+	FUNC(GLOBAL(movstr))
  11.550 - #endif
  11.551 - 
  11.552 - #ifdef L_movstr_i4
  11.553 -@@ -783,6 +905,10 @@
  11.554 - 	.global	GLOBAL(movstr_i4_odd)
  11.555 - 	.global	GLOBAL(movstrSI12_i4)
  11.556 - 
  11.557 -+	FUNC(GLOBAL(movstr_i4_even))
  11.558 -+	FUNC(GLOBAL(movstr_i4_odd))
  11.559 -+	FUNC(GLOBAL(movstrSI12_i4))
  11.560 -+
  11.561 - 	.p2align	5
  11.562 - L_movstr_2mod4_end:
  11.563 - 	mov.l	r0,@(16,r4)
  11.564 -@@ -791,6 +917,11 @@
  11.565 - 
  11.566 - 	.p2align	2
  11.567 - 
  11.568 -+GLOBAL(movstr_i4_even):
  11.569 -+	mov.l	@r5+,r0
  11.570 -+	bra	L_movstr_start_even
  11.571 -+	mov.l	@r5+,r1
  11.572 -+
  11.573 - GLOBAL(movstr_i4_odd):
  11.574 - 	mov.l	@r5+,r1
  11.575 - 	add	#-4,r4
  11.576 -@@ -817,10 +948,8 @@
  11.577 - 	rts
  11.578 - 	mov.l	r3,@(12,r4)
  11.579 - 
  11.580 --GLOBAL(movstr_i4_even):
  11.581 --	mov.l	@r5+,r0
  11.582 --	bra	L_movstr_start_even
  11.583 --	mov.l	@r5+,r1
  11.584 -+	ENDFUNC(GLOBAL(movstr_i4_even))
  11.585 -+	ENDFUNC(GLOBAL(movstr_i4_odd))
  11.586 - 
  11.587 - 	.p2align	4
  11.588 - GLOBAL(movstrSI12_i4):
  11.589 -@@ -831,12 +960,16 @@
  11.590 - 	mov.l	r1,@(4,r4)
  11.591 - 	rts
  11.592 - 	mov.l	r2,@(8,r4)
  11.593 -+
  11.594 -+	ENDFUNC(GLOBAL(movstrSI12_i4))
  11.595 -+
  11.596 - #endif
  11.597 - 
  11.598 - #ifdef L_mulsi3
  11.599 - 
  11.600 - 
  11.601 - 	.global	GLOBAL(mulsi3)
  11.602 -+	FUNC(GLOBAL(mulsi3))
  11.603 - 
  11.604 - ! r4 =       aabb
  11.605 - ! r5 =       ccdd
  11.606 -@@ -869,7 +1002,7 @@
  11.607 - 	rts
  11.608 - 	add	r2,r0
  11.609 - 
  11.610 --
  11.611 -+	FUNC(GLOBAL(mulsi3))
  11.612 - #endif
  11.613 - #endif /* ! __SH5__ */
  11.614 - #ifdef L_sdivsi3_i4
  11.615 -@@ -879,6 +1012,7 @@
  11.616 - !! args in r4 and r5, result in fpul, clobber dr0, dr2
  11.617 - 
  11.618 - 	.global	GLOBAL(sdivsi3_i4)
  11.619 -+	FUNC(GLOBAL(sdivsi3_i4))
  11.620 - GLOBAL(sdivsi3_i4):
  11.621 - 	lds r4,fpul
  11.622 - 	float fpul,dr0
  11.623 -@@ -888,6 +1022,8 @@
  11.624 - 	rts
  11.625 - 	ftrc dr0,fpul
  11.626 - 
  11.627 -+	ENDFUNC(GLOBAL(sdivsi3_i4))
  11.628 -+
  11.629 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
  11.630 - !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
  11.631 - 
  11.632 -@@ -896,6 +1032,7 @@
  11.633 - 	.mode	SHcompact
  11.634 - #endif
  11.635 - 	.global	GLOBAL(sdivsi3_i4)
  11.636 -+	FUNC(GLOBAL(sdivsi3_i4))
  11.637 - GLOBAL(sdivsi3_i4):
  11.638 - 	sts.l fpscr,@-r15
  11.639 - 	mov #8,r2
  11.640 -@@ -910,6 +1047,8 @@
  11.641 - 	rts
  11.642 - 	lds.l @r15+,fpscr
  11.643 - 
  11.644 -+	ENDFUNC(GLOBAL(sdivsi3_i4))
  11.645 -+
  11.646 - #endif /* ! __SH5__ || __SH5__ == 32 */
  11.647 - #endif /* ! __SH4__ */
  11.648 - #endif
  11.649 -@@ -924,9 +1063,10 @@
  11.650 - !!
  11.651 - !!
  11.652 - 
  11.653 --!! args in r4 and r5, result in r0 clobber r1,r2,r3
  11.654 -+!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
  11.655 - 
  11.656 - 	.global	GLOBAL(sdivsi3)
  11.657 -+	FUNC(GLOBAL(sdivsi3))
  11.658 - #if __SHMEDIA__
  11.659 - #if __SH5__ == 32
  11.660 - 	.section	.text..SHmedia32,"ax"
  11.661 -@@ -1076,6 +1216,7 @@
  11.662 - div0:	rts
  11.663 - 	mov	#0,r0
  11.664 - 
  11.665 -+	ENDFUNC(GLOBAL(sdivsi3))
  11.666 - #endif /* ! __SHMEDIA__ */
  11.667 - #endif /* ! __SH4__ */
  11.668 - #endif
  11.669 -@@ -1084,9 +1225,11 @@
  11.670 - 	.title "SH DIVIDE"
  11.671 - !! 4 byte integer Divide code for the Hitachi SH
  11.672 - #ifdef __SH4__
  11.673 --!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
  11.674 -+!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
  11.675 -+!! and t bit
  11.676 - 
  11.677 - 	.global	GLOBAL(udivsi3_i4)
  11.678 -+	FUNC(GLOBAL(udivsi3_i4))
  11.679 - GLOBAL(udivsi3_i4):
  11.680 - 	mov #1,r1
  11.681 - 	cmp/hi r1,r5
  11.682 -@@ -1127,6 +1270,8 @@
  11.683 - L1:
  11.684 - 	.double 2147483648
  11.685 - 
  11.686 -+	ENDFUNC(GLOBAL(udivsi3_i4))
  11.687 -+
  11.688 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
  11.689 - !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
  11.690 - 
  11.691 -@@ -1135,6 +1280,7 @@
  11.692 - 	.mode	SHcompact
  11.693 - #endif
  11.694 - 	.global	GLOBAL(udivsi3_i4)
  11.695 -+	FUNC(GLOBAL(udivsi3_i4))
  11.696 - GLOBAL(udivsi3_i4):
  11.697 - 	mov #1,r1
  11.698 - 	cmp/hi r1,r5
  11.699 -@@ -1183,6 +1329,8 @@
  11.700 - #endif
  11.701 - 	.double 2147483648
  11.702 - 
  11.703 -+	ENDFUNC(GLOBAL(udivsi3_i4))
  11.704 -+
  11.705 - #endif /* ! __SH5__ || __SH5__ == 32 */
  11.706 - #endif /* ! __SH4__ */
  11.707 - #endif
  11.708 -@@ -1199,6 +1347,7 @@
  11.709 - 
  11.710 - !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
  11.711 - 	.global	GLOBAL(udivsi3)
  11.712 -+	FUNC(GLOBAL(udivsi3))
  11.713 - 
  11.714 - #if __SHMEDIA__
  11.715 - #if __SH5__ == 32
  11.716 -@@ -1299,6 +1448,8 @@
  11.717 - ret:	rts
  11.718 - 	mov	r4,r0
  11.719 - 
  11.720 -+	ENDFUNC(GLOBAL(udivsi3))
  11.721 -+
  11.722 - #endif /* ! __SHMEDIA__ */
  11.723 - #endif /* __SH4__ */
  11.724 - #endif
  11.725 -@@ -1308,6 +1459,7 @@
  11.726 - 	.mode	SHcompact
  11.727 - #endif
  11.728 - 	.global GLOBAL(set_fpscr)
  11.729 -+	FUNC(GLOBAL(set_fpscr))
  11.730 - GLOBAL(set_fpscr):
  11.731 - 	lds r4,fpscr
  11.732 - 	mov.l LOCAL(set_fpscr_L1),r1
  11.733 -@@ -1340,11 +1492,16 @@
  11.734 - 	.align 2
  11.735 - LOCAL(set_fpscr_L1):
  11.736 - 	.long GLOBAL(fpscr_values)
  11.737 -+
  11.738 -+	ENDFUNC(GLOBAL(set_fpscr))
  11.739 -+
  11.740 -+#ifndef NO_FPSCR_VALUES
  11.741 - #ifdef __ELF__
  11.742 -         .comm   GLOBAL(fpscr_values),8,4
  11.743 - #else
  11.744 -         .comm   GLOBAL(fpscr_values),8
  11.745 - #endif /* ELF */
  11.746 -+#endif /* NO_FPSCR_VALUES */
  11.747 - #endif /* SH3E / SH4 */
  11.748 - #endif /* L_set_fpscr */
  11.749 - #ifdef L_ic_invalidate
  11.750 -@@ -1360,6 +1517,7 @@
  11.751 - 	blink	tr0, r63
  11.752 - #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
  11.753 - 	.global GLOBAL(ic_invalidate)
  11.754 -+	FUNC(GLOBAL(ic_invalidate))
  11.755 - GLOBAL(ic_invalidate):
  11.756 - 	ocbwb	@r4
  11.757 - 	mova	0f,r0
  11.758 -@@ -1382,6 +1540,9 @@
  11.759 - 	nop
  11.760 - 	.endr
  11.761 - 	.endr
  11.762 -+
  11.763 -+	ENDFUNC(GLOBAL(ic_invalidate))
  11.764 -+
  11.765 - #endif /* SH4 */
  11.766 - #endif /* L_ic_invalidate */
  11.767 - 
  11.768 -diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
  11.769 ---- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver	Thu Jan  1 09:00:00 1970
  11.770 -+++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver	Sat Feb 22 01:40:14 2003
  11.771 -@@ -0,0 +1,21 @@
  11.772 -+# In order to work around the very problems that force us to now generally
  11.773 -+# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
  11.774 -+# By now choosing the same version tags for these specific routines, we
  11.775 -+# maintain enough binary compatibility to allow future versions of glibc
  11.776 -+# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
  11.777 -+
  11.778 -+# Note that we cannot use the default libgcc-glibc.ver file on sh,
  11.779 -+# because GLIBC_2.0 does not exist on this architecture, as the first 
  11.780 -+# ever glibc release on the platform was GLIBC_2.2.
  11.781 -+
  11.782 -+%inherit GCC_3.0 GLIBC_2.2
  11.783 -+GLIBC_2.2 {
  11.784 -+  __register_frame
  11.785 -+  __register_frame_table
  11.786 -+  __deregister_frame
  11.787 -+  __register_frame_info
  11.788 -+  __deregister_frame_info
  11.789 -+  __frame_state_for
  11.790 -+  __register_frame_info_table
  11.791 -+}
  11.792 -+
  11.793 -diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
  11.794 ---- gcc-20030210.orig/gcc/config/sh/linux.h	Tue Apr 16 05:27:42 2002
  11.795 -+++ gcc-20030210/gcc/config/sh/linux.h	Sat Feb 22 01:40:14 2003
  11.796 -@@ -19,6 +19,10 @@
  11.797 - the Free Software Foundation, 59 Temple Place - Suite 330,
  11.798 - Boston, MA 02111-1307, USA.  */
  11.799 - 
  11.800 -+/* We're not SYSVR4, not having /usr/ccs */
  11.801 -+#undef MD_EXEC_PREFIX
  11.802 -+#undef MD_STARTFILE_PREFIX
  11.803 -+
  11.804 - /* Run-time Target Specification.  */
  11.805 - #undef TARGET_VERSION
  11.806 - #define TARGET_VERSION  fputs (" (SH GNU/Linux with ELF)", stderr);
  11.807 -@@ -39,6 +43,28 @@
  11.808 - #undef WCHAR_TYPE_SIZE
  11.809 - #define WCHAR_TYPE_SIZE BITS_PER_WORD
  11.810 - 
  11.811 -+/* This was defined in linux.h.  Define it here also. */
  11.812 -+#undef  DEFAULT_VTABLE_THUNKS
  11.813 -+#define DEFAULT_VTABLE_THUNKS   1
  11.814 -+
  11.815 -+/* Likewise.  */
  11.816 -+#define HANDLE_PRAGMA_PACK_PUSH_POP
  11.817 -+
  11.818 -+/* Pick up the return address upon entry to a procedure. Used for
  11.819 -+   dwarf2 unwind information.  This also enables the table driven
  11.820 -+   mechanism.  */
  11.821 -+
  11.822 -+#define INCOMING_RETURN_ADDR_RTX	gen_rtx_REG (Pmode, PR_REG)
  11.823 -+#define DWARF_FRAME_RETURN_COLUMN	DWARF_FRAME_REGNUM (PR_REG)
  11.824 -+
  11.825 -+#undef CPP_SPEC
  11.826 -+#define CPP_SPEC "\
  11.827 -+   %{m4:-D__SH4__} \
  11.828 -+   %{!m4:%(cpp_default_cpu_spec)} \
  11.829 -+   %(subtarget_cpp_spec) \
  11.830 -+   %(subtarget_cpp_ptr_spec) \
  11.831 -+   %(subtarget_cpp_endian_spec) "
  11.832 -+
  11.833 - #undef SUBTARGET_CPP_SPEC
  11.834 - #define SUBTARGET_CPP_SPEC "\
  11.835 -    %{fPIC:-D__PIC__ -D__pic__} \
  11.836 -@@ -55,36 +81,45 @@
  11.837 - #undef CPP_DEFAULT_CPU_SPEC
  11.838 - #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
  11.839 - 
  11.840 --
  11.841 - #undef CPP_PREDEFINES
  11.842 - #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
  11.843 - 
  11.844 -+/* The GNU C++ standard library requires that these macros be defined.  */
  11.845 -+#undef CPLUSPLUS_CPP_SPEC
  11.846 -+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
  11.847 -+
  11.848 - #undef ASM_SPEC
  11.849 --#define ASM_SPEC  "%{!mb:-little} %{mrelax:-relax}"
  11.850 -+#define ASM_SPEC  "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
  11.851 - 
  11.852 - #undef CC1_SPEC
  11.853 - #define CC1_SPEC \
  11.854 --  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
  11.855 --
  11.856 --#undef CC1PLUS_SPEC
  11.857 --#define CC1PLUS_SPEC \
  11.858 --  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
  11.859 -+  "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
  11.860 - 
  11.861 -+/* XXX: It's wrong if prefix != /usr */
  11.862 - #undef LINK_SPEC
  11.863 - #define LINK_SPEC \
  11.864 --  "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
  11.865 -+  "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
  11.866 -    %{shared:-shared} \
  11.867 -    %{!static: \
  11.868 -      %{rdynamic:-export-dynamic} \
  11.869 -      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  11.870 --     %{!rpath:-rpath /lib}} \
  11.871 -+     %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
  11.872 -+     %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
  11.873 -+     %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
  11.874 -+     %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
  11.875 -    %{static:-static}"
  11.876 - 
  11.877 - #undef LIB_SPEC
  11.878 -+#undef LIB_SPEC
  11.879 - #define LIB_SPEC \
  11.880 -   "%{shared: -lc} \
  11.881 --   %{!shared: %{pthread:-lthread} \
  11.882 --     %{profile:-lc_p} %{!profile: -lc}}"
  11.883 -+   %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
  11.884 -+	%{profile:-lc_p} %{!profile: -lc}}"
  11.885 -+
  11.886 -+#if defined(HAVE_LD_EH_FRAME_HDR)
  11.887 -+#undef LINK_EH_SPEC
  11.888 -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
  11.889 -+#endif
  11.890 - 
  11.891 - #undef STARTFILE_SPEC
  11.892 - #define STARTFILE_SPEC \
  11.893 -@@ -92,4 +127,40 @@
  11.894 -      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
  11.895 - 		       %{!p:%{profile:gcrt1.o%s} \
  11.896 - 			 %{!profile:crt1.o%s}}}} \
  11.897 --   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
  11.898 -+   crti.o%s %{static:crtbeginT.o%s}\
  11.899 -+   %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
  11.900 -+
  11.901 -+#undef FUNCTION_PROFILER
  11.902 -+#define FUNCTION_PROFILER(STREAM,LABELNO)				\
  11.903 -+do									\
  11.904 -+{									\
  11.905 -+  if (flag_pic)								\
  11.906 -+    {									\
  11.907 -+      fprintf (STREAM, "	mov.l	3f,r1\n");			\
  11.908 -+      fprintf (STREAM, "	mova	3f,r0\n");			\
  11.909 -+      fprintf (STREAM, "	add	r1,r0\n");			\
  11.910 -+      fprintf (STREAM, "	mov.l	1f,r1\n");			\
  11.911 -+      fprintf (STREAM, "	mov.l	@(r0,r1),r1\n");		\
  11.912 -+    }									\
  11.913 -+  else									\
  11.914 -+    {									\
  11.915 -+      fprintf (STREAM, "	mov.l	1f,r1\n");			\
  11.916 -+    }									\
  11.917 -+  fprintf (STREAM, "	sts.l	pr,@-r15\n");				\
  11.918 -+  fprintf (STREAM, "	mova	2f,r0\n");				\
  11.919 -+  fprintf (STREAM, "	jmp	@r1\n");				\
  11.920 -+  fprintf (STREAM, "	lds	r0,pr\n");				\
  11.921 -+  fprintf (STREAM, "	.align	2\n");					\
  11.922 -+  if (flag_pic)								\
  11.923 -+    {									\
  11.924 -+      fprintf (STREAM, "1:	.long	mcount@GOT\n");			\
  11.925 -+      fprintf (STREAM, "3:	.long	_GLOBAL_OFFSET_TABLE_\n");	\
  11.926 -+    }									\
  11.927 -+  else									\
  11.928 -+    {									\
  11.929 -+      fprintf (STREAM, "1:	.long	mcount\n");			\
  11.930 -+    }									\
  11.931 -+  fprintf (STREAM, "2:	lds.l	@r15+,pr\n");				\
  11.932 -+} while (0)
  11.933 -+
  11.934 -+#define NO_SHARED_LIBGCC_MULTILIB
  11.935 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
  11.936 ---- gcc-20030210.orig/gcc/config/sh/sh-protos.h	Fri Feb 22 01:42:28 2002
  11.937 -+++ gcc-20030210/gcc/config/sh/sh-protos.h	Sat Feb 22 01:40:14 2003
  11.938 -@@ -74,6 +74,7 @@
  11.939 - extern int shl_sext_length PARAMS ((rtx));
  11.940 - extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
  11.941 - extern rtx gen_datalabel_ref PARAMS ((rtx));
  11.942 -+extern int shl_casesi_worker_length PARAMS ((rtx));
  11.943 - extern int regs_used PARAMS ((rtx, int));
  11.944 - extern void fixup_addr_diff_vecs PARAMS ((rtx));
  11.945 - extern int get_dest_uid PARAMS ((rtx, int));
  11.946 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
  11.947 ---- gcc-20030210.orig/gcc/config/sh/sh.c	Fri Feb 22 01:42:28 2002
  11.948 -+++ gcc-20030210/gcc/config/sh/sh.c	Sat Feb 22 01:40:14 2003
  11.949 -@@ -2143,6 +2143,48 @@
  11.950 -   return sym;
  11.951 - }
  11.952 - 
  11.953 -+
  11.954 -+/* Function to be used in the length attribute of the casesi_worker
  11.955 -+   instruction.  Returns number of instructions, which is half of the
  11.956 -+   length of bytes. */
  11.957 -+
  11.958 -+int
  11.959 -+shl_casesi_worker_length (insn)
  11.960 -+     rtx insn;
  11.961 -+{
  11.962 -+  rtx set_src, label;
  11.963 -+  rtx diff_vec;
  11.964 -+
  11.965 -+  set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
  11.966 -+  if (!(GET_CODE (set_src) == UNSPEC
  11.967 -+	&& XINT (set_src, 1) == UNSPEC_CASESI))
  11.968 -+    abort ();
  11.969 -+
  11.970 -+  label = XVECEXP (set_src, 0, 2);
  11.971 -+  if (GET_CODE (label) != LABEL_REF)
  11.972 -+    abort ();
  11.973 -+
  11.974 -+  diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
  11.975 -+
  11.976 -+  if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
  11.977 -+    abort ();
  11.978 -+
  11.979 -+  switch (GET_MODE (diff_vec))
  11.980 -+    {
  11.981 -+    case SImode:
  11.982 -+      return 2;
  11.983 -+    case HImode:
  11.984 -+      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
  11.985 -+	return 3;
  11.986 -+      return 2;
  11.987 -+    case QImode:
  11.988 -+      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
  11.989 -+	return 2;
  11.990 -+      return 1;
  11.991 -+    default:
  11.992 -+      abort ();
  11.993 -+    }
  11.994 -+}
  11.995 - 
  11.996 - /* The SH cannot load a large constant into a register, constants have to
  11.997 -    come from a pc relative load.  The reference of a pc relative load
  11.998 -@@ -3190,7 +3232,7 @@
  11.999 -       vec_lab = XEXP (XEXP (pat, 0), 0);
 11.1000 - 
 11.1001 -       /* Search the matching casesi_jump_2.  */
 11.1002 --      for (prev = vec_lab; ; prev = PREV_INSN (prev))
 11.1003 -+      for (prev = vec_lab; prev; prev = PREV_INSN (prev))
 11.1004 - 	{
 11.1005 - 	  if (GET_CODE (prev) != JUMP_INSN)
 11.1006 - 	    continue;
 11.1007 -@@ -3205,6 +3247,13 @@
 11.1008 - 	    break;
 11.1009 - 	}
 11.1010 - 
 11.1011 -+      if (prev == NULL)
 11.1012 -+	{			/* Switch statement has been optimized out.  */
 11.1013 -+	  delete_insn (PREV_INSN (insn));
 11.1014 -+	  delete_insn (insn);
 11.1015 -+	  continue;
 11.1016 -+	}
 11.1017 -+
 11.1018 -       /* Emit the reference label of the braf where it belongs, right after
 11.1019 - 	 the casesi_jump_2 (i.e. braf).  */
 11.1020 -       braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
 11.1021 -@@ -3223,7 +3272,7 @@
 11.1022 -      rtx barrier_or_label;
 11.1023 - {
 11.1024 -   rtx next = next_real_insn (barrier_or_label), pat, prev;
 11.1025 --  int slot, credit, jump_to_next;
 11.1026 -+  int slot, credit, jump_to_next = 0;
 11.1027 -  
 11.1028 -   if (! next)
 11.1029 -     return 0;
 11.1030 -@@ -4507,7 +4556,8 @@
 11.1031 -   if (current_function_varargs || current_function_stdarg)
 11.1032 -     {
 11.1033 -       /* This is not used by the SH3E calling convention  */
 11.1034 --      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
 11.1035 -+      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
 11.1036 -+	  || TARGET_NO_IMPLICIT_FP)
 11.1037 - 	{
 11.1038 - 	  /* Push arg regs as if they'd been provided by caller in stack.  */
 11.1039 - 	  for (i = 0; i < NPARM_REGS(SImode); i++)
 11.1040 -@@ -5149,7 +5199,8 @@
 11.1041 -   tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
 11.1042 -   tree record;
 11.1043 - 
 11.1044 --  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
 11.1045 -+  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
 11.1046 -+      || TARGET_NO_IMPLICIT_FP)
 11.1047 -     return ptr_type_node;
 11.1048 - 
 11.1049 -   record = make_node (RECORD_TYPE);
 11.1050 -@@ -5211,7 +5262,8 @@
 11.1051 -       return;
 11.1052 -     }
 11.1053 - 
 11.1054 --  if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
 11.1055 -+  if ((! TARGET_SH3E && ! TARGET_SH4)
 11.1056 -+      || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
 11.1057 -     {
 11.1058 -       std_expand_builtin_va_start (stdarg_p, valist, nextarg);
 11.1059 -       return;
 11.1060 -@@ -5289,7 +5341,8 @@
 11.1061 -   rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
 11.1062 -   pptr_type_node = build_pointer_type (ptr_type_node);
 11.1063 - 
 11.1064 --  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
 11.1065 -+  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
 11.1066 -+      && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
 11.1067 -     {
 11.1068 -       tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
 11.1069 -       tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
 11.1070 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
 11.1071 ---- gcc-20030210.orig/gcc/config/sh/sh.h	Fri Feb 22 01:42:28 2002
 11.1072 -+++ gcc-20030210/gcc/config/sh/sh.h	Sat Feb 22 01:40:14 2003
 11.1073 -@@ -147,10 +147,10 @@
 11.1074 - #define HARD_SH4_BIT	(1<<5)
 11.1075 - #define FPU_SINGLE_BIT	(1<<7)
 11.1076 - #define SH4_BIT	       	(1<<12)
 11.1077 -+#define NO_IMPLICIT_FP_BIT	(1<<3)
 11.1078 - #define FMOVD_BIT	(1<<4)
 11.1079 - #define SH5_BIT		(1<<0)
 11.1080 - #define SPACE_BIT 	(1<<13)
 11.1081 --#define BIGTABLE_BIT  	(1<<14)
 11.1082 - #define RELAX_BIT	(1<<15)
 11.1083 - #define USERMODE_BIT	(1<<16)
 11.1084 - #define HITACHI_BIT     (1<<22)
 11.1085 -@@ -205,6 +205,9 @@
 11.1086 - /* Nonzero if we should generate code for a SH5 CPU (either ISA).  */
 11.1087 - #define TARGET_SH5 (target_flags & SH5_BIT)
 11.1088 - 
 11.1089 -+/* Nonzero if we should not use FPU implicitly.  */
 11.1090 -+#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
 11.1091 -+
 11.1092 - /* Nonzero if we should generate code using the SHcompact instruction
 11.1093 -    set and 32-bit ABI.  */
 11.1094 - #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
 11.1095 -@@ -225,6 +228,7 @@
 11.1096 - 
 11.1097 - /* Nonzero if we should generate code using SHmedia FPU instructions.  */
 11.1098 - #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
 11.1099 -+
 11.1100 - /* Nonzero if we should generate fmovd.  */
 11.1101 - #define TARGET_FMOVD (target_flags & FMOVD_BIT)
 11.1102 - 
 11.1103 -@@ -234,9 +238,6 @@
 11.1104 - /* Nonzero if we should generate smaller code rather than faster code.  */
 11.1105 - #define TARGET_SMALLCODE   (target_flags & SPACE_BIT)
 11.1106 - 
 11.1107 --/* Nonzero to use long jump tables.  */
 11.1108 --#define TARGET_BIGTABLE     (target_flags & BIGTABLE_BIT)
 11.1109 --
 11.1110 - /* Nonzero to generate pseudo-ops needed by the assembler and linker
 11.1111 -    to do function call relaxing.  */
 11.1112 - #define TARGET_RELAX (target_flags & RELAX_BIT)
 11.1113 -@@ -297,7 +298,6 @@
 11.1114 -   {"5-compact-nofpu", TARGET_NONE, "" },	\
 11.1115 -   {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
 11.1116 -   {"b",		-LITTLE_ENDIAN_BIT, "" },  	\
 11.1117 --  {"bigtable", 	BIGTABLE_BIT, "" },		\
 11.1118 -   {"dalign",  	DALIGN_BIT, "" },		\
 11.1119 -   {"fmovd",  	FMOVD_BIT, "" },		\
 11.1120 -   {"hitachi",	HITACHI_BIT, "" },		\
 11.1121 -@@ -306,6 +306,7 @@
 11.1122 -   {"isize", 	ISIZE_BIT, "" },		\
 11.1123 -   {"l",		LITTLE_ENDIAN_BIT, "" },  	\
 11.1124 -   {"no-ieee",  	-IEEE_BIT, "" },		\
 11.1125 -+  {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" },	\
 11.1126 -   {"padstruct", PADSTRUCT_BIT, "" },    	\
 11.1127 -   {"prefergot",	PREFERGOT_BIT, "" },		\
 11.1128 -   {"relax",	RELAX_BIT, "" },		\
 11.1129 -@@ -2493,16 +2494,22 @@
 11.1130 -     goto LABEL;								\
 11.1131 - }
 11.1132 - 
 11.1133 -+extern int optimize; /* needed for gen_casesi.  */
 11.1134 -+extern int optimize_size;
 11.1135 -+
 11.1136 - /* Specify the machine mode that this machine uses
 11.1137 -    for the index in the tablejump instruction.  */
 11.1138 --#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
 11.1139 -+#define CASE_VECTOR_MODE SImode
 11.1140 - 
 11.1141 - #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
 11.1142 - ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
 11.1143 -  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
 11.1144 -  : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
 11.1145 -  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
 11.1146 -- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
 11.1147 -+ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
 11.1148 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
 11.1149 -+ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
 11.1150 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
 11.1151 -  : SImode)
 11.1152 - 
 11.1153 - /* Define as C expression which evaluates to nonzero if the tablejump
 11.1154 -@@ -3038,10 +3045,7 @@
 11.1155 - /* Output an absolute table element.  */
 11.1156 - 
 11.1157 - #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  				\
 11.1158 --  if (TARGET_BIGTABLE) 							\
 11.1159 --    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); 			\
 11.1160 --  else									\
 11.1161 --    asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); 			\
 11.1162 -+    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
 11.1163 - 
 11.1164 - /* Output various types of constants.  */
 11.1165 - 
 11.1166 -@@ -3167,8 +3171,6 @@
 11.1167 - #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
 11.1168 - extern enum processor_type sh_cpu;
 11.1169 - 
 11.1170 --extern int optimize; /* needed for gen_casesi.  */
 11.1171 --
 11.1172 - enum mdep_reorg_phase_e
 11.1173 - {
 11.1174 -   SH_BEFORE_MDEP_REORG,
 11.1175 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
 11.1176 ---- gcc-20030210.orig/gcc/config/sh/sh.md	Sat Nov 23 04:58:06 2002
 11.1177 -+++ gcc-20030210/gcc/config/sh/sh.md	Sat Feb 22 01:40:14 2003
 11.1178 -@@ -1242,7 +1242,7 @@
 11.1179 -    (clobber (reg:SI PR_REG))
 11.1180 -    (clobber (reg:SI R4_REG))
 11.1181 -    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
 11.1182 --  "TARGET_SH1 && ! TARGET_SH4"
 11.1183 -+  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
 11.1184 -   "jsr	@%1%#"
 11.1185 -   [(set_attr "type" "sfunc")
 11.1186 -    (set_attr "needs_delay_slot" "yes")])
 11.1187 -@@ -1336,7 +1336,7 @@
 11.1188 - 
 11.1189 -   operands[3] = gen_reg_rtx (Pmode);
 11.1190 -   /* Emit the move of the address to a pseudo outside of the libcall.  */
 11.1191 --  if (TARGET_HARD_SH4 && TARGET_SH3E)
 11.1192 -+  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
 11.1193 -     {
 11.1194 -       emit_move_insn (operands[3],
 11.1195 - 		      gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
 11.1196 -@@ -1391,7 +1391,7 @@
 11.1197 -    (clobber (reg:SI R2_REG))
 11.1198 -    (clobber (reg:SI R3_REG))
 11.1199 -    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
 11.1200 --  "TARGET_SH1 && ! TARGET_SH4"
 11.1201 -+  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
 11.1202 -   "jsr	@%1%#"
 11.1203 -   [(set_attr "type" "sfunc")
 11.1204 -    (set_attr "needs_delay_slot" "yes")])
 11.1205 -@@ -1476,7 +1476,7 @@
 11.1206 - 
 11.1207 -   operands[3] = gen_reg_rtx (Pmode);
 11.1208 -   /* Emit the move of the address to a pseudo outside of the libcall.  */
 11.1209 --  if (TARGET_HARD_SH4 && TARGET_SH3E)
 11.1210 -+  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
 11.1211 -     {
 11.1212 -       emit_move_insn (operands[3],
 11.1213 - 		      gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
 11.1214 -@@ -6446,6 +6446,8 @@
 11.1215 -     case SImode:
 11.1216 -       return \"shll2	%1\;mov.l	@(r0,%1),%0\";
 11.1217 -     case HImode:
 11.1218 -+      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 11.1219 -+	return \"add	%1,%1\;mov.w	@(r0,%1),%0\;extu.w	%0,%0\";
 11.1220 -       return \"add	%1,%1\;mov.w	@(r0,%1),%0\";
 11.1221 -     case QImode:
 11.1222 -       if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 11.1223 -@@ -6455,7 +6457,15 @@
 11.1224 -       abort ();
 11.1225 -     }
 11.1226 - }"
 11.1227 --  [(set_attr "length" "4")])
 11.1228 -+  [(set (attr "length")
 11.1229 -+	(cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
 11.1230 -+	       (const_string "2")
 11.1231 -+	       (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
 11.1232 -+	       (const_string "4")
 11.1233 -+	       ;; Put "match_dup" here so that insn_variable_length_p return 1.
 11.1234 -+	       (ne (match_dup 2) (match_dup 2))
 11.1235 -+	       (const_string "4")]
 11.1236 -+	      (const_string "6")))])
 11.1237 - 
 11.1238 - (define_insn "casesi_shift_media"
 11.1239 -   [(set (match_operand 0 "arith_reg_operand" "=r")
 11.1240 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
 11.1241 ---- gcc-20030210.orig/gcc/config/sh/sh3-linux.h	Thu Jan  1 09:00:00 1970
 11.1242 -+++ gcc-20030210/gcc/config/sh/sh3-linux.h	Sat Feb 22 01:40:14 2003
 11.1243 -@@ -0,0 +1,29 @@
 11.1244 -+#undef TARGET_VERSION
 11.1245 -+#define TARGET_VERSION  fputs (" (SH3 GNU/Linux with ELF)", stderr);
 11.1246 -+
 11.1247 -+#undef CPP_SPEC
 11.1248 -+#define CPP_SPEC \
 11.1249 -+  "-D__LITTLE_ENDIAN__ \
 11.1250 -+   -D__SH3__ -D__sh3__ \
 11.1251 -+   -D__SIZE_TYPE__=unsigned\\ int \
 11.1252 -+   -D__PTRDIFF_TYPE__=int \
 11.1253 -+   %{fPIC:-D__PIC__ -D__pic__} \
 11.1254 -+   %{fpic:-D__PIC__ -D__pic__} \
 11.1255 -+   %{posix:-D_POSIX_SOURCE} \
 11.1256 -+   %{pthread:-D_REENTRANT -D_PTHREADS}"
 11.1257 -+
 11.1258 -+#undef ASM_SPEC
 11.1259 -+#define ASM_SPEC  "%{mrelax:-relax}"
 11.1260 -+
 11.1261 -+#undef CC1_SPEC
 11.1262 -+#define CC1_SPEC \
 11.1263 -+  "-musermode -ml -m3 %{profile:-p}"
 11.1264 -+
 11.1265 -+#undef LINK_SPEC
 11.1266 -+#define LINK_SPEC \
 11.1267 -+  "%{mrelax:-relax} \
 11.1268 -+   %{shared:-shared} \
 11.1269 -+   %{!static: \
 11.1270 -+     %{rdynamic:-export-dynamic} \
 11.1271 -+     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 11.1272 -+    %{static:-static}"
 11.1273 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
 11.1274 ---- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h	Thu Jan  1 09:00:00 1970
 11.1275 -+++ gcc-20030210/gcc/config/sh/sh3eb-linux.h	Sat Feb 22 01:40:14 2003
 11.1276 -@@ -0,0 +1,29 @@
 11.1277 -+#undef TARGET_VERSION
 11.1278 -+#define TARGET_VERSION  fputs (" (SH3EB GNU/Linux with ELF)", stderr);
 11.1279 -+
 11.1280 -+#undef CPP_SPEC
 11.1281 -+#define CPP_SPEC \
 11.1282 -+  "-D__BIG_ENDIAN__ \
 11.1283 -+   -D__SH3__ -D__sh3__ \
 11.1284 -+   -D__SIZE_TYPE__=unsigned\\ int \
 11.1285 -+   -D__PTRDIFF_TYPE__=int \
 11.1286 -+   %{fPIC:-D__PIC__ -D__pic__} \
 11.1287 -+   %{fpic:-D__PIC__ -D__pic__} \
 11.1288 -+   %{posix:-D_POSIX_SOURCE} \
 11.1289 -+   %{pthread:-D_REENTRANT -D_PTHREADS}"
 11.1290 -+
 11.1291 -+#undef ASM_SPEC
 11.1292 -+#define ASM_SPEC  "%{mrelax:-relax}"
 11.1293 -+
 11.1294 -+#undef CC1_SPEC
 11.1295 -+#define CC1_SPEC \
 11.1296 -+  "-musermode -mb -m3 %{profile:-p}"
 11.1297 -+
 11.1298 -+#undef LINK_SPEC
 11.1299 -+#define LINK_SPEC \
 11.1300 -+  "%{mrelax:-relax} \
 11.1301 -+   %{shared:-shared} \
 11.1302 -+   %{!static: \
 11.1303 -+     %{rdynamic:-export-dynamic} \
 11.1304 -+     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 11.1305 -+    %{static:-static}"
 11.1306 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
 11.1307 ---- gcc-20030210.orig/gcc/config/sh/sh4-linux.h	Thu Jan  1 09:00:00 1970
 11.1308 -+++ gcc-20030210/gcc/config/sh/sh4-linux.h	Sat Feb 22 01:40:14 2003
 11.1309 -@@ -0,0 +1,29 @@
 11.1310 -+#undef TARGET_VERSION
 11.1311 -+#define TARGET_VERSION  fputs (" (SH4 GNU/Linux with ELF)", stderr);
 11.1312 -+
 11.1313 -+#undef CPP_SPEC
 11.1314 -+#define CPP_SPEC \
 11.1315 -+  "-D__LITTLE_ENDIAN__ \
 11.1316 -+   -D__SH4__ \
 11.1317 -+   -D__SIZE_TYPE__=unsigned\\ int \
 11.1318 -+   -D__PTRDIFF_TYPE__=int \
 11.1319 -+   %{fPIC:-D__PIC__ -D__pic__} \
 11.1320 -+   %{fpic:-D__PIC__ -D__pic__} \
 11.1321 -+   %{posix:-D_POSIX_SOURCE} \
 11.1322 -+   %{pthread:-D_REENTRANT -D_PTHREADS}"
 11.1323 -+
 11.1324 -+#undef ASM_SPEC
 11.1325 -+#define ASM_SPEC  "%{mrelax:-relax}"
 11.1326 -+
 11.1327 -+#undef CC1_SPEC
 11.1328 -+#define CC1_SPEC \
 11.1329 -+  "-musermode -ml -m4 %{profile:-p}"
 11.1330 -+
 11.1331 -+#undef LINK_SPEC
 11.1332 -+#define LINK_SPEC \
 11.1333 -+  "%{mrelax:-relax} \
 11.1334 -+   %{shared:-shared} \
 11.1335 -+   %{!static: \
 11.1336 -+     %{rdynamic:-export-dynamic} \
 11.1337 -+     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 11.1338 -+    %{static:-static}"
 11.1339 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
 11.1340 ---- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h	Thu Jan  1 09:00:00 1970
 11.1341 -+++ gcc-20030210/gcc/config/sh/sh4eb-linux.h	Sat Feb 22 01:40:14 2003
 11.1342 -@@ -0,0 +1,29 @@
 11.1343 -+#undef TARGET_VERSION
 11.1344 -+#define TARGET_VERSION  fputs (" (SH4EB GNU/Linux with ELF)", stderr);
 11.1345 -+
 11.1346 -+#undef CPP_SPEC
 11.1347 -+#define CPP_SPEC \
 11.1348 -+  "-D__BIG_ENDIAN__ \
 11.1349 -+   -D__SH4__ \
 11.1350 -+   -D__SIZE_TYPE__=unsigned\\ int \
 11.1351 -+   -D__PTRDIFF_TYPE__=int \
 11.1352 -+   %{fPIC:-D__PIC__ -D__pic__} \
 11.1353 -+   %{fpic:-D__PIC__ -D__pic__} \
 11.1354 -+   %{posix:-D_POSIX_SOURCE} \
 11.1355 -+   %{pthread:-D_REENTRANT -D_PTHREADS}"
 11.1356 -+
 11.1357 -+#undef ASM_SPEC
 11.1358 -+#define ASM_SPEC  "%{mrelax:-relax}"
 11.1359 -+
 11.1360 -+#undef CC1_SPEC
 11.1361 -+#define CC1_SPEC \
 11.1362 -+  "-musermode -mb -m4 %{profile:-p}"
 11.1363 -+
 11.1364 -+#undef LINK_SPEC
 11.1365 -+#define LINK_SPEC \
 11.1366 -+  "%{mrelax:-relax} \
 11.1367 -+   %{shared:-shared} \
 11.1368 -+   %{!static: \
 11.1369 -+     %{rdynamic:-export-dynamic} \
 11.1370 -+     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 11.1371 -+    %{static:-static}"
 11.1372 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
 11.1373 ---- gcc-20030210.orig/gcc/config/sh/t-linux	Thu May 17 12:16:12 2001
 11.1374 -+++ gcc-20030210/gcc/config/sh/t-linux	Sat Feb 22 01:40:14 2003
 11.1375 -@@ -1,10 +1,20 @@
 11.1376 --TARGET_LIBGCC2_CFLAGS = -fpic
 11.1377 -+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
 11.1378 -+LIBGCC1 = libgcc1-asm.a
 11.1379 -+CROSS_LIBGCC1 = libgcc1-asm.a
 11.1380 -+LIBGCC1_TEST = libgcc1-test
 11.1381 - LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
 11.1382 -   _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
 11.1383 -   _ic_invalidate
 11.1384 -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c
 11.1385 -+LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
 11.1386 - 
 11.1387 --MULTILIB_OPTIONS= mb m3e/m4
 11.1388 -+MULTILIB_OPTIONS= mb m4
 11.1389 - MULTILIB_DIRNAMES= 
 11.1390 - MULTILIB_MATCHES = 
 11.1391 - 
 11.1392 --EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
 11.1393 -+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
 11.1394 -+
 11.1395 -+# Override t-slibgcc-elf-ver to export some libgcc symbols with
 11.1396 -+# the symbol versions that glibc used and SH specific.
 11.1397 -+SHLIB_MAPFILES =  $(srcdir)/libgcc-std.ver \
 11.1398 -+		  $(srcdir)/config/sh/libgcc-glibc.ver
 11.1399 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
 11.1400 ---- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti	Thu Jan  1 09:00:00 1970
 11.1401 -+++ gcc-20030210/gcc/config/sh/t-linux-nomulti	Sat Feb 22 01:40:14 2003
 11.1402 -@@ -0,0 +1,9 @@
 11.1403 -+LIBGCC = libgcc.a
 11.1404 -+EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
 11.1405 -+
 11.1406 -+INSTALL_LIBGCC = install-libgcc
 11.1407 -+
 11.1408 -+MULTILIB_OPTIONS=
 11.1409 -+MULTILIB_DIRNAMES= 
 11.1410 -+MULTILIB_MATCHES = 
 11.1411 -+EXTRA_MULTILIB_PARTS=
 11.1412 -diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
 11.1413 ---- gcc-20030210.orig/gcc/config.gcc	Fri Jan 31 19:17:13 2003
 11.1414 -+++ gcc-20030210/gcc/config.gcc	Sat Feb 22 01:40:14 2003
 11.1415 -@@ -337,9 +337,9 @@
 11.1416 - sparc*-*-*)
 11.1417 - 	cpu_type=sparc
 11.1418 - 	;;
 11.1419 --sh64-*-*)
 11.1420 --	cpu_type=sh
 11.1421 --	;;
 11.1422 -+sh*-*-*)
 11.1423 -+ 	cpu_type=sh
 11.1424 -+ 	;;
 11.1425 - esac
 11.1426 - 
 11.1427 - tm_file=${cpu_type}/${cpu_type}.h
 11.1428 -@@ -3018,9 +3018,31 @@
 11.1429 - 	  thread_file='rtems'
 11.1430 - 	fi
 11.1431 - 	;;
 11.1432 --sh-*-linux*)
 11.1433 -+sh*-*-linux*)
 11.1434 - 	tm_file="${tm_file} sh/elf.h sh/linux.h"
 11.1435 --	tmake_file="sh/t-sh sh/t-elf sh/t-linux"
 11.1436 -+	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
 11.1437 -+	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
 11.1438 -+	case $machine in
 11.1439 -+		sh3eb-*)
 11.1440 -+			tm_file="${tm_file} sh/sh3eb-linux.h"
 11.1441 -+			tmake_file="${tmake_file} sh/t-linux-nomulti"
 11.1442 -+			;;
 11.1443 -+		sh4eb-*)
 11.1444 -+			tm_file="${tm_file} sh/sh4eb-linux.h"
 11.1445 -+			tmake_file="${tmake_file} sh/t-linux-nomulti"
 11.1446 -+			;;
 11.1447 -+		sh3-*)
 11.1448 -+			tm_file="${tm_file} sh/sh3-linux.h"
 11.1449 -+			tmake_file="${tmake_file} sh/t-linux-nomulti"
 11.1450 -+			;;
 11.1451 -+		sh4-*)
 11.1452 -+			tm_file="${tm_file} sh/sh4-linux.h"
 11.1453 -+			tmake_file="${tmake_file} sh/t-linux-nomulti"
 11.1454 -+			;;
 11.1455 -+		*)
 11.1456 -+			;;
 11.1457 -+	esac
 11.1458 -+	xmake_file=x-linux
 11.1459 - 	gas=yes gnu_ld=yes
 11.1460 - 	float_format=sh
 11.1461 - 	;;
 11.1462 -diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
 11.1463 ---- gcc-20030210.orig/gcc/dwarf2out.c	Mon Feb 10 19:36:25 2003
 11.1464 -+++ gcc-20030210/gcc/dwarf2out.c	Sat Feb 22 01:40:14 2003
 11.1465 -@@ -10224,7 +10224,9 @@
 11.1466 - 	  /* We can have a normal definition following an inline one in the
 11.1467 - 	     case of redefinition of GNU C extern inlines.
 11.1468 - 	     It seems reasonable to use AT_specification in this case.  */
 11.1469 --	  && !get_AT_unsigned (old_die, DW_AT_inline))
 11.1470 -+	  && !get_AT_unsigned (old_die, DW_AT_inline)
 11.1471 -+	  /* Skip the nested function.  */
 11.1472 -+	  && !decl_function_context (decl))
 11.1473 - 	{
 11.1474 - 	  /* ??? This can happen if there is a bug in the program, for
 11.1475 - 	     instance, if it has duplicate function definitions.  Ideally,
 11.1476 -diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
 11.1477 ---- gcc-20030210.orig/gcc/final.c	Fri Jan 31 19:17:20 2003
 11.1478 -+++ gcc-20030210/gcc/final.c	Sat Feb 22 01:40:14 2003
 11.1479 -@@ -1128,7 +1128,7 @@
 11.1480 - 	    }
 11.1481 - 	}
 11.1482 - 
 11.1483 --      INSN_ADDRESSES (uid) = insn_current_address;
 11.1484 -+      INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
 11.1485 - 
 11.1486 -       if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
 11.1487 - 	  || GET_CODE (insn) == CODE_LABEL)
 11.1488 -diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
 11.1489 ---- gcc-20030210.orig/gcc/mkmap-symver.awk	Fri Jan 31 19:17:26 2003
 11.1490 -+++ gcc-20030210/gcc/mkmap-symver.awk	Sat Feb 22 01:40:14 2003
 11.1491 -@@ -89,7 +89,11 @@
 11.1492 -     output(inherit[lib]);
 11.1493 - 
 11.1494 -   printf("%s {\n", lib);
 11.1495 --  printf("  global:\n");
 11.1496 -+  for (sym in ver)
 11.1497 -+    if ((ver[sym] == lib) && (sym in def))
 11.1498 -+      count++;
 11.1499 -+  if (count > 0)
 11.1500 -+    printf("  global:\n");
 11.1501 -   for (sym in ver)
 11.1502 -     if ((ver[sym] == lib) && (sym in def))
 11.1503 -       {
 11.1504 -diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
 11.1505 ---- gcc-20030210.orig/gcc/reload1.c	Fri Jan 31 19:17:29 2003
 11.1506 -+++ gcc-20030210/gcc/reload1.c	Sat Feb 22 01:40:14 2003
 11.1507 -@@ -6103,6 +6103,7 @@
 11.1508 - 	    for (j = 0; j < n_reloads; j++)
 11.1509 - 	      if (rld[j].in != 0
 11.1510 - 		  && rld[j].when_needed != RELOAD_OTHER
 11.1511 -+		  && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
 11.1512 - 		  && reg_overlap_mentioned_for_reload_p (rld[j].in,
 11.1513 - 							 rld[i].in))
 11.1514 - 		rld[j].when_needed
 11.1515 -diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
 11.1516 ---- gcc-20030210.orig/gcc/reorg.c	Fri Jan 31 19:17:30 2003
 11.1517 -+++ gcc-20030210/gcc/reorg.c	Sat Feb 22 01:40:14 2003
 11.1518 -@@ -3265,6 +3265,14 @@
 11.1519 - 		|| condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
 11.1520 - 	continue;
 11.1521 - 
 11.1522 -+#ifdef MD_CAN_REDIRECT_BRANCH
 11.1523 -+      /* On some targets, branches with delay slots can have a limited
 11.1524 -+	 displacement.  Give the back end a chance to tell us we can't do
 11.1525 -+	 this.  */
 11.1526 -+      if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
 11.1527 -+	continue;
 11.1528 -+#endif
 11.1529 -+
 11.1530 -       target_label = JUMP_LABEL (delay_insn);
 11.1531 - 
 11.1532 -       if (target_label)
 11.1533 -diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
 11.1534 ---- gcc-20030210.orig/gcc/tree-inline.c	Fri Jan 31 19:17:33 2003
 11.1535 -+++ gcc-20030210/gcc/tree-inline.c	Sat Feb 22 01:40:14 2003
 11.1536 -@@ -836,11 +836,17 @@
 11.1537 - 
 11.1538 -   /* Don't try to inline functions that are not well-suited to
 11.1539 -      inlining.  */
 11.1540 --  if (!inlinable_function_p (fn, id))
 11.1541 --    return NULL_TREE;
 11.1542 -+  if (! inlinable_function_p (fn, id)
 11.1543 -+      || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
 11.1544 -+    {
 11.1545 -+      if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
 11.1546 -+	{
 11.1547 -+	  warning_with_decl (fn, "inlining failed in call to `%s'");
 11.1548 -+	  warning ("called from here");
 11.1549 -+	}
 11.1550 - 
 11.1551 --  if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
 11.1552 --    return NULL_TREE;
 11.1553 -+      return NULL_TREE;
 11.1554 -+    }
 11.1555 - 
 11.1556 -   /* Set the current filename and line number to the function we are
 11.1557 -      inlining so that when we create new _STMT nodes here they get
 11.1558 -diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
 11.1559 ---- gcc-20030210.orig/libjava/Makefile.in	Tue Jan 28 10:44:37 2003
 11.1560 -+++ gcc-20030210/libjava/Makefile.in	Sat Feb 22 01:40:14 2003
 11.1561 -@@ -1637,6 +1637,7 @@
 11.1562 - 	"AS=$(AS)" \
 11.1563 - 	"CC=$(CC)" \
 11.1564 - 	"CXX=$(CXX)" \
 11.1565 -+	"GCJ=$(GCJ)" \
 11.1566 - 	"LD=$(LD)" \
 11.1567 - 	"LIBCFLAGS=$(LIBCFLAGS)" \
 11.1568 - 	"NM=$(NM)" \
 11.1569 -diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
 11.1570 ---- gcc-20030210.orig/libjava/configure	Tue Jan 28 10:44:37 2003
 11.1571 -+++ gcc-20030210/libjava/configure	Sat Feb 22 01:42:11 2003
 11.1572 -@@ -2031,7 +2031,7 @@
 11.1573 - # This must be Linux ELF.
 11.1574 - linux-gnu*)
 11.1575 -   case $host_cpu in
 11.1576 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 11.1577 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 11.1578 -     lt_cv_deplibs_check_method=pass_all ;;
 11.1579 -   *)
 11.1580 -     # glibc up to 2.1.1 does not perform some relocations on ARM
 11.1581 -diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
 11.1582 ---- gcc-20030210.orig/libjava/java/net/natInetAddress.cc	Tue Mar  5 05:02:19 2002
 11.1583 -+++ gcc-20030210/libjava/java/net/natInetAddress.cc	Sat Feb 22 01:40:14 2003
 11.1584 -@@ -56,7 +56,7 @@
 11.1585 - #endif
 11.1586 - 
 11.1587 - #ifndef HAVE_GETHOSTNAME_DECL
 11.1588 --extern "C" int gethostname (char *name, int namelen);
 11.1589 -+extern "C" int gethostname (char *name, unsigned int namelen);
 11.1590 - #endif
 11.1591 - 
 11.1592 - #ifdef DISABLE_JAVA_NET
 11.1593 -diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
 11.1594 ---- gcc-20030210.orig/libjava/libltdl/aclocal.m4	Sun Sep 10 17:04:40 2000
 11.1595 -+++ gcc-20030210/libjava/libltdl/aclocal.m4	Sat Feb 22 01:40:14 2003
 11.1596 -@@ -573,7 +573,7 @@
 11.1597 - # This must be Linux ELF.
 11.1598 - linux-gnu*)
 11.1599 -   case "$host_cpu" in
 11.1600 --  alpha* | i*86 | powerpc* | sparc* | ia64* )
 11.1601 -+  alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
 11.1602 -     lt_cv_deplibs_check_method=pass_all ;;
 11.1603 -   *)
 11.1604 -     # glibc up to 2.1.1 does not perform some relocations on ARM
 11.1605 -diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
 11.1606 ---- gcc-20030210.orig/libjava/sysdep/sh/locks.h	Thu Jan  1 09:00:00 1970
 11.1607 -+++ gcc-20030210/libjava/sysdep/sh/locks.h	Sat Feb 22 01:40:14 2003
 11.1608 -@@ -0,0 +1,72 @@
 11.1609 -+// locks.h - Thread synchronization primitives. SuperH implementation.
 11.1610 -+
 11.1611 -+/* Copyright (C) 2002  Free Software Foundation
 11.1612 -+
 11.1613 -+   This file is part of libgcj.
 11.1614 -+
 11.1615 -+This software is copyrighted work licensed under the terms of the
 11.1616 -+Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
 11.1617 -+details.  */
 11.1618 -+
 11.1619 -+#ifndef __SYSDEP_LOCKS_H__
 11.1620 -+#define __SYSDEP_LOCKS_H__
 11.1621 -+
 11.1622 -+typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
 11.1623 -+				/* address.				*/
 11.1624 -+
 11.1625 -+static unsigned char __cas_lock = 0;
 11.1626 -+
 11.1627 -+inline static void
 11.1628 -+__cas_start_atomic (void)
 11.1629 -+{
 11.1630 -+  unsigned int val;
 11.1631 -+
 11.1632 -+  do
 11.1633 -+    __asm__ __volatile__ ("tas.b @%1; movt %0"
 11.1634 -+			  : "=r" (val)
 11.1635 -+			  : "r" (&__cas_lock)
 11.1636 -+			  : "memory");
 11.1637 -+  while (val == 0);
 11.1638 -+}
 11.1639 -+
 11.1640 -+inline static void
 11.1641 -+__cas_end_atomic (void)
 11.1642 -+{
 11.1643 -+  __asm__ __volatile__ (" " : : : "memory");
 11.1644 -+  __cas_lock = 0;
 11.1645 -+}
 11.1646 -+
 11.1647 -+inline static bool
 11.1648 -+compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
 11.1649 -+		  obj_addr_t new_val)
 11.1650 -+{
 11.1651 -+  bool ret;
 11.1652 -+
 11.1653 -+  __cas_start_atomic ();
 11.1654 -+  if (*addr != old)
 11.1655 -+    ret = false;
 11.1656 -+  else
 11.1657 -+    {
 11.1658 -+      *addr = new_val;
 11.1659 -+      ret = true;
 11.1660 -+    }
 11.1661 -+  __cas_end_atomic ();
 11.1662 -+
 11.1663 -+  return ret;
 11.1664 -+}
 11.1665 -+
 11.1666 -+inline static void
 11.1667 -+release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
 11.1668 -+{
 11.1669 -+  __asm__ __volatile__ (" " : : : "memory");
 11.1670 -+  *(addr) = new_val;
 11.1671 -+}
 11.1672 -+
 11.1673 -+inline static bool
 11.1674 -+compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
 11.1675 -+			  obj_addr_t new_val)
 11.1676 -+{
 11.1677 -+  return compare_and_swap (addr, old, new_val);
 11.1678 -+}
 11.1679 -+
 11.1680 -+#endif /* ! __SYSDEP_LOCKS_H__ */
 11.1681 -diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
 11.1682 ---- gcc-20030210.orig/libstdc++-v3/acinclude.m4	Tue Jan 28 02:30:41 2003
 11.1683 -+++ gcc-20030210/libstdc++-v3/acinclude.m4	Sat Feb 22 01:40:14 2003
 11.1684 -@@ -1828,9 +1828,10 @@
 11.1685 -   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 11.1686 - 
 11.1687 -   # Passed down for canadian crosses.
 11.1688 --  if test x"$CANADIAN" = xyes; then
 11.1689 --    TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1690 --  fi
 11.1691 -+  #if test x"$CANADIAN" = xyes; then
 11.1692 -+  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1693 -+  #fi
 11.1694 -+  TOPLEVEL_INCLUDES=''
 11.1695 - 
 11.1696 -   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 11.1697 - 
 11.1698 -diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
 11.1699 ---- gcc-20030210.orig/libstdc++-v3/aclocal.m4	Mon Feb 10 19:36:47 2003
 11.1700 -+++ gcc-20030210/libstdc++-v3/aclocal.m4	Sat Feb 22 01:40:14 2003
 11.1701 -@@ -1840,9 +1840,10 @@
 11.1702 -   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 11.1703 - 
 11.1704 -   # Passed down for canadian crosses.
 11.1705 --  if test x"$CANADIAN" = xyes; then
 11.1706 --    TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1707 --  fi
 11.1708 -+  #if test x"$CANADIAN" = xyes; then
 11.1709 -+  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1710 -+  #fi
 11.1711 -+  TOPLEVEL_INCLUDES=''
 11.1712 - 
 11.1713 -   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 11.1714 - 
 11.1715 -diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
 11.1716 ---- gcc-20030210.orig/libstdc++-v3/configure	Mon Feb 10 19:37:17 2003
 11.1717 -+++ gcc-20030210/libstdc++-v3/configure	Sat Feb 22 01:40:14 2003
 11.1718 -@@ -1982,7 +1982,7 @@
 11.1719 - # This must be Linux ELF.
 11.1720 - linux-gnu*)
 11.1721 -   case $host_cpu in
 11.1722 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 11.1723 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
 11.1724 -     lt_cv_deplibs_check_method=pass_all ;;
 11.1725 -   *)
 11.1726 -     # glibc up to 2.1.1 does not perform some relocations on ARM
 11.1727 -@@ -22340,9 +22340,10 @@
 11.1728 -   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 11.1729 - 
 11.1730 -   # Passed down for canadian crosses.
 11.1731 --  if test x"$CANADIAN" = xyes; then
 11.1732 --    TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1733 --  fi
 11.1734 -+  #if test x"$CANADIAN" = xyes; then
 11.1735 -+  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 11.1736 -+  #fi
 11.1737 -+  TOPLEVEL_INCLUDES=''
 11.1738 - 
 11.1739 -   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 11.1740 - 
 11.1741 -diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
 11.1742 ---- gcc-20030210.orig/libtool.m4	Fri Jan 31 19:16:59 2003
 11.1743 -+++ gcc-20030210/libtool.m4	Sat Feb 22 01:40:14 2003
 11.1744 -@@ -597,7 +597,7 @@
 11.1745 - # This must be Linux ELF.
 11.1746 - linux-gnu*)
 11.1747 -   case $host_cpu in
 11.1748 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 11.1749 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 11.1750 -     lt_cv_deplibs_check_method=pass_all ;;
 11.1751 -   *)
 11.1752 -     # glibc up to 2.1.1 does not perform some relocations on ARM
 11.1753 -diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
 11.1754 ---- gcc-20030210.orig/zlib/configure	Tue Jan 28 10:44:15 2003
 11.1755 -+++ gcc-20030210/zlib/configure	Sat Feb 22 01:40:14 2003
 11.1756 -@@ -1571,7 +1571,7 @@
 11.1757 - # This must be Linux ELF.
 11.1758 - linux-gnu*)
 11.1759 -   case $host_cpu in
 11.1760 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 11.1761 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 11.1762 -     lt_cv_deplibs_check_method=pass_all ;;
 11.1763 -   *)
 11.1764 -     # glibc up to 2.1.1 does not perform some relocations on ARM
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/patches/gcc/3.2.3/120-sh-linux-1.patch	Mon Jul 28 21:08:01 2008 +0000
    12.3 @@ -0,0 +1,1761 @@
    12.4 +diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
    12.5 +--- gcc-20030210.orig/boehm-gc/configure	Fri Jan 31 19:17:00 2003
    12.6 ++++ gcc-20030210/boehm-gc/configure	Sat Feb 22 01:40:14 2003
    12.7 +@@ -1922,7 +1922,7 @@
    12.8 + # This must be Linux ELF.
    12.9 + linux-gnu*)
   12.10 +   case $host_cpu in
   12.11 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
   12.12 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
   12.13 +     lt_cv_deplibs_check_method=pass_all ;;
   12.14 +   *)
   12.15 +     # glibc up to 2.1.1 does not perform some relocations on ARM
   12.16 +diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
   12.17 +--- gcc-20030210.orig/config-ml.in	Fri Jan 31 19:16:59 2003
   12.18 ++++ gcc-20030210/config-ml.in	Sat Feb 22 01:40:14 2003
   12.19 +@@ -545,6 +545,7 @@
   12.20 + 	      if [ -d ../$${dir}/$${lib} ]; then \
   12.21 + 		flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
   12.22 + 		if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
   12.23 ++				DESTDIR="$(DESTDIR)" \
   12.24 + 				CFLAGS="$(CFLAGS) $${flags}" \
   12.25 + 				prefix="$(prefix)" \
   12.26 + 				exec_prefix="$(exec_prefix)" \
   12.27 +diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
   12.28 +--- gcc-20030210.orig/debian/edit-specs.in	Thu Jan  1 09:00:00 1970
   12.29 ++++ gcc-20030210/debian/edit-specs.in	Sat Feb 22 01:40:14 2003
   12.30 +@@ -0,0 +1,45 @@
   12.31 ++/^*asm:$/ {
   12.32 ++n
   12.33 ++c\
   12.34 ++@AS_ENDIAN_FLAG@ %{mrelax:-relax}
   12.35 ++}
   12.36 ++/^*cpp:$/ {
   12.37 ++n
   12.38 ++c\
   12.39 ++%(cpp_default_cpu_spec)    %(subtarget_cpp_spec)    %(subtarget_cpp_ptr_spec)    %(subtarget_cpp_endian_spec)
   12.40 ++}
   12.41 ++/^*cc1:$/ {
   12.42 ++n
   12.43 ++c\
   12.44 ++-musermode @CC1_CPU_ENDIAN_FLAGS@  %{profile:-p}
   12.45 ++}
   12.46 ++/^*link:$/ {
   12.47 ++n
   12.48 ++c\
   12.49 ++%{!static:--eh-frame-hdr} @LINKER_CPU_ENDIAN_FLAGS@  @LINKER_RPATH_LINK_FLAG@ %{mrelax:-relax}  %{shared:-shared}  %{!static: %{rdynamic:-export-dynamic} %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} %{static:-static}
   12.50 ++}
   12.51 ++/^*multilib:$/ {
   12.52 ++n
   12.53 ++c\
   12.54 ++. ;
   12.55 ++}
   12.56 ++/^*multilib_matches:$/ {
   12.57 ++n
   12.58 ++c\
   12.59 ++
   12.60 ++}
   12.61 ++/^*multilib_options:$/ {
   12.62 ++n
   12.63 ++c\
   12.64 ++
   12.65 ++}
   12.66 ++/^*subtarget_cpp_endian_spec:$/ {
   12.67 ++n
   12.68 ++c\
   12.69 ++@CPP_ENDIAN_DEF@
   12.70 ++}
   12.71 ++/^*cpp_default_cpu_spec:$/ {
   12.72 ++n
   12.73 ++c\
   12.74 ++@CPP_CPU_DEFS@
   12.75 ++}
   12.76 +diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
   12.77 +--- gcc-20030210.orig/debian/install-CPU-linux	Thu Jan  1 09:00:00 1970
   12.78 ++++ gcc-20030210/debian/install-CPU-linux	Sat Feb 22 01:40:14 2003
   12.79 +@@ -0,0 +1,111 @@
   12.80 ++#! /bin/sh
   12.81 ++
   12.82 ++VERSION=$1; shift
   12.83 ++CPU=$1
   12.84 ++
   12.85 ++# literally (binary-ly) same
   12.86 ++PROGS_C="cpp gcc"
   12.87 ++PROGS_ADDITIONAL="c++ g++ g77 gcj"
   12.88 ++
   12.89 ++DRIVERS_C="cc1 cpp0 tradcpp0"
   12.90 ++DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
   12.91 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
   12.92 ++  PROGS="$PROGS_C $PROGS_ADDITIONAL"
   12.93 ++  DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
   12.94 ++  INITIAL=""
   12.95 ++else
   12.96 ++  PROGS=$PROGS_C
   12.97 ++  DRIVERS=$DRIVERS_C
   12.98 ++  INITIAL="-initial"
   12.99 ++fi
  12.100 ++
  12.101 ++OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
  12.102 ++LIBS_C="libgcc.a"
  12.103 ++LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
  12.104 ++LIBS_2="libobjc.a libstdc++.a libsupc++.a"
  12.105 ++INCLUDE="include"
  12.106 ++
  12.107 ++cd debian/gcc-sh-linux-others${INITIAL} || exit 1
  12.108 ++
  12.109 ++# Make directories.
  12.110 ++mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
  12.111 ++	 usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
  12.112 ++	 usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
  12.113 ++	 usr/${CPU}-linux usr/${CPU}-linux/lib
  12.114 ++
  12.115 ++# Make symbolic links for include dir.
  12.116 ++(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
  12.117 ++
  12.118 ++# Make symbolic links for executables.
  12.119 ++(cd usr/bin;
  12.120 ++  for p in ${PROGS}; do
  12.121 ++    ln -s shCPU-linux-GCC ${CPU}-linux-$p
  12.122 ++  done)
  12.123 ++
  12.124 ++case "${CPU}" in
  12.125 ++    sh3)
  12.126 ++	MULTILIBDIR=
  12.127 ++	AS_ENDIAN_FLAG="-little"
  12.128 ++	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
  12.129 ++	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
  12.130 ++	CC1_CPU_ENDIAN_FLAGS="-ml -m3"
  12.131 ++	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
  12.132 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
  12.133 ++    ;;
  12.134 ++    sh3eb)
  12.135 ++	MULTILIBDIR=/mb
  12.136 ++	AS_ENDIAN_FLAG="-big"
  12.137 ++	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
  12.138 ++	CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
  12.139 ++	CC1_CPU_ENDIAN_FLAGS="-mb -m3"
  12.140 ++	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
  12.141 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
  12.142 ++    ;;
  12.143 ++    sh4)
  12.144 ++	MULTILIBDIR=/m4
  12.145 ++	AS_ENDIAN_FLAG="-little"
  12.146 ++	CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
  12.147 ++	CPP_CPU_DEFS="-D__SH4__"
  12.148 ++	CC1_CPU_ENDIAN_FLAGS="-ml -m4"
  12.149 ++	LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
  12.150 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
  12.151 ++    ;;
  12.152 ++    sh4eb)
  12.153 ++	MULTILIBDIR=/mb/m4
  12.154 ++	AS_ENDIAN_FLAG="-big"
  12.155 ++	CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
  12.156 ++	CPP_CPU_DEFS="-D__SH4__"
  12.157 ++	CC1_CPU_ENDIAN_FLAGS="-mb -m4"
  12.158 ++	LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
  12.159 ++	LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
  12.160 ++    ;;
  12.161 ++esac
  12.162 ++
  12.163 ++# Make symbolic links for GCC drivers, objects, libraries, and include dir.
  12.164 ++(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
  12.165 ++ for f in ${DRIVERS} ${INCLUDE}; do
  12.166 ++    ln -s ../../sh-linux/${VERSION}/$f $f;
  12.167 ++ done
  12.168 ++ for f in ${OBJS} ${LIBS_C}; do
  12.169 ++    ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
  12.170 ++ done)
  12.171 ++
  12.172 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
  12.173 ++  for f in ${LIBS_1} ${LIBS_2}; do
  12.174 ++    mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
  12.175 ++  done
  12.176 ++fi
  12.177 ++
  12.178 ++sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
  12.179 ++    -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
  12.180 ++    -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
  12.181 ++    -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
  12.182 ++    -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
  12.183 ++    -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
  12.184 ++    ../edit-specs.in >../edit-specs-${CPU}.sed
  12.185 ++
  12.186 ++sed -f ../edit-specs-${CPU}.sed \
  12.187 ++    ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
  12.188 ++    > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
  12.189 ++
  12.190 ++exit 0
  12.191 +diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
  12.192 +--- gcc-20030210.orig/debian/multilib-symlink	Thu Jan  1 09:00:00 1970
  12.193 ++++ gcc-20030210/debian/multilib-symlink	Sat Feb 22 01:40:14 2003
  12.194 +@@ -0,0 +1,10 @@
  12.195 ++#! /bin/sh
  12.196 ++
  12.197 ++cd /usr/sh-linux/lib
  12.198 ++ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
  12.199 ++cd m4
  12.200 ++ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
  12.201 ++cd ../mb
  12.202 ++ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
  12.203 ++cd m4
  12.204 ++ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
  12.205 +diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
  12.206 +--- gcc-20030210.orig/debian/shCPU-linux-GCC	Thu Jan  1 09:00:00 1970
  12.207 ++++ gcc-20030210/debian/shCPU-linux-GCC	Sat Feb 22 01:40:14 2003
  12.208 +@@ -0,0 +1,59 @@
  12.209 ++#! /bin/bash
  12.210 ++
  12.211 ++BASENAME=${0##*/}
  12.212 ++PROG=${BASENAME##*-}
  12.213 ++CPU=${BASENAME%%-*}
  12.214 ++
  12.215 ++if [ "$PROG" = gcc ]; then
  12.216 ++    if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
  12.217 ++	shift 2
  12.218 ++	exec /usr/bin/gcc "$@"
  12.219 ++    elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
  12.220 ++	echo ".;"
  12.221 ++	exit 0
  12.222 ++    elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
  12.223 ++	echo "."
  12.224 ++	exit 0
  12.225 ++    elif [ "$1" = "-dumpspecs" ]; then
  12.226 ++	cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
  12.227 ++	exit 0
  12.228 ++    fi
  12.229 ++fi
  12.230 ++
  12.231 ++case "${CPU}" in
  12.232 ++    sh3)
  12.233 ++	ARCH=m3
  12.234 ++	DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
  12.235 ++	ENDIAN=ml
  12.236 ++    ;;
  12.237 ++    sh3eb)
  12.238 ++	ARCH=m3
  12.239 ++	DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
  12.240 ++	ENDIAN=mb
  12.241 ++    ;;
  12.242 ++    sh4)
  12.243 ++	ARCH=m4
  12.244 ++	DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
  12.245 ++	ENDIAN=ml
  12.246 ++    ;;
  12.247 ++    sh4eb)
  12.248 ++	ARCH=m4
  12.249 ++	DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
  12.250 ++	ENDIAN=mb
  12.251 ++    ;;
  12.252 ++esac
  12.253 ++
  12.254 ++# Prepend the appropriate options
  12.255 ++# If user specifies some options, it will be overridden
  12.256 ++
  12.257 ++case "${PROG}" in
  12.258 ++    cpp)
  12.259 ++	exec sh-linux-${PROG} $DEFINES "$@"
  12.260 ++    ;;
  12.261 ++    c++|g++|g77|gcc|gcj)
  12.262 ++	exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
  12.263 ++    ;;
  12.264 ++esac
  12.265 ++
  12.266 ++echo "Something wrong..."
  12.267 ++exit 1
  12.268 +diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
  12.269 +--- gcc-20030210.orig/gcc/config/sh/elf.h	Fri Feb 22 01:42:28 2002
  12.270 ++++ gcc-20030210/gcc/config/sh/elf.h	Sat Feb 22 01:40:14 2003
  12.271 +@@ -170,3 +170,7 @@
  12.272 + #undef ENDFILE_SPEC
  12.273 + #define ENDFILE_SPEC \
  12.274 +   "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
  12.275 ++
  12.276 ++/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h.  With it, 
  12.277 ++   redundant .align will be generated.  */
  12.278 ++#undef  ASM_OUTPUT_CASE_LABEL
  12.279 +diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
  12.280 +--- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm	Fri Feb 22 01:42:28 2002
  12.281 ++++ gcc-20030210/gcc/config/sh/lib1funcs.asm	Sat Feb 22 01:40:14 2003
  12.282 +@@ -39,8 +39,13 @@
  12.283 + 
  12.284 + #ifdef __ELF__
  12.285 + #define LOCAL(X) .L_##X
  12.286 ++#define FUNC(X) .type X,@function; .hidden X
  12.287 ++#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
  12.288 ++#define ENDFUNC(X) _ENDFUNC(X)
  12.289 + #else
  12.290 + #define LOCAL(X) L_##X
  12.291 ++#define FUNC(X)
  12.292 ++#define ENDFUNC(X)
  12.293 + #endif
  12.294 + 
  12.295 + #ifdef __linux__
  12.296 +@@ -91,6 +96,40 @@
  12.297 + 	.global	GLOBAL(ashiftrt_r4_31)
  12.298 + 	.global	GLOBAL(ashiftrt_r4_32)
  12.299 + 
  12.300 ++	FUNC(GLOBAL(ashiftrt_r4_0))
  12.301 ++	FUNC(GLOBAL(ashiftrt_r4_1))
  12.302 ++	FUNC(GLOBAL(ashiftrt_r4_2))
  12.303 ++	FUNC(GLOBAL(ashiftrt_r4_3))
  12.304 ++	FUNC(GLOBAL(ashiftrt_r4_4))
  12.305 ++	FUNC(GLOBAL(ashiftrt_r4_5))
  12.306 ++	FUNC(GLOBAL(ashiftrt_r4_6))
  12.307 ++	FUNC(GLOBAL(ashiftrt_r4_7))
  12.308 ++	FUNC(GLOBAL(ashiftrt_r4_8))
  12.309 ++	FUNC(GLOBAL(ashiftrt_r4_9))
  12.310 ++	FUNC(GLOBAL(ashiftrt_r4_10))
  12.311 ++	FUNC(GLOBAL(ashiftrt_r4_11))
  12.312 ++	FUNC(GLOBAL(ashiftrt_r4_12))
  12.313 ++	FUNC(GLOBAL(ashiftrt_r4_13))
  12.314 ++	FUNC(GLOBAL(ashiftrt_r4_14))
  12.315 ++	FUNC(GLOBAL(ashiftrt_r4_15))
  12.316 ++	FUNC(GLOBAL(ashiftrt_r4_16))
  12.317 ++	FUNC(GLOBAL(ashiftrt_r4_17))
  12.318 ++	FUNC(GLOBAL(ashiftrt_r4_18))
  12.319 ++	FUNC(GLOBAL(ashiftrt_r4_19))
  12.320 ++	FUNC(GLOBAL(ashiftrt_r4_20))
  12.321 ++	FUNC(GLOBAL(ashiftrt_r4_21))
  12.322 ++	FUNC(GLOBAL(ashiftrt_r4_22))
  12.323 ++	FUNC(GLOBAL(ashiftrt_r4_23))
  12.324 ++	FUNC(GLOBAL(ashiftrt_r4_24))
  12.325 ++	FUNC(GLOBAL(ashiftrt_r4_25))
  12.326 ++	FUNC(GLOBAL(ashiftrt_r4_26))
  12.327 ++	FUNC(GLOBAL(ashiftrt_r4_27))
  12.328 ++	FUNC(GLOBAL(ashiftrt_r4_28))
  12.329 ++	FUNC(GLOBAL(ashiftrt_r4_29))
  12.330 ++	FUNC(GLOBAL(ashiftrt_r4_30))
  12.331 ++	FUNC(GLOBAL(ashiftrt_r4_31))
  12.332 ++	FUNC(GLOBAL(ashiftrt_r4_32))
  12.333 ++
  12.334 + 	.align	1
  12.335 + GLOBAL(ashiftrt_r4_32):
  12.336 + GLOBAL(ashiftrt_r4_31):
  12.337 +@@ -170,6 +209,41 @@
  12.338 + GLOBAL(ashiftrt_r4_0):
  12.339 + 	rts
  12.340 + 	nop
  12.341 ++
  12.342 ++	ENDFUNC(GLOBAL(ashiftrt_r4_0))
  12.343 ++	ENDFUNC(GLOBAL(ashiftrt_r4_1))
  12.344 ++	ENDFUNC(GLOBAL(ashiftrt_r4_2))
  12.345 ++	ENDFUNC(GLOBAL(ashiftrt_r4_3))
  12.346 ++	ENDFUNC(GLOBAL(ashiftrt_r4_4))
  12.347 ++	ENDFUNC(GLOBAL(ashiftrt_r4_5))
  12.348 ++	ENDFUNC(GLOBAL(ashiftrt_r4_6))
  12.349 ++	ENDFUNC(GLOBAL(ashiftrt_r4_7))
  12.350 ++	ENDFUNC(GLOBAL(ashiftrt_r4_8))
  12.351 ++	ENDFUNC(GLOBAL(ashiftrt_r4_9))
  12.352 ++	ENDFUNC(GLOBAL(ashiftrt_r4_10))
  12.353 ++	ENDFUNC(GLOBAL(ashiftrt_r4_11))
  12.354 ++	ENDFUNC(GLOBAL(ashiftrt_r4_12))
  12.355 ++	ENDFUNC(GLOBAL(ashiftrt_r4_13))
  12.356 ++	ENDFUNC(GLOBAL(ashiftrt_r4_14))
  12.357 ++	ENDFUNC(GLOBAL(ashiftrt_r4_15))
  12.358 ++	ENDFUNC(GLOBAL(ashiftrt_r4_16))
  12.359 ++	ENDFUNC(GLOBAL(ashiftrt_r4_17))
  12.360 ++	ENDFUNC(GLOBAL(ashiftrt_r4_18))
  12.361 ++	ENDFUNC(GLOBAL(ashiftrt_r4_19))
  12.362 ++	ENDFUNC(GLOBAL(ashiftrt_r4_20))
  12.363 ++	ENDFUNC(GLOBAL(ashiftrt_r4_21))
  12.364 ++	ENDFUNC(GLOBAL(ashiftrt_r4_22))
  12.365 ++	ENDFUNC(GLOBAL(ashiftrt_r4_23))
  12.366 ++	ENDFUNC(GLOBAL(ashiftrt_r4_24))
  12.367 ++	ENDFUNC(GLOBAL(ashiftrt_r4_25))
  12.368 ++	ENDFUNC(GLOBAL(ashiftrt_r4_26))
  12.369 ++	ENDFUNC(GLOBAL(ashiftrt_r4_27))
  12.370 ++	ENDFUNC(GLOBAL(ashiftrt_r4_28))
  12.371 ++	ENDFUNC(GLOBAL(ashiftrt_r4_29))
  12.372 ++	ENDFUNC(GLOBAL(ashiftrt_r4_30))
  12.373 ++	ENDFUNC(GLOBAL(ashiftrt_r4_31))
  12.374 ++	ENDFUNC(GLOBAL(ashiftrt_r4_32))
  12.375 ++
  12.376 + #endif
  12.377 + 
  12.378 + #ifdef L_ashiftrt_n
  12.379 +@@ -192,6 +266,7 @@
  12.380 + !
  12.381 + 
  12.382 + 	.global	GLOBAL(ashrsi3)
  12.383 ++	FUNC(GLOBAL(ashrsi3))
  12.384 + 	.align	2
  12.385 + GLOBAL(ashrsi3):
  12.386 + 	mov	#31,r0
  12.387 +@@ -319,6 +394,8 @@
  12.388 + 	rts
  12.389 + 	nop
  12.390 + 
  12.391 ++	ENDFUNC(GLOBAL(ashrsi3))
  12.392 ++
  12.393 + #endif
  12.394 + 
  12.395 + #ifdef L_ashiftlt
  12.396 +@@ -340,6 +417,7 @@
  12.397 + ! (none)
  12.398 + !
  12.399 + 	.global	GLOBAL(ashlsi3)
  12.400 ++	FUNC(GLOBAL(ashlsi3))
  12.401 + 	.align	2
  12.402 + GLOBAL(ashlsi3):
  12.403 + 	mov	#31,r0
  12.404 +@@ -476,6 +554,8 @@
  12.405 + 	rts
  12.406 + 	nop
  12.407 + 
  12.408 ++	ENDFUNC(GLOBAL(ashlsi3))
  12.409 ++
  12.410 + #endif
  12.411 + 
  12.412 + #ifdef L_lshiftrt
  12.413 +@@ -497,6 +577,7 @@
  12.414 + ! (none)
  12.415 + !
  12.416 + 	.global	GLOBAL(lshrsi3)
  12.417 ++	FUNC(GLOBAL(lshrsi3))
  12.418 + 	.align	2
  12.419 + GLOBAL(lshrsi3):
  12.420 + 	mov	#31,r0
  12.421 +@@ -633,6 +714,8 @@
  12.422 + 	rts
  12.423 + 	nop
  12.424 + 
  12.425 ++	ENDFUNC(GLOBAL(lshrsi3))
  12.426 ++
  12.427 + #endif
  12.428 + 
  12.429 + #ifdef L_movstr
  12.430 +@@ -649,76 +732,113 @@
  12.431 + 	add	#64,r4
  12.432 + 	.align	4
  12.433 + 	.global	GLOBAL(movstrSI64)
  12.434 ++	FUNC(GLOBAL(movstrSI64))
  12.435 + GLOBAL(movstrSI64):
  12.436 + 	mov.l	@(60,r5),r0
  12.437 + 	mov.l	r0,@(60,r4)
  12.438 + 	.global	GLOBAL(movstrSI60)
  12.439 ++	FUNC(GLOBAL(movstrSI60))
  12.440 + GLOBAL(movstrSI60):
  12.441 + 	mov.l	@(56,r5),r0
  12.442 + 	mov.l	r0,@(56,r4)
  12.443 + 	.global	GLOBAL(movstrSI56)
  12.444 ++	FUNC(GLOBAL(movstrSI56))
  12.445 + GLOBAL(movstrSI56):
  12.446 + 	mov.l	@(52,r5),r0
  12.447 + 	mov.l	r0,@(52,r4)
  12.448 + 	.global	GLOBAL(movstrSI52)
  12.449 ++	FUNC(GLOBAL(movstrSI52))
  12.450 + GLOBAL(movstrSI52):
  12.451 + 	mov.l	@(48,r5),r0
  12.452 + 	mov.l	r0,@(48,r4)
  12.453 + 	.global	GLOBAL(movstrSI48)
  12.454 ++	FUNC(GLOBAL(movstrSI48))
  12.455 + GLOBAL(movstrSI48):
  12.456 + 	mov.l	@(44,r5),r0
  12.457 + 	mov.l	r0,@(44,r4)
  12.458 + 	.global	GLOBAL(movstrSI44)
  12.459 ++	FUNC(GLOBAL(movstrSI44))
  12.460 + GLOBAL(movstrSI44):
  12.461 + 	mov.l	@(40,r5),r0
  12.462 + 	mov.l	r0,@(40,r4)
  12.463 + 	.global	GLOBAL(movstrSI40)
  12.464 ++	FUNC(GLOBAL(movstrSI40))
  12.465 + GLOBAL(movstrSI40):
  12.466 + 	mov.l	@(36,r5),r0
  12.467 + 	mov.l	r0,@(36,r4)
  12.468 + 	.global	GLOBAL(movstrSI36)
  12.469 ++	FUNC(GLOBAL(movstrSI36))
  12.470 + GLOBAL(movstrSI36):
  12.471 + 	mov.l	@(32,r5),r0
  12.472 + 	mov.l	r0,@(32,r4)
  12.473 + 	.global	GLOBAL(movstrSI32)
  12.474 ++	FUNC(GLOBAL(movstrSI32))
  12.475 + GLOBAL(movstrSI32):
  12.476 + 	mov.l	@(28,r5),r0
  12.477 + 	mov.l	r0,@(28,r4)
  12.478 + 	.global	GLOBAL(movstrSI28)
  12.479 ++	FUNC(GLOBAL(movstrSI28))
  12.480 + GLOBAL(movstrSI28):
  12.481 + 	mov.l	@(24,r5),r0
  12.482 + 	mov.l	r0,@(24,r4)
  12.483 + 	.global	GLOBAL(movstrSI24)
  12.484 ++	FUNC(GLOBAL(movstrSI24))
  12.485 + GLOBAL(movstrSI24):
  12.486 + 	mov.l	@(20,r5),r0
  12.487 + 	mov.l	r0,@(20,r4)
  12.488 + 	.global	GLOBAL(movstrSI20)
  12.489 ++	FUNC(GLOBAL(movstrSI20))
  12.490 + GLOBAL(movstrSI20):
  12.491 + 	mov.l	@(16,r5),r0
  12.492 + 	mov.l	r0,@(16,r4)
  12.493 + 	.global	GLOBAL(movstrSI16)
  12.494 ++	FUNC(GLOBAL(movstrSI16))
  12.495 + GLOBAL(movstrSI16):
  12.496 + 	mov.l	@(12,r5),r0
  12.497 + 	mov.l	r0,@(12,r4)
  12.498 + 	.global	GLOBAL(movstrSI12)
  12.499 ++	FUNC(GLOBAL(movstrSI12))
  12.500 + GLOBAL(movstrSI12):
  12.501 + 	mov.l	@(8,r5),r0
  12.502 + 	mov.l	r0,@(8,r4)
  12.503 + 	.global	GLOBAL(movstrSI8)
  12.504 ++	FUNC(GLOBAL(movstrSI8))
  12.505 + GLOBAL(movstrSI8):
  12.506 + 	mov.l	@(4,r5),r0
  12.507 + 	mov.l	r0,@(4,r4)
  12.508 + 	.global	GLOBAL(movstrSI4)
  12.509 ++	FUNC(GLOBAL(movstrSI4))
  12.510 + GLOBAL(movstrSI4):
  12.511 + 	mov.l	@(0,r5),r0
  12.512 + 	mov.l	r0,@(0,r4)
  12.513 ++	.global	GLOBAL(movstrSI0)
  12.514 ++	FUNC(GLOBAL(movstrSI0))
  12.515 + GLOBAL(movstrSI0):
  12.516 + 	rts
  12.517 + 	nop
  12.518 + 
  12.519 ++	ENDFUNC(GLOBAL(movstrSI64))
  12.520 ++	ENDFUNC(GLOBAL(movstrSI60))
  12.521 ++	ENDFUNC(GLOBAL(movstrSI56))
  12.522 ++	ENDFUNC(GLOBAL(movstrSI52))
  12.523 ++	ENDFUNC(GLOBAL(movstrSI48))
  12.524 ++	ENDFUNC(GLOBAL(movstrSI44))
  12.525 ++	ENDFUNC(GLOBAL(movstrSI40))
  12.526 ++	ENDFUNC(GLOBAL(movstrSI36))
  12.527 ++	ENDFUNC(GLOBAL(movstrSI32))
  12.528 ++	ENDFUNC(GLOBAL(movstrSI28))
  12.529 ++	ENDFUNC(GLOBAL(movstrSI24))
  12.530 ++	ENDFUNC(GLOBAL(movstrSI20))
  12.531 ++	ENDFUNC(GLOBAL(movstrSI16))
  12.532 ++	ENDFUNC(GLOBAL(movstrSI12))
  12.533 ++	ENDFUNC(GLOBAL(movstrSI8))
  12.534 ++	ENDFUNC(GLOBAL(movstrSI4))
  12.535 ++	ENDFUNC(GLOBAL(movstrSI0))
  12.536 ++
  12.537 + 	.align	4
  12.538 + 
  12.539 + 	.global	GLOBAL(movstr)
  12.540 ++	FUNC(GLOBAL(movstr))
  12.541 + GLOBAL(movstr):
  12.542 + 	mov.l	@(60,r5),r0
  12.543 + 	mov.l	r0,@(60,r4)
  12.544 +@@ -775,6 +895,8 @@
  12.545 + 	add	#64,r5
  12.546 + 	bra	GLOBAL(movstr)
  12.547 + 	add	#64,r4
  12.548 ++
  12.549 ++	FUNC(GLOBAL(movstr))
  12.550 + #endif
  12.551 + 
  12.552 + #ifdef L_movstr_i4
  12.553 +@@ -783,6 +905,10 @@
  12.554 + 	.global	GLOBAL(movstr_i4_odd)
  12.555 + 	.global	GLOBAL(movstrSI12_i4)
  12.556 + 
  12.557 ++	FUNC(GLOBAL(movstr_i4_even))
  12.558 ++	FUNC(GLOBAL(movstr_i4_odd))
  12.559 ++	FUNC(GLOBAL(movstrSI12_i4))
  12.560 ++
  12.561 + 	.p2align	5
  12.562 + L_movstr_2mod4_end:
  12.563 + 	mov.l	r0,@(16,r4)
  12.564 +@@ -791,6 +917,11 @@
  12.565 + 
  12.566 + 	.p2align	2
  12.567 + 
  12.568 ++GLOBAL(movstr_i4_even):
  12.569 ++	mov.l	@r5+,r0
  12.570 ++	bra	L_movstr_start_even
  12.571 ++	mov.l	@r5+,r1
  12.572 ++
  12.573 + GLOBAL(movstr_i4_odd):
  12.574 + 	mov.l	@r5+,r1
  12.575 + 	add	#-4,r4
  12.576 +@@ -817,10 +948,8 @@
  12.577 + 	rts
  12.578 + 	mov.l	r3,@(12,r4)
  12.579 + 
  12.580 +-GLOBAL(movstr_i4_even):
  12.581 +-	mov.l	@r5+,r0
  12.582 +-	bra	L_movstr_start_even
  12.583 +-	mov.l	@r5+,r1
  12.584 ++	ENDFUNC(GLOBAL(movstr_i4_even))
  12.585 ++	ENDFUNC(GLOBAL(movstr_i4_odd))
  12.586 + 
  12.587 + 	.p2align	4
  12.588 + GLOBAL(movstrSI12_i4):
  12.589 +@@ -831,12 +960,16 @@
  12.590 + 	mov.l	r1,@(4,r4)
  12.591 + 	rts
  12.592 + 	mov.l	r2,@(8,r4)
  12.593 ++
  12.594 ++	ENDFUNC(GLOBAL(movstrSI12_i4))
  12.595 ++
  12.596 + #endif
  12.597 + 
  12.598 + #ifdef L_mulsi3
  12.599 + 
  12.600 + 
  12.601 + 	.global	GLOBAL(mulsi3)
  12.602 ++	FUNC(GLOBAL(mulsi3))
  12.603 + 
  12.604 + ! r4 =       aabb
  12.605 + ! r5 =       ccdd
  12.606 +@@ -869,7 +1002,7 @@
  12.607 + 	rts
  12.608 + 	add	r2,r0
  12.609 + 
  12.610 +-
  12.611 ++	FUNC(GLOBAL(mulsi3))
  12.612 + #endif
  12.613 + #endif /* ! __SH5__ */
  12.614 + #ifdef L_sdivsi3_i4
  12.615 +@@ -879,6 +1012,7 @@
  12.616 + !! args in r4 and r5, result in fpul, clobber dr0, dr2
  12.617 + 
  12.618 + 	.global	GLOBAL(sdivsi3_i4)
  12.619 ++	FUNC(GLOBAL(sdivsi3_i4))
  12.620 + GLOBAL(sdivsi3_i4):
  12.621 + 	lds r4,fpul
  12.622 + 	float fpul,dr0
  12.623 +@@ -888,6 +1022,8 @@
  12.624 + 	rts
  12.625 + 	ftrc dr0,fpul
  12.626 + 
  12.627 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
  12.628 ++
  12.629 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
  12.630 + !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
  12.631 + 
  12.632 +@@ -896,6 +1032,7 @@
  12.633 + 	.mode	SHcompact
  12.634 + #endif
  12.635 + 	.global	GLOBAL(sdivsi3_i4)
  12.636 ++	FUNC(GLOBAL(sdivsi3_i4))
  12.637 + GLOBAL(sdivsi3_i4):
  12.638 + 	sts.l fpscr,@-r15
  12.639 + 	mov #8,r2
  12.640 +@@ -910,6 +1047,8 @@
  12.641 + 	rts
  12.642 + 	lds.l @r15+,fpscr
  12.643 + 
  12.644 ++	ENDFUNC(GLOBAL(sdivsi3_i4))
  12.645 ++
  12.646 + #endif /* ! __SH5__ || __SH5__ == 32 */
  12.647 + #endif /* ! __SH4__ */
  12.648 + #endif
  12.649 +@@ -924,9 +1063,10 @@
  12.650 + !!
  12.651 + !!
  12.652 + 
  12.653 +-!! args in r4 and r5, result in r0 clobber r1,r2,r3
  12.654 ++!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
  12.655 + 
  12.656 + 	.global	GLOBAL(sdivsi3)
  12.657 ++	FUNC(GLOBAL(sdivsi3))
  12.658 + #if __SHMEDIA__
  12.659 + #if __SH5__ == 32
  12.660 + 	.section	.text..SHmedia32,"ax"
  12.661 +@@ -1076,6 +1216,7 @@
  12.662 + div0:	rts
  12.663 + 	mov	#0,r0
  12.664 + 
  12.665 ++	ENDFUNC(GLOBAL(sdivsi3))
  12.666 + #endif /* ! __SHMEDIA__ */
  12.667 + #endif /* ! __SH4__ */
  12.668 + #endif
  12.669 +@@ -1084,9 +1225,11 @@
  12.670 + 	.title "SH DIVIDE"
  12.671 + !! 4 byte integer Divide code for the Hitachi SH
  12.672 + #ifdef __SH4__
  12.673 +-!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
  12.674 ++!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
  12.675 ++!! and t bit
  12.676 + 
  12.677 + 	.global	GLOBAL(udivsi3_i4)
  12.678 ++	FUNC(GLOBAL(udivsi3_i4))
  12.679 + GLOBAL(udivsi3_i4):
  12.680 + 	mov #1,r1
  12.681 + 	cmp/hi r1,r5
  12.682 +@@ -1127,6 +1270,8 @@
  12.683 + L1:
  12.684 + 	.double 2147483648
  12.685 + 
  12.686 ++	ENDFUNC(GLOBAL(udivsi3_i4))
  12.687 ++
  12.688 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
  12.689 + !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
  12.690 + 
  12.691 +@@ -1135,6 +1280,7 @@
  12.692 + 	.mode	SHcompact
  12.693 + #endif
  12.694 + 	.global	GLOBAL(udivsi3_i4)
  12.695 ++	FUNC(GLOBAL(udivsi3_i4))
  12.696 + GLOBAL(udivsi3_i4):
  12.697 + 	mov #1,r1
  12.698 + 	cmp/hi r1,r5
  12.699 +@@ -1183,6 +1329,8 @@
  12.700 + #endif
  12.701 + 	.double 2147483648
  12.702 + 
  12.703 ++	ENDFUNC(GLOBAL(udivsi3_i4))
  12.704 ++
  12.705 + #endif /* ! __SH5__ || __SH5__ == 32 */
  12.706 + #endif /* ! __SH4__ */
  12.707 + #endif
  12.708 +@@ -1199,6 +1347,7 @@
  12.709 + 
  12.710 + !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
  12.711 + 	.global	GLOBAL(udivsi3)
  12.712 ++	FUNC(GLOBAL(udivsi3))
  12.713 + 
  12.714 + #if __SHMEDIA__
  12.715 + #if __SH5__ == 32
  12.716 +@@ -1299,6 +1448,8 @@
  12.717 + ret:	rts
  12.718 + 	mov	r4,r0
  12.719 + 
  12.720 ++	ENDFUNC(GLOBAL(udivsi3))
  12.721 ++
  12.722 + #endif /* ! __SHMEDIA__ */
  12.723 + #endif /* __SH4__ */
  12.724 + #endif
  12.725 +@@ -1308,6 +1459,7 @@
  12.726 + 	.mode	SHcompact
  12.727 + #endif
  12.728 + 	.global GLOBAL(set_fpscr)
  12.729 ++	FUNC(GLOBAL(set_fpscr))
  12.730 + GLOBAL(set_fpscr):
  12.731 + 	lds r4,fpscr
  12.732 + 	mov.l LOCAL(set_fpscr_L1),r1
  12.733 +@@ -1340,11 +1492,16 @@
  12.734 + 	.align 2
  12.735 + LOCAL(set_fpscr_L1):
  12.736 + 	.long GLOBAL(fpscr_values)
  12.737 ++
  12.738 ++	ENDFUNC(GLOBAL(set_fpscr))
  12.739 ++
  12.740 ++#ifndef NO_FPSCR_VALUES
  12.741 + #ifdef __ELF__
  12.742 +         .comm   GLOBAL(fpscr_values),8,4
  12.743 + #else
  12.744 +         .comm   GLOBAL(fpscr_values),8
  12.745 + #endif /* ELF */
  12.746 ++#endif /* NO_FPSCR_VALUES */
  12.747 + #endif /* SH3E / SH4 */
  12.748 + #endif /* L_set_fpscr */
  12.749 + #ifdef L_ic_invalidate
  12.750 +@@ -1360,6 +1517,7 @@
  12.751 + 	blink	tr0, r63
  12.752 + #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
  12.753 + 	.global GLOBAL(ic_invalidate)
  12.754 ++	FUNC(GLOBAL(ic_invalidate))
  12.755 + GLOBAL(ic_invalidate):
  12.756 + 	ocbwb	@r4
  12.757 + 	mova	0f,r0
  12.758 +@@ -1382,6 +1540,9 @@
  12.759 + 	nop
  12.760 + 	.endr
  12.761 + 	.endr
  12.762 ++
  12.763 ++	ENDFUNC(GLOBAL(ic_invalidate))
  12.764 ++
  12.765 + #endif /* SH4 */
  12.766 + #endif /* L_ic_invalidate */
  12.767 + 
  12.768 +diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
  12.769 +--- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver	Thu Jan  1 09:00:00 1970
  12.770 ++++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver	Sat Feb 22 01:40:14 2003
  12.771 +@@ -0,0 +1,21 @@
  12.772 ++# In order to work around the very problems that force us to now generally
  12.773 ++# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
  12.774 ++# By now choosing the same version tags for these specific routines, we
  12.775 ++# maintain enough binary compatibility to allow future versions of glibc
  12.776 ++# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
  12.777 ++
  12.778 ++# Note that we cannot use the default libgcc-glibc.ver file on sh,
  12.779 ++# because GLIBC_2.0 does not exist on this architecture, as the first 
  12.780 ++# ever glibc release on the platform was GLIBC_2.2.
  12.781 ++
  12.782 ++%inherit GCC_3.0 GLIBC_2.2
  12.783 ++GLIBC_2.2 {
  12.784 ++  __register_frame
  12.785 ++  __register_frame_table
  12.786 ++  __deregister_frame
  12.787 ++  __register_frame_info
  12.788 ++  __deregister_frame_info
  12.789 ++  __frame_state_for
  12.790 ++  __register_frame_info_table
  12.791 ++}
  12.792 ++
  12.793 +diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
  12.794 +--- gcc-20030210.orig/gcc/config/sh/linux.h	Tue Apr 16 05:27:42 2002
  12.795 ++++ gcc-20030210/gcc/config/sh/linux.h	Sat Feb 22 01:40:14 2003
  12.796 +@@ -19,6 +19,10 @@
  12.797 + the Free Software Foundation, 59 Temple Place - Suite 330,
  12.798 + Boston, MA 02111-1307, USA.  */
  12.799 + 
  12.800 ++/* We're not SYSVR4, not having /usr/ccs */
  12.801 ++#undef MD_EXEC_PREFIX
  12.802 ++#undef MD_STARTFILE_PREFIX
  12.803 ++
  12.804 + /* Run-time Target Specification.  */
  12.805 + #undef TARGET_VERSION
  12.806 + #define TARGET_VERSION  fputs (" (SH GNU/Linux with ELF)", stderr);
  12.807 +@@ -39,6 +43,28 @@
  12.808 + #undef WCHAR_TYPE_SIZE
  12.809 + #define WCHAR_TYPE_SIZE BITS_PER_WORD
  12.810 + 
  12.811 ++/* This was defined in linux.h.  Define it here also. */
  12.812 ++#undef  DEFAULT_VTABLE_THUNKS
  12.813 ++#define DEFAULT_VTABLE_THUNKS   1
  12.814 ++
  12.815 ++/* Likewise.  */
  12.816 ++#define HANDLE_PRAGMA_PACK_PUSH_POP
  12.817 ++
  12.818 ++/* Pick up the return address upon entry to a procedure. Used for
  12.819 ++   dwarf2 unwind information.  This also enables the table driven
  12.820 ++   mechanism.  */
  12.821 ++
  12.822 ++#define INCOMING_RETURN_ADDR_RTX	gen_rtx_REG (Pmode, PR_REG)
  12.823 ++#define DWARF_FRAME_RETURN_COLUMN	DWARF_FRAME_REGNUM (PR_REG)
  12.824 ++
  12.825 ++#undef CPP_SPEC
  12.826 ++#define CPP_SPEC "\
  12.827 ++   %{m4:-D__SH4__} \
  12.828 ++   %{!m4:%(cpp_default_cpu_spec)} \
  12.829 ++   %(subtarget_cpp_spec) \
  12.830 ++   %(subtarget_cpp_ptr_spec) \
  12.831 ++   %(subtarget_cpp_endian_spec) "
  12.832 ++
  12.833 + #undef SUBTARGET_CPP_SPEC
  12.834 + #define SUBTARGET_CPP_SPEC "\
  12.835 +    %{fPIC:-D__PIC__ -D__pic__} \
  12.836 +@@ -55,36 +81,45 @@
  12.837 + #undef CPP_DEFAULT_CPU_SPEC
  12.838 + #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
  12.839 + 
  12.840 +-
  12.841 + #undef CPP_PREDEFINES
  12.842 + #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
  12.843 + 
  12.844 ++/* The GNU C++ standard library requires that these macros be defined.  */
  12.845 ++#undef CPLUSPLUS_CPP_SPEC
  12.846 ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
  12.847 ++
  12.848 + #undef ASM_SPEC
  12.849 +-#define ASM_SPEC  "%{!mb:-little} %{mrelax:-relax}"
  12.850 ++#define ASM_SPEC  "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
  12.851 + 
  12.852 + #undef CC1_SPEC
  12.853 + #define CC1_SPEC \
  12.854 +-  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
  12.855 +-
  12.856 +-#undef CC1PLUS_SPEC
  12.857 +-#define CC1PLUS_SPEC \
  12.858 +-  "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
  12.859 ++  "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
  12.860 + 
  12.861 ++/* XXX: It's wrong if prefix != /usr */
  12.862 + #undef LINK_SPEC
  12.863 + #define LINK_SPEC \
  12.864 +-  "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
  12.865 ++  "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
  12.866 +    %{shared:-shared} \
  12.867 +    %{!static: \
  12.868 +      %{rdynamic:-export-dynamic} \
  12.869 +      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
  12.870 +-     %{!rpath:-rpath /lib}} \
  12.871 ++     %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
  12.872 ++     %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
  12.873 ++     %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
  12.874 ++     %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
  12.875 +    %{static:-static}"
  12.876 + 
  12.877 + #undef LIB_SPEC
  12.878 ++#undef LIB_SPEC
  12.879 + #define LIB_SPEC \
  12.880 +   "%{shared: -lc} \
  12.881 +-   %{!shared: %{pthread:-lthread} \
  12.882 +-     %{profile:-lc_p} %{!profile: -lc}}"
  12.883 ++   %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
  12.884 ++	%{profile:-lc_p} %{!profile: -lc}}"
  12.885 ++
  12.886 ++#if defined(HAVE_LD_EH_FRAME_HDR)
  12.887 ++#undef LINK_EH_SPEC
  12.888 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
  12.889 ++#endif
  12.890 + 
  12.891 + #undef STARTFILE_SPEC
  12.892 + #define STARTFILE_SPEC \
  12.893 +@@ -92,4 +127,40 @@
  12.894 +      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
  12.895 + 		       %{!p:%{profile:gcrt1.o%s} \
  12.896 + 			 %{!profile:crt1.o%s}}}} \
  12.897 +-   crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
  12.898 ++   crti.o%s %{static:crtbeginT.o%s}\
  12.899 ++   %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
  12.900 ++
  12.901 ++#undef FUNCTION_PROFILER
  12.902 ++#define FUNCTION_PROFILER(STREAM,LABELNO)				\
  12.903 ++do									\
  12.904 ++{									\
  12.905 ++  if (flag_pic)								\
  12.906 ++    {									\
  12.907 ++      fprintf (STREAM, "	mov.l	3f,r1\n");			\
  12.908 ++      fprintf (STREAM, "	mova	3f,r0\n");			\
  12.909 ++      fprintf (STREAM, "	add	r1,r0\n");			\
  12.910 ++      fprintf (STREAM, "	mov.l	1f,r1\n");			\
  12.911 ++      fprintf (STREAM, "	mov.l	@(r0,r1),r1\n");		\
  12.912 ++    }									\
  12.913 ++  else									\
  12.914 ++    {									\
  12.915 ++      fprintf (STREAM, "	mov.l	1f,r1\n");			\
  12.916 ++    }									\
  12.917 ++  fprintf (STREAM, "	sts.l	pr,@-r15\n");				\
  12.918 ++  fprintf (STREAM, "	mova	2f,r0\n");				\
  12.919 ++  fprintf (STREAM, "	jmp	@r1\n");				\
  12.920 ++  fprintf (STREAM, "	lds	r0,pr\n");				\
  12.921 ++  fprintf (STREAM, "	.align	2\n");					\
  12.922 ++  if (flag_pic)								\
  12.923 ++    {									\
  12.924 ++      fprintf (STREAM, "1:	.long	mcount@GOT\n");			\
  12.925 ++      fprintf (STREAM, "3:	.long	_GLOBAL_OFFSET_TABLE_\n");	\
  12.926 ++    }									\
  12.927 ++  else									\
  12.928 ++    {									\
  12.929 ++      fprintf (STREAM, "1:	.long	mcount\n");			\
  12.930 ++    }									\
  12.931 ++  fprintf (STREAM, "2:	lds.l	@r15+,pr\n");				\
  12.932 ++} while (0)
  12.933 ++
  12.934 ++#define NO_SHARED_LIBGCC_MULTILIB
  12.935 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
  12.936 +--- gcc-20030210.orig/gcc/config/sh/sh-protos.h	Fri Feb 22 01:42:28 2002
  12.937 ++++ gcc-20030210/gcc/config/sh/sh-protos.h	Sat Feb 22 01:40:14 2003
  12.938 +@@ -74,6 +74,7 @@
  12.939 + extern int shl_sext_length PARAMS ((rtx));
  12.940 + extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
  12.941 + extern rtx gen_datalabel_ref PARAMS ((rtx));
  12.942 ++extern int shl_casesi_worker_length PARAMS ((rtx));
  12.943 + extern int regs_used PARAMS ((rtx, int));
  12.944 + extern void fixup_addr_diff_vecs PARAMS ((rtx));
  12.945 + extern int get_dest_uid PARAMS ((rtx, int));
  12.946 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
  12.947 +--- gcc-20030210.orig/gcc/config/sh/sh.c	Fri Feb 22 01:42:28 2002
  12.948 ++++ gcc-20030210/gcc/config/sh/sh.c	Sat Feb 22 01:40:14 2003
  12.949 +@@ -2143,6 +2143,48 @@
  12.950 +   return sym;
  12.951 + }
  12.952 + 
  12.953 ++
  12.954 ++/* Function to be used in the length attribute of the casesi_worker
  12.955 ++   instruction.  Returns number of instructions, which is half of the
  12.956 ++   length of bytes. */
  12.957 ++
  12.958 ++int
  12.959 ++shl_casesi_worker_length (insn)
  12.960 ++     rtx insn;
  12.961 ++{
  12.962 ++  rtx set_src, label;
  12.963 ++  rtx diff_vec;
  12.964 ++
  12.965 ++  set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
  12.966 ++  if (!(GET_CODE (set_src) == UNSPEC
  12.967 ++	&& XINT (set_src, 1) == UNSPEC_CASESI))
  12.968 ++    abort ();
  12.969 ++
  12.970 ++  label = XVECEXP (set_src, 0, 2);
  12.971 ++  if (GET_CODE (label) != LABEL_REF)
  12.972 ++    abort ();
  12.973 ++
  12.974 ++  diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
  12.975 ++
  12.976 ++  if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
  12.977 ++    abort ();
  12.978 ++
  12.979 ++  switch (GET_MODE (diff_vec))
  12.980 ++    {
  12.981 ++    case SImode:
  12.982 ++      return 2;
  12.983 ++    case HImode:
  12.984 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
  12.985 ++	return 3;
  12.986 ++      return 2;
  12.987 ++    case QImode:
  12.988 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
  12.989 ++	return 2;
  12.990 ++      return 1;
  12.991 ++    default:
  12.992 ++      abort ();
  12.993 ++    }
  12.994 ++}
  12.995 + 
  12.996 + /* The SH cannot load a large constant into a register, constants have to
  12.997 +    come from a pc relative load.  The reference of a pc relative load
  12.998 +@@ -3190,7 +3232,7 @@
  12.999 +       vec_lab = XEXP (XEXP (pat, 0), 0);
 12.1000 + 
 12.1001 +       /* Search the matching casesi_jump_2.  */
 12.1002 +-      for (prev = vec_lab; ; prev = PREV_INSN (prev))
 12.1003 ++      for (prev = vec_lab; prev; prev = PREV_INSN (prev))
 12.1004 + 	{
 12.1005 + 	  if (GET_CODE (prev) != JUMP_INSN)
 12.1006 + 	    continue;
 12.1007 +@@ -3205,6 +3247,13 @@
 12.1008 + 	    break;
 12.1009 + 	}
 12.1010 + 
 12.1011 ++      if (prev == NULL)
 12.1012 ++	{			/* Switch statement has been optimized out.  */
 12.1013 ++	  delete_insn (PREV_INSN (insn));
 12.1014 ++	  delete_insn (insn);
 12.1015 ++	  continue;
 12.1016 ++	}
 12.1017 ++
 12.1018 +       /* Emit the reference label of the braf where it belongs, right after
 12.1019 + 	 the casesi_jump_2 (i.e. braf).  */
 12.1020 +       braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
 12.1021 +@@ -3223,7 +3272,7 @@
 12.1022 +      rtx barrier_or_label;
 12.1023 + {
 12.1024 +   rtx next = next_real_insn (barrier_or_label), pat, prev;
 12.1025 +-  int slot, credit, jump_to_next;
 12.1026 ++  int slot, credit, jump_to_next = 0;
 12.1027 +  
 12.1028 +   if (! next)
 12.1029 +     return 0;
 12.1030 +@@ -4507,7 +4556,8 @@
 12.1031 +   if (current_function_varargs || current_function_stdarg)
 12.1032 +     {
 12.1033 +       /* This is not used by the SH3E calling convention  */
 12.1034 +-      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
 12.1035 ++      if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
 12.1036 ++	  || TARGET_NO_IMPLICIT_FP)
 12.1037 + 	{
 12.1038 + 	  /* Push arg regs as if they'd been provided by caller in stack.  */
 12.1039 + 	  for (i = 0; i < NPARM_REGS(SImode); i++)
 12.1040 +@@ -5149,7 +5199,8 @@
 12.1041 +   tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
 12.1042 +   tree record;
 12.1043 + 
 12.1044 +-  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
 12.1045 ++  if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
 12.1046 ++      || TARGET_NO_IMPLICIT_FP)
 12.1047 +     return ptr_type_node;
 12.1048 + 
 12.1049 +   record = make_node (RECORD_TYPE);
 12.1050 +@@ -5211,7 +5262,8 @@
 12.1051 +       return;
 12.1052 +     }
 12.1053 + 
 12.1054 +-  if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
 12.1055 ++  if ((! TARGET_SH3E && ! TARGET_SH4)
 12.1056 ++      || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
 12.1057 +     {
 12.1058 +       std_expand_builtin_va_start (stdarg_p, valist, nextarg);
 12.1059 +       return;
 12.1060 +@@ -5289,7 +5341,8 @@
 12.1061 +   rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
 12.1062 +   pptr_type_node = build_pointer_type (ptr_type_node);
 12.1063 + 
 12.1064 +-  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
 12.1065 ++  if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
 12.1066 ++      && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
 12.1067 +     {
 12.1068 +       tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
 12.1069 +       tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
 12.1070 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
 12.1071 +--- gcc-20030210.orig/gcc/config/sh/sh.h	Fri Feb 22 01:42:28 2002
 12.1072 ++++ gcc-20030210/gcc/config/sh/sh.h	Sat Feb 22 01:40:14 2003
 12.1073 +@@ -147,10 +147,10 @@
 12.1074 + #define HARD_SH4_BIT	(1<<5)
 12.1075 + #define FPU_SINGLE_BIT	(1<<7)
 12.1076 + #define SH4_BIT	       	(1<<12)
 12.1077 ++#define NO_IMPLICIT_FP_BIT	(1<<3)
 12.1078 + #define FMOVD_BIT	(1<<4)
 12.1079 + #define SH5_BIT		(1<<0)
 12.1080 + #define SPACE_BIT 	(1<<13)
 12.1081 +-#define BIGTABLE_BIT  	(1<<14)
 12.1082 + #define RELAX_BIT	(1<<15)
 12.1083 + #define USERMODE_BIT	(1<<16)
 12.1084 + #define HITACHI_BIT     (1<<22)
 12.1085 +@@ -205,6 +205,9 @@
 12.1086 + /* Nonzero if we should generate code for a SH5 CPU (either ISA).  */
 12.1087 + #define TARGET_SH5 (target_flags & SH5_BIT)
 12.1088 + 
 12.1089 ++/* Nonzero if we should not use FPU implicitly.  */
 12.1090 ++#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
 12.1091 ++
 12.1092 + /* Nonzero if we should generate code using the SHcompact instruction
 12.1093 +    set and 32-bit ABI.  */
 12.1094 + #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
 12.1095 +@@ -225,6 +228,7 @@
 12.1096 + 
 12.1097 + /* Nonzero if we should generate code using SHmedia FPU instructions.  */
 12.1098 + #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
 12.1099 ++
 12.1100 + /* Nonzero if we should generate fmovd.  */
 12.1101 + #define TARGET_FMOVD (target_flags & FMOVD_BIT)
 12.1102 + 
 12.1103 +@@ -234,9 +238,6 @@
 12.1104 + /* Nonzero if we should generate smaller code rather than faster code.  */
 12.1105 + #define TARGET_SMALLCODE   (target_flags & SPACE_BIT)
 12.1106 + 
 12.1107 +-/* Nonzero to use long jump tables.  */
 12.1108 +-#define TARGET_BIGTABLE     (target_flags & BIGTABLE_BIT)
 12.1109 +-
 12.1110 + /* Nonzero to generate pseudo-ops needed by the assembler and linker
 12.1111 +    to do function call relaxing.  */
 12.1112 + #define TARGET_RELAX (target_flags & RELAX_BIT)
 12.1113 +@@ -297,7 +298,6 @@
 12.1114 +   {"5-compact-nofpu", TARGET_NONE, "" },	\
 12.1115 +   {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
 12.1116 +   {"b",		-LITTLE_ENDIAN_BIT, "" },  	\
 12.1117 +-  {"bigtable", 	BIGTABLE_BIT, "" },		\
 12.1118 +   {"dalign",  	DALIGN_BIT, "" },		\
 12.1119 +   {"fmovd",  	FMOVD_BIT, "" },		\
 12.1120 +   {"hitachi",	HITACHI_BIT, "" },		\
 12.1121 +@@ -306,6 +306,7 @@
 12.1122 +   {"isize", 	ISIZE_BIT, "" },		\
 12.1123 +   {"l",		LITTLE_ENDIAN_BIT, "" },  	\
 12.1124 +   {"no-ieee",  	-IEEE_BIT, "" },		\
 12.1125 ++  {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" },	\
 12.1126 +   {"padstruct", PADSTRUCT_BIT, "" },    	\
 12.1127 +   {"prefergot",	PREFERGOT_BIT, "" },		\
 12.1128 +   {"relax",	RELAX_BIT, "" },		\
 12.1129 +@@ -2493,16 +2494,22 @@
 12.1130 +     goto LABEL;								\
 12.1131 + }
 12.1132 + 
 12.1133 ++extern int optimize; /* needed for gen_casesi.  */
 12.1134 ++extern int optimize_size;
 12.1135 ++
 12.1136 + /* Specify the machine mode that this machine uses
 12.1137 +    for the index in the tablejump instruction.  */
 12.1138 +-#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
 12.1139 ++#define CASE_VECTOR_MODE SImode
 12.1140 + 
 12.1141 + #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
 12.1142 + ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
 12.1143 +  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
 12.1144 +  : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
 12.1145 +  ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
 12.1146 +- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
 12.1147 ++ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
 12.1148 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
 12.1149 ++ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
 12.1150 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
 12.1151 +  : SImode)
 12.1152 + 
 12.1153 + /* Define as C expression which evaluates to nonzero if the tablejump
 12.1154 +@@ -3038,10 +3045,7 @@
 12.1155 + /* Output an absolute table element.  */
 12.1156 + 
 12.1157 + #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE)  				\
 12.1158 +-  if (TARGET_BIGTABLE) 							\
 12.1159 +-    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); 			\
 12.1160 +-  else									\
 12.1161 +-    asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); 			\
 12.1162 ++    asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
 12.1163 + 
 12.1164 + /* Output various types of constants.  */
 12.1165 + 
 12.1166 +@@ -3167,8 +3171,6 @@
 12.1167 + #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
 12.1168 + extern enum processor_type sh_cpu;
 12.1169 + 
 12.1170 +-extern int optimize; /* needed for gen_casesi.  */
 12.1171 +-
 12.1172 + enum mdep_reorg_phase_e
 12.1173 + {
 12.1174 +   SH_BEFORE_MDEP_REORG,
 12.1175 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
 12.1176 +--- gcc-20030210.orig/gcc/config/sh/sh.md	Sat Nov 23 04:58:06 2002
 12.1177 ++++ gcc-20030210/gcc/config/sh/sh.md	Sat Feb 22 01:40:14 2003
 12.1178 +@@ -1242,7 +1242,7 @@
 12.1179 +    (clobber (reg:SI PR_REG))
 12.1180 +    (clobber (reg:SI R4_REG))
 12.1181 +    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
 12.1182 +-  "TARGET_SH1 && ! TARGET_SH4"
 12.1183 ++  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
 12.1184 +   "jsr	@%1%#"
 12.1185 +   [(set_attr "type" "sfunc")
 12.1186 +    (set_attr "needs_delay_slot" "yes")])
 12.1187 +@@ -1336,7 +1336,7 @@
 12.1188 + 
 12.1189 +   operands[3] = gen_reg_rtx (Pmode);
 12.1190 +   /* Emit the move of the address to a pseudo outside of the libcall.  */
 12.1191 +-  if (TARGET_HARD_SH4 && TARGET_SH3E)
 12.1192 ++  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
 12.1193 +     {
 12.1194 +       emit_move_insn (operands[3],
 12.1195 + 		      gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
 12.1196 +@@ -1391,7 +1391,7 @@
 12.1197 +    (clobber (reg:SI R2_REG))
 12.1198 +    (clobber (reg:SI R3_REG))
 12.1199 +    (use (match_operand:SI 1 "arith_reg_operand" "r"))]
 12.1200 +-  "TARGET_SH1 && ! TARGET_SH4"
 12.1201 ++  "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
 12.1202 +   "jsr	@%1%#"
 12.1203 +   [(set_attr "type" "sfunc")
 12.1204 +    (set_attr "needs_delay_slot" "yes")])
 12.1205 +@@ -1476,7 +1476,7 @@
 12.1206 + 
 12.1207 +   operands[3] = gen_reg_rtx (Pmode);
 12.1208 +   /* Emit the move of the address to a pseudo outside of the libcall.  */
 12.1209 +-  if (TARGET_HARD_SH4 && TARGET_SH3E)
 12.1210 ++  if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
 12.1211 +     {
 12.1212 +       emit_move_insn (operands[3],
 12.1213 + 		      gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
 12.1214 +@@ -6446,6 +6446,8 @@
 12.1215 +     case SImode:
 12.1216 +       return \"shll2	%1\;mov.l	@(r0,%1),%0\";
 12.1217 +     case HImode:
 12.1218 ++      if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 12.1219 ++	return \"add	%1,%1\;mov.w	@(r0,%1),%0\;extu.w	%0,%0\";
 12.1220 +       return \"add	%1,%1\;mov.w	@(r0,%1),%0\";
 12.1221 +     case QImode:
 12.1222 +       if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
 12.1223 +@@ -6455,7 +6457,15 @@
 12.1224 +       abort ();
 12.1225 +     }
 12.1226 + }"
 12.1227 +-  [(set_attr "length" "4")])
 12.1228 ++  [(set (attr "length")
 12.1229 ++	(cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
 12.1230 ++	       (const_string "2")
 12.1231 ++	       (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
 12.1232 ++	       (const_string "4")
 12.1233 ++	       ;; Put "match_dup" here so that insn_variable_length_p return 1.
 12.1234 ++	       (ne (match_dup 2) (match_dup 2))
 12.1235 ++	       (const_string "4")]
 12.1236 ++	      (const_string "6")))])
 12.1237 + 
 12.1238 + (define_insn "casesi_shift_media"
 12.1239 +   [(set (match_operand 0 "arith_reg_operand" "=r")
 12.1240 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
 12.1241 +--- gcc-20030210.orig/gcc/config/sh/sh3-linux.h	Thu Jan  1 09:00:00 1970
 12.1242 ++++ gcc-20030210/gcc/config/sh/sh3-linux.h	Sat Feb 22 01:40:14 2003
 12.1243 +@@ -0,0 +1,29 @@
 12.1244 ++#undef TARGET_VERSION
 12.1245 ++#define TARGET_VERSION  fputs (" (SH3 GNU/Linux with ELF)", stderr);
 12.1246 ++
 12.1247 ++#undef CPP_SPEC
 12.1248 ++#define CPP_SPEC \
 12.1249 ++  "-D__LITTLE_ENDIAN__ \
 12.1250 ++   -D__SH3__ -D__sh3__ \
 12.1251 ++   -D__SIZE_TYPE__=unsigned\\ int \
 12.1252 ++   -D__PTRDIFF_TYPE__=int \
 12.1253 ++   %{fPIC:-D__PIC__ -D__pic__} \
 12.1254 ++   %{fpic:-D__PIC__ -D__pic__} \
 12.1255 ++   %{posix:-D_POSIX_SOURCE} \
 12.1256 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
 12.1257 ++
 12.1258 ++#undef ASM_SPEC
 12.1259 ++#define ASM_SPEC  "%{mrelax:-relax}"
 12.1260 ++
 12.1261 ++#undef CC1_SPEC
 12.1262 ++#define CC1_SPEC \
 12.1263 ++  "-musermode -ml -m3 %{profile:-p}"
 12.1264 ++
 12.1265 ++#undef LINK_SPEC
 12.1266 ++#define LINK_SPEC \
 12.1267 ++  "%{mrelax:-relax} \
 12.1268 ++   %{shared:-shared} \
 12.1269 ++   %{!static: \
 12.1270 ++     %{rdynamic:-export-dynamic} \
 12.1271 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 12.1272 ++    %{static:-static}"
 12.1273 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
 12.1274 +--- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h	Thu Jan  1 09:00:00 1970
 12.1275 ++++ gcc-20030210/gcc/config/sh/sh3eb-linux.h	Sat Feb 22 01:40:14 2003
 12.1276 +@@ -0,0 +1,29 @@
 12.1277 ++#undef TARGET_VERSION
 12.1278 ++#define TARGET_VERSION  fputs (" (SH3EB GNU/Linux with ELF)", stderr);
 12.1279 ++
 12.1280 ++#undef CPP_SPEC
 12.1281 ++#define CPP_SPEC \
 12.1282 ++  "-D__BIG_ENDIAN__ \
 12.1283 ++   -D__SH3__ -D__sh3__ \
 12.1284 ++   -D__SIZE_TYPE__=unsigned\\ int \
 12.1285 ++   -D__PTRDIFF_TYPE__=int \
 12.1286 ++   %{fPIC:-D__PIC__ -D__pic__} \
 12.1287 ++   %{fpic:-D__PIC__ -D__pic__} \
 12.1288 ++   %{posix:-D_POSIX_SOURCE} \
 12.1289 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
 12.1290 ++
 12.1291 ++#undef ASM_SPEC
 12.1292 ++#define ASM_SPEC  "%{mrelax:-relax}"
 12.1293 ++
 12.1294 ++#undef CC1_SPEC
 12.1295 ++#define CC1_SPEC \
 12.1296 ++  "-musermode -mb -m3 %{profile:-p}"
 12.1297 ++
 12.1298 ++#undef LINK_SPEC
 12.1299 ++#define LINK_SPEC \
 12.1300 ++  "%{mrelax:-relax} \
 12.1301 ++   %{shared:-shared} \
 12.1302 ++   %{!static: \
 12.1303 ++     %{rdynamic:-export-dynamic} \
 12.1304 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 12.1305 ++    %{static:-static}"
 12.1306 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
 12.1307 +--- gcc-20030210.orig/gcc/config/sh/sh4-linux.h	Thu Jan  1 09:00:00 1970
 12.1308 ++++ gcc-20030210/gcc/config/sh/sh4-linux.h	Sat Feb 22 01:40:14 2003
 12.1309 +@@ -0,0 +1,29 @@
 12.1310 ++#undef TARGET_VERSION
 12.1311 ++#define TARGET_VERSION  fputs (" (SH4 GNU/Linux with ELF)", stderr);
 12.1312 ++
 12.1313 ++#undef CPP_SPEC
 12.1314 ++#define CPP_SPEC \
 12.1315 ++  "-D__LITTLE_ENDIAN__ \
 12.1316 ++   -D__SH4__ \
 12.1317 ++   -D__SIZE_TYPE__=unsigned\\ int \
 12.1318 ++   -D__PTRDIFF_TYPE__=int \
 12.1319 ++   %{fPIC:-D__PIC__ -D__pic__} \
 12.1320 ++   %{fpic:-D__PIC__ -D__pic__} \
 12.1321 ++   %{posix:-D_POSIX_SOURCE} \
 12.1322 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
 12.1323 ++
 12.1324 ++#undef ASM_SPEC
 12.1325 ++#define ASM_SPEC  "%{mrelax:-relax}"
 12.1326 ++
 12.1327 ++#undef CC1_SPEC
 12.1328 ++#define CC1_SPEC \
 12.1329 ++  "-musermode -ml -m4 %{profile:-p}"
 12.1330 ++
 12.1331 ++#undef LINK_SPEC
 12.1332 ++#define LINK_SPEC \
 12.1333 ++  "%{mrelax:-relax} \
 12.1334 ++   %{shared:-shared} \
 12.1335 ++   %{!static: \
 12.1336 ++     %{rdynamic:-export-dynamic} \
 12.1337 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 12.1338 ++    %{static:-static}"
 12.1339 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
 12.1340 +--- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h	Thu Jan  1 09:00:00 1970
 12.1341 ++++ gcc-20030210/gcc/config/sh/sh4eb-linux.h	Sat Feb 22 01:40:14 2003
 12.1342 +@@ -0,0 +1,29 @@
 12.1343 ++#undef TARGET_VERSION
 12.1344 ++#define TARGET_VERSION  fputs (" (SH4EB GNU/Linux with ELF)", stderr);
 12.1345 ++
 12.1346 ++#undef CPP_SPEC
 12.1347 ++#define CPP_SPEC \
 12.1348 ++  "-D__BIG_ENDIAN__ \
 12.1349 ++   -D__SH4__ \
 12.1350 ++   -D__SIZE_TYPE__=unsigned\\ int \
 12.1351 ++   -D__PTRDIFF_TYPE__=int \
 12.1352 ++   %{fPIC:-D__PIC__ -D__pic__} \
 12.1353 ++   %{fpic:-D__PIC__ -D__pic__} \
 12.1354 ++   %{posix:-D_POSIX_SOURCE} \
 12.1355 ++   %{pthread:-D_REENTRANT -D_PTHREADS}"
 12.1356 ++
 12.1357 ++#undef ASM_SPEC
 12.1358 ++#define ASM_SPEC  "%{mrelax:-relax}"
 12.1359 ++
 12.1360 ++#undef CC1_SPEC
 12.1361 ++#define CC1_SPEC \
 12.1362 ++  "-musermode -mb -m4 %{profile:-p}"
 12.1363 ++
 12.1364 ++#undef LINK_SPEC
 12.1365 ++#define LINK_SPEC \
 12.1366 ++  "%{mrelax:-relax} \
 12.1367 ++   %{shared:-shared} \
 12.1368 ++   %{!static: \
 12.1369 ++     %{rdynamic:-export-dynamic} \
 12.1370 ++     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
 12.1371 ++    %{static:-static}"
 12.1372 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
 12.1373 +--- gcc-20030210.orig/gcc/config/sh/t-linux	Thu May 17 12:16:12 2001
 12.1374 ++++ gcc-20030210/gcc/config/sh/t-linux	Sat Feb 22 01:40:14 2003
 12.1375 +@@ -1,10 +1,20 @@
 12.1376 +-TARGET_LIBGCC2_CFLAGS = -fpic
 12.1377 ++TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
 12.1378 ++LIBGCC1 = libgcc1-asm.a
 12.1379 ++CROSS_LIBGCC1 = libgcc1-asm.a
 12.1380 ++LIBGCC1_TEST = libgcc1-test
 12.1381 + LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
 12.1382 +   _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
 12.1383 +   _ic_invalidate
 12.1384 ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c
 12.1385 ++LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
 12.1386 + 
 12.1387 +-MULTILIB_OPTIONS= mb m3e/m4
 12.1388 ++MULTILIB_OPTIONS= mb m4
 12.1389 + MULTILIB_DIRNAMES= 
 12.1390 + MULTILIB_MATCHES = 
 12.1391 + 
 12.1392 +-EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
 12.1393 ++EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
 12.1394 ++
 12.1395 ++# Override t-slibgcc-elf-ver to export some libgcc symbols with
 12.1396 ++# the symbol versions that glibc used and SH specific.
 12.1397 ++SHLIB_MAPFILES =  $(srcdir)/libgcc-std.ver \
 12.1398 ++		  $(srcdir)/config/sh/libgcc-glibc.ver
 12.1399 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
 12.1400 +--- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti	Thu Jan  1 09:00:00 1970
 12.1401 ++++ gcc-20030210/gcc/config/sh/t-linux-nomulti	Sat Feb 22 01:40:14 2003
 12.1402 +@@ -0,0 +1,9 @@
 12.1403 ++LIBGCC = libgcc.a
 12.1404 ++EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
 12.1405 ++
 12.1406 ++INSTALL_LIBGCC = install-libgcc
 12.1407 ++
 12.1408 ++MULTILIB_OPTIONS=
 12.1409 ++MULTILIB_DIRNAMES= 
 12.1410 ++MULTILIB_MATCHES = 
 12.1411 ++EXTRA_MULTILIB_PARTS=
 12.1412 +diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
 12.1413 +--- gcc-20030210.orig/gcc/config.gcc	Fri Jan 31 19:17:13 2003
 12.1414 ++++ gcc-20030210/gcc/config.gcc	Sat Feb 22 01:40:14 2003
 12.1415 +@@ -337,9 +337,9 @@
 12.1416 + sparc*-*-*)
 12.1417 + 	cpu_type=sparc
 12.1418 + 	;;
 12.1419 +-sh64-*-*)
 12.1420 +-	cpu_type=sh
 12.1421 +-	;;
 12.1422 ++sh*-*-*)
 12.1423 ++ 	cpu_type=sh
 12.1424 ++ 	;;
 12.1425 + esac
 12.1426 + 
 12.1427 + tm_file=${cpu_type}/${cpu_type}.h
 12.1428 +@@ -3018,9 +3018,31 @@
 12.1429 + 	  thread_file='rtems'
 12.1430 + 	fi
 12.1431 + 	;;
 12.1432 +-sh-*-linux*)
 12.1433 ++sh*-*-linux*)
 12.1434 + 	tm_file="${tm_file} sh/elf.h sh/linux.h"
 12.1435 +-	tmake_file="sh/t-sh sh/t-elf sh/t-linux"
 12.1436 ++	tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
 12.1437 ++	extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
 12.1438 ++	case $machine in
 12.1439 ++		sh3eb-*)
 12.1440 ++			tm_file="${tm_file} sh/sh3eb-linux.h"
 12.1441 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
 12.1442 ++			;;
 12.1443 ++		sh4eb-*)
 12.1444 ++			tm_file="${tm_file} sh/sh4eb-linux.h"
 12.1445 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
 12.1446 ++			;;
 12.1447 ++		sh3-*)
 12.1448 ++			tm_file="${tm_file} sh/sh3-linux.h"
 12.1449 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
 12.1450 ++			;;
 12.1451 ++		sh4-*)
 12.1452 ++			tm_file="${tm_file} sh/sh4-linux.h"
 12.1453 ++			tmake_file="${tmake_file} sh/t-linux-nomulti"
 12.1454 ++			;;
 12.1455 ++		*)
 12.1456 ++			;;
 12.1457 ++	esac
 12.1458 ++	xmake_file=x-linux
 12.1459 + 	gas=yes gnu_ld=yes
 12.1460 + 	float_format=sh
 12.1461 + 	;;
 12.1462 +diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
 12.1463 +--- gcc-20030210.orig/gcc/dwarf2out.c	Mon Feb 10 19:36:25 2003
 12.1464 ++++ gcc-20030210/gcc/dwarf2out.c	Sat Feb 22 01:40:14 2003
 12.1465 +@@ -10224,7 +10224,9 @@
 12.1466 + 	  /* We can have a normal definition following an inline one in the
 12.1467 + 	     case of redefinition of GNU C extern inlines.
 12.1468 + 	     It seems reasonable to use AT_specification in this case.  */
 12.1469 +-	  && !get_AT_unsigned (old_die, DW_AT_inline))
 12.1470 ++	  && !get_AT_unsigned (old_die, DW_AT_inline)
 12.1471 ++	  /* Skip the nested function.  */
 12.1472 ++	  && !decl_function_context (decl))
 12.1473 + 	{
 12.1474 + 	  /* ??? This can happen if there is a bug in the program, for
 12.1475 + 	     instance, if it has duplicate function definitions.  Ideally,
 12.1476 +diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
 12.1477 +--- gcc-20030210.orig/gcc/final.c	Fri Jan 31 19:17:20 2003
 12.1478 ++++ gcc-20030210/gcc/final.c	Sat Feb 22 01:40:14 2003
 12.1479 +@@ -1128,7 +1128,7 @@
 12.1480 + 	    }
 12.1481 + 	}
 12.1482 + 
 12.1483 +-      INSN_ADDRESSES (uid) = insn_current_address;
 12.1484 ++      INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
 12.1485 + 
 12.1486 +       if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
 12.1487 + 	  || GET_CODE (insn) == CODE_LABEL)
 12.1488 +diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
 12.1489 +--- gcc-20030210.orig/gcc/mkmap-symver.awk	Fri Jan 31 19:17:26 2003
 12.1490 ++++ gcc-20030210/gcc/mkmap-symver.awk	Sat Feb 22 01:40:14 2003
 12.1491 +@@ -89,7 +89,11 @@
 12.1492 +     output(inherit[lib]);
 12.1493 + 
 12.1494 +   printf("%s {\n", lib);
 12.1495 +-  printf("  global:\n");
 12.1496 ++  for (sym in ver)
 12.1497 ++    if ((ver[sym] == lib) && (sym in def))
 12.1498 ++      count++;
 12.1499 ++  if (count > 0)
 12.1500 ++    printf("  global:\n");
 12.1501 +   for (sym in ver)
 12.1502 +     if ((ver[sym] == lib) && (sym in def))
 12.1503 +       {
 12.1504 +diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
 12.1505 +--- gcc-20030210.orig/gcc/reload1.c	Fri Jan 31 19:17:29 2003
 12.1506 ++++ gcc-20030210/gcc/reload1.c	Sat Feb 22 01:40:14 2003
 12.1507 +@@ -6103,6 +6103,7 @@
 12.1508 + 	    for (j = 0; j < n_reloads; j++)
 12.1509 + 	      if (rld[j].in != 0
 12.1510 + 		  && rld[j].when_needed != RELOAD_OTHER
 12.1511 ++		  && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
 12.1512 + 		  && reg_overlap_mentioned_for_reload_p (rld[j].in,
 12.1513 + 							 rld[i].in))
 12.1514 + 		rld[j].when_needed
 12.1515 +diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
 12.1516 +--- gcc-20030210.orig/gcc/reorg.c	Fri Jan 31 19:17:30 2003
 12.1517 ++++ gcc-20030210/gcc/reorg.c	Sat Feb 22 01:40:14 2003
 12.1518 +@@ -3265,6 +3265,14 @@
 12.1519 + 		|| condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
 12.1520 + 	continue;
 12.1521 + 
 12.1522 ++#ifdef MD_CAN_REDIRECT_BRANCH
 12.1523 ++      /* On some targets, branches with delay slots can have a limited
 12.1524 ++	 displacement.  Give the back end a chance to tell us we can't do
 12.1525 ++	 this.  */
 12.1526 ++      if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
 12.1527 ++	continue;
 12.1528 ++#endif
 12.1529 ++
 12.1530 +       target_label = JUMP_LABEL (delay_insn);
 12.1531 + 
 12.1532 +       if (target_label)
 12.1533 +diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
 12.1534 +--- gcc-20030210.orig/gcc/tree-inline.c	Fri Jan 31 19:17:33 2003
 12.1535 ++++ gcc-20030210/gcc/tree-inline.c	Sat Feb 22 01:40:14 2003
 12.1536 +@@ -836,11 +836,17 @@
 12.1537 + 
 12.1538 +   /* Don't try to inline functions that are not well-suited to
 12.1539 +      inlining.  */
 12.1540 +-  if (!inlinable_function_p (fn, id))
 12.1541 +-    return NULL_TREE;
 12.1542 ++  if (! inlinable_function_p (fn, id)
 12.1543 ++      || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
 12.1544 ++    {
 12.1545 ++      if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
 12.1546 ++	{
 12.1547 ++	  warning_with_decl (fn, "inlining failed in call to `%s'");
 12.1548 ++	  warning ("called from here");
 12.1549 ++	}
 12.1550 + 
 12.1551 +-  if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
 12.1552 +-    return NULL_TREE;
 12.1553 ++      return NULL_TREE;
 12.1554 ++    }
 12.1555 + 
 12.1556 +   /* Set the current filename and line number to the function we are
 12.1557 +      inlining so that when we create new _STMT nodes here they get
 12.1558 +diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
 12.1559 +--- gcc-20030210.orig/libjava/Makefile.in	Tue Jan 28 10:44:37 2003
 12.1560 ++++ gcc-20030210/libjava/Makefile.in	Sat Feb 22 01:40:14 2003
 12.1561 +@@ -1637,6 +1637,7 @@
 12.1562 + 	"AS=$(AS)" \
 12.1563 + 	"CC=$(CC)" \
 12.1564 + 	"CXX=$(CXX)" \
 12.1565 ++	"GCJ=$(GCJ)" \
 12.1566 + 	"LD=$(LD)" \
 12.1567 + 	"LIBCFLAGS=$(LIBCFLAGS)" \
 12.1568 + 	"NM=$(NM)" \
 12.1569 +diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
 12.1570 +--- gcc-20030210.orig/libjava/configure	Tue Jan 28 10:44:37 2003
 12.1571 ++++ gcc-20030210/libjava/configure	Sat Feb 22 01:42:11 2003
 12.1572 +@@ -2031,7 +2031,7 @@
 12.1573 + # This must be Linux ELF.
 12.1574 + linux-gnu*)
 12.1575 +   case $host_cpu in
 12.1576 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 12.1577 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 12.1578 +     lt_cv_deplibs_check_method=pass_all ;;
 12.1579 +   *)
 12.1580 +     # glibc up to 2.1.1 does not perform some relocations on ARM
 12.1581 +diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
 12.1582 +--- gcc-20030210.orig/libjava/java/net/natInetAddress.cc	Tue Mar  5 05:02:19 2002
 12.1583 ++++ gcc-20030210/libjava/java/net/natInetAddress.cc	Sat Feb 22 01:40:14 2003
 12.1584 +@@ -56,7 +56,7 @@
 12.1585 + #endif
 12.1586 + 
 12.1587 + #ifndef HAVE_GETHOSTNAME_DECL
 12.1588 +-extern "C" int gethostname (char *name, int namelen);
 12.1589 ++extern "C" int gethostname (char *name, unsigned int namelen);
 12.1590 + #endif
 12.1591 + 
 12.1592 + #ifdef DISABLE_JAVA_NET
 12.1593 +diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
 12.1594 +--- gcc-20030210.orig/libjava/libltdl/aclocal.m4	Sun Sep 10 17:04:40 2000
 12.1595 ++++ gcc-20030210/libjava/libltdl/aclocal.m4	Sat Feb 22 01:40:14 2003
 12.1596 +@@ -573,7 +573,7 @@
 12.1597 + # This must be Linux ELF.
 12.1598 + linux-gnu*)
 12.1599 +   case "$host_cpu" in
 12.1600 +-  alpha* | i*86 | powerpc* | sparc* | ia64* )
 12.1601 ++  alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
 12.1602 +     lt_cv_deplibs_check_method=pass_all ;;
 12.1603 +   *)
 12.1604 +     # glibc up to 2.1.1 does not perform some relocations on ARM
 12.1605 +diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
 12.1606 +--- gcc-20030210.orig/libjava/sysdep/sh/locks.h	Thu Jan  1 09:00:00 1970
 12.1607 ++++ gcc-20030210/libjava/sysdep/sh/locks.h	Sat Feb 22 01:40:14 2003
 12.1608 +@@ -0,0 +1,72 @@
 12.1609 ++// locks.h - Thread synchronization primitives. SuperH implementation.
 12.1610 ++
 12.1611 ++/* Copyright (C) 2002  Free Software Foundation
 12.1612 ++
 12.1613 ++   This file is part of libgcj.
 12.1614 ++
 12.1615 ++This software is copyrighted work licensed under the terms of the
 12.1616 ++Libgcj License.  Please consult the file "LIBGCJ_LICENSE" for
 12.1617 ++details.  */
 12.1618 ++
 12.1619 ++#ifndef __SYSDEP_LOCKS_H__
 12.1620 ++#define __SYSDEP_LOCKS_H__
 12.1621 ++
 12.1622 ++typedef size_t obj_addr_t;	/* Integer type big enough for object	*/
 12.1623 ++				/* address.				*/
 12.1624 ++
 12.1625 ++static unsigned char __cas_lock = 0;
 12.1626 ++
 12.1627 ++inline static void
 12.1628 ++__cas_start_atomic (void)
 12.1629 ++{
 12.1630 ++  unsigned int val;
 12.1631 ++
 12.1632 ++  do
 12.1633 ++    __asm__ __volatile__ ("tas.b @%1; movt %0"
 12.1634 ++			  : "=r" (val)
 12.1635 ++			  : "r" (&__cas_lock)
 12.1636 ++			  : "memory");
 12.1637 ++  while (val == 0);
 12.1638 ++}
 12.1639 ++
 12.1640 ++inline static void
 12.1641 ++__cas_end_atomic (void)
 12.1642 ++{
 12.1643 ++  __asm__ __volatile__ (" " : : : "memory");
 12.1644 ++  __cas_lock = 0;
 12.1645 ++}
 12.1646 ++
 12.1647 ++inline static bool
 12.1648 ++compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
 12.1649 ++		  obj_addr_t new_val)
 12.1650 ++{
 12.1651 ++  bool ret;
 12.1652 ++
 12.1653 ++  __cas_start_atomic ();
 12.1654 ++  if (*addr != old)
 12.1655 ++    ret = false;
 12.1656 ++  else
 12.1657 ++    {
 12.1658 ++      *addr = new_val;
 12.1659 ++      ret = true;
 12.1660 ++    }
 12.1661 ++  __cas_end_atomic ();
 12.1662 ++
 12.1663 ++  return ret;
 12.1664 ++}
 12.1665 ++
 12.1666 ++inline static void
 12.1667 ++release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
 12.1668 ++{
 12.1669 ++  __asm__ __volatile__ (" " : : : "memory");
 12.1670 ++  *(addr) = new_val;
 12.1671 ++}
 12.1672 ++
 12.1673 ++inline static bool
 12.1674 ++compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
 12.1675 ++			  obj_addr_t new_val)
 12.1676 ++{
 12.1677 ++  return compare_and_swap (addr, old, new_val);
 12.1678 ++}
 12.1679 ++
 12.1680 ++#endif /* ! __SYSDEP_LOCKS_H__ */
 12.1681 +diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
 12.1682 +--- gcc-20030210.orig/libstdc++-v3/acinclude.m4	Tue Jan 28 02:30:41 2003
 12.1683 ++++ gcc-20030210/libstdc++-v3/acinclude.m4	Sat Feb 22 01:40:14 2003
 12.1684 +@@ -1828,9 +1828,10 @@
 12.1685 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 12.1686 + 
 12.1687 +   # Passed down for canadian crosses.
 12.1688 +-  if test x"$CANADIAN" = xyes; then
 12.1689 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1690 +-  fi
 12.1691 ++  #if test x"$CANADIAN" = xyes; then
 12.1692 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1693 ++  #fi
 12.1694 ++  TOPLEVEL_INCLUDES=''
 12.1695 + 
 12.1696 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 12.1697 + 
 12.1698 +diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
 12.1699 +--- gcc-20030210.orig/libstdc++-v3/aclocal.m4	Mon Feb 10 19:36:47 2003
 12.1700 ++++ gcc-20030210/libstdc++-v3/aclocal.m4	Sat Feb 22 01:40:14 2003
 12.1701 +@@ -1840,9 +1840,10 @@
 12.1702 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 12.1703 + 
 12.1704 +   # Passed down for canadian crosses.
 12.1705 +-  if test x"$CANADIAN" = xyes; then
 12.1706 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1707 +-  fi
 12.1708 ++  #if test x"$CANADIAN" = xyes; then
 12.1709 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1710 ++  #fi
 12.1711 ++  TOPLEVEL_INCLUDES=''
 12.1712 + 
 12.1713 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 12.1714 + 
 12.1715 +diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
 12.1716 +--- gcc-20030210.orig/libstdc++-v3/configure	Mon Feb 10 19:37:17 2003
 12.1717 ++++ gcc-20030210/libstdc++-v3/configure	Sat Feb 22 01:40:14 2003
 12.1718 +@@ -1982,7 +1982,7 @@
 12.1719 + # This must be Linux ELF.
 12.1720 + linux-gnu*)
 12.1721 +   case $host_cpu in
 12.1722 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 12.1723 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
 12.1724 +     lt_cv_deplibs_check_method=pass_all ;;
 12.1725 +   *)
 12.1726 +     # glibc up to 2.1.1 does not perform some relocations on ARM
 12.1727 +@@ -22340,9 +22340,10 @@
 12.1728 +   GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
 12.1729 + 
 12.1730 +   # Passed down for canadian crosses.
 12.1731 +-  if test x"$CANADIAN" = xyes; then
 12.1732 +-    TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1733 +-  fi
 12.1734 ++  #if test x"$CANADIAN" = xyes; then
 12.1735 ++  #  TOPLEVEL_INCLUDES='-I$(includedir)'
 12.1736 ++  #fi
 12.1737 ++  TOPLEVEL_INCLUDES=''
 12.1738 + 
 12.1739 +   LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
 12.1740 + 
 12.1741 +diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
 12.1742 +--- gcc-20030210.orig/libtool.m4	Fri Jan 31 19:16:59 2003
 12.1743 ++++ gcc-20030210/libtool.m4	Sat Feb 22 01:40:14 2003
 12.1744 +@@ -597,7 +597,7 @@
 12.1745 + # This must be Linux ELF.
 12.1746 + linux-gnu*)
 12.1747 +   case $host_cpu in
 12.1748 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 12.1749 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 12.1750 +     lt_cv_deplibs_check_method=pass_all ;;
 12.1751 +   *)
 12.1752 +     # glibc up to 2.1.1 does not perform some relocations on ARM
 12.1753 +diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
 12.1754 +--- gcc-20030210.orig/zlib/configure	Tue Jan 28 10:44:15 2003
 12.1755 ++++ gcc-20030210/zlib/configure	Sat Feb 22 01:40:14 2003
 12.1756 +@@ -1571,7 +1571,7 @@
 12.1757 + # This must be Linux ELF.
 12.1758 + linux-gnu*)
 12.1759 +   case $host_cpu in
 12.1760 +-  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
 12.1761 ++  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
 12.1762 +     lt_cv_deplibs_check_method=pass_all ;;
 12.1763 +   *)
 12.1764 +     # glibc up to 2.1.1 does not perform some relocations on ARM
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/patches/gcc/3.2.3/130-g++.exp.patch	Mon Jul 28 21:08:01 2008 +0000
    13.3 @@ -0,0 +1,98 @@
    13.4 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
    13.5 +
    13.6 +The first hunk fixes the error
    13.7 +
    13.8 +/testsuite_flags: /testsuite_flags: No such file or directory
    13.9 +    while executing
   13.10 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
   13.11 +    (procedure "g++_include_flags" line 21)
   13.12 +    invoked from within
   13.13 +"g++_include_flags [get_multilibs] "
   13.14 +    (procedure "g++_init" line 63)
   13.15 +    invoked from within
   13.16 +"${tool}_init $test_file_name"
   13.17 +    (procedure "runtest" line 19)
   13.18 +    invoked from within
   13.19 +"runtest $test_name"
   13.20 +    ("foreach" body line 42)
   13.21 +    invoked from within
   13.22 +...
   13.23 +make[1]: [check-g++] Error 1 (ignored)
   13.24 +
   13.25 +The fix isn't especially pretty, but it worked for me, and can't hurt the
   13.26 +more common native compiler case.  Maybe someone who knows the code better 
   13.27 +can come up with a better fix.
   13.28 +
   13.29 +The second hunk fixes the error
   13.30 +
   13.31 +sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
   13.32 +
   13.33 +when trying to compile g++ testcases (!); setting up
   13.34 +the shared library environment when running crosstests of g++ 
   13.35 +should either be done by a special board file, or by
   13.36 +setting up a remote chroot environment (see http://kegel.com/crosstool),
   13.37 +not by blithely setting LD_LIBRARY_PATH on the local system.
   13.38 +
   13.39 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
   13.40 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
   13.41 +@@ -72,6 +72,8 @@
   13.42 + #
   13.43 + proc g++_include_flags { paths } {
   13.44 +     global srcdir
   13.45 ++    global objdir
   13.46 ++    global target_triplet
   13.47 +     global HAVE_LIBSTDCXX_V3
   13.48 +     global TESTING_IN_BUILD_TREE
   13.49 + 
   13.50 +@@ -90,6 +92,20 @@
   13.51 + 
   13.52 +     if { ${HAVE_LIBSTDCXX_V3} } {
   13.53 +       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
   13.54 ++      if { $odir_v3 == "" } {
   13.55 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
   13.56 ++	  # first assume no multilibs
   13.57 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
   13.58 ++      }
   13.59 ++      if { $odir_v3 == "" } {
   13.60 ++          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
   13.61 ++	  # assume multilib only one level deep
   13.62 ++          set multisub [file tail $gccpath]
   13.63 ++          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
   13.64 ++      }
   13.65 ++      if { $odir_v3 == "" } {
   13.66 ++           error "Can't find libstdc++-v3"
   13.67 ++      }
   13.68 +       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
   13.69 +     } else {
   13.70 +       set odir_v2 [lookfor_file ${gccpath} libstdc++]
   13.71 +@@ -192,16 +192,20 @@
   13.72 +       }
   13.73 +     }
   13.74 + 
   13.75 +-    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
   13.76 +-    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
   13.77 +-    # (for the 64-bit ABI).  The right way to do this would be to modify
   13.78 +-    # unix.exp -- but that's not an option since it's part of DejaGNU
   13.79 +-    # proper, so we do it here.  We really only need to do 
   13.80 +-    # this on IRIX, but it shouldn't hurt to do it anywhere else.
   13.81 +-    setenv  LD_LIBRARY_PATH     $ld_library_path
   13.82 +-    setenv  SHLIB_PATH          $ld_library_path
   13.83 +-    setenv  LD_LIBRARYN32_PATH  $ld_library_path
   13.84 +-    setenv  LD_LIBRARY64_PATH   $ld_library_path
   13.85 ++    if {![is_remote target]} {
   13.86 ++      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
   13.87 ++      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
   13.88 ++      # (for the 64-bit ABI).  The right way to do this would be to modify
   13.89 ++      # unix.exp -- but that's not an option since it's part of DejaGNU
   13.90 ++      # proper, so we do it here.  We really only need to do 
   13.91 ++      # this on IRIX, but it shouldn't hurt to do it anywhere else.
   13.92 ++
   13.93 ++      # Doing this causes us to be unable to run cross-compilers.
   13.94 ++      setenv  LD_LIBRARY_PATH     $ld_library_path
   13.95 ++      setenv  SHLIB_PATH          $ld_library_path
   13.96 ++      setenv  LD_LIBRARYN32_PATH  $ld_library_path
   13.97 ++      setenv  LD_LIBRARY64_PATH   $ld_library_path
   13.98 ++    }
   13.99 + 
  13.100 +     return "$flags"
  13.101 + }
    14.1 --- a/patches/gcc/3.2.3/130-gcc-3.2.3-g++.exp.patch	Mon Jul 28 20:17:48 2008 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,98 +0,0 @@
    14.4 -g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
    14.5 -
    14.6 -The first hunk fixes the error
    14.7 -
    14.8 -/testsuite_flags: /testsuite_flags: No such file or directory
    14.9 -    while executing
   14.10 -"exec sh ${odir_v3}/testsuite_flags --build-includes"
   14.11 -    (procedure "g++_include_flags" line 21)
   14.12 -    invoked from within
   14.13 -"g++_include_flags [get_multilibs] "
   14.14 -    (procedure "g++_init" line 63)
   14.15 -    invoked from within
   14.16 -"${tool}_init $test_file_name"
   14.17 -    (procedure "runtest" line 19)
   14.18 -    invoked from within
   14.19 -"runtest $test_name"
   14.20 -    ("foreach" body line 42)
   14.21 -    invoked from within
   14.22 -...
   14.23 -make[1]: [check-g++] Error 1 (ignored)
   14.24 -
   14.25 -The fix isn't especially pretty, but it worked for me, and can't hurt the
   14.26 -more common native compiler case.  Maybe someone who knows the code better 
   14.27 -can come up with a better fix.
   14.28 -
   14.29 -The second hunk fixes the error
   14.30 -
   14.31 -sh: error while loading shared libraries: /opt/cegl-2.0/powerpc-405-linux-gnu/gcc-3.2.3-glibc-2.2.5/powerpc-405-linux-gnu/./lib/libdl.so.2: ELF file data encoding not little-endian
   14.32 -
   14.33 -when trying to compile g++ testcases (!); setting up
   14.34 -the shared library environment when running crosstests of g++ 
   14.35 -should either be done by a special board file, or by
   14.36 -setting up a remote chroot environment (see http://kegel.com/crosstool),
   14.37 -not by blithely setting LD_LIBRARY_PATH on the local system.
   14.38 -
   14.39 ---- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old	Fri Jul 11 15:42:47 2003
   14.40 -+++ gcc-3.2.3/gcc/testsuite/lib/g++.exp	Sat Jul 12 12:57:07 2003
   14.41 -@@ -72,6 +72,8 @@
   14.42 - #
   14.43 - proc g++_include_flags { paths } {
   14.44 -     global srcdir
   14.45 -+    global objdir
   14.46 -+    global target_triplet
   14.47 -     global HAVE_LIBSTDCXX_V3
   14.48 -     global TESTING_IN_BUILD_TREE
   14.49 - 
   14.50 -@@ -90,6 +92,20 @@
   14.51 - 
   14.52 -     if { ${HAVE_LIBSTDCXX_V3} } {
   14.53 -       set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
   14.54 -+      if { $odir_v3 == "" } {
   14.55 -+          verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
   14.56 -+	  # first assume no multilibs
   14.57 -+          set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
   14.58 -+      }
   14.59 -+      if { $odir_v3 == "" } {
   14.60 -+          verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
   14.61 -+	  # assume multilib only one level deep
   14.62 -+          set multisub [file tail $gccpath]
   14.63 -+          set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
   14.64 -+      }
   14.65 -+      if { $odir_v3 == "" } {
   14.66 -+           error "Can't find libstdc++-v3"
   14.67 -+      }
   14.68 -       append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
   14.69 -     } else {
   14.70 -       set odir_v2 [lookfor_file ${gccpath} libstdc++]
   14.71 -@@ -192,16 +192,20 @@
   14.72 -       }
   14.73 -     }
   14.74 - 
   14.75 --    # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
   14.76 --    # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
   14.77 --    # (for the 64-bit ABI).  The right way to do this would be to modify
   14.78 --    # unix.exp -- but that's not an option since it's part of DejaGNU
   14.79 --    # proper, so we do it here.  We really only need to do 
   14.80 --    # this on IRIX, but it shouldn't hurt to do it anywhere else.
   14.81 --    setenv  LD_LIBRARY_PATH     $ld_library_path
   14.82 --    setenv  SHLIB_PATH          $ld_library_path
   14.83 --    setenv  LD_LIBRARYN32_PATH  $ld_library_path
   14.84 --    setenv  LD_LIBRARY64_PATH   $ld_library_path
   14.85 -+    if {![is_remote target]} {
   14.86 -+      # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
   14.87 -+      # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
   14.88 -+      # (for the 64-bit ABI).  The right way to do this would be to modify
   14.89 -+      # unix.exp -- but that's not an option since it's part of DejaGNU
   14.90 -+      # proper, so we do it here.  We really only need to do 
   14.91 -+      # this on IRIX, but it shouldn't hurt to do it anywhere else.
   14.92 -+
   14.93 -+      # Doing this causes us to be unable to run cross-compilers.
   14.94 -+      setenv  LD_LIBRARY_PATH     $ld_library_path
   14.95 -+      setenv  SHLIB_PATH          $ld_library_path
   14.96 -+      setenv  LD_LIBRARYN32_PATH  $ld_library_path
   14.97 -+      setenv  LD_LIBRARY64_PATH   $ld_library_path
   14.98 -+    }
   14.99 - 
  14.100 -     return "$flags"
  14.101 - }
    15.1 --- a/patches/gcc/3.2.3/140-gcc-3.2.3-libffi-1.patch	Mon Jul 28 20:17:48 2008 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,6864 +0,0 @@
    15.4 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.am gcc/libffi/Makefile.am
    15.5 ---- gcc-3.2.2.orig/libffi/Makefile.am	Tue Jan 28 10:43:56 2003
    15.6 -+++ gcc/libffi/Makefile.am	Tue Jan 28 10:48:33 2003
    15.7 -@@ -8,14 +8,17 @@
    15.8 - 		src/mips/n32.s src/mips/o32.S src/mips/o32.s \
    15.9 - 		src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
   15.10 - 		src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
   15.11 -+		src/x86/ffi64.c src/x86/unix64.S \
   15.12 - 		src/alpha/ffi.c src/alpha/osf.S \
   15.13 - 		src/m68k/ffi.c src/m68k/sysv.S \
   15.14 - 		src/powerpc/ffi.c src/powerpc/sysv.S \
   15.15 - 		src/powerpc/ppc_closure.S src/powerpc/asm.h \
   15.16 - 		src/powerpc/ffi_darwin.c \
   15.17 - 		src/powerpc/darwin.S src/powerpc/aix.S \
   15.18 --		src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
   15.19 --		src/arm/ffi.c src/arm/sysv.S
   15.20 -+		src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
   15.21 -+		src/arm/ffi.c src/arm/sysv.S \
   15.22 -+		src/s390/ffi.c src/s390/sysv.S \
   15.23 -+		src/sh/ffi.c src/sh/sysv.S
   15.24 - 
   15.25 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
   15.26 - 
   15.27 -@@ -83,6 +86,7 @@
   15.28 - ffitest_LDFLAGS = -shared-libgcc
   15.29 - 
   15.30 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
   15.31 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
   15.32 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
   15.33 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
   15.34 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
   15.35 -@@ -91,9 +95,12 @@
   15.36 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
   15.37 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
   15.38 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
   15.39 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
   15.40 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
   15.41 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
   15.42 - TARGET_SRC_ARM =  src/arm/sysv.S src/arm/ffi.c
   15.43 -+TARGET_SRC_S390 =  src/s390/sysv.S src/s390/ffi.c
   15.44 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
   15.45 -+TARGET_SRC_SH =  src/sh/sysv.S src/sh/ffi.c
   15.46 - 
   15.47 - ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
   15.48 - ## Work around automake deficiency
   15.49 -@@ -103,6 +110,10 @@
   15.50 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
   15.51 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
   15.52 - endif
   15.53 -+if MIPS_LINUX
   15.54 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
   15.55 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
   15.56 -+endif
   15.57 - if MIPS_SGI
   15.58 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
   15.59 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
   15.60 -@@ -147,6 +158,18 @@
   15.61 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
   15.62 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
   15.63 - endif
   15.64 -+if S390
   15.65 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
   15.66 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
   15.67 -+endif
   15.68 -+if X86_64
   15.69 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
   15.70 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
   15.71 -+endif
   15.72 -+if SH
   15.73 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
   15.74 -+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
   15.75 -+endif
   15.76 - 
   15.77 - AM_CFLAGS = -fexceptions
   15.78 - 
   15.79 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.in gcc/libffi/Makefile.in
   15.80 ---- gcc-3.2.2.orig/libffi/Makefile.in	Wed Jan 29 07:59:05 2003
   15.81 -+++ gcc/libffi/Makefile.in	Wed Jan 29 07:58:58 2003
   15.82 -@@ -91,14 +91,17 @@
   15.83 - 		src/mips/n32.s src/mips/o32.S src/mips/o32.s \
   15.84 - 		src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
   15.85 - 		src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
   15.86 -+		src/x86/ffi64.c src/x86/unix64.S \
   15.87 - 		src/alpha/ffi.c src/alpha/osf.S \
   15.88 - 		src/m68k/ffi.c src/m68k/sysv.S \
   15.89 - 		src/powerpc/ffi.c src/powerpc/sysv.S \
   15.90 - 		src/powerpc/ppc_closure.S src/powerpc/asm.h \
   15.91 - 		src/powerpc/ffi_darwin.c \
   15.92 - 		src/powerpc/darwin.S src/powerpc/aix.S \
   15.93 --		src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
   15.94 --		src/arm/ffi.c src/arm/sysv.S
   15.95 -+		src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
   15.96 -+		src/arm/ffi.c src/arm/sysv.S \
   15.97 -+		src/s390/ffi.c src/s390/sysv.S \
   15.98 -+		src/sh/ffi.c src/sh/sysv.S
   15.99 - 
  15.100 - 
  15.101 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
  15.102 -@@ -162,6 +165,7 @@
  15.103 - ffitest_LDFLAGS = -shared-libgcc
  15.104 - 
  15.105 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
  15.106 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
  15.107 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
  15.108 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
  15.109 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
  15.110 -@@ -170,14 +174,18 @@
  15.111 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
  15.112 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
  15.113 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
  15.114 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
  15.115 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
  15.116 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
  15.117 - TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
  15.118 -+TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
  15.119 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
  15.120 -+TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
  15.121 - 
  15.122 - libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
  15.123 - 		src/raw_api.c src/java_raw_api.c
  15.124 - 
  15.125 - @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
  15.126 -+@MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
  15.127 - @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
  15.128 - @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
  15.129 - @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
  15.130 -@@ -189,7 +197,11 @@
  15.131 - @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
  15.132 - @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
  15.133 - @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
  15.134 -+@S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
  15.135 -+@X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
  15.136 -+@SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
  15.137 - @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
  15.138 -+@MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
  15.139 - @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
  15.140 - @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
  15.141 - @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
  15.142 -@@ -201,6 +213,9 @@
  15.143 - @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
  15.144 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
  15.145 - @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
  15.146 -+@S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
  15.147 -+@X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
  15.148 -+@SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
  15.149 - 
  15.150 - AM_CFLAGS = -fexceptions
  15.151 - 
  15.152 -@@ -208,7 +223,7 @@
  15.153 - 
  15.154 - INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
  15.155 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  15.156 --mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
  15.157 -+mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs
  15.158 - CONFIG_HEADER = fficonfig.h
  15.159 - CONFIG_CLEAN_FILES = 
  15.160 - LTLIBRARIES =  $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
  15.161 -@@ -220,10 +235,6 @@
  15.162 - LIBS = @LIBS@
  15.163 - libffi_convenience_la_LDFLAGS = 
  15.164 - libffi_convenience_la_LIBADD = 
  15.165 --@POWERPC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.166 --@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.167 --@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
  15.168 --@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
  15.169 - @ALPHA_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.170 - @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.171 - @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
  15.172 -@@ -234,12 +245,29 @@
  15.173 - @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.174 - @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
  15.175 - @MIPS_GCC_TRUE@src/mips/n32.lo
  15.176 --@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.177 --@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.178 --@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
  15.179 -+@S390_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.180 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.181 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
  15.182 - @M68K_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.183 - @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.184 - @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
  15.185 -+@X86_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.186 -+@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.187 -+@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
  15.188 -+@POWERPC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.189 -+@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.190 -+@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
  15.191 -+@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
  15.192 -+@MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.193 -+@MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.194 -+@MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo
  15.195 -+@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.196 -+@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.197 -+@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
  15.198 -+@X86_64_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.199 -+@X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.200 -+@X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \
  15.201 -+@X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo
  15.202 - @SPARC_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.203 - @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.204 - @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
  15.205 -@@ -247,62 +275,75 @@
  15.206 - @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.207 - @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.208 - @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
  15.209 --@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
  15.210 --@X86_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.211 --@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.212 --@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
  15.213 --@ARM_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.214 --@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.215 --@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
  15.216 -+@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo
  15.217 -+@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.218 -+@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.219 -+@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
  15.220 -+@MIPS_SGI_TRUE@src/mips/n32.lo
  15.221 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.222 - @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.223 - @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
  15.224 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
  15.225 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
  15.226 --@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo \
  15.227 --@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
  15.228 --@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
  15.229 --@MIPS_SGI_TRUE@src/mips/n32.lo
  15.230 -+@ARM_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.231 -+@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.232 -+@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
  15.233 -+@SH_TRUE@libffi_convenience_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.234 -+@SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.235 -+@SH_TRUE@src/sh/sysv.lo src/sh/ffi.lo
  15.236 - libffi_la_LIBADD = 
  15.237 -+@SH_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
  15.238 -+@SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \
  15.239 -+@SH_TRUE@src/sh/ffi.lo
  15.240 -+@IA64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.241 -+@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.242 -+@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
  15.243 -+@X86_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
  15.244 -+@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
  15.245 -+@X86_TRUE@src/x86/sysv.lo
  15.246 - @POWERPC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.247 - @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.248 - @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
  15.249 - @POWERPC_TRUE@src/powerpc/ppc_closure.lo
  15.250 --@ALPHA_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.251 --@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.252 --@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
  15.253 --@IA64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.254 --@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.255 --@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
  15.256 --@MIPS_GCC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.257 --@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.258 --@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
  15.259 --@X86_WIN32_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.260 --@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.261 --@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
  15.262 --@M68K_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.263 --@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.264 --@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
  15.265 -+@MIPS_LINUX_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.266 -+@MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.267 -+@MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo
  15.268 - @SPARC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.269 - @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.270 - @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
  15.271 - @POWERPC_AIX_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.272 - @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.273 - @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
  15.274 --@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
  15.275 --@X86_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
  15.276 --@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
  15.277 --@X86_TRUE@src/x86/sysv.lo
  15.278 -+@POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo
  15.279 -+@MIPS_SGI_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.280 -+@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.281 -+@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
  15.282 - @ARM_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo src/types.lo \
  15.283 - @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
  15.284 - @ARM_TRUE@src/arm/ffi.lo
  15.285 -+@ALPHA_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.286 -+@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.287 -+@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
  15.288 -+@MIPS_GCC_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.289 -+@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.290 -+@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
  15.291 -+@S390_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.292 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.293 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
  15.294 -+@M68K_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.295 -+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.296 -+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
  15.297 -+@X86_WIN32_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.298 -+@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.299 -+@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
  15.300 -+@X86_64_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.301 -+@X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.302 -+@X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \
  15.303 -+@X86_64_TRUE@src/x86/sysv.lo
  15.304 - @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.305 - @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.306 - @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
  15.307 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
  15.308 --@MIPS_SGI_TRUE@libffi_la_OBJECTS =  src/debug.lo src/prep_cif.lo \
  15.309 --@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
  15.310 --@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
  15.311 - noinst_PROGRAMS =  ffitest$(EXEEXT)
  15.312 - PROGRAMS =  $(noinst_PROGRAMS)
  15.313 - 
  15.314 -@@ -578,8 +616,8 @@
  15.315 - 	-chmod 777 $(distdir)
  15.316 - 	$(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \
  15.317 - 	   $(distdir)/src/m68k $(distdir)/src/mips \
  15.318 --	   $(distdir)/src/powerpc $(distdir)/src/sparc \
  15.319 --	   $(distdir)/src/x86
  15.320 -+	   $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \
  15.321 -+	   $(distdir)/src/sparc $(distdir)/src/x86
  15.322 - 	@for file in $(DISTFILES); do \
  15.323 - 	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
  15.324 - 	  if test -d $$d/$$file; then \
  15.325 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/acinclude.m4 gcc/libffi/acinclude.m4
  15.326 ---- gcc-3.2.2.orig/libffi/acinclude.m4	Sun Sep 10 16:43:14 2000
  15.327 -+++ gcc/libffi/acinclude.m4	Tue Dec 17 03:22:47 2002
  15.328 -@@ -4,5 +4,8 @@
  15.329 - dnl to add a definition of LIBTOOL to Makefile.in.
  15.330 - ifelse(yes,no,[
  15.331 - AC_DEFUN([AC_PROG_LIBTOOL],)
  15.332 -+AC_DEFUN([AM_PROG_LIBTOOL],)
  15.333 - AC_SUBST(LIBTOOL)
  15.334 - ])
  15.335 -+
  15.336 -+sinclude(../config/accross.m4)
  15.337 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/aclocal.m4 gcc/libffi/aclocal.m4
  15.338 ---- gcc-3.2.2.orig/libffi/aclocal.m4	Fri Feb  1 07:25:31 2002
  15.339 -+++ gcc/libffi/aclocal.m4	Tue Dec 17 03:22:47 2002
  15.340 -@@ -1,6 +1,6 @@
  15.341 --dnl aclocal.m4 generated automatically by aclocal 1.4
  15.342 -+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
  15.343 - 
  15.344 --dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  15.345 -+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
  15.346 - dnl This file is free software; the Free Software Foundation
  15.347 - dnl gives unlimited permission to copy and/or distribute it,
  15.348 - dnl with or without modifications, as long as this notice is preserved.
  15.349 -@@ -16,108 +16,15 @@
  15.350 - dnl to add a definition of LIBTOOL to Makefile.in.
  15.351 - ifelse(yes,no,[
  15.352 - AC_DEFUN([AC_PROG_LIBTOOL],)
  15.353 -+AC_DEFUN([AM_PROG_LIBTOOL],)
  15.354 - AC_SUBST(LIBTOOL)
  15.355 - ])
  15.356 - 
  15.357 --AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
  15.358 --[changequote(<<, >>)dnl
  15.359 --dnl The name to #define.
  15.360 --define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
  15.361 --dnl The cache variable name.
  15.362 --define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
  15.363 --changequote([, ])dnl
  15.364 --AC_MSG_CHECKING(size of $1)
  15.365 --AC_CACHE_VAL(AC_CV_NAME,
  15.366 --[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
  15.367 --  AC_TRY_COMPILE([#include "confdefs.h"
  15.368 --#include <sys/types.h>
  15.369 --$2
  15.370 --], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
  15.371 --  if test x$AC_CV_NAME != x ; then break; fi
  15.372 --done
  15.373 --])
  15.374 --if test x$AC_CV_NAME = x ; then
  15.375 --  AC_MSG_ERROR([cannot determine a size for $1])
  15.376 --fi
  15.377 --AC_MSG_RESULT($AC_CV_NAME)
  15.378 --AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
  15.379 --undefine([AC_TYPE_NAME])dnl
  15.380 --undefine([AC_CV_NAME])dnl
  15.381 --])
  15.382 --
  15.383 --AC_DEFUN([AC_C_BIGENDIAN_CROSS],
  15.384 --[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
  15.385 --[ac_cv_c_bigendian=unknown
  15.386 --# See if sys/param.h defines the BYTE_ORDER macro.
  15.387 --AC_TRY_COMPILE([#include <sys/types.h>
  15.388 --#include <sys/param.h>], [
  15.389 --#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  15.390 -- bogus endian macros
  15.391 --#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
  15.392 --AC_TRY_COMPILE([#include <sys/types.h>
  15.393 --#include <sys/param.h>], [
  15.394 --#if BYTE_ORDER != BIG_ENDIAN
  15.395 -- not big endian
  15.396 --#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
  15.397 --if test $ac_cv_c_bigendian = unknown; then
  15.398 --AC_TRY_RUN([main () {
  15.399 --  /* Are we little or big endian?  From Harbison&Steele.  */
  15.400 --  union
  15.401 --  {
  15.402 --    long l;
  15.403 --    char c[sizeof (long)];
  15.404 --  } u;
  15.405 --  u.l = 1;
  15.406 --  exit (u.c[sizeof (long) - 1] == 1);
  15.407 --}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
  15.408 --[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
  15.409 --fi])
  15.410 --if test $ac_cv_c_bigendian = unknown; then
  15.411 --AC_MSG_CHECKING(to probe for byte ordering)
  15.412 --[
  15.413 --cat >conftest.c <<EOF
  15.414 --short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
  15.415 --short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
  15.416 --void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
  15.417 --short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
  15.418 --short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
  15.419 --void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
  15.420 --int main() { _ascii (); _ebcdic (); return 0; }
  15.421 --EOF
  15.422 --] if test -f conftest.c ; then
  15.423 --     if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
  15.424 --        if test `grep -l BIGenDianSyS conftest.o` ; then
  15.425 --           echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
  15.426 --           ac_cv_c_bigendian=yes
  15.427 --        fi
  15.428 --        if test `grep -l LiTTleEnDian conftest.o` ; then
  15.429 --           echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
  15.430 --           if test $ac_cv_c_bigendian = yes ; then
  15.431 --            ac_cv_c_bigendian=unknown;
  15.432 --           else
  15.433 --            ac_cv_c_bigendian=no
  15.434 --           fi
  15.435 --        fi
  15.436 --        echo $ac_n 'guessing bigendian ...  ' >&AC_FD_MSG
  15.437 --     fi
  15.438 --  fi
  15.439 --AC_MSG_RESULT($ac_cv_c_bigendian)
  15.440 --fi
  15.441 --if test $ac_cv_c_bigendian = yes; then
  15.442 --  AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
  15.443 --  BYTEORDER=4321
  15.444 --else
  15.445 --  BYTEORDER=1234
  15.446 --fi
  15.447 --AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
  15.448 --if test $ac_cv_c_bigendian = unknown; then
  15.449 --  AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
  15.450 --fi
  15.451 --])
  15.452 -+sinclude(../config/accross.m4)
  15.453 - 
  15.454 - # Like AC_CONFIG_HEADER, but automatically create stamp file.
  15.455 - 
  15.456 --AC_DEFUN(AM_CONFIG_HEADER,
  15.457 -+AC_DEFUN([AM_CONFIG_HEADER],
  15.458 - [AC_PREREQ([2.12])
  15.459 - AC_CONFIG_HEADER([$1])
  15.460 - dnl When config.status generates a header, we must update the stamp-h file.
  15.461 -@@ -147,7 +54,7 @@
  15.462 - dnl Usage:
  15.463 - dnl AM_INIT_AUTOMAKE(package,version, [no-define])
  15.464 - 
  15.465 --AC_DEFUN(AM_INIT_AUTOMAKE,
  15.466 -+AC_DEFUN([AM_INIT_AUTOMAKE],
  15.467 - [AC_REQUIRE([AC_PROG_INSTALL])
  15.468 - PACKAGE=[$1]
  15.469 - AC_SUBST(PACKAGE)
  15.470 -@@ -175,7 +82,7 @@
  15.471 - # Check to make sure that the build environment is sane.
  15.472 - #
  15.473 - 
  15.474 --AC_DEFUN(AM_SANITY_CHECK,
  15.475 -+AC_DEFUN([AM_SANITY_CHECK],
  15.476 - [AC_MSG_CHECKING([whether build environment is sane])
  15.477 - # Just in case
  15.478 - sleep 1
  15.479 -@@ -216,7 +123,7 @@
  15.480 - 
  15.481 - dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
  15.482 - dnl The program must properly implement --version.
  15.483 --AC_DEFUN(AM_MISSING_PROG,
  15.484 -+AC_DEFUN([AM_MISSING_PROG],
  15.485 - [AC_MSG_CHECKING(for working $2)
  15.486 - # Run test in a subshell; some versions of sh will print an error if
  15.487 - # an executable is not found, even if stderr is redirected.
  15.488 -@@ -235,7 +142,7 @@
  15.489 - 
  15.490 - # serial 1
  15.491 - 
  15.492 --AC_DEFUN(AM_MAINTAINER_MODE,
  15.493 -+AC_DEFUN([AM_MAINTAINER_MODE],
  15.494 - [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  15.495 -   dnl maintainer-mode is disabled by default
  15.496 -   AC_ARG_ENABLE(maintainer-mode,
  15.497 -@@ -252,7 +159,7 @@
  15.498 - 
  15.499 - # Define a conditional.
  15.500 - 
  15.501 --AC_DEFUN(AM_CONDITIONAL,
  15.502 -+AC_DEFUN([AM_CONDITIONAL],
  15.503 - [AC_SUBST($1_TRUE)
  15.504 - AC_SUBST($1_FALSE)
  15.505 - if $2; then
  15.506 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure gcc/libffi/configure
  15.507 ---- gcc-3.2.2.orig/libffi/configure	Wed Jan 29 07:59:05 2003
  15.508 -+++ gcc/libffi/configure	Sat Feb  1 20:16:19 2003
  15.509 -@@ -633,17 +633,16 @@
  15.510 - 
  15.511 - if test "${srcdir}" = "."; then
  15.512 -   if test "${with_target_subdir}" != "."; then
  15.513 --    libffi_basedir="${srcdir}/${with_multisrctop}.."
  15.514 -+    libffi_basedir="${with_multisrctop}../"
  15.515 -   else
  15.516 --    libffi_basedir="${srcdir}/${with_multisrctop}"
  15.517 -+    libffi_basedir="${with_multisrctop}"
  15.518 -   fi
  15.519 - else
  15.520 --  libffi_basedir="${srcdir}"
  15.521 -+  libffi_basedir=
  15.522 - fi
  15.523 - 
  15.524 --
  15.525 - ac_aux_dir=
  15.526 --for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  15.527 -+for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
  15.528 -   if test -f $ac_dir/install-sh; then
  15.529 -     ac_aux_dir=$ac_dir
  15.530 -     ac_install_sh="$ac_aux_dir/install-sh -c"
  15.531 -@@ -655,13 +654,14 @@
  15.532 -   fi
  15.533 - done
  15.534 - if test -z "$ac_aux_dir"; then
  15.535 --  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  15.536 -+  { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
  15.537 - fi
  15.538 - ac_config_guess=$ac_aux_dir/config.guess
  15.539 - ac_config_sub=$ac_aux_dir/config.sub
  15.540 - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  15.541 - 
  15.542 - 
  15.543 -+
  15.544 - # Make sure we can run config.sub.
  15.545 - if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
  15.546 - else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  15.547 -@@ -1238,9 +1238,18 @@
  15.548 -   ;;
  15.549 - 
  15.550 - hpux10.20*|hpux11*)
  15.551 --  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
  15.552 --  lt_cv_file_magic_cmd=/usr/bin/file
  15.553 --  lt_cv_file_magic_test_file=/usr/lib/libc.sl
  15.554 -+  case $host_cpu in
  15.555 -+  hppa*)
  15.556 -+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
  15.557 -+    lt_cv_file_magic_cmd=/usr/bin/file
  15.558 -+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
  15.559 -+    ;;
  15.560 -+  ia64*)
  15.561 -+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
  15.562 -+    lt_cv_file_magic_cmd=/usr/bin/file
  15.563 -+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  15.564 -+    ;;
  15.565 -+  esac
  15.566 -   ;;
  15.567 - 
  15.568 - irix5* | irix6*)
  15.569 -@@ -1267,7 +1276,7 @@
  15.570 - # This must be Linux ELF.
  15.571 - linux-gnu*)
  15.572 -   case $host_cpu in
  15.573 --  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
  15.574 -+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
  15.575 -     lt_cv_deplibs_check_method=pass_all ;;
  15.576 -   *)
  15.577 -     # glibc up to 2.1.1 does not perform some relocations on ARM
  15.578 -@@ -1330,13 +1339,13 @@
  15.579 - deplibs_check_method=$lt_cv_deplibs_check_method
  15.580 - 
  15.581 - echo $ac_n "checking for object suffix""... $ac_c" 1>&6
  15.582 --echo "configure:1334: checking for object suffix" >&5
  15.583 -+echo "configure:1343: checking for object suffix" >&5
  15.584 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
  15.585 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.586 - else
  15.587 -   rm -f conftest*
  15.588 - echo 'int i = 1;' > conftest.$ac_ext
  15.589 --if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.590 -+if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.591 -   for ac_file in conftest.*; do
  15.592 -     case $ac_file in
  15.593 -     *.c) ;;
  15.594 -@@ -1356,7 +1365,7 @@
  15.595 - 
  15.596 - 
  15.597 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  15.598 --echo "configure:1360: checking for executable suffix" >&5
  15.599 -+echo "configure:1369: checking for executable suffix" >&5
  15.600 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  15.601 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.602 - else
  15.603 -@@ -1366,7 +1375,7 @@
  15.604 -   rm -f conftest*
  15.605 -   echo 'int main () { return 0; }' > conftest.$ac_ext
  15.606 -   ac_cv_exeext=
  15.607 --  if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  15.608 -+  if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  15.609 -     for file in conftest.*; do
  15.610 -       case $file in
  15.611 -       *.c | *.o | *.obj) ;;
  15.612 -@@ -1399,7 +1408,7 @@
  15.613 - file_magic*)
  15.614 -   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  15.615 -     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
  15.616 --echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
  15.617 -+echo "configure:1412: checking for ${ac_tool_prefix}file" >&5
  15.618 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
  15.619 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.620 - else
  15.621 -@@ -1461,7 +1470,7 @@
  15.622 - if test -z "$lt_cv_path_MAGIC_CMD"; then
  15.623 -   if test -n "$ac_tool_prefix"; then
  15.624 -     echo $ac_n "checking for file""... $ac_c" 1>&6
  15.625 --echo "configure:1465: checking for file" >&5
  15.626 -+echo "configure:1474: checking for file" >&5
  15.627 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
  15.628 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.629 - else
  15.630 -@@ -1532,7 +1541,7 @@
  15.631 - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
  15.632 - set dummy ${ac_tool_prefix}ranlib; ac_word=$2
  15.633 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.634 --echo "configure:1536: checking for $ac_word" >&5
  15.635 -+echo "configure:1545: checking for $ac_word" >&5
  15.636 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  15.637 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.638 - else
  15.639 -@@ -1564,7 +1573,7 @@
  15.640 -   # Extract the first word of "ranlib", so it can be a program name with args.
  15.641 - set dummy ranlib; ac_word=$2
  15.642 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.643 --echo "configure:1568: checking for $ac_word" >&5
  15.644 -+echo "configure:1577: checking for $ac_word" >&5
  15.645 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  15.646 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.647 - else
  15.648 -@@ -1599,7 +1608,7 @@
  15.649 - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  15.650 - set dummy ${ac_tool_prefix}strip; ac_word=$2
  15.651 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.652 --echo "configure:1603: checking for $ac_word" >&5
  15.653 -+echo "configure:1612: checking for $ac_word" >&5
  15.654 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  15.655 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.656 - else
  15.657 -@@ -1631,7 +1640,7 @@
  15.658 -   # Extract the first word of "strip", so it can be a program name with args.
  15.659 - set dummy strip; ac_word=$2
  15.660 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.661 --echo "configure:1635: checking for $ac_word" >&5
  15.662 -+echo "configure:1644: checking for $ac_word" >&5
  15.663 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  15.664 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.665 - else
  15.666 -@@ -1698,8 +1707,8 @@
  15.667 - case $host in
  15.668 - *-*-irix6*)
  15.669 -   # Find out which ABI we are using.
  15.670 --  echo '#line 1702 "configure"' > conftest.$ac_ext
  15.671 --  if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.672 -+  echo '#line 1711 "configure"' > conftest.$ac_ext
  15.673 -+  if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.674 -     case `/usr/bin/file conftest.$ac_objext` in
  15.675 -     *32-bit*)
  15.676 -       LD="${LD-ld} -32"
  15.677 -@@ -1715,12 +1724,70 @@
  15.678 -   rm -rf conftest*
  15.679 -   ;;
  15.680 - 
  15.681 -+ia64-*-hpux*)
  15.682 -+  # Find out which ABI we are using.
  15.683 -+  echo 'int i;' > conftest.$ac_ext
  15.684 -+  if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.685 -+    case "`/usr/bin/file conftest.o`" in
  15.686 -+    *ELF-32*)
  15.687 -+      HPUX_IA64_MODE="32"
  15.688 -+      ;;
  15.689 -+    *ELF-64*)
  15.690 -+      HPUX_IA64_MODE="64"
  15.691 -+      ;;
  15.692 -+    esac
  15.693 -+  fi
  15.694 -+  rm -rf conftest*
  15.695 -+  ;;
  15.696 -+
  15.697 -+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  15.698 -+  # Find out which ABI we are using.
  15.699 -+  echo 'int i;' > conftest.$ac_ext
  15.700 -+  if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  15.701 -+    case "`/usr/bin/file conftest.o`" in
  15.702 -+    *32-bit*)
  15.703 -+      case $host in
  15.704 -+        x86_64-*linux*)
  15.705 -+          LD="${LD-ld} -m elf_i386"
  15.706 -+          ;;
  15.707 -+        ppc64-*linux*)
  15.708 -+          LD="${LD-ld} -m elf32ppclinux"
  15.709 -+          ;;
  15.710 -+        s390x-*linux*)
  15.711 -+          LD="${LD-ld} -m elf_s390"
  15.712 -+          ;;
  15.713 -+        sparc64-*linux*)
  15.714 -+          LD="${LD-ld} -m elf32_sparc"
  15.715 -+          ;;
  15.716 -+      esac
  15.717 -+      ;;
  15.718 -+    *64-bit*)
  15.719 -+      case $host in
  15.720 -+        x86_64-*linux*)
  15.721 -+          LD="${LD-ld} -m elf_x86_64"
  15.722 -+          ;;
  15.723 -+        ppc*-*linux*|powerpc*-*linux*)
  15.724 -+          LD="${LD-ld} -m elf64ppc"
  15.725 -+          ;;
  15.726 -+        s390*-*linux*)
  15.727 -+          LD="${LD-ld} -m elf64_s390"
  15.728 -+          ;;
  15.729 -+        sparc*-*linux*)
  15.730 -+          LD="${LD-ld} -m elf64_sparc"
  15.731 -+          ;;
  15.732 -+      esac
  15.733 -+      ;;
  15.734 -+    esac
  15.735 -+  fi
  15.736 -+  rm -rf conftest*
  15.737 -+  ;;
  15.738 -+
  15.739 - *-*-sco3.2v5*)
  15.740 -   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  15.741 -   SAVE_CFLAGS="$CFLAGS"
  15.742 -   CFLAGS="$CFLAGS -belf"
  15.743 -   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
  15.744 --echo "configure:1724: checking whether the C compiler needs -belf" >&5
  15.745 -+echo "configure:1791: checking whether the C compiler needs -belf" >&5
  15.746 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
  15.747 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.748 - else
  15.749 -@@ -1733,14 +1800,14 @@
  15.750 - cross_compiling=$ac_cv_prog_cc_cross
  15.751 - 
  15.752 -      cat > conftest.$ac_ext <<EOF
  15.753 --#line 1737 "configure"
  15.754 -+#line 1804 "configure"
  15.755 - #include "confdefs.h"
  15.756 - 
  15.757 - int main() {
  15.758 - 
  15.759 - ; return 0; }
  15.760 - EOF
  15.761 --if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  15.762 -+if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  15.763 -   rm -rf conftest*
  15.764 -   lt_cv_cc_needs_belf=yes
  15.765 - else
  15.766 -@@ -1868,7 +1935,7 @@
  15.767 - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  15.768 - # ./install, which can be erroneously created by make from ./install.sh.
  15.769 - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  15.770 --echo "configure:1872: checking for a BSD compatible install" >&5
  15.771 -+echo "configure:1939: checking for a BSD compatible install" >&5
  15.772 - if test -z "$INSTALL"; then
  15.773 - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  15.774 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.775 -@@ -1921,7 +1988,7 @@
  15.776 - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  15.777 - 
  15.778 - echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
  15.779 --echo "configure:1925: checking whether build environment is sane" >&5
  15.780 -+echo "configure:1992: checking whether build environment is sane" >&5
  15.781 - # Just in case
  15.782 - sleep 1
  15.783 - echo timestamp > conftestfile
  15.784 -@@ -1978,7 +2045,7 @@
  15.785 - test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  15.786 - 
  15.787 - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  15.788 --echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
  15.789 -+echo "configure:2049: checking whether ${MAKE-make} sets \${MAKE}" >&5
  15.790 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  15.791 - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  15.792 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.793 -@@ -2017,7 +2084,7 @@
  15.794 - 
  15.795 - missing_dir=`cd $ac_aux_dir && pwd`
  15.796 - echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
  15.797 --echo "configure:2021: checking for working aclocal" >&5
  15.798 -+echo "configure:2088: checking for working aclocal" >&5
  15.799 - # Run test in a subshell; some versions of sh will print an error if
  15.800 - # an executable is not found, even if stderr is redirected.
  15.801 - # Redirect stdin to placate older versions of autoconf.  Sigh.
  15.802 -@@ -2030,7 +2097,7 @@
  15.803 - fi
  15.804 - 
  15.805 - echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
  15.806 --echo "configure:2034: checking for working autoconf" >&5
  15.807 -+echo "configure:2101: checking for working autoconf" >&5
  15.808 - # Run test in a subshell; some versions of sh will print an error if
  15.809 - # an executable is not found, even if stderr is redirected.
  15.810 - # Redirect stdin to placate older versions of autoconf.  Sigh.
  15.811 -@@ -2043,7 +2110,7 @@
  15.812 - fi
  15.813 - 
  15.814 - echo $ac_n "checking for working automake""... $ac_c" 1>&6
  15.815 --echo "configure:2047: checking for working automake" >&5
  15.816 -+echo "configure:2114: checking for working automake" >&5
  15.817 - # Run test in a subshell; some versions of sh will print an error if
  15.818 - # an executable is not found, even if stderr is redirected.
  15.819 - # Redirect stdin to placate older versions of autoconf.  Sigh.
  15.820 -@@ -2056,7 +2123,7 @@
  15.821 - fi
  15.822 - 
  15.823 - echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
  15.824 --echo "configure:2060: checking for working autoheader" >&5
  15.825 -+echo "configure:2127: checking for working autoheader" >&5
  15.826 - # Run test in a subshell; some versions of sh will print an error if
  15.827 - # an executable is not found, even if stderr is redirected.
  15.828 - # Redirect stdin to placate older versions of autoconf.  Sigh.
  15.829 -@@ -2069,7 +2136,7 @@
  15.830 - fi
  15.831 - 
  15.832 - echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
  15.833 --echo "configure:2073: checking for working makeinfo" >&5
  15.834 -+echo "configure:2140: checking for working makeinfo" >&5
  15.835 - # Run test in a subshell; some versions of sh will print an error if
  15.836 - # an executable is not found, even if stderr is redirected.
  15.837 - # Redirect stdin to placate older versions of autoconf.  Sigh.
  15.838 -@@ -2086,7 +2153,7 @@
  15.839 - 
  15.840 - 
  15.841 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  15.842 --echo "configure:2090: checking for executable suffix" >&5
  15.843 -+echo "configure:2157: checking for executable suffix" >&5
  15.844 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  15.845 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.846 - else
  15.847 -@@ -2096,7 +2163,7 @@
  15.848 -   rm -f conftest*
  15.849 -   echo 'int main () { return 0; }' > conftest.$ac_ext
  15.850 -   ac_cv_exeext=
  15.851 --  if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  15.852 -+  if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  15.853 -     for file in conftest.*; do
  15.854 -       case $file in
  15.855 -       *.c | *.o | *.obj) ;;
  15.856 -@@ -2117,7 +2184,7 @@
  15.857 - ac_exeext=$EXEEXT
  15.858 - 
  15.859 - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
  15.860 --echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
  15.861 -+echo "configure:2188: checking whether to enable maintainer-specific portions of Makefiles" >&5
  15.862 -     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
  15.863 - if test "${enable_maintainer_mode+set}" = set; then
  15.864 -   enableval="$enable_maintainer_mode"
  15.865 -@@ -2143,7 +2210,7 @@
  15.866 - # Extract the first word of "gcc", so it can be a program name with args.
  15.867 - set dummy gcc; ac_word=$2
  15.868 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.869 --echo "configure:2147: checking for $ac_word" >&5
  15.870 -+echo "configure:2214: checking for $ac_word" >&5
  15.871 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  15.872 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.873 - else
  15.874 -@@ -2173,7 +2240,7 @@
  15.875 -   # Extract the first word of "cc", so it can be a program name with args.
  15.876 - set dummy cc; ac_word=$2
  15.877 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.878 --echo "configure:2177: checking for $ac_word" >&5
  15.879 -+echo "configure:2244: checking for $ac_word" >&5
  15.880 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  15.881 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.882 - else
  15.883 -@@ -2224,7 +2291,7 @@
  15.884 -       # Extract the first word of "cl", so it can be a program name with args.
  15.885 - set dummy cl; ac_word=$2
  15.886 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  15.887 --echo "configure:2228: checking for $ac_word" >&5
  15.888 -+echo "configure:2295: checking for $ac_word" >&5
  15.889 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  15.890 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.891 - else
  15.892 -@@ -2256,7 +2323,7 @@
  15.893 - fi
  15.894 - 
  15.895 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  15.896 --echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  15.897 -+echo "configure:2327: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  15.898 - 
  15.899 - ac_ext=c
  15.900 - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  15.901 -@@ -2267,12 +2334,12 @@
  15.902 - 
  15.903 - cat > conftest.$ac_ext << EOF
  15.904 - 
  15.905 --#line 2271 "configure"
  15.906 -+#line 2338 "configure"
  15.907 - #include "confdefs.h"
  15.908 - 
  15.909 - main(){return(0);}
  15.910 - EOF
  15.911 --if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  15.912 -+if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  15.913 -   ac_cv_prog_cc_works=yes
  15.914 -   # If we can't run a trivial program, we are probably using a cross compiler.
  15.915 -   if (./conftest; exit) 2>/dev/null; then
  15.916 -@@ -2298,12 +2365,12 @@
  15.917 -   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  15.918 - fi
  15.919 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  15.920 --echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  15.921 -+echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  15.922 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  15.923 - cross_compiling=$ac_cv_prog_cc_cross
  15.924 - 
  15.925 - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  15.926 --echo "configure:2307: checking whether we are using GNU C" >&5
  15.927 -+echo "configure:2374: checking whether we are using GNU C" >&5
  15.928 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  15.929 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.930 - else
  15.931 -@@ -2312,7 +2379,7 @@
  15.932 -   yes;
  15.933 - #endif
  15.934 - EOF
  15.935 --if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  15.936 -+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  15.937 -   ac_cv_prog_gcc=yes
  15.938 - else
  15.939 -   ac_cv_prog_gcc=no
  15.940 -@@ -2331,7 +2398,7 @@
  15.941 - ac_save_CFLAGS="$CFLAGS"
  15.942 - CFLAGS=
  15.943 - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  15.944 --echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
  15.945 -+echo "configure:2402: checking whether ${CC-cc} accepts -g" >&5
  15.946 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  15.947 -   echo $ac_n "(cached) $ac_c" 1>&6
  15.948 - else
  15.949 -@@ -2381,17 +2448,23 @@
  15.950 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
  15.951 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
  15.952 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
  15.953 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
  15.954 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
  15.955 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
  15.956 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
  15.957 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
  15.958 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
  15.959 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
  15.960 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
  15.961 -+mips64*-*);;
  15.962 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
  15.963 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
  15.964 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
  15.965 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
  15.966 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
  15.967 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
  15.968 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
  15.969 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
  15.970 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
  15.971 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
  15.972 -+sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
  15.973 - esac
  15.974 - 
  15.975 - if test $TARGETDIR = unknown; then
  15.976 -@@ -2418,6 +2491,15 @@
  15.977 - fi
  15.978 - 
  15.979 - 
  15.980 -+if test x$TARGET = xMIPS_LINUX; then
  15.981 -+  MIPS_LINUX_TRUE=
  15.982 -+  MIPS_LINUX_FALSE='#'
  15.983 -+else
  15.984 -+  MIPS_LINUX_TRUE='#'
  15.985 -+  MIPS_LINUX_FALSE=
  15.986 -+fi
  15.987 -+
  15.988 -+
  15.989 - if test x$TARGET = xSPARC; then
  15.990 -   SPARC_TRUE=
  15.991 -   SPARC_FALSE='#'
  15.992 -@@ -2507,8 +2589,39 @@
  15.993 -   ARM_FALSE=
  15.994 - fi
  15.995 - 
  15.996 -+
  15.997 -+if test x$TARGET = xS390; then
  15.998 -+  S390_TRUE=
  15.999 -+  S390_FALSE='#'
 15.1000 -+else
 15.1001 -+  S390_TRUE='#'
 15.1002 -+  S390_FALSE=
 15.1003 -+fi
 15.1004 -+
 15.1005 -+
 15.1006 -+if test x$TARGET = xX86_64; then
 15.1007 -+  X86_64_TRUE=
 15.1008 -+  X86_64_FALSE='#'
 15.1009 -+else
 15.1010 -+  X86_64_TRUE='#'
 15.1011 -+  X86_64_FALSE=
 15.1012 -+fi
 15.1013 -+
 15.1014 -+
 15.1015 -+if test x$TARGET = xSH; then
 15.1016 -+  SH_TRUE=
 15.1017 -+  SH_FALSE='#'
 15.1018 -+else
 15.1019 -+  SH_TRUE='#'
 15.1020 -+  SH_FALSE=
 15.1021 -+fi
 15.1022 -+
 15.1023 -+if test x$TARGET = xMIPS_LINUX; then
 15.1024 -+  TARGET=MIPS
 15.1025 -+fi
 15.1026 -+
 15.1027 - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
 15.1028 --echo "configure:2512: checking how to run the C preprocessor" >&5
 15.1029 -+echo "configure:2625: checking how to run the C preprocessor" >&5
 15.1030 - # On Suns, sometimes $CPP names a directory.
 15.1031 - if test -n "$CPP" && test -d "$CPP"; then
 15.1032 -   CPP=
 15.1033 -@@ -2523,13 +2636,13 @@
 15.1034 -   # On the NeXT, cc -E runs the code through the compiler's parser,
 15.1035 -   # not just through cpp.
 15.1036 -   cat > conftest.$ac_ext <<EOF
 15.1037 --#line 2527 "configure"
 15.1038 -+#line 2640 "configure"
 15.1039 - #include "confdefs.h"
 15.1040 - #include <assert.h>
 15.1041 - Syntax Error
 15.1042 - EOF
 15.1043 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 15.1044 --{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1045 -+{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1046 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 15.1047 - if test -z "$ac_err"; then
 15.1048 -   :
 15.1049 -@@ -2540,13 +2653,13 @@
 15.1050 -   rm -rf conftest*
 15.1051 -   CPP="${CC-cc} -E -traditional-cpp"
 15.1052 -   cat > conftest.$ac_ext <<EOF
 15.1053 --#line 2544 "configure"
 15.1054 -+#line 2657 "configure"
 15.1055 - #include "confdefs.h"
 15.1056 - #include <assert.h>
 15.1057 - Syntax Error
 15.1058 - EOF
 15.1059 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 15.1060 --{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1061 -+{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1062 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 15.1063 - if test -z "$ac_err"; then
 15.1064 -   :
 15.1065 -@@ -2557,13 +2670,13 @@
 15.1066 -   rm -rf conftest*
 15.1067 -   CPP="${CC-cc} -nologo -E"
 15.1068 -   cat > conftest.$ac_ext <<EOF
 15.1069 --#line 2561 "configure"
 15.1070 -+#line 2674 "configure"
 15.1071 - #include "confdefs.h"
 15.1072 - #include <assert.h>
 15.1073 - Syntax Error
 15.1074 - EOF
 15.1075 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 15.1076 --{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1077 -+{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1078 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 15.1079 - if test -z "$ac_err"; then
 15.1080 -   :
 15.1081 -@@ -2588,12 +2701,12 @@
 15.1082 - echo "$ac_t""$CPP" 1>&6
 15.1083 - 
 15.1084 - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
 15.1085 --echo "configure:2592: checking for ANSI C header files" >&5
 15.1086 -+echo "configure:2705: checking for ANSI C header files" >&5
 15.1087 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
 15.1088 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1089 - else
 15.1090 -   cat > conftest.$ac_ext <<EOF
 15.1091 --#line 2597 "configure"
 15.1092 -+#line 2710 "configure"
 15.1093 - #include "confdefs.h"
 15.1094 - #include <stdlib.h>
 15.1095 - #include <stdarg.h>
 15.1096 -@@ -2601,7 +2714,7 @@
 15.1097 - #include <float.h>
 15.1098 - EOF
 15.1099 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 15.1100 --{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1101 -+{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 15.1102 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 15.1103 - if test -z "$ac_err"; then
 15.1104 -   rm -rf conftest*
 15.1105 -@@ -2618,7 +2731,7 @@
 15.1106 - if test $ac_cv_header_stdc = yes; then
 15.1107 -   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 15.1108 - cat > conftest.$ac_ext <<EOF
 15.1109 --#line 2622 "configure"
 15.1110 -+#line 2735 "configure"
 15.1111 - #include "confdefs.h"
 15.1112 - #include <string.h>
 15.1113 - EOF
 15.1114 -@@ -2636,7 +2749,7 @@
 15.1115 - if test $ac_cv_header_stdc = yes; then
 15.1116 -   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 15.1117 - cat > conftest.$ac_ext <<EOF
 15.1118 --#line 2640 "configure"
 15.1119 -+#line 2753 "configure"
 15.1120 - #include "confdefs.h"
 15.1121 - #include <stdlib.h>
 15.1122 - EOF
 15.1123 -@@ -2657,7 +2770,7 @@
 15.1124 -   :
 15.1125 - else
 15.1126 -   cat > conftest.$ac_ext <<EOF
 15.1127 --#line 2661 "configure"
 15.1128 -+#line 2774 "configure"
 15.1129 - #include "confdefs.h"
 15.1130 - #include <ctype.h>
 15.1131 - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
 15.1132 -@@ -2668,7 +2781,7 @@
 15.1133 - exit (0); }
 15.1134 - 
 15.1135 - EOF
 15.1136 --if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1137 -+if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1138 - then
 15.1139 -   :
 15.1140 - else
 15.1141 -@@ -2694,12 +2807,12 @@
 15.1142 - for ac_func in memcpy
 15.1143 - do
 15.1144 - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 15.1145 --echo "configure:2698: checking for $ac_func" >&5
 15.1146 -+echo "configure:2811: checking for $ac_func" >&5
 15.1147 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
 15.1148 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1149 - else
 15.1150 -   cat > conftest.$ac_ext <<EOF
 15.1151 --#line 2703 "configure"
 15.1152 -+#line 2816 "configure"
 15.1153 - #include "confdefs.h"
 15.1154 - /* System header to define __stub macros and hopefully few prototypes,
 15.1155 -     which can conflict with char $ac_func(); below.  */
 15.1156 -@@ -2722,7 +2835,7 @@
 15.1157 - 
 15.1158 - ; return 0; }
 15.1159 - EOF
 15.1160 --if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1161 -+if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1162 -   rm -rf conftest*
 15.1163 -   eval "ac_cv_func_$ac_func=yes"
 15.1164 - else
 15.1165 -@@ -2749,19 +2862,19 @@
 15.1166 - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 15.1167 - # for constant arguments.  Useless!
 15.1168 - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
 15.1169 --echo "configure:2753: checking for working alloca.h" >&5
 15.1170 -+echo "configure:2866: checking for working alloca.h" >&5
 15.1171 - if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
 15.1172 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1173 - else
 15.1174 -   cat > conftest.$ac_ext <<EOF
 15.1175 --#line 2758 "configure"
 15.1176 -+#line 2871 "configure"
 15.1177 - #include "confdefs.h"
 15.1178 - #include <alloca.h>
 15.1179 - int main() {
 15.1180 - char *p = alloca(2 * sizeof(int));
 15.1181 - ; return 0; }
 15.1182 - EOF
 15.1183 --if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1184 -+if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1185 -   rm -rf conftest*
 15.1186 -   ac_cv_header_alloca_h=yes
 15.1187 - else
 15.1188 -@@ -2782,12 +2895,12 @@
 15.1189 - fi
 15.1190 - 
 15.1191 - echo $ac_n "checking for alloca""... $ac_c" 1>&6
 15.1192 --echo "configure:2786: checking for alloca" >&5
 15.1193 -+echo "configure:2899: checking for alloca" >&5
 15.1194 - if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
 15.1195 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1196 - else
 15.1197 -   cat > conftest.$ac_ext <<EOF
 15.1198 --#line 2791 "configure"
 15.1199 -+#line 2904 "configure"
 15.1200 - #include "confdefs.h"
 15.1201 - 
 15.1202 - #ifdef __GNUC__
 15.1203 -@@ -2815,7 +2928,7 @@
 15.1204 - char *p = (char *) alloca(1);
 15.1205 - ; return 0; }
 15.1206 - EOF
 15.1207 --if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1208 -+if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1209 -   rm -rf conftest*
 15.1210 -   ac_cv_func_alloca_works=yes
 15.1211 - else
 15.1212 -@@ -2847,12 +2960,12 @@
 15.1213 - 
 15.1214 - 
 15.1215 - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
 15.1216 --echo "configure:2851: checking whether alloca needs Cray hooks" >&5
 15.1217 -+echo "configure:2964: checking whether alloca needs Cray hooks" >&5
 15.1218 - if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
 15.1219 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1220 - else
 15.1221 -   cat > conftest.$ac_ext <<EOF
 15.1222 --#line 2856 "configure"
 15.1223 -+#line 2969 "configure"
 15.1224 - #include "confdefs.h"
 15.1225 - #if defined(CRAY) && ! defined(CRAY2)
 15.1226 - webecray
 15.1227 -@@ -2877,12 +2990,12 @@
 15.1228 - if test $ac_cv_os_cray = yes; then
 15.1229 - for ac_func in _getb67 GETB67 getb67; do
 15.1230 -   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 15.1231 --echo "configure:2881: checking for $ac_func" >&5
 15.1232 -+echo "configure:2994: checking for $ac_func" >&5
 15.1233 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
 15.1234 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1235 - else
 15.1236 -   cat > conftest.$ac_ext <<EOF
 15.1237 --#line 2886 "configure"
 15.1238 -+#line 2999 "configure"
 15.1239 - #include "confdefs.h"
 15.1240 - /* System header to define __stub macros and hopefully few prototypes,
 15.1241 -     which can conflict with char $ac_func(); below.  */
 15.1242 -@@ -2905,7 +3018,7 @@
 15.1243 - 
 15.1244 - ; return 0; }
 15.1245 - EOF
 15.1246 --if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1247 -+if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1248 -   rm -rf conftest*
 15.1249 -   eval "ac_cv_func_$ac_func=yes"
 15.1250 - else
 15.1251 -@@ -2932,7 +3045,7 @@
 15.1252 - fi
 15.1253 - 
 15.1254 - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
 15.1255 --echo "configure:2936: checking stack direction for C alloca" >&5
 15.1256 -+echo "configure:3049: checking stack direction for C alloca" >&5
 15.1257 - if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
 15.1258 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1259 - else
 15.1260 -@@ -2940,7 +3053,7 @@
 15.1261 -   ac_cv_c_stack_direction=0
 15.1262 - else
 15.1263 -   cat > conftest.$ac_ext <<EOF
 15.1264 --#line 2944 "configure"
 15.1265 -+#line 3057 "configure"
 15.1266 - #include "confdefs.h"
 15.1267 - find_stack_direction ()
 15.1268 - {
 15.1269 -@@ -2959,7 +3072,7 @@
 15.1270 -   exit (find_stack_direction() < 0);
 15.1271 - }
 15.1272 - EOF
 15.1273 --if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1274 -+if { (eval echo configure:3076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1275 - then
 15.1276 -   ac_cv_c_stack_direction=1
 15.1277 - else
 15.1278 -@@ -2982,13 +3095,13 @@
 15.1279 - 
 15.1280 - 
 15.1281 - echo $ac_n "checking size of short""... $ac_c" 1>&6
 15.1282 --echo "configure:2986: checking size of short" >&5
 15.1283 -+echo "configure:3099: checking size of short" >&5
 15.1284 - if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
 15.1285 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1286 - else
 15.1287 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1288 -   cat > conftest.$ac_ext <<EOF
 15.1289 --#line 2992 "configure"
 15.1290 -+#line 3105 "configure"
 15.1291 - #include "confdefs.h"
 15.1292 - #include "confdefs.h"
 15.1293 - #include <sys/types.h>
 15.1294 -@@ -2998,7 +3111,7 @@
 15.1295 - switch (0) case 0: case (sizeof (short) == $ac_size):;
 15.1296 - ; return 0; }
 15.1297 - EOF
 15.1298 --if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1299 -+if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1300 -   rm -rf conftest*
 15.1301 -   ac_cv_sizeof_short=$ac_size
 15.1302 - else
 15.1303 -@@ -3021,13 +3134,13 @@
 15.1304 - 
 15.1305 - 
 15.1306 - echo $ac_n "checking size of int""... $ac_c" 1>&6
 15.1307 --echo "configure:3025: checking size of int" >&5
 15.1308 -+echo "configure:3138: checking size of int" >&5
 15.1309 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
 15.1310 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1311 - else
 15.1312 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1313 -   cat > conftest.$ac_ext <<EOF
 15.1314 --#line 3031 "configure"
 15.1315 -+#line 3144 "configure"
 15.1316 - #include "confdefs.h"
 15.1317 - #include "confdefs.h"
 15.1318 - #include <sys/types.h>
 15.1319 -@@ -3037,7 +3150,7 @@
 15.1320 - switch (0) case 0: case (sizeof (int) == $ac_size):;
 15.1321 - ; return 0; }
 15.1322 - EOF
 15.1323 --if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1324 -+if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1325 -   rm -rf conftest*
 15.1326 -   ac_cv_sizeof_int=$ac_size
 15.1327 - else
 15.1328 -@@ -3060,13 +3173,13 @@
 15.1329 - 
 15.1330 - 
 15.1331 - echo $ac_n "checking size of long""... $ac_c" 1>&6
 15.1332 --echo "configure:3064: checking size of long" >&5
 15.1333 -+echo "configure:3177: checking size of long" >&5
 15.1334 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
 15.1335 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1336 - else
 15.1337 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1338 -   cat > conftest.$ac_ext <<EOF
 15.1339 --#line 3070 "configure"
 15.1340 -+#line 3183 "configure"
 15.1341 - #include "confdefs.h"
 15.1342 - #include "confdefs.h"
 15.1343 - #include <sys/types.h>
 15.1344 -@@ -3076,7 +3189,7 @@
 15.1345 - switch (0) case 0: case (sizeof (long) == $ac_size):;
 15.1346 - ; return 0; }
 15.1347 - EOF
 15.1348 --if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1349 -+if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1350 -   rm -rf conftest*
 15.1351 -   ac_cv_sizeof_long=$ac_size
 15.1352 - else
 15.1353 -@@ -3099,13 +3212,13 @@
 15.1354 - 
 15.1355 - 
 15.1356 - echo $ac_n "checking size of long long""... $ac_c" 1>&6
 15.1357 --echo "configure:3103: checking size of long long" >&5
 15.1358 -+echo "configure:3216: checking size of long long" >&5
 15.1359 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
 15.1360 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1361 - else
 15.1362 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1363 -   cat > conftest.$ac_ext <<EOF
 15.1364 --#line 3109 "configure"
 15.1365 -+#line 3222 "configure"
 15.1366 - #include "confdefs.h"
 15.1367 - #include "confdefs.h"
 15.1368 - #include <sys/types.h>
 15.1369 -@@ -3115,7 +3228,7 @@
 15.1370 - switch (0) case 0: case (sizeof (long long) == $ac_size):;
 15.1371 - ; return 0; }
 15.1372 - EOF
 15.1373 --if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1374 -+if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1375 -   rm -rf conftest*
 15.1376 -   ac_cv_sizeof_long_long=$ac_size
 15.1377 - else
 15.1378 -@@ -3138,13 +3251,13 @@
 15.1379 - 
 15.1380 - 
 15.1381 - echo $ac_n "checking size of float""... $ac_c" 1>&6
 15.1382 --echo "configure:3142: checking size of float" >&5
 15.1383 -+echo "configure:3255: checking size of float" >&5
 15.1384 - if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
 15.1385 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1386 - else
 15.1387 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1388 -   cat > conftest.$ac_ext <<EOF
 15.1389 --#line 3148 "configure"
 15.1390 -+#line 3261 "configure"
 15.1391 - #include "confdefs.h"
 15.1392 - #include "confdefs.h"
 15.1393 - #include <sys/types.h>
 15.1394 -@@ -3154,7 +3267,7 @@
 15.1395 - switch (0) case 0: case (sizeof (float) == $ac_size):;
 15.1396 - ; return 0; }
 15.1397 - EOF
 15.1398 --if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1399 -+if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1400 -   rm -rf conftest*
 15.1401 -   ac_cv_sizeof_float=$ac_size
 15.1402 - else
 15.1403 -@@ -3177,13 +3290,13 @@
 15.1404 - 
 15.1405 - 
 15.1406 - echo $ac_n "checking size of double""... $ac_c" 1>&6
 15.1407 --echo "configure:3181: checking size of double" >&5
 15.1408 -+echo "configure:3294: checking size of double" >&5
 15.1409 - if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
 15.1410 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1411 - else
 15.1412 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1413 -   cat > conftest.$ac_ext <<EOF
 15.1414 --#line 3187 "configure"
 15.1415 -+#line 3300 "configure"
 15.1416 - #include "confdefs.h"
 15.1417 - #include "confdefs.h"
 15.1418 - #include <sys/types.h>
 15.1419 -@@ -3193,7 +3306,7 @@
 15.1420 - switch (0) case 0: case (sizeof (double) == $ac_size):;
 15.1421 - ; return 0; }
 15.1422 - EOF
 15.1423 --if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1424 -+if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1425 -   rm -rf conftest*
 15.1426 -   ac_cv_sizeof_double=$ac_size
 15.1427 - else
 15.1428 -@@ -3216,13 +3329,13 @@
 15.1429 - 
 15.1430 - 
 15.1431 - echo $ac_n "checking size of long double""... $ac_c" 1>&6
 15.1432 --echo "configure:3220: checking size of long double" >&5
 15.1433 -+echo "configure:3333: checking size of long double" >&5
 15.1434 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
 15.1435 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1436 - else
 15.1437 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1438 -   cat > conftest.$ac_ext <<EOF
 15.1439 --#line 3226 "configure"
 15.1440 -+#line 3339 "configure"
 15.1441 - #include "confdefs.h"
 15.1442 - #include "confdefs.h"
 15.1443 - #include <sys/types.h>
 15.1444 -@@ -3232,7 +3345,7 @@
 15.1445 - switch (0) case 0: case (sizeof (long double) == $ac_size):;
 15.1446 - ; return 0; }
 15.1447 - EOF
 15.1448 --if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1449 -+if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1450 -   rm -rf conftest*
 15.1451 -   ac_cv_sizeof_long_double=$ac_size
 15.1452 - else
 15.1453 -@@ -3256,13 +3369,13 @@
 15.1454 - 
 15.1455 - 
 15.1456 - echo $ac_n "checking size of void *""... $ac_c" 1>&6
 15.1457 --echo "configure:3260: checking size of void *" >&5
 15.1458 -+echo "configure:3373: checking size of void *" >&5
 15.1459 - if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
 15.1460 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1461 - else
 15.1462 -   for ac_size in 4 8 1 2 16 12  ; do # List sizes in rough order of prevalence.
 15.1463 -   cat > conftest.$ac_ext <<EOF
 15.1464 --#line 3266 "configure"
 15.1465 -+#line 3379 "configure"
 15.1466 - #include "confdefs.h"
 15.1467 - #include "confdefs.h"
 15.1468 - #include <sys/types.h>
 15.1469 -@@ -3272,7 +3385,7 @@
 15.1470 - switch (0) case 0: case (sizeof (void *) == $ac_size):;
 15.1471 - ; return 0; }
 15.1472 - EOF
 15.1473 --if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1474 -+if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1475 -   rm -rf conftest*
 15.1476 -   ac_cv_sizeof_void_p=$ac_size
 15.1477 - else
 15.1478 -@@ -3295,14 +3408,14 @@
 15.1479 - 
 15.1480 - 
 15.1481 - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
 15.1482 --echo "configure:3299: checking whether byte ordering is bigendian" >&5
 15.1483 -+echo "configure:3412: checking whether byte ordering is bigendian" >&5
 15.1484 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
 15.1485 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1486 - else
 15.1487 -   ac_cv_c_bigendian=unknown
 15.1488 - # See if sys/param.h defines the BYTE_ORDER macro.
 15.1489 - cat > conftest.$ac_ext <<EOF
 15.1490 --#line 3306 "configure"
 15.1491 -+#line 3419 "configure"
 15.1492 - #include "confdefs.h"
 15.1493 - #include <sys/types.h>
 15.1494 - #include <sys/param.h>
 15.1495 -@@ -3313,11 +3426,11 @@
 15.1496 - #endif
 15.1497 - ; return 0; }
 15.1498 - EOF
 15.1499 --if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1500 -+if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1501 -   rm -rf conftest*
 15.1502 -   # It does; now see whether it defined to BIG_ENDIAN or not.
 15.1503 - cat > conftest.$ac_ext <<EOF
 15.1504 --#line 3321 "configure"
 15.1505 -+#line 3434 "configure"
 15.1506 - #include "confdefs.h"
 15.1507 - #include <sys/types.h>
 15.1508 - #include <sys/param.h>
 15.1509 -@@ -3328,7 +3441,7 @@
 15.1510 - #endif
 15.1511 - ; return 0; }
 15.1512 - EOF
 15.1513 --if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1514 -+if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
 15.1515 -   rm -rf conftest*
 15.1516 -   ac_cv_c_bigendian=yes
 15.1517 - else
 15.1518 -@@ -3348,7 +3461,7 @@
 15.1519 -    echo $ac_n "cross-compiling... " 2>&6 
 15.1520 - else
 15.1521 -   cat > conftest.$ac_ext <<EOF
 15.1522 --#line 3352 "configure"
 15.1523 -+#line 3465 "configure"
 15.1524 - #include "confdefs.h"
 15.1525 - main () {
 15.1526 -   /* Are we little or big endian?  From Harbison&Steele.  */
 15.1527 -@@ -3361,7 +3474,7 @@
 15.1528 -   exit (u.c[sizeof (long) - 1] == 1);
 15.1529 - }
 15.1530 - EOF
 15.1531 --if { (eval echo configure:3365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1532 -+if { (eval echo configure:3478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 15.1533 - then
 15.1534 -   ac_cv_c_bigendian=no
 15.1535 - else
 15.1536 -@@ -3379,7 +3492,7 @@
 15.1537 - echo "$ac_t""$ac_cv_c_bigendian" 1>&6
 15.1538 - if test $ac_cv_c_bigendian = unknown; then
 15.1539 - echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
 15.1540 --echo "configure:3383: checking to probe for byte ordering" >&5
 15.1541 -+echo "configure:3496: checking to probe for byte ordering" >&5
 15.1542 - 
 15.1543 - cat >conftest.c <<EOF
 15.1544 - short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
 15.1545 -@@ -3414,6 +3527,10 @@
 15.1546 - #define WORDS_BIGENDIAN 1
 15.1547 - EOF
 15.1548 - 
 15.1549 -+  cat >> confdefs.h <<\EOF
 15.1550 -+#define HOST_WORDS_BIG_ENDIAN 1
 15.1551 -+EOF
 15.1552 -+
 15.1553 -   BYTEORDER=4321
 15.1554 - else
 15.1555 -   BYTEORDER=1234
 15.1556 -@@ -3429,7 +3546,7 @@
 15.1557 - 
 15.1558 - if test x$TARGET = xSPARC; then
 15.1559 -     echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
 15.1560 --echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
 15.1561 -+echo "configure:3550: checking assembler and linker support unaligned pc related relocs" >&5
 15.1562 - if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
 15.1563 -   echo $ac_n "(cached) $ac_c" 1>&6
 15.1564 - else
 15.1565 -@@ -3439,14 +3556,14 @@
 15.1566 - 	CFLAGS="$CFLAGS -fpic"
 15.1567 - 	LDFLAGS="$LDFLAGS -shared"
 15.1568 - 	cat > conftest.$ac_ext <<EOF
 15.1569 --#line 3443 "configure"
 15.1570 -+#line 3560 "configure"
 15.1571 - #include "confdefs.h"
 15.1572 - asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
 15.1573 - int main() {
 15.1574 - 
 15.1575 - ; return 0; }
 15.1576 - EOF
 15.1577 --if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1578 -+if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
 15.1579 -   rm -rf conftest*
 15.1580 -   libffi_cv_as_sparc_ua_pcrel=yes
 15.1581 - else
 15.1582 -@@ -3709,6 +3826,8 @@
 15.1583 - s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
 15.1584 - s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
 15.1585 - s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
 15.1586 -+s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
 15.1587 -+s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
 15.1588 - s%@SPARC_TRUE@%$SPARC_TRUE%g
 15.1589 - s%@SPARC_FALSE@%$SPARC_FALSE%g
 15.1590 - s%@X86_TRUE@%$X86_TRUE%g
 15.1591 -@@ -3729,6 +3848,12 @@
 15.1592 - s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
 15.1593 - s%@ARM_TRUE@%$ARM_TRUE%g
 15.1594 - s%@ARM_FALSE@%$ARM_FALSE%g
 15.1595 -+s%@S390_TRUE@%$S390_TRUE%g
 15.1596 -+s%@S390_FALSE@%$S390_FALSE%g
 15.1597 -+s%@X86_64_TRUE@%$X86_64_TRUE%g
 15.1598 -+s%@X86_64_FALSE@%$X86_64_FALSE%g
 15.1599 -+s%@SH_TRUE@%$SH_TRUE%g
 15.1600 -+s%@SH_FALSE@%$SH_FALSE%g
 15.1601 - s%@CPP@%$CPP%g
 15.1602 - s%@ALLOCA@%$ALLOCA%g
 15.1603 - s%@TARGET@%$TARGET%g
 15.1604 -@@ -3969,7 +4094,7 @@
 15.1605 - 
 15.1606 - if test -n "$CONFIG_FILES"; then
 15.1607 -    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
 15.1608 --   ac_file=Makefile . ${libffi_basedir}/../config-ml.in
 15.1609 -+   ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
 15.1610 - fi
 15.1611 - 
 15.1612 - exit 0
 15.1613 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure.in gcc/libffi/configure.in
 15.1614 ---- gcc-3.2.2.orig/libffi/configure.in	Tue Jan 28 10:43:56 2003
 15.1615 -+++ gcc/libffi/configure.in	Sat Feb  1 20:16:19 2003
 15.1616 -@@ -22,14 +22,15 @@
 15.1617 - 
 15.1618 - if test "${srcdir}" = "."; then
 15.1619 -   if test "${with_target_subdir}" != "."; then
 15.1620 --    libffi_basedir="${srcdir}/${with_multisrctop}.."
 15.1621 -+    libffi_basedir="${with_multisrctop}../"
 15.1622 -   else
 15.1623 --    libffi_basedir="${srcdir}/${with_multisrctop}"
 15.1624 -+    libffi_basedir="${with_multisrctop}"
 15.1625 -   fi
 15.1626 - else
 15.1627 --  libffi_basedir="${srcdir}"
 15.1628 -+  libffi_basedir=
 15.1629 - fi
 15.1630 - AC_SUBST(libffi_basedir)
 15.1631 -+AC_CONFIG_AUX_DIR(${libffi_basedir}..)
 15.1632 - 
 15.1633 - AC_CANONICAL_HOST
 15.1634 - 
 15.1635 -@@ -56,17 +57,23 @@
 15.1636 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
 15.1637 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1638 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1639 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1640 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1641 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
 15.1642 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1643 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
 15.1644 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
 15.1645 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
 15.1646 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
 15.1647 -+mips64*-*);;
 15.1648 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
 15.1649 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
 15.1650 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
 15.1651 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
 15.1652 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
 15.1653 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
 15.1654 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
 15.1655 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
 15.1656 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
 15.1657 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
 15.1658 -+sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
 15.1659 - esac
 15.1660 - 
 15.1661 - if test $TARGETDIR = unknown; then
 15.1662 -@@ -75,6 +82,7 @@
 15.1663 - 
 15.1664 - AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
 15.1665 - AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
 15.1666 -+AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
 15.1667 - AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
 15.1668 - AM_CONDITIONAL(X86, test x$TARGET = xX86)
 15.1669 - AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
 15.1670 -@@ -85,6 +93,13 @@
 15.1671 - AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
 15.1672 - AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
 15.1673 - AM_CONDITIONAL(ARM, test x$TARGET = xARM)
 15.1674 -+AM_CONDITIONAL(S390, test x$TARGET = xS390)
 15.1675 -+AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
 15.1676 -+AM_CONDITIONAL(SH, test x$TARGET = xSH)
 15.1677 -+
 15.1678 -+if test x$TARGET = xMIPS_LINUX; then
 15.1679 -+  TARGET=MIPS
 15.1680 -+fi
 15.1681 - 
 15.1682 - AC_HEADER_STDC
 15.1683 - AC_CHECK_FUNCS(memcpy)
 15.1684 -@@ -171,7 +186,7 @@
 15.1685 - [
 15.1686 - if test -n "$CONFIG_FILES"; then
 15.1687 -    LD="${ORIGINAL_LD_FOR_MULTILIBS}"
 15.1688 --   ac_file=Makefile . ${libffi_basedir}/../config-ml.in
 15.1689 -+   ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
 15.1690 - fi
 15.1691 - ],
 15.1692 - srcdir=${srcdir}
 15.1693 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/Makefile.in gcc/libffi/include/Makefile.in
 15.1694 ---- gcc-3.2.2.orig/libffi/include/Makefile.in	Tue Oct  9 14:32:16 2001
 15.1695 -+++ gcc/libffi/include/Makefile.in	Mon Apr 29 13:14:44 2002
 15.1696 -@@ -99,7 +99,7 @@
 15.1697 - 
 15.1698 - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 15.1699 - 
 15.1700 --TAR = gnutar
 15.1701 -+TAR = gtar
 15.1702 - GZIP_ENV = --best
 15.1703 - all: all-redirect
 15.1704 - .SUFFIXES:
 15.1705 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/ffi.h.in gcc/libffi/include/ffi.h.in
 15.1706 ---- gcc-3.2.2.orig/libffi/include/ffi.h.in	Wed Mar 13 07:35:56 2002
 15.1707 -+++ gcc/libffi/include/ffi.h.in	Wed Jan 29 00:54:28 2003
 15.1708 -@@ -1,5 +1,5 @@
 15.1709 - /* -----------------------------------------------------------------*-C-*-
 15.1710 --   libffi @VERSION@ - Copyright (c) 1996-2002  Cygnus Solutions
 15.1711 -+   libffi @VERSION@ - Copyright (c) 1996-2003  Cygnus Solutions
 15.1712 - 
 15.1713 -    Permission is hereby granted, free of charge, to any person obtaining
 15.1714 -    a copy of this software and associated documentation files (the
 15.1715 -@@ -164,6 +164,12 @@
 15.1716 - #endif
 15.1717 - #endif
 15.1718 - 
 15.1719 -+#ifdef S390
 15.1720 -+#if defined (__s390x__)
 15.1721 -+#define S390X
 15.1722 -+#endif
 15.1723 -+#endif
 15.1724 -+
 15.1725 - #ifndef LIBFFI_ASM
 15.1726 - 
 15.1727 - /* ---- Generic type definitions ----------------------------------------- */
 15.1728 -@@ -189,16 +195,23 @@
 15.1729 - #endif
 15.1730 - #endif
 15.1731 - 
 15.1732 --  /* ---- Intel x86 ---------------- */
 15.1733 --#ifdef X86
 15.1734 -+  /* ---- Intel x86 Win32 ---------- */
 15.1735 -+#ifdef X86_WIN32
 15.1736 -   FFI_SYSV,
 15.1737 -+  FFI_STDCALL,
 15.1738 -+  /* TODO: Add fastcall support for the sake of completeness */
 15.1739 -   FFI_DEFAULT_ABI = FFI_SYSV,
 15.1740 - #endif
 15.1741 - 
 15.1742 --  /* ---- Intel x86 Win32 ---------- */
 15.1743 --#ifdef X86_WIN32
 15.1744 -+  /* ---- Intel x86 and AMD x86-64 - */
 15.1745 -+#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
 15.1746 -   FFI_SYSV,
 15.1747 -+  FFI_UNIX64,   /* Unix variants all use the same ABI for x86-64  */
 15.1748 -+#ifdef __i386__
 15.1749 -   FFI_DEFAULT_ABI = FFI_SYSV,
 15.1750 -+#else
 15.1751 -+  FFI_DEFAULT_ABI = FFI_UNIX64,
 15.1752 -+#endif
 15.1753 - #endif
 15.1754 - 
 15.1755 -   /* ---- Intel ia64 ---------------- */
 15.1756 -@@ -251,6 +264,18 @@
 15.1757 -   FFI_DEFAULT_ABI = FFI_SYSV,
 15.1758 - #endif
 15.1759 - 
 15.1760 -+  /* ---- S390 --------------------- */
 15.1761 -+#ifdef S390
 15.1762 -+  FFI_SYSV,
 15.1763 -+  FFI_DEFAULT_ABI = FFI_SYSV,
 15.1764 -+#endif
 15.1765 -+
 15.1766 -+  /* ---- SuperH ------------------- */
 15.1767 -+#ifdef SH
 15.1768 -+  FFI_SYSV,
 15.1769 -+  FFI_DEFAULT_ABI = FFI_SYSV,
 15.1770 -+#endif
 15.1771 -+
 15.1772 -   /* Leave this for debugging purposes */
 15.1773 -   FFI_LAST_ABI
 15.1774 - 
 15.1775 -@@ -264,7 +289,7 @@
 15.1776 -   /*@null@*/ struct _ffi_type **elements;
 15.1777 - } ffi_type;
 15.1778 - 
 15.1779 --/* These are defined in ffi.c */
 15.1780 -+/* These are defined in types.c */
 15.1781 - extern ffi_type ffi_type_void;
 15.1782 - extern ffi_type ffi_type_uint8;
 15.1783 - extern ffi_type ffi_type_sint8;
 15.1784 -@@ -373,13 +398,7 @@
 15.1785 - 
 15.1786 - /* ---- Definitions for closures ----------------------------------------- */
 15.1787 - 
 15.1788 --#ifdef X86
 15.1789 --
 15.1790 --#define FFI_CLOSURES 1		/* x86 supports closures */
 15.1791 --#define FFI_TRAMPOLINE_SIZE 10
 15.1792 --#define FFI_NATIVE_RAW_API 1	/* and has native raw api support */
 15.1793 --
 15.1794 --#elif defined(X86_WIN32)
 15.1795 -+#ifdef __i386__
 15.1796 - 
 15.1797 - #define FFI_CLOSURES 1		/* x86 supports closures */
 15.1798 - #define FFI_TRAMPOLINE_SIZE 10
 15.1799 -@@ -424,6 +443,40 @@
 15.1800 - #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */ 
 15.1801 - #define FFI_NATIVE_RAW_API 0
 15.1802 - 
 15.1803 -+#elif defined(SPARC64)
 15.1804 -+
 15.1805 -+#define FFI_CLOSURES 1
 15.1806 -+#define FFI_TRAMPOLINE_SIZE 24
 15.1807 -+#define FFI_NATIVE_RAW_API 0
 15.1808 -+
 15.1809 -+#elif defined(SPARC)
 15.1810 -+
 15.1811 -+#define FFI_CLOSURES 1
 15.1812 -+#define FFI_TRAMPOLINE_SIZE 16
 15.1813 -+#define FFI_NATIVE_RAW_API 0
 15.1814 -+
 15.1815 -+#elif defined(S390)
 15.1816 -+
 15.1817 -+#define FFI_CLOSURES 1
 15.1818 -+#ifdef S390X
 15.1819 -+#define FFI_TRAMPOLINE_SIZE 32
 15.1820 -+#else
 15.1821 -+#define FFI_TRAMPOLINE_SIZE 16
 15.1822 -+#endif
 15.1823 -+#define FFI_NATIVE_RAW_API 0
 15.1824 -+
 15.1825 -+#elif defined(SH)
 15.1826 -+
 15.1827 -+#define FFI_CLOSURES 1
 15.1828 -+#define FFI_TRAMPOLINE_SIZE 16
 15.1829 -+#define FFI_NATIVE_RAW_API 0
 15.1830 -+
 15.1831 -+#elif defined(__x86_64__)
 15.1832 -+
 15.1833 -+#define FFI_CLOSURES 1
 15.1834 -+#define FFI_TRAMPOLINE_SIZE 24
 15.1835 -+#define FFI_NATIVE_RAW_API 0
 15.1836 -+
 15.1837 - #else 
 15.1838 - 
 15.1839 - #define FFI_CLOSURES 0
 15.1840 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/ffi.c gcc/libffi/src/arm/ffi.c
 15.1841 ---- gcc-3.2.2.orig/libffi/src/arm/ffi.c	Sat Mar  3 07:21:23 2001
 15.1842 -+++ gcc/libffi/src/arm/ffi.c	Fri Jul 19 08:08:30 2002
 15.1843 -@@ -36,13 +36,10 @@
 15.1844 - /*@=exportheader@*/
 15.1845 - {
 15.1846 -   register unsigned int i;
 15.1847 --  register int tmp;
 15.1848 --  register unsigned int avn;
 15.1849 -   register void **p_argv;
 15.1850 -   register char *argp;
 15.1851 -   register ffi_type **p_arg;
 15.1852 - 
 15.1853 --  tmp = 0;
 15.1854 -   argp = stack;
 15.1855 - 
 15.1856 -   if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
 15.1857 -@@ -50,11 +47,10 @@
 15.1858 -     argp += 4;
 15.1859 -   }
 15.1860 - 
 15.1861 --  avn = ecif->cif->nargs;
 15.1862 -   p_argv = ecif->avalue;
 15.1863 - 
 15.1864 -   for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
 15.1865 --       (i != 0) && (avn != 0);
 15.1866 -+       (i != 0);
 15.1867 -        i--, p_arg++)
 15.1868 -     {
 15.1869 -       size_t z;
 15.1870 -@@ -64,9 +60,6 @@
 15.1871 - 	argp = (char *) ALIGN(argp, (*p_arg)->alignment);
 15.1872 -       }
 15.1873 - 
 15.1874 --      if (avn != 0) 
 15.1875 --	{
 15.1876 --	  avn--;
 15.1877 - 	  z = (*p_arg)->size;
 15.1878 - 	  if (z < sizeof(int))
 15.1879 - 	    {
 15.1880 -@@ -107,7 +100,6 @@
 15.1881 - 	    }
 15.1882 - 	  p_argv++;
 15.1883 - 	  argp += z;
 15.1884 --	}
 15.1885 -     }
 15.1886 -   
 15.1887 -   return;
 15.1888 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/sysv.S gcc/libffi/src/arm/sysv.S
 15.1889 ---- gcc-3.2.2.orig/libffi/src/arm/sysv.S	Sat Mar  3 07:21:23 2001
 15.1890 -+++ gcc/libffi/src/arm/sysv.S	Mon Sep 30 03:08:58 2002
 15.1891 -@@ -28,8 +28,15 @@
 15.1892 - #ifdef HAVE_MACHINE_ASM_H
 15.1893 - #include <machine/asm.h>
 15.1894 - #else
 15.1895 --/* XXX these lose for some platforms, I'm sure. */
 15.1896 -+#ifdef __USER_LABEL_PREFIX__
 15.1897 -+#define CONCAT1(a, b) CONCAT2(a, b)
 15.1898 -+#define CONCAT2(a, b) a ## b
 15.1899 -+
 15.1900 -+/* Use the right prefix for global labels.  */
 15.1901 -+#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
 15.1902 -+#else
 15.1903 - #define CNAME(x) x
 15.1904 -+#endif
 15.1905 - #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
 15.1906 - #endif
 15.1907 - 	
 15.1908 -@@ -96,12 +103,20 @@
 15.1909 - 
 15.1910 - # return FLOAT
 15.1911 - 	cmp     a4, #FFI_TYPE_FLOAT
 15.1912 -+#ifdef __SOFTFP__
 15.1913 -+	streq	a1, [a3]
 15.1914 -+#else
 15.1915 - 	stfeqs  f0, [a3]
 15.1916 -+#endif
 15.1917 - 	beq     epilogue
 15.1918 - 
 15.1919 - # return DOUBLE or LONGDOUBLE
 15.1920 - 	cmp     a4, #FFI_TYPE_DOUBLE
 15.1921 -+#ifdef __SOFTFP__
 15.1922 -+	stmeqia	a3, {a1, a2}
 15.1923 -+#else
 15.1924 - 	stfeqd  f0, [a3]
 15.1925 -+#endif
 15.1926 - 
 15.1927 - epilogue:
 15.1928 -         ldmfd sp!, {a1-a4, fp, pc}
 15.1929 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/java_raw_api.c gcc/libffi/src/java_raw_api.c
 15.1930 ---- gcc-3.2.2.orig/libffi/src/java_raw_api.c	Tue Apr  9 07:31:14 2002
 15.1931 -+++ gcc/libffi/src/java_raw_api.c	Tue Oct  8 23:55:02 2002
 15.1932 -@@ -81,21 +81,14 @@
 15.1933 - 	{
 15.1934 - 	case FFI_TYPE_UINT8:
 15.1935 - 	case FFI_TYPE_SINT8:
 15.1936 --	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);
 15.1937 -+	  *args = (void*) ((char*)(raw++) + 3);
 15.1938 - 	  break;
 15.1939 - 	  
 15.1940 - 	case FFI_TYPE_UINT16:
 15.1941 - 	case FFI_TYPE_SINT16:
 15.1942 --	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2);
 15.1943 -+	  *args = (void*) ((char*)(raw++) + 2);
 15.1944 - 	  break;
 15.1945 - 
 15.1946 --#if SIZEOF_ARG >= 4	  
 15.1947 --	case FFI_TYPE_UINT32:
 15.1948 --	case FFI_TYPE_SINT32:
 15.1949 --	  *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4);
 15.1950 --	  break;
 15.1951 --#endif
 15.1952 --	
 15.1953 - #if SIZEOF_ARG == 8	  
 15.1954 - 	case FFI_TYPE_UINT64:
 15.1955 - 	case FFI_TYPE_SINT64:
 15.1956 -@@ -157,31 +150,54 @@
 15.1957 -       switch ((*tp)->type)
 15.1958 - 	{
 15.1959 - 	case FFI_TYPE_UINT8:
 15.1960 -+#if WORDS_BIGENDIAN
 15.1961 -+	  *(UINT32*)(raw++) = *(UINT8*) (*args);
 15.1962 -+#else
 15.1963 - 	  (raw++)->uint = *(UINT8*) (*args);
 15.1964 -+#endif
 15.1965 - 	  break;
 15.1966 - 
 15.1967 - 	case FFI_TYPE_SINT8:
 15.1968 -+#if WORDS_BIGENDIAN
 15.1969 -+	  *(SINT32*)(raw++) = *(SINT8*) (*args);
 15.1970 -+#else
 15.1971 - 	  (raw++)->sint = *(SINT8*) (*args);
 15.1972 -+#endif
 15.1973 - 	  break;
 15.1974 - 
 15.1975 - 	case FFI_TYPE_UINT16:
 15.1976 -+#if WORDS_BIGENDIAN
 15.1977 -+	  *(UINT32*)(raw++) = *(UINT16*) (*args);
 15.1978 -+#else
 15.1979 - 	  (raw++)->uint = *(UINT16*) (*args);
 15.1980 -+#endif
 15.1981 - 	  break;
 15.1982 - 
 15.1983 - 	case FFI_TYPE_SINT16:
 15.1984 -+#if WORDS_BIGENDIAN
 15.1985 -+	  *(SINT32*)(raw++) = *(SINT16*) (*args);
 15.1986 -+#else
 15.1987 - 	  (raw++)->sint = *(SINT16*) (*args);
 15.1988 -+#endif
 15.1989 - 	  break;
 15.1990 - 
 15.1991 --#if SIZEOF_ARG >= 4
 15.1992 - 	case FFI_TYPE_UINT32:
 15.1993 -+#if WORDS_BIGENDIAN
 15.1994 -+	  *(UINT32*)(raw++) = *(UINT32*) (*args);
 15.1995 -+#else
 15.1996 - 	  (raw++)->uint = *(UINT32*) (*args);
 15.1997 -+#endif
 15.1998 - 	  break;
 15.1999 - 
 15.2000 - 	case FFI_TYPE_SINT32:
 15.2001 -+#if WORDS_BIGENDIAN
 15.2002 -+	  *(SINT32*)(raw++) = *(SINT32*) (*args);
 15.2003 -+#else
 15.2004 - 	  (raw++)->sint = *(SINT32*) (*args);
 15.2005 --	  break;
 15.2006 - #endif
 15.2007 --        case FFI_TYPE_FLOAT:
 15.2008 -+	  break;
 15.2009 -+
 15.2010 -+	case FFI_TYPE_FLOAT:
 15.2011 - 	  (raw++)->flt = *(FLOAT32*) (*args);
 15.2012 - 	  break;
 15.2013 - 
 15.2014 -@@ -211,6 +227,55 @@
 15.2015 - 
 15.2016 - #if !FFI_NATIVE_RAW_API
 15.2017 - 
 15.2018 -+static void
 15.2019 -+ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
 15.2020 -+{
 15.2021 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
 15.2022 -+  switch (cif->rtype->type)
 15.2023 -+    {
 15.2024 -+    case FFI_TYPE_UINT8:
 15.2025 -+    case FFI_TYPE_UINT16:
 15.2026 -+    case FFI_TYPE_UINT32:
 15.2027 -+      *(UINT64 *)rvalue <<= 32;
 15.2028 -+      break;
 15.2029 -+
 15.2030 -+    case FFI_TYPE_SINT8:
 15.2031 -+    case FFI_TYPE_SINT16:
 15.2032 -+    case FFI_TYPE_SINT32:
 15.2033 -+    case FFI_TYPE_INT:
 15.2034 -+      *(SINT64 *)rvalue <<= 32;
 15.2035 -+      break;
 15.2036 -+
 15.2037 -+    default:
 15.2038 -+      break;
 15.2039 -+    }
 15.2040 -+#endif
 15.2041 -+}
 15.2042 -+
 15.2043 -+static void
 15.2044 -+ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
 15.2045 -+{
 15.2046 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
 15.2047 -+  switch (cif->rtype->type)
 15.2048 -+    {
 15.2049 -+    case FFI_TYPE_UINT8:
 15.2050 -+    case FFI_TYPE_UINT16:
 15.2051 -+    case FFI_TYPE_UINT32:
 15.2052 -+      *(UINT64 *)rvalue >>= 32;
 15.2053 -+      break;
 15.2054 -+
 15.2055 -+    case FFI_TYPE_SINT8:
 15.2056 -+    case FFI_TYPE_SINT16:
 15.2057 -+    case FFI_TYPE_SINT32:
 15.2058 -+    case FFI_TYPE_INT:
 15.2059 -+      *(SINT64 *)rvalue >>= 32;
 15.2060 -+      break;
 15.2061 -+
 15.2062 -+    default:
 15.2063 -+      break;
 15.2064 -+    }
 15.2065 -+#endif
 15.2066 -+}
 15.2067 - 
 15.2068 - /* This is a generic definition of ffi_raw_call, to be used if the
 15.2069 -  * native system does not provide a machine-specific implementation.
 15.2070 -@@ -227,6 +292,7 @@
 15.2071 -   void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
 15.2072 -   ffi_java_raw_to_ptrarray (cif, raw, avalue);
 15.2073 -   ffi_call (cif, fn, rvalue, avalue);
 15.2074 -+  ffi_java_rvalue_to_raw (cif, rvalue);
 15.2075 - }
 15.2076 - 
 15.2077 - #if FFI_CLOSURES		/* base system provides closures */
 15.2078 -@@ -240,6 +306,7 @@
 15.2079 - 
 15.2080 -   ffi_java_ptrarray_to_raw (cif, avalue, raw);
 15.2081 -   (*cl->fun) (cif, rvalue, raw, cl->user_data);
 15.2082 -+  ffi_java_raw_to_rvalue (cif, rvalue);
 15.2083 - }
 15.2084 - 
 15.2085 - /* Again, here is the generic version of ffi_prep_raw_closure, which
 15.2086 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/m68k/ffi.c gcc/libffi/src/m68k/ffi.c
 15.2087 ---- gcc-3.2.2.orig/libffi/src/m68k/ffi.c	Sun Aug  8 22:27:19 1999
 15.2088 -+++ gcc/libffi/src/m68k/ffi.c	Fri Jul 19 08:08:30 2002
 15.2089 -@@ -16,14 +16,11 @@
 15.2090 - ffi_prep_args (void *stack, extended_cif *ecif)
 15.2091 - {
 15.2092 -   unsigned int i;
 15.2093 --  int tmp;
 15.2094 --  unsigned int avn;
 15.2095 -   void **p_argv;
 15.2096 -   char *argp;
 15.2097 -   ffi_type **p_arg;
 15.2098 -   void *struct_value_ptr;
 15.2099 - 
 15.2100 --  tmp = 0;
 15.2101 -   argp = stack;
 15.2102 - 
 15.2103 -   if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
 15.2104 -@@ -32,11 +29,10 @@
 15.2105 -   else
 15.2106 -     struct_value_ptr = NULL;
 15.2107 - 
 15.2108 --  avn = ecif->cif->nargs;
 15.2109 -   p_argv = ecif->avalue;
 15.2110 - 
 15.2111 -   for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
 15.2112 --       i != 0 && avn != 0;
 15.2113 -+       i != 0;
 15.2114 -        i--, p_arg++)
 15.2115 -     {
 15.2116 -       size_t z;
 15.2117 -@@ -45,9 +41,6 @@
 15.2118 -       if (((*p_arg)->alignment - 1) & (unsigned) argp)
 15.2119 - 	argp = (char *) ALIGN (argp, (*p_arg)->alignment);
 15.2120 - 
 15.2121 --      if (avn != 0) 
 15.2122 --	{
 15.2123 --	  avn--;
 15.2124 - 	  z = (*p_arg)->size;
 15.2125 - 	  if (z < sizeof (int))
 15.2126 - 	    {
 15.2127 -@@ -82,7 +75,6 @@
 15.2128 - 	    memcpy (argp, *p_argv, z);
 15.2129 - 	  p_argv++;
 15.2130 - 	  argp += z;
 15.2131 --	}
 15.2132 -     }
 15.2133 - 
 15.2134 -   return struct_value_ptr;
 15.2135 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/mips/ffi.c gcc/libffi/src/mips/ffi.c
 15.2136 ---- gcc-3.2.2.orig/libffi/src/mips/ffi.c	Sat Mar  3 07:21:23 2001
 15.2137 -+++ gcc/libffi/src/mips/ffi.c	Fri Jul 19 08:08:31 2002
 15.2138 -@@ -23,6 +23,7 @@
 15.2139 -    OTHER DEALINGS IN THE SOFTWARE.
 15.2140 -    ----------------------------------------------------------------------- */
 15.2141 - 
 15.2142 -+#include <sgidefs.h>
 15.2143 - #include <ffi.h>
 15.2144 - #include <ffi_common.h>
 15.2145 - 
 15.2146 -@@ -50,7 +51,6 @@
 15.2147 - 			  int flags)
 15.2148 - {
 15.2149 -   register int i;
 15.2150 --  register int avn;
 15.2151 -   register void **p_argv;
 15.2152 -   register char *argp;
 15.2153 -   register ffi_type **p_arg;
 15.2154 -@@ -80,12 +80,9 @@
 15.2155 -       FIX_ARGP;
 15.2156 -     }
 15.2157 - 
 15.2158 --  avn = ecif->cif->nargs;
 15.2159 -   p_argv = ecif->avalue;
 15.2160 - 
 15.2161 --  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
 15.2162 --       i && avn;
 15.2163 --       i--, p_arg++)
 15.2164 -+  for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
 15.2165 -     {
 15.2166 -       size_t z;
 15.2167 - 
 15.2168 -@@ -101,9 +98,6 @@
 15.2169 - #define OFFSET sizeof(int)
 15.2170 - #endif      
 15.2171 - 
 15.2172 --      if (avn) 
 15.2173 --	{
 15.2174 --	  avn--;
 15.2175 - 	  z = (*p_arg)->size;
 15.2176 - 	  if (z < sizeof(SLOT_TYPE_UNSIGNED))
 15.2177 - 	    {
 15.2178 -@@ -179,7 +173,6 @@
 15.2179 - 	  p_argv++;
 15.2180 - 	  argp += z;
 15.2181 - 	  FIX_ARGP;
 15.2182 --	}
 15.2183 -     }
 15.2184 -   
 15.2185 -   return;
 15.2186 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/powerpc/darwin.S gcc/libffi/src/powerpc/darwin.S
 15.2187 ---- gcc-3.2.2.orig/libffi/src/powerpc/darwin.S	Sat Jan 19 01:22:34 2002
 15.2188 -+++ gcc/libffi/src/powerpc/darwin.S	Thu Jan 23 03:21:55 2003
 15.2189 -@@ -3,8 +3,6 @@
 15.2190 -    
 15.2191 -    PowerPC Assembly glue.
 15.2192 - 
 15.2193 --   $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $
 15.2194 --
 15.2195 -    Permission is hereby granted, free of charge, to any person obtaining
 15.2196 -    a copy of this software and associated documentation files (the
 15.2197 -    ``Software''), to deal in the Software without restriction, including
 15.2198 -@@ -39,30 +37,34 @@
 15.2199 - .text
 15.2200 - 	.align 2
 15.2201 - _ffi_call_DARWIN:
 15.2202 --	mr      r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
 15.2203 -+LFB0:	
 15.2204 -+	mr      r12,r8		/* We only need r12 until the call,
 15.2205 -+				so it doesn't have to be saved...  */
 15.2206 -+LFB1:	
 15.2207 - 	/* Save the old stack pointer as AP.  */
 15.2208 - 	mr	r8,r1
 15.2209 --
 15.2210 -+LCFI0:	
 15.2211 - 	/* Allocate the stack space we need.  */
 15.2212 - 	stwux	r1,r1,r4	
 15.2213 - 	
 15.2214 - 	/* Save registers we use.  */
 15.2215 - 	mflr	r9
 15.2216 - 
 15.2217 --	stw	r28,-16(r8)
 15.2218 -+	stw	r28,-16(r8)	
 15.2219 - 	stw	r29,-12(r8)
 15.2220 - 	stw	r30, -8(r8)
 15.2221 - 	stw	r31, -4(r8)
 15.2222 --	
 15.2223 --	stw	r9,  8(r8)
 15.2224 -+
 15.2225 -+	stw	r9,  8(r8)	
 15.2226 - 	stw	r2, 20(r1)
 15.2227 -+LCFI1:	
 15.2228 - 
 15.2229 - 	/* Save arguments over call...  */
 15.2230 --	mr	r31,r5	/* flags, */
 15.2231 --	mr	r30,r6	/* rvalue, */
 15.2232 --	mr	r29,r7	/* function address, */
 15.2233 --	mr	r28,r8	/* our AP. */
 15.2234 --		
 15.2235 -+	mr	r31,r5	/* flags,  */
 15.2236 -+	mr	r30,r6	/* rvalue,  */
 15.2237 -+	mr	r29,r7	/* function address,  */
 15.2238 -+	mr	r28,r8	/* our AP.  */
 15.2239 -+LCFI2:		
 15.2240 - 	/* Call ffi_prep_args.  */
 15.2241 - 	mr	r4,r1
 15.2242 - 	li	r9,0
 15.2243 -@@ -145,7 +147,8 @@
 15.2244 - L(float_return_value):
 15.2245 - 	stfs	f1,0(r30)
 15.2246 - 	b	L(done_return_value)
 15.2247 --//END(_ffi_call_DARWIN)
 15.2248 -+LFE1:	
 15.2249 -+/* END(_ffi_call_DARWIN)  */
 15.2250 - 
 15.2251 - /* Provide a null definition of _ffi_call_AIX.  */
 15.2252 - .text
 15.2253 -@@ -155,5 +158,61 @@
 15.2254 - 	.align 2
 15.2255 - _ffi_call_AIX:
 15.2256 - 	blr
 15.2257 --//END(_ffi_call_AIX)
 15.2258 -+/* END(_ffi_call_AIX)  */
 15.2259 - 
 15.2260 -+.data
 15.2261 -+.section __TEXT,__eh_frame
 15.2262 -+Lframe1:
 15.2263 -+	.set	L$set$0,LECIE1-LSCIE1
 15.2264 -+	.long	L$set$0	; Length of Common Information Entry
 15.2265 -+LSCIE1:
 15.2266 -+	.long	0x0	; CIE Identifier Tag
 15.2267 -+	.byte	0x1	; CIE Version
 15.2268 -+	.ascii	"zR\0"	; CIE Augmentation
 15.2269 -+	.byte	0x1	; uleb128 0x1; CIE Code Alignment Factor
 15.2270 -+	.byte	0x7c	; sleb128 -4; CIE Data Alignment Factor
 15.2271 -+	.byte	0x41	; CIE RA Column
 15.2272 -+	.byte   0x1     ; uleb128 0x1; Augmentation size
 15.2273 -+	.byte   0x10    ; FDE Encoding (pcrel)
 15.2274 -+	.byte	0xc	; DW_CFA_def_cfa
 15.2275 -+	.byte	0x1	; uleb128 0x1
 15.2276 -+	.byte	0x0	; uleb128 0x0
 15.2277 -+	.align	2
 15.2278 -+LECIE1:
 15.2279 -+LSFDE1:
 15.2280 -+	.set	L$set$1,LEFDE1-LASFDE1
 15.2281 -+	.long	L$set$1	; FDE Length
 15.2282 -+LASFDE1:
 15.2283 -+	.set	L$set$2,LASFDE1-Lframe1
 15.2284 -+	.long	L$set$2	; FDE CIE offset
 15.2285 -+	.long	LFB0-.	; FDE initial location
 15.2286 -+	.set	L$set$3,LFE1-LFB0
 15.2287 -+	.long	L$set$3	; FDE address range
 15.2288 -+	.byte   0x0     ; uleb128 0x0; Augmentation size
 15.2289 -+	.byte	0x4	; DW_CFA_advance_loc4
 15.2290 -+	.set	L$set$4,LCFI0-LFB1
 15.2291 -+	.long	L$set$4
 15.2292 -+	.byte	0xd	; DW_CFA_def_cfa_register
 15.2293 -+	.byte	0x08	; uleb128 0x08 
 15.2294 -+	.byte	0x4	; DW_CFA_advance_loc4
 15.2295 -+	.set	L$set$5,LCFI1-LCFI0
 15.2296 -+	.long	L$set$5
 15.2297 -+	.byte   0x11    ; DW_CFA_offset_extended_sf
 15.2298 -+	.byte	0x41	; uleb128 0x41
 15.2299 -+	.byte   0x7e    ; sleb128 -2
 15.2300 -+	.byte	0x9f	; DW_CFA_offset, column 0x1f 
 15.2301 -+	.byte	0x1	; uleb128 0x1 
 15.2302 -+	.byte	0x9e	; DW_CFA_offset, column 0x1e
 15.2303 -+	.byte	0x2	; uleb128 0x2
 15.2304 -+	.byte	0x9d	; DW_CFA_offset, column 0x1d 
 15.2305 -+	.byte	0x3	; uleb128 0x3 
 15.2306 -+	.byte	0x9c	; DW_CFA_offset, column 0x1c 
 15.2307 -+	.byte	0x4	; uleb128 0x4
 15.2308 -+	.byte	0x4	; DW_CFA_advance_loc4 
 15.2309 -+	.set	L$set$6,LCFI2-LCFI1
 15.2310 -+	.long	L$set$6
 15.2311 -+	.byte	0xd	; DW_CFA_def_cfa_register 
 15.2312 -+	.byte	0x1c	; uleb128 0x1c 
 15.2313 -+	.align 2
 15.2314 -+LEFDE1:
 15.2315 -+	
 15.2316 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/prep_cif.c gcc/libffi/src/prep_cif.c
 15.2317 ---- gcc-3.2.2.orig/libffi/src/prep_cif.c	Sat Mar  3 07:21:22 2001
 15.2318 -+++ gcc/libffi/src/prep_cif.c	Mon Sep 30 20:59:42 2002
 15.2319 -@@ -103,7 +103,8 @@
 15.2320 -   /* Perform a sanity check on the return type */
 15.2321 -   FFI_ASSERT(ffi_type_test(cif->rtype));
 15.2322 - 
 15.2323 --#ifndef M68K
 15.2324 -+  /* x86-64 and s390 stack space allocation is handled in prep_machdep.  */
 15.2325 -+#if !defined M68K && !defined __x86_64__ && !defined S390
 15.2326 -   /* Make space for the return structure pointer */
 15.2327 -   if (cif->rtype->type == FFI_TYPE_STRUCT
 15.2328 - #ifdef SPARC
 15.2329 -@@ -122,6 +123,7 @@
 15.2330 -       if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
 15.2331 - 	return FFI_BAD_TYPEDEF;
 15.2332 - 
 15.2333 -+#if !defined __x86_64__ && !defined S390
 15.2334 - #ifdef SPARC
 15.2335 -       if (((*ptr)->type == FFI_TYPE_STRUCT
 15.2336 - 	   && ((*ptr)->size > 16 || cif->abi != FFI_V9))
 15.2337 -@@ -137,6 +139,7 @@
 15.2338 - 	  
 15.2339 - 	  bytes += STACK_ARG_SIZE((*ptr)->size);
 15.2340 - 	}
 15.2341 -+#endif
 15.2342 -     }
 15.2343 - 
 15.2344 -   cif->bytes = bytes;
 15.2345 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/ffi.c gcc/libffi/src/s390/ffi.c
 15.2346 ---- gcc-3.2.2.orig/libffi/src/s390/ffi.c	Thu Jan  1 09:00:00 1970
 15.2347 -+++ gcc/libffi/src/s390/ffi.c	Thu Feb  6 08:58:57 2003
 15.2348 -@@ -0,0 +1,753 @@
 15.2349 -+/* -----------------------------------------------------------------------
 15.2350 -+   ffi.c - Copyright (c) 2000 Software AG
 15.2351 -+ 
 15.2352 -+   S390 Foreign Function Interface
 15.2353 -+ 
 15.2354 -+   Permission is hereby granted, free of charge, to any person obtaining
 15.2355 -+   a copy of this software and associated documentation files (the
 15.2356 -+   ``Software''), to deal in the Software without restriction, including
 15.2357 -+   without limitation the rights to use, copy, modify, merge, publish,
 15.2358 -+   distribute, sublicense, and/or sell copies of the Software, and to
 15.2359 -+   permit persons to whom the Software is furnished to do so, subject to
 15.2360 -+   the following conditions:
 15.2361 -+ 
 15.2362 -+   The above copyright notice and this permission notice shall be included
 15.2363 -+   in all copies or substantial portions of the Software.
 15.2364 -+ 
 15.2365 -+   THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
 15.2366 -+   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 15.2367 -+   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 15.2368 -+   IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
 15.2369 -+   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 15.2370 -+   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 15.2371 -+   OTHER DEALINGS IN THE SOFTWARE.
 15.2372 -+   ----------------------------------------------------------------------- */
 15.2373 -+/*====================================================================*/
 15.2374 -+/*                          Includes                                  */
 15.2375 -+/*                          --------                                  */
 15.2376 -+/*====================================================================*/
 15.2377 -+ 
 15.2378 -+#include <ffi.h>
 15.2379 -+#include <ffi_common.h>
 15.2380 -+ 
 15.2381 -+#include <stdlib.h>
 15.2382 -+#include <stdio.h>
 15.2383 -+ 
 15.2384 -+/*====================== End of Includes =============================*/
 15.2385 -+ 
 15.2386 -+/*====================================================================*/
 15.2387 -+/*                           Defines                                  */
 15.2388 -+/*                           -------                                  */
 15.2389 -+/*====================================================================*/
 15.2390 -+
 15.2391 -+/* Maximum number of GPRs available for argument passing.  */ 
 15.2392 -+#define MAX_GPRARGS 5
 15.2393 -+
 15.2394 -+/* Maximum number of FPRs available for argument passing.  */ 
 15.2395 -+#ifdef __s390x__
 15.2396 -+#define MAX_FPRARGS 4
 15.2397 -+#else
 15.2398 -+#define MAX_FPRARGS 2
 15.2399 -+#endif
 15.2400 -+
 15.2401 -+/* Round to multiple of 16.  */
 15.2402 -+#define ROUND_SIZE(size) (((size) + 15) & ~15)
 15.2403 -+
 15.2404 -+/* If these values change, sysv.S must be adapted!  */
 15.2405 -+#define FFI390_RET_VOID		0
 15.2406 -+#define FFI390_RET_STRUCT	1
 15.2407 -+#define FFI390_RET_FLOAT	2
 15.2408 -+#define FFI390_RET_DOUBLE	3
 15.2409 -+#define FFI390_RET_INT32	4
 15.2410 -+#define FFI390_RET_INT64	5
 15.2411 -+
 15.2412 -+/*===================== End of Defines ===============================*/
 15.2413 -+ 
 15.2414 -+/*====================================================================*/
 15.2415 -+/*                          Prototypes                                */
 15.2416 -+/*                          ----------                                */
 15.2417 -+/*====================================================================*/
 15.2418 -+ 
 15.2419 -+static void ffi_prep_args (unsigned char *, extended_cif *);
 15.2420 -+static int ffi_check_float_struct (ffi_type *);
 15.2421 -+void
 15.2422 -+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
 15.2423 -+__attribute__ ((visibility ("hidden")))
 15.2424 -+#endif
 15.2425 -+ffi_closure_helper_SYSV (ffi_closure *, unsigned long *, 
 15.2426 -+			 unsigned long long *, unsigned long *);
 15.2427 -+
 15.2428 -+/*====================== End of Prototypes ===========================*/
 15.2429 -+ 
 15.2430 -+/*====================================================================*/
 15.2431 -+/*                          Externals                                 */
 15.2432 -+/*                          ---------                                 */
 15.2433 -+/*====================================================================*/
 15.2434 -+ 
 15.2435 -+extern void ffi_call_SYSV(unsigned,
 15.2436 -+			  extended_cif *,
 15.2437 -+			  void (*)(unsigned char *, extended_cif *),
 15.2438 -+			  unsigned,
 15.2439 -+			  void *,
 15.2440 -+			  void (*fn)());
 15.2441 -+
 15.2442 -+extern void ffi_closure_SYSV(void);
 15.2443 -+ 
 15.2444 -+/*====================== End of Externals ============================*/
 15.2445 -+ 
 15.2446 -+/*====================================================================*/
 15.2447 -+/*                                                                    */
 15.2448 -+/* Name     - ffi_check_struct_type.                                  */
 15.2449 -+/*                                                                    */
 15.2450 -+/* Function - Determine if a structure can be passed within a         */
 15.2451 -+/*            general purpose or floating point register.             */
 15.2452 -+/*                                                                    */
 15.2453 -+/*====================================================================*/
 15.2454 -+ 
 15.2455 -+static int
 15.2456 -+ffi_check_struct_type (ffi_type *arg)
 15.2457 -+{
 15.2458 -+  size_t size = arg->size;
 15.2459 -+
 15.2460 -+  /* If the struct has just one element, look at that element
 15.2461 -+     to find out whether to consider the struct as floating point.  */
 15.2462 -+  while (arg->type == FFI_TYPE_STRUCT 
 15.2463 -+         && arg->elements[0] && !arg->elements[1])
 15.2464 -+    arg = arg->elements[0];
 15.2465 -+
 15.2466 -+  /* Structs of size 1, 2, 4, and 8 are passed in registers,
 15.2467 -+     just like the corresponding int/float types.  */
 15.2468 -+  switch (size)
 15.2469 -+    {
 15.2470 -+      case 1:
 15.2471 -+        return FFI_TYPE_UINT8;
 15.2472 -+
 15.2473 -+      case 2:
 15.2474 -+        return FFI_TYPE_UINT16;
 15.2475 -+
 15.2476 -+      case 4:
 15.2477 -+	if (arg->type == FFI_TYPE_FLOAT)
 15.2478 -+          return FFI_TYPE_FLOAT;
 15.2479 -+	else
 15.2480 -+	  return FFI_TYPE_UINT32;
 15.2481 -+
 15.2482 -+      case 8:
 15.2483 -+	if (arg->type == FFI_TYPE_DOUBLE)
 15.2484 -+          return FFI_TYPE_DOUBLE;
 15.2485 -+	else
 15.2486 -+	  return FFI_TYPE_UINT64;
 15.2487 -+
 15.2488 -+      default:
 15.2489 -+	break;
 15.2490 -+    }
 15.2491 -+
 15.2492 -+  /* Other structs are passed via a pointer to the data.  */
 15.2493 -+  return FFI_TYPE_POINTER;
 15.2494 -+}
 15.2495 -+ 
 15.2496 -+/*======================== End of Routine ============================*/
 15.2497 -+ 
 15.2498 -+/*====================================================================*/
 15.2499 -+/*                                                                    */
 15.2500 -+/* Name     - ffi_prep_args.                                          */
 15.2501 -+/*                                                                    */
 15.2502 -+/* Function - Prepare parameters for call to function.                */
 15.2503 -+/*                                                                    */
 15.2504 -+/* ffi_prep_args is called by the assembly routine once stack space   */
 15.2505 -+/* has been allocated for the function's arguments.                   */
 15.2506 -+/*                                                                    */
 15.2507 -+/*====================================================================*/
 15.2508 -+ 
 15.2509 -+static void
 15.2510 -+ffi_prep_args (unsigned char *stack, extended_cif *ecif)
 15.2511 -+{
 15.2512 -+  /* The stack space will be filled with those areas:
 15.2513 -+
 15.2514 -+	FPR argument register save area     (highest addresses)
 15.2515 -+	GPR argument register save area
 15.2516 -+	temporary struct copies
 15.2517 -+	overflow argument area              (lowest addresses)
 15.2518 -+
 15.2519 -+     We set up the following pointers:
 15.2520 -+
 15.2521 -+        p_fpr: bottom of the FPR area (growing upwards)
 15.2522 -+	p_gpr: bottom of the GPR area (growing upwards)
 15.2523 -+	p_ov: bottom of the overflow area (growing upwards)
 15.2524 -+	p_struct: top of the struct copy area (growing downwards)
 15.2525 -+
 15.2526 -+     All areas are kept aligned to twice the word size.  */
 15.2527 -+
 15.2528 -+  int gpr_off = ecif->cif->bytes;
 15.2529 -+  int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long));
 15.2530 -+
 15.2531 -+  unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off);
 15.2532 -+  unsigned long *p_gpr = (unsigned long *)(stack + gpr_off);
 15.2533 -+  unsigned char *p_struct = (unsigned char *)p_gpr;
 15.2534 -+  unsigned long *p_ov = (unsigned long *)stack;
 15.2535 -+
 15.2536 -+  int n_fpr = 0;
 15.2537 -+  int n_gpr = 0;
 15.2538 -+  int n_ov = 0;
 15.2539 -+
 15.2540 -+  ffi_type **ptr;
 15.2541 -+  void **p_argv = ecif->avalue;
 15.2542 -+  int i;
 15.2543 -+ 
 15.2544 -+  /* If we returning a structure then we set the first parameter register
 15.2545 -+     to the address of where we are returning this structure.  */
 15.2546 -+
 15.2547 -+  if (ecif->cif->flags == FFI390_RET_STRUCT)
 15.2548 -+    p_gpr[n_gpr++] = (unsigned long) ecif->rvalue;
 15.2549 -+
 15.2550 -+  /* Now for the arguments.  */
 15.2551 -+ 
 15.2552 -+  for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs;
 15.2553 -+       i > 0;
 15.2554 -+       i--, ptr++, p_argv++)
 15.2555 -+    {
 15.2556 -+      void *arg = *p_argv;
 15.2557 -+      int type = (*ptr)->type;
 15.2558 -+
 15.2559 -+      /* Check how a structure type is passed.  */
 15.2560 -+      if (type == FFI_TYPE_STRUCT)
 15.2561 -+	{
 15.2562 -+	  type = ffi_check_struct_type (*ptr);
 15.2563 -+
 15.2564 -+	  /* If we pass the struct via pointer, copy the data.  */
 15.2565 -+	  if (type == FFI_TYPE_POINTER)
 15.2566 -+	    {
 15.2567 -+	      p_struct -= ROUND_SIZE ((*ptr)->size);
 15.2568 -+	      memcpy (p_struct, (char *)arg, (*ptr)->size);
 15.2569 -+	      arg = &p_struct;
 15.2570 -+	    }
 15.2571 -+	}
 15.2572 -+
 15.2573 -+      /* Pointers are passed like UINTs of the same size.  */
 15.2574 -+      if (type == FFI_TYPE_POINTER)
 15.2575 -+#ifdef __s390x__
 15.2576 -+	type = FFI_TYPE_UINT64;
 15.2577 -+#else
 15.2578 -+	type = FFI_TYPE_UINT32;
 15.2579 -+#endif
 15.2580 -+
 15.2581 -+      /* Now handle all primitive int/float data types.  */
 15.2582 -+      switch (type) 
 15.2583 -+	{
 15.2584 -+	  case FFI_TYPE_DOUBLE:
 15.2585 -+	    if (n_fpr < MAX_FPRARGS)
 15.2586 -+	      p_fpr[n_fpr++] = *(unsigned long long *) arg;
 15.2587 -+	    else
 15.2588 -+#ifdef __s390x__
 15.2589 -+	      p_ov[n_ov++] = *(unsigned long *) arg;
 15.2590 -+#else
 15.2591 -+	      p_ov[n_ov++] = ((unsigned long *) arg)[0],
 15.2592 -+	      p_ov[n_ov++] = ((unsigned long *) arg)[1];
 15.2593 -+#endif
 15.2594 -+	    break;
 15.2595 -+	
 15.2596 -+	  case FFI_TYPE_FLOAT:
 15.2597 -+	    if (n_fpr < MAX_FPRARGS)
 15.2598 -+	      p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32;
 15.2599 -+	    else
 15.2600 -+	      p_ov[n_ov++] = *(unsigned int *) arg;
 15.2601 -+	    break;
 15.2602 -+ 
 15.2603 -+	  case FFI_TYPE_UINT64:
 15.2604 -+	  case FFI_TYPE_SINT64:
 15.2605 -+#ifdef __s390x__
 15.2606 -+	    if (n_gpr < MAX_GPRARGS)
 15.2607 -+	      p_gpr[n_gpr++] = *(unsigned long *) arg;
 15.2608 -+	    else
 15.2609 -+	      p_ov[n_ov++] = *(unsigned long *) arg;
 15.2610 -+#else
 15.2611 -+	    if (n_gpr == MAX_GPRARGS-1)
 15.2612 -+	      n_gpr = MAX_GPRARGS;
 15.2613 -+	    if (n_gpr < MAX_GPRARGS)
 15.2614 -+	      p_gpr[n_gpr++] = ((unsigned long *) arg)[0],
 15.2615 -+	      p_gpr[n_gpr++] = ((unsigned long *) arg)[1];
 15.2616 -+	    else
 15.2617 -+	      p_ov[n_ov++] = ((unsigned long *) arg)[0],
 15.2618 -+	      p_ov[n_ov++] = ((unsigned long *) arg)[1];
 15.2619 -+#endif
 15.2620 -+	    break;
 15.2621 -+ 
 15.2622 -+	  case FFI_TYPE_UINT32:
 15.2623 -+	    if (n_gpr < MAX_GPRARGS)
 15.2624 -+	      p_gpr[n_gpr++] = *(unsigned int *) arg;
 15.2625 -+	    else
 15.2626 -+	      p_ov[n_ov++] = *(unsigned int *) arg;
 15.2627 -+	    break;
 15.2628 -+ 
 15.2629 -+	  case FFI_TYPE_INT:
 15.2630 -+	  case FFI_TYPE_SINT32:
 15.2631 -+	    if (n_gpr < MAX_GPRARGS)
 15.2632 -+	      p_gpr[n_gpr++] = *(signed int *) arg;
 15.2633 -+	    else
 15.2634 -+	      p_ov[n_ov++] = *(signed int *) arg;
 15.2635 -+	    break;
 15.2636 -+ 
 15.2637 -+	  case FFI_TYPE_UINT16:
 15.2638 -+	    if (n_gpr < MAX_GPRARGS)
 15.2639 -+	      p_gpr[n_gpr++] = *(unsigned short *) arg;
 15.2640 -+	    else
 15.2641 -+	      p_ov[n_ov++] = *(unsigned short *) arg;
 15.2642 -+	    break;
 15.2643 -+ 
 15.2644 -+	  case FFI_TYPE_SINT16:
 15.2645 -+	    if (n_gpr < MAX_GPRARGS)
 15.2646 -+	      p_gpr[n_gpr++] = *(signed short *) arg;
 15.2647 -+	    else
 15.2648 -+	      p_ov[n_ov++] = *(signed short *) arg;
 15.2649 -+	    break;
 15.2650 -+
 15.2651 -+	  case FFI_TYPE_UINT8:
 15.2652 -+	    if (n_gpr < MAX_GPRARGS)
 15.2653 -+	      p_gpr[n_gpr++] = *(unsigned char *) arg;
 15.2654 -+	    else
 15.2655 -+	      p_ov[n_ov++] = *(unsigned char *) arg;
 15.2656 -+	    break;
 15.2657 -+ 
 15.2658 -+	  case FFI_TYPE_SINT8:
 15.2659 -+	    if (n_gpr < MAX_GPRARGS)
 15.2660 -+	      p_gpr[n_gpr++] = *(signed char *) arg;
 15.2661 -+	    else
 15.2662 -+	      p_ov[n_ov++] = *(signed char *) arg;
 15.2663 -+	    break;
 15.2664 -+ 
 15.2665 -+	  default:
 15.2666 -+	    FFI_ASSERT (0);
 15.2667 -+	    break;
 15.2668 -+        }
 15.2669 -+    }
 15.2670 -+}
 15.2671 -+
 15.2672 -+/*======================== End of Routine ============================*/
 15.2673 -+ 
 15.2674 -+/*====================================================================*/
 15.2675 -+/*                                                                    */
 15.2676 -+/* Name     - ffi_prep_cif_machdep.                                   */
 15.2677 -+/*                                                                    */
 15.2678 -+/* Function - Perform machine dependent CIF processing.               */
 15.2679 -+/*                                                                    */
 15.2680 -+/*====================================================================*/
 15.2681 -+ 
 15.2682 -+ffi_status
 15.2683 -+ffi_prep_cif_machdep(ffi_cif *cif)
 15.2684 -+{
 15.2685 -+  size_t struct_size = 0;
 15.2686 -+  int n_gpr = 0;
 15.2687 -+  int n_fpr = 0;
 15.2688 -+  int n_ov = 0;
 15.2689 -+
 15.2690 -+  ffi_type **ptr;
 15.2691 -+  int i;
 15.2692 -+
 15.2693 -+  /* Determine return value handling.  */ 
 15.2694 -+
 15.2695 -+  switch (cif->rtype->type)
 15.2696 -+    {