1.1 --- a/config/binutils/binutils.in Wed Oct 21 18:08:31 2009 +0200
1.2 +++ b/config/binutils/binutils.in Wed Oct 28 18:55:40 2009 +0100
1.3 @@ -91,16 +91,6 @@
1.4 bool
1.5 prompt "2.16.1"
1.6
1.7 -config BINUTILS_V_2_15
1.8 - bool
1.9 - prompt "2.15 (OBSOLETE)"
1.10 - depends on OBSOLETE
1.11 -
1.12 -config BINUTILS_V_2_14
1.13 - bool
1.14 - prompt "2.14 (OBSOLETE)"
1.15 - depends on OBSOLETE
1.16 -
1.17 endchoice
1.18
1.19 config BINUTILS_VERSION
1.20 @@ -124,8 +114,6 @@
1.21 default "2.18" if BINUTILS_V_2_18
1.22 default "2.17" if BINUTILS_V_2_17
1.23 default "2.16.1" if BINUTILS_V_2_16_1
1.24 - default "2.15" if BINUTILS_V_2_15
1.25 - default "2.14" if BINUTILS_V_2_14
1.26
1.27 config BINUTILS_EXTRA_CONFIG
1.28 string
2.1 --- a/config/cc/gcc.in Wed Oct 21 18:08:31 2009 +0200
2.2 +++ b/config/cc/gcc.in Wed Oct 28 18:55:40 2009 +0100
2.3 @@ -83,55 +83,15 @@
2.4 bool
2.5 prompt "4.1.2"
2.6
2.7 -config CC_V_4_1_1
2.8 - bool
2.9 - prompt "4.1.1 (OBSOLETE)"
2.10 - depends on OBSOLETE
2.11 -
2.12 -config CC_V_4_1_0
2.13 - bool
2.14 - prompt "4.1.0 (OBSOLETE)"
2.15 - depends on OBSOLETE
2.16 -
2.17 config CC_V_4_0_4
2.18 bool
2.19 prompt "4.0.4"
2.20
2.21 -config CC_V_4_0_3
2.22 - bool
2.23 - prompt "4.0.3 (OBSOLETE)"
2.24 - depends on OBSOLETE
2.25 -
2.26 -config CC_V_4_0_2
2.27 - bool
2.28 - prompt "4.0.2 (OBSOLETE)"
2.29 - depends on OBSOLETE
2.30 -
2.31 -config CC_V_4_0_1
2.32 - bool
2.33 - prompt "4.0.1 (OBSOLETE)"
2.34 - depends on OBSOLETE
2.35 -
2.36 -config CC_V_4_0_0
2.37 - bool
2.38 - prompt "4.0.0 (OBSOLETE)"
2.39 - depends on OBSOLETE
2.40 -
2.41 config CC_V_3_4_6
2.42 bool
2.43 prompt "3.4.6 (OBSOLETE)"
2.44 depends on OBSOLETE
2.45
2.46 -config CC_V_3_3_6
2.47 - bool
2.48 - prompt "3.3.6 (OBSOLETE)"
2.49 - depends on OBSOLETE
2.50 -
2.51 -config CC_V_3_2_3
2.52 - bool
2.53 - prompt "3.2.3 (OBSOLETE)"
2.54 - depends on OBSOLETE
2.55 -
2.56 endchoice
2.57
2.58 config CC_GCC_4_3_or_later
2.59 @@ -161,16 +121,8 @@
2.60 default "4.2.1" if CC_V_4_2_1
2.61 default "4.2.0" if CC_V_4_2_0
2.62 default "4.1.2" if CC_V_4_1_2
2.63 - default "4.1.1" if CC_V_4_1_1
2.64 - default "4.1.0" if CC_V_4_1_0
2.65 default "4.0.4" if CC_V_4_0_4
2.66 - default "4.0.3" if CC_V_4_0_3
2.67 - default "4.0.2" if CC_V_4_0_2
2.68 - default "4.0.1" if CC_V_4_0_1
2.69 - default "4.0.0" if CC_V_4_0_0
2.70 default "3.4.6" if CC_V_3_4_6
2.71 - default "3.3.6" if CC_V_3_3_6
2.72 - default "3.2.3" if CC_V_3_2_3
2.73
2.74 config CC_CXA_ATEXIT
2.75 bool
3.1 --- a/config/debug/dmalloc.in Wed Oct 21 18:08:31 2009 +0200
3.2 +++ b/config/debug/dmalloc.in Wed Oct 28 18:55:40 2009 +0100
3.3 @@ -13,11 +13,6 @@
3.4 bool
3.5 prompt "5.5.2"
3.6
3.7 -config DMALLOC_V_5_4_3
3.8 - bool
3.9 - prompt "5.4.3 (OBSOLETE)"
3.10 - depends on OBSOLETE
3.11 -
3.12 endchoice
3.13
3.14 config DMALLOC_VERSION
3.15 @@ -25,4 +20,3 @@
3.16 # Don't remove next line
3.17 # CT_INSERT_VERSION_STRING_BELOW
3.18 default "5.5.2" if DMALLOC_V_5_5_2
3.19 - default "5.4.3" if DMALLOC_V_5_4_3
4.1 --- a/config/debug/gdb.in Wed Oct 21 18:08:31 2009 +0200
4.2 +++ b/config/debug/gdb.in Wed Oct 28 18:55:40 2009 +0100
4.3 @@ -117,16 +117,6 @@
4.4 bool
4.5 prompt "6.6"
4.6
4.7 -config GDB_V_6_5
4.8 - bool
4.9 - prompt "6.5 (OBSOLETE)"
4.10 - depends on OBSOLETE
4.11 -
4.12 -config GDB_V_6_4
4.13 - bool
4.14 - prompt "6.4 (OBSOLETE)"
4.15 - depends on OBSOLETE
4.16 -
4.17 config GDB_V_snapshot
4.18 bool
4.19 prompt "snapshot (EXPERIMENTAL)"
4.20 @@ -143,8 +133,6 @@
4.21 default "6.7.1" if GDB_V_6_7_1
4.22 default "6.7" if GDB_V_6_7
4.23 default "6.6" if GDB_V_6_6
4.24 - default "6.5" if GDB_V_6_5
4.25 - default "6.4" if GDB_V_6_4
4.26 default "snapshot" if GDB_V_snapshot
4.27
4.28 if GDB_NATIVE
5.1 --- a/config/debug/strace.in Wed Oct 21 18:08:31 2009 +0200
5.2 +++ b/config/debug/strace.in Wed Oct 28 18:55:40 2009 +0100
5.3 @@ -25,16 +25,6 @@
5.4 bool
5.5 prompt "4.5.15"
5.6
5.7 -config STRACE_V_4_5_14
5.8 - bool
5.9 - prompt "4.5.14 (OBSOLETE)"
5.10 - depends on OBSOLETE
5.11 -
5.12 -config STRACE_V_4_5
5.13 - bool
5.14 - prompt "4.5 (OBSOLETE)"
5.15 - depends on OBSOLETE
5.16 -
5.17 endchoice
5.18
5.19 config STRACE_VERSION
5.20 @@ -45,5 +35,3 @@
5.21 default "4.5.17" if STRACE_V_4_5_17
5.22 default "4.5.16" if STRACE_V_4_5_16
5.23 default "4.5.15" if STRACE_V_4_5_15
5.24 - default "4.5.14" if STRACE_V_4_5_14
5.25 - default "4.5" if STRACE_V_4_5
6.1 --- a/config/kernel/linux.in Wed Oct 21 18:08:31 2009 +0200
6.2 +++ b/config/kernel/linux.in Wed Oct 28 18:55:40 2009 +0100
6.3 @@ -90,51 +90,6 @@
6.4 bool
6.5 prompt "2.6.27.35 (long-term stable)"
6.6
6.7 -config KERNEL_V_2_6_26_8
6.8 - bool
6.9 - prompt "2.6.26.8 (OBSOLETE)"
6.10 - depends on OBSOLETE
6.11 -
6.12 -config KERNEL_V_2_6_25_20
6.13 - bool
6.14 - prompt "2.6.25.20 (OBSOLETE)"
6.15 - depends on OBSOLETE
6.16 -
6.17 -config KERNEL_V_2_6_24_7
6.18 - bool
6.19 - prompt "2.6.24.7 (OBSOLETE)"
6.20 - depends on OBSOLETE
6.21 -
6.22 -config KERNEL_V_2_6_23_17
6.23 - bool
6.24 - prompt "2.6.23.17 (OBSOLETE)"
6.25 - depends on OBSOLETE
6.26 -
6.27 -config KERNEL_V_2_6_22_19
6.28 - bool
6.29 - prompt "2.6.22.19 (OBSOLETE)"
6.30 - depends on OBSOLETE
6.31 -
6.32 -config KERNEL_V_2_6_21_7
6.33 - bool
6.34 - prompt "2.6.21.7 (OBSOLETE)"
6.35 - depends on OBSOLETE
6.36 -
6.37 -config KERNEL_V_2_6_20_21
6.38 - bool
6.39 - prompt "2.6.20.21 (OBSOLETE)"
6.40 - depends on OBSOLETE
6.41 -
6.42 -config KERNEL_V_2_6_19_7
6.43 - bool
6.44 - prompt "2.6.19.7 (OBSOLETE)"
6.45 - depends on OBSOLETE
6.46 -
6.47 -config KERNEL_V_2_6_18_8
6.48 - bool
6.49 - prompt "2.6.18.8 (OBSOLETE)"
6.50 - depends on OBSOLETE
6.51 -
6.52 config KERNEL_V_select
6.53 bool
6.54 prompt "Other version (EXPERIMENTAL)"
6.55 @@ -159,18 +114,8 @@
6.56 default "2.6.30.1" if KERNEL_V_2_6_30_1
6.57 default "2.6.30" if KERNEL_V_2_6_30
6.58 default "2.6.29.6" if KERNEL_V_2_6_29_6
6.59 - default "2.6.29" if KERNEL_V_2_6_29
6.60 default "2.6.28.10" if KERNEL_V_2_6_28_10
6.61 default "2.6.27.35" if KERNEL_V_2_6_27_35
6.62 - default "2.6.26.8" if KERNEL_V_2_6_26_8
6.63 - default "2.6.25.20" if KERNEL_V_2_6_25_20
6.64 - default "2.6.24.7" if KERNEL_V_2_6_24_7
6.65 - default "2.6.23.17" if KERNEL_V_2_6_23_17
6.66 - default "2.6.22.19" if KERNEL_V_2_6_22_19
6.67 - default "2.6.21.7" if KERNEL_V_2_6_21_7
6.68 - default "2.6.20.21" if KERNEL_V_2_6_20_21
6.69 - default "2.6.19.7" if KERNEL_V_2_6_19_7
6.70 - default "2.6.18.8" if KERNEL_V_2_6_18_8
6.71 help
6.72 Enter here the kernel version you want to use, if it is
6.73 not listed above. Something like V.P.S or V.P.S.E, where:
7.1 --- a/config/libc/uClibc.in Wed Oct 21 18:08:31 2009 +0200
7.2 +++ b/config/libc/uClibc.in Wed Oct 28 18:55:40 2009 +0100
7.3 @@ -32,21 +32,6 @@
7.4 bool
7.5 prompt "0.9.28.3"
7.6
7.7 -config LIBC_V_0_9_28_2
7.8 - bool
7.9 - prompt "0.9.28.2 (OBSOLETE)"
7.10 - depends on OBSOLETE
7.11 -
7.12 -config LIBC_V_0_9_28_1
7.13 - bool
7.14 - prompt "0.9.28.1 (OBSOLETE)"
7.15 - depends on OBSOLETE
7.16 -
7.17 -config LIBC_V_0_9_28
7.18 - bool
7.19 - prompt "0.9.28 (OBSOLETE)"
7.20 - depends on OBSOLETE
7.21 -
7.22 config LIBC_V_snapshot
7.23 bool
7.24 prompt "latest snapshot (EXPERIMENTAL)"
7.25 @@ -68,9 +53,6 @@
7.26 default "0.9.30" if LIBC_V_0_9_30
7.27 default "0.9.29" if LIBC_V_0_9_29
7.28 default "0.9.28.3" if LIBC_V_0_9_28_3
7.29 - default "0.9.28.2" if LIBC_V_0_9_28_2
7.30 - default "0.9.28.1" if LIBC_V_0_9_28_1
7.31 - default "0.9.28" if LIBC_V_0_9_28
7.32 default "snapshot" if LIBC_V_snapshot
7.33
7.34 config LIBC_UCLIBC_0_9_30_or_later
8.1 --- a/patches/binutils/2.14/100-sh-relocs.patch Wed Oct 21 18:08:31 2009 +0200
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,38 +0,0 @@
8.4 -Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
8.5 -To: dank@kegel.com
8.6 -Cc: kkojima@rr.iij4u.or.jp
8.7 -Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
8.8 - with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
8.9 -In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
8.10 - <3F28A15A.5010400@kegel.com>
8.11 -References: <3F28A15A.5010400@kegel.com>
8.12 -Date: Thu, 31 Jul 2003 21:47:38 +0900
8.13 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
8.14 -
8.15 -Dan Kegel <dank@kegel.com> wrote:
8.16 ->> I'll give binutils-2.14.90.0.5 a shot, then.
8.17 ->
8.18 -> No joy - same problem. Guess I'll take this up on binutils and/or libc-alpha.
8.19 -
8.20 -Please try the patch below, though it's a diff against the current
8.21 -binutils CVS.
8.22 -
8.23 -Regards,
8.24 - kaz
8.25 ---
8.26 -diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
8.27 ---- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
8.28 -+++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
8.29 -@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
8.30 - sreloc, 2))
8.31 - return FALSE;
8.32 - }
8.33 -+#if 0
8.34 - if (sec->flags & SEC_READONLY)
8.35 - info->flags |= DF_TEXTREL;
8.36 -+#endif
8.37 - elf_section_data (sec)->sreloc = sreloc;
8.38 - }
8.39 -
8.40 -
8.41 -
9.1 --- a/patches/binutils/2.14/110-i386-no-divide-comment.patch Wed Oct 21 18:08:31 2009 +0200
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,38 +0,0 @@
9.4 -diff -durN binutils-2.14.orig/gas/config/tc-i386.c binutils-2.14/gas/config/tc-i386.c
9.5 ---- binutils-2.14.orig/gas/config/tc-i386.c 2003-01-29 11:05:52.000000000 +0100
9.6 -+++ binutils-2.14/gas/config/tc-i386.c 2008-09-22 08:54:50.000000000 +0200
9.7 -@@ -189,15 +189,10 @@
9.8 - const char extra_symbol_chars[] = "*%-([";
9.9 - #endif
9.10 -
9.11 --#if (defined (TE_I386AIX) \
9.12 -- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
9.13 -- && !defined (TE_LINUX) \
9.14 -- && !defined (TE_FreeBSD) \
9.15 -- && !defined (TE_NetBSD)))
9.16 - /* This array holds the chars that always start a comment. If the
9.17 - pre-processor is disabled, these aren't very useful. */
9.18 --const char comment_chars[] = "#/";
9.19 --#define PREFIX_SEPARATOR '\\'
9.20 -+const char comment_chars[] = "#";
9.21 -+#define PREFIX_SEPARATOR '/'
9.22 -
9.23 - /* This array holds the chars that only start a comment at the beginning of
9.24 - a line. If the line seems to have the form '# 123 filename'
9.25 -@@ -207,16 +202,7 @@
9.26 - #NO_APP at the beginning of its output.
9.27 - Also note that comments started like this one will always work if
9.28 - '/' isn't otherwise defined. */
9.29 --const char line_comment_chars[] = "#";
9.30 --
9.31 --#else
9.32 --/* Putting '/' here makes it impossible to use the divide operator.
9.33 -- However, we need it for compatibility with SVR4 systems. */
9.34 --const char comment_chars[] = "#";
9.35 --#define PREFIX_SEPARATOR '/'
9.36 --
9.37 - const char line_comment_chars[] = "/#";
9.38 --#endif
9.39 -
9.40 - const char line_separator_chars[] = ";";
9.41 -
10.1 --- a/patches/binutils/2.14/270-i386-no-divide-comment.patch Wed Oct 21 18:08:31 2009 +0200
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,38 +0,0 @@
10.4 -diff -durN binutils-2.15.orig/gas/config/tc-i386.c binutils-2.15/gas/config/tc-i386.c
10.5 ---- binutils-2.15.orig/gas/config/tc-i386.c 2004-05-17 21:36:09.000000000 +0200
10.6 -+++ binutils-2.15/gas/config/tc-i386.c 2008-09-22 08:57:14.000000000 +0200
10.7 -@@ -185,15 +185,10 @@
10.8 - const char extra_symbol_chars[] = "*%-([";
10.9 - #endif
10.10 -
10.11 --#if (defined (TE_I386AIX) \
10.12 -- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
10.13 -- && !defined (TE_LINUX) \
10.14 -- && !defined (TE_FreeBSD) \
10.15 -- && !defined (TE_NetBSD)))
10.16 - /* This array holds the chars that always start a comment. If the
10.17 - pre-processor is disabled, these aren't very useful. */
10.18 --const char comment_chars[] = "#/";
10.19 --#define PREFIX_SEPARATOR '\\'
10.20 -+const char comment_chars[] = "#";
10.21 -+#define PREFIX_SEPARATOR '/'
10.22 -
10.23 - /* This array holds the chars that only start a comment at the beginning of
10.24 - a line. If the line seems to have the form '# 123 filename'
10.25 -@@ -203,16 +198,7 @@
10.26 - #NO_APP at the beginning of its output.
10.27 - Also note that comments started like this one will always work if
10.28 - '/' isn't otherwise defined. */
10.29 --const char line_comment_chars[] = "#";
10.30 --
10.31 --#else
10.32 --/* Putting '/' here makes it impossible to use the divide operator.
10.33 -- However, we need it for compatibility with SVR4 systems. */
10.34 --const char comment_chars[] = "#";
10.35 --#define PREFIX_SEPARATOR '/'
10.36 --
10.37 - const char line_comment_chars[] = "/#";
10.38 --#endif
10.39 -
10.40 - const char line_separator_chars[] = ";";
10.41 -
11.1 --- a/patches/binutils/2.15/100-uclibc.patch Wed Oct 21 18:08:31 2009 +0200
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,144 +0,0 @@
11.4 -diff -uNr binutils-2.15-pristine/bfd/configure binutils-2.15/bfd/configure
11.5 ---- binutils-2.15-pristine/bfd/configure 2004-05-17 12:35:57.000000000 -0700
11.6 -+++ binutils-2.15/bfd/configure 2004-07-19 16:36:19.000000000 -0700
11.7 -@@ -1009,7 +1009,7 @@
11.8 - bfd_version_string="\"${VERSION}\""
11.9 - if test x${is_release} = x; then
11.10 - bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
11.11 -- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
11.12 -+ bfd_version_string="\"${VERSION} ${bfd_version_date} uClibc\""
11.13 - fi
11.14 -
11.15 -
11.16 -diff -uNr binutils-2.15-pristine/bfd/elf32-arm.h binutils-2.15/bfd/elf32-arm.h
11.17 ---- binutils-2.15-pristine/bfd/elf32-arm.h 2004-05-17 12:35:58.000000000 -0700
11.18 -+++ binutils-2.15/bfd/elf32-arm.h 2004-07-19 16:37:06.000000000 -0700
11.19 -@@ -124,7 +124,7 @@
11.20 -
11.21 - /* The name of the dynamic interpreter. This is put in the .interp
11.22 - section. */
11.23 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.24 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.25 -
11.26 - #ifdef FOUR_WORD_PLT
11.27 -
11.28 -diff -uNr binutils-2.15-pristine/bfd/elf32-cris.c binutils-2.15/bfd/elf32-cris.c
11.29 ---- binutils-2.15-pristine/bfd/elf32-cris.c 2004-05-17 12:35:58.000000000 -0700
11.30 -+++ binutils-2.15/bfd/elf32-cris.c 2004-07-19 16:49:59.000000000 -0700
11.31 -@@ -536,7 +536,7 @@
11.32 - /* The name of the dynamic interpreter. This is put in the .interp
11.33 - section. */
11.34 -
11.35 --#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
11.36 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.37 -
11.38 - /* The size in bytes of an entry in the procedure linkage table. */
11.39 -
11.40 -diff -uNr binutils-2.15-pristine/bfd/elf32-frv.c binutils-2.15/bfd/elf32-frv.c
11.41 ---- binutils-2.15-pristine/bfd/elf32-frv.c 2004-05-17 12:35:58.000000000 -0700
11.42 -+++ binutils-2.15/bfd/elf32-frv.c 2004-07-19 16:49:59.000000000 -0700
11.43 -@@ -2913,7 +2913,7 @@
11.44 - /* The name of the dynamic interpreter. This is put in the .interp
11.45 - section. */
11.46 -
11.47 --#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
11.48 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.49 -
11.50 - #define DEFAULT_STACK_SIZE 0x20000
11.51 -
11.52 -diff -uNr binutils-2.15-pristine/bfd/elf32-hppa.c binutils-2.15/bfd/elf32-hppa.c
11.53 ---- binutils-2.15-pristine/bfd/elf32-hppa.c 2004-05-17 12:35:58.000000000 -0700
11.54 -+++ binutils-2.15/bfd/elf32-hppa.c 2004-07-19 16:49:59.000000000 -0700
11.55 -@@ -115,7 +115,7 @@
11.56 -
11.57 - #define PLT_ENTRY_SIZE 8
11.58 - #define GOT_ENTRY_SIZE 4
11.59 --#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
11.60 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.61 -
11.62 - static const bfd_byte plt_stub[] =
11.63 - {
11.64 -diff -uNr binutils-2.15-pristine/bfd/elf32-ppc.c binutils-2.15/bfd/elf32-ppc.c
11.65 ---- binutils-2.15-pristine/bfd/elf32-ppc.c 2004-05-17 12:35:59.000000000 -0700
11.66 -+++ binutils-2.15/bfd/elf32-ppc.c 2004-07-19 16:49:59.000000000 -0700
11.67 -@@ -49,7 +49,7 @@
11.68 -
11.69 - /* The name of the dynamic interpreter. This is put in the .interp
11.70 - section. */
11.71 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.72 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.73 -
11.74 - /* The size in bytes of an entry in the procedure linkage table. */
11.75 - #define PLT_ENTRY_SIZE 12
11.76 -diff -uNr binutils-2.15-pristine/bfd/elf32-s390.c binutils-2.15/bfd/elf32-s390.c
11.77 ---- binutils-2.15-pristine/bfd/elf32-s390.c 2004-05-17 12:35:59.000000000 -0700
11.78 -+++ binutils-2.15/bfd/elf32-s390.c 2004-07-19 16:49:59.000000000 -0700
11.79 -@@ -452,7 +452,7 @@
11.80 - /* The name of the dynamic interpreter. This is put in the .interp
11.81 - section. */
11.82 -
11.83 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.84 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.85 -
11.86 - /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
11.87 - copying dynamic variables from a shared lib into an app's dynbss
11.88 -diff -uNr binutils-2.15-pristine/bfd/elf32-sparc.c binutils-2.15/bfd/elf32-sparc.c
11.89 ---- binutils-2.15-pristine/bfd/elf32-sparc.c 2004-05-17 12:36:00.000000000 -0700
11.90 -+++ binutils-2.15/bfd/elf32-sparc.c 2004-07-19 16:49:59.000000000 -0700
11.91 -@@ -536,7 +536,7 @@
11.92 - /* The name of the dynamic interpreter. This is put in the .interp
11.93 - section. */
11.94 -
11.95 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.96 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.97 -
11.98 - /* The nop opcode we use. */
11.99 -
11.100 -diff -uNr binutils-2.15-pristine/bfd/elf64-ppc.c binutils-2.15/bfd/elf64-ppc.c
11.101 ---- binutils-2.15-pristine/bfd/elf64-ppc.c 2004-05-17 12:36:01.000000000 -0700
11.102 -+++ binutils-2.15/bfd/elf64-ppc.c 2004-07-19 16:49:59.000000000 -0700
11.103 -@@ -99,7 +99,7 @@
11.104 -
11.105 - /* The name of the dynamic interpreter. This is put in the .interp
11.106 - section. */
11.107 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.108 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.109 -
11.110 - /* The size in bytes of an entry in the procedure linkage table. */
11.111 - #define PLT_ENTRY_SIZE 24
11.112 -diff -uNr binutils-2.15-pristine/bfd/elf64-s390.c binutils-2.15/bfd/elf64-s390.c
11.113 ---- binutils-2.15-pristine/bfd/elf64-s390.c 2004-05-17 12:36:01.000000000 -0700
11.114 -+++ binutils-2.15/bfd/elf64-s390.c 2004-07-19 16:49:59.000000000 -0700
11.115 -@@ -473,7 +473,7 @@
11.116 - /* The name of the dynamic interpreter. This is put in the .interp
11.117 - section. */
11.118 -
11.119 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.120 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.121 -
11.122 - /* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
11.123 - copying dynamic variables from a shared lib into an app's dynbss
11.124 -diff -uNr binutils-2.15-pristine/bfd/elf-m10300.c binutils-2.15/bfd/elf-m10300.c
11.125 ---- binutils-2.15-pristine/bfd/elf-m10300.c 2004-05-17 12:35:57.000000000 -0700
11.126 -+++ binutils-2.15/bfd/elf-m10300.c 2004-07-19 16:49:59.000000000 -0700
11.127 -@@ -4026,7 +4026,7 @@
11.128 - /* The name of the dynamic interpreter. This is put in the .interp
11.129 - section. */
11.130 -
11.131 --#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
11.132 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.133 -
11.134 - /* Create dynamic sections when linking against a dynamic object. */
11.135 -
11.136 -diff -uNr binutils-2.15-pristine/bfd/elfxx-ia64.c binutils-2.15/bfd/elfxx-ia64.c
11.137 ---- binutils-2.15-pristine/bfd/elfxx-ia64.c 2004-05-17 12:36:02.000000000 -0700
11.138 -+++ binutils-2.15/bfd/elfxx-ia64.c 2004-07-19 16:49:59.000000000 -0700
11.139 -@@ -643,7 +643,7 @@
11.140 - 0x60, 0x00, 0x80, 0x00 /* br.few b6;; */
11.141 - };
11.142 -
11.143 --#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
11.144 -+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
11.145 -
11.146 - static const bfd_byte oor_brl[16] =
11.147 - {
12.1 --- a/patches/binutils/2.15/110-uclibc-conf.patch Wed Oct 21 18:08:31 2009 +0200
12.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
12.3 @@ -1,692 +0,0 @@
12.4 -diff -urN binutils-2.15-dist/bfd/config.bfd binutils-2.15/bfd/config.bfd
12.5 ---- binutils-2.15-dist/bfd/config.bfd 2004-05-17 14:35:56.000000000 -0500
12.6 -+++ binutils-2.15/bfd/config.bfd 2004-08-04 12:01:44.000000000 -0500
12.7 -@@ -126,7 +126,7 @@
12.8 - targ_defvec=ecoffalpha_little_vec
12.9 - targ_selvecs=bfd_elf64_alpha_vec
12.10 - ;;
12.11 -- alpha*-*-linux-gnu* | alpha*-*-elf*)
12.12 -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
12.13 - targ_defvec=bfd_elf64_alpha_vec
12.14 - targ_selvecs=ecoffalpha_little_vec
12.15 - ;;
12.16 -@@ -136,7 +136,7 @@
12.17 - alpha*-*-*)
12.18 - targ_defvec=ecoffalpha_little_vec
12.19 - ;;
12.20 -- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
12.21 -+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
12.22 - targ_defvec=bfd_elf64_ia64_little_vec
12.23 - targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
12.24 - ;;
12.25 -@@ -213,7 +213,7 @@
12.26 - targ_defvec=bfd_elf32_littlearm_vec
12.27 - targ_selvecs=bfd_elf32_bigarm_vec
12.28 - ;;
12.29 -- armeb-*-elf | arm*b-*-linux-gnu*)
12.30 -+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
12.31 - targ_defvec=bfd_elf32_bigarm_vec
12.32 - targ_selvecs=bfd_elf32_littlearm_vec
12.33 - ;;
12.34 -@@ -221,7 +221,7 @@
12.35 - targ_defvec=bfd_elf32_littlearm_vec
12.36 - targ_selvecs=bfd_elf32_bigarm_vec
12.37 - ;;
12.38 -- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
12.39 -+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
12.40 - arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
12.41 - targ_defvec=bfd_elf32_littlearm_vec
12.42 - targ_selvecs=bfd_elf32_bigarm_vec
12.43 -@@ -360,7 +360,7 @@
12.44 - ;;
12.45 -
12.46 - #ifdef BFD64
12.47 -- hppa*64*-*-linux-gnu*)
12.48 -+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
12.49 - targ_defvec=bfd_elf64_hppa_linux_vec
12.50 - targ_selvecs=bfd_elf64_hppa_vec
12.51 - ;;
12.52 -@@ -371,7 +371,7 @@
12.53 - ;;
12.54 - #endif
12.55 -
12.56 -- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
12.57 -+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*)
12.58 - targ_defvec=bfd_elf32_hppa_linux_vec
12.59 - targ_selvecs=bfd_elf32_hppa_vec
12.60 - ;;
12.61 -@@ -494,7 +494,7 @@
12.62 - targ_selvecs=bfd_elf32_i386_vec
12.63 - targ_underscore=yes
12.64 - ;;
12.65 -- i[3-7]86-*-linux-gnu*)
12.66 -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
12.67 - targ_defvec=bfd_elf32_i386_vec
12.68 - targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
12.69 - targ64_selvecs=bfd_elf64_x86_64_vec
12.70 -@@ -508,7 +508,7 @@
12.71 - targ_defvec=bfd_elf64_x86_64_vec
12.72 - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
12.73 - ;;
12.74 -- x86_64-*-linux-gnu*)
12.75 -+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
12.76 - targ_defvec=bfd_elf64_x86_64_vec
12.77 - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
12.78 - ;;
12.79 -@@ -683,7 +683,7 @@
12.80 - targ_selvecs=bfd_elf32_m68k_vec
12.81 - targ_underscore=yes
12.82 - ;;
12.83 -- m68*-*-linux-gnu*)
12.84 -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
12.85 - targ_defvec=bfd_elf32_m68k_vec
12.86 - targ_selvecs=m68klinux_vec
12.87 - ;;
12.88 -@@ -955,7 +955,8 @@
12.89 - ;;
12.90 - #endif
12.91 - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
12.92 -- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
12.93 -+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
12.94 -+ powerpc-*-rtems* | \
12.95 - powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
12.96 - targ_defvec=bfd_elf32_powerpc_vec
12.97 - targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
12.98 -@@ -987,8 +988,8 @@
12.99 - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
12.100 - ;;
12.101 - powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
12.102 -- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
12.103 -- powerpcle-*-rtems*)
12.104 -+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
12.105 -+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
12.106 - targ_defvec=bfd_elf32_powerpcle_vec
12.107 - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
12.108 - targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
12.109 -@@ -1149,7 +1150,7 @@
12.110 - targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
12.111 - targ_underscore=yes
12.112 - ;;
12.113 -- sparc-*-linux-gnu*)
12.114 -+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
12.115 - targ_defvec=bfd_elf32_sparc_vec
12.116 - targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
12.117 - ;;
12.118 -@@ -1196,7 +1197,7 @@
12.119 - targ_defvec=sunos_big_vec
12.120 - targ_underscore=yes
12.121 - ;;
12.122 -- sparc64-*-linux-gnu*)
12.123 -+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
12.124 - targ_defvec=bfd_elf64_sparc_vec
12.125 - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
12.126 - ;;
12.127 -@@ -1265,7 +1266,7 @@
12.128 - targ_underscore=yes
12.129 - ;;
12.130 -
12.131 -- vax-*-linux-gnu*)
12.132 -+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
12.133 - targ_defvec=bfd_elf32_vax_vec
12.134 - ;;
12.135 -
12.136 -diff -urN binutils-2.15-dist/bfd/configure binutils-2.15/bfd/configure
12.137 ---- binutils-2.15-dist/bfd/configure 2004-05-17 14:35:57.000000000 -0500
12.138 -+++ binutils-2.15/bfd/configure 2004-08-04 12:01:44.000000000 -0500
12.139 -@@ -1699,6 +1699,11 @@
12.140 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.141 - ;;
12.142 -
12.143 -+linux-uclibc*)
12.144 -+ lt_cv_deplibs_check_method=pass_all
12.145 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.146 -+ ;;
12.147 -+
12.148 - netbsd*)
12.149 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.150 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
12.151 -@@ -5278,7 +5283,7 @@
12.152 - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
12.153 - COREFILE=''
12.154 - ;;
12.155 -- alpha*-*-linux-gnu*)
12.156 -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
12.157 - COREFILE=trad-core.lo
12.158 - TRAD_HEADER='"hosts/alphalinux.h"'
12.159 - ;;
12.160 -@@ -5338,7 +5343,7 @@
12.161 - COREFILE=trad-core.lo
12.162 - TRAD_HEADER='"hosts/i386mach3.h"'
12.163 - ;;
12.164 -- i[3-7]86-*-linux-gnu*)
12.165 -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
12.166 - COREFILE=trad-core.lo
12.167 - TRAD_HEADER='"hosts/i386linux.h"'
12.168 - ;;
12.169 -@@ -5376,7 +5381,7 @@
12.170 - COREFILE=trad-core.lo
12.171 - TRAD_HEADER='"hosts/hp300bsd.h"'
12.172 - ;;
12.173 -- m68*-*-linux-gnu*)
12.174 -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
12.175 - COREFILE=trad-core.lo
12.176 - TRAD_HEADER='"hosts/m68klinux.h"'
12.177 - ;;
12.178 -@@ -5477,7 +5482,7 @@
12.179 - COREFILE=trad-core.lo
12.180 - TRAD_HEADER='"hosts/vaxult2.h"'
12.181 - ;;
12.182 -- vax-*-linux-gnu*)
12.183 -+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
12.184 - COREFILE=trad-core.lo
12.185 - TRAD_HEADER='"hosts/vaxlinux.h"'
12.186 - ;;
12.187 -diff -urN binutils-2.15-dist/bfd/configure.in binutils-2.15/bfd/configure.in
12.188 ---- binutils-2.15-dist/bfd/configure.in 2004-05-17 14:35:57.000000000 -0500
12.189 -+++ binutils-2.15/bfd/configure.in 2004-08-04 12:01:44.000000000 -0500
12.190 -@@ -178,7 +178,7 @@
12.191 - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
12.192 - COREFILE=''
12.193 - ;;
12.194 -- alpha*-*-linux-gnu*)
12.195 -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
12.196 - COREFILE=trad-core.lo
12.197 - TRAD_HEADER='"hosts/alphalinux.h"'
12.198 - ;;
12.199 -@@ -259,7 +259,7 @@
12.200 - TRAD_HEADER='"hosts/i386mach3.h"'
12.201 - ;;
12.202 - changequote(,)dnl
12.203 -- i[3-7]86-*-linux-gnu*)
12.204 -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
12.205 - changequote([,])dnl
12.206 - COREFILE=trad-core.lo
12.207 - TRAD_HEADER='"hosts/i386linux.h"'
12.208 -@@ -300,7 +300,7 @@
12.209 - COREFILE=trad-core.lo
12.210 - TRAD_HEADER='"hosts/hp300bsd.h"'
12.211 - ;;
12.212 -- m68*-*-linux-gnu*)
12.213 -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
12.214 - COREFILE=trad-core.lo
12.215 - TRAD_HEADER='"hosts/m68klinux.h"'
12.216 - ;;
12.217 -@@ -385,7 +385,7 @@
12.218 - COREFILE=trad-core.lo
12.219 - TRAD_HEADER='"hosts/vaxult2.h"'
12.220 - ;;
12.221 -- vax-*-linux-gnu*)
12.222 -+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
12.223 - COREFILE=trad-core.lo
12.224 - TRAD_HEADER='"hosts/vaxlinux.h"'
12.225 - ;;
12.226 -diff -urN binutils-2.15-dist/binutils/configure binutils-2.15/binutils/configure
12.227 ---- binutils-2.15-dist/binutils/configure 2004-01-02 11:08:04.000000000 -0600
12.228 -+++ binutils-2.15/binutils/configure 2004-08-04 12:01:44.000000000 -0500
12.229 -@@ -1585,6 +1585,11 @@
12.230 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.231 - ;;
12.232 -
12.233 -+linux-uclibc*)
12.234 -+ lt_cv_deplibs_check_method=pass_all
12.235 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.236 -+ ;;
12.237 -+
12.238 - netbsd*)
12.239 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.240 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
12.241 -diff -urN binutils-2.15-dist/configure binutils-2.15/configure
12.242 ---- binutils-2.15-dist/configure 2004-05-17 14:36:20.000000000 -0500
12.243 -+++ binutils-2.15/configure 2004-08-04 12:01:44.000000000 -0500
12.244 -@@ -1288,6 +1288,18 @@
12.245 - i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
12.246 - noconfigdirs="$noconfigdirs target-newlib target-libgloss"
12.247 - ;;
12.248 -+ i[3456789]86-*-linux-uclibc*)
12.249 -+ # This section makes it possible to build newlib natively on linux.
12.250 -+ # If we are using a cross compiler then don't configure newlib.
12.251 -+ if test x${is_cross_compiler} != xno ; then
12.252 -+ noconfigdirs="$noconfigdirs target-newlib"
12.253 -+ fi
12.254 -+ noconfigdirs="$noconfigdirs target-libgloss"
12.255 -+ # If we are not using a cross compiler, do configure newlib.
12.256 -+ # Note however, that newlib will only be configured in this situation
12.257 -+ # if the --with-newlib option has been given, because otherwise
12.258 -+ # 'target-newlib' will appear in skipdirs.
12.259 -+ ;;
12.260 - i[3456789]86-*-linux*)
12.261 - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
12.262 - # not build java stuff by default.
12.263 -diff -urN binutils-2.15-dist/configure.in binutils-2.15/configure.in
12.264 ---- binutils-2.15-dist/configure.in 2004-05-17 14:40:54.000000000 -0500
12.265 -+++ binutils-2.15/configure.in 2004-08-04 12:01:44.000000000 -0500
12.266 -@@ -521,6 +521,18 @@
12.267 - i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
12.268 - noconfigdirs="$noconfigdirs target-newlib target-libgloss"
12.269 - ;;
12.270 -+ i[[3456789]]86-*-linux-uclibc*)
12.271 -+ # This section makes it possible to build newlib natively on linux.
12.272 -+ # If we are using a cross compiler then don't configure newlib.
12.273 -+ if test x${is_cross_compiler} != xno ; then
12.274 -+ noconfigdirs="$noconfigdirs target-newlib"
12.275 -+ fi
12.276 -+ noconfigdirs="$noconfigdirs target-libgloss"
12.277 -+ # If we are not using a cross compiler, do configure newlib.
12.278 -+ # Note however, that newlib will only be configured in this situation
12.279 -+ # if the --with-newlib option has been given, because otherwise
12.280 -+ # 'target-newlib' will appear in skipdirs.
12.281 -+ ;;
12.282 - i[[3456789]]86-*-linux*)
12.283 - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
12.284 - # not build java stuff by default.
12.285 -diff -urN binutils-2.15-dist/gas/configure binutils-2.15/gas/configure
12.286 ---- binutils-2.15-dist/gas/configure 2004-05-17 14:36:07.000000000 -0500
12.287 -+++ binutils-2.15/gas/configure 2004-08-04 12:07:50.000000000 -0500
12.288 -@@ -3400,6 +3400,11 @@
12.289 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.290 - ;;
12.291 -
12.292 -+linux-uclibc*)
12.293 -+ lt_cv_deplibs_check_method=pass_all
12.294 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.295 -+ ;;
12.296 -+
12.297 - netbsd*)
12.298 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.299 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
12.300 -@@ -4224,6 +4229,7 @@
12.301 - alpha*-*-osf*) fmt=ecoff ;;
12.302 - alpha*-*-linuxecoff*) fmt=ecoff ;;
12.303 - alpha*-*-linux-gnu*) fmt=elf em=linux ;;
12.304 -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
12.305 - alpha*-*-netbsd*) fmt=elf em=nbsd ;;
12.306 - alpha*-*-openbsd*) fmt=elf em=obsd ;;
12.307 -
12.308 -@@ -4240,6 +4246,7 @@
12.309 - arm*-*-conix*) fmt=elf ;;
12.310 - arm-*-linux*aout*) fmt=aout em=linux ;;
12.311 - arm*-*-linux-gnu*) fmt=elf em=linux ;;
12.312 -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
12.313 - arm*-*-uclinux*) fmt=elf em=linux ;;
12.314 - arm-*-netbsdelf*) fmt=elf em=nbsd ;;
12.315 - arm-*-*n*bsd*) fmt=aout em=nbsd ;;
12.316 -@@ -4253,6 +4260,7 @@
12.317 - avr-*-*) fmt=elf ;;
12.318 -
12.319 - cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
12.320 -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
12.321 - cris-*-*) fmt=multi bfd_gas=yes ;;
12.322 -
12.323 - d10v-*-*) fmt=elf ;;
12.324 -@@ -4310,7 +4318,9 @@
12.325 - i386-*-linux*oldld) fmt=aout em=linux ;;
12.326 - i386-*-linux*coff*) fmt=coff em=linux ;;
12.327 - i386-*-linux-gnu*) fmt=elf em=linux ;;
12.328 -+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
12.329 - x86_64-*-linux-gnu*) fmt=elf em=linux ;;
12.330 -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
12.331 - i386-*-lynxos*) fmt=coff em=lynx ;;
12.332 - i386-*-sysv[45]*) fmt=elf ;;
12.333 - i386-*-solaris*) fmt=elf ;;
12.334 -@@ -4370,6 +4380,7 @@
12.335 - ia64-*-elf*) fmt=elf ;;
12.336 - ia64-*-aix*) fmt=elf em=ia64aix ;;
12.337 - ia64-*-linux-gnu*) fmt=elf em=linux ;;
12.338 -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
12.339 - ia64-*-hpux*) fmt=elf em=hpux ;;
12.340 - ia64-*-netbsd*) fmt=elf em=nbsd ;;
12.341 -
12.342 -@@ -4397,6 +4408,7 @@
12.343 - m68k-*-hpux*) fmt=hp300 em=hp300 ;;
12.344 - m68k-*-linux*aout*) fmt=aout em=linux ;;
12.345 - m68k-*-linux-gnu*) fmt=elf em=linux ;;
12.346 -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
12.347 - m68k-*-uclinux*) fmt=elf ;;
12.348 - m68k-*-gnu*) fmt=elf ;;
12.349 - m68k-*-lynxos*) fmt=coff em=lynx ;;
12.350 -@@ -4459,6 +4471,7 @@
12.351 - ppc-*-beos*) fmt=coff ;;
12.352 - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
12.353 - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
12.354 -+ ppc-*-linux-uclibc* | \
12.355 - ppc-*-linux-gnu*) fmt=elf em=linux
12.356 - case "$endian" in
12.357 - big) ;;
12.358 -@@ -4486,7 +4499,9 @@
12.359 - ppc-*-kaos*) fmt=elf ;;
12.360 -
12.361 - s390x-*-linux-gnu*) fmt=elf em=linux ;;
12.362 -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
12.363 - s390-*-linux-gnu*) fmt=elf em=linux ;;
12.364 -+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
12.365 -
12.366 - sh*-*-linux*) fmt=elf em=linux
12.367 - case ${cpu} in
12.368 -@@ -4519,6 +4534,7 @@
12.369 - sparc-*-coff) fmt=coff ;;
12.370 - sparc-*-linux*aout*) fmt=aout em=linux ;;
12.371 - sparc-*-linux-gnu*) fmt=elf em=linux ;;
12.372 -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
12.373 - sparc-*-lynxos*) fmt=coff em=lynx ;;
12.374 - sparc-fujitsu-none) fmt=aout ;;
12.375 - sparc-*-elf) fmt=elf ;;
12.376 -diff -urN binutils-2.15-dist/gas/configure.in binutils-2.15/gas/configure.in
12.377 ---- binutils-2.15-dist/gas/configure.in 2004-05-17 14:36:07.000000000 -0500
12.378 -+++ binutils-2.15/gas/configure.in 2004-08-04 12:07:21.000000000 -0500
12.379 -@@ -194,6 +194,7 @@
12.380 - alpha*-*-osf*) fmt=ecoff ;;
12.381 - alpha*-*-linuxecoff*) fmt=ecoff ;;
12.382 - alpha*-*-linux-gnu*) fmt=elf em=linux ;;
12.383 -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
12.384 - alpha*-*-netbsd*) fmt=elf em=nbsd ;;
12.385 - alpha*-*-openbsd*) fmt=elf em=obsd ;;
12.386 -
12.387 -@@ -210,6 +211,7 @@
12.388 - arm*-*-conix*) fmt=elf ;;
12.389 - arm-*-linux*aout*) fmt=aout em=linux ;;
12.390 - arm*-*-linux-gnu*) fmt=elf em=linux ;;
12.391 -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
12.392 - arm*-*-uclinux*) fmt=elf em=linux ;;
12.393 - arm-*-netbsdelf*) fmt=elf em=nbsd ;;
12.394 - arm-*-*n*bsd*) fmt=aout em=nbsd ;;
12.395 -@@ -223,6 +225,7 @@
12.396 - avr-*-*) fmt=elf ;;
12.397 -
12.398 - cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
12.399 -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
12.400 - cris-*-*) fmt=multi bfd_gas=yes ;;
12.401 -
12.402 - d10v-*-*) fmt=elf ;;
12.403 -@@ -280,7 +283,9 @@
12.404 - i386-*-linux*oldld) fmt=aout em=linux ;;
12.405 - i386-*-linux*coff*) fmt=coff em=linux ;;
12.406 - i386-*-linux-gnu*) fmt=elf em=linux ;;
12.407 -+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
12.408 - x86_64-*-linux-gnu*) fmt=elf em=linux ;;
12.409 -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
12.410 - i386-*-lynxos*) fmt=coff em=lynx ;;
12.411 - changequote(,)dnl
12.412 - i386-*-sysv[45]*) fmt=elf ;;
12.413 -@@ -333,6 +338,7 @@
12.414 - ia64-*-elf*) fmt=elf ;;
12.415 - ia64-*-aix*) fmt=elf em=ia64aix ;;
12.416 - ia64-*-linux-gnu*) fmt=elf em=linux ;;
12.417 -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
12.418 - ia64-*-hpux*) fmt=elf em=hpux ;;
12.419 - ia64-*-netbsd*) fmt=elf em=nbsd ;;
12.420 -
12.421 -@@ -360,6 +366,7 @@
12.422 - m68k-*-hpux*) fmt=hp300 em=hp300 ;;
12.423 - m68k-*-linux*aout*) fmt=aout em=linux ;;
12.424 - m68k-*-linux-gnu*) fmt=elf em=linux ;;
12.425 -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
12.426 - m68k-*-uclinux*) fmt=elf ;;
12.427 - m68k-*-gnu*) fmt=elf ;;
12.428 - m68k-*-lynxos*) fmt=coff em=lynx ;;
12.429 -@@ -419,6 +426,7 @@
12.430 - ppc-*-beos*) fmt=coff ;;
12.431 - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
12.432 - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
12.433 -+ ppc-*-linux-uclibc* | \
12.434 - ppc-*-linux-gnu*) fmt=elf em=linux
12.435 - case "$endian" in
12.436 - big) ;;
12.437 -@@ -439,7 +447,9 @@
12.438 - ppc-*-kaos*) fmt=elf ;;
12.439 -
12.440 - s390x-*-linux-gnu*) fmt=elf em=linux ;;
12.441 -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
12.442 - s390-*-linux-gnu*) fmt=elf em=linux ;;
12.443 -+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
12.444 -
12.445 - sh*-*-linux*) fmt=elf em=linux
12.446 - case ${cpu} in
12.447 -@@ -472,6 +482,7 @@
12.448 - sparc-*-coff) fmt=coff ;;
12.449 - sparc-*-linux*aout*) fmt=aout em=linux ;;
12.450 - sparc-*-linux-gnu*) fmt=elf em=linux ;;
12.451 -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
12.452 - sparc-*-lynxos*) fmt=coff em=lynx ;;
12.453 - sparc-fujitsu-none) fmt=aout ;;
12.454 - sparc-*-elf) fmt=elf ;;
12.455 -diff -urN binutils-2.15-dist/gprof/configure binutils-2.15/gprof/configure
12.456 ---- binutils-2.15-dist/gprof/configure 2003-08-26 12:19:19.000000000 -0500
12.457 -+++ binutils-2.15/gprof/configure 2004-08-04 12:01:45.000000000 -0500
12.458 -@@ -1581,6 +1581,11 @@
12.459 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.460 - ;;
12.461 -
12.462 -+linux-uclibc*)
12.463 -+ lt_cv_deplibs_check_method=pass_all
12.464 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.465 -+ ;;
12.466 -+
12.467 - netbsd*)
12.468 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.469 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
12.470 -diff -urN binutils-2.15-dist/ld/configure binutils-2.15/ld/configure
12.471 ---- binutils-2.15-dist/ld/configure 2003-04-24 07:36:07.000000000 -0500
12.472 -+++ binutils-2.15/ld/configure 2004-08-04 12:01:45.000000000 -0500
12.473 -@@ -1589,6 +1589,11 @@
12.474 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.475 - ;;
12.476 -
12.477 -+linux-uclibc*)
12.478 -+ lt_cv_deplibs_check_method=pass_all
12.479 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.480 -+ ;;
12.481 -+
12.482 - netbsd*)
12.483 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.484 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
12.485 -diff -urN binutils-2.15-dist/ld/configure.tgt binutils-2.15/ld/configure.tgt
12.486 ---- binutils-2.15-dist/ld/configure.tgt 2004-05-17 14:36:15.000000000 -0500
12.487 -+++ binutils-2.15/ld/configure.tgt 2004-08-04 12:01:45.000000000 -0500
12.488 -@@ -30,6 +30,7 @@
12.489 - targ_extra_emuls="criself crislinux"
12.490 - targ_extra_libpath=$targ_extra_emuls ;;
12.491 - cris-*-linux-gnu*) targ_emul=crislinux ;;
12.492 -+cris-*-linux-uclibc*) targ_emul=crislinux ;;
12.493 - cris-*-*) targ_emul=criself
12.494 - targ_extra_emuls="crisaout crislinux"
12.495 - targ_extra_libpath=$targ_extra_emuls ;;
12.496 -@@ -59,14 +60,16 @@
12.497 - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
12.498 - tdir_sun4=sparc-sun-sunos4
12.499 - ;;
12.500 --sparc64-*-linux-gnu*) targ_emul=elf64_sparc
12.501 -+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \
12.502 -+ targ_emul=elf64_sparc
12.503 - targ_extra_emuls="elf32_sparc sparclinux sun4"
12.504 - targ_extra_libpath=elf32_sparc
12.505 - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
12.506 - tdir_sparclinux=${tdir_elf32_sparc}aout
12.507 - tdir_sun4=sparc-sun-sunos4
12.508 - ;;
12.509 --sparc*-*-linux-gnu*) targ_emul=elf32_sparc
12.510 -+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
12.511 -+ targ_emul=elf32_sparc
12.512 - targ_extra_emuls="sparclinux elf64_sparc sun4"
12.513 - targ_extra_libpath=elf64_sparc
12.514 - tdir_sparclinux=${targ_alias}aout
12.515 -@@ -118,7 +121,9 @@
12.516 - m32r*le-*-elf*) targ_emul=m32rlelf ;;
12.517 - m32r*-*-elf*) targ_emul=m32relf ;;
12.518 - m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
12.519 -+m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;;
12.520 - m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
12.521 -+m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;;
12.522 - m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
12.523 - targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
12.524 - m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
12.525 -@@ -128,7 +133,7 @@
12.526 - m68*-ericsson-ose) targ_emul=sun3 ;;
12.527 - m68*-apple-aux*) targ_emul=m68kaux ;;
12.528 - *-tandem-none) targ_emul=st2000 ;;
12.529 --i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
12.530 -+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
12.531 - i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
12.532 - i[3-7]86-*-vsta) targ_emul=vsta ;;
12.533 - i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
12.534 -@@ -152,14 +157,16 @@
12.535 - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
12.536 - ;;
12.537 - i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
12.538 --i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
12.539 -+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
12.540 -+ targ_emul=elf_i386
12.541 - targ_extra_emuls=i386linux
12.542 - if test x${want64} = xtrue; then
12.543 - targ_extra_emuls="$targ_extra_emuls elf_x86_64"
12.544 - fi
12.545 - tdir_i386linux=${targ_alias}aout
12.546 - ;;
12.547 --x86_64-*-linux-gnu*) targ_emul=elf_x86_64
12.548 -+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
12.549 -+ targ_emul=elf_x86_64
12.550 - targ_extra_emuls="elf_i386 i386linux"
12.551 - targ_extra_libpath=elf_i386
12.552 - tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
12.553 -@@ -259,10 +266,13 @@
12.554 - arm9e-*-elf) targ_emul=armelf ;;
12.555 - arm-*-oabi) targ_emul=armelf_oabi ;;
12.556 - arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
12.557 -+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
12.558 - arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
12.559 -+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
12.560 - arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
12.561 - arm*-*-conix*) targ_emul=armelf ;;
12.562 --thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
12.563 -+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
12.564 -+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
12.565 - strongarm-*-coff) targ_emul=armcoff ;;
12.566 - strongarm-*-elf) targ_emul=armelf ;;
12.567 - strongarm-*-kaos*) targ_emul=armelf ;;
12.568 -@@ -364,7 +374,8 @@
12.569 - targ_extra_emuls=m68kelf
12.570 - tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
12.571 - ;;
12.572 --m68k-*-linux-gnu*) targ_emul=m68kelf
12.573 -+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
12.574 -+ targ_emul=m68kelf
12.575 - targ_extra_emuls=m68klinux
12.576 - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
12.577 - ;;
12.578 -@@ -381,9 +392,9 @@
12.579 - m68*-*-psos*) targ_emul=m68kpsos ;;
12.580 - m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
12.581 - m68*-*-rtems*) targ_emul=m68kelf ;;
12.582 --hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
12.583 -+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;;
12.584 - hppa*64*-*) targ_emul=elf64hppa ;;
12.585 --hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
12.586 -+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;;
12.587 - hppa*-*-*elf*) targ_emul=hppaelf ;;
12.588 - hppa*-*-lites*) targ_emul=hppaelf ;;
12.589 - hppa*-*-netbsd*) targ_emul=hppanbsd ;;
12.590 -@@ -396,6 +407,7 @@
12.591 - targ_emul=vaxnbsd
12.592 - targ_extra_emuls=elf32vax ;;
12.593 - vax-*-linux-gnu*) targ_emul=elf32vax ;;
12.594 -+vax-*-linux-uclibc*) targ_emul=elf32vax ;;
12.595 - mips*-*-pe) targ_emul=mipspe ;
12.596 - targ_extra_ofiles="deffilep.o pe-dll.o" ;;
12.597 - mips*-dec-ultrix*) targ_emul=mipslit ;;
12.598 -@@ -429,16 +441,16 @@
12.599 - mips*-*-vxworks*) targ_emul=elf32ebmip
12.600 - targ_extra_emuls="elf32elmip" ;;
12.601 - mips*-*-windiss) targ_emul=elf32mipswindiss ;;
12.602 --mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
12.603 -+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32
12.604 - targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
12.605 - ;;
12.606 --mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
12.607 -+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32
12.608 - targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
12.609 - ;;
12.610 --mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
12.611 -+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip
12.612 - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
12.613 - ;;
12.614 --mips*-*-linux-gnu*) targ_emul=elf32btsmip
12.615 -+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip
12.616 - targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
12.617 - ;;
12.618 - mips*-*-lnews*) targ_emul=mipslnews ;;
12.619 -@@ -461,6 +473,10 @@
12.620 - alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
12.621 - tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
12.622 - ;;
12.623 -+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha
12.624 -+ # The following needs to be checked...
12.625 -+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
12.626 -+ ;;
12.627 - alpha*-*-osf*) targ_emul=alpha ;;
12.628 - alpha*-*-gnu*) targ_emul=elf64alpha ;;
12.629 - alpha*-*-netware*) targ_emul=alpha ;;
12.630 -diff -urN binutils-2.15-dist/libtool.m4 binutils-2.15/libtool.m4
12.631 ---- binutils-2.15-dist/libtool.m4 2003-04-10 22:58:39.000000000 -0500
12.632 -+++ binutils-2.15/libtool.m4 2004-08-04 12:01:45.000000000 -0500
12.633 -@@ -645,6 +645,11 @@
12.634 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.635 - ;;
12.636 -
12.637 -+linux-uclibc*)
12.638 -+ lt_cv_deplibs_check_method=pass_all
12.639 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.640 -+ ;;
12.641 -+
12.642 - netbsd*)
12.643 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.644 - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
12.645 -diff -urN binutils-2.15-dist/ltconfig binutils-2.15/ltconfig
12.646 ---- binutils-2.15-dist/ltconfig 2003-10-03 23:54:47.000000000 -0500
12.647 -+++ binutils-2.15/ltconfig 2004-08-04 12:01:45.000000000 -0500
12.648 -@@ -603,6 +603,7 @@
12.649 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
12.650 - case $host_os in
12.651 - linux-gnu*) ;;
12.652 -+linux-uclibc*) ;;
12.653 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12.654 - esac
12.655 -
12.656 -@@ -1259,6 +1260,24 @@
12.657 - dynamic_linker='GNU/Linux ld.so'
12.658 - ;;
12.659 -
12.660 -+linux-uclibc*)
12.661 -+ version_type=linux
12.662 -+ need_lib_prefix=no
12.663 -+ need_version=no
12.664 -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
12.665 -+ soname_spec='${libname}${release}.so$major'
12.666 -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12.667 -+ shlibpath_var=LD_LIBRARY_PATH
12.668 -+ shlibpath_overrides_runpath=no
12.669 -+ # This implies no fast_install, which is unacceptable.
12.670 -+ # Some rework will be needed to allow for fast_install
12.671 -+ # before this can be enabled.
12.672 -+ # Note: copied from linux-gnu, and may not be appropriate.
12.673 -+ hardcode_into_libs=yes
12.674 -+ # Assume using the uClibc dynamic linker.
12.675 -+ dynamic_linker="uClibc ld.so"
12.676 -+ ;;
12.677 -+
12.678 - netbsd*)
12.679 - need_lib_prefix=no
12.680 - need_version=no
12.681 -diff -urN binutils-2.15-dist/opcodes/configure binutils-2.15/opcodes/configure
12.682 ---- binutils-2.15-dist/opcodes/configure 2003-08-05 04:39:31.000000000 -0500
12.683 -+++ binutils-2.15/opcodes/configure 2004-08-04 12:01:45.000000000 -0500
12.684 -@@ -1700,6 +1700,11 @@
12.685 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
12.686 - ;;
12.687 -
12.688 -+linux-uclibc*)
12.689 -+ lt_cv_deplibs_check_method=pass_all
12.690 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
12.691 -+ ;;
12.692 -+
12.693 - netbsd*)
12.694 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
12.695 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
13.1 --- a/patches/binutils/2.15/120-cflags.patch Wed Oct 21 18:08:31 2009 +0200
13.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13.3 @@ -1,32 +0,0 @@
13.4 -diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
13.5 ---- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
13.6 -+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
13.7 -@@ -55,10 +55,10 @@
13.8 - MKDOC = chew$(EXEEXT_FOR_BUILD)
13.9 -
13.10 - $(MKDOC): chew.o
13.11 -- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
13.12 -+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
13.13 -
13.14 - chew.o: chew.c
13.15 -- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
13.16 -+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
13.17 -
13.18 - protos: libbfd.h libcoff.h bfd.h
13.19 -
13.20 -diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
13.21 ---- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
13.22 -+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
13.23 -@@ -469,10 +469,10 @@
13.24 -
13.25 -
13.26 - $(MKDOC): chew.o
13.27 -- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
13.28 -+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
13.29 -
13.30 - chew.o: chew.c
13.31 -- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
13.32 -+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
13.33 -
13.34 - protos: libbfd.h libcoff.h bfd.h
13.35 -
14.1 --- a/patches/binutils/2.15/130-mips-ELF_MAXPAGESIZE-4K.patch Wed Oct 21 18:08:31 2009 +0200
14.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
14.3 @@ -1,26 +0,0 @@
14.4 ---- binutils/bfd/elf32-mips.c~
14.5 -+++ binutils/bfd/elf32-mips.c
14.6 -@@ -1611,7 +1611,9 @@
14.7 -
14.8 - /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
14.9 - page sizes of up to that limit, so we need to respect it. */
14.10 --#define ELF_MAXPAGESIZE 0x10000
14.11 -+/*#define ELF_MAXPAGESIZE 0x10000*/
14.12 -+/* Use 4K to shrink the elf header. NOT for general use! */
14.13 -+#define ELF_MAXPAGESIZE 0x1000
14.14 - #define elf32_bed elf32_tradbed
14.15 -
14.16 - /* Include the target file again for this target. */
14.17 ---- binutils/bfd/elfn32-mips.c~
14.18 -+++ binutils/bfd/elfn32-mips.c
14.19 -@@ -1976,7 +1976,9 @@
14.20 -
14.21 - /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
14.22 - page sizes of up to that limit, so we need to respect it. */
14.23 --#define ELF_MAXPAGESIZE 0x10000
14.24 -+/*#define ELF_MAXPAGESIZE 0x10000*/
14.25 -+/* Use 4K to shrink the elf header. NOT for general use! */
14.26 -+#define ELF_MAXPAGESIZE 0x1000
14.27 - #define elf32_bed elf32_tradbed
14.28 -
14.29 - /* Include the target file again for this target. */
15.1 --- a/patches/binutils/2.15/140-arm-textrel.patch Wed Oct 21 18:08:31 2009 +0200
15.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
15.3 @@ -1,63 +0,0 @@
15.4 -http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
15.5 ---- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
15.6 -+++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
15.7 -@@ -87,6 +87,8 @@
15.8 - #endif
15.9 - static bfd_boolean allocate_dynrelocs
15.10 - PARAMS ((struct elf_link_hash_entry *h, PTR inf));
15.11 -+static bfd_boolean elf32_arm_readonly_dynrelocs
15.12 -+ PARAMS ((struct elf_link_hash_entry *, PTR));
15.13 - static bfd_boolean create_got_section
15.14 - PARAMS ((bfd * dynobj, struct bfd_link_info * info));
15.15 - static bfd_boolean elf32_arm_create_dynamic_sections
15.16 -@@ -3531,6 +3533,37 @@
15.17 - return TRUE;
15.18 - }
15.19 -
15.20 -+/* Find any dynamic relocs that apply to read-only sections. */
15.21 -+
15.22 -+static bfd_boolean
15.23 -+elf32_arm_readonly_dynrelocs (h, inf)
15.24 -+ struct elf_link_hash_entry *h;
15.25 -+ PTR inf;
15.26 -+{
15.27 -+ struct elf32_arm_link_hash_entry *eh;
15.28 -+ struct elf32_arm_relocs_copied *p;
15.29 -+
15.30 -+ if (h->root.type == bfd_link_hash_warning)
15.31 -+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
15.32 -+
15.33 -+ eh = (struct elf32_arm_link_hash_entry *) h;
15.34 -+ for (p = eh->relocs_copied; p != NULL; p = p->next)
15.35 -+ {
15.36 -+ asection *s = p->section;
15.37 -+
15.38 -+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
15.39 -+ {
15.40 -+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
15.41 -+
15.42 -+ info->flags |= DF_TEXTREL;
15.43 -+
15.44 -+ /* Not an error, just cut short the traversal. */
15.45 -+ return FALSE;
15.46 -+ }
15.47 -+ }
15.48 -+ return TRUE;
15.49 -+}
15.50 -+
15.51 - /* Set the sizes of the dynamic sections. */
15.52 -
15.53 - static bfd_boolean
15.54 -@@ -3740,6 +3773,12 @@
15.55 - return FALSE;
15.56 - }
15.57 -
15.58 -+ /* If any dynamic relocs apply to a read-only section,
15.59 -+ then we need a DT_TEXTREL entry. */
15.60 -+ if ((info->flags & DF_TEXTREL) == 0)
15.61 -+ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
15.62 -+ (PTR) info);
15.63 -+
15.64 - if ((info->flags & DF_TEXTREL) != 0)
15.65 - {
15.66 - if (!add_dynamic_entry (DT_TEXTREL, 0))
16.1 --- a/patches/binutils/2.15/150-bfd-hash-tweak.patch Wed Oct 21 18:08:31 2009 +0200
16.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
16.3 @@ -1,24 +0,0 @@
16.4 -Signed-off-by: dank@kegel.com
16.5 -
16.6 -Raising the size of the hash table is a noticable win when linking
16.7 -at least one large app.
16.8 -
16.9 -There was a patch,
16.10 -http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
16.11 -to do this dynamically. No idea why that didn't make it in.
16.12 -So this tiny change to raise the default size is just
16.13 -a stopgap for now.
16.14 -
16.15 -
16.16 ---- binutils-2.15/bfd/hash.c.old 2003-12-01 01:33:01.000000000 -0500
16.17 -+++ binutils-2.15/bfd/hash.c 2006-03-01 16:26:26.701991000 -0500
16.18 -@@ -295,7 +295,7 @@
16.19 - */
16.20 -
16.21 - /* The default number of entries to use when creating a hash table. */
16.22 --#define DEFAULT_SIZE (4051)
16.23 -+#define DEFAULT_SIZE (32749)
16.24 -
16.25 - /* Create a new hash table, given a number of entries. */
16.26 -
16.27 -
17.1 --- a/patches/binutils/2.15/160-allow-gcc-4.0.patch Wed Oct 21 18:08:31 2009 +0200
17.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
17.3 @@ -1,75 +0,0 @@
17.4 -Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
17.5 -
17.6 -Fixes:
17.7 -In file included from ./targ-cpu.h:1,
17.8 - from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/obj-elf.h:42,
17.9 - from ./obj-format.h:1,
17.10 - from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/te-linux.h:4,
17.11 - from ./targ-env.h:1,
17.12 - from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/as.h:626,
17.13 - from /home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/app.c:30:
17.14 -/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/binutils-2.15/gas/config/tc-i386.h:451: error: array type has incomplete element type
17.15 -make[3]: *** [app.o] Error 1
17.16 -make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
17.17 -
17.18 -when building binutils-2.15 with gcc-4.0
17.19 -
17.20 -
17.21 -diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
17.22 ---- binutils-2.15.old/gas/as.h 2003-11-22 18:14:21.000000000 -0800
17.23 -+++ binutils-2.15/gas/as.h 2006-02-14 22:05:35.000000000 -0800
17.24 -@@ -605,7 +605,26 @@
17.25 - struct expressionS;
17.26 - struct fix;
17.27 - typedef struct symbol symbolS;
17.28 --struct relax_type;
17.29 -+
17.30 -+/* JF moved this here from as.h under the theory that nobody except MACHINE.c
17.31 -+ and write.c care about it anyway. */
17.32 -+/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
17.33 -+ incomplete element types in arrays, if relax_type isn't defined
17.34 -+ here. So I moved the definition back from tc.h to here. */
17.35 -+struct relax_type
17.36 -+{
17.37 -+ /* Forward reach. Signed number. > 0. */
17.38 -+ long rlx_forward;
17.39 -+ /* Backward reach. Signed number. < 0. */
17.40 -+ long rlx_backward;
17.41 -+
17.42 -+ /* Bytes length of this address. */
17.43 -+ unsigned char rlx_length;
17.44 -+
17.45 -+ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
17.46 -+ relax_substateT rlx_more;
17.47 -+};
17.48 -+
17.49 - typedef struct frag fragS;
17.50 -
17.51 - #ifdef BFD_ASSEMBLER
17.52 -diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
17.53 ---- binutils-2.15.old/gas/tc.h 2003-12-03 15:39:38.000000000 -0800
17.54 -+++ binutils-2.15/gas/tc.h 2006-02-14 22:03:35.000000000 -0800
17.55 -@@ -24,23 +24,6 @@
17.56 -
17.57 - extern const pseudo_typeS md_pseudo_table[];
17.58 -
17.59 --/* JF moved this here from as.h under the theory that nobody except MACHINE.c
17.60 -- and write.c care about it anyway. */
17.61 --
17.62 --struct relax_type
17.63 --{
17.64 -- /* Forward reach. Signed number. > 0. */
17.65 -- long rlx_forward;
17.66 -- /* Backward reach. Signed number. < 0. */
17.67 -- long rlx_backward;
17.68 --
17.69 -- /* Bytes length of this address. */
17.70 -- unsigned char rlx_length;
17.71 --
17.72 -- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
17.73 -- relax_substateT rlx_more;
17.74 --};
17.75 --
17.76 - typedef struct relax_type relax_typeS;
17.77 -
17.78 - extern const int md_reloc_size; /* Size of a relocation record */
18.1 --- a/patches/binutils/2.15/170-psignal.patch Wed Oct 21 18:08:31 2009 +0200
18.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
18.3 @@ -1,40 +0,0 @@
18.4 -Make psignal prototype in libiberty match that in glibc.
18.5 -
18.6 -Fixes:
18.7 -
18.8 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
18.9 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
18.10 -/usr/include/signal.h:131: prototype declaration
18.11 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
18.12 -/usr/include/signal.h:131: prototype declaration
18.13 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
18.14 -mprotect... make[1]: *** [strsignal.o] Error 1
18.15 -make[1]: Leaving directory `/export/hda3/dkegel/queue/jobdir.produser_cpsm17/crosstool-0.32/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.1.3/build-binutils/libiberty'
18.16 -make: *** [all-libiberty] Error 2
18.17 -
18.18 -when building on red hat 7.1
18.19 -though it's a bit of a mystery why libiberty's psignal is being compiled at
18.20 -all, since red hat 7.1's glibc supports psignal (hence the error message)
18.21 -
18.22 ---- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
18.23 -+++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
18.24 -@@ -544,7 +544,7 @@
18.25 -
18.26 - /*
18.27 -
18.28 --@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
18.29 -+@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
18.30 -
18.31 - Print @var{message} to the standard error, followed by a colon,
18.32 - followed by the description of the signal specified by @var{signo},
18.33 -@@ -557,9 +557,7 @@
18.34 - #ifndef HAVE_PSIGNAL
18.35 -
18.36 - void
18.37 --psignal (signo, message)
18.38 -- unsigned signo;
18.39 -- char *message;
18.40 -+psignal (int signo, const char *message)
18.41 - {
18.42 - if (signal_names == NULL)
18.43 - {
19.1 --- a/patches/binutils/2.15/180-solaris-qsort.patch Wed Oct 21 18:08:31 2009 +0200
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,22 +0,0 @@
19.4 -See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
19.5 -
19.6 ---- src/bfd/elflink.c.org 2004-07-05 09:11:42.920597000 -0400
19.7 -+++ src/bfd/elflink.c 2004-07-05 09:12:59.240847000 -0400
19.8 -@@ -2700,7 +2700,7 @@
19.9 - return vdiff > 0 ? 1 : -1;
19.10 - else
19.11 - {
19.12 -- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
19.13 -+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
19.14 - if (sdiff != 0)
19.15 - return sdiff > 0 ? 1 : -1;
19.16 - }
19.17 -@@ -3954,7 +3954,7 @@
19.18 - i = idx + 1;
19.19 - else
19.20 - {
19.21 -- long sdiff = slook - h->root.u.def.section;
19.22 -+ long sdiff = slook->id - h->root.u.def.section->id;
19.23 - if (sdiff < 0)
19.24 - j = idx;
19.25 - else if (sdiff > 0)
20.1 --- a/patches/binutils/2.15/190-vmx.patch Wed Oct 21 18:08:31 2009 +0200
20.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
20.3 @@ -1,45 +0,0 @@
20.4 -Grabbed with
20.5 -wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ppc-opc.c.diff?r1=1.70&r2=1.71&cvsroot=src'
20.6 -See
20.7 -http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
20.8 -and
20.9 -http://sources.redhat.com/ml/binutils-cvs/2004-05/msg00111.html
20.10 -
20.11 -This fixes problems like
20.12 -{standard input}: Assembler messages:
20.13 -{standard input}:1: Error: Unrecognized opcode: `dssall'
20.14 -which show up in binutils-2.15 when building the Linux kernel,
20.15 -or possibly failed compilations when building setjmp/longjmp in glibc.
20.16 -
20.17 -An alternative fix would be to pass -many to the assembler.
20.18 -A patch to do that for glibc is at
20.19 -wget 'http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-05&msgid=40B36E8C.9030609%40us.ibm.com'
20.20 -Yet another, better, fix would be for gcc to generate assembly
20.21 -that told the assembler which processor type to use.
20.22 -Presumably the Linux kernel sources would need a fix, too.
20.23 -Probably better to just fix binutils to accept sources that it used to.
20.24 -
20.25 -
20.26 -===================================================================
20.27 -RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
20.28 -retrieving revision 1.70
20.29 -retrieving revision 1.71
20.30 -diff -u -r1.70 -r1.71
20.31 ---- src/opcodes/ppc-opc.c 2004/05/05 13:43:36 1.70
20.32 -+++ src/opcodes/ppc-opc.c 2004/05/19 05:11:48 1.71
20.33 -@@ -1004,8 +1004,13 @@
20.34 -
20.35 - /* If only one bit of the FXM field is set, we can use the new form
20.36 - of the instruction, which is faster. Unlike the Power4 branch hint
20.37 -- encoding, this is not backward compatible. */
20.38 -- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
20.39 -+ encoding, this is not backward compatible. Do not generate the
20.40 -+ new form unless -mpower4 has been given, or -many and the two
20.41 -+ operand form of mfcr was used. */
20.42 -+ else if ((value & -value) == value
20.43 -+ && ((dialect & PPC_OPCODE_POWER4) != 0
20.44 -+ || ((dialect & PPC_OPCODE_ANY) != 0
20.45 -+ && (insn & (0x3ff << 1)) == 19 << 1)))
20.46 - insn |= 1 << 20;
20.47 -
20.48 - /* Any other value on mfcr is an error. */
21.1 --- a/patches/binutils/2.15/200-arm-undef-imm.patch Wed Oct 21 18:08:31 2009 +0200
21.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
21.3 @@ -1,51 +0,0 @@
21.4 -From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
21.5 -See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
21.6 -"[CRITICAL PATCH] 2.6: fix silent build error]"
21.7 -
21.8 -Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
21.9 -Branch: MAIN
21.10 -CVS Tags: binutils_latest_snapshot, HEAD
21.11 -Changes since 1.168: +14 -1 lines
21.12 -
21.13 -(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
21.14 -from undefined symbols.
21.15 -Always consider this fixup to have been processed as a reloc cannot be
21.16 -generated for it.
21.17 -
21.18 -
21.19 -===================================================================
21.20 -RCS file: /cvs/src/src/gas/config/tc-arm.c,v
21.21 -retrieving revision 1.168
21.22 -retrieving revision 1.169
21.23 -diff -u -r1.168 -r1.169
21.24 ---- src/gas/config/tc-arm.c 2004/04/30 10:51:12 1.168
21.25 -+++ src/gas/config/tc-arm.c 2004/07/02 11:12:29 1.169
21.26 -@@ -12186,6 +12186,20 @@
21.27 - switch (fixP->fx_r_type)
21.28 - {
21.29 - case BFD_RELOC_ARM_IMMEDIATE:
21.30 -+ /* We claim that this fixup has been processed here,
21.31 -+ even if in fact we generate an error because we do
21.32 -+ not have a reloc for it, so tc_gen_reloc will reject it. */
21.33 -+ fixP->fx_done = 1;
21.34 -+
21.35 -+ if (fixP->fx_addsy
21.36 -+ && ! S_IS_DEFINED (fixP->fx_addsy))
21.37 -+ {
21.38 -+ as_bad_where (fixP->fx_file, fixP->fx_line,
21.39 -+ _("undefined symbol %s used as an immediate value"),
21.40 -+ S_GET_NAME (fixP->fx_addsy));
21.41 -+ break;
21.42 -+ }
21.43 -+
21.44 - newimm = validate_immediate (value);
21.45 - temp = md_chars_to_number (buf, INSN_SIZE);
21.46 -
21.47 -@@ -12202,7 +12216,6 @@
21.48 -
21.49 - newimm |= (temp & 0xfffff000);
21.50 - md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
21.51 -- fixP->fx_done = 1;
21.52 - break;
21.53 -
21.54 - case BFD_RELOC_ARM_ADRL_IMMEDIATE:
22.1 --- a/patches/binutils/2.15/210-skip-comments.patch Wed Oct 21 18:08:31 2009 +0200
22.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
22.3 @@ -1,101 +0,0 @@
22.4 -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
22.5 -Fixes
22.6 -localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
22.7 -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
22.8 -
22.9 -Paths adjusted to match crosstool's patcher.
22.10 -
22.11 -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
22.12 -From: Andreas Schwab <schwab at suse dot de>
22.13 -To: Nathan Sidwell <nathan at codesourcery dot com>
22.14 -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
22.15 -Date: Fri, 23 Apr 2004 22:27:19 +0200
22.16 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
22.17 -
22.18 -Nathan Sidwell <nathan@codesourcery.com> writes:
22.19 -
22.20 -> Index: read.c
22.21 -> ===================================================================
22.22 -> RCS file: /cvs/src/src/gas/read.c,v
22.23 -> retrieving revision 1.76
22.24 -> diff -c -3 -p -r1.76 read.c
22.25 -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
22.26 -> --- read.c 18 Mar 2004 09:56:05 -0000
22.27 -> *************** read_a_source_file (char *name)
22.28 -> *** 1053,1059 ****
22.29 -> #endif
22.30 -> input_line_pointer--;
22.31 -> /* Report unknown char as ignored. */
22.32 -> ! ignore_rest_of_line ();
22.33 -> }
22.34 ->
22.35 -> #ifdef md_after_pass_hook
22.36 -> --- 1053,1059 ----
22.37 -> #endif
22.38 -> input_line_pointer--;
22.39 -> /* Report unknown char as ignored. */
22.40 -> ! demand_empty_rest_of_line ();
22.41 -> }
22.42 ->
22.43 -> #ifdef md_after_pass_hook
22.44 -
22.45 -This means that the unknown character is no longer ignored, despite the
22.46 -comment. As a side effect a line starting with a line comment character
22.47 -not followed by APP in NO_APP mode now triggers an error instead of just a
22.48 -warning, breaking builds of glibc on m68k-linux. Earlier in
22.49 -read_a_source_file where #APP is handled there is another comment that
22.50 -claims that unknown comments are ignored, when in fact they aren't (only
22.51 -the initial line comment character is skipped).
22.52 -
22.53 -Note that the presence of #APP will mess up the line counters, but
22.54 -that appears to be difficult to fix.
22.55 -
22.56 -Andreas.
22.57 -
22.58 -2004-04-23 Andreas Schwab <schwab@suse.de>
22.59 -
22.60 - * read.c (read_a_source_file): Ignore unknown text after line
22.61 - comment character. Fix misleading comment.
22.62 -
22.63 ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
22.64 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
22.65 -@@ -1,6 +1,6 @@
22.66 - /* read.c - read a source file -
22.67 - Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
22.68 -- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
22.69 -+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
22.70 -
22.71 - This file is part of GAS, the GNU Assembler.
22.72 -
22.73 -@@ -950,10 +950,14 @@ read_a_source_file (char *name)
22.74 - unsigned int new_length;
22.75 - char *tmp_buf = 0;
22.76 -
22.77 -- bump_line_counters ();
22.78 - s = input_line_pointer;
22.79 - if (strncmp (s, "APP\n", 4))
22.80 -- continue; /* We ignore it */
22.81 -+ {
22.82 -+ /* We ignore it */
22.83 -+ ignore_rest_of_line ();
22.84 -+ continue;
22.85 -+ }
22.86 -+ bump_line_counters ();
22.87 - s += 4;
22.88 -
22.89 - sb_new (&sbuf);
22.90 -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
22.91 - continue;
22.92 - #endif
22.93 - input_line_pointer--;
22.94 -- /* Report unknown char as ignored. */
22.95 -+ /* Report unknown char as error. */
22.96 - demand_empty_rest_of_line ();
22.97 - }
22.98 -
22.99 -
22.100 ---
22.101 -Andreas Schwab, SuSE Labs, schwab@suse.de
22.102 -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
22.103 -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
22.104 -"And now for something completely different."
23.1 --- a/patches/binutils/2.15/220-cross-gprof.patch Wed Oct 21 18:08:31 2009 +0200
23.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
23.3 @@ -1,22 +0,0 @@
23.4 ---- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
23.5 -+++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
23.6 -@@ -999,7 +999,7 @@
23.7 -
23.8 - # Some tools are only suitable for building in a "native" situation.
23.9 - # Remove these if host!=target.
23.10 --native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
23.11 -+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
23.12 -
23.13 - # Similarly, some are only suitable for cross toolchains.
23.14 - # Remove these if host=target.
23.15 ---- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
23.16 -+++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
23.17 -@@ -236,7 +236,7 @@
23.18 -
23.19 - # Some tools are only suitable for building in a "native" situation.
23.20 - # Remove these if host!=target.
23.21 --native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
23.22 -+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
23.23 -
23.24 - # Similarly, some are only suitable for cross toolchains.
23.25 - # Remove these if host=target.
24.1 --- a/patches/binutils/2.15/230-gccpr15247-fix.patch Wed Oct 21 18:08:31 2009 +0200
24.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
24.3 @@ -1,192 +0,0 @@
24.4 -See
24.5 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
24.6 -
24.7 -Fixes spurious error
24.8 -/tmp/ccvNi4ou.s: Assembler messages:
24.9 -/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
24.10 -make[2]: *** [/home/dank/wk/crosstool-0.28-rc10/build/sparc64-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/math/dosincos.o] Error 1
24.11 -
24.12 -when compiling glibc's dosincos.c with gcc-3.4.0
24.13 -
24.14 -===================================================================
24.15 -RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
24.16 -retrieving revision 1.9
24.17 -retrieving revision 1.10
24.18 -diff -u -r1.9 -r1.10
24.19 ---- src/opcodes/sparc-opc.c 2004/01/18 23:46:32 1.9
24.20 -+++ src/opcodes/sparc-opc.c 2004/04/20 10:23:51 1.10
24.21 -@@ -1273,110 +1273,72 @@
24.22 - #define FM_DF 2 /* v9 */
24.23 - #define FM_QF 3 /* v9 */
24.24 -
24.25 --#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
24.26 --{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags, v9 }, \
24.27 --{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags, v9 }
24.28 --
24.29 --#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
24.30 --{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
24.31 --{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
24.32 --{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
24.33 --{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
24.34 -+#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
24.35 -+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags, v9 }, \
24.36 -+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags, v9 }
24.37 -+
24.38 -+#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
24.39 -+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
24.40 -+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
24.41 -+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
24.42 -+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
24.43 -
24.44 - /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
24.45 --#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
24.46 --{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags | F_FLOAT, v9 }, \
24.47 --{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
24.48 --{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags | F_FLOAT, v9 }, \
24.49 --{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
24.50 --{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
24.51 --{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
24.52 --
24.53 --/* v9 */ fmovcc ("fmovda", FM_DF, CONDA, FCONDA, 0),
24.54 --/* v9 */ fmovcc ("fmovqa", FM_QF, CONDA, FCONDA, 0),
24.55 --/* v9 */ fmovcc ("fmovsa", FM_SF, CONDA, FCONDA, 0),
24.56 --/* v9 */ fmovicc ("fmovdcc", FM_DF, CONDCC, 0),
24.57 --/* v9 */ fmovicc ("fmovqcc", FM_QF, CONDCC, 0),
24.58 --/* v9 */ fmovicc ("fmovscc", FM_SF, CONDCC, 0),
24.59 --/* v9 */ fmovicc ("fmovdcs", FM_DF, CONDCS, 0),
24.60 --/* v9 */ fmovicc ("fmovqcs", FM_QF, CONDCS, 0),
24.61 --/* v9 */ fmovicc ("fmovscs", FM_SF, CONDCS, 0),
24.62 --/* v9 */ fmovcc ("fmovde", FM_DF, CONDE, FCONDE, 0),
24.63 --/* v9 */ fmovcc ("fmovqe", FM_QF, CONDE, FCONDE, 0),
24.64 --/* v9 */ fmovcc ("fmovse", FM_SF, CONDE, FCONDE, 0),
24.65 --/* v9 */ fmovcc ("fmovdg", FM_DF, CONDG, FCONDG, 0),
24.66 --/* v9 */ fmovcc ("fmovqg", FM_QF, CONDG, FCONDG, 0),
24.67 --/* v9 */ fmovcc ("fmovsg", FM_SF, CONDG, FCONDG, 0),
24.68 --/* v9 */ fmovcc ("fmovdge", FM_DF, CONDGE, FCONDGE, 0),
24.69 --/* v9 */ fmovcc ("fmovqge", FM_QF, CONDGE, FCONDGE, 0),
24.70 --/* v9 */ fmovcc ("fmovsge", FM_SF, CONDGE, FCONDGE, 0),
24.71 --/* v9 */ fmovicc ("fmovdgeu", FM_DF, CONDGEU, F_ALIAS),
24.72 --/* v9 */ fmovicc ("fmovqgeu", FM_QF, CONDGEU, F_ALIAS),
24.73 --/* v9 */ fmovicc ("fmovsgeu", FM_SF, CONDGEU, F_ALIAS),
24.74 --/* v9 */ fmovicc ("fmovdgu", FM_DF, CONDGU, 0),
24.75 --/* v9 */ fmovicc ("fmovqgu", FM_QF, CONDGU, 0),
24.76 --/* v9 */ fmovicc ("fmovsgu", FM_SF, CONDGU, 0),
24.77 --/* v9 */ fmovcc ("fmovdl", FM_DF, CONDL, FCONDL, 0),
24.78 --/* v9 */ fmovcc ("fmovql", FM_QF, CONDL, FCONDL, 0),
24.79 --/* v9 */ fmovcc ("fmovsl", FM_SF, CONDL, FCONDL, 0),
24.80 --/* v9 */ fmovcc ("fmovdle", FM_DF, CONDLE, FCONDLE, 0),
24.81 --/* v9 */ fmovcc ("fmovqle", FM_QF, CONDLE, FCONDLE, 0),
24.82 --/* v9 */ fmovcc ("fmovsle", FM_SF, CONDLE, FCONDLE, 0),
24.83 --/* v9 */ fmovicc ("fmovdleu", FM_DF, CONDLEU, 0),
24.84 --/* v9 */ fmovicc ("fmovqleu", FM_QF, CONDLEU, 0),
24.85 --/* v9 */ fmovicc ("fmovsleu", FM_SF, CONDLEU, 0),
24.86 --/* v9 */ fmovfcc ("fmovdlg", FM_DF, FCONDLG, 0),
24.87 --/* v9 */ fmovfcc ("fmovqlg", FM_QF, FCONDLG, 0),
24.88 --/* v9 */ fmovfcc ("fmovslg", FM_SF, FCONDLG, 0),
24.89 --/* v9 */ fmovicc ("fmovdlu", FM_DF, CONDLU, F_ALIAS),
24.90 --/* v9 */ fmovicc ("fmovqlu", FM_QF, CONDLU, F_ALIAS),
24.91 --/* v9 */ fmovicc ("fmovslu", FM_SF, CONDLU, F_ALIAS),
24.92 --/* v9 */ fmovcc ("fmovdn", FM_DF, CONDN, FCONDN, 0),
24.93 --/* v9 */ fmovcc ("fmovqn", FM_QF, CONDN, FCONDN, 0),
24.94 --/* v9 */ fmovcc ("fmovsn", FM_SF, CONDN, FCONDN, 0),
24.95 --/* v9 */ fmovcc ("fmovdne", FM_DF, CONDNE, FCONDNE, 0),
24.96 --/* v9 */ fmovcc ("fmovqne", FM_QF, CONDNE, FCONDNE, 0),
24.97 --/* v9 */ fmovcc ("fmovsne", FM_SF, CONDNE, FCONDNE, 0),
24.98 --/* v9 */ fmovicc ("fmovdneg", FM_DF, CONDNEG, 0),
24.99 --/* v9 */ fmovicc ("fmovqneg", FM_QF, CONDNEG, 0),
24.100 --/* v9 */ fmovicc ("fmovsneg", FM_SF, CONDNEG, 0),
24.101 --/* v9 */ fmovcc ("fmovdnz", FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
24.102 --/* v9 */ fmovcc ("fmovqnz", FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
24.103 --/* v9 */ fmovcc ("fmovsnz", FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
24.104 --/* v9 */ fmovfcc ("fmovdo", FM_DF, FCONDO, 0),
24.105 --/* v9 */ fmovfcc ("fmovqo", FM_QF, FCONDO, 0),
24.106 --/* v9 */ fmovfcc ("fmovso", FM_SF, FCONDO, 0),
24.107 --/* v9 */ fmovicc ("fmovdpos", FM_DF, CONDPOS, 0),
24.108 --/* v9 */ fmovicc ("fmovqpos", FM_QF, CONDPOS, 0),
24.109 --/* v9 */ fmovicc ("fmovspos", FM_SF, CONDPOS, 0),
24.110 --/* v9 */ fmovfcc ("fmovdu", FM_DF, FCONDU, 0),
24.111 --/* v9 */ fmovfcc ("fmovqu", FM_QF, FCONDU, 0),
24.112 --/* v9 */ fmovfcc ("fmovsu", FM_SF, FCONDU, 0),
24.113 --/* v9 */ fmovfcc ("fmovdue", FM_DF, FCONDUE, 0),
24.114 --/* v9 */ fmovfcc ("fmovque", FM_QF, FCONDUE, 0),
24.115 --/* v9 */ fmovfcc ("fmovsue", FM_SF, FCONDUE, 0),
24.116 --/* v9 */ fmovfcc ("fmovdug", FM_DF, FCONDUG, 0),
24.117 --/* v9 */ fmovfcc ("fmovqug", FM_QF, FCONDUG, 0),
24.118 --/* v9 */ fmovfcc ("fmovsug", FM_SF, FCONDUG, 0),
24.119 --/* v9 */ fmovfcc ("fmovduge", FM_DF, FCONDUGE, 0),
24.120 --/* v9 */ fmovfcc ("fmovquge", FM_QF, FCONDUGE, 0),
24.121 --/* v9 */ fmovfcc ("fmovsuge", FM_SF, FCONDUGE, 0),
24.122 --/* v9 */ fmovfcc ("fmovdul", FM_DF, FCONDUL, 0),
24.123 --/* v9 */ fmovfcc ("fmovqul", FM_QF, FCONDUL, 0),
24.124 --/* v9 */ fmovfcc ("fmovsul", FM_SF, FCONDUL, 0),
24.125 --/* v9 */ fmovfcc ("fmovdule", FM_DF, FCONDULE, 0),
24.126 --/* v9 */ fmovfcc ("fmovqule", FM_QF, FCONDULE, 0),
24.127 --/* v9 */ fmovfcc ("fmovsule", FM_SF, FCONDULE, 0),
24.128 --/* v9 */ fmovicc ("fmovdvc", FM_DF, CONDVC, 0),
24.129 --/* v9 */ fmovicc ("fmovqvc", FM_QF, CONDVC, 0),
24.130 --/* v9 */ fmovicc ("fmovsvc", FM_SF, CONDVC, 0),
24.131 --/* v9 */ fmovicc ("fmovdvs", FM_DF, CONDVS, 0),
24.132 --/* v9 */ fmovicc ("fmovqvs", FM_QF, CONDVS, 0),
24.133 --/* v9 */ fmovicc ("fmovsvs", FM_SF, CONDVS, 0),
24.134 --/* v9 */ fmovcc ("fmovdz", FM_DF, CONDZ, FCONDZ, F_ALIAS),
24.135 --/* v9 */ fmovcc ("fmovqz", FM_QF, CONDZ, FCONDZ, F_ALIAS),
24.136 --/* v9 */ fmovcc ("fmovsz", FM_SF, CONDZ, FCONDZ, F_ALIAS),
24.137 --
24.138 -+#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
24.139 -+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags | F_FLOAT, v9 }, \
24.140 -+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
24.141 -+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags | F_FLOAT, v9 }, \
24.142 -+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
24.143 -+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
24.144 -+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
24.145 -+
24.146 -+#define fmovicc(suffix, cond, flags) /* v9 */ \
24.147 -+fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags), \
24.148 -+fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags), \
24.149 -+fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
24.150 -+
24.151 -+#define fmovfcc(suffix, fcond, flags) /* v9 */ \
24.152 -+fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags), \
24.153 -+fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags), \
24.154 -+fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
24.155 -+
24.156 -+#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
24.157 -+fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags), \
24.158 -+fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags), \
24.159 -+fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
24.160 -+
24.161 -+/* v9 */ fmovcc ("a", CONDA, FCONDA, 0),
24.162 -+/* v9 */ fmovicc ("cc", CONDCC, 0),
24.163 -+/* v9 */ fmovicc ("cs", CONDCS, 0),
24.164 -+/* v9 */ fmovcc ("e", CONDE, FCONDE, 0),
24.165 -+/* v9 */ fmovcc ("g", CONDG, FCONDG, 0),
24.166 -+/* v9 */ fmovcc ("ge", CONDGE, FCONDGE, 0),
24.167 -+/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
24.168 -+/* v9 */ fmovicc ("gu", CONDGU, 0),
24.169 -+/* v9 */ fmovcc ("l", CONDL, FCONDL, 0),
24.170 -+/* v9 */ fmovcc ("le", CONDLE, FCONDLE, 0),
24.171 -+/* v9 */ fmovicc ("leu", CONDLEU, 0),
24.172 -+/* v9 */ fmovfcc ("lg", FCONDLG, 0),
24.173 -+/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
24.174 -+/* v9 */ fmovcc ("n", CONDN, FCONDN, 0),
24.175 -+/* v9 */ fmovcc ("ne", CONDNE, FCONDNE, 0),
24.176 -+/* v9 */ fmovicc ("neg", CONDNEG, 0),
24.177 -+/* v9 */ fmovcc ("nz", CONDNZ, FCONDNZ, F_ALIAS),
24.178 -+/* v9 */ fmovfcc ("o", FCONDO, 0),
24.179 -+/* v9 */ fmovicc ("pos", CONDPOS, 0),
24.180 -+/* v9 */ fmovfcc ("u", FCONDU, 0),
24.181 -+/* v9 */ fmovfcc ("ue", FCONDUE, 0),
24.182 -+/* v9 */ fmovfcc ("ug", FCONDUG, 0),
24.183 -+/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
24.184 -+/* v9 */ fmovfcc ("ul", FCONDUL, 0),
24.185 -+/* v9 */ fmovfcc ("ule", FCONDULE, 0),
24.186 -+/* v9 */ fmovicc ("vc", CONDVC, 0),
24.187 -+/* v9 */ fmovicc ("vs", CONDVS, 0),
24.188 -+/* v9 */ fmovcc ("z", CONDZ, FCONDZ, F_ALIAS),
24.189 -+
24.190 -+#undef fmoviccx /* v9 */
24.191 -+#undef fmovfccx /* v9 */
24.192 -+#undef fmovccx /* v9 */
24.193 - #undef fmovicc /* v9 */
24.194 - #undef fmovfcc /* v9 */
24.195 - #undef fmovcc /* v9 */
25.1 --- a/patches/binutils/2.15/240-ld-callahan.patch Wed Oct 21 18:08:31 2009 +0200
25.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
25.3 @@ -1,677 +0,0 @@
25.4 -Signed-off-by: dank@kegel.com
25.5 -Fixes ld speed issue.
25.6 -See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
25.7 -See thread "Re: optimizations for 3x speedup in ld",
25.8 -http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
25.9 -
25.10 -Wildcard section matching enhancement, backported from the binutils CVS tree.
25.11 -Here's the CVS log comment from the original change to ldlang.c:
25.12 -
25.13 -revision 1.177
25.14 -date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
25.15 -2005-04-06 Jakub Jelinek <jakub@redhat.com>
25.16 -
25.17 - * ldlang.c: Formatting.
25.18 - (walk_wild_consider_section): Remember return value from wildcardp.
25.19 - (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
25.20 - (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
25.21 -
25.22 -2005-04-06 Robert O'Callahan <rocallahan@novell.com>
25.23 -
25.24 - * ld.h (lean_section_userdata_type): Remove.
25.25 - (fat_section_userdata_type): Remove file field.
25.26 - (SECTION_USERDATA_SIZE): Remove.
25.27 - * ldlang.c (init_os): Eliminate initialization of unused
25.28 - lean_section_userdata_type.
25.29 -
25.30 - * ldlang.h (callback_t, walk_wild_section_handler_t): New
25.31 - typedefs.
25.32 - (struct lang_wild_statement_struct): Add walk_wild_section_handler
25.33 - and handler_data fields.
25.34 - * ldlang.c (callback_t): Removed.
25.35 - (walk_wild_consider_section, walk_wild_section_general,
25.36 - section_iterator_callback, find_section, is_simple_wild,
25.37 - match_simple_wild, walk_wild_section_specs1_wild0,
25.38 - walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
25.39 - walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
25.40 - wild_spec_can_overlap, analyze_walk_wild_section_handler): New
25.41 - functions.
25.42 - (lang_add_wild): Call analyze_walk_wild_section_handler.
25.43 - (walk_wild_section): Renamed to walk_wild_section_general and
25.44 - created a wrapper function.
25.45 - (section_iterator_callback_data): New typedef.
25.46 -
25.47 -Note that bfd_get_section_by_name_if didn't exist in 2.15, so it was backported
25.48 -as well.
25.49 -
25.50 ---- binutils-2.15/bfd/bfd-in2.h.old 2004-05-17 15:35:56.000000000 -0400
25.51 -+++ binutils-2.15/bfd/bfd-in2.h 2006-02-09 11:54:45.989940000 -0500
25.52 -@@ -1425,6 +1425,10 @@
25.53 -
25.54 - asection *bfd_get_section_by_name (bfd *abfd, const char *name);
25.55 -
25.56 -+asection *bfd_get_section_by_name_if (bfd *abfd, const char *name,
25.57 -+ bfd_boolean (*operation) (bfd *, asection *, void *),
25.58 -+ void *user_storage);
25.59 -+
25.60 - char *bfd_get_unique_section_name
25.61 - (bfd *abfd, const char *templat, int *count);
25.62 -
25.63 ---- binutils-2.15/bfd/section.c.old 2003-12-01 01:33:01.000000000 -0500
25.64 -+++ binutils-2.15/bfd/section.c 2006-01-23 14:16:54.768993000 -0500
25.65 -@@ -801,6 +801,57 @@
25.66 -
25.67 - /*
25.68 - FUNCTION
25.69 -+ bfd_get_section_by_name_if
25.70 -+
25.71 -+SYNOPSIS
25.72 -+ asection *bfd_get_section_by_name_if
25.73 -+ (bfd *abfd,
25.74 -+ const char *name,
25.75 -+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
25.76 -+ void *obj);
25.77 -+
25.78 -+DESCRIPTION
25.79 -+ Call the provided function @var{func} for each section
25.80 -+ attached to the BFD @var{abfd} whose name matches @var{name},
25.81 -+ passing @var{obj} as an argument. The function will be called
25.82 -+ as if by
25.83 -+
25.84 -+| func (abfd, the_section, obj);
25.85 -+
25.86 -+ It returns the first section for which @var{func} returns true,
25.87 -+ otherwise <<NULL>>.
25.88 -+
25.89 -+*/
25.90 -+
25.91 -+asection *
25.92 -+bfd_get_section_by_name_if (bfd *abfd, const char *name,
25.93 -+ bfd_boolean (*operation) (bfd *,
25.94 -+ asection *,
25.95 -+ void *),
25.96 -+ void *user_storage)
25.97 -+{
25.98 -+ struct section_hash_entry *sh;
25.99 -+ unsigned long hash;
25.100 -+
25.101 -+ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
25.102 -+ if (sh == NULL)
25.103 -+ return NULL;
25.104 -+
25.105 -+ hash = sh->root.hash;
25.106 -+ do
25.107 -+ {
25.108 -+ if ((*operation) (abfd, &sh->section, user_storage))
25.109 -+ return &sh->section;
25.110 -+ sh = (struct section_hash_entry *) sh->root.next;
25.111 -+ }
25.112 -+ while (sh != NULL && sh->root.hash == hash
25.113 -+ && strcmp (sh->root.string, name) == 0);
25.114 -+
25.115 -+ return NULL;
25.116 -+}
25.117 -+
25.118 -+/*
25.119 -+FUNCTION
25.120 - bfd_get_unique_section_name
25.121 -
25.122 - SYNOPSIS
25.123 ---- binutils-2.15/ld/ldlang.c.old 2004-05-17 15:36:16.000000000 -0400
25.124 -+++ binutils-2.15/ld/ldlang.c 2006-01-23 13:40:12.745499000 -0500
25.125 -@@ -81,9 +81,6 @@
25.126 - static void lang_record_phdrs (void);
25.127 - static void lang_do_version_exports_section (void);
25.128 -
25.129 --typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
25.130 -- asection *, lang_input_statement_type *, void *);
25.131 --
25.132 - /* Exported variables. */
25.133 - lang_output_section_statement_type *abs_output_section;
25.134 - lang_statement_list_type lang_output_section_statement;
25.135 -@@ -138,21 +135,71 @@
25.136 -
25.137 - /* Generic traversal routines for finding matching sections. */
25.138 -
25.139 -+/* Try processing a section against a wildcard. This just calls
25.140 -+ the callback unless the filename exclusion list is present
25.141 -+ and excludes the file. It's hardly ever present so this
25.142 -+ function is very fast. */
25.143 -+
25.144 -+static void
25.145 -+walk_wild_consider_section (lang_wild_statement_type *ptr,
25.146 -+ lang_input_statement_type *file,
25.147 -+ asection *s,
25.148 -+ struct wildcard_list *sec,
25.149 -+ callback_t callback,
25.150 -+ void *data)
25.151 -+{
25.152 -+ bfd_boolean skip = FALSE;
25.153 -+ struct name_list *list_tmp;
25.154 -+
25.155 -+ /* Don't process sections from files which were
25.156 -+ excluded. */
25.157 -+ for (list_tmp = sec->spec.exclude_name_list;
25.158 -+ list_tmp;
25.159 -+ list_tmp = list_tmp->next)
25.160 -+ {
25.161 -+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
25.162 -+ if (is_wildcard)
25.163 -+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
25.164 -+ else
25.165 -+ skip = strcmp (list_tmp->name, file->filename) == 0;
25.166 -+
25.167 -+ /* If this file is part of an archive, and the archive is
25.168 -+ excluded, exclude this file. */
25.169 -+ if (! skip && file->the_bfd != NULL
25.170 -+ && file->the_bfd->my_archive != NULL
25.171 -+ && file->the_bfd->my_archive->filename != NULL)
25.172 -+ {
25.173 -+ if (is_wildcard)
25.174 -+ skip = fnmatch (list_tmp->name,
25.175 -+ file->the_bfd->my_archive->filename,
25.176 -+ 0) == 0;
25.177 -+ else
25.178 -+ skip = strcmp (list_tmp->name,
25.179 -+ file->the_bfd->my_archive->filename) == 0;
25.180 -+ }
25.181 -+
25.182 -+ if (skip)
25.183 -+ break;
25.184 -+ }
25.185 -+
25.186 -+ if (!skip)
25.187 -+ (*callback) (ptr, sec, s, file, data);
25.188 -+}
25.189 -+
25.190 -+/* Lowest common denominator routine that can handle everything correctly,
25.191 -+ but slowly. */
25.192 -+
25.193 - static void
25.194 --walk_wild_section (lang_wild_statement_type *ptr,
25.195 -- lang_input_statement_type *file,
25.196 -- callback_t callback,
25.197 -- void *data)
25.198 -+walk_wild_section_general (lang_wild_statement_type *ptr,
25.199 -+ lang_input_statement_type *file,
25.200 -+ callback_t callback,
25.201 -+ void *data)
25.202 - {
25.203 - asection *s;
25.204 --
25.205 -- if (file->just_syms_flag)
25.206 -- return;
25.207 -+ struct wildcard_list *sec;
25.208 -
25.209 - for (s = file->the_bfd->sections; s != NULL; s = s->next)
25.210 - {
25.211 -- struct wildcard_list *sec;
25.212 --
25.213 - sec = ptr->section_list;
25.214 - if (sec == NULL)
25.215 - (*callback) (ptr, sec, s, file, data);
25.216 -@@ -160,39 +207,8 @@
25.217 - while (sec != NULL)
25.218 - {
25.219 - bfd_boolean skip = FALSE;
25.220 -- struct name_list *list_tmp;
25.221 --
25.222 -- /* Don't process sections from files which were
25.223 -- excluded. */
25.224 -- for (list_tmp = sec->spec.exclude_name_list;
25.225 -- list_tmp;
25.226 -- list_tmp = list_tmp->next)
25.227 -- {
25.228 -- if (wildcardp (list_tmp->name))
25.229 -- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
25.230 -- else
25.231 -- skip = strcmp (list_tmp->name, file->filename) == 0;
25.232 --
25.233 -- /* If this file is part of an archive, and the archive is
25.234 -- excluded, exclude this file. */
25.235 -- if (! skip && file->the_bfd != NULL
25.236 -- && file->the_bfd->my_archive != NULL
25.237 -- && file->the_bfd->my_archive->filename != NULL)
25.238 -- {
25.239 -- if (wildcardp (list_tmp->name))
25.240 -- skip = fnmatch (list_tmp->name,
25.241 -- file->the_bfd->my_archive->filename,
25.242 -- 0) == 0;
25.243 -- else
25.244 -- skip = strcmp (list_tmp->name,
25.245 -- file->the_bfd->my_archive->filename) == 0;
25.246 -- }
25.247 --
25.248 -- if (skip)
25.249 -- break;
25.250 -- }
25.251 -
25.252 -- if (!skip && sec->spec.name != NULL)
25.253 -+ if (sec->spec.name != NULL)
25.254 - {
25.255 - const char *sname = bfd_get_section_name (file->the_bfd, s);
25.256 -
25.257 -@@ -203,13 +219,381 @@
25.258 - }
25.259 -
25.260 - if (!skip)
25.261 -- (*callback) (ptr, sec, s, file, data);
25.262 -+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
25.263 -
25.264 - sec = sec->next;
25.265 - }
25.266 - }
25.267 - }
25.268 -
25.269 -+/* Routines to find a single section given its name. If there's more
25.270 -+ than one section with that name, we report that. */
25.271 -+
25.272 -+typedef struct
25.273 -+{
25.274 -+ asection *found_section;
25.275 -+ bfd_boolean multiple_sections_found;
25.276 -+} section_iterator_callback_data;
25.277 -+
25.278 -+static bfd_boolean
25.279 -+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
25.280 -+{
25.281 -+ section_iterator_callback_data *d = data;
25.282 -+
25.283 -+ if (d->found_section != NULL)
25.284 -+ {
25.285 -+ d->multiple_sections_found = TRUE;
25.286 -+ return TRUE;
25.287 -+ }
25.288 -+
25.289 -+ d->found_section = s;
25.290 -+ return FALSE;
25.291 -+}
25.292 -+
25.293 -+static asection *
25.294 -+find_section (lang_input_statement_type *file,
25.295 -+ struct wildcard_list *sec,
25.296 -+ bfd_boolean *multiple_sections_found)
25.297 -+{
25.298 -+ section_iterator_callback_data cb_data = { NULL, FALSE };
25.299 -+
25.300 -+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
25.301 -+ section_iterator_callback, &cb_data);
25.302 -+ *multiple_sections_found = cb_data.multiple_sections_found;
25.303 -+ return cb_data.found_section;
25.304 -+}
25.305 -+
25.306 -+/* Code for handling simple wildcards without going through fnmatch,
25.307 -+ which can be expensive because of charset translations etc. */
25.308 -+
25.309 -+/* A simple wild is a literal string followed by a single '*',
25.310 -+ where the literal part is at least 4 characters long. */
25.311 -+
25.312 -+static bfd_boolean
25.313 -+is_simple_wild (const char *name)
25.314 -+{
25.315 -+ size_t len = strcspn (name, "*?[");
25.316 -+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
25.317 -+}
25.318 -+
25.319 -+static bfd_boolean
25.320 -+match_simple_wild (const char *pattern, const char *name)
25.321 -+{
25.322 -+ /* The first four characters of the pattern are guaranteed valid
25.323 -+ non-wildcard characters. So we can go faster. */
25.324 -+ if (pattern[0] != name[0] || pattern[1] != name[1]
25.325 -+ || pattern[2] != name[2] || pattern[3] != name[3])
25.326 -+ return FALSE;
25.327 -+
25.328 -+ pattern += 4;
25.329 -+ name += 4;
25.330 -+ while (*pattern != '*')
25.331 -+ if (*name++ != *pattern++)
25.332 -+ return FALSE;
25.333 -+
25.334 -+ return TRUE;
25.335 -+}
25.336 -+
25.337 -+/* Specialized, optimized routines for handling different kinds of
25.338 -+ wildcards */
25.339 -+
25.340 -+static void
25.341 -+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
25.342 -+ lang_input_statement_type *file,
25.343 -+ callback_t callback,
25.344 -+ void *data)
25.345 -+{
25.346 -+ /* We can just do a hash lookup for the section with the right name.
25.347 -+ But if that lookup discovers more than one section with the name
25.348 -+ (should be rare), we fall back to the general algorithm because
25.349 -+ we would otherwise have to sort the sections to make sure they
25.350 -+ get processed in the bfd's order. */
25.351 -+ bfd_boolean multiple_sections_found;
25.352 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
25.353 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
25.354 -+
25.355 -+ if (multiple_sections_found)
25.356 -+ walk_wild_section_general (ptr, file, callback, data);
25.357 -+ else if (s0)
25.358 -+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
25.359 -+}
25.360 -+
25.361 -+static void
25.362 -+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
25.363 -+ lang_input_statement_type *file,
25.364 -+ callback_t callback,
25.365 -+ void *data)
25.366 -+{
25.367 -+ asection *s;
25.368 -+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
25.369 -+
25.370 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
25.371 -+ {
25.372 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
25.373 -+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
25.374 -+
25.375 -+ if (!skip)
25.376 -+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
25.377 -+ }
25.378 -+}
25.379 -+
25.380 -+static void
25.381 -+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
25.382 -+ lang_input_statement_type *file,
25.383 -+ callback_t callback,
25.384 -+ void *data)
25.385 -+{
25.386 -+ asection *s;
25.387 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
25.388 -+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
25.389 -+ bfd_boolean multiple_sections_found;
25.390 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
25.391 -+
25.392 -+ if (multiple_sections_found)
25.393 -+ {
25.394 -+ walk_wild_section_general (ptr, file, callback, data);
25.395 -+ return;
25.396 -+ }
25.397 -+
25.398 -+ /* Note that if the section was not found, s0 is NULL and
25.399 -+ we'll simply never succeed the s == s0 test below. */
25.400 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
25.401 -+ {
25.402 -+ /* Recall that in this code path, a section cannot satisfy more
25.403 -+ than one spec, so if s == s0 then it cannot match
25.404 -+ wildspec1. */
25.405 -+ if (s == s0)
25.406 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
25.407 -+ else
25.408 -+ {
25.409 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
25.410 -+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
25.411 -+
25.412 -+ if (!skip)
25.413 -+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
25.414 -+ data);
25.415 -+ }
25.416 -+ }
25.417 -+}
25.418 -+
25.419 -+static void
25.420 -+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
25.421 -+ lang_input_statement_type *file,
25.422 -+ callback_t callback,
25.423 -+ void *data)
25.424 -+{
25.425 -+ asection *s;
25.426 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
25.427 -+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
25.428 -+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
25.429 -+ bfd_boolean multiple_sections_found;
25.430 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
25.431 -+
25.432 -+ if (multiple_sections_found)
25.433 -+ {
25.434 -+ walk_wild_section_general (ptr, file, callback, data);
25.435 -+ return;
25.436 -+ }
25.437 -+
25.438 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
25.439 -+ {
25.440 -+ if (s == s0)
25.441 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
25.442 -+ else
25.443 -+ {
25.444 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
25.445 -+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
25.446 -+
25.447 -+ if (!skip)
25.448 -+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
25.449 -+ else
25.450 -+ {
25.451 -+ skip = !match_simple_wild (wildsec2->spec.name, sname);
25.452 -+ if (!skip)
25.453 -+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
25.454 -+ data);
25.455 -+ }
25.456 -+ }
25.457 -+ }
25.458 -+}
25.459 -+
25.460 -+static void
25.461 -+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
25.462 -+ lang_input_statement_type *file,
25.463 -+ callback_t callback,
25.464 -+ void *data)
25.465 -+{
25.466 -+ asection *s;
25.467 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
25.468 -+ struct wildcard_list *sec1 = ptr->handler_data[1];
25.469 -+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
25.470 -+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
25.471 -+ bfd_boolean multiple_sections_found;
25.472 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
25.473 -+
25.474 -+ if (multiple_sections_found)
25.475 -+ {
25.476 -+ walk_wild_section_general (ptr, file, callback, data);
25.477 -+ return;
25.478 -+ }
25.479 -+
25.480 -+ s1 = find_section (file, sec1, &multiple_sections_found);
25.481 -+ if (multiple_sections_found)
25.482 -+ {
25.483 -+ walk_wild_section_general (ptr, file, callback, data);
25.484 -+ return;
25.485 -+ }
25.486 -+
25.487 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
25.488 -+ {
25.489 -+ if (s == s0)
25.490 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
25.491 -+ else
25.492 -+ if (s == s1)
25.493 -+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
25.494 -+ else
25.495 -+ {
25.496 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
25.497 -+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
25.498 -+ sname);
25.499 -+
25.500 -+ if (!skip)
25.501 -+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
25.502 -+ data);
25.503 -+ else
25.504 -+ {
25.505 -+ skip = !match_simple_wild (wildsec3->spec.name, sname);
25.506 -+ if (!skip)
25.507 -+ walk_wild_consider_section (ptr, file, s, wildsec3,
25.508 -+ callback, data);
25.509 -+ }
25.510 -+ }
25.511 -+ }
25.512 -+}
25.513 -+
25.514 -+static void
25.515 -+walk_wild_section (lang_wild_statement_type *ptr,
25.516 -+ lang_input_statement_type *file,
25.517 -+ callback_t callback,
25.518 -+ void *data)
25.519 -+{
25.520 -+ if (file->just_syms_flag)
25.521 -+ return;
25.522 -+
25.523 -+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
25.524 -+}
25.525 -+
25.526 -+/* Returns TRUE when name1 is a wildcard spec that might match
25.527 -+ something name2 can match. We're conservative: we return FALSE
25.528 -+ only if the prefixes of name1 and name2 are different up to the
25.529 -+ first wildcard character. */
25.530 -+
25.531 -+static bfd_boolean
25.532 -+wild_spec_can_overlap (const char *name1, const char *name2)
25.533 -+{
25.534 -+ size_t prefix1_len = strcspn (name1, "?*[");
25.535 -+ size_t prefix2_len = strcspn (name2, "?*[");
25.536 -+ size_t min_prefix_len;
25.537 -+
25.538 -+ /* Note that if there is no wildcard character, then we treat the
25.539 -+ terminating 0 as part of the prefix. Thus ".text" won't match
25.540 -+ ".text." or ".text.*", for example. */
25.541 -+ if (name1[prefix1_len] == '\0')
25.542 -+ prefix1_len++;
25.543 -+ if (name2[prefix2_len] == '\0')
25.544 -+ prefix2_len++;
25.545 -+
25.546 -+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
25.547 -+
25.548 -+ return memcmp (name1, name2, min_prefix_len) == 0;
25.549 -+}
25.550 -+
25.551 -+/* Select specialized code to handle various kinds of wildcard
25.552 -+ statements. */
25.553 -+
25.554 -+static void
25.555 -+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
25.556 -+{
25.557 -+ int sec_count = 0;
25.558 -+ int wild_name_count = 0;
25.559 -+ struct wildcard_list *sec;
25.560 -+ int signature;
25.561 -+ int data_counter;
25.562 -+
25.563 -+ ptr->walk_wild_section_handler = walk_wild_section_general;
25.564 -+
25.565 -+ /* Count how many wildcard_specs there are, and how many of those
25.566 -+ actually use wildcards in the name. Also, bail out if any of the
25.567 -+ wildcard names are NULL. (Can this actually happen?
25.568 -+ walk_wild_section used to test for it.) And bail out if any
25.569 -+ of the wildcards are more complex than a simple string
25.570 -+ ending in a single '*'. */
25.571 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
25.572 -+ {
25.573 -+ ++sec_count;
25.574 -+ if (sec->spec.name == NULL)
25.575 -+ return;
25.576 -+ if (wildcardp (sec->spec.name))
25.577 -+ {
25.578 -+ ++wild_name_count;
25.579 -+ if (!is_simple_wild (sec->spec.name))
25.580 -+ return;
25.581 -+ }
25.582 -+ }
25.583 -+
25.584 -+ /* The zero-spec case would be easy to optimize but it doesn't
25.585 -+ happen in practice. Likewise, more than 4 specs doesn't
25.586 -+ happen in practice. */
25.587 -+ if (sec_count == 0 || sec_count > 4)
25.588 -+ return;
25.589 -+
25.590 -+ /* Check that no two specs can match the same section. */
25.591 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
25.592 -+ {
25.593 -+ struct wildcard_list *sec2;
25.594 -+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
25.595 -+ {
25.596 -+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
25.597 -+ return;
25.598 -+ }
25.599 -+ }
25.600 -+
25.601 -+ signature = (sec_count << 8) + wild_name_count;
25.602 -+ switch (signature)
25.603 -+ {
25.604 -+ case 0x0100:
25.605 -+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
25.606 -+ break;
25.607 -+ case 0x0101:
25.608 -+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
25.609 -+ break;
25.610 -+ case 0x0201:
25.611 -+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
25.612 -+ break;
25.613 -+ case 0x0302:
25.614 -+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
25.615 -+ break;
25.616 -+ case 0x0402:
25.617 -+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
25.618 -+ break;
25.619 -+ default:
25.620 -+ return;
25.621 -+ }
25.622 -+
25.623 -+ /* Now fill the data array with pointers to the specs, first the
25.624 -+ specs with non-wildcard names, then the specs with wildcard
25.625 -+ names. It's OK to process the specs in different order from the
25.626 -+ given order, because we've already determined that no section
25.627 -+ will match more than one spec. */
25.628 -+ data_counter = 0;
25.629 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
25.630 -+ if (!wildcardp (sec->spec.name))
25.631 -+ ptr->handler_data[data_counter++] = sec;
25.632 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
25.633 -+ if (wildcardp (sec->spec.name))
25.634 -+ ptr->handler_data[data_counter++] = sec;
25.635 -+}
25.636 -+
25.637 - /* Handle a wild statement for a single file F. */
25.638 -
25.639 - static void
25.640 -@@ -4353,6 +4737,7 @@
25.641 - new->section_list = section_list;
25.642 - new->keep_sections = keep_sections;
25.643 - lang_list_init (&new->children);
25.644 -+ analyze_walk_wild_section_handler (new);
25.645 - }
25.646 -
25.647 - void
25.648 ---- binutils-2.15/ld/ldlang.h.old 2004-05-17 15:36:16.000000000 -0400
25.649 -+++ binutils-2.15/ld/ldlang.h 2006-01-23 13:32:33.653292000 -0500
25.650 -@@ -295,7 +295,17 @@
25.651 - union lang_statement_union *file;
25.652 - } lang_afile_asection_pair_statement_type;
25.653 -
25.654 --typedef struct lang_wild_statement_struct
25.655 -+typedef struct lang_wild_statement_struct lang_wild_statement_type;
25.656 -+
25.657 -+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
25.658 -+ asection *, lang_input_statement_type *, void *);
25.659 -+
25.660 -+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
25.661 -+ lang_input_statement_type *,
25.662 -+ callback_t callback,
25.663 -+ void *data);
25.664 -+
25.665 -+struct lang_wild_statement_struct
25.666 - {
25.667 - lang_statement_header_type header;
25.668 - const char *filename;
25.669 -@@ -303,7 +313,10 @@
25.670 - struct wildcard_list *section_list;
25.671 - bfd_boolean keep_sections;
25.672 - lang_statement_list_type children;
25.673 --} lang_wild_statement_type;
25.674 -+
25.675 -+ walk_wild_section_handler_t walk_wild_section_handler;
25.676 -+ struct wildcard_list *handler_data[4];
25.677 -+};
25.678 -
25.679 - typedef struct lang_address_statement_struct
25.680 - {
26.1 --- a/patches/binutils/2.15/250-ld-stabs-tweak.patch Wed Oct 21 18:08:31 2009 +0200
26.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
26.3 @@ -1,33 +0,0 @@
26.4 -Signed-off-by: dank@kegel.com
26.5 -
26.6 -See http://sourceware.org/ml/binutils/2005-12/msg00270.html
26.7 -http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
26.8 -
26.9 -STABS hash table size change, backported from the binutils CVS tree. Here's
26.10 -the CVS log comment for the original change:
26.11 -
26.12 -revision 1.25
26.13 -date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
26.14 -(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
26.15 -bfd_hash_table_init_n(...,251) so that the size of the hash table can be
26.16 -controlled by the user.
26.17 -
26.18 -Note that tunable hash table size changes were added after 2.15. The effect
26.19 -of this change is to make bfd use its default hash table size for the stabs
26.20 -hash as well.
26.21 -
26.22 -
26.23 ---- binutils-2.15/bfd/stabs.c.old 2004-05-17 15:36:04.000000000 -0400
26.24 -+++ binutils-2.15/bfd/stabs.c 2006-02-09 15:21:56.567014000 -0500
26.25 -@@ -241,9 +241,8 @@
26.26 - goto error_return;
26.27 - /* Make sure the first byte is zero. */
26.28 - (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
26.29 -- if (! bfd_hash_table_init_n (&sinfo->includes.root,
26.30 -- stab_link_includes_newfunc,
26.31 -- 251))
26.32 -+ if (! bfd_hash_table_init (&sinfo->includes.root,
26.33 -+ stab_link_includes_newfunc))
26.34 - goto error_return;
26.35 - sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
26.36 - sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
27.1 --- a/patches/binutils/2.15/260-s390-invalid-insn-format.patch Wed Oct 21 18:08:31 2009 +0200
27.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
27.3 @@ -1,42 +0,0 @@
27.4 -Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
27.5 -From: "Michael Geiger" <mcgege@gmx.de>
27.6 -To: <dank@kegel.com>
27.7 -Subject: Patch for cross compiling s/390 kernel on linux host
27.8 -Date: Tue, 31 Aug 2004 15:45:41 +0200
27.9 -
27.10 -Dear Dan,
27.11 -
27.12 -I had big problems compiling a kernel for s/390 on my linux host - I tried
27.13 -different chains from crosstool-0.28-rc34 and finally succeded with
27.14 -gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
27.15 -(attached).
27.16 -All compilations of the different kernel versions I tried stopped with
27.17 -"Invalid .insn format" somewhere. I checked the recent cvs version of
27.18 -binutils and applied the latest diff to gas/config/tc-s390.c and that solved
27.19 -it.
27.20 -
27.21 -Greetings
27.22 -
27.23 -Michael Geiger
27.24 -
27.25 -
27.26 -diff -u -r1.39 -r1.40
27.27 ---- src/gas/config/tc-s390.c 2004/05/06 11:01:48 1.39
27.28 -+++ src/gas/config/tc-s390.c 2004/06/15 12:38:08 1.40
27.29 -@@ -1596,13 +1596,13 @@
27.30 - if (exp.X_op == O_constant)
27.31 - {
27.32 - if ( ( opformat->oplen == 6
27.33 -- && exp.X_add_number >= 0
27.34 -+ && (addressT) exp.X_add_number >= 0
27.35 - && (addressT) exp.X_add_number < (1ULL << 48))
27.36 - || ( opformat->oplen == 4
27.37 -- && exp.X_add_number >= 0
27.38 -+ && (addressT) exp.X_add_number >= 0
27.39 - && (addressT) exp.X_add_number < (1ULL << 32))
27.40 - || ( opformat->oplen == 2
27.41 -- && exp.X_add_number >= 0
27.42 -+ && (addressT) exp.X_add_number >= 0
27.43 - && (addressT) exp.X_add_number < (1ULL << 16)))
27.44 - md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
27.45 - else
28.1 --- a/patches/gcc/2.95.3/100-arm-linux.patch Wed Oct 21 18:08:31 2009 +0200
28.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
28.3 @@ -1,647 +0,0 @@
28.4 ---------- snip -------
28.5 -Downloaded from ftp://ftp.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/gcc-2.95.3.diff.bz2
28.6 -Not sure what it fixes, but this appears to be The Patch used with gcc-2.95.3 on arm.
28.7 ---------- snip -------
28.8 -
28.9 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.c gcc-2.95.3/gcc/config/arm/arm.c
28.10 ---- gcc-2.95.3-orig/gcc/config/arm/arm.c Thu Jan 25 15:03:24 2001
28.11 -+++ gcc-2.95.3/gcc/config/arm/arm.c Fri Jul 20 19:39:11 2001
28.12 -@@ -1529,27 +1529,34 @@
28.13 - return gen_rtx_PLUS (Pmode, base, offset);
28.14 - }
28.15 - else if (GET_CODE (orig) == LABEL_REF)
28.16 -- current_function_uses_pic_offset_table = 1;
28.17 --
28.18 -- return orig;
28.19 --}
28.20 -+ {
28.21 -+ current_function_uses_pic_offset_table = 1;
28.22 -
28.23 --static rtx pic_rtx;
28.24 -+ if (NEED_PLT_GOT)
28.25 -+ {
28.26 -+ rtx pic_ref, address = gen_reg_rtx (Pmode);
28.27 -+
28.28 -+ emit_insn (gen_pic_load_addr (address, orig));
28.29 -+ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
28.30 -+ address);
28.31 -+ emit_move_insn (address, pic_ref);
28.32 -+ return address;
28.33 -+ }
28.34 -+ }
28.35 -
28.36 --int
28.37 --is_pic(x)
28.38 -- rtx x;
28.39 --{
28.40 -- if (x == pic_rtx)
28.41 -- return 1;
28.42 -- return 0;
28.43 -+ return orig;
28.44 - }
28.45 -
28.46 -+/* Generate code to load the PIC register. PROLOGUE is true if
28.47 -+ called from arm_expand_prologue (in which case we want the
28.48 -+ generated insns at the start of the function); false if called
28.49 -+ by an exception receiver that needs the PIC register reloaded
28.50 -+ (in which case the insns are just dumped at the current location). */
28.51 - void
28.52 --arm_finalize_pic ()
28.53 -+arm_finalize_pic (int prologue)
28.54 - {
28.55 - #ifndef AOF_ASSEMBLER
28.56 -- rtx l1, pic_tmp, pic_tmp2, seq;
28.57 -+ rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx;
28.58 - rtx global_offset_table;
28.59 -
28.60 - if (current_function_uses_pic_offset_table == 0)
28.61 -@@ -1578,7 +1585,10 @@
28.62 -
28.63 - seq = gen_sequence ();
28.64 - end_sequence ();
28.65 -- emit_insn_after (seq, get_insns ());
28.66 -+ if (prologue)
28.67 -+ emit_insn_after (seq, get_insns ());
28.68 -+ else
28.69 -+ emit_insn (seq);
28.70 -
28.71 - /* Need to emit this whether or not we obey regdecls,
28.72 - since setjmp/longjmp can cause life info to screw up. */
28.73 -@@ -5327,7 +5337,13 @@
28.74 - if (frame_pointer_needed)
28.75 - live_regs += 4;
28.76 -
28.77 -- if (live_regs)
28.78 -+ if (live_regs == 1 && regs_ever_live[LR_REGNUM]
28.79 -+ && ! lr_save_eliminated && ! really_return)
28.80 -+ {
28.81 -+ output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4"
28.82 -+ : "ldr%?%d0\t%|lr, [%|sp], #4", &operand);
28.83 -+ }
28.84 -+ else if (live_regs)
28.85 - {
28.86 - if (lr_save_eliminated || ! regs_ever_live[14])
28.87 - live_regs++;
28.88 -@@ -5446,7 +5462,7 @@
28.89 - rtx x;
28.90 -
28.91 - length = strlen (name);
28.92 -- alignlength = (length + 1) + 3 & ~3;
28.93 -+ alignlength = ((length + 1) + 3) & ~3;
28.94 -
28.95 - ASM_OUTPUT_ASCII (stream, name, length + 1);
28.96 - ASM_OUTPUT_ALIGN (stream, 2);
28.97 -@@ -5838,6 +5854,9 @@
28.98 - int store_arg_regs = 0;
28.99 - int volatile_func = (optimize > 0
28.100 - && TREE_THIS_VOLATILE (current_function_decl));
28.101 -+ rtx ip_rtx;
28.102 -+ int fp_offset = 0;
28.103 -+ rtx insn;
28.104 -
28.105 - /* Naked functions don't have prologues. */
28.106 - if (arm_naked_function_p (current_function_decl))
28.107 -@@ -5859,11 +5878,59 @@
28.108 - live_regs_mask |= 0x4000;
28.109 - }
28.110 -
28.111 -+ ip_rtx = gen_rtx_REG (SImode, IP_REGNUM);
28.112 -+
28.113 - if (frame_pointer_needed)
28.114 - {
28.115 -+ if (current_function_needs_context)
28.116 -+ {
28.117 -+ /* The Static chain register is the same as the IP register
28.118 -+ used as a scratch register during stack frame creation.
28.119 -+ To get around this need to find somewhere to store IP
28.120 -+ whilst the frame is being created. We try the following
28.121 -+ places in order:
28.122 -+
28.123 -+ 1. An unused argument register.
28.124 -+ 2. A slot on the stack above the frame. (This only
28.125 -+ works if the function is not a varargs function).
28.126 -+
28.127 -+ If neither of these places is available, we abort (for now). */
28.128 -+ if (regs_ever_live[3] == 0)
28.129 -+ {
28.130 -+ insn = gen_rtx_REG (SImode, 3);
28.131 -+ insn = gen_rtx_SET (SImode, insn, ip_rtx);
28.132 -+ insn = emit_insn (insn);
28.133 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.134 -+ }
28.135 -+ else if (current_function_pretend_args_size == 0)
28.136 -+ {
28.137 -+ insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx);
28.138 -+ insn = gen_rtx_MEM (SImode, insn);
28.139 -+ insn = gen_rtx_SET (VOIDmode, insn, ip_rtx);
28.140 -+ insn = emit_insn (insn);
28.141 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.142 -+ fp_offset = 4;
28.143 -+ }
28.144 -+ else
28.145 -+ /* FIXME - the way to handle this situation is to allow
28.146 -+ the pretend args to be dumped onto the stack, then
28.147 -+ reuse r3 to save IP. This would involve moving the
28.148 -+ copying os SP into IP until after the pretend args
28.149 -+ have been dumped, but this is not too hard. */
28.150 -+ error ("Unable to find a temporary location for static chanin register");
28.151 -+ }
28.152 -+
28.153 - live_regs_mask |= 0xD800;
28.154 -- emit_insn (gen_movsi (gen_rtx_REG (SImode, 12),
28.155 -- stack_pointer_rtx));
28.156 -+ if (fp_offset)
28.157 -+ {
28.158 -+ insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset));
28.159 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
28.160 -+ }
28.161 -+ else
28.162 -+ insn = gen_movsi (ip_rtx, stack_pointer_rtx);
28.163 -+
28.164 -+ insn = emit_insn (insn);
28.165 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.166 - }
28.167 -
28.168 - if (current_function_pretend_args_size)
28.169 -@@ -5927,9 +5994,31 @@
28.170 - }
28.171 -
28.172 - if (frame_pointer_needed)
28.173 -- emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12),
28.174 -- (GEN_INT
28.175 -- (-(4 + current_function_pretend_args_size)))));
28.176 -+ {
28.177 -+ insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset));
28.178 -+ insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn));
28.179 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.180 -+
28.181 -+ if (current_function_needs_context)
28.182 -+ {
28.183 -+ /* Recover the static chain register. */
28.184 -+ if (regs_ever_live [3] == 0)
28.185 -+ {
28.186 -+ insn = gen_rtx_REG (SImode, 3);
28.187 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
28.188 -+ insn = emit_insn (insn);
28.189 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.190 -+ }
28.191 -+ else /* if (current_function_pretend_args_size == 0) */
28.192 -+ {
28.193 -+ insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
28.194 -+ insn = gen_rtx_MEM (SImode, insn);
28.195 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
28.196 -+ insn = emit_insn (insn);
28.197 -+ RTX_FRAME_RELATED_P (insn) = 1;
28.198 -+ }
28.199 -+ }
28.200 -+ }
28.201 -
28.202 - if (amount != const0_rtx)
28.203 - {
28.204 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.h gcc-2.95.3/gcc/config/arm/arm.h
28.205 ---- gcc-2.95.3-orig/gcc/config/arm/arm.h Thu Jan 25 15:03:26 2001
28.206 -+++ gcc-2.95.3/gcc/config/arm/arm.h Fri Jul 20 19:39:11 2001
28.207 -@@ -601,14 +601,20 @@
28.208 - (TREE_CODE (EXP) == STRING_CST \
28.209 - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
28.210 -
28.211 -+#ifndef STRUCTURE_SIZE_BOUNDARY
28.212 - /* Every structures size must be a multiple of 32 bits. */
28.213 - /* This is for compatibility with ARMCC. ARM SDT Reference Manual
28.214 - (ARM DUI 0020D) page 2-20 says "Structures are aligned on word
28.215 - boundaries". */
28.216 --#ifndef STRUCTURE_SIZE_BOUNDARY
28.217 --#define STRUCTURE_SIZE_BOUNDARY 32
28.218 -+/* Setting this to 32 produces more efficient code, but the value set in previous
28.219 -+ versions of this toolchain was 8, which produces more compact structures. The
28.220 -+ command line option -mstructure_size_boundary=<n> can be used to change this
28.221 -+ value. */
28.222 -+#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
28.223 - #endif
28.224 -
28.225 -+extern int arm_structure_size_boundary;
28.226 -+
28.227 - /* Used when parsing command line option -mstructure_size_boundary. */
28.228 - extern const char * structure_size_string;
28.229 -
28.230 -@@ -768,6 +774,9 @@
28.231 - /* Specify the registers used for certain standard purposes.
28.232 - The values of these macros are register numbers. */
28.233 -
28.234 -+/* Register which holds return address from a subroutine call. */
28.235 -+#define LR_REGNUM 14
28.236 -+
28.237 - /* Define this if the program counter is overloaded on a register. */
28.238 - #define PC_REGNUM 15
28.239 -
28.240 -@@ -777,6 +786,9 @@
28.241 - /* Base register for access to local variables of the function. */
28.242 - #define FRAME_POINTER_REGNUM 25
28.243 -
28.244 -+/* Scratch register - used in all kinds of places, eg trampolines. */
28.245 -+#define IP_REGNUM 12
28.246 -+
28.247 - /* Define this to be where the real frame pointer is if it is not possible to
28.248 - work out the offset between the frame pointer and the automatic variables
28.249 - until after register allocation has taken place. FRAME_POINTER_REGNUM
28.250 -@@ -798,7 +810,7 @@
28.251 - /* The native (Norcroft) Pascal compiler for the ARM passes the static chain
28.252 - as an invisible last argument (possible since varargs don't exist in
28.253 - Pascal), so the following is not true. */
28.254 --#define STATIC_CHAIN_REGNUM 8
28.255 -+#define STATIC_CHAIN_REGNUM 12
28.256 -
28.257 - /* Register in which address to store a structure value
28.258 - is passed to a function. */
28.259 -@@ -1248,7 +1260,12 @@
28.260 - { \
28.261 - int volatile_func = arm_volatile_func (); \
28.262 - if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
28.263 -- (OFFSET) = 0; \
28.264 -+ { \
28.265 -+ if (! current_function_needs_context || ! frame_pointer_needed) \
28.266 -+ (OFFSET) = 0; \
28.267 -+ else \
28.268 -+ (OFFSET) = 4; \
28.269 -+ } \
28.270 - else if ((FROM) == FRAME_POINTER_REGNUM \
28.271 - && (TO) == STACK_POINTER_REGNUM) \
28.272 - (OFFSET) = (current_function_outgoing_args_size \
28.273 -@@ -1379,8 +1396,10 @@
28.274 -
28.275 - On the ARM, allow any integer (invalid ones are removed later by insn
28.276 - patterns), nice doubles and symbol_refs which refer to the function's
28.277 -- constant pool XXX. */
28.278 --#define LEGITIMATE_CONSTANT_P(X) (! label_mentioned_p (X))
28.279 -+ constant pool XXX.
28.280 -+
28.281 -+ When generating PIC code, allow anything. */
28.282 -+#define LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X))
28.283 -
28.284 - /* Symbols in the text segment can be accessed without indirecting via the
28.285 - constant pool; it may take an extra binary operation, but this is still
28.286 -@@ -1496,9 +1515,8 @@
28.287 - && INTVAL (op) <= 31) \
28.288 - goto LABEL; \
28.289 - } \
28.290 -- /* NASTY: Since this limits the addressing of unsigned byte loads */ \
28.291 - range = ((MODE) == HImode || (MODE) == QImode) \
28.292 -- ? (arm_arch4 ? 256 : 4095) : 4096; \
28.293 -+ ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096; \
28.294 - if (code == CONST_INT && INTVAL (INDEX) < range \
28.295 - && INTVAL (INDEX) > -range) \
28.296 - goto LABEL; \
28.297 -@@ -1812,14 +1830,15 @@
28.298 - data addresses in memory. */
28.299 - #define PIC_OFFSET_TABLE_REGNUM arm_pic_register
28.300 -
28.301 --#define FINALIZE_PIC arm_finalize_pic ()
28.302 -+#define FINALIZE_PIC arm_finalize_pic (1)
28.303 -
28.304 --/* We can't directly access anything that contains a symbol,
28.305 -+/* We can't directly access anything that contains a symbol or label,
28.306 - nor can we indirect via the constant pool. */
28.307 - #define LEGITIMATE_PIC_OPERAND_P(X) \
28.308 -- (! symbol_mentioned_p (X) \
28.309 -+ (! symbol_mentioned_p (X) && ! label_mentioned_p (X) \
28.310 - && (! CONSTANT_POOL_ADDRESS_P (X) \
28.311 -- || ! symbol_mentioned_p (get_pool_constant (X))))
28.312 -+ || (! symbol_mentioned_p (get_pool_constant (X))) \
28.313 -+ && (! label_mentioned_p (get_pool_constant (X)))))
28.314 -
28.315 - /* We need to know when we are making a constant pool; this determines
28.316 - whether data needs to be in the GOT or can be referenced via a GOT
28.317 -@@ -2046,17 +2065,9 @@
28.318 - else output_addr_const(STREAM, X); \
28.319 - }
28.320 -
28.321 --/* Handles PIC addr specially */
28.322 - #define OUTPUT_INT_ADDR_CONST(STREAM,X) \
28.323 - { \
28.324 -- if (flag_pic && GET_CODE(X) == CONST && is_pic(X)) \
28.325 -- { \
28.326 -- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0)); \
28.327 -- fputs(" - (", STREAM); \
28.328 -- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \
28.329 -- fputs(")", STREAM); \
28.330 -- } \
28.331 -- else output_addr_const(STREAM, X); \
28.332 -+ output_addr_const(STREAM, X); \
28.333 - \
28.334 - /* Mark symbols as position independent. We only do this in the \
28.335 - .text segment, not in the .data segment. */ \
28.336 -@@ -2170,8 +2181,7 @@
28.337 - int arm_return_in_memory PROTO ((Tree));
28.338 - int legitimate_pic_operand_p PROTO ((Rtx));
28.339 - Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));
28.340 --int is_pic PROTO ((Rtx));
28.341 --void arm_finalize_pic PROTO ((void));
28.342 -+void arm_finalize_pic PROTO ((int));
28.343 - int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode));
28.344 - int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int));
28.345 - int const_double_rtx_ok_for_fpu PROTO ((Rtx));
28.346 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md
28.347 ---- gcc-2.95.3-orig/gcc/config/arm/arm.md Thu Jan 25 15:03:27 2001
28.348 -+++ gcc-2.95.3/gcc/config/arm/arm.md Fri Jul 20 19:39:11 2001
28.349 -@@ -2629,7 +2629,8 @@
28.350 - : preserve_subexpressions_p ()));
28.351 - DONE;
28.352 - }
28.353 -- if (CONSTANT_P (operands[1]) && flag_pic)
28.354 -+ if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
28.355 -+ || label_mentioned_p (operands[1])) && flag_pic)
28.356 - operands[1] = legitimize_pic_address (operands[1], SImode,
28.357 - ((reload_in_progress
28.358 - || reload_completed)
28.359 -@@ -2721,6 +2722,15 @@
28.360 - return \"add%?\\t%0, %|pc, %0\";
28.361 - ")
28.362 -
28.363 -+(define_expand "builtin_setjmp_receiver"
28.364 -+ [(label_ref (match_operand 0 "" ""))]
28.365 -+ "flag_pic"
28.366 -+ "
28.367 -+{
28.368 -+ arm_finalize_pic (0);
28.369 -+ DONE;
28.370 -+}")
28.371 -+
28.372 - ;; If copying one reg to another we can set the condition codes according to
28.373 - ;; its value. Such a move is common after a return from subroutine and the
28.374 - ;; result is being tested against zero.
28.375 -@@ -6184,15 +6194,20 @@
28.376 - abort ();
28.377 - return \"\";
28.378 - }
28.379 -- strcpy (pattern, \"stmfd\\t%m0!, {%1\");
28.380 -- for (i = 1; i < XVECLEN (operands[2], 0); i++)
28.381 -+ if (XVECLEN (operands[2], 0) > 1)
28.382 - {
28.383 -- strcat (pattern, \", %|\");
28.384 -- strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
28.385 -+ strcpy (pattern, \"stmfd\\t%m0!, {%1\");
28.386 -+ for (i = 1; i < XVECLEN (operands[2], 0); i++)
28.387 -+ {
28.388 -+ strcat (pattern, \", %|\");
28.389 -+ strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
28.390 - 0))]);
28.391 -+ }
28.392 -+ strcat (pattern, \"}\");
28.393 -+ output_asm_insn (pattern, operands);
28.394 - }
28.395 -- strcat (pattern, \"}\");
28.396 -- output_asm_insn (pattern, operands);
28.397 -+ else
28.398 -+ output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
28.399 - return \"\";
28.400 - }"
28.401 - [(set_attr "type" "store4")])
28.402 -diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h
28.403 ---- gcc-2.95.3-orig/gcc/config/arm/elf.h Mon May 31 10:21:53 1999
28.404 -+++ gcc-2.95.3/gcc/config/arm/elf.h Fri Jul 20 19:39:11 2001
28.405 -@@ -167,15 +167,6 @@
28.406 - #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
28.407 - #endif
28.408 -
28.409 --/* Setting this to 32 produces more efficient code, but the value set in previous
28.410 -- versions of this toolchain was 8, which produces more compact structures. The
28.411 -- command line option -mstructure_size_boundary=<n> can be used to change this
28.412 -- value. */
28.413 --#undef STRUCTURE_SIZE_BOUNDARY
28.414 --#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
28.415 --
28.416 --extern int arm_structure_size_boundary;
28.417 --
28.418 - /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
28.419 - is a valid machine specific attribute for DECL.
28.420 - The attributes in ATTRIBUTES have previously been assigned to DECL. */
28.421 -diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h
28.422 ---- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h Mon Feb 22 17:47:57 1999
28.423 -+++ gcc-2.95.3/gcc/config/arm/linux-gas.h Fri Jul 20 19:39:11 2001
28.424 -@@ -1,6 +1,6 @@
28.425 - /* Definitions of target machine for GNU compiler.
28.426 - ARM Linux-based GNU systems version.
28.427 -- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
28.428 -+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
28.429 - Contributed by Russell King <rmk92@ecs.soton.ac.uk>.
28.430 -
28.431 - This file is part of GNU CC.
28.432 -@@ -79,5 +79,7 @@
28.433 - register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
28.434 - register unsigned long _end __asm ("a2") = (unsigned long) (END); \
28.435 - register unsigned long _flg __asm ("a3") = 0; \
28.436 -- __asm __volatile ("swi 0x9f0002"); \
28.437 -+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
28.438 -+ : "=r" (_beg) \
28.439 -+ : "0" (_beg), "r" (_end), "r" (_flg)); \
28.440 - }
28.441 -diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux
28.442 ---- gcc-2.95.3-orig/gcc/config/arm/t-linux Fri Mar 26 16:30:20 1999
28.443 -+++ gcc-2.95.3/gcc/config/arm/t-linux Fri Jul 20 20:46:19 2001
28.444 -@@ -1,6 +1,6 @@
28.445 - # Just for these, we omit the frame pointer since it makes such a big
28.446 - # difference. It is then pointless adding debugging.
28.447 --TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
28.448 -+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
28.449 - LIBGCC2_DEBUG_CFLAGS = -g0
28.450 -
28.451 - # Don't build enquire
28.452 -diff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c
28.453 ---- gcc-2.95.3-orig/gcc/final.c Mon Mar 12 13:07:59 2001
28.454 -+++ gcc-2.95.3/gcc/final.c Fri Jul 20 19:39:11 2001
28.455 -@@ -3652,8 +3652,9 @@
28.456 -
28.457 - output_addr_const (file, XEXP (x, 0));
28.458 - fprintf (file, "-");
28.459 -- if (GET_CODE (XEXP (x, 1)) == CONST_INT
28.460 -- && INTVAL (XEXP (x, 1)) < 0)
28.461 -+ if ((GET_CODE (XEXP (x, 1)) == CONST_INT
28.462 -+ && INTVAL (XEXP (x, 1)) < 0)
28.463 -+ || GET_CODE (XEXP (x, 1)) != CONST_INT)
28.464 - {
28.465 - fprintf (file, ASM_OPEN_PAREN);
28.466 - output_addr_const (file, XEXP (x, 1));
28.467 -diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c
28.468 ---- gcc-2.95.3-orig/gcc/function.c Thu Jan 25 15:03:15 2001
28.469 -+++ gcc-2.95.3/gcc/function.c Fri Jul 20 19:39:10 2001
28.470 -@@ -3053,6 +3053,105 @@
28.471 - extracted by usage MEM with narrower mode. */
28.472 - static rtx purge_addressof_replacements;
28.473 -
28.474 -+/* Return 1 if X and Y are identical-looking rtx's.
28.475 -+ This is the Lisp function EQUAL for rtx arguments. */
28.476 -+
28.477 -+int
28.478 -+rtx_equal_for_addressof_p (x, y)
28.479 -+ rtx x, y;
28.480 -+{
28.481 -+ register int i;
28.482 -+ register int j;
28.483 -+ register enum rtx_code code;
28.484 -+ register char *fmt;
28.485 -+
28.486 -+ if (x == y)
28.487 -+ return 1;
28.488 -+ if (x == 0 || y == 0)
28.489 -+ return 0;
28.490 -+
28.491 -+ code = GET_CODE (x);
28.492 -+ /* Rtx's of different codes cannot be equal. */
28.493 -+ if (code != GET_CODE (y))
28.494 -+ return 0;
28.495 -+
28.496 -+ /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
28.497 -+ (REG:SI x) and (REG:HI x) are NOT equivalent.
28.498 -+ But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */
28.499 -+
28.500 -+ if (code != MEM && (GET_MODE (x) != GET_MODE (y)))
28.501 -+ return 0;
28.502 -+
28.503 -+ /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */
28.504 -+
28.505 -+ if (code == REG)
28.506 -+ return REGNO (x) == REGNO (y);
28.507 -+ else if (code == LABEL_REF)
28.508 -+ return XEXP (x, 0) == XEXP (y, 0);
28.509 -+ else if (code == SYMBOL_REF)
28.510 -+ return XSTR (x, 0) == XSTR (y, 0);
28.511 -+ else if (code == SCRATCH || code == CONST_DOUBLE)
28.512 -+ return 0;
28.513 -+
28.514 -+ /* Compare the elements. If any pair of corresponding elements
28.515 -+ fail to match, return 0 for the whole things. */
28.516 -+
28.517 -+ fmt = GET_RTX_FORMAT (code);
28.518 -+ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
28.519 -+ {
28.520 -+ switch (fmt[i])
28.521 -+ {
28.522 -+ case 'w':
28.523 -+ if (XWINT (x, i) != XWINT (y, i))
28.524 -+ return 0;
28.525 -+ break;
28.526 -+
28.527 -+ case 'n':
28.528 -+ case 'i':
28.529 -+ if (XINT (x, i) != XINT (y, i))
28.530 -+ return 0;
28.531 -+ break;
28.532 -+
28.533 -+ case 'V':
28.534 -+ case 'E':
28.535 -+ /* Two vectors must have the same length. */
28.536 -+ if (XVECLEN (x, i) != XVECLEN (y, i))
28.537 -+ return 0;
28.538 -+
28.539 -+ /* And the corresponding elements must match. */
28.540 -+ for (j = 0; j < XVECLEN (x, i); j++)
28.541 -+ if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
28.542 -+ return 0;
28.543 -+ break;
28.544 -+
28.545 -+ case 'e':
28.546 -+ if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
28.547 -+ return 0;
28.548 -+ break;
28.549 -+
28.550 -+ case 'S':
28.551 -+ case 's':
28.552 -+ if (strcmp (XSTR (x, i), XSTR (y, i)))
28.553 -+ return 0;
28.554 -+ break;
28.555 -+
28.556 -+ case 'u':
28.557 -+ /* These are just backpointers, so they don't matter. */
28.558 -+ break;
28.559 -+
28.560 -+ case '0':
28.561 -+ break;
28.562 -+
28.563 -+ /* It is believed that rtx's at this level will never
28.564 -+ contain anything but integers and other rtx's,
28.565 -+ except for within LABEL_REFs and SYMBOL_REFs. */
28.566 -+ default:
28.567 -+ abort ();
28.568 -+ }
28.569 -+ }
28.570 -+ return 1;
28.571 -+}
28.572 -+
28.573 - /* Helper function for purge_addressof. See if the rtx expression at *LOC
28.574 - in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into
28.575 - the stack. */
28.576 -@@ -3133,7 +3232,7 @@
28.577 - for (tem = purge_bitfield_addressof_replacements;
28.578 - tem != NULL_RTX;
28.579 - tem = XEXP (XEXP (tem, 1), 1))
28.580 -- if (rtx_equal_p (x, XEXP (tem, 0)))
28.581 -+ if (rtx_equal_for_addressof_p (x, XEXP (tem, 0)))
28.582 - {
28.583 - *loc = XEXP (XEXP (tem, 1), 0);
28.584 - return;
28.585 -@@ -3143,7 +3242,7 @@
28.586 - for (tem = purge_addressof_replacements;
28.587 - tem != NULL_RTX;
28.588 - tem = XEXP (XEXP (tem, 1), 1))
28.589 -- if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))
28.590 -+ if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0)))
28.591 - {
28.592 - rtx z = XEXP (XEXP (tem, 1), 0);
28.593 -
28.594 -diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c
28.595 ---- gcc-2.95.3-orig/gcc/jump.c Thu Oct 21 08:24:03 1999
28.596 -+++ gcc-2.95.3/gcc/jump.c Fri Jul 20 19:39:10 2001
28.597 -@@ -115,7 +115,7 @@
28.598 - static rtx delete_unreferenced_labels PROTO((rtx));
28.599 - static void delete_noop_moves PROTO((rtx));
28.600 - static int calculate_can_reach_end PROTO((rtx, int, int));
28.601 --static int duplicate_loop_exit_test PROTO((rtx));
28.602 -+static int duplicate_loop_exit_test PROTO((rtx, int));
28.603 - static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *));
28.604 - static void do_cross_jump PROTO((rtx, rtx, rtx));
28.605 - static int jump_back_p PROTO((rtx, rtx));
28.606 -@@ -338,7 +338,7 @@
28.607 - && simplejump_p (temp1))
28.608 - {
28.609 - temp = PREV_INSN (insn);
28.610 -- if (duplicate_loop_exit_test (insn))
28.611 -+ if (duplicate_loop_exit_test (insn, after_regscan))
28.612 - {
28.613 - changed = 1;
28.614 - next = NEXT_INSN (temp);
28.615 -@@ -2548,8 +2548,9 @@
28.616 - values of regno_first_uid and regno_last_uid. */
28.617 -
28.618 - static int
28.619 --duplicate_loop_exit_test (loop_start)
28.620 -+duplicate_loop_exit_test (loop_start, after_regscan)
28.621 - rtx loop_start;
28.622 -+ int after_regscan;
28.623 - {
28.624 - rtx insn, set, reg, p, link;
28.625 - rtx copy = 0, first_copy = 0;
28.626 -@@ -2662,6 +2663,9 @@
28.627 - reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg));
28.628 - }
28.629 - }
28.630 -+
28.631 -+ if (after_regscan)
28.632 -+ reg_scan_update (exitcode, lastexit, max_reg);
28.633 -
28.634 - /* Now copy each insn. */
28.635 - for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
28.636 -diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c
28.637 ---- gcc-2.95.3-orig/gcc/varasm.c Mon Feb 19 15:02:02 2001
28.638 -+++ gcc-2.95.3/gcc/varasm.c Fri Jul 20 19:39:11 2001
28.639 -@@ -3286,7 +3286,10 @@
28.640 - value->un.addr.offset = - INTVAL (XEXP (x, 1));
28.641 - }
28.642 - else
28.643 -- abort ();
28.644 -+ {
28.645 -+ value->un.addr.base = x;
28.646 -+ value->un.addr.offset = 0;
28.647 -+ }
28.648 - break;
28.649 -
28.650 - default:
29.1 --- a/patches/gcc/2.95.3/110-backport-config.gcc-1.4.patch Wed Oct 21 18:08:31 2009 +0200
29.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
29.3 @@ -1,35 +0,0 @@
29.4 -# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.3&r2=1.4
29.5 -# Should fix error
29.6 -# Configuration powerpc-host_apple-darwin7.3.0 not supported
29.7 -# when configuring gcc-2.95 on Mac OS X for i686 target
29.8 -# Also create xm-darwin.h, seems to be required, else we get the error
29.9 -# In file included from .../gcc-2.95.3/gcc/gencheck.c:21:
29.10 -# hconfig.h:11:30: rs6000/xm-darwin.h: No such file or directory
29.11 -# make[1]: *** [gencheck.o] Error 1
29.12 -
29.13 -
29.14 ---- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
29.15 -+++ gcc-2.95.3/gcc/configure 2004-03-24 17:14:38.000000000 -0800
29.16 -@@ -5079,6 +5079,10 @@
29.17 - tmake_file=rs6000/t-beos
29.18 - xmake_file=rs6000/x-beos
29.19 - ;;
29.20 -+ powerpc-*-darwin*)
29.21 -+ xm_file="rs6000/xm-rs6000.h rs6000/xm-darwin.h"
29.22 -+ xmake_file=rs6000/x-darwin
29.23 -+ ;;
29.24 - powerpc-*-sysv* | powerpc-*-elf*)
29.25 - tm_file=rs6000/sysv4.h
29.26 - xm_file="xm-siglist.h rs6000/xm-sysv4.h"
29.27 ---- /dev/null 2003-01-30 02:24:37.000000000 -0800
29.28 -+++ gcc-3.0.4/gcc/config/rs6000/xm-darwin.h 2000-11-20 19:02:09.000000000 -0800
29.29 -@@ -0,0 +1,9 @@
29.30 -+/* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor. */
29.31 -+
29.32 -+#undef USG
29.33 -+
29.34 -+/* Override the usual setting, since Apple's GCC has lame bugs and
29.35 -+ can't handle the initializers. Someday the bugs will be fixed and
29.36 -+ we can get rid of this silliness. */
29.37 -+
29.38 -+#define HAVE_DESIGNATED_INITIALIZERS 0
30.1 --- a/patches/gcc/2.95.3/120-backport-config.gcc-1.92.patch Wed Oct 21 18:08:31 2009 +0200
30.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
30.3 @@ -1,39 +0,0 @@
30.4 -# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.91&r2=1.92
30.5 -# Should fix error
30.6 -# Configuration x86_64-host_unknown-linux-gnu not supported
30.7 -# when configuring gcc-2.95 on x86_64 build for i686 target
30.8 -# It's a bit silly, since tm_file refers to files that don't exist,
30.9 -# but as long as x86_64 is just the build machine, that doesn't matter.
30.10 -
30.11 ---- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
30.12 -+++ gcc-2.95.3/gcc/configure 2004-03-24 12:19:30.000000000 -0800
30.13 -@@ -2929,6 +2929,9 @@
30.14 - i[34567]86-*-*)
30.15 - cpu_type=i386
30.16 - ;;
30.17 -+ x86_64-*-*)
30.18 -+ cpu_type=i386
30.19 -+ ;;
30.20 - hppa*-*-*)
30.21 - cpu_type=pa
30.22 - ;;
30.23 -@@ -3643,6 +3646,19 @@
30.24 - thread_file='posix'
30.25 - fi
30.26 - ;;
30.27 -+ x86_64-*-linux*)
30.28 -+ xmake_file=x-linux
30.29 -+ tm_file="i386/biarch64.h i386/i386.h i386/att.h linux.h i386/x86-64.h \
30.30 -+ i386/linux64.h"
30.31 -+ tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
30.32 -+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
30.33 -+ gnu_ld=yes
30.34 -+ float_format=i386
30.35 -+ if test x$enable_threads = xyes; then
30.36 -+ thread_file='posix'
30.37 -+ fi
30.38 -+ ;;
30.39 -+
30.40 - i[34567]86-*-gnu*)
30.41 - float_format=i386
30.42 - ;;
31.1 --- a/patches/gcc/2.95.3/130-config.sub.patch Wed Oct 21 18:08:31 2009 +0200
31.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
31.3 @@ -1,1257 +0,0 @@
31.4 -# Backport from gcc-3.3.3
31.5 -# Fixes errors like
31.6 -# Invalid configuration `x86_64-host_unknown-linux-gnu': machine `x86_64-host_unknown' not recognized
31.7 -# Unrecognized host system name x86_64-host_unknown-linux-gnu.
31.8 -# when configuring on chip types or operating systems like x86_64 or Darwin
31.9 -# which are newer than gcc-2.95
31.10 -
31.11 ---- gcc-2.95.3/config.sub.old 1999-08-04 01:09:26.000000000 -0700
31.12 -+++ gcc-2.95.3/config.sub 2004-03-24 11:28:24.000000000 -0800
31.13 -@@ -1,6 +1,10 @@
31.14 - #! /bin/sh
31.15 --# Configuration validation subroutine script, version 1.1.
31.16 --# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
31.17 -+# Configuration validation subroutine script.
31.18 -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
31.19 -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
31.20 -+
31.21 -+timestamp='2003-01-28'
31.22 -+
31.23 - # This file is (in principle) common to ALL GNU software.
31.24 - # The presence of a machine in this file suggests that SOME GNU software
31.25 - # can handle that machine. It does not imply ALL GNU software can.
31.26 -@@ -25,6 +29,9 @@
31.27 - # configuration script generated by Autoconf, you may include it under
31.28 - # the same distribution terms that you use for the rest of that program.
31.29 -
31.30 -+# Please send patches to <config-patches@gnu.org>. Submit a context
31.31 -+# diff and a properly formatted ChangeLog entry.
31.32 -+#
31.33 - # Configuration subroutine to validate and canonicalize a configuration type.
31.34 - # Supply the specified configuration type as an argument.
31.35 - # If it is invalid, we print an error message on stderr and exit with code 1.
31.36 -@@ -45,30 +52,73 @@
31.37 - # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
31.38 - # It is wrong to echo any other type of specification.
31.39 -
31.40 --if [ x$1 = x ]
31.41 --then
31.42 -- echo Configuration name missing. 1>&2
31.43 -- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
31.44 -- echo "or $0 ALIAS" 1>&2
31.45 -- echo where ALIAS is a recognized configuration type. 1>&2
31.46 -- exit 1
31.47 --fi
31.48 -+me=`echo "$0" | sed -e 's,.*/,,'`
31.49 -
31.50 --# First pass through any local machine types.
31.51 --case $1 in
31.52 -- *local*)
31.53 -- echo $1
31.54 -- exit 0
31.55 -- ;;
31.56 -- *)
31.57 -- ;;
31.58 -+usage="\
31.59 -+Usage: $0 [OPTION] CPU-MFR-OPSYS
31.60 -+ $0 [OPTION] ALIAS
31.61 -+
31.62 -+Canonicalize a configuration name.
31.63 -+
31.64 -+Operation modes:
31.65 -+ -h, --help print this help, then exit
31.66 -+ -t, --time-stamp print date of last modification, then exit
31.67 -+ -v, --version print version number, then exit
31.68 -+
31.69 -+Report bugs and patches to <config-patches@gnu.org>."
31.70 -+
31.71 -+version="\
31.72 -+GNU config.sub ($timestamp)
31.73 -+
31.74 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
31.75 -+Free Software Foundation, Inc.
31.76 -+
31.77 -+This is free software; see the source for copying conditions. There is NO
31.78 -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
31.79 -+
31.80 -+help="
31.81 -+Try \`$me --help' for more information."
31.82 -+
31.83 -+# Parse command line
31.84 -+while test $# -gt 0 ; do
31.85 -+ case $1 in
31.86 -+ --time-stamp | --time* | -t )
31.87 -+ echo "$timestamp" ; exit 0 ;;
31.88 -+ --version | -v )
31.89 -+ echo "$version" ; exit 0 ;;
31.90 -+ --help | --h* | -h )
31.91 -+ echo "$usage"; exit 0 ;;
31.92 -+ -- ) # Stop option processing
31.93 -+ shift; break ;;
31.94 -+ - ) # Use stdin as input.
31.95 -+ break ;;
31.96 -+ -* )
31.97 -+ echo "$me: invalid option $1$help"
31.98 -+ exit 1 ;;
31.99 -+
31.100 -+ *local*)
31.101 -+ # First pass through any local machine types.
31.102 -+ echo $1
31.103 -+ exit 0;;
31.104 -+
31.105 -+ * )
31.106 -+ break ;;
31.107 -+ esac
31.108 -+done
31.109 -+
31.110 -+case $# in
31.111 -+ 0) echo "$me: missing argument$help" >&2
31.112 -+ exit 1;;
31.113 -+ 1) ;;
31.114 -+ *) echo "$me: too many arguments$help" >&2
31.115 -+ exit 1;;
31.116 - esac
31.117 -
31.118 - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
31.119 - # Here we must recognize all the valid KERNEL-OS combinations.
31.120 - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
31.121 - case $maybe_os in
31.122 -- linux-gnu*)
31.123 -+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
31.124 - os=-$maybe_os
31.125 - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
31.126 - ;;
31.127 -@@ -94,20 +144,28 @@
31.128 - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
31.129 - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
31.130 - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
31.131 -- -apple)
31.132 -+ -apple | -axis)
31.133 - os=
31.134 - basic_machine=$1
31.135 - ;;
31.136 -- -sim | -cisco | -oki | -wec | -winbond ) # EGCS LOCAL
31.137 -+ -sim | -cisco | -oki | -wec | -winbond)
31.138 - os=
31.139 - basic_machine=$1
31.140 - ;;
31.141 -- -scout) # EGCS LOCAL
31.142 -+ -scout)
31.143 - ;;
31.144 -- -wrs) # EGCS LOCAL
31.145 -+ -wrs)
31.146 - os=-vxworks
31.147 - basic_machine=$1
31.148 - ;;
31.149 -+ -chorusos*)
31.150 -+ os=-chorusos
31.151 -+ basic_machine=$1
31.152 -+ ;;
31.153 -+ -chorusrdb)
31.154 -+ os=-chorusrdb
31.155 -+ basic_machine=$1
31.156 -+ ;;
31.157 - -hiux*)
31.158 - os=-hiuxwe2
31.159 - ;;
31.160 -@@ -156,49 +214,72 @@
31.161 - -psos*)
31.162 - os=-psos
31.163 - ;;
31.164 -+ -mint | -mint[0-9]*)
31.165 -+ basic_machine=m68k-atari
31.166 -+ os=-mint
31.167 -+ ;;
31.168 - esac
31.169 -
31.170 - # Decode aliases for certain CPU-COMPANY combinations.
31.171 - case $basic_machine in
31.172 - # Recognize the basic CPU types without company name.
31.173 - # Some are omitted here because they have special meanings below.
31.174 -- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
31.175 -- | arme[lb] | pyramid | mn10200 | mn10300 \
31.176 -- | tron | a29k | 580 | i960 | h8300 \
31.177 -- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
31.178 -- | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
31.179 -- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
31.180 -- | 1750a | dsp16xx | pdp11 \
31.181 -- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
31.182 -- | mipstx39 | mipstx39el \
31.183 -- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
31.184 -- basic_machine=$basic_machine-unknown
31.185 -- ;;
31.186 -- m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
31.187 -- | h8500 | w65) # EGCS LOCAL
31.188 -- ;;
31.189 -- thumb)
31.190 -- basic_machine=$basic_machine-unknown
31.191 -- ;;
31.192 -- mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
31.193 -+ 1750a | 580 \
31.194 -+ | a29k \
31.195 -+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
31.196 -+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
31.197 -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
31.198 -+ | clipper \
31.199 -+ | d10v | d30v | dlx | dsp16xx \
31.200 -+ | fr30 | frv \
31.201 -+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
31.202 -+ | i370 | i860 | i960 | ia64 \
31.203 -+ | ip2k \
31.204 -+ | m32r | m68000 | m68k | m88k | mcore \
31.205 -+ | mips | mipsbe | mipseb | mipsel | mipsle \
31.206 -+ | mips16 \
31.207 -+ | mips64 | mips64el \
31.208 -+ | mips64vr | mips64vrel \
31.209 -+ | mips64orion | mips64orionel \
31.210 -+ | mips64vr4100 | mips64vr4100el \
31.211 -+ | mips64vr4300 | mips64vr4300el \
31.212 -+ | mips64vr5000 | mips64vr5000el \
31.213 -+ | mipsisa32 | mipsisa32el \
31.214 -+ | mipsisa32r2 | mipsisa32r2el \
31.215 -+ | mipsisa64 | mipsisa64el \
31.216 -+ | mipsisa64sb1 | mipsisa64sb1el \
31.217 -+ | mipsisa64sr71k | mipsisa64sr71kel \
31.218 -+ | mipstx39 | mipstx39el \
31.219 -+ | mn10200 | mn10300 \
31.220 -+ | msp430 \
31.221 -+ | ns16k | ns32k \
31.222 -+ | openrisc | or32 \
31.223 -+ | pdp10 | pdp11 | pj | pjl \
31.224 -+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
31.225 -+ | pyramid \
31.226 -+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
31.227 -+ | sh64 | sh64le \
31.228 -+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
31.229 -+ | strongarm \
31.230 -+ | tahoe | thumb | tic80 | tron \
31.231 -+ | v850 | v850e \
31.232 -+ | we32k \
31.233 -+ | x86 | xscale | xstormy16 | xtensa \
31.234 -+ | z8k)
31.235 - basic_machine=$basic_machine-unknown
31.236 - ;;
31.237 -- mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
31.238 -- basic_machine=$basic_machine-unknown
31.239 -- ;;
31.240 -- mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
31.241 -- basic_machine=$basic_machine-unknown
31.242 -- ;;
31.243 -- mips16)
31.244 -+ m6811 | m68hc11 | m6812 | m68hc12)
31.245 -+ # Motorola 68HC11/12.
31.246 - basic_machine=$basic_machine-unknown
31.247 -+ os=-none
31.248 - ;;
31.249 -- d10v)
31.250 -- basic_machine=$basic_machine-unknown
31.251 -+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
31.252 - ;;
31.253 -+
31.254 - # We use `pc' rather than `unknown'
31.255 - # because (1) that's what they normally are, and
31.256 - # (2) the word "unknown" tends to confuse beginning users.
31.257 -- i[34567]86)
31.258 -+ i*86 | x86_64)
31.259 - basic_machine=$basic_machine-pc
31.260 - ;;
31.261 - # Object if more than one company name word.
31.262 -@@ -207,44 +288,62 @@
31.263 - exit 1
31.264 - ;;
31.265 - # Recognize the basic CPU types with company name.
31.266 -- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
31.267 -- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
31.268 -- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
31.269 -- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
31.270 -- | xmp-* | ymp-* \
31.271 -- | hppa-* | hppa1.0-* | hppa1.1-* \
31.272 -- | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
31.273 -- | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
31.274 -- | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
31.275 -- | xps100-* | clipper-* | orion-* \
31.276 -- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
31.277 -- | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
31.278 -- | mips64el-* | mips64orion-* | mips64orionel-* \
31.279 -- | mipstx39-* | mipstx39el-* \
31.280 -- | f301-* | arm*-*)
31.281 -- ;;
31.282 -- m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
31.283 -- ;;
31.284 -- thumb-*) # EGCS LOCAL angela/thumb
31.285 -- ;;
31.286 -- v850-*) # EGCS LOCAL
31.287 -- ;;
31.288 -- d30v-*) # EGCS LOCAL
31.289 -- ;;
31.290 -- mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
31.291 -- ;;
31.292 -- mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
31.293 -- ;;
31.294 -- mips16-*) # EGCS LOCAL krk/mips16
31.295 -- ;;
31.296 -- tic30-*) # EGCS LOCAL ian/tic30
31.297 -- ;;
31.298 -- c30-*) # EGCS LOCAL ian/tic30
31.299 -- basic_machine=tic30-unknown
31.300 -+ 580-* \
31.301 -+ | a29k-* \
31.302 -+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
31.303 -+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
31.304 -+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
31.305 -+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
31.306 -+ | avr-* \
31.307 -+ | bs2000-* \
31.308 -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
31.309 -+ | clipper-* | cydra-* \
31.310 -+ | d10v-* | d30v-* | dlx-* \
31.311 -+ | elxsi-* \
31.312 -+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
31.313 -+ | h8300-* | h8500-* \
31.314 -+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
31.315 -+ | i*86-* | i860-* | i960-* | ia64-* \
31.316 -+ | ip2k-* \
31.317 -+ | m32r-* \
31.318 -+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
31.319 -+ | m88110-* | m88k-* | mcore-* \
31.320 -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
31.321 -+ | mips16-* \
31.322 -+ | mips64-* | mips64el-* \
31.323 -+ | mips64vr-* | mips64vrel-* \
31.324 -+ | mips64orion-* | mips64orionel-* \
31.325 -+ | mips64vr4100-* | mips64vr4100el-* \
31.326 -+ | mips64vr4300-* | mips64vr4300el-* \
31.327 -+ | mips64vr5000-* | mips64vr5000el-* \
31.328 -+ | mipsisa32-* | mipsisa32el-* \
31.329 -+ | mipsisa32r2-* | mipsisa32r2el-* \
31.330 -+ | mipsisa64-* | mipsisa64el-* \
31.331 -+ | mipsisa64sb1-* | mipsisa64sb1el-* \
31.332 -+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
31.333 -+ | mipstx39-* | mipstx39el-* \
31.334 -+ | msp430-* \
31.335 -+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
31.336 -+ | orion-* \
31.337 -+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
31.338 -+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
31.339 -+ | pyramid-* \
31.340 -+ | romp-* | rs6000-* \
31.341 -+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
31.342 -+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
31.343 -+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
31.344 -+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
31.345 -+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
31.346 -+ | v850-* | v850e-* | vax-* \
31.347 -+ | we32k-* \
31.348 -+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
31.349 -+ | xtensa-* \
31.350 -+ | ymp-* \
31.351 -+ | z8k-*)
31.352 - ;;
31.353 - # Recognize the various machine names and aliases which stand
31.354 - # for a CPU type and a company and sometimes even an OS.
31.355 -- 386bsd) # EGCS LOCAL
31.356 -+ 386bsd)
31.357 - basic_machine=i386-unknown
31.358 - os=-bsd
31.359 - ;;
31.360 -@@ -254,11 +353,11 @@
31.361 - 3b*)
31.362 - basic_machine=we32k-att
31.363 - ;;
31.364 -- a29khif) # EGCS LOCAL
31.365 -+ a29khif)
31.366 - basic_machine=a29k-amd
31.367 - os=-udi
31.368 - ;;
31.369 -- adobe68k) # EGCS LOCAL
31.370 -+ adobe68k)
31.371 - basic_machine=m68010-adobe
31.372 - os=-scout
31.373 - ;;
31.374 -@@ -277,21 +376,21 @@
31.375 - os=-sysv
31.376 - ;;
31.377 - amiga | amiga-*)
31.378 -- basic_machine=m68k-cbm
31.379 -+ basic_machine=m68k-unknown
31.380 - ;;
31.381 - amigaos | amigados)
31.382 -- basic_machine=m68k-cbm
31.383 -+ basic_machine=m68k-unknown
31.384 - os=-amigaos
31.385 - ;;
31.386 - amigaunix | amix)
31.387 -- basic_machine=m68k-cbm
31.388 -+ basic_machine=m68k-unknown
31.389 - os=-sysv4
31.390 - ;;
31.391 - apollo68)
31.392 - basic_machine=m68k-apollo
31.393 - os=-sysv
31.394 - ;;
31.395 -- apollo68bsd) # EGCS LOCAL
31.396 -+ apollo68bsd)
31.397 - basic_machine=m68k-apollo
31.398 - os=-bsd
31.399 - ;;
31.400 -@@ -303,6 +402,10 @@
31.401 - basic_machine=ns32k-sequent
31.402 - os=-dynix
31.403 - ;;
31.404 -+ c90)
31.405 -+ basic_machine=c90-cray
31.406 -+ os=-unicos
31.407 -+ ;;
31.408 - convex-c1)
31.409 - basic_machine=c1-convex
31.410 - os=-bsd
31.411 -@@ -323,27 +426,30 @@
31.412 - basic_machine=c38-convex
31.413 - os=-bsd
31.414 - ;;
31.415 -- cray | ymp)
31.416 -- basic_machine=ymp-cray
31.417 -- os=-unicos
31.418 -- ;;
31.419 -- cray2)
31.420 -- basic_machine=cray2-cray
31.421 -- os=-unicos
31.422 -- ;;
31.423 -- [ctj]90-cray)
31.424 -- basic_machine=c90-cray
31.425 -+ cray | j90)
31.426 -+ basic_machine=j90-cray
31.427 - os=-unicos
31.428 - ;;
31.429 - crds | unos)
31.430 - basic_machine=m68k-crds
31.431 - ;;
31.432 -+ cris | cris-* | etrax*)
31.433 -+ basic_machine=cris-axis
31.434 -+ ;;
31.435 - da30 | da30-*)
31.436 - basic_machine=m68k-da30
31.437 - ;;
31.438 - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
31.439 - basic_machine=mips-dec
31.440 - ;;
31.441 -+ decsystem10* | dec10*)
31.442 -+ basic_machine=pdp10-dec
31.443 -+ os=-tops10
31.444 -+ ;;
31.445 -+ decsystem20* | dec20*)
31.446 -+ basic_machine=pdp10-dec
31.447 -+ os=-tops20
31.448 -+ ;;
31.449 - delta | 3300 | motorola-3300 | motorola-delta \
31.450 - | 3300-motorola | delta-motorola)
31.451 - basic_machine=m68k-motorola
31.452 -@@ -371,7 +477,7 @@
31.453 - encore | umax | mmax)
31.454 - basic_machine=ns32k-encore
31.455 - ;;
31.456 -- es1800 | OSE68k | ose68k | ose | OSE) # EGCS LOCAL
31.457 -+ es1800 | OSE68k | ose68k | ose | OSE)
31.458 - basic_machine=m68k-ericsson
31.459 - os=-ose
31.460 - ;;
31.461 -@@ -385,6 +491,10 @@
31.462 - basic_machine=tron-gmicro
31.463 - os=-sysv
31.464 - ;;
31.465 -+ go32)
31.466 -+ basic_machine=i386-pc
31.467 -+ os=-go32
31.468 -+ ;;
31.469 - h3050r* | hiux*)
31.470 - basic_machine=hppa1.1-hitachi
31.471 - os=-hiuxwe2
31.472 -@@ -393,11 +503,11 @@
31.473 - basic_machine=h8300-hitachi
31.474 - os=-hms
31.475 - ;;
31.476 -- h8300xray) # EGCS LOCAL
31.477 -+ h8300xray)
31.478 - basic_machine=h8300-hitachi
31.479 - os=-xray
31.480 - ;;
31.481 -- h8500hms) # EGCS LOCAL
31.482 -+ h8500hms)
31.483 - basic_machine=h8500-hitachi
31.484 - os=-hms
31.485 - ;;
31.486 -@@ -416,22 +526,6 @@
31.487 - basic_machine=m68k-hp
31.488 - os=-hpux
31.489 - ;;
31.490 -- w89k-*) # EGCS LOCAL
31.491 -- basic_machine=hppa1.1-winbond
31.492 -- os=-proelf
31.493 -- ;;
31.494 -- op50n-*) # EGCS LOCAL
31.495 -- basic_machine=hppa1.1-oki
31.496 -- os=-proelf
31.497 -- ;;
31.498 -- op60c-*) # EGCS LOCAL
31.499 -- basic_machine=hppa1.1-oki
31.500 -- os=-proelf
31.501 -- ;;
31.502 -- hppro) # EGCS LOCAL
31.503 -- basic_machine=hppa1.1-hp
31.504 -- os=-proelf
31.505 -- ;;
31.506 - hp3k9[0-9][0-9] | hp9[0-9][0-9])
31.507 - basic_machine=hppa1.0-hp
31.508 - ;;
31.509 -@@ -441,22 +535,21 @@
31.510 - hp9k3[2-9][0-9])
31.511 - basic_machine=m68k-hp
31.512 - ;;
31.513 -- hp9k6[0-9][0-9] | hp6[0-9][0-9] )
31.514 -+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
31.515 - basic_machine=hppa1.0-hp
31.516 - ;;
31.517 -- hp9k7[0-79][0-9] | hp7[0-79][0-9] )
31.518 -+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
31.519 - basic_machine=hppa1.1-hp
31.520 - ;;
31.521 -- hp9k78[0-9] | hp78[0-9] )
31.522 -+ hp9k78[0-9] | hp78[0-9])
31.523 - # FIXME: really hppa2.0-hp
31.524 - basic_machine=hppa1.1-hp
31.525 - ;;
31.526 -- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
31.527 -- hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
31.528 -+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
31.529 - # FIXME: really hppa2.0-hp
31.530 - basic_machine=hppa1.1-hp
31.531 - ;;
31.532 -- hp9k8[0-9][13679] | hp8[0-9][13679] )
31.533 -+ hp9k8[0-9][13679] | hp8[0-9][13679])
31.534 - basic_machine=hppa1.1-hp
31.535 - ;;
31.536 - hp9k8[0-9][0-9] | hp8[0-9][0-9])
31.537 -@@ -465,47 +558,42 @@
31.538 - hppa-next)
31.539 - os=-nextstep3
31.540 - ;;
31.541 -- hppaosf) # EGCS LOCAL
31.542 -+ hppaosf)
31.543 - basic_machine=hppa1.1-hp
31.544 - os=-osf
31.545 - ;;
31.546 -+ hppro)
31.547 -+ basic_machine=hppa1.1-hp
31.548 -+ os=-proelf
31.549 -+ ;;
31.550 - i370-ibm* | ibm*)
31.551 - basic_machine=i370-ibm
31.552 -- os=-mvs
31.553 - ;;
31.554 - # I'm not sure what "Sysv32" means. Should this be sysv3.2?
31.555 -- i[34567]86v32)
31.556 -+ i*86v32)
31.557 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
31.558 - os=-sysv32
31.559 - ;;
31.560 -- i[34567]86v4*)
31.561 -+ i*86v4*)
31.562 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
31.563 - os=-sysv4
31.564 - ;;
31.565 -- i[34567]86v)
31.566 -+ i*86v)
31.567 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
31.568 - os=-sysv
31.569 - ;;
31.570 -- i[34567]86sol2)
31.571 -+ i*86sol2)
31.572 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
31.573 - os=-solaris2
31.574 - ;;
31.575 -- i386mach) # EGCS LOCAL
31.576 -+ i386mach)
31.577 - basic_machine=i386-mach
31.578 - os=-mach
31.579 - ;;
31.580 -- i386-vsta | vsta) # EGCS LOCAL
31.581 -+ i386-vsta | vsta)
31.582 - basic_machine=i386-unknown
31.583 - os=-vsta
31.584 - ;;
31.585 -- i386-go32 | go32) # EGCS LOCAL
31.586 -- basic_machine=i386-unknown
31.587 -- os=-go32
31.588 -- ;;
31.589 -- i386-mingw32 | mingw32)
31.590 -- basic_machine=i386-unknown
31.591 -- os=-mingw32
31.592 -- ;;
31.593 - iris | iris4d)
31.594 - basic_machine=mips-sgi
31.595 - case $os in
31.596 -@@ -531,16 +619,16 @@
31.597 - basic_machine=ns32k-utek
31.598 - os=-sysv
31.599 - ;;
31.600 -+ mingw32)
31.601 -+ basic_machine=i386-pc
31.602 -+ os=-mingw32
31.603 -+ ;;
31.604 - miniframe)
31.605 - basic_machine=m68000-convergent
31.606 - ;;
31.607 -- mipsel*-linux*)
31.608 -- basic_machine=mipsel-unknown
31.609 -- os=-linux-gnu
31.610 -- ;;
31.611 -- mips*-linux*)
31.612 -- basic_machine=mips-unknown
31.613 -- os=-linux-gnu
31.614 -+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
31.615 -+ basic_machine=m68k-atari
31.616 -+ os=-mint
31.617 - ;;
31.618 - mips3*-*)
31.619 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
31.620 -@@ -548,24 +636,36 @@
31.621 - mips3*)
31.622 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
31.623 - ;;
31.624 -- monitor) # EGCS LOCAL
31.625 -+ mmix*)
31.626 -+ basic_machine=mmix-knuth
31.627 -+ os=-mmixware
31.628 -+ ;;
31.629 -+ monitor)
31.630 - basic_machine=m68k-rom68k
31.631 - os=-coff
31.632 - ;;
31.633 -- msdos) # EGCS LOCAL
31.634 -- basic_machine=i386-unknown
31.635 -+ morphos)
31.636 -+ basic_machine=powerpc-unknown
31.637 -+ os=-morphos
31.638 -+ ;;
31.639 -+ msdos)
31.640 -+ basic_machine=i386-pc
31.641 - os=-msdos
31.642 - ;;
31.643 -+ mvs)
31.644 -+ basic_machine=i370-ibm
31.645 -+ os=-mvs
31.646 -+ ;;
31.647 - ncr3000)
31.648 - basic_machine=i486-ncr
31.649 - os=-sysv4
31.650 - ;;
31.651 - netbsd386)
31.652 -- basic_machine=i386-unknown # EGCS LOCAL
31.653 -+ basic_machine=i386-unknown
31.654 - os=-netbsd
31.655 - ;;
31.656 - netwinder)
31.657 -- basic_machine=armv4l-corel
31.658 -+ basic_machine=armv4l-rebel
31.659 - os=-linux
31.660 - ;;
31.661 - news | news700 | news800 | news900)
31.662 -@@ -580,7 +680,7 @@
31.663 - basic_machine=mips-sony
31.664 - os=-newsos
31.665 - ;;
31.666 -- necv70) # EGCS LOCAL
31.667 -+ necv70)
31.668 - basic_machine=v70-nec
31.669 - os=-sysv
31.670 - ;;
31.671 -@@ -609,18 +709,37 @@
31.672 - basic_machine=i960-intel
31.673 - os=-nindy
31.674 - ;;
31.675 -- mon960) # EGCS LOCAL
31.676 -+ mon960)
31.677 - basic_machine=i960-intel
31.678 - os=-mon960
31.679 - ;;
31.680 -+ nonstopux)
31.681 -+ basic_machine=mips-compaq
31.682 -+ os=-nonstopux
31.683 -+ ;;
31.684 - np1)
31.685 - basic_machine=np1-gould
31.686 - ;;
31.687 -- OSE68000 | ose68000) # EGCS LOCAL
31.688 -+ nv1)
31.689 -+ basic_machine=nv1-cray
31.690 -+ os=-unicosmp
31.691 -+ ;;
31.692 -+ nsr-tandem)
31.693 -+ basic_machine=nsr-tandem
31.694 -+ ;;
31.695 -+ op50n-* | op60c-*)
31.696 -+ basic_machine=hppa1.1-oki
31.697 -+ os=-proelf
31.698 -+ ;;
31.699 -+ or32 | or32-*)
31.700 -+ basic_machine=or32-unknown
31.701 -+ os=-coff
31.702 -+ ;;
31.703 -+ OSE68000 | ose68000)
31.704 - basic_machine=m68000-ericsson
31.705 - os=-ose
31.706 - ;;
31.707 -- os68k) # EGCS LOCAL
31.708 -+ os68k)
31.709 - basic_machine=m68k-none
31.710 - os=-os68k
31.711 - ;;
31.712 -@@ -638,46 +757,60 @@
31.713 - pbb)
31.714 - basic_machine=m68k-tti
31.715 - ;;
31.716 -- pc532 | pc532-*)
31.717 -+ pc532 | pc532-*)
31.718 - basic_machine=ns32k-pc532
31.719 - ;;
31.720 -- pentium | p5 | k5 | k6 | nexen)
31.721 -+ pentium | p5 | k5 | k6 | nexgen | viac3)
31.722 - basic_machine=i586-pc
31.723 - ;;
31.724 -- pentiumpro | p6 | 6x86)
31.725 -+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
31.726 - basic_machine=i686-pc
31.727 - ;;
31.728 - pentiumii | pentium2)
31.729 -- basic_machine=i786-pc
31.730 -+ basic_machine=i686-pc
31.731 - ;;
31.732 -- pentium-* | p5-* | k5-* | k6-* | nexen-*)
31.733 -+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
31.734 - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
31.735 - ;;
31.736 -- pentiumpro-* | p6-* | 6x86-*)
31.737 -+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
31.738 - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
31.739 - ;;
31.740 - pentiumii-* | pentium2-*)
31.741 -- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
31.742 -+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
31.743 - ;;
31.744 - pn)
31.745 - basic_machine=pn-gould
31.746 - ;;
31.747 -- power) basic_machine=rs6000-ibm
31.748 -+ power) basic_machine=power-ibm
31.749 - ;;
31.750 - ppc) basic_machine=powerpc-unknown
31.751 -- ;;
31.752 -+ ;;
31.753 - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
31.754 - ;;
31.755 - ppcle | powerpclittle | ppc-le | powerpc-little)
31.756 - basic_machine=powerpcle-unknown
31.757 -- ;;
31.758 -+ ;;
31.759 - ppcle-* | powerpclittle-*)
31.760 - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
31.761 - ;;
31.762 -+ ppc64) basic_machine=powerpc64-unknown
31.763 -+ ;;
31.764 -+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
31.765 -+ ;;
31.766 -+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
31.767 -+ basic_machine=powerpc64le-unknown
31.768 -+ ;;
31.769 -+ ppc64le-* | powerpc64little-*)
31.770 -+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
31.771 -+ ;;
31.772 - ps2)
31.773 - basic_machine=i386-ibm
31.774 - ;;
31.775 -- rom68k) # EGCS LOCAL
31.776 -+ pw32)
31.777 -+ basic_machine=i586-unknown
31.778 -+ os=-pw32
31.779 -+ ;;
31.780 -+ rom68k)
31.781 - basic_machine=m68k-rom68k
31.782 - os=-coff
31.783 - ;;
31.784 -@@ -687,10 +820,22 @@
31.785 - rtpc | rtpc-*)
31.786 - basic_machine=romp-ibm
31.787 - ;;
31.788 -- sa29200) # EGCS LOCAL
31.789 -+ s390 | s390-*)
31.790 -+ basic_machine=s390-ibm
31.791 -+ ;;
31.792 -+ s390x | s390x-*)
31.793 -+ basic_machine=s390x-ibm
31.794 -+ ;;
31.795 -+ sa29200)
31.796 - basic_machine=a29k-amd
31.797 - os=-udi
31.798 - ;;
31.799 -+ sb1)
31.800 -+ basic_machine=mipsisa64sb1-unknown
31.801 -+ ;;
31.802 -+ sb1el)
31.803 -+ basic_machine=mipsisa64sb1el-unknown
31.804 -+ ;;
31.805 - sequent)
31.806 - basic_machine=i386-sequent
31.807 - ;;
31.808 -@@ -698,7 +843,7 @@
31.809 - basic_machine=sh-hitachi
31.810 - os=-hms
31.811 - ;;
31.812 -- sparclite-wrs) # EGCS LOCAL
31.813 -+ sparclite-wrs | simso-wrs)
31.814 - basic_machine=sparclite-wrs
31.815 - os=-vxworks
31.816 - ;;
31.817 -@@ -709,10 +854,10 @@
31.818 - spur)
31.819 - basic_machine=spur-unknown
31.820 - ;;
31.821 -- st2000) # EGCS LOCAL
31.822 -+ st2000)
31.823 - basic_machine=m68k-tandem
31.824 - ;;
31.825 -- stratus) # EGCS LOCAL
31.826 -+ stratus)
31.827 - basic_machine=i860-stratus
31.828 - os=-sysv4
31.829 - ;;
31.830 -@@ -756,16 +901,40 @@
31.831 - sun386 | sun386i | roadrunner)
31.832 - basic_machine=i386-sun
31.833 - ;;
31.834 -+ sv1)
31.835 -+ basic_machine=sv1-cray
31.836 -+ os=-unicos
31.837 -+ ;;
31.838 - symmetry)
31.839 - basic_machine=i386-sequent
31.840 - os=-dynix
31.841 - ;;
31.842 -+ t3e)
31.843 -+ basic_machine=alphaev5-cray
31.844 -+ os=-unicos
31.845 -+ ;;
31.846 -+ t90)
31.847 -+ basic_machine=t90-cray
31.848 -+ os=-unicos
31.849 -+ ;;
31.850 -+ tic4x | c4x*)
31.851 -+ basic_machine=tic4x-unknown
31.852 -+ os=-coff
31.853 -+ ;;
31.854 -+ tic54x | c54x*)
31.855 -+ basic_machine=tic54x-unknown
31.856 -+ os=-coff
31.857 -+ ;;
31.858 - tx39)
31.859 - basic_machine=mipstx39-unknown
31.860 - ;;
31.861 - tx39el)
31.862 - basic_machine=mipstx39el-unknown
31.863 - ;;
31.864 -+ toad1)
31.865 -+ basic_machine=pdp10-xkl
31.866 -+ os=-tops20
31.867 -+ ;;
31.868 - tower | tower-32)
31.869 - basic_machine=m68k-ncr
31.870 - ;;
31.871 -@@ -777,7 +946,7 @@
31.872 - basic_machine=a29k-nyu
31.873 - os=-sym1
31.874 - ;;
31.875 -- v810 | necv810) # EGCS LOCAL
31.876 -+ v810 | necv810)
31.877 - basic_machine=v810-nec
31.878 - os=-none
31.879 - ;;
31.880 -@@ -790,8 +959,8 @@
31.881 - os=-vms
31.882 - ;;
31.883 - vpp*|vx|vx-*)
31.884 -- basic_machine=f301-fujitsu
31.885 -- ;;
31.886 -+ basic_machine=f301-fujitsu
31.887 -+ ;;
31.888 - vxworks960)
31.889 - basic_machine=i960-wrs
31.890 - os=-vxworks
31.891 -@@ -804,18 +973,22 @@
31.892 - basic_machine=a29k-wrs
31.893 - os=-vxworks
31.894 - ;;
31.895 -- w65*) # EGCS LOCAL
31.896 -- basic_machine=w65-wdc
31.897 -- os=-none
31.898 -+ w65*)
31.899 -+ basic_machine=w65-wdc
31.900 -+ os=-none
31.901 - ;;
31.902 -- xmp)
31.903 -- basic_machine=xmp-cray
31.904 -- os=-unicos
31.905 -+ w89k-*)
31.906 -+ basic_machine=hppa1.1-winbond
31.907 -+ os=-proelf
31.908 - ;;
31.909 -- xps | xps100)
31.910 -+ xps | xps100)
31.911 - basic_machine=xps100-honeywell
31.912 - ;;
31.913 -- z8k-*-coff) # EGCS LOCAL
31.914 -+ ymp)
31.915 -+ basic_machine=ymp-cray
31.916 -+ os=-unicos
31.917 -+ ;;
31.918 -+ z8k-*-coff)
31.919 - basic_machine=z8k-unknown
31.920 - os=-sim
31.921 - ;;
31.922 -@@ -826,22 +999,15 @@
31.923 -
31.924 - # Here we handle the default manufacturer of certain CPU types. It is in
31.925 - # some cases the only manufacturer, in others, it is the most popular.
31.926 -- w89k) # EGCS LOCAL
31.927 -+ w89k)
31.928 - basic_machine=hppa1.1-winbond
31.929 - ;;
31.930 -- op50n) # EGCS LOCAL
31.931 -+ op50n)
31.932 - basic_machine=hppa1.1-oki
31.933 - ;;
31.934 -- op60c) # EGCS LOCAL
31.935 -+ op60c)
31.936 - basic_machine=hppa1.1-oki
31.937 - ;;
31.938 -- mips)
31.939 -- if [ x$os = x-linux-gnu ]; then
31.940 -- basic_machine=mips-unknown
31.941 -- else
31.942 -- basic_machine=mips-mips
31.943 -- fi
31.944 -- ;;
31.945 - romp)
31.946 - basic_machine=romp-ibm
31.947 - ;;
31.948 -@@ -851,16 +1017,26 @@
31.949 - vax)
31.950 - basic_machine=vax-dec
31.951 - ;;
31.952 -+ pdp10)
31.953 -+ # there are many clones, so DEC is not a safe bet
31.954 -+ basic_machine=pdp10-unknown
31.955 -+ ;;
31.956 - pdp11)
31.957 - basic_machine=pdp11-dec
31.958 - ;;
31.959 - we32k)
31.960 - basic_machine=we32k-att
31.961 - ;;
31.962 -- sparc | sparcv9)
31.963 -+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
31.964 -+ basic_machine=sh-unknown
31.965 -+ ;;
31.966 -+ sh64)
31.967 -+ basic_machine=sh64-unknown
31.968 -+ ;;
31.969 -+ sparc | sparcv9 | sparcv9b)
31.970 - basic_machine=sparc-sun
31.971 - ;;
31.972 -- cydra)
31.973 -+ cydra)
31.974 - basic_machine=cydra-cydrome
31.975 - ;;
31.976 - orion)
31.977 -@@ -869,16 +1045,15 @@
31.978 - orion105)
31.979 - basic_machine=clipper-highlevel
31.980 - ;;
31.981 -- mac | mpw | mac-mpw) # EGCS LOCAL
31.982 -+ mac | mpw | mac-mpw)
31.983 - basic_machine=m68k-apple
31.984 - ;;
31.985 -- pmac | pmac-mpw) # EGCS LOCAL
31.986 -+ pmac | pmac-mpw)
31.987 - basic_machine=powerpc-apple
31.988 - ;;
31.989 -- c4x*)
31.990 -- basic_machine=c4x-none
31.991 -- os=-coff
31.992 -- ;;
31.993 -+ *-unknown)
31.994 -+ # Make sure to match an already-canonicalized machine name.
31.995 -+ ;;
31.996 - *)
31.997 - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
31.998 - exit 1
31.999 -@@ -935,20 +1110,38 @@
31.1000 - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
31.1001 - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
31.1002 - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
31.1003 -+ | -chorusos* | -chorusrdb* \
31.1004 - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
31.1005 - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
31.1006 -- | -interix* | -uwin* )
31.1007 -+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
31.1008 -+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
31.1009 -+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
31.1010 -+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
31.1011 -+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
31.1012 -+ | -powermax* | -dnix* | -microbsd*)
31.1013 - # Remember, each alternative MUST END IN *, to match a version number.
31.1014 - ;;
31.1015 -- # EGCS LOCAL
31.1016 -+ -qnx*)
31.1017 -+ case $basic_machine in
31.1018 -+ x86-* | i*86-*)
31.1019 -+ ;;
31.1020 -+ *)
31.1021 -+ os=-nto$os
31.1022 -+ ;;
31.1023 -+ esac
31.1024 -+ ;;
31.1025 -+ -nto-qnx*)
31.1026 -+ ;;
31.1027 -+ -nto*)
31.1028 -+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
31.1029 -+ ;;
31.1030 - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
31.1031 -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
31.1032 -- | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
31.1033 -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
31.1034 -+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
31.1035 - ;;
31.1036 - -mac*)
31.1037 - os=`echo $os | sed -e 's|mac|macos|'`
31.1038 - ;;
31.1039 -- # END EGCS LOCAL
31.1040 - -linux*)
31.1041 - os=`echo $os | sed -e 's|linux|linux-gnu|'`
31.1042 - ;;
31.1043 -@@ -958,6 +1151,12 @@
31.1044 - -sunos6*)
31.1045 - os=`echo $os | sed -e 's|sunos6|solaris3|'`
31.1046 - ;;
31.1047 -+ -opened*)
31.1048 -+ os=-openedition
31.1049 -+ ;;
31.1050 -+ -wince*)
31.1051 -+ os=-wince
31.1052 -+ ;;
31.1053 - -osfrose*)
31.1054 - os=-osfrose
31.1055 - ;;
31.1056 -@@ -973,14 +1172,23 @@
31.1057 - -acis*)
31.1058 - os=-aos
31.1059 - ;;
31.1060 -- -386bsd) # EGCS LOCAL
31.1061 -+ -atheos*)
31.1062 -+ os=-atheos
31.1063 -+ ;;
31.1064 -+ -386bsd)
31.1065 - os=-bsd
31.1066 - ;;
31.1067 - -ctix* | -uts*)
31.1068 - os=-sysv
31.1069 - ;;
31.1070 -+ -nova*)
31.1071 -+ os=-rtmk-nova
31.1072 -+ ;;
31.1073 - -ns2 )
31.1074 -- os=-nextstep2
31.1075 -+ os=-nextstep2
31.1076 -+ ;;
31.1077 -+ -nsk*)
31.1078 -+ os=-nsk
31.1079 - ;;
31.1080 - # Preserve the version number of sinix5.
31.1081 - -sinix5.*)
31.1082 -@@ -1007,15 +1215,21 @@
31.1083 - # This must come after -sysvr4.
31.1084 - -sysv*)
31.1085 - ;;
31.1086 -- -ose*) # EGCS LOCAL
31.1087 -+ -ose*)
31.1088 - os=-ose
31.1089 - ;;
31.1090 -- -es1800*) # EGCS LOCAL
31.1091 -+ -es1800*)
31.1092 - os=-ose
31.1093 - ;;
31.1094 - -xenix)
31.1095 - os=-xenix
31.1096 - ;;
31.1097 -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
31.1098 -+ os=-mint
31.1099 -+ ;;
31.1100 -+ -aros*)
31.1101 -+ os=-aros
31.1102 -+ ;;
31.1103 - -none)
31.1104 - ;;
31.1105 - *)
31.1106 -@@ -1041,13 +1255,17 @@
31.1107 - *-acorn)
31.1108 - os=-riscix1.2
31.1109 - ;;
31.1110 -- arm*-corel)
31.1111 -+ arm*-rebel)
31.1112 - os=-linux
31.1113 - ;;
31.1114 - arm*-semi)
31.1115 - os=-aout
31.1116 - ;;
31.1117 -- pdp11-*)
31.1118 -+ # This must come before the *-dec entry.
31.1119 -+ pdp10-*)
31.1120 -+ os=-tops20
31.1121 -+ ;;
31.1122 -+ pdp11-*)
31.1123 - os=-none
31.1124 - ;;
31.1125 - *-dec | vax-*)
31.1126 -@@ -1065,15 +1283,18 @@
31.1127 - # default.
31.1128 - # os=-sunos4
31.1129 - ;;
31.1130 -- m68*-cisco) # EGCS LOCAL
31.1131 -+ m68*-cisco)
31.1132 - os=-aout
31.1133 - ;;
31.1134 -- mips*-cisco) # EGCS LOCAL
31.1135 -+ mips*-cisco)
31.1136 - os=-elf
31.1137 - ;;
31.1138 -- mips*-*) # EGCS LOCAL
31.1139 -- os=-elf
31.1140 -- ;;
31.1141 -+ mips*-*)
31.1142 -+ os=-elf
31.1143 -+ ;;
31.1144 -+ or32-*)
31.1145 -+ os=-coff
31.1146 -+ ;;
31.1147 - *-tti) # must be before sparc entry or we get the wrong os.
31.1148 - os=-sysv3
31.1149 - ;;
31.1150 -@@ -1086,13 +1307,13 @@
31.1151 - *-ibm)
31.1152 - os=-aix
31.1153 - ;;
31.1154 -- *-wec) # EGCS LOCAL
31.1155 -+ *-wec)
31.1156 - os=-proelf
31.1157 - ;;
31.1158 -- *-winbond) # EGCS LOCAL
31.1159 -+ *-winbond)
31.1160 - os=-proelf
31.1161 - ;;
31.1162 -- *-oki) # EGCS LOCAL
31.1163 -+ *-oki)
31.1164 - os=-proelf
31.1165 - ;;
31.1166 - *-hp)
31.1167 -@@ -1137,36 +1358,39 @@
31.1168 - *-next)
31.1169 - os=-nextstep3
31.1170 - ;;
31.1171 -- *-gould)
31.1172 -+ *-gould)
31.1173 - os=-sysv
31.1174 - ;;
31.1175 -- *-highlevel)
31.1176 -+ *-highlevel)
31.1177 - os=-bsd
31.1178 - ;;
31.1179 - *-encore)
31.1180 - os=-bsd
31.1181 - ;;
31.1182 -- *-sgi)
31.1183 -+ *-sgi)
31.1184 - os=-irix
31.1185 - ;;
31.1186 -- *-siemens)
31.1187 -+ *-siemens)
31.1188 - os=-sysv4
31.1189 - ;;
31.1190 - *-masscomp)
31.1191 - os=-rtu
31.1192 - ;;
31.1193 -- f301-fujitsu)
31.1194 -+ f30[01]-fujitsu | f700-fujitsu)
31.1195 - os=-uxpv
31.1196 - ;;
31.1197 -- *-rom68k) # EGCS LOCAL
31.1198 -+ *-rom68k)
31.1199 - os=-coff
31.1200 - ;;
31.1201 -- *-*bug) # EGCS LOCAL
31.1202 -+ *-*bug)
31.1203 - os=-coff
31.1204 - ;;
31.1205 -- *-apple) # EGCS LOCAL
31.1206 -+ *-apple)
31.1207 - os=-macos
31.1208 - ;;
31.1209 -+ *-atari*)
31.1210 -+ os=-mint
31.1211 -+ ;;
31.1212 - *)
31.1213 - os=-none
31.1214 - ;;
31.1215 -@@ -1212,27 +1436,41 @@
31.1216 - -genix*)
31.1217 - vendor=ns
31.1218 - ;;
31.1219 -- -mvs*)
31.1220 -+ -mvs* | -opened*)
31.1221 - vendor=ibm
31.1222 - ;;
31.1223 - -ptx*)
31.1224 - vendor=sequent
31.1225 - ;;
31.1226 -- -vxsim* | -vxworks*)
31.1227 -+ -vxsim* | -vxworks* | -windiss*)
31.1228 - vendor=wrs
31.1229 - ;;
31.1230 - -aux*)
31.1231 - vendor=apple
31.1232 - ;;
31.1233 -- -hms*) # EGCS LOCAL
31.1234 -+ -hms*)
31.1235 - vendor=hitachi
31.1236 - ;;
31.1237 -- -mpw* | -macos*) # EGCS LOCAL
31.1238 -+ -mpw* | -macos*)
31.1239 - vendor=apple
31.1240 - ;;
31.1241 -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
31.1242 -+ vendor=atari
31.1243 -+ ;;
31.1244 -+ -vos*)
31.1245 -+ vendor=stratus
31.1246 -+ ;;
31.1247 - esac
31.1248 - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
31.1249 - ;;
31.1250 - esac
31.1251 -
31.1252 - echo $basic_machine$os
31.1253 -+exit 0
31.1254 -+
31.1255 -+# Local variables:
31.1256 -+# eval: (add-hook 'write-file-hooks 'time-stamp)
31.1257 -+# time-stamp-start: "timestamp='"
31.1258 -+# time-stamp-format: "%:y-%02m-%02d"
31.1259 -+# time-stamp-end: "'"
31.1260 -+# End:
32.1 --- a/patches/gcc/2.95.3/140-deque-leak-fix.patch Wed Oct 21 18:08:31 2009 +0200
32.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
32.3 @@ -1,31 +0,0 @@
32.4 -[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
32.5 -
32.6 -Date: Fri, 16 Nov 2001 16:06:22 -0500
32.7 -From: Phil Edwards <pedwards at disaster dot jaj dot com>
32.8 -To: gcc-patches at gcc dot gnu dot org
32.9 -Subject: [libstdc++ trunk & 3.0] Fix deque memory leak
32.10 -Message-ID: <20011116160622.A23094@disaster.jaj.com>
32.11 -
32.12 -
32.13 -As discussed on the libstdc++ mailing list. Tested on i686/linux.
32.14 -
32.15 -
32.16 -
32.17 -2001-11-16 Paolo Carlini <pcarlini@unitus.it>
32.18 -
32.19 - * include/bits/stl_deque.h (deque::erase()): Fix memory leak.
32.20 -
32.21 -
32.22 -[rediffed against 2.95.3 -- dank]
32.23 -
32.24 ---- gcc-2.95.3/libstdc++/stl/stl_deque.h.old 2001-01-01 09:48:22.000000000 -0800
32.25 -+++ gcc-2.95.3/libstdc++/stl/stl_deque.h 2006-02-18 15:24:17.000000000 -0800
32.26 -@@ -1052,7 +1052,7 @@
32.27 - copy_backward(_M_start, __first, __last);
32.28 - iterator __new_start = _M_start + __n;
32.29 - destroy(_M_start, __new_start);
32.30 -- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
32.31 -+ _M_destroy_nodes(_M_start._M_node, __new_start._M_node); /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
32.32 - _M_start = __new_start;
32.33 - }
32.34 - else {
33.1 --- a/patches/gcc/2.95.3/150-cygwin-020611.patch Wed Oct 21 18:08:31 2009 +0200
33.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
33.3 @@ -1,33 +0,0 @@
33.4 -[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
33.5 - on the end of every executable, even if they're linux executable.
33.6 - This is highly annoying, and causes glibc build failures that look like this:
33.7 - mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
33.8 - make[2]: *** [.../bin/makedb] Error 1
33.9 - make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
33.10 -
33.11 - The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
33.12 - but that doesn't apply cleanly to gcc-2.95.3.
33.13 -
33.14 - So, I'm using
33.15 - http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
33.16 - This is the only patch in crosstool that *isn't* suitable for the mainline.
33.17 - I can live with this patch simply because crosstool does not build
33.18 - compilers that target cygwin or VAX/VMS.
33.19 - If that ever changes, I might need to try applying the real patch.
33.20 -]
33.21 -
33.22 -
33.23 -
33.24 -#
33.25 -# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
33.26 -#
33.27 ---- gcc-2.95.3/gcc/config/i386/xm-cygwin.h 1999-04-22 16:40:56.000000000 +0200
33.28 -+++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h 2002-06-11 08:23:18.000000000 +0200
33.29 -@@ -19,7 +19,6 @@
33.30 - the Free Software Foundation, 59 Temple Place - Suite 330,
33.31 - Boston, MA 02111-1307, USA. */
33.32 -
33.33 --#define EXECUTABLE_SUFFIX ".exe"
33.34 - #define NO_SYS_SIGLIST 1
33.35 -
33.36 - /* We support both "/" and "\" since everybody tests both but we
34.1 --- a/patches/gcc/2.95.3/160-trap-posix.patch Wed Oct 21 18:08:31 2009 +0200
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,44 +0,0 @@
34.4 -#
34.5 -# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
34.6 -#
34.7 -# Error:
34.8 -#
34.9 -# creating libintl.h
34.10 -# Configuring etc...
34.11 -# loading cache ../config.cache
34.12 -# checking for a BSD compatible install... (cached) /usr/bin/install -c
34.13 -# creating ./config.status
34.14 -# creating Makefile
34.15 -# trap: usage: trap [-lp] [[arg] signal_spec ...]
34.16 -#
34.17 -# Description:
34.18 -#
34.19 -# non-posix conform usage of trap causes bash >= 3.0 to fail
34.20 -# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
34.21 -#
34.22 -# Status:
34.23 -#
34.24 -# fixed in gcc >= 3.3.5
34.25 -# backport of gcc-3.3.5 fix
34.26 -#
34.27 -diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
34.28 ---- gcc-2.95.3-orig/configure 1999-04-02 16:17:40.000000000 +0200
34.29 -+++ gcc-2.95.3/configure 2005-04-20 18:25:45.030488235 +0200
34.30 -@@ -687,7 +687,7 @@
34.31 - if test -f skip-this-dir; then
34.32 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
34.33 - # and reset the trap handler.
34.34 -- trap 0
34.35 -+ trap '' 0
34.36 - rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
34.37 - # Execute the final clean-up actions
34.38 - ${config_shell} skip-this-dir
34.39 -@@ -1599,7 +1599,7 @@
34.40 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
34.41 - # and reset the trap handler.
34.42 - rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
34.43 --trap 0
34.44 -+trap '' 0
34.45 -
34.46 - exit 0
34.47 -
35.1 --- a/patches/gcc/2.95.3/170-pr3106.patch Wed Oct 21 18:08:31 2009 +0200
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,28 +0,0 @@
35.4 -See http://gcc.gnu.org/PR3106
35.5 -Backported from gcc-3.0.x
35.6 -
35.7 -Fixes error
35.8 - .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
35.9 - /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
35.10 - make[1]: *** [strerror.o] Error 1
35.11 - make: *** [all-libiberty] Error 2
35.12 -on Mac OS X.
35.13 -
35.14 ---- gcc-2.95.3/libiberty/strerror.c.old 2004-03-24 16:23:19.000000000 -0800
35.15 -+++ gcc-2.95.3/libiberty/strerror.c 2004-03-24 16:23:48.000000000 -0800
35.16 -@@ -13,6 +13,7 @@
35.17 - incompatible with our later declaration, perhaps by using const
35.18 - attributes. So we hide the declaration in errno.h (if any) using a
35.19 - macro. */
35.20 -+#define sys_nerr sys_nerr__
35.21 - #define sys_errlist sys_errlist__
35.22 - #endif
35.23 -
35.24 -@@ -20,6 +21,7 @@
35.25 - #include <errno.h>
35.26 -
35.27 - #ifdef HAVE_SYS_ERRLIST
35.28 -+#undef sys_nerr
35.29 - #undef sys_errlist
35.30 - #endif
35.31 -
36.1 --- a/patches/gcc/2.95.3/180-threads_snafu.patch Wed Oct 21 18:08:31 2009 +0200
36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
36.3 @@ -1,28 +0,0 @@
36.4 -This fixes the error
36.5 -
36.6 -In file included from gthr-default.h:1,
36.7 - from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr.h:98,
36.8 - from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/libgcc2.c:3034:
36.9 -/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr-posix.h:37: pthread.h: No such file or directory
36.10 -make[3]: *** [libgcc2.a] Error 1
36.11 -make[3]: Leaving directory `/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-gcc-core/gcc'
36.12 -
36.13 -in what I think is a nicer way than the patch used by the arm team,
36.14 -i.e. "perl -pi -e 's/^(TARGET_LIBGCC2_CFLAGS.*)/$1 -Dinhibit_libc -D__gthr_posix_h/' gcc/config/arm/t-linux"
36.15 -which seems a bit of a kludge.
36.16 -
36.17 ---- gcc-2.95.3/gcc/configure.old Fri Mar 16 06:13:48 2001
36.18 -+++ gcc-2.95.3/gcc/configure Sun Jun 8 13:02:20 2003
36.19 -@@ -853,9 +853,9 @@
36.20 - # Check whether --enable-threads or --disable-threads was given.
36.21 - if test "${enable_threads+set}" = set; then
36.22 - enableval="$enable_threads"
36.23 -- if test x$enable_threads = xno; then
36.24 -- enable_threads=''
36.25 --fi
36.26 -+ #if test x$enable_threads = xno; then
36.27 -+ #enable_threads=''
36.28 -+ #fi
36.29 - else
36.30 - enable_threads=''
36.31 - fi
37.1 --- a/patches/gcc/3.2.3/100-config.sub.patch Wed Oct 21 18:08:31 2009 +0200
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,72 +0,0 @@
37.4 -When configuring a s390->s390 or cris->cris crosscompiler
37.5 -(ok, I haven't hit this yet, but one of these days I'll get me an account
37.6 -on an s390, and then I'll need this patch :-), you'll get the
37.7 -following error:
37.8 -
37.9 -+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
37.10 ---target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
37.11 ---prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
37.12 ---enable-languages=c
37.13 ---with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
37.14 -unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
37.15 ---disable-shared
37.16 -...
37.17 -*** --with-headers is only supported when cross compiling
37.18 -
37.19 -This error pops up only when you're using Daniel Jacobowitz's technique
37.20 -of slightly changing the target and host tuples to make them different
37.21 -enough to force gcc's build system to not try to pull in system libraries
37.22 -or headers. This technique is needed e.g. to build an x86 -> x86
37.23 -cross-compiler.
37.24 -(The LFS developers ran into the same bug that prompted me to use
37.25 -this technique; they point people who run into it to
37.26 -http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
37.27 -way of avoiding this problem. I think the tuple tweak is the way to go, though.)
37.28 -
37.29 -config-patches@gnu.org rejected this patch, on the grounds that there
37.30 -is only one vendor of each of those two architectures, so the
37.31 -canonicalization is by definition correct. When I pointed out the
37.32 -difficulty this causes for people building s390 -> s390 or
37.33 -cris -> cris compilers that are incompatible with the system
37.34 -libraries and thus must be built like cross-compilers, he grumped and said
37.35 -"autoconf should let you specify a cross-compiler in some other way than
37.36 -comparing tuple strings".
37.37 -
37.38 -
37.39 -
37.40 ---- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003
37.41 -+++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003
37.42 -@@ -433,9 +433,12 @@
37.43 - crds | unos)
37.44 - basic_machine=m68k-crds
37.45 - ;;
37.46 -- cris | cris-* | etrax*)
37.47 -+ cris | etrax*)
37.48 - basic_machine=cris-axis
37.49 - ;;
37.50 -+ cris-*)
37.51 -+ basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
37.52 -+ ;;
37.53 - da30 | da30-*)
37.54 - basic_machine=m68k-da30
37.55 - ;;
37.56 -@@ -820,11 +823,17 @@
37.57 - rtpc | rtpc-*)
37.58 - basic_machine=romp-ibm
37.59 - ;;
37.60 -- s390 | s390-*)
37.61 -+ s390)
37.62 - basic_machine=s390-ibm
37.63 - ;;
37.64 -- s390x | s390x-*)
37.65 -+ s390-*)
37.66 -+ basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
37.67 -+ ;;
37.68 -+ s390x)
37.69 - basic_machine=s390x-ibm
37.70 -+ ;;
37.71 -+ s390x-*)
37.72 -+ basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
37.73 - ;;
37.74 - sa29200)
37.75 - basic_machine=a29k-amd
38.1 --- a/patches/gcc/3.2.3/110-ppc405erratum77.patch Wed Oct 21 18:08:31 2009 +0200
38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
38.3 @@ -1,105 +0,0 @@
38.4 -# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
38.5 -# Fixed in gcc-3.3
38.6 -
38.7 -diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
38.8 ---- gcc-20020722.orig/gcc/config/rs6000/rs6000.h Thu Jul 25 09:32:21 2002
38.9 -+++ gcc-20020722/gcc/config/rs6000/rs6000.h Thu Jul 25 09:34:45 2002
38.10 -@@ -66,7 +66,7 @@
38.11 - %{mcpu=rsc1: -D_ARCH_PWR} \
38.12 - %{mcpu=401: -D_ARCH_PPC} \
38.13 - %{mcpu=403: -D_ARCH_PPC} \
38.14 --%{mcpu=405: -D_ARCH_PPC} \
38.15 -+%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
38.16 - %{mcpu=505: -D_ARCH_PPC} \
38.17 - %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
38.18 - %{mcpu=602: -D_ARCH_PPC} \
38.19 -diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
38.20 ---- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h Thu Jul 25 09:32:30 2002
38.21 -+++ gcc-20020722/libjava/sysdep/powerpc/locks.h Thu Jul 25 11:39:13 2002
38.22 -@@ -11,6 +11,17 @@
38.23 - #ifndef __SYSDEP_LOCKS_H__
38.24 - #define __SYSDEP_LOCKS_H__
38.25 -
38.26 -+#ifdef __PPC405__
38.27 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN. References:
38.28 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
38.29 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
38.30 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
38.31 -+// FIXME: using dbct instead of sync would be faster
38.32 -+#define __LIBGCJ_PPC405_ERR77_SYNC "sync \n\t"
38.33 -+#else
38.34 -+#define __LIBGCJ_PPC405_ERR77_SYNC
38.35 -+#endif
38.36 -+
38.37 - typedef size_t obj_addr_t; /* Integer type big enough for object */
38.38 - /* address. */
38.39 -
38.40 -@@ -25,6 +36,7 @@
38.41 - "0: lwarx %0,0,%1 ;"
38.42 - " xor. %0,%3,%0;"
38.43 - " bne 1f;"
38.44 -+ __LIBGCJ_PPC405_ERR77_SYNC
38.45 - " stwcx. %2,0,%1;"
38.46 - " bne- 0b;"
38.47 - "1: "
38.48 -@@ -58,6 +70,7 @@
38.49 - "0: lwarx %0,0,%1 ;"
38.50 - " xor. %0,%3,%0;"
38.51 - " bne 1f;"
38.52 -+ __LIBGCJ_PPC405_ERR77_SYNC
38.53 - " stwcx. %2,0,%1;"
38.54 - " bne- 0b;"
38.55 - "1: "
38.56 -diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
38.57 ---- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:32:31 2002
38.58 -+++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:34:45 2002
38.59 -@@ -32,6 +32,17 @@
38.60 -
38.61 - typedef int _Atomic_word;
38.62 -
38.63 -+#ifdef __PPC405__
38.64 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank. References:
38.65 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
38.66 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
38.67 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
38.68 -+// FIXME: using dbct instead of sync would be faster
38.69 -+#define __LIBSTDCPP_PPC405_ERR77_SYNC "sync \n\t"
38.70 -+#else
38.71 -+#define __LIBSTDCPP_PPC405_ERR77_SYNC
38.72 -+#endif
38.73 -+
38.74 - static inline _Atomic_word
38.75 - __attribute__ ((__unused__))
38.76 - __exchange_and_add (volatile _Atomic_word* __mem, int __val)
38.77 -@@ -42,6 +53,7 @@
38.78 - "0:\t"
38.79 - "lwarx %0,0,%2 \n\t"
38.80 - "add%I3 %1,%0,%3 \n\t"
38.81 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
38.82 - "stwcx. %1,0,%2 \n\t"
38.83 - "bne- 0b \n\t"
38.84 - "/* End exchange & add */"
38.85 -@@ -61,6 +73,7 @@
38.86 - "0:\t"
38.87 - "lwarx %0,0,%1 \n\t"
38.88 - "add%I2 %0,%0,%2 \n\t"
38.89 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
38.90 - "stwcx. %0,0,%1 \n\t"
38.91 - "bne- 0b \n\t"
38.92 - "/* End atomic add */"
38.93 -@@ -78,6 +91,7 @@
38.94 - "/* Inline always swap */\n"
38.95 - "0:\t"
38.96 - "lwarx %0,0,%1 \n\t"
38.97 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
38.98 - "stwcx. %2,0,%1 \n\t"
38.99 - "bne- 0b \n\t"
38.100 - "/* End always swap */"
38.101 -@@ -98,6 +112,7 @@
38.102 - "lwarx %0,0,%1 \n\t"
38.103 - "cmpwi %0,0 \n\t"
38.104 - "bne- 1f \n\t"
38.105 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
38.106 - "stwcx. %2,0,%1 \n\t"
38.107 - "bne- 0b \n"
38.108 - "1:\n\t"
39.1 --- a/patches/gcc/3.2.3/120-sh-linux-1.patch Wed Oct 21 18:08:31 2009 +0200
39.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
39.3 @@ -1,1761 +0,0 @@
39.4 -diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
39.5 ---- gcc-20030210.orig/boehm-gc/configure Fri Jan 31 19:17:00 2003
39.6 -+++ gcc-20030210/boehm-gc/configure Sat Feb 22 01:40:14 2003
39.7 -@@ -1922,7 +1922,7 @@
39.8 - # This must be Linux ELF.
39.9 - linux-gnu*)
39.10 - case $host_cpu in
39.11 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
39.12 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
39.13 - lt_cv_deplibs_check_method=pass_all ;;
39.14 - *)
39.15 - # glibc up to 2.1.1 does not perform some relocations on ARM
39.16 -diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
39.17 ---- gcc-20030210.orig/config-ml.in Fri Jan 31 19:16:59 2003
39.18 -+++ gcc-20030210/config-ml.in Sat Feb 22 01:40:14 2003
39.19 -@@ -545,6 +545,7 @@
39.20 - if [ -d ../$${dir}/$${lib} ]; then \
39.21 - flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
39.22 - if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
39.23 -+ DESTDIR="$(DESTDIR)" \
39.24 - CFLAGS="$(CFLAGS) $${flags}" \
39.25 - prefix="$(prefix)" \
39.26 - exec_prefix="$(exec_prefix)" \
39.27 -diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
39.28 ---- gcc-20030210.orig/debian/edit-specs.in Thu Jan 1 09:00:00 1970
39.29 -+++ gcc-20030210/debian/edit-specs.in Sat Feb 22 01:40:14 2003
39.30 -@@ -0,0 +1,45 @@
39.31 -+/^*asm:$/ {
39.32 -+n
39.33 -+c\
39.34 -+@AS_ENDIAN_FLAG@ %{mrelax:-relax}
39.35 -+}
39.36 -+/^*cpp:$/ {
39.37 -+n
39.38 -+c\
39.39 -+%(cpp_default_cpu_spec) %(subtarget_cpp_spec) %(subtarget_cpp_ptr_spec) %(subtarget_cpp_endian_spec)
39.40 -+}
39.41 -+/^*cc1:$/ {
39.42 -+n
39.43 -+c\
39.44 -+-musermode @CC1_CPU_ENDIAN_FLAGS@ %{profile:-p}
39.45 -+}
39.46 -+/^*link:$/ {
39.47 -+n
39.48 -+c\
39.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}
39.50 -+}
39.51 -+/^*multilib:$/ {
39.52 -+n
39.53 -+c\
39.54 -+. ;
39.55 -+}
39.56 -+/^*multilib_matches:$/ {
39.57 -+n
39.58 -+c\
39.59 -+
39.60 -+}
39.61 -+/^*multilib_options:$/ {
39.62 -+n
39.63 -+c\
39.64 -+
39.65 -+}
39.66 -+/^*subtarget_cpp_endian_spec:$/ {
39.67 -+n
39.68 -+c\
39.69 -+@CPP_ENDIAN_DEF@
39.70 -+}
39.71 -+/^*cpp_default_cpu_spec:$/ {
39.72 -+n
39.73 -+c\
39.74 -+@CPP_CPU_DEFS@
39.75 -+}
39.76 -diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
39.77 ---- gcc-20030210.orig/debian/install-CPU-linux Thu Jan 1 09:00:00 1970
39.78 -+++ gcc-20030210/debian/install-CPU-linux Sat Feb 22 01:40:14 2003
39.79 -@@ -0,0 +1,111 @@
39.80 -+#! /bin/sh
39.81 -+
39.82 -+VERSION=$1; shift
39.83 -+CPU=$1
39.84 -+
39.85 -+# literally (binary-ly) same
39.86 -+PROGS_C="cpp gcc"
39.87 -+PROGS_ADDITIONAL="c++ g++ g77 gcj"
39.88 -+
39.89 -+DRIVERS_C="cc1 cpp0 tradcpp0"
39.90 -+DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
39.91 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
39.92 -+ PROGS="$PROGS_C $PROGS_ADDITIONAL"
39.93 -+ DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
39.94 -+ INITIAL=""
39.95 -+else
39.96 -+ PROGS=$PROGS_C
39.97 -+ DRIVERS=$DRIVERS_C
39.98 -+ INITIAL="-initial"
39.99 -+fi
39.100 -+
39.101 -+OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
39.102 -+LIBS_C="libgcc.a"
39.103 -+LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
39.104 -+LIBS_2="libobjc.a libstdc++.a libsupc++.a"
39.105 -+INCLUDE="include"
39.106 -+
39.107 -+cd debian/gcc-sh-linux-others${INITIAL} || exit 1
39.108 -+
39.109 -+# Make directories.
39.110 -+mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
39.111 -+ usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
39.112 -+ usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
39.113 -+ usr/${CPU}-linux usr/${CPU}-linux/lib
39.114 -+
39.115 -+# Make symbolic links for include dir.
39.116 -+(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
39.117 -+
39.118 -+# Make symbolic links for executables.
39.119 -+(cd usr/bin;
39.120 -+ for p in ${PROGS}; do
39.121 -+ ln -s shCPU-linux-GCC ${CPU}-linux-$p
39.122 -+ done)
39.123 -+
39.124 -+case "${CPU}" in
39.125 -+ sh3)
39.126 -+ MULTILIBDIR=
39.127 -+ AS_ENDIAN_FLAG="-little"
39.128 -+ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
39.129 -+ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
39.130 -+ CC1_CPU_ENDIAN_FLAGS="-ml -m3"
39.131 -+ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
39.132 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
39.133 -+ ;;
39.134 -+ sh3eb)
39.135 -+ MULTILIBDIR=/mb
39.136 -+ AS_ENDIAN_FLAG="-big"
39.137 -+ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
39.138 -+ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
39.139 -+ CC1_CPU_ENDIAN_FLAGS="-mb -m3"
39.140 -+ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
39.141 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
39.142 -+ ;;
39.143 -+ sh4)
39.144 -+ MULTILIBDIR=/m4
39.145 -+ AS_ENDIAN_FLAG="-little"
39.146 -+ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
39.147 -+ CPP_CPU_DEFS="-D__SH4__"
39.148 -+ CC1_CPU_ENDIAN_FLAGS="-ml -m4"
39.149 -+ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
39.150 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
39.151 -+ ;;
39.152 -+ sh4eb)
39.153 -+ MULTILIBDIR=/mb/m4
39.154 -+ AS_ENDIAN_FLAG="-big"
39.155 -+ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
39.156 -+ CPP_CPU_DEFS="-D__SH4__"
39.157 -+ CC1_CPU_ENDIAN_FLAGS="-mb -m4"
39.158 -+ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
39.159 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
39.160 -+ ;;
39.161 -+esac
39.162 -+
39.163 -+# Make symbolic links for GCC drivers, objects, libraries, and include dir.
39.164 -+(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
39.165 -+ for f in ${DRIVERS} ${INCLUDE}; do
39.166 -+ ln -s ../../sh-linux/${VERSION}/$f $f;
39.167 -+ done
39.168 -+ for f in ${OBJS} ${LIBS_C}; do
39.169 -+ ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
39.170 -+ done)
39.171 -+
39.172 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
39.173 -+ for f in ${LIBS_1} ${LIBS_2}; do
39.174 -+ mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
39.175 -+ done
39.176 -+fi
39.177 -+
39.178 -+sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
39.179 -+ -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
39.180 -+ -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
39.181 -+ -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
39.182 -+ -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
39.183 -+ -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
39.184 -+ ../edit-specs.in >../edit-specs-${CPU}.sed
39.185 -+
39.186 -+sed -f ../edit-specs-${CPU}.sed \
39.187 -+ ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
39.188 -+ > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
39.189 -+
39.190 -+exit 0
39.191 -diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
39.192 ---- gcc-20030210.orig/debian/multilib-symlink Thu Jan 1 09:00:00 1970
39.193 -+++ gcc-20030210/debian/multilib-symlink Sat Feb 22 01:40:14 2003
39.194 -@@ -0,0 +1,10 @@
39.195 -+#! /bin/sh
39.196 -+
39.197 -+cd /usr/sh-linux/lib
39.198 -+ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
39.199 -+cd m4
39.200 -+ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
39.201 -+cd ../mb
39.202 -+ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
39.203 -+cd m4
39.204 -+ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
39.205 -diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
39.206 ---- gcc-20030210.orig/debian/shCPU-linux-GCC Thu Jan 1 09:00:00 1970
39.207 -+++ gcc-20030210/debian/shCPU-linux-GCC Sat Feb 22 01:40:14 2003
39.208 -@@ -0,0 +1,59 @@
39.209 -+#! /bin/bash
39.210 -+
39.211 -+BASENAME=${0##*/}
39.212 -+PROG=${BASENAME##*-}
39.213 -+CPU=${BASENAME%%-*}
39.214 -+
39.215 -+if [ "$PROG" = gcc ]; then
39.216 -+ if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
39.217 -+ shift 2
39.218 -+ exec /usr/bin/gcc "$@"
39.219 -+ elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
39.220 -+ echo ".;"
39.221 -+ exit 0
39.222 -+ elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
39.223 -+ echo "."
39.224 -+ exit 0
39.225 -+ elif [ "$1" = "-dumpspecs" ]; then
39.226 -+ cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
39.227 -+ exit 0
39.228 -+ fi
39.229 -+fi
39.230 -+
39.231 -+case "${CPU}" in
39.232 -+ sh3)
39.233 -+ ARCH=m3
39.234 -+ DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
39.235 -+ ENDIAN=ml
39.236 -+ ;;
39.237 -+ sh3eb)
39.238 -+ ARCH=m3
39.239 -+ DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
39.240 -+ ENDIAN=mb
39.241 -+ ;;
39.242 -+ sh4)
39.243 -+ ARCH=m4
39.244 -+ DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
39.245 -+ ENDIAN=ml
39.246 -+ ;;
39.247 -+ sh4eb)
39.248 -+ ARCH=m4
39.249 -+ DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
39.250 -+ ENDIAN=mb
39.251 -+ ;;
39.252 -+esac
39.253 -+
39.254 -+# Prepend the appropriate options
39.255 -+# If user specifies some options, it will be overridden
39.256 -+
39.257 -+case "${PROG}" in
39.258 -+ cpp)
39.259 -+ exec sh-linux-${PROG} $DEFINES "$@"
39.260 -+ ;;
39.261 -+ c++|g++|g77|gcc|gcj)
39.262 -+ exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
39.263 -+ ;;
39.264 -+esac
39.265 -+
39.266 -+echo "Something wrong..."
39.267 -+exit 1
39.268 -diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
39.269 ---- gcc-20030210.orig/gcc/config/sh/elf.h Fri Feb 22 01:42:28 2002
39.270 -+++ gcc-20030210/gcc/config/sh/elf.h Sat Feb 22 01:40:14 2003
39.271 -@@ -170,3 +170,7 @@
39.272 - #undef ENDFILE_SPEC
39.273 - #define ENDFILE_SPEC \
39.274 - "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
39.275 -+
39.276 -+/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
39.277 -+ redundant .align will be generated. */
39.278 -+#undef ASM_OUTPUT_CASE_LABEL
39.279 -diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
39.280 ---- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm Fri Feb 22 01:42:28 2002
39.281 -+++ gcc-20030210/gcc/config/sh/lib1funcs.asm Sat Feb 22 01:40:14 2003
39.282 -@@ -39,8 +39,13 @@
39.283 -
39.284 - #ifdef __ELF__
39.285 - #define LOCAL(X) .L_##X
39.286 -+#define FUNC(X) .type X,@function; .hidden X
39.287 -+#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
39.288 -+#define ENDFUNC(X) _ENDFUNC(X)
39.289 - #else
39.290 - #define LOCAL(X) L_##X
39.291 -+#define FUNC(X)
39.292 -+#define ENDFUNC(X)
39.293 - #endif
39.294 -
39.295 - #ifdef __linux__
39.296 -@@ -91,6 +96,40 @@
39.297 - .global GLOBAL(ashiftrt_r4_31)
39.298 - .global GLOBAL(ashiftrt_r4_32)
39.299 -
39.300 -+ FUNC(GLOBAL(ashiftrt_r4_0))
39.301 -+ FUNC(GLOBAL(ashiftrt_r4_1))
39.302 -+ FUNC(GLOBAL(ashiftrt_r4_2))
39.303 -+ FUNC(GLOBAL(ashiftrt_r4_3))
39.304 -+ FUNC(GLOBAL(ashiftrt_r4_4))
39.305 -+ FUNC(GLOBAL(ashiftrt_r4_5))
39.306 -+ FUNC(GLOBAL(ashiftrt_r4_6))
39.307 -+ FUNC(GLOBAL(ashiftrt_r4_7))
39.308 -+ FUNC(GLOBAL(ashiftrt_r4_8))
39.309 -+ FUNC(GLOBAL(ashiftrt_r4_9))
39.310 -+ FUNC(GLOBAL(ashiftrt_r4_10))
39.311 -+ FUNC(GLOBAL(ashiftrt_r4_11))
39.312 -+ FUNC(GLOBAL(ashiftrt_r4_12))
39.313 -+ FUNC(GLOBAL(ashiftrt_r4_13))
39.314 -+ FUNC(GLOBAL(ashiftrt_r4_14))
39.315 -+ FUNC(GLOBAL(ashiftrt_r4_15))
39.316 -+ FUNC(GLOBAL(ashiftrt_r4_16))
39.317 -+ FUNC(GLOBAL(ashiftrt_r4_17))
39.318 -+ FUNC(GLOBAL(ashiftrt_r4_18))
39.319 -+ FUNC(GLOBAL(ashiftrt_r4_19))
39.320 -+ FUNC(GLOBAL(ashiftrt_r4_20))
39.321 -+ FUNC(GLOBAL(ashiftrt_r4_21))
39.322 -+ FUNC(GLOBAL(ashiftrt_r4_22))
39.323 -+ FUNC(GLOBAL(ashiftrt_r4_23))
39.324 -+ FUNC(GLOBAL(ashiftrt_r4_24))
39.325 -+ FUNC(GLOBAL(ashiftrt_r4_25))
39.326 -+ FUNC(GLOBAL(ashiftrt_r4_26))
39.327 -+ FUNC(GLOBAL(ashiftrt_r4_27))
39.328 -+ FUNC(GLOBAL(ashiftrt_r4_28))
39.329 -+ FUNC(GLOBAL(ashiftrt_r4_29))
39.330 -+ FUNC(GLOBAL(ashiftrt_r4_30))
39.331 -+ FUNC(GLOBAL(ashiftrt_r4_31))
39.332 -+ FUNC(GLOBAL(ashiftrt_r4_32))
39.333 -+
39.334 - .align 1
39.335 - GLOBAL(ashiftrt_r4_32):
39.336 - GLOBAL(ashiftrt_r4_31):
39.337 -@@ -170,6 +209,41 @@
39.338 - GLOBAL(ashiftrt_r4_0):
39.339 - rts
39.340 - nop
39.341 -+
39.342 -+ ENDFUNC(GLOBAL(ashiftrt_r4_0))
39.343 -+ ENDFUNC(GLOBAL(ashiftrt_r4_1))
39.344 -+ ENDFUNC(GLOBAL(ashiftrt_r4_2))
39.345 -+ ENDFUNC(GLOBAL(ashiftrt_r4_3))
39.346 -+ ENDFUNC(GLOBAL(ashiftrt_r4_4))
39.347 -+ ENDFUNC(GLOBAL(ashiftrt_r4_5))
39.348 -+ ENDFUNC(GLOBAL(ashiftrt_r4_6))
39.349 -+ ENDFUNC(GLOBAL(ashiftrt_r4_7))
39.350 -+ ENDFUNC(GLOBAL(ashiftrt_r4_8))
39.351 -+ ENDFUNC(GLOBAL(ashiftrt_r4_9))
39.352 -+ ENDFUNC(GLOBAL(ashiftrt_r4_10))
39.353 -+ ENDFUNC(GLOBAL(ashiftrt_r4_11))
39.354 -+ ENDFUNC(GLOBAL(ashiftrt_r4_12))
39.355 -+ ENDFUNC(GLOBAL(ashiftrt_r4_13))
39.356 -+ ENDFUNC(GLOBAL(ashiftrt_r4_14))
39.357 -+ ENDFUNC(GLOBAL(ashiftrt_r4_15))
39.358 -+ ENDFUNC(GLOBAL(ashiftrt_r4_16))
39.359 -+ ENDFUNC(GLOBAL(ashiftrt_r4_17))
39.360 -+ ENDFUNC(GLOBAL(ashiftrt_r4_18))
39.361 -+ ENDFUNC(GLOBAL(ashiftrt_r4_19))
39.362 -+ ENDFUNC(GLOBAL(ashiftrt_r4_20))
39.363 -+ ENDFUNC(GLOBAL(ashiftrt_r4_21))
39.364 -+ ENDFUNC(GLOBAL(ashiftrt_r4_22))
39.365 -+ ENDFUNC(GLOBAL(ashiftrt_r4_23))
39.366 -+ ENDFUNC(GLOBAL(ashiftrt_r4_24))
39.367 -+ ENDFUNC(GLOBAL(ashiftrt_r4_25))
39.368 -+ ENDFUNC(GLOBAL(ashiftrt_r4_26))
39.369 -+ ENDFUNC(GLOBAL(ashiftrt_r4_27))
39.370 -+ ENDFUNC(GLOBAL(ashiftrt_r4_28))
39.371 -+ ENDFUNC(GLOBAL(ashiftrt_r4_29))
39.372 -+ ENDFUNC(GLOBAL(ashiftrt_r4_30))
39.373 -+ ENDFUNC(GLOBAL(ashiftrt_r4_31))
39.374 -+ ENDFUNC(GLOBAL(ashiftrt_r4_32))
39.375 -+
39.376 - #endif
39.377 -
39.378 - #ifdef L_ashiftrt_n
39.379 -@@ -192,6 +266,7 @@
39.380 - !
39.381 -
39.382 - .global GLOBAL(ashrsi3)
39.383 -+ FUNC(GLOBAL(ashrsi3))
39.384 - .align 2
39.385 - GLOBAL(ashrsi3):
39.386 - mov #31,r0
39.387 -@@ -319,6 +394,8 @@
39.388 - rts
39.389 - nop
39.390 -
39.391 -+ ENDFUNC(GLOBAL(ashrsi3))
39.392 -+
39.393 - #endif
39.394 -
39.395 - #ifdef L_ashiftlt
39.396 -@@ -340,6 +417,7 @@
39.397 - ! (none)
39.398 - !
39.399 - .global GLOBAL(ashlsi3)
39.400 -+ FUNC(GLOBAL(ashlsi3))
39.401 - .align 2
39.402 - GLOBAL(ashlsi3):
39.403 - mov #31,r0
39.404 -@@ -476,6 +554,8 @@
39.405 - rts
39.406 - nop
39.407 -
39.408 -+ ENDFUNC(GLOBAL(ashlsi3))
39.409 -+
39.410 - #endif
39.411 -
39.412 - #ifdef L_lshiftrt
39.413 -@@ -497,6 +577,7 @@
39.414 - ! (none)
39.415 - !
39.416 - .global GLOBAL(lshrsi3)
39.417 -+ FUNC(GLOBAL(lshrsi3))
39.418 - .align 2
39.419 - GLOBAL(lshrsi3):
39.420 - mov #31,r0
39.421 -@@ -633,6 +714,8 @@
39.422 - rts
39.423 - nop
39.424 -
39.425 -+ ENDFUNC(GLOBAL(lshrsi3))
39.426 -+
39.427 - #endif
39.428 -
39.429 - #ifdef L_movstr
39.430 -@@ -649,76 +732,113 @@
39.431 - add #64,r4
39.432 - .align 4
39.433 - .global GLOBAL(movstrSI64)
39.434 -+ FUNC(GLOBAL(movstrSI64))
39.435 - GLOBAL(movstrSI64):
39.436 - mov.l @(60,r5),r0
39.437 - mov.l r0,@(60,r4)
39.438 - .global GLOBAL(movstrSI60)
39.439 -+ FUNC(GLOBAL(movstrSI60))
39.440 - GLOBAL(movstrSI60):
39.441 - mov.l @(56,r5),r0
39.442 - mov.l r0,@(56,r4)
39.443 - .global GLOBAL(movstrSI56)
39.444 -+ FUNC(GLOBAL(movstrSI56))
39.445 - GLOBAL(movstrSI56):
39.446 - mov.l @(52,r5),r0
39.447 - mov.l r0,@(52,r4)
39.448 - .global GLOBAL(movstrSI52)
39.449 -+ FUNC(GLOBAL(movstrSI52))
39.450 - GLOBAL(movstrSI52):
39.451 - mov.l @(48,r5),r0
39.452 - mov.l r0,@(48,r4)
39.453 - .global GLOBAL(movstrSI48)
39.454 -+ FUNC(GLOBAL(movstrSI48))
39.455 - GLOBAL(movstrSI48):
39.456 - mov.l @(44,r5),r0
39.457 - mov.l r0,@(44,r4)
39.458 - .global GLOBAL(movstrSI44)
39.459 -+ FUNC(GLOBAL(movstrSI44))
39.460 - GLOBAL(movstrSI44):
39.461 - mov.l @(40,r5),r0
39.462 - mov.l r0,@(40,r4)
39.463 - .global GLOBAL(movstrSI40)
39.464 -+ FUNC(GLOBAL(movstrSI40))
39.465 - GLOBAL(movstrSI40):
39.466 - mov.l @(36,r5),r0
39.467 - mov.l r0,@(36,r4)
39.468 - .global GLOBAL(movstrSI36)
39.469 -+ FUNC(GLOBAL(movstrSI36))
39.470 - GLOBAL(movstrSI36):
39.471 - mov.l @(32,r5),r0
39.472 - mov.l r0,@(32,r4)
39.473 - .global GLOBAL(movstrSI32)
39.474 -+ FUNC(GLOBAL(movstrSI32))
39.475 - GLOBAL(movstrSI32):
39.476 - mov.l @(28,r5),r0
39.477 - mov.l r0,@(28,r4)
39.478 - .global GLOBAL(movstrSI28)
39.479 -+ FUNC(GLOBAL(movstrSI28))
39.480 - GLOBAL(movstrSI28):
39.481 - mov.l @(24,r5),r0
39.482 - mov.l r0,@(24,r4)
39.483 - .global GLOBAL(movstrSI24)
39.484 -+ FUNC(GLOBAL(movstrSI24))
39.485 - GLOBAL(movstrSI24):
39.486 - mov.l @(20,r5),r0
39.487 - mov.l r0,@(20,r4)
39.488 - .global GLOBAL(movstrSI20)
39.489 -+ FUNC(GLOBAL(movstrSI20))
39.490 - GLOBAL(movstrSI20):
39.491 - mov.l @(16,r5),r0
39.492 - mov.l r0,@(16,r4)
39.493 - .global GLOBAL(movstrSI16)
39.494 -+ FUNC(GLOBAL(movstrSI16))
39.495 - GLOBAL(movstrSI16):
39.496 - mov.l @(12,r5),r0
39.497 - mov.l r0,@(12,r4)
39.498 - .global GLOBAL(movstrSI12)
39.499 -+ FUNC(GLOBAL(movstrSI12))
39.500 - GLOBAL(movstrSI12):
39.501 - mov.l @(8,r5),r0
39.502 - mov.l r0,@(8,r4)
39.503 - .global GLOBAL(movstrSI8)
39.504 -+ FUNC(GLOBAL(movstrSI8))
39.505 - GLOBAL(movstrSI8):
39.506 - mov.l @(4,r5),r0
39.507 - mov.l r0,@(4,r4)
39.508 - .global GLOBAL(movstrSI4)
39.509 -+ FUNC(GLOBAL(movstrSI4))
39.510 - GLOBAL(movstrSI4):
39.511 - mov.l @(0,r5),r0
39.512 - mov.l r0,@(0,r4)
39.513 -+ .global GLOBAL(movstrSI0)
39.514 -+ FUNC(GLOBAL(movstrSI0))
39.515 - GLOBAL(movstrSI0):
39.516 - rts
39.517 - nop
39.518 -
39.519 -+ ENDFUNC(GLOBAL(movstrSI64))
39.520 -+ ENDFUNC(GLOBAL(movstrSI60))
39.521 -+ ENDFUNC(GLOBAL(movstrSI56))
39.522 -+ ENDFUNC(GLOBAL(movstrSI52))
39.523 -+ ENDFUNC(GLOBAL(movstrSI48))
39.524 -+ ENDFUNC(GLOBAL(movstrSI44))
39.525 -+ ENDFUNC(GLOBAL(movstrSI40))
39.526 -+ ENDFUNC(GLOBAL(movstrSI36))
39.527 -+ ENDFUNC(GLOBAL(movstrSI32))
39.528 -+ ENDFUNC(GLOBAL(movstrSI28))
39.529 -+ ENDFUNC(GLOBAL(movstrSI24))
39.530 -+ ENDFUNC(GLOBAL(movstrSI20))
39.531 -+ ENDFUNC(GLOBAL(movstrSI16))
39.532 -+ ENDFUNC(GLOBAL(movstrSI12))
39.533 -+ ENDFUNC(GLOBAL(movstrSI8))
39.534 -+ ENDFUNC(GLOBAL(movstrSI4))
39.535 -+ ENDFUNC(GLOBAL(movstrSI0))
39.536 -+
39.537 - .align 4
39.538 -
39.539 - .global GLOBAL(movstr)
39.540 -+ FUNC(GLOBAL(movstr))
39.541 - GLOBAL(movstr):
39.542 - mov.l @(60,r5),r0
39.543 - mov.l r0,@(60,r4)
39.544 -@@ -775,6 +895,8 @@
39.545 - add #64,r5
39.546 - bra GLOBAL(movstr)
39.547 - add #64,r4
39.548 -+
39.549 -+ FUNC(GLOBAL(movstr))
39.550 - #endif
39.551 -
39.552 - #ifdef L_movstr_i4
39.553 -@@ -783,6 +905,10 @@
39.554 - .global GLOBAL(movstr_i4_odd)
39.555 - .global GLOBAL(movstrSI12_i4)
39.556 -
39.557 -+ FUNC(GLOBAL(movstr_i4_even))
39.558 -+ FUNC(GLOBAL(movstr_i4_odd))
39.559 -+ FUNC(GLOBAL(movstrSI12_i4))
39.560 -+
39.561 - .p2align 5
39.562 - L_movstr_2mod4_end:
39.563 - mov.l r0,@(16,r4)
39.564 -@@ -791,6 +917,11 @@
39.565 -
39.566 - .p2align 2
39.567 -
39.568 -+GLOBAL(movstr_i4_even):
39.569 -+ mov.l @r5+,r0
39.570 -+ bra L_movstr_start_even
39.571 -+ mov.l @r5+,r1
39.572 -+
39.573 - GLOBAL(movstr_i4_odd):
39.574 - mov.l @r5+,r1
39.575 - add #-4,r4
39.576 -@@ -817,10 +948,8 @@
39.577 - rts
39.578 - mov.l r3,@(12,r4)
39.579 -
39.580 --GLOBAL(movstr_i4_even):
39.581 -- mov.l @r5+,r0
39.582 -- bra L_movstr_start_even
39.583 -- mov.l @r5+,r1
39.584 -+ ENDFUNC(GLOBAL(movstr_i4_even))
39.585 -+ ENDFUNC(GLOBAL(movstr_i4_odd))
39.586 -
39.587 - .p2align 4
39.588 - GLOBAL(movstrSI12_i4):
39.589 -@@ -831,12 +960,16 @@
39.590 - mov.l r1,@(4,r4)
39.591 - rts
39.592 - mov.l r2,@(8,r4)
39.593 -+
39.594 -+ ENDFUNC(GLOBAL(movstrSI12_i4))
39.595 -+
39.596 - #endif
39.597 -
39.598 - #ifdef L_mulsi3
39.599 -
39.600 -
39.601 - .global GLOBAL(mulsi3)
39.602 -+ FUNC(GLOBAL(mulsi3))
39.603 -
39.604 - ! r4 = aabb
39.605 - ! r5 = ccdd
39.606 -@@ -869,7 +1002,7 @@
39.607 - rts
39.608 - add r2,r0
39.609 -
39.610 --
39.611 -+ FUNC(GLOBAL(mulsi3))
39.612 - #endif
39.613 - #endif /* ! __SH5__ */
39.614 - #ifdef L_sdivsi3_i4
39.615 -@@ -879,6 +1012,7 @@
39.616 - !! args in r4 and r5, result in fpul, clobber dr0, dr2
39.617 -
39.618 - .global GLOBAL(sdivsi3_i4)
39.619 -+ FUNC(GLOBAL(sdivsi3_i4))
39.620 - GLOBAL(sdivsi3_i4):
39.621 - lds r4,fpul
39.622 - float fpul,dr0
39.623 -@@ -888,6 +1022,8 @@
39.624 - rts
39.625 - ftrc dr0,fpul
39.626 -
39.627 -+ ENDFUNC(GLOBAL(sdivsi3_i4))
39.628 -+
39.629 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
39.630 - !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
39.631 -
39.632 -@@ -896,6 +1032,7 @@
39.633 - .mode SHcompact
39.634 - #endif
39.635 - .global GLOBAL(sdivsi3_i4)
39.636 -+ FUNC(GLOBAL(sdivsi3_i4))
39.637 - GLOBAL(sdivsi3_i4):
39.638 - sts.l fpscr,@-r15
39.639 - mov #8,r2
39.640 -@@ -910,6 +1047,8 @@
39.641 - rts
39.642 - lds.l @r15+,fpscr
39.643 -
39.644 -+ ENDFUNC(GLOBAL(sdivsi3_i4))
39.645 -+
39.646 - #endif /* ! __SH5__ || __SH5__ == 32 */
39.647 - #endif /* ! __SH4__ */
39.648 - #endif
39.649 -@@ -924,9 +1063,10 @@
39.650 - !!
39.651 - !!
39.652 -
39.653 --!! args in r4 and r5, result in r0 clobber r1,r2,r3
39.654 -+!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
39.655 -
39.656 - .global GLOBAL(sdivsi3)
39.657 -+ FUNC(GLOBAL(sdivsi3))
39.658 - #if __SHMEDIA__
39.659 - #if __SH5__ == 32
39.660 - .section .text..SHmedia32,"ax"
39.661 -@@ -1076,6 +1216,7 @@
39.662 - div0: rts
39.663 - mov #0,r0
39.664 -
39.665 -+ ENDFUNC(GLOBAL(sdivsi3))
39.666 - #endif /* ! __SHMEDIA__ */
39.667 - #endif /* ! __SH4__ */
39.668 - #endif
39.669 -@@ -1084,9 +1225,11 @@
39.670 - .title "SH DIVIDE"
39.671 - !! 4 byte integer Divide code for the Hitachi SH
39.672 - #ifdef __SH4__
39.673 --!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
39.674 -+!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
39.675 -+!! and t bit
39.676 -
39.677 - .global GLOBAL(udivsi3_i4)
39.678 -+ FUNC(GLOBAL(udivsi3_i4))
39.679 - GLOBAL(udivsi3_i4):
39.680 - mov #1,r1
39.681 - cmp/hi r1,r5
39.682 -@@ -1127,6 +1270,8 @@
39.683 - L1:
39.684 - .double 2147483648
39.685 -
39.686 -+ ENDFUNC(GLOBAL(udivsi3_i4))
39.687 -+
39.688 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
39.689 - !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
39.690 -
39.691 -@@ -1135,6 +1280,7 @@
39.692 - .mode SHcompact
39.693 - #endif
39.694 - .global GLOBAL(udivsi3_i4)
39.695 -+ FUNC(GLOBAL(udivsi3_i4))
39.696 - GLOBAL(udivsi3_i4):
39.697 - mov #1,r1
39.698 - cmp/hi r1,r5
39.699 -@@ -1183,6 +1329,8 @@
39.700 - #endif
39.701 - .double 2147483648
39.702 -
39.703 -+ ENDFUNC(GLOBAL(udivsi3_i4))
39.704 -+
39.705 - #endif /* ! __SH5__ || __SH5__ == 32 */
39.706 - #endif /* ! __SH4__ */
39.707 - #endif
39.708 -@@ -1199,6 +1347,7 @@
39.709 -
39.710 - !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
39.711 - .global GLOBAL(udivsi3)
39.712 -+ FUNC(GLOBAL(udivsi3))
39.713 -
39.714 - #if __SHMEDIA__
39.715 - #if __SH5__ == 32
39.716 -@@ -1299,6 +1448,8 @@
39.717 - ret: rts
39.718 - mov r4,r0
39.719 -
39.720 -+ ENDFUNC(GLOBAL(udivsi3))
39.721 -+
39.722 - #endif /* ! __SHMEDIA__ */
39.723 - #endif /* __SH4__ */
39.724 - #endif
39.725 -@@ -1308,6 +1459,7 @@
39.726 - .mode SHcompact
39.727 - #endif
39.728 - .global GLOBAL(set_fpscr)
39.729 -+ FUNC(GLOBAL(set_fpscr))
39.730 - GLOBAL(set_fpscr):
39.731 - lds r4,fpscr
39.732 - mov.l LOCAL(set_fpscr_L1),r1
39.733 -@@ -1340,11 +1492,16 @@
39.734 - .align 2
39.735 - LOCAL(set_fpscr_L1):
39.736 - .long GLOBAL(fpscr_values)
39.737 -+
39.738 -+ ENDFUNC(GLOBAL(set_fpscr))
39.739 -+
39.740 -+#ifndef NO_FPSCR_VALUES
39.741 - #ifdef __ELF__
39.742 - .comm GLOBAL(fpscr_values),8,4
39.743 - #else
39.744 - .comm GLOBAL(fpscr_values),8
39.745 - #endif /* ELF */
39.746 -+#endif /* NO_FPSCR_VALUES */
39.747 - #endif /* SH3E / SH4 */
39.748 - #endif /* L_set_fpscr */
39.749 - #ifdef L_ic_invalidate
39.750 -@@ -1360,6 +1517,7 @@
39.751 - blink tr0, r63
39.752 - #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
39.753 - .global GLOBAL(ic_invalidate)
39.754 -+ FUNC(GLOBAL(ic_invalidate))
39.755 - GLOBAL(ic_invalidate):
39.756 - ocbwb @r4
39.757 - mova 0f,r0
39.758 -@@ -1382,6 +1540,9 @@
39.759 - nop
39.760 - .endr
39.761 - .endr
39.762 -+
39.763 -+ ENDFUNC(GLOBAL(ic_invalidate))
39.764 -+
39.765 - #endif /* SH4 */
39.766 - #endif /* L_ic_invalidate */
39.767 -
39.768 -diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
39.769 ---- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver Thu Jan 1 09:00:00 1970
39.770 -+++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver Sat Feb 22 01:40:14 2003
39.771 -@@ -0,0 +1,21 @@
39.772 -+# In order to work around the very problems that force us to now generally
39.773 -+# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
39.774 -+# By now choosing the same version tags for these specific routines, we
39.775 -+# maintain enough binary compatibility to allow future versions of glibc
39.776 -+# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
39.777 -+
39.778 -+# Note that we cannot use the default libgcc-glibc.ver file on sh,
39.779 -+# because GLIBC_2.0 does not exist on this architecture, as the first
39.780 -+# ever glibc release on the platform was GLIBC_2.2.
39.781 -+
39.782 -+%inherit GCC_3.0 GLIBC_2.2
39.783 -+GLIBC_2.2 {
39.784 -+ __register_frame
39.785 -+ __register_frame_table
39.786 -+ __deregister_frame
39.787 -+ __register_frame_info
39.788 -+ __deregister_frame_info
39.789 -+ __frame_state_for
39.790 -+ __register_frame_info_table
39.791 -+}
39.792 -+
39.793 -diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
39.794 ---- gcc-20030210.orig/gcc/config/sh/linux.h Tue Apr 16 05:27:42 2002
39.795 -+++ gcc-20030210/gcc/config/sh/linux.h Sat Feb 22 01:40:14 2003
39.796 -@@ -19,6 +19,10 @@
39.797 - the Free Software Foundation, 59 Temple Place - Suite 330,
39.798 - Boston, MA 02111-1307, USA. */
39.799 -
39.800 -+/* We're not SYSVR4, not having /usr/ccs */
39.801 -+#undef MD_EXEC_PREFIX
39.802 -+#undef MD_STARTFILE_PREFIX
39.803 -+
39.804 - /* Run-time Target Specification. */
39.805 - #undef TARGET_VERSION
39.806 - #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr);
39.807 -@@ -39,6 +43,28 @@
39.808 - #undef WCHAR_TYPE_SIZE
39.809 - #define WCHAR_TYPE_SIZE BITS_PER_WORD
39.810 -
39.811 -+/* This was defined in linux.h. Define it here also. */
39.812 -+#undef DEFAULT_VTABLE_THUNKS
39.813 -+#define DEFAULT_VTABLE_THUNKS 1
39.814 -+
39.815 -+/* Likewise. */
39.816 -+#define HANDLE_PRAGMA_PACK_PUSH_POP
39.817 -+
39.818 -+/* Pick up the return address upon entry to a procedure. Used for
39.819 -+ dwarf2 unwind information. This also enables the table driven
39.820 -+ mechanism. */
39.821 -+
39.822 -+#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, PR_REG)
39.823 -+#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PR_REG)
39.824 -+
39.825 -+#undef CPP_SPEC
39.826 -+#define CPP_SPEC "\
39.827 -+ %{m4:-D__SH4__} \
39.828 -+ %{!m4:%(cpp_default_cpu_spec)} \
39.829 -+ %(subtarget_cpp_spec) \
39.830 -+ %(subtarget_cpp_ptr_spec) \
39.831 -+ %(subtarget_cpp_endian_spec) "
39.832 -+
39.833 - #undef SUBTARGET_CPP_SPEC
39.834 - #define SUBTARGET_CPP_SPEC "\
39.835 - %{fPIC:-D__PIC__ -D__pic__} \
39.836 -@@ -55,36 +81,45 @@
39.837 - #undef CPP_DEFAULT_CPU_SPEC
39.838 - #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
39.839 -
39.840 --
39.841 - #undef CPP_PREDEFINES
39.842 - #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
39.843 -
39.844 -+/* The GNU C++ standard library requires that these macros be defined. */
39.845 -+#undef CPLUSPLUS_CPP_SPEC
39.846 -+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
39.847 -+
39.848 - #undef ASM_SPEC
39.849 --#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
39.850 -+#define ASM_SPEC "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
39.851 -
39.852 - #undef CC1_SPEC
39.853 - #define CC1_SPEC \
39.854 -- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
39.855 --
39.856 --#undef CC1PLUS_SPEC
39.857 --#define CC1PLUS_SPEC \
39.858 -- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
39.859 -+ "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
39.860 -
39.861 -+/* XXX: It's wrong if prefix != /usr */
39.862 - #undef LINK_SPEC
39.863 - #define LINK_SPEC \
39.864 -- "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
39.865 -+ "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
39.866 - %{shared:-shared} \
39.867 - %{!static: \
39.868 - %{rdynamic:-export-dynamic} \
39.869 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
39.870 -- %{!rpath:-rpath /lib}} \
39.871 -+ %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
39.872 -+ %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
39.873 -+ %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
39.874 -+ %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
39.875 - %{static:-static}"
39.876 -
39.877 - #undef LIB_SPEC
39.878 -+#undef LIB_SPEC
39.879 - #define LIB_SPEC \
39.880 - "%{shared: -lc} \
39.881 -- %{!shared: %{pthread:-lthread} \
39.882 -- %{profile:-lc_p} %{!profile: -lc}}"
39.883 -+ %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
39.884 -+ %{profile:-lc_p} %{!profile: -lc}}"
39.885 -+
39.886 -+#if defined(HAVE_LD_EH_FRAME_HDR)
39.887 -+#undef LINK_EH_SPEC
39.888 -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
39.889 -+#endif
39.890 -
39.891 - #undef STARTFILE_SPEC
39.892 - #define STARTFILE_SPEC \
39.893 -@@ -92,4 +127,40 @@
39.894 - %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
39.895 - %{!p:%{profile:gcrt1.o%s} \
39.896 - %{!profile:crt1.o%s}}}} \
39.897 -- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
39.898 -+ crti.o%s %{static:crtbeginT.o%s}\
39.899 -+ %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
39.900 -+
39.901 -+#undef FUNCTION_PROFILER
39.902 -+#define FUNCTION_PROFILER(STREAM,LABELNO) \
39.903 -+do \
39.904 -+{ \
39.905 -+ if (flag_pic) \
39.906 -+ { \
39.907 -+ fprintf (STREAM, " mov.l 3f,r1\n"); \
39.908 -+ fprintf (STREAM, " mova 3f,r0\n"); \
39.909 -+ fprintf (STREAM, " add r1,r0\n"); \
39.910 -+ fprintf (STREAM, " mov.l 1f,r1\n"); \
39.911 -+ fprintf (STREAM, " mov.l @(r0,r1),r1\n"); \
39.912 -+ } \
39.913 -+ else \
39.914 -+ { \
39.915 -+ fprintf (STREAM, " mov.l 1f,r1\n"); \
39.916 -+ } \
39.917 -+ fprintf (STREAM, " sts.l pr,@-r15\n"); \
39.918 -+ fprintf (STREAM, " mova 2f,r0\n"); \
39.919 -+ fprintf (STREAM, " jmp @r1\n"); \
39.920 -+ fprintf (STREAM, " lds r0,pr\n"); \
39.921 -+ fprintf (STREAM, " .align 2\n"); \
39.922 -+ if (flag_pic) \
39.923 -+ { \
39.924 -+ fprintf (STREAM, "1: .long mcount@GOT\n"); \
39.925 -+ fprintf (STREAM, "3: .long _GLOBAL_OFFSET_TABLE_\n"); \
39.926 -+ } \
39.927 -+ else \
39.928 -+ { \
39.929 -+ fprintf (STREAM, "1: .long mcount\n"); \
39.930 -+ } \
39.931 -+ fprintf (STREAM, "2: lds.l @r15+,pr\n"); \
39.932 -+} while (0)
39.933 -+
39.934 -+#define NO_SHARED_LIBGCC_MULTILIB
39.935 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
39.936 ---- gcc-20030210.orig/gcc/config/sh/sh-protos.h Fri Feb 22 01:42:28 2002
39.937 -+++ gcc-20030210/gcc/config/sh/sh-protos.h Sat Feb 22 01:40:14 2003
39.938 -@@ -74,6 +74,7 @@
39.939 - extern int shl_sext_length PARAMS ((rtx));
39.940 - extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
39.941 - extern rtx gen_datalabel_ref PARAMS ((rtx));
39.942 -+extern int shl_casesi_worker_length PARAMS ((rtx));
39.943 - extern int regs_used PARAMS ((rtx, int));
39.944 - extern void fixup_addr_diff_vecs PARAMS ((rtx));
39.945 - extern int get_dest_uid PARAMS ((rtx, int));
39.946 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
39.947 ---- gcc-20030210.orig/gcc/config/sh/sh.c Fri Feb 22 01:42:28 2002
39.948 -+++ gcc-20030210/gcc/config/sh/sh.c Sat Feb 22 01:40:14 2003
39.949 -@@ -2143,6 +2143,48 @@
39.950 - return sym;
39.951 - }
39.952 -
39.953 -+
39.954 -+/* Function to be used in the length attribute of the casesi_worker
39.955 -+ instruction. Returns number of instructions, which is half of the
39.956 -+ length of bytes. */
39.957 -+
39.958 -+int
39.959 -+shl_casesi_worker_length (insn)
39.960 -+ rtx insn;
39.961 -+{
39.962 -+ rtx set_src, label;
39.963 -+ rtx diff_vec;
39.964 -+
39.965 -+ set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
39.966 -+ if (!(GET_CODE (set_src) == UNSPEC
39.967 -+ && XINT (set_src, 1) == UNSPEC_CASESI))
39.968 -+ abort ();
39.969 -+
39.970 -+ label = XVECEXP (set_src, 0, 2);
39.971 -+ if (GET_CODE (label) != LABEL_REF)
39.972 -+ abort ();
39.973 -+
39.974 -+ diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
39.975 -+
39.976 -+ if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
39.977 -+ abort ();
39.978 -+
39.979 -+ switch (GET_MODE (diff_vec))
39.980 -+ {
39.981 -+ case SImode:
39.982 -+ return 2;
39.983 -+ case HImode:
39.984 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
39.985 -+ return 3;
39.986 -+ return 2;
39.987 -+ case QImode:
39.988 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
39.989 -+ return 2;
39.990 -+ return 1;
39.991 -+ default:
39.992 -+ abort ();
39.993 -+ }
39.994 -+}
39.995 -
39.996 - /* The SH cannot load a large constant into a register, constants have to
39.997 - come from a pc relative load. The reference of a pc relative load
39.998 -@@ -3190,7 +3232,7 @@
39.999 - vec_lab = XEXP (XEXP (pat, 0), 0);
39.1000 -
39.1001 - /* Search the matching casesi_jump_2. */
39.1002 -- for (prev = vec_lab; ; prev = PREV_INSN (prev))
39.1003 -+ for (prev = vec_lab; prev; prev = PREV_INSN (prev))
39.1004 - {
39.1005 - if (GET_CODE (prev) != JUMP_INSN)
39.1006 - continue;
39.1007 -@@ -3205,6 +3247,13 @@
39.1008 - break;
39.1009 - }
39.1010 -
39.1011 -+ if (prev == NULL)
39.1012 -+ { /* Switch statement has been optimized out. */
39.1013 -+ delete_insn (PREV_INSN (insn));
39.1014 -+ delete_insn (insn);
39.1015 -+ continue;
39.1016 -+ }
39.1017 -+
39.1018 - /* Emit the reference label of the braf where it belongs, right after
39.1019 - the casesi_jump_2 (i.e. braf). */
39.1020 - braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
39.1021 -@@ -3223,7 +3272,7 @@
39.1022 - rtx barrier_or_label;
39.1023 - {
39.1024 - rtx next = next_real_insn (barrier_or_label), pat, prev;
39.1025 -- int slot, credit, jump_to_next;
39.1026 -+ int slot, credit, jump_to_next = 0;
39.1027 -
39.1028 - if (! next)
39.1029 - return 0;
39.1030 -@@ -4507,7 +4556,8 @@
39.1031 - if (current_function_varargs || current_function_stdarg)
39.1032 - {
39.1033 - /* This is not used by the SH3E calling convention */
39.1034 -- if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
39.1035 -+ if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
39.1036 -+ || TARGET_NO_IMPLICIT_FP)
39.1037 - {
39.1038 - /* Push arg regs as if they'd been provided by caller in stack. */
39.1039 - for (i = 0; i < NPARM_REGS(SImode); i++)
39.1040 -@@ -5149,7 +5199,8 @@
39.1041 - tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
39.1042 - tree record;
39.1043 -
39.1044 -- if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
39.1045 -+ if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
39.1046 -+ || TARGET_NO_IMPLICIT_FP)
39.1047 - return ptr_type_node;
39.1048 -
39.1049 - record = make_node (RECORD_TYPE);
39.1050 -@@ -5211,7 +5262,8 @@
39.1051 - return;
39.1052 - }
39.1053 -
39.1054 -- if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
39.1055 -+ if ((! TARGET_SH3E && ! TARGET_SH4)
39.1056 -+ || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
39.1057 - {
39.1058 - std_expand_builtin_va_start (stdarg_p, valist, nextarg);
39.1059 - return;
39.1060 -@@ -5289,7 +5341,8 @@
39.1061 - rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
39.1062 - pptr_type_node = build_pointer_type (ptr_type_node);
39.1063 -
39.1064 -- if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
39.1065 -+ if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
39.1066 -+ && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
39.1067 - {
39.1068 - tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
39.1069 - tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
39.1070 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
39.1071 ---- gcc-20030210.orig/gcc/config/sh/sh.h Fri Feb 22 01:42:28 2002
39.1072 -+++ gcc-20030210/gcc/config/sh/sh.h Sat Feb 22 01:40:14 2003
39.1073 -@@ -147,10 +147,10 @@
39.1074 - #define HARD_SH4_BIT (1<<5)
39.1075 - #define FPU_SINGLE_BIT (1<<7)
39.1076 - #define SH4_BIT (1<<12)
39.1077 -+#define NO_IMPLICIT_FP_BIT (1<<3)
39.1078 - #define FMOVD_BIT (1<<4)
39.1079 - #define SH5_BIT (1<<0)
39.1080 - #define SPACE_BIT (1<<13)
39.1081 --#define BIGTABLE_BIT (1<<14)
39.1082 - #define RELAX_BIT (1<<15)
39.1083 - #define USERMODE_BIT (1<<16)
39.1084 - #define HITACHI_BIT (1<<22)
39.1085 -@@ -205,6 +205,9 @@
39.1086 - /* Nonzero if we should generate code for a SH5 CPU (either ISA). */
39.1087 - #define TARGET_SH5 (target_flags & SH5_BIT)
39.1088 -
39.1089 -+/* Nonzero if we should not use FPU implicitly. */
39.1090 -+#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
39.1091 -+
39.1092 - /* Nonzero if we should generate code using the SHcompact instruction
39.1093 - set and 32-bit ABI. */
39.1094 - #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
39.1095 -@@ -225,6 +228,7 @@
39.1096 -
39.1097 - /* Nonzero if we should generate code using SHmedia FPU instructions. */
39.1098 - #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
39.1099 -+
39.1100 - /* Nonzero if we should generate fmovd. */
39.1101 - #define TARGET_FMOVD (target_flags & FMOVD_BIT)
39.1102 -
39.1103 -@@ -234,9 +238,6 @@
39.1104 - /* Nonzero if we should generate smaller code rather than faster code. */
39.1105 - #define TARGET_SMALLCODE (target_flags & SPACE_BIT)
39.1106 -
39.1107 --/* Nonzero to use long jump tables. */
39.1108 --#define TARGET_BIGTABLE (target_flags & BIGTABLE_BIT)
39.1109 --
39.1110 - /* Nonzero to generate pseudo-ops needed by the assembler and linker
39.1111 - to do function call relaxing. */
39.1112 - #define TARGET_RELAX (target_flags & RELAX_BIT)
39.1113 -@@ -297,7 +298,6 @@
39.1114 - {"5-compact-nofpu", TARGET_NONE, "" }, \
39.1115 - {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
39.1116 - {"b", -LITTLE_ENDIAN_BIT, "" }, \
39.1117 -- {"bigtable", BIGTABLE_BIT, "" }, \
39.1118 - {"dalign", DALIGN_BIT, "" }, \
39.1119 - {"fmovd", FMOVD_BIT, "" }, \
39.1120 - {"hitachi", HITACHI_BIT, "" }, \
39.1121 -@@ -306,6 +306,7 @@
39.1122 - {"isize", ISIZE_BIT, "" }, \
39.1123 - {"l", LITTLE_ENDIAN_BIT, "" }, \
39.1124 - {"no-ieee", -IEEE_BIT, "" }, \
39.1125 -+ {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" }, \
39.1126 - {"padstruct", PADSTRUCT_BIT, "" }, \
39.1127 - {"prefergot", PREFERGOT_BIT, "" }, \
39.1128 - {"relax", RELAX_BIT, "" }, \
39.1129 -@@ -2493,16 +2494,22 @@
39.1130 - goto LABEL; \
39.1131 - }
39.1132 -
39.1133 -+extern int optimize; /* needed for gen_casesi. */
39.1134 -+extern int optimize_size;
39.1135 -+
39.1136 - /* Specify the machine mode that this machine uses
39.1137 - for the index in the tablejump instruction. */
39.1138 --#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
39.1139 -+#define CASE_VECTOR_MODE SImode
39.1140 -
39.1141 - #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
39.1142 - ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
39.1143 - ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
39.1144 - : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
39.1145 - ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
39.1146 -- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
39.1147 -+ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
39.1148 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
39.1149 -+ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
39.1150 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
39.1151 - : SImode)
39.1152 -
39.1153 - /* Define as C expression which evaluates to nonzero if the tablejump
39.1154 -@@ -3038,10 +3045,7 @@
39.1155 - /* Output an absolute table element. */
39.1156 -
39.1157 - #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \
39.1158 -- if (TARGET_BIGTABLE) \
39.1159 -- asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \
39.1160 -- else \
39.1161 -- asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \
39.1162 -+ asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
39.1163 -
39.1164 - /* Output various types of constants. */
39.1165 -
39.1166 -@@ -3167,8 +3171,6 @@
39.1167 - #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
39.1168 - extern enum processor_type sh_cpu;
39.1169 -
39.1170 --extern int optimize; /* needed for gen_casesi. */
39.1171 --
39.1172 - enum mdep_reorg_phase_e
39.1173 - {
39.1174 - SH_BEFORE_MDEP_REORG,
39.1175 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
39.1176 ---- gcc-20030210.orig/gcc/config/sh/sh.md Sat Nov 23 04:58:06 2002
39.1177 -+++ gcc-20030210/gcc/config/sh/sh.md Sat Feb 22 01:40:14 2003
39.1178 -@@ -1242,7 +1242,7 @@
39.1179 - (clobber (reg:SI PR_REG))
39.1180 - (clobber (reg:SI R4_REG))
39.1181 - (use (match_operand:SI 1 "arith_reg_operand" "r"))]
39.1182 -- "TARGET_SH1 && ! TARGET_SH4"
39.1183 -+ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
39.1184 - "jsr @%1%#"
39.1185 - [(set_attr "type" "sfunc")
39.1186 - (set_attr "needs_delay_slot" "yes")])
39.1187 -@@ -1336,7 +1336,7 @@
39.1188 -
39.1189 - operands[3] = gen_reg_rtx (Pmode);
39.1190 - /* Emit the move of the address to a pseudo outside of the libcall. */
39.1191 -- if (TARGET_HARD_SH4 && TARGET_SH3E)
39.1192 -+ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
39.1193 - {
39.1194 - emit_move_insn (operands[3],
39.1195 - gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
39.1196 -@@ -1391,7 +1391,7 @@
39.1197 - (clobber (reg:SI R2_REG))
39.1198 - (clobber (reg:SI R3_REG))
39.1199 - (use (match_operand:SI 1 "arith_reg_operand" "r"))]
39.1200 -- "TARGET_SH1 && ! TARGET_SH4"
39.1201 -+ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
39.1202 - "jsr @%1%#"
39.1203 - [(set_attr "type" "sfunc")
39.1204 - (set_attr "needs_delay_slot" "yes")])
39.1205 -@@ -1476,7 +1476,7 @@
39.1206 -
39.1207 - operands[3] = gen_reg_rtx (Pmode);
39.1208 - /* Emit the move of the address to a pseudo outside of the libcall. */
39.1209 -- if (TARGET_HARD_SH4 && TARGET_SH3E)
39.1210 -+ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
39.1211 - {
39.1212 - emit_move_insn (operands[3],
39.1213 - gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
39.1214 -@@ -6446,6 +6446,8 @@
39.1215 - case SImode:
39.1216 - return \"shll2 %1\;mov.l @(r0,%1),%0\";
39.1217 - case HImode:
39.1218 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
39.1219 -+ return \"add %1,%1\;mov.w @(r0,%1),%0\;extu.w %0,%0\";
39.1220 - return \"add %1,%1\;mov.w @(r0,%1),%0\";
39.1221 - case QImode:
39.1222 - if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
39.1223 -@@ -6455,7 +6457,15 @@
39.1224 - abort ();
39.1225 - }
39.1226 - }"
39.1227 -- [(set_attr "length" "4")])
39.1228 -+ [(set (attr "length")
39.1229 -+ (cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
39.1230 -+ (const_string "2")
39.1231 -+ (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
39.1232 -+ (const_string "4")
39.1233 -+ ;; Put "match_dup" here so that insn_variable_length_p return 1.
39.1234 -+ (ne (match_dup 2) (match_dup 2))
39.1235 -+ (const_string "4")]
39.1236 -+ (const_string "6")))])
39.1237 -
39.1238 - (define_insn "casesi_shift_media"
39.1239 - [(set (match_operand 0 "arith_reg_operand" "=r")
39.1240 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
39.1241 ---- gcc-20030210.orig/gcc/config/sh/sh3-linux.h Thu Jan 1 09:00:00 1970
39.1242 -+++ gcc-20030210/gcc/config/sh/sh3-linux.h Sat Feb 22 01:40:14 2003
39.1243 -@@ -0,0 +1,29 @@
39.1244 -+#undef TARGET_VERSION
39.1245 -+#define TARGET_VERSION fputs (" (SH3 GNU/Linux with ELF)", stderr);
39.1246 -+
39.1247 -+#undef CPP_SPEC
39.1248 -+#define CPP_SPEC \
39.1249 -+ "-D__LITTLE_ENDIAN__ \
39.1250 -+ -D__SH3__ -D__sh3__ \
39.1251 -+ -D__SIZE_TYPE__=unsigned\\ int \
39.1252 -+ -D__PTRDIFF_TYPE__=int \
39.1253 -+ %{fPIC:-D__PIC__ -D__pic__} \
39.1254 -+ %{fpic:-D__PIC__ -D__pic__} \
39.1255 -+ %{posix:-D_POSIX_SOURCE} \
39.1256 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
39.1257 -+
39.1258 -+#undef ASM_SPEC
39.1259 -+#define ASM_SPEC "%{mrelax:-relax}"
39.1260 -+
39.1261 -+#undef CC1_SPEC
39.1262 -+#define CC1_SPEC \
39.1263 -+ "-musermode -ml -m3 %{profile:-p}"
39.1264 -+
39.1265 -+#undef LINK_SPEC
39.1266 -+#define LINK_SPEC \
39.1267 -+ "%{mrelax:-relax} \
39.1268 -+ %{shared:-shared} \
39.1269 -+ %{!static: \
39.1270 -+ %{rdynamic:-export-dynamic} \
39.1271 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
39.1272 -+ %{static:-static}"
39.1273 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
39.1274 ---- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h Thu Jan 1 09:00:00 1970
39.1275 -+++ gcc-20030210/gcc/config/sh/sh3eb-linux.h Sat Feb 22 01:40:14 2003
39.1276 -@@ -0,0 +1,29 @@
39.1277 -+#undef TARGET_VERSION
39.1278 -+#define TARGET_VERSION fputs (" (SH3EB GNU/Linux with ELF)", stderr);
39.1279 -+
39.1280 -+#undef CPP_SPEC
39.1281 -+#define CPP_SPEC \
39.1282 -+ "-D__BIG_ENDIAN__ \
39.1283 -+ -D__SH3__ -D__sh3__ \
39.1284 -+ -D__SIZE_TYPE__=unsigned\\ int \
39.1285 -+ -D__PTRDIFF_TYPE__=int \
39.1286 -+ %{fPIC:-D__PIC__ -D__pic__} \
39.1287 -+ %{fpic:-D__PIC__ -D__pic__} \
39.1288 -+ %{posix:-D_POSIX_SOURCE} \
39.1289 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
39.1290 -+
39.1291 -+#undef ASM_SPEC
39.1292 -+#define ASM_SPEC "%{mrelax:-relax}"
39.1293 -+
39.1294 -+#undef CC1_SPEC
39.1295 -+#define CC1_SPEC \
39.1296 -+ "-musermode -mb -m3 %{profile:-p}"
39.1297 -+
39.1298 -+#undef LINK_SPEC
39.1299 -+#define LINK_SPEC \
39.1300 -+ "%{mrelax:-relax} \
39.1301 -+ %{shared:-shared} \
39.1302 -+ %{!static: \
39.1303 -+ %{rdynamic:-export-dynamic} \
39.1304 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
39.1305 -+ %{static:-static}"
39.1306 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
39.1307 ---- gcc-20030210.orig/gcc/config/sh/sh4-linux.h Thu Jan 1 09:00:00 1970
39.1308 -+++ gcc-20030210/gcc/config/sh/sh4-linux.h Sat Feb 22 01:40:14 2003
39.1309 -@@ -0,0 +1,29 @@
39.1310 -+#undef TARGET_VERSION
39.1311 -+#define TARGET_VERSION fputs (" (SH4 GNU/Linux with ELF)", stderr);
39.1312 -+
39.1313 -+#undef CPP_SPEC
39.1314 -+#define CPP_SPEC \
39.1315 -+ "-D__LITTLE_ENDIAN__ \
39.1316 -+ -D__SH4__ \
39.1317 -+ -D__SIZE_TYPE__=unsigned\\ int \
39.1318 -+ -D__PTRDIFF_TYPE__=int \
39.1319 -+ %{fPIC:-D__PIC__ -D__pic__} \
39.1320 -+ %{fpic:-D__PIC__ -D__pic__} \
39.1321 -+ %{posix:-D_POSIX_SOURCE} \
39.1322 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
39.1323 -+
39.1324 -+#undef ASM_SPEC
39.1325 -+#define ASM_SPEC "%{mrelax:-relax}"
39.1326 -+
39.1327 -+#undef CC1_SPEC
39.1328 -+#define CC1_SPEC \
39.1329 -+ "-musermode -ml -m4 %{profile:-p}"
39.1330 -+
39.1331 -+#undef LINK_SPEC
39.1332 -+#define LINK_SPEC \
39.1333 -+ "%{mrelax:-relax} \
39.1334 -+ %{shared:-shared} \
39.1335 -+ %{!static: \
39.1336 -+ %{rdynamic:-export-dynamic} \
39.1337 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
39.1338 -+ %{static:-static}"
39.1339 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
39.1340 ---- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h Thu Jan 1 09:00:00 1970
39.1341 -+++ gcc-20030210/gcc/config/sh/sh4eb-linux.h Sat Feb 22 01:40:14 2003
39.1342 -@@ -0,0 +1,29 @@
39.1343 -+#undef TARGET_VERSION
39.1344 -+#define TARGET_VERSION fputs (" (SH4EB GNU/Linux with ELF)", stderr);
39.1345 -+
39.1346 -+#undef CPP_SPEC
39.1347 -+#define CPP_SPEC \
39.1348 -+ "-D__BIG_ENDIAN__ \
39.1349 -+ -D__SH4__ \
39.1350 -+ -D__SIZE_TYPE__=unsigned\\ int \
39.1351 -+ -D__PTRDIFF_TYPE__=int \
39.1352 -+ %{fPIC:-D__PIC__ -D__pic__} \
39.1353 -+ %{fpic:-D__PIC__ -D__pic__} \
39.1354 -+ %{posix:-D_POSIX_SOURCE} \
39.1355 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
39.1356 -+
39.1357 -+#undef ASM_SPEC
39.1358 -+#define ASM_SPEC "%{mrelax:-relax}"
39.1359 -+
39.1360 -+#undef CC1_SPEC
39.1361 -+#define CC1_SPEC \
39.1362 -+ "-musermode -mb -m4 %{profile:-p}"
39.1363 -+
39.1364 -+#undef LINK_SPEC
39.1365 -+#define LINK_SPEC \
39.1366 -+ "%{mrelax:-relax} \
39.1367 -+ %{shared:-shared} \
39.1368 -+ %{!static: \
39.1369 -+ %{rdynamic:-export-dynamic} \
39.1370 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
39.1371 -+ %{static:-static}"
39.1372 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
39.1373 ---- gcc-20030210.orig/gcc/config/sh/t-linux Thu May 17 12:16:12 2001
39.1374 -+++ gcc-20030210/gcc/config/sh/t-linux Sat Feb 22 01:40:14 2003
39.1375 -@@ -1,10 +1,20 @@
39.1376 --TARGET_LIBGCC2_CFLAGS = -fpic
39.1377 -+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
39.1378 -+LIBGCC1 = libgcc1-asm.a
39.1379 -+CROSS_LIBGCC1 = libgcc1-asm.a
39.1380 -+LIBGCC1_TEST = libgcc1-test
39.1381 - LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
39.1382 - _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
39.1383 - _ic_invalidate
39.1384 -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c
39.1385 -+LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
39.1386 -
39.1387 --MULTILIB_OPTIONS= mb m3e/m4
39.1388 -+MULTILIB_OPTIONS= mb m4
39.1389 - MULTILIB_DIRNAMES=
39.1390 - MULTILIB_MATCHES =
39.1391 -
39.1392 --EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
39.1393 -+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
39.1394 -+
39.1395 -+# Override t-slibgcc-elf-ver to export some libgcc symbols with
39.1396 -+# the symbol versions that glibc used and SH specific.
39.1397 -+SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
39.1398 -+ $(srcdir)/config/sh/libgcc-glibc.ver
39.1399 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
39.1400 ---- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti Thu Jan 1 09:00:00 1970
39.1401 -+++ gcc-20030210/gcc/config/sh/t-linux-nomulti Sat Feb 22 01:40:14 2003
39.1402 -@@ -0,0 +1,9 @@
39.1403 -+LIBGCC = libgcc.a
39.1404 -+EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
39.1405 -+
39.1406 -+INSTALL_LIBGCC = install-libgcc
39.1407 -+
39.1408 -+MULTILIB_OPTIONS=
39.1409 -+MULTILIB_DIRNAMES=
39.1410 -+MULTILIB_MATCHES =
39.1411 -+EXTRA_MULTILIB_PARTS=
39.1412 -diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
39.1413 ---- gcc-20030210.orig/gcc/config.gcc Fri Jan 31 19:17:13 2003
39.1414 -+++ gcc-20030210/gcc/config.gcc Sat Feb 22 01:40:14 2003
39.1415 -@@ -337,9 +337,9 @@
39.1416 - sparc*-*-*)
39.1417 - cpu_type=sparc
39.1418 - ;;
39.1419 --sh64-*-*)
39.1420 -- cpu_type=sh
39.1421 -- ;;
39.1422 -+sh*-*-*)
39.1423 -+ cpu_type=sh
39.1424 -+ ;;
39.1425 - esac
39.1426 -
39.1427 - tm_file=${cpu_type}/${cpu_type}.h
39.1428 -@@ -3018,9 +3018,31 @@
39.1429 - thread_file='rtems'
39.1430 - fi
39.1431 - ;;
39.1432 --sh-*-linux*)
39.1433 -+sh*-*-linux*)
39.1434 - tm_file="${tm_file} sh/elf.h sh/linux.h"
39.1435 -- tmake_file="sh/t-sh sh/t-elf sh/t-linux"
39.1436 -+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
39.1437 -+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
39.1438 -+ case $machine in
39.1439 -+ sh3eb-*)
39.1440 -+ tm_file="${tm_file} sh/sh3eb-linux.h"
39.1441 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
39.1442 -+ ;;
39.1443 -+ sh4eb-*)
39.1444 -+ tm_file="${tm_file} sh/sh4eb-linux.h"
39.1445 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
39.1446 -+ ;;
39.1447 -+ sh3-*)
39.1448 -+ tm_file="${tm_file} sh/sh3-linux.h"
39.1449 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
39.1450 -+ ;;
39.1451 -+ sh4-*)
39.1452 -+ tm_file="${tm_file} sh/sh4-linux.h"
39.1453 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
39.1454 -+ ;;
39.1455 -+ *)
39.1456 -+ ;;
39.1457 -+ esac
39.1458 -+ xmake_file=x-linux
39.1459 - gas=yes gnu_ld=yes
39.1460 - float_format=sh
39.1461 - ;;
39.1462 -diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
39.1463 ---- gcc-20030210.orig/gcc/dwarf2out.c Mon Feb 10 19:36:25 2003
39.1464 -+++ gcc-20030210/gcc/dwarf2out.c Sat Feb 22 01:40:14 2003
39.1465 -@@ -10224,7 +10224,9 @@
39.1466 - /* We can have a normal definition following an inline one in the
39.1467 - case of redefinition of GNU C extern inlines.
39.1468 - It seems reasonable to use AT_specification in this case. */
39.1469 -- && !get_AT_unsigned (old_die, DW_AT_inline))
39.1470 -+ && !get_AT_unsigned (old_die, DW_AT_inline)
39.1471 -+ /* Skip the nested function. */
39.1472 -+ && !decl_function_context (decl))
39.1473 - {
39.1474 - /* ??? This can happen if there is a bug in the program, for
39.1475 - instance, if it has duplicate function definitions. Ideally,
39.1476 -diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
39.1477 ---- gcc-20030210.orig/gcc/final.c Fri Jan 31 19:17:20 2003
39.1478 -+++ gcc-20030210/gcc/final.c Sat Feb 22 01:40:14 2003
39.1479 -@@ -1128,7 +1128,7 @@
39.1480 - }
39.1481 - }
39.1482 -
39.1483 -- INSN_ADDRESSES (uid) = insn_current_address;
39.1484 -+ INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
39.1485 -
39.1486 - if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
39.1487 - || GET_CODE (insn) == CODE_LABEL)
39.1488 -diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
39.1489 ---- gcc-20030210.orig/gcc/mkmap-symver.awk Fri Jan 31 19:17:26 2003
39.1490 -+++ gcc-20030210/gcc/mkmap-symver.awk Sat Feb 22 01:40:14 2003
39.1491 -@@ -89,7 +89,11 @@
39.1492 - output(inherit[lib]);
39.1493 -
39.1494 - printf("%s {\n", lib);
39.1495 -- printf(" global:\n");
39.1496 -+ for (sym in ver)
39.1497 -+ if ((ver[sym] == lib) && (sym in def))
39.1498 -+ count++;
39.1499 -+ if (count > 0)
39.1500 -+ printf(" global:\n");
39.1501 - for (sym in ver)
39.1502 - if ((ver[sym] == lib) && (sym in def))
39.1503 - {
39.1504 -diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
39.1505 ---- gcc-20030210.orig/gcc/reload1.c Fri Jan 31 19:17:29 2003
39.1506 -+++ gcc-20030210/gcc/reload1.c Sat Feb 22 01:40:14 2003
39.1507 -@@ -6103,6 +6103,7 @@
39.1508 - for (j = 0; j < n_reloads; j++)
39.1509 - if (rld[j].in != 0
39.1510 - && rld[j].when_needed != RELOAD_OTHER
39.1511 -+ && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
39.1512 - && reg_overlap_mentioned_for_reload_p (rld[j].in,
39.1513 - rld[i].in))
39.1514 - rld[j].when_needed
39.1515 -diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
39.1516 ---- gcc-20030210.orig/gcc/reorg.c Fri Jan 31 19:17:30 2003
39.1517 -+++ gcc-20030210/gcc/reorg.c Sat Feb 22 01:40:14 2003
39.1518 -@@ -3265,6 +3265,14 @@
39.1519 - || condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
39.1520 - continue;
39.1521 -
39.1522 -+#ifdef MD_CAN_REDIRECT_BRANCH
39.1523 -+ /* On some targets, branches with delay slots can have a limited
39.1524 -+ displacement. Give the back end a chance to tell us we can't do
39.1525 -+ this. */
39.1526 -+ if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
39.1527 -+ continue;
39.1528 -+#endif
39.1529 -+
39.1530 - target_label = JUMP_LABEL (delay_insn);
39.1531 -
39.1532 - if (target_label)
39.1533 -diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
39.1534 ---- gcc-20030210.orig/gcc/tree-inline.c Fri Jan 31 19:17:33 2003
39.1535 -+++ gcc-20030210/gcc/tree-inline.c Sat Feb 22 01:40:14 2003
39.1536 -@@ -836,11 +836,17 @@
39.1537 -
39.1538 - /* Don't try to inline functions that are not well-suited to
39.1539 - inlining. */
39.1540 -- if (!inlinable_function_p (fn, id))
39.1541 -- return NULL_TREE;
39.1542 -+ if (! inlinable_function_p (fn, id)
39.1543 -+ || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
39.1544 -+ {
39.1545 -+ if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
39.1546 -+ {
39.1547 -+ warning_with_decl (fn, "inlining failed in call to `%s'");
39.1548 -+ warning ("called from here");
39.1549 -+ }
39.1550 -
39.1551 -- if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
39.1552 -- return NULL_TREE;
39.1553 -+ return NULL_TREE;
39.1554 -+ }
39.1555 -
39.1556 - /* Set the current filename and line number to the function we are
39.1557 - inlining so that when we create new _STMT nodes here they get
39.1558 -diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
39.1559 ---- gcc-20030210.orig/libjava/Makefile.in Tue Jan 28 10:44:37 2003
39.1560 -+++ gcc-20030210/libjava/Makefile.in Sat Feb 22 01:40:14 2003
39.1561 -@@ -1637,6 +1637,7 @@
39.1562 - "AS=$(AS)" \
39.1563 - "CC=$(CC)" \
39.1564 - "CXX=$(CXX)" \
39.1565 -+ "GCJ=$(GCJ)" \
39.1566 - "LD=$(LD)" \
39.1567 - "LIBCFLAGS=$(LIBCFLAGS)" \
39.1568 - "NM=$(NM)" \
39.1569 -diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
39.1570 ---- gcc-20030210.orig/libjava/configure Tue Jan 28 10:44:37 2003
39.1571 -+++ gcc-20030210/libjava/configure Sat Feb 22 01:42:11 2003
39.1572 -@@ -2031,7 +2031,7 @@
39.1573 - # This must be Linux ELF.
39.1574 - linux-gnu*)
39.1575 - case $host_cpu in
39.1576 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
39.1577 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
39.1578 - lt_cv_deplibs_check_method=pass_all ;;
39.1579 - *)
39.1580 - # glibc up to 2.1.1 does not perform some relocations on ARM
39.1581 -diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
39.1582 ---- gcc-20030210.orig/libjava/java/net/natInetAddress.cc Tue Mar 5 05:02:19 2002
39.1583 -+++ gcc-20030210/libjava/java/net/natInetAddress.cc Sat Feb 22 01:40:14 2003
39.1584 -@@ -56,7 +56,7 @@
39.1585 - #endif
39.1586 -
39.1587 - #ifndef HAVE_GETHOSTNAME_DECL
39.1588 --extern "C" int gethostname (char *name, int namelen);
39.1589 -+extern "C" int gethostname (char *name, unsigned int namelen);
39.1590 - #endif
39.1591 -
39.1592 - #ifdef DISABLE_JAVA_NET
39.1593 -diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
39.1594 ---- gcc-20030210.orig/libjava/libltdl/aclocal.m4 Sun Sep 10 17:04:40 2000
39.1595 -+++ gcc-20030210/libjava/libltdl/aclocal.m4 Sat Feb 22 01:40:14 2003
39.1596 -@@ -573,7 +573,7 @@
39.1597 - # This must be Linux ELF.
39.1598 - linux-gnu*)
39.1599 - case "$host_cpu" in
39.1600 -- alpha* | i*86 | powerpc* | sparc* | ia64* )
39.1601 -+ alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
39.1602 - lt_cv_deplibs_check_method=pass_all ;;
39.1603 - *)
39.1604 - # glibc up to 2.1.1 does not perform some relocations on ARM
39.1605 -diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
39.1606 ---- gcc-20030210.orig/libjava/sysdep/sh/locks.h Thu Jan 1 09:00:00 1970
39.1607 -+++ gcc-20030210/libjava/sysdep/sh/locks.h Sat Feb 22 01:40:14 2003
39.1608 -@@ -0,0 +1,72 @@
39.1609 -+// locks.h - Thread synchronization primitives. SuperH implementation.
39.1610 -+
39.1611 -+/* Copyright (C) 2002 Free Software Foundation
39.1612 -+
39.1613 -+ This file is part of libgcj.
39.1614 -+
39.1615 -+This software is copyrighted work licensed under the terms of the
39.1616 -+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
39.1617 -+details. */
39.1618 -+
39.1619 -+#ifndef __SYSDEP_LOCKS_H__
39.1620 -+#define __SYSDEP_LOCKS_H__
39.1621 -+
39.1622 -+typedef size_t obj_addr_t; /* Integer type big enough for object */
39.1623 -+ /* address. */
39.1624 -+
39.1625 -+static unsigned char __cas_lock = 0;
39.1626 -+
39.1627 -+inline static void
39.1628 -+__cas_start_atomic (void)
39.1629 -+{
39.1630 -+ unsigned int val;
39.1631 -+
39.1632 -+ do
39.1633 -+ __asm__ __volatile__ ("tas.b @%1; movt %0"
39.1634 -+ : "=r" (val)
39.1635 -+ : "r" (&__cas_lock)
39.1636 -+ : "memory");
39.1637 -+ while (val == 0);
39.1638 -+}
39.1639 -+
39.1640 -+inline static void
39.1641 -+__cas_end_atomic (void)
39.1642 -+{
39.1643 -+ __asm__ __volatile__ (" " : : : "memory");
39.1644 -+ __cas_lock = 0;
39.1645 -+}
39.1646 -+
39.1647 -+inline static bool
39.1648 -+compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
39.1649 -+ obj_addr_t new_val)
39.1650 -+{
39.1651 -+ bool ret;
39.1652 -+
39.1653 -+ __cas_start_atomic ();
39.1654 -+ if (*addr != old)
39.1655 -+ ret = false;
39.1656 -+ else
39.1657 -+ {
39.1658 -+ *addr = new_val;
39.1659 -+ ret = true;
39.1660 -+ }
39.1661 -+ __cas_end_atomic ();
39.1662 -+
39.1663 -+ return ret;
39.1664 -+}
39.1665 -+
39.1666 -+inline static void
39.1667 -+release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
39.1668 -+{
39.1669 -+ __asm__ __volatile__ (" " : : : "memory");
39.1670 -+ *(addr) = new_val;
39.1671 -+}
39.1672 -+
39.1673 -+inline static bool
39.1674 -+compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
39.1675 -+ obj_addr_t new_val)
39.1676 -+{
39.1677 -+ return compare_and_swap (addr, old, new_val);
39.1678 -+}
39.1679 -+
39.1680 -+#endif /* ! __SYSDEP_LOCKS_H__ */
39.1681 -diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
39.1682 ---- gcc-20030210.orig/libstdc++-v3/acinclude.m4 Tue Jan 28 02:30:41 2003
39.1683 -+++ gcc-20030210/libstdc++-v3/acinclude.m4 Sat Feb 22 01:40:14 2003
39.1684 -@@ -1828,9 +1828,10 @@
39.1685 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
39.1686 -
39.1687 - # Passed down for canadian crosses.
39.1688 -- if test x"$CANADIAN" = xyes; then
39.1689 -- TOPLEVEL_INCLUDES='-I$(includedir)'
39.1690 -- fi
39.1691 -+ #if test x"$CANADIAN" = xyes; then
39.1692 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
39.1693 -+ #fi
39.1694 -+ TOPLEVEL_INCLUDES=''
39.1695 -
39.1696 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
39.1697 -
39.1698 -diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
39.1699 ---- gcc-20030210.orig/libstdc++-v3/aclocal.m4 Mon Feb 10 19:36:47 2003
39.1700 -+++ gcc-20030210/libstdc++-v3/aclocal.m4 Sat Feb 22 01:40:14 2003
39.1701 -@@ -1840,9 +1840,10 @@
39.1702 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
39.1703 -
39.1704 - # Passed down for canadian crosses.
39.1705 -- if test x"$CANADIAN" = xyes; then
39.1706 -- TOPLEVEL_INCLUDES='-I$(includedir)'
39.1707 -- fi
39.1708 -+ #if test x"$CANADIAN" = xyes; then
39.1709 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
39.1710 -+ #fi
39.1711 -+ TOPLEVEL_INCLUDES=''
39.1712 -
39.1713 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
39.1714 -
39.1715 -diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
39.1716 ---- gcc-20030210.orig/libstdc++-v3/configure Mon Feb 10 19:37:17 2003
39.1717 -+++ gcc-20030210/libstdc++-v3/configure Sat Feb 22 01:40:14 2003
39.1718 -@@ -1982,7 +1982,7 @@
39.1719 - # This must be Linux ELF.
39.1720 - linux-gnu*)
39.1721 - case $host_cpu in
39.1722 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
39.1723 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
39.1724 - lt_cv_deplibs_check_method=pass_all ;;
39.1725 - *)
39.1726 - # glibc up to 2.1.1 does not perform some relocations on ARM
39.1727 -@@ -22340,9 +22340,10 @@
39.1728 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
39.1729 -
39.1730 - # Passed down for canadian crosses.
39.1731 -- if test x"$CANADIAN" = xyes; then
39.1732 -- TOPLEVEL_INCLUDES='-I$(includedir)'
39.1733 -- fi
39.1734 -+ #if test x"$CANADIAN" = xyes; then
39.1735 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
39.1736 -+ #fi
39.1737 -+ TOPLEVEL_INCLUDES=''
39.1738 -
39.1739 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
39.1740 -
39.1741 -diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
39.1742 ---- gcc-20030210.orig/libtool.m4 Fri Jan 31 19:16:59 2003
39.1743 -+++ gcc-20030210/libtool.m4 Sat Feb 22 01:40:14 2003
39.1744 -@@ -597,7 +597,7 @@
39.1745 - # This must be Linux ELF.
39.1746 - linux-gnu*)
39.1747 - case $host_cpu in
39.1748 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
39.1749 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
39.1750 - lt_cv_deplibs_check_method=pass_all ;;
39.1751 - *)
39.1752 - # glibc up to 2.1.1 does not perform some relocations on ARM
39.1753 -diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
39.1754 ---- gcc-20030210.orig/zlib/configure Tue Jan 28 10:44:15 2003
39.1755 -+++ gcc-20030210/zlib/configure Sat Feb 22 01:40:14 2003
39.1756 -@@ -1571,7 +1571,7 @@
39.1757 - # This must be Linux ELF.
39.1758 - linux-gnu*)
39.1759 - case $host_cpu in
39.1760 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
39.1761 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
39.1762 - lt_cv_deplibs_check_method=pass_all ;;
39.1763 - *)
39.1764 - # glibc up to 2.1.1 does not perform some relocations on ARM
40.1 --- a/patches/gcc/3.2.3/130-g++.exp.patch Wed Oct 21 18:08:31 2009 +0200
40.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
40.3 @@ -1,98 +0,0 @@
40.4 -g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
40.5 -
40.6 -The first hunk fixes the error
40.7 -
40.8 -/testsuite_flags: /testsuite_flags: No such file or directory
40.9 - while executing
40.10 -"exec sh ${odir_v3}/testsuite_flags --build-includes"
40.11 - (procedure "g++_include_flags" line 21)
40.12 - invoked from within
40.13 -"g++_include_flags [get_multilibs] "
40.14 - (procedure "g++_init" line 63)
40.15 - invoked from within
40.16 -"${tool}_init $test_file_name"
40.17 - (procedure "runtest" line 19)
40.18 - invoked from within
40.19 -"runtest $test_name"
40.20 - ("foreach" body line 42)
40.21 - invoked from within
40.22 -...
40.23 -make[1]: [check-g++] Error 1 (ignored)
40.24 -
40.25 -The fix isn't especially pretty, but it worked for me, and can't hurt the
40.26 -more common native compiler case. Maybe someone who knows the code better
40.27 -can come up with a better fix.
40.28 -
40.29 -The second hunk fixes the error
40.30 -
40.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
40.32 -
40.33 -when trying to compile g++ testcases (!); setting up
40.34 -the shared library environment when running crosstests of g++
40.35 -should either be done by a special board file, or by
40.36 -setting up a remote chroot environment (see http://kegel.com/crosstool),
40.37 -not by blithely setting LD_LIBRARY_PATH on the local system.
40.38 -
40.39 ---- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old Fri Jul 11 15:42:47 2003
40.40 -+++ gcc-3.2.3/gcc/testsuite/lib/g++.exp Sat Jul 12 12:57:07 2003
40.41 -@@ -72,6 +72,8 @@
40.42 - #
40.43 - proc g++_include_flags { paths } {
40.44 - global srcdir
40.45 -+ global objdir
40.46 -+ global target_triplet
40.47 - global HAVE_LIBSTDCXX_V3
40.48 - global TESTING_IN_BUILD_TREE
40.49 -
40.50 -@@ -90,6 +92,20 @@
40.51 -
40.52 - if { ${HAVE_LIBSTDCXX_V3} } {
40.53 - set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
40.54 -+ if { $odir_v3 == "" } {
40.55 -+ verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
40.56 -+ # first assume no multilibs
40.57 -+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
40.58 -+ }
40.59 -+ if { $odir_v3 == "" } {
40.60 -+ verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
40.61 -+ # assume multilib only one level deep
40.62 -+ set multisub [file tail $gccpath]
40.63 -+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
40.64 -+ }
40.65 -+ if { $odir_v3 == "" } {
40.66 -+ error "Can't find libstdc++-v3"
40.67 -+ }
40.68 - append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
40.69 - } else {
40.70 - set odir_v2 [lookfor_file ${gccpath} libstdc++]
40.71 -@@ -192,16 +192,20 @@
40.72 - }
40.73 - }
40.74 -
40.75 -- # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
40.76 -- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
40.77 -- # (for the 64-bit ABI). The right way to do this would be to modify
40.78 -- # unix.exp -- but that's not an option since it's part of DejaGNU
40.79 -- # proper, so we do it here. We really only need to do
40.80 -- # this on IRIX, but it shouldn't hurt to do it anywhere else.
40.81 -- setenv LD_LIBRARY_PATH $ld_library_path
40.82 -- setenv SHLIB_PATH $ld_library_path
40.83 -- setenv LD_LIBRARYN32_PATH $ld_library_path
40.84 -- setenv LD_LIBRARY64_PATH $ld_library_path
40.85 -+ if {![is_remote target]} {
40.86 -+ # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
40.87 -+ # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
40.88 -+ # (for the 64-bit ABI). The right way to do this would be to modify
40.89 -+ # unix.exp -- but that's not an option since it's part of DejaGNU
40.90 -+ # proper, so we do it here. We really only need to do
40.91 -+ # this on IRIX, but it shouldn't hurt to do it anywhere else.
40.92 -+
40.93 -+ # Doing this causes us to be unable to run cross-compilers.
40.94 -+ setenv LD_LIBRARY_PATH $ld_library_path
40.95 -+ setenv SHLIB_PATH $ld_library_path
40.96 -+ setenv LD_LIBRARYN32_PATH $ld_library_path
40.97 -+ setenv LD_LIBRARY64_PATH $ld_library_path
40.98 -+ }
40.99 -
40.100 - return "$flags"
40.101 - }
41.1 --- a/patches/gcc/3.2.3/140-libffi-1.patch Wed Oct 21 18:08:31 2009 +0200
41.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
41.3 @@ -1,6864 +0,0 @@
41.4 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.am gcc/libffi/Makefile.am
41.5 ---- gcc-3.2.2.orig/libffi/Makefile.am Tue Jan 28 10:43:56 2003
41.6 -+++ gcc/libffi/Makefile.am Tue Jan 28 10:48:33 2003
41.7 -@@ -8,14 +8,17 @@
41.8 - src/mips/n32.s src/mips/o32.S src/mips/o32.s \
41.9 - src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
41.10 - src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
41.11 -+ src/x86/ffi64.c src/x86/unix64.S \
41.12 - src/alpha/ffi.c src/alpha/osf.S \
41.13 - src/m68k/ffi.c src/m68k/sysv.S \
41.14 - src/powerpc/ffi.c src/powerpc/sysv.S \
41.15 - src/powerpc/ppc_closure.S src/powerpc/asm.h \
41.16 - src/powerpc/ffi_darwin.c \
41.17 - src/powerpc/darwin.S src/powerpc/aix.S \
41.18 -- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
41.19 -- src/arm/ffi.c src/arm/sysv.S
41.20 -+ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
41.21 -+ src/arm/ffi.c src/arm/sysv.S \
41.22 -+ src/s390/ffi.c src/s390/sysv.S \
41.23 -+ src/sh/ffi.c src/sh/sysv.S
41.24 -
41.25 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
41.26 -
41.27 -@@ -83,6 +86,7 @@
41.28 - ffitest_LDFLAGS = -shared-libgcc
41.29 -
41.30 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
41.31 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
41.32 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
41.33 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
41.34 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
41.35 -@@ -91,9 +95,12 @@
41.36 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
41.37 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
41.38 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
41.39 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
41.40 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
41.41 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
41.42 - TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
41.43 -+TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
41.44 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
41.45 -+TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
41.46 -
41.47 - ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
41.48 - ## Work around automake deficiency
41.49 -@@ -103,6 +110,10 @@
41.50 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
41.51 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
41.52 - endif
41.53 -+if MIPS_LINUX
41.54 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
41.55 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
41.56 -+endif
41.57 - if MIPS_SGI
41.58 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
41.59 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
41.60 -@@ -147,6 +158,18 @@
41.61 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
41.62 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
41.63 - endif
41.64 -+if S390
41.65 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
41.66 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
41.67 -+endif
41.68 -+if X86_64
41.69 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
41.70 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
41.71 -+endif
41.72 -+if SH
41.73 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
41.74 -+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
41.75 -+endif
41.76 -
41.77 - AM_CFLAGS = -fexceptions
41.78 -
41.79 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.in gcc/libffi/Makefile.in
41.80 ---- gcc-3.2.2.orig/libffi/Makefile.in Wed Jan 29 07:59:05 2003
41.81 -+++ gcc/libffi/Makefile.in Wed Jan 29 07:58:58 2003
41.82 -@@ -91,14 +91,17 @@
41.83 - src/mips/n32.s src/mips/o32.S src/mips/o32.s \
41.84 - src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
41.85 - src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
41.86 -+ src/x86/ffi64.c src/x86/unix64.S \
41.87 - src/alpha/ffi.c src/alpha/osf.S \
41.88 - src/m68k/ffi.c src/m68k/sysv.S \
41.89 - src/powerpc/ffi.c src/powerpc/sysv.S \
41.90 - src/powerpc/ppc_closure.S src/powerpc/asm.h \
41.91 - src/powerpc/ffi_darwin.c \
41.92 - src/powerpc/darwin.S src/powerpc/aix.S \
41.93 -- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
41.94 -- src/arm/ffi.c src/arm/sysv.S
41.95 -+ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
41.96 -+ src/arm/ffi.c src/arm/sysv.S \
41.97 -+ src/s390/ffi.c src/s390/sysv.S \
41.98 -+ src/sh/ffi.c src/sh/sysv.S
41.99 -
41.100 -
41.101 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
41.102 -@@ -162,6 +165,7 @@
41.103 - ffitest_LDFLAGS = -shared-libgcc
41.104 -
41.105 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
41.106 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
41.107 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
41.108 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
41.109 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
41.110 -@@ -170,14 +174,18 @@
41.111 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
41.112 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
41.113 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
41.114 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
41.115 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
41.116 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
41.117 - TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
41.118 -+TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
41.119 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
41.120 -+TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
41.121 -
41.122 - libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
41.123 - src/raw_api.c src/java_raw_api.c
41.124 -
41.125 - @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
41.126 -+@MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
41.127 - @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
41.128 - @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
41.129 - @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
41.130 -@@ -189,7 +197,11 @@
41.131 - @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
41.132 - @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
41.133 - @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
41.134 -+@S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
41.135 -+@X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
41.136 -+@SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
41.137 - @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
41.138 -+@MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
41.139 - @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
41.140 - @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
41.141 - @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
41.142 -@@ -201,6 +213,9 @@
41.143 - @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
41.144 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
41.145 - @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
41.146 -+@S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
41.147 -+@X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
41.148 -+@SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
41.149 -
41.150 - AM_CFLAGS = -fexceptions
41.151 -
41.152 -@@ -208,7 +223,7 @@
41.153 -
41.154 - INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
41.155 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41.156 --mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
41.157 -+mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs
41.158 - CONFIG_HEADER = fficonfig.h
41.159 - CONFIG_CLEAN_FILES =
41.160 - LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
41.161 -@@ -220,10 +235,6 @@
41.162 - LIBS = @LIBS@
41.163 - libffi_convenience_la_LDFLAGS =
41.164 - libffi_convenience_la_LIBADD =
41.165 --@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.166 --@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.167 --@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
41.168 --@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
41.169 - @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.170 - @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.171 - @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
41.172 -@@ -234,12 +245,29 @@
41.173 - @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.174 - @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
41.175 - @MIPS_GCC_TRUE@src/mips/n32.lo
41.176 --@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.177 --@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.178 --@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
41.179 -+@S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.180 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.181 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
41.182 - @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.183 - @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.184 - @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
41.185 -+@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.186 -+@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.187 -+@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
41.188 -+@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.189 -+@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.190 -+@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
41.191 -+@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
41.192 -+@MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.193 -+@MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.194 -+@MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo
41.195 -+@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.196 -+@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.197 -+@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
41.198 -+@X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.199 -+@X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.200 -+@X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \
41.201 -+@X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo
41.202 - @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.203 - @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.204 - @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
41.205 -@@ -247,62 +275,75 @@
41.206 - @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.207 - @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.208 - @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
41.209 --@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
41.210 --@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.211 --@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.212 --@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
41.213 --@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.214 --@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.215 --@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
41.216 -+@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo
41.217 -+@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.218 -+@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.219 -+@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
41.220 -+@MIPS_SGI_TRUE@src/mips/n32.lo
41.221 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.222 - @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.223 - @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
41.224 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
41.225 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
41.226 --@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
41.227 --@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
41.228 --@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
41.229 --@MIPS_SGI_TRUE@src/mips/n32.lo
41.230 -+@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.231 -+@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.232 -+@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
41.233 -+@SH_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.234 -+@SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.235 -+@SH_TRUE@src/sh/sysv.lo src/sh/ffi.lo
41.236 - libffi_la_LIBADD =
41.237 -+@SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
41.238 -+@SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \
41.239 -+@SH_TRUE@src/sh/ffi.lo
41.240 -+@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.241 -+@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.242 -+@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
41.243 -+@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
41.244 -+@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
41.245 -+@X86_TRUE@src/x86/sysv.lo
41.246 - @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.247 - @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.248 - @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
41.249 - @POWERPC_TRUE@src/powerpc/ppc_closure.lo
41.250 --@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.251 --@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.252 --@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
41.253 --@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.254 --@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.255 --@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
41.256 --@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.257 --@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.258 --@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
41.259 --@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.260 --@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.261 --@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
41.262 --@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.263 --@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.264 --@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
41.265 -+@MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.266 -+@MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.267 -+@MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo
41.268 - @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.269 - @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.270 - @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
41.271 - @POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.272 - @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.273 - @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
41.274 --@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
41.275 --@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
41.276 --@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
41.277 --@X86_TRUE@src/x86/sysv.lo
41.278 -+@POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo
41.279 -+@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.280 -+@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.281 -+@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
41.282 - @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
41.283 - @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
41.284 - @ARM_TRUE@src/arm/ffi.lo
41.285 -+@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.286 -+@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.287 -+@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
41.288 -+@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.289 -+@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.290 -+@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
41.291 -+@S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.292 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.293 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
41.294 -+@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.295 -+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.296 -+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
41.297 -+@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.298 -+@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.299 -+@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
41.300 -+@X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.301 -+@X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.302 -+@X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \
41.303 -+@X86_64_TRUE@src/x86/sysv.lo
41.304 - @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.305 - @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.306 - @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
41.307 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
41.308 --@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
41.309 --@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
41.310 --@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
41.311 - noinst_PROGRAMS = ffitest$(EXEEXT)
41.312 - PROGRAMS = $(noinst_PROGRAMS)
41.313 -
41.314 -@@ -578,8 +616,8 @@
41.315 - -chmod 777 $(distdir)
41.316 - $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \
41.317 - $(distdir)/src/m68k $(distdir)/src/mips \
41.318 -- $(distdir)/src/powerpc $(distdir)/src/sparc \
41.319 -- $(distdir)/src/x86
41.320 -+ $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \
41.321 -+ $(distdir)/src/sparc $(distdir)/src/x86
41.322 - @for file in $(DISTFILES); do \
41.323 - if test -f $$file; then d=.; else d=$(srcdir); fi; \
41.324 - if test -d $$d/$$file; then \
41.325 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/acinclude.m4 gcc/libffi/acinclude.m4
41.326 ---- gcc-3.2.2.orig/libffi/acinclude.m4 Sun Sep 10 16:43:14 2000
41.327 -+++ gcc/libffi/acinclude.m4 Tue Dec 17 03:22:47 2002
41.328 -@@ -4,5 +4,8 @@
41.329 - dnl to add a definition of LIBTOOL to Makefile.in.
41.330 - ifelse(yes,no,[
41.331 - AC_DEFUN([AC_PROG_LIBTOOL],)
41.332 -+AC_DEFUN([AM_PROG_LIBTOOL],)
41.333 - AC_SUBST(LIBTOOL)
41.334 - ])
41.335 -+
41.336 -+sinclude(../config/accross.m4)
41.337 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/aclocal.m4 gcc/libffi/aclocal.m4
41.338 ---- gcc-3.2.2.orig/libffi/aclocal.m4 Fri Feb 1 07:25:31 2002
41.339 -+++ gcc/libffi/aclocal.m4 Tue Dec 17 03:22:47 2002
41.340 -@@ -1,6 +1,6 @@
41.341 --dnl aclocal.m4 generated automatically by aclocal 1.4
41.342 -+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
41.343 -
41.344 --dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
41.345 -+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
41.346 - dnl This file is free software; the Free Software Foundation
41.347 - dnl gives unlimited permission to copy and/or distribute it,
41.348 - dnl with or without modifications, as long as this notice is preserved.
41.349 -@@ -16,108 +16,15 @@
41.350 - dnl to add a definition of LIBTOOL to Makefile.in.
41.351 - ifelse(yes,no,[
41.352 - AC_DEFUN([AC_PROG_LIBTOOL],)
41.353 -+AC_DEFUN([AM_PROG_LIBTOOL],)
41.354 - AC_SUBST(LIBTOOL)
41.355 - ])
41.356 -
41.357 --AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
41.358 --[changequote(<<, >>)dnl
41.359 --dnl The name to #define.
41.360 --define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
41.361 --dnl The cache variable name.
41.362 --define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
41.363 --changequote([, ])dnl
41.364 --AC_MSG_CHECKING(size of $1)
41.365 --AC_CACHE_VAL(AC_CV_NAME,
41.366 --[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
41.367 -- AC_TRY_COMPILE([#include "confdefs.h"
41.368 --#include <sys/types.h>
41.369 --$2
41.370 --], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
41.371 -- if test x$AC_CV_NAME != x ; then break; fi
41.372 --done
41.373 --])
41.374 --if test x$AC_CV_NAME = x ; then
41.375 -- AC_MSG_ERROR([cannot determine a size for $1])
41.376 --fi
41.377 --AC_MSG_RESULT($AC_CV_NAME)
41.378 --AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
41.379 --undefine([AC_TYPE_NAME])dnl
41.380 --undefine([AC_CV_NAME])dnl
41.381 --])
41.382 --
41.383 --AC_DEFUN([AC_C_BIGENDIAN_CROSS],
41.384 --[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
41.385 --[ac_cv_c_bigendian=unknown
41.386 --# See if sys/param.h defines the BYTE_ORDER macro.
41.387 --AC_TRY_COMPILE([#include <sys/types.h>
41.388 --#include <sys/param.h>], [
41.389 --#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
41.390 -- bogus endian macros
41.391 --#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
41.392 --AC_TRY_COMPILE([#include <sys/types.h>
41.393 --#include <sys/param.h>], [
41.394 --#if BYTE_ORDER != BIG_ENDIAN
41.395 -- not big endian
41.396 --#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
41.397 --if test $ac_cv_c_bigendian = unknown; then
41.398 --AC_TRY_RUN([main () {
41.399 -- /* Are we little or big endian? From Harbison&Steele. */
41.400 -- union
41.401 -- {
41.402 -- long l;
41.403 -- char c[sizeof (long)];
41.404 -- } u;
41.405 -- u.l = 1;
41.406 -- exit (u.c[sizeof (long) - 1] == 1);
41.407 --}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
41.408 --[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
41.409 --fi])
41.410 --if test $ac_cv_c_bigendian = unknown; then
41.411 --AC_MSG_CHECKING(to probe for byte ordering)
41.412 --[
41.413 --cat >conftest.c <<EOF
41.414 --short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41.415 --short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41.416 --void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
41.417 --short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41.418 --short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41.419 --void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
41.420 --int main() { _ascii (); _ebcdic (); return 0; }
41.421 --EOF
41.422 --] if test -f conftest.c ; then
41.423 -- if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
41.424 -- if test `grep -l BIGenDianSyS conftest.o` ; then
41.425 -- echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
41.426 -- ac_cv_c_bigendian=yes
41.427 -- fi
41.428 -- if test `grep -l LiTTleEnDian conftest.o` ; then
41.429 -- echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
41.430 -- if test $ac_cv_c_bigendian = yes ; then
41.431 -- ac_cv_c_bigendian=unknown;
41.432 -- else
41.433 -- ac_cv_c_bigendian=no
41.434 -- fi
41.435 -- fi
41.436 -- echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
41.437 -- fi
41.438 -- fi
41.439 --AC_MSG_RESULT($ac_cv_c_bigendian)
41.440 --fi
41.441 --if test $ac_cv_c_bigendian = yes; then
41.442 -- AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
41.443 -- BYTEORDER=4321
41.444 --else
41.445 -- BYTEORDER=1234
41.446 --fi
41.447 --AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
41.448 --if test $ac_cv_c_bigendian = unknown; then
41.449 -- AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
41.450 --fi
41.451 --])
41.452 -+sinclude(../config/accross.m4)
41.453 -
41.454 - # Like AC_CONFIG_HEADER, but automatically create stamp file.
41.455 -
41.456 --AC_DEFUN(AM_CONFIG_HEADER,
41.457 -+AC_DEFUN([AM_CONFIG_HEADER],
41.458 - [AC_PREREQ([2.12])
41.459 - AC_CONFIG_HEADER([$1])
41.460 - dnl When config.status generates a header, we must update the stamp-h file.
41.461 -@@ -147,7 +54,7 @@
41.462 - dnl Usage:
41.463 - dnl AM_INIT_AUTOMAKE(package,version, [no-define])
41.464 -
41.465 --AC_DEFUN(AM_INIT_AUTOMAKE,
41.466 -+AC_DEFUN([AM_INIT_AUTOMAKE],
41.467 - [AC_REQUIRE([AC_PROG_INSTALL])
41.468 - PACKAGE=[$1]
41.469 - AC_SUBST(PACKAGE)
41.470 -@@ -175,7 +82,7 @@
41.471 - # Check to make sure that the build environment is sane.
41.472 - #
41.473 -
41.474 --AC_DEFUN(AM_SANITY_CHECK,
41.475 -+AC_DEFUN([AM_SANITY_CHECK],
41.476 - [AC_MSG_CHECKING([whether build environment is sane])
41.477 - # Just in case
41.478 - sleep 1
41.479 -@@ -216,7 +123,7 @@
41.480 -
41.481 - dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
41.482 - dnl The program must properly implement --version.
41.483 --AC_DEFUN(AM_MISSING_PROG,
41.484 -+AC_DEFUN([AM_MISSING_PROG],
41.485 - [AC_MSG_CHECKING(for working $2)
41.486 - # Run test in a subshell; some versions of sh will print an error if
41.487 - # an executable is not found, even if stderr is redirected.
41.488 -@@ -235,7 +142,7 @@
41.489 -
41.490 - # serial 1
41.491 -
41.492 --AC_DEFUN(AM_MAINTAINER_MODE,
41.493 -+AC_DEFUN([AM_MAINTAINER_MODE],
41.494 - [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
41.495 - dnl maintainer-mode is disabled by default
41.496 - AC_ARG_ENABLE(maintainer-mode,
41.497 -@@ -252,7 +159,7 @@
41.498 -
41.499 - # Define a conditional.
41.500 -
41.501 --AC_DEFUN(AM_CONDITIONAL,
41.502 -+AC_DEFUN([AM_CONDITIONAL],
41.503 - [AC_SUBST($1_TRUE)
41.504 - AC_SUBST($1_FALSE)
41.505 - if $2; then
41.506 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure gcc/libffi/configure
41.507 ---- gcc-3.2.2.orig/libffi/configure Wed Jan 29 07:59:05 2003
41.508 -+++ gcc/libffi/configure Sat Feb 1 20:16:19 2003
41.509 -@@ -633,17 +633,16 @@
41.510 -
41.511 - if test "${srcdir}" = "."; then
41.512 - if test "${with_target_subdir}" != "."; then
41.513 -- libffi_basedir="${srcdir}/${with_multisrctop}.."
41.514 -+ libffi_basedir="${with_multisrctop}../"
41.515 - else
41.516 -- libffi_basedir="${srcdir}/${with_multisrctop}"
41.517 -+ libffi_basedir="${with_multisrctop}"
41.518 - fi
41.519 - else
41.520 -- libffi_basedir="${srcdir}"
41.521 -+ libffi_basedir=
41.522 - fi
41.523 -
41.524 --
41.525 - ac_aux_dir=
41.526 --for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
41.527 -+for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
41.528 - if test -f $ac_dir/install-sh; then
41.529 - ac_aux_dir=$ac_dir
41.530 - ac_install_sh="$ac_aux_dir/install-sh -c"
41.531 -@@ -655,13 +654,14 @@
41.532 - fi
41.533 - done
41.534 - if test -z "$ac_aux_dir"; then
41.535 -- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
41.536 -+ { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
41.537 - fi
41.538 - ac_config_guess=$ac_aux_dir/config.guess
41.539 - ac_config_sub=$ac_aux_dir/config.sub
41.540 - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
41.541 -
41.542 -
41.543 -+
41.544 - # Make sure we can run config.sub.
41.545 - if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
41.546 - else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
41.547 -@@ -1238,9 +1238,18 @@
41.548 - ;;
41.549 -
41.550 - hpux10.20*|hpux11*)
41.551 -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
41.552 -- lt_cv_file_magic_cmd=/usr/bin/file
41.553 -- lt_cv_file_magic_test_file=/usr/lib/libc.sl
41.554 -+ case $host_cpu in
41.555 -+ hppa*)
41.556 -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
41.557 -+ lt_cv_file_magic_cmd=/usr/bin/file
41.558 -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
41.559 -+ ;;
41.560 -+ ia64*)
41.561 -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
41.562 -+ lt_cv_file_magic_cmd=/usr/bin/file
41.563 -+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
41.564 -+ ;;
41.565 -+ esac
41.566 - ;;
41.567 -
41.568 - irix5* | irix6*)
41.569 -@@ -1267,7 +1276,7 @@
41.570 - # This must be Linux ELF.
41.571 - linux-gnu*)
41.572 - case $host_cpu in
41.573 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
41.574 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
41.575 - lt_cv_deplibs_check_method=pass_all ;;
41.576 - *)
41.577 - # glibc up to 2.1.1 does not perform some relocations on ARM
41.578 -@@ -1330,13 +1339,13 @@
41.579 - deplibs_check_method=$lt_cv_deplibs_check_method
41.580 -
41.581 - echo $ac_n "checking for object suffix""... $ac_c" 1>&6
41.582 --echo "configure:1334: checking for object suffix" >&5
41.583 -+echo "configure:1343: checking for object suffix" >&5
41.584 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
41.585 - echo $ac_n "(cached) $ac_c" 1>&6
41.586 - else
41.587 - rm -f conftest*
41.588 - echo 'int i = 1;' > conftest.$ac_ext
41.589 --if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.590 -+if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.591 - for ac_file in conftest.*; do
41.592 - case $ac_file in
41.593 - *.c) ;;
41.594 -@@ -1356,7 +1365,7 @@
41.595 -
41.596 -
41.597 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
41.598 --echo "configure:1360: checking for executable suffix" >&5
41.599 -+echo "configure:1369: checking for executable suffix" >&5
41.600 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
41.601 - echo $ac_n "(cached) $ac_c" 1>&6
41.602 - else
41.603 -@@ -1366,7 +1375,7 @@
41.604 - rm -f conftest*
41.605 - echo 'int main () { return 0; }' > conftest.$ac_ext
41.606 - ac_cv_exeext=
41.607 -- if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
41.608 -+ if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
41.609 - for file in conftest.*; do
41.610 - case $file in
41.611 - *.c | *.o | *.obj) ;;
41.612 -@@ -1399,7 +1408,7 @@
41.613 - file_magic*)
41.614 - if test "$file_magic_cmd" = '$MAGIC_CMD'; then
41.615 - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
41.616 --echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
41.617 -+echo "configure:1412: checking for ${ac_tool_prefix}file" >&5
41.618 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
41.619 - echo $ac_n "(cached) $ac_c" 1>&6
41.620 - else
41.621 -@@ -1461,7 +1470,7 @@
41.622 - if test -z "$lt_cv_path_MAGIC_CMD"; then
41.623 - if test -n "$ac_tool_prefix"; then
41.624 - echo $ac_n "checking for file""... $ac_c" 1>&6
41.625 --echo "configure:1465: checking for file" >&5
41.626 -+echo "configure:1474: checking for file" >&5
41.627 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
41.628 - echo $ac_n "(cached) $ac_c" 1>&6
41.629 - else
41.630 -@@ -1532,7 +1541,7 @@
41.631 - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
41.632 - set dummy ${ac_tool_prefix}ranlib; ac_word=$2
41.633 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.634 --echo "configure:1536: checking for $ac_word" >&5
41.635 -+echo "configure:1545: checking for $ac_word" >&5
41.636 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
41.637 - echo $ac_n "(cached) $ac_c" 1>&6
41.638 - else
41.639 -@@ -1564,7 +1573,7 @@
41.640 - # Extract the first word of "ranlib", so it can be a program name with args.
41.641 - set dummy ranlib; ac_word=$2
41.642 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.643 --echo "configure:1568: checking for $ac_word" >&5
41.644 -+echo "configure:1577: checking for $ac_word" >&5
41.645 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
41.646 - echo $ac_n "(cached) $ac_c" 1>&6
41.647 - else
41.648 -@@ -1599,7 +1608,7 @@
41.649 - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
41.650 - set dummy ${ac_tool_prefix}strip; ac_word=$2
41.651 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.652 --echo "configure:1603: checking for $ac_word" >&5
41.653 -+echo "configure:1612: checking for $ac_word" >&5
41.654 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
41.655 - echo $ac_n "(cached) $ac_c" 1>&6
41.656 - else
41.657 -@@ -1631,7 +1640,7 @@
41.658 - # Extract the first word of "strip", so it can be a program name with args.
41.659 - set dummy strip; ac_word=$2
41.660 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.661 --echo "configure:1635: checking for $ac_word" >&5
41.662 -+echo "configure:1644: checking for $ac_word" >&5
41.663 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
41.664 - echo $ac_n "(cached) $ac_c" 1>&6
41.665 - else
41.666 -@@ -1698,8 +1707,8 @@
41.667 - case $host in
41.668 - *-*-irix6*)
41.669 - # Find out which ABI we are using.
41.670 -- echo '#line 1702 "configure"' > conftest.$ac_ext
41.671 -- if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.672 -+ echo '#line 1711 "configure"' > conftest.$ac_ext
41.673 -+ if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.674 - case `/usr/bin/file conftest.$ac_objext` in
41.675 - *32-bit*)
41.676 - LD="${LD-ld} -32"
41.677 -@@ -1715,12 +1724,70 @@
41.678 - rm -rf conftest*
41.679 - ;;
41.680 -
41.681 -+ia64-*-hpux*)
41.682 -+ # Find out which ABI we are using.
41.683 -+ echo 'int i;' > conftest.$ac_ext
41.684 -+ if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.685 -+ case "`/usr/bin/file conftest.o`" in
41.686 -+ *ELF-32*)
41.687 -+ HPUX_IA64_MODE="32"
41.688 -+ ;;
41.689 -+ *ELF-64*)
41.690 -+ HPUX_IA64_MODE="64"
41.691 -+ ;;
41.692 -+ esac
41.693 -+ fi
41.694 -+ rm -rf conftest*
41.695 -+ ;;
41.696 -+
41.697 -+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
41.698 -+ # Find out which ABI we are using.
41.699 -+ echo 'int i;' > conftest.$ac_ext
41.700 -+ if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.701 -+ case "`/usr/bin/file conftest.o`" in
41.702 -+ *32-bit*)
41.703 -+ case $host in
41.704 -+ x86_64-*linux*)
41.705 -+ LD="${LD-ld} -m elf_i386"
41.706 -+ ;;
41.707 -+ ppc64-*linux*)
41.708 -+ LD="${LD-ld} -m elf32ppclinux"
41.709 -+ ;;
41.710 -+ s390x-*linux*)
41.711 -+ LD="${LD-ld} -m elf_s390"
41.712 -+ ;;
41.713 -+ sparc64-*linux*)
41.714 -+ LD="${LD-ld} -m elf32_sparc"
41.715 -+ ;;
41.716 -+ esac
41.717 -+ ;;
41.718 -+ *64-bit*)
41.719 -+ case $host in
41.720 -+ x86_64-*linux*)
41.721 -+ LD="${LD-ld} -m elf_x86_64"
41.722 -+ ;;
41.723 -+ ppc*-*linux*|powerpc*-*linux*)
41.724 -+ LD="${LD-ld} -m elf64ppc"
41.725 -+ ;;
41.726 -+ s390*-*linux*)
41.727 -+ LD="${LD-ld} -m elf64_s390"
41.728 -+ ;;
41.729 -+ sparc*-*linux*)
41.730 -+ LD="${LD-ld} -m elf64_sparc"
41.731 -+ ;;
41.732 -+ esac
41.733 -+ ;;
41.734 -+ esac
41.735 -+ fi
41.736 -+ rm -rf conftest*
41.737 -+ ;;
41.738 -+
41.739 - *-*-sco3.2v5*)
41.740 - # On SCO OpenServer 5, we need -belf to get full-featured binaries.
41.741 - SAVE_CFLAGS="$CFLAGS"
41.742 - CFLAGS="$CFLAGS -belf"
41.743 - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
41.744 --echo "configure:1724: checking whether the C compiler needs -belf" >&5
41.745 -+echo "configure:1791: checking whether the C compiler needs -belf" >&5
41.746 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
41.747 - echo $ac_n "(cached) $ac_c" 1>&6
41.748 - else
41.749 -@@ -1733,14 +1800,14 @@
41.750 - cross_compiling=$ac_cv_prog_cc_cross
41.751 -
41.752 - cat > conftest.$ac_ext <<EOF
41.753 --#line 1737 "configure"
41.754 -+#line 1804 "configure"
41.755 - #include "confdefs.h"
41.756 -
41.757 - int main() {
41.758 -
41.759 - ; return 0; }
41.760 - EOF
41.761 --if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.762 -+if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.763 - rm -rf conftest*
41.764 - lt_cv_cc_needs_belf=yes
41.765 - else
41.766 -@@ -1868,7 +1935,7 @@
41.767 - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
41.768 - # ./install, which can be erroneously created by make from ./install.sh.
41.769 - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
41.770 --echo "configure:1872: checking for a BSD compatible install" >&5
41.771 -+echo "configure:1939: checking for a BSD compatible install" >&5
41.772 - if test -z "$INSTALL"; then
41.773 - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
41.774 - echo $ac_n "(cached) $ac_c" 1>&6
41.775 -@@ -1921,7 +1988,7 @@
41.776 - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
41.777 -
41.778 - echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
41.779 --echo "configure:1925: checking whether build environment is sane" >&5
41.780 -+echo "configure:1992: checking whether build environment is sane" >&5
41.781 - # Just in case
41.782 - sleep 1
41.783 - echo timestamp > conftestfile
41.784 -@@ -1978,7 +2045,7 @@
41.785 - test "$program_transform_name" = "" && program_transform_name="s,x,x,"
41.786 -
41.787 - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
41.788 --echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
41.789 -+echo "configure:2049: checking whether ${MAKE-make} sets \${MAKE}" >&5
41.790 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
41.791 - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
41.792 - echo $ac_n "(cached) $ac_c" 1>&6
41.793 -@@ -2017,7 +2084,7 @@
41.794 -
41.795 - missing_dir=`cd $ac_aux_dir && pwd`
41.796 - echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
41.797 --echo "configure:2021: checking for working aclocal" >&5
41.798 -+echo "configure:2088: checking for working aclocal" >&5
41.799 - # Run test in a subshell; some versions of sh will print an error if
41.800 - # an executable is not found, even if stderr is redirected.
41.801 - # Redirect stdin to placate older versions of autoconf. Sigh.
41.802 -@@ -2030,7 +2097,7 @@
41.803 - fi
41.804 -
41.805 - echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
41.806 --echo "configure:2034: checking for working autoconf" >&5
41.807 -+echo "configure:2101: checking for working autoconf" >&5
41.808 - # Run test in a subshell; some versions of sh will print an error if
41.809 - # an executable is not found, even if stderr is redirected.
41.810 - # Redirect stdin to placate older versions of autoconf. Sigh.
41.811 -@@ -2043,7 +2110,7 @@
41.812 - fi
41.813 -
41.814 - echo $ac_n "checking for working automake""... $ac_c" 1>&6
41.815 --echo "configure:2047: checking for working automake" >&5
41.816 -+echo "configure:2114: checking for working automake" >&5
41.817 - # Run test in a subshell; some versions of sh will print an error if
41.818 - # an executable is not found, even if stderr is redirected.
41.819 - # Redirect stdin to placate older versions of autoconf. Sigh.
41.820 -@@ -2056,7 +2123,7 @@
41.821 - fi
41.822 -
41.823 - echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
41.824 --echo "configure:2060: checking for working autoheader" >&5
41.825 -+echo "configure:2127: checking for working autoheader" >&5
41.826 - # Run test in a subshell; some versions of sh will print an error if
41.827 - # an executable is not found, even if stderr is redirected.
41.828 - # Redirect stdin to placate older versions of autoconf. Sigh.
41.829 -@@ -2069,7 +2136,7 @@
41.830 - fi
41.831 -
41.832 - echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
41.833 --echo "configure:2073: checking for working makeinfo" >&5
41.834 -+echo "configure:2140: checking for working makeinfo" >&5
41.835 - # Run test in a subshell; some versions of sh will print an error if
41.836 - # an executable is not found, even if stderr is redirected.
41.837 - # Redirect stdin to placate older versions of autoconf. Sigh.
41.838 -@@ -2086,7 +2153,7 @@
41.839 -
41.840 -
41.841 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
41.842 --echo "configure:2090: checking for executable suffix" >&5
41.843 -+echo "configure:2157: checking for executable suffix" >&5
41.844 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
41.845 - echo $ac_n "(cached) $ac_c" 1>&6
41.846 - else
41.847 -@@ -2096,7 +2163,7 @@
41.848 - rm -f conftest*
41.849 - echo 'int main () { return 0; }' > conftest.$ac_ext
41.850 - ac_cv_exeext=
41.851 -- if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
41.852 -+ if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
41.853 - for file in conftest.*; do
41.854 - case $file in
41.855 - *.c | *.o | *.obj) ;;
41.856 -@@ -2117,7 +2184,7 @@
41.857 - ac_exeext=$EXEEXT
41.858 -
41.859 - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
41.860 --echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
41.861 -+echo "configure:2188: checking whether to enable maintainer-specific portions of Makefiles" >&5
41.862 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
41.863 - if test "${enable_maintainer_mode+set}" = set; then
41.864 - enableval="$enable_maintainer_mode"
41.865 -@@ -2143,7 +2210,7 @@
41.866 - # Extract the first word of "gcc", so it can be a program name with args.
41.867 - set dummy gcc; ac_word=$2
41.868 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.869 --echo "configure:2147: checking for $ac_word" >&5
41.870 -+echo "configure:2214: checking for $ac_word" >&5
41.871 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
41.872 - echo $ac_n "(cached) $ac_c" 1>&6
41.873 - else
41.874 -@@ -2173,7 +2240,7 @@
41.875 - # Extract the first word of "cc", so it can be a program name with args.
41.876 - set dummy cc; ac_word=$2
41.877 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.878 --echo "configure:2177: checking for $ac_word" >&5
41.879 -+echo "configure:2244: checking for $ac_word" >&5
41.880 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
41.881 - echo $ac_n "(cached) $ac_c" 1>&6
41.882 - else
41.883 -@@ -2224,7 +2291,7 @@
41.884 - # Extract the first word of "cl", so it can be a program name with args.
41.885 - set dummy cl; ac_word=$2
41.886 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
41.887 --echo "configure:2228: checking for $ac_word" >&5
41.888 -+echo "configure:2295: checking for $ac_word" >&5
41.889 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
41.890 - echo $ac_n "(cached) $ac_c" 1>&6
41.891 - else
41.892 -@@ -2256,7 +2323,7 @@
41.893 - fi
41.894 -
41.895 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
41.896 --echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
41.897 -+echo "configure:2327: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
41.898 -
41.899 - ac_ext=c
41.900 - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
41.901 -@@ -2267,12 +2334,12 @@
41.902 -
41.903 - cat > conftest.$ac_ext << EOF
41.904 -
41.905 --#line 2271 "configure"
41.906 -+#line 2338 "configure"
41.907 - #include "confdefs.h"
41.908 -
41.909 - main(){return(0);}
41.910 - EOF
41.911 --if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.912 -+if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.913 - ac_cv_prog_cc_works=yes
41.914 - # If we can't run a trivial program, we are probably using a cross compiler.
41.915 - if (./conftest; exit) 2>/dev/null; then
41.916 -@@ -2298,12 +2365,12 @@
41.917 - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
41.918 - fi
41.919 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
41.920 --echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
41.921 -+echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
41.922 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
41.923 - cross_compiling=$ac_cv_prog_cc_cross
41.924 -
41.925 - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
41.926 --echo "configure:2307: checking whether we are using GNU C" >&5
41.927 -+echo "configure:2374: checking whether we are using GNU C" >&5
41.928 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
41.929 - echo $ac_n "(cached) $ac_c" 1>&6
41.930 - else
41.931 -@@ -2312,7 +2379,7 @@
41.932 - yes;
41.933 - #endif
41.934 - EOF
41.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
41.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
41.937 - ac_cv_prog_gcc=yes
41.938 - else
41.939 - ac_cv_prog_gcc=no
41.940 -@@ -2331,7 +2398,7 @@
41.941 - ac_save_CFLAGS="$CFLAGS"
41.942 - CFLAGS=
41.943 - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
41.944 --echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
41.945 -+echo "configure:2402: checking whether ${CC-cc} accepts -g" >&5
41.946 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
41.947 - echo $ac_n "(cached) $ac_c" 1>&6
41.948 - else
41.949 -@@ -2381,17 +2448,23 @@
41.950 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
41.951 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
41.952 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
41.953 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
41.954 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
41.955 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
41.956 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
41.957 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
41.958 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
41.959 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
41.960 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
41.961 -+mips64*-*);;
41.962 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
41.963 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
41.964 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
41.965 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
41.966 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
41.967 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
41.968 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
41.969 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
41.970 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
41.971 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
41.972 -+sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
41.973 - esac
41.974 -
41.975 - if test $TARGETDIR = unknown; then
41.976 -@@ -2418,6 +2491,15 @@
41.977 - fi
41.978 -
41.979 -
41.980 -+if test x$TARGET = xMIPS_LINUX; then
41.981 -+ MIPS_LINUX_TRUE=
41.982 -+ MIPS_LINUX_FALSE='#'
41.983 -+else
41.984 -+ MIPS_LINUX_TRUE='#'
41.985 -+ MIPS_LINUX_FALSE=
41.986 -+fi
41.987 -+
41.988 -+
41.989 - if test x$TARGET = xSPARC; then
41.990 - SPARC_TRUE=
41.991 - SPARC_FALSE='#'
41.992 -@@ -2507,8 +2589,39 @@
41.993 - ARM_FALSE=
41.994 - fi
41.995 -
41.996 -+
41.997 -+if test x$TARGET = xS390; then
41.998 -+ S390_TRUE=
41.999 -+ S390_FALSE='#'
41.1000 -+else
41.1001 -+ S390_TRUE='#'
41.1002 -+ S390_FALSE=
41.1003 -+fi
41.1004 -+
41.1005 -+
41.1006 -+if test x$TARGET = xX86_64; then
41.1007 -+ X86_64_TRUE=
41.1008 -+ X86_64_FALSE='#'
41.1009 -+else
41.1010 -+ X86_64_TRUE='#'
41.1011 -+ X86_64_FALSE=
41.1012 -+fi
41.1013 -+
41.1014 -+
41.1015 -+if test x$TARGET = xSH; then
41.1016 -+ SH_TRUE=
41.1017 -+ SH_FALSE='#'
41.1018 -+else
41.1019 -+ SH_TRUE='#'
41.1020 -+ SH_FALSE=
41.1021 -+fi
41.1022 -+
41.1023 -+if test x$TARGET = xMIPS_LINUX; then
41.1024 -+ TARGET=MIPS
41.1025 -+fi
41.1026 -+
41.1027 - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
41.1028 --echo "configure:2512: checking how to run the C preprocessor" >&5
41.1029 -+echo "configure:2625: checking how to run the C preprocessor" >&5
41.1030 - # On Suns, sometimes $CPP names a directory.
41.1031 - if test -n "$CPP" && test -d "$CPP"; then
41.1032 - CPP=
41.1033 -@@ -2523,13 +2636,13 @@
41.1034 - # On the NeXT, cc -E runs the code through the compiler's parser,
41.1035 - # not just through cpp.
41.1036 - cat > conftest.$ac_ext <<EOF
41.1037 --#line 2527 "configure"
41.1038 -+#line 2640 "configure"
41.1039 - #include "confdefs.h"
41.1040 - #include <assert.h>
41.1041 - Syntax Error
41.1042 - EOF
41.1043 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
41.1044 --{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1045 -+{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1046 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
41.1047 - if test -z "$ac_err"; then
41.1048 - :
41.1049 -@@ -2540,13 +2653,13 @@
41.1050 - rm -rf conftest*
41.1051 - CPP="${CC-cc} -E -traditional-cpp"
41.1052 - cat > conftest.$ac_ext <<EOF
41.1053 --#line 2544 "configure"
41.1054 -+#line 2657 "configure"
41.1055 - #include "confdefs.h"
41.1056 - #include <assert.h>
41.1057 - Syntax Error
41.1058 - EOF
41.1059 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
41.1060 --{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1061 -+{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1062 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
41.1063 - if test -z "$ac_err"; then
41.1064 - :
41.1065 -@@ -2557,13 +2670,13 @@
41.1066 - rm -rf conftest*
41.1067 - CPP="${CC-cc} -nologo -E"
41.1068 - cat > conftest.$ac_ext <<EOF
41.1069 --#line 2561 "configure"
41.1070 -+#line 2674 "configure"
41.1071 - #include "confdefs.h"
41.1072 - #include <assert.h>
41.1073 - Syntax Error
41.1074 - EOF
41.1075 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
41.1076 --{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1077 -+{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1078 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
41.1079 - if test -z "$ac_err"; then
41.1080 - :
41.1081 -@@ -2588,12 +2701,12 @@
41.1082 - echo "$ac_t""$CPP" 1>&6
41.1083 -
41.1084 - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
41.1085 --echo "configure:2592: checking for ANSI C header files" >&5
41.1086 -+echo "configure:2705: checking for ANSI C header files" >&5
41.1087 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
41.1088 - echo $ac_n "(cached) $ac_c" 1>&6
41.1089 - else
41.1090 - cat > conftest.$ac_ext <<EOF
41.1091 --#line 2597 "configure"
41.1092 -+#line 2710 "configure"
41.1093 - #include "confdefs.h"
41.1094 - #include <stdlib.h>
41.1095 - #include <stdarg.h>
41.1096 -@@ -2601,7 +2714,7 @@
41.1097 - #include <float.h>
41.1098 - EOF
41.1099 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
41.1100 --{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1101 -+{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
41.1102 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
41.1103 - if test -z "$ac_err"; then
41.1104 - rm -rf conftest*
41.1105 -@@ -2618,7 +2731,7 @@
41.1106 - if test $ac_cv_header_stdc = yes; then
41.1107 - # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41.1108 - cat > conftest.$ac_ext <<EOF
41.1109 --#line 2622 "configure"
41.1110 -+#line 2735 "configure"
41.1111 - #include "confdefs.h"
41.1112 - #include <string.h>
41.1113 - EOF
41.1114 -@@ -2636,7 +2749,7 @@
41.1115 - if test $ac_cv_header_stdc = yes; then
41.1116 - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41.1117 - cat > conftest.$ac_ext <<EOF
41.1118 --#line 2640 "configure"
41.1119 -+#line 2753 "configure"
41.1120 - #include "confdefs.h"
41.1121 - #include <stdlib.h>
41.1122 - EOF
41.1123 -@@ -2657,7 +2770,7 @@
41.1124 - :
41.1125 - else
41.1126 - cat > conftest.$ac_ext <<EOF
41.1127 --#line 2661 "configure"
41.1128 -+#line 2774 "configure"
41.1129 - #include "confdefs.h"
41.1130 - #include <ctype.h>
41.1131 - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41.1132 -@@ -2668,7 +2781,7 @@
41.1133 - exit (0); }
41.1134 -
41.1135 - EOF
41.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
41.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
41.1138 - then
41.1139 - :
41.1140 - else
41.1141 -@@ -2694,12 +2807,12 @@
41.1142 - for ac_func in memcpy
41.1143 - do
41.1144 - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
41.1145 --echo "configure:2698: checking for $ac_func" >&5
41.1146 -+echo "configure:2811: checking for $ac_func" >&5
41.1147 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
41.1148 - echo $ac_n "(cached) $ac_c" 1>&6
41.1149 - else
41.1150 - cat > conftest.$ac_ext <<EOF
41.1151 --#line 2703 "configure"
41.1152 -+#line 2816 "configure"
41.1153 - #include "confdefs.h"
41.1154 - /* System header to define __stub macros and hopefully few prototypes,
41.1155 - which can conflict with char $ac_func(); below. */
41.1156 -@@ -2722,7 +2835,7 @@
41.1157 -
41.1158 - ; return 0; }
41.1159 - EOF
41.1160 --if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1161 -+if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1162 - rm -rf conftest*
41.1163 - eval "ac_cv_func_$ac_func=yes"
41.1164 - else
41.1165 -@@ -2749,19 +2862,19 @@
41.1166 - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
41.1167 - # for constant arguments. Useless!
41.1168 - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
41.1169 --echo "configure:2753: checking for working alloca.h" >&5
41.1170 -+echo "configure:2866: checking for working alloca.h" >&5
41.1171 - if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
41.1172 - echo $ac_n "(cached) $ac_c" 1>&6
41.1173 - else
41.1174 - cat > conftest.$ac_ext <<EOF
41.1175 --#line 2758 "configure"
41.1176 -+#line 2871 "configure"
41.1177 - #include "confdefs.h"
41.1178 - #include <alloca.h>
41.1179 - int main() {
41.1180 - char *p = alloca(2 * sizeof(int));
41.1181 - ; return 0; }
41.1182 - EOF
41.1183 --if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1184 -+if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1185 - rm -rf conftest*
41.1186 - ac_cv_header_alloca_h=yes
41.1187 - else
41.1188 -@@ -2782,12 +2895,12 @@
41.1189 - fi
41.1190 -
41.1191 - echo $ac_n "checking for alloca""... $ac_c" 1>&6
41.1192 --echo "configure:2786: checking for alloca" >&5
41.1193 -+echo "configure:2899: checking for alloca" >&5
41.1194 - if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
41.1195 - echo $ac_n "(cached) $ac_c" 1>&6
41.1196 - else
41.1197 - cat > conftest.$ac_ext <<EOF
41.1198 --#line 2791 "configure"
41.1199 -+#line 2904 "configure"
41.1200 - #include "confdefs.h"
41.1201 -
41.1202 - #ifdef __GNUC__
41.1203 -@@ -2815,7 +2928,7 @@
41.1204 - char *p = (char *) alloca(1);
41.1205 - ; return 0; }
41.1206 - EOF
41.1207 --if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1208 -+if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1209 - rm -rf conftest*
41.1210 - ac_cv_func_alloca_works=yes
41.1211 - else
41.1212 -@@ -2847,12 +2960,12 @@
41.1213 -
41.1214 -
41.1215 - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
41.1216 --echo "configure:2851: checking whether alloca needs Cray hooks" >&5
41.1217 -+echo "configure:2964: checking whether alloca needs Cray hooks" >&5
41.1218 - if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
41.1219 - echo $ac_n "(cached) $ac_c" 1>&6
41.1220 - else
41.1221 - cat > conftest.$ac_ext <<EOF
41.1222 --#line 2856 "configure"
41.1223 -+#line 2969 "configure"
41.1224 - #include "confdefs.h"
41.1225 - #if defined(CRAY) && ! defined(CRAY2)
41.1226 - webecray
41.1227 -@@ -2877,12 +2990,12 @@
41.1228 - if test $ac_cv_os_cray = yes; then
41.1229 - for ac_func in _getb67 GETB67 getb67; do
41.1230 - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
41.1231 --echo "configure:2881: checking for $ac_func" >&5
41.1232 -+echo "configure:2994: checking for $ac_func" >&5
41.1233 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
41.1234 - echo $ac_n "(cached) $ac_c" 1>&6
41.1235 - else
41.1236 - cat > conftest.$ac_ext <<EOF
41.1237 --#line 2886 "configure"
41.1238 -+#line 2999 "configure"
41.1239 - #include "confdefs.h"
41.1240 - /* System header to define __stub macros and hopefully few prototypes,
41.1241 - which can conflict with char $ac_func(); below. */
41.1242 -@@ -2905,7 +3018,7 @@
41.1243 -
41.1244 - ; return 0; }
41.1245 - EOF
41.1246 --if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1247 -+if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1248 - rm -rf conftest*
41.1249 - eval "ac_cv_func_$ac_func=yes"
41.1250 - else
41.1251 -@@ -2932,7 +3045,7 @@
41.1252 - fi
41.1253 -
41.1254 - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
41.1255 --echo "configure:2936: checking stack direction for C alloca" >&5
41.1256 -+echo "configure:3049: checking stack direction for C alloca" >&5
41.1257 - if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
41.1258 - echo $ac_n "(cached) $ac_c" 1>&6
41.1259 - else
41.1260 -@@ -2940,7 +3053,7 @@
41.1261 - ac_cv_c_stack_direction=0
41.1262 - else
41.1263 - cat > conftest.$ac_ext <<EOF
41.1264 --#line 2944 "configure"
41.1265 -+#line 3057 "configure"
41.1266 - #include "confdefs.h"
41.1267 - find_stack_direction ()
41.1268 - {
41.1269 -@@ -2959,7 +3072,7 @@
41.1270 - exit (find_stack_direction() < 0);
41.1271 - }
41.1272 - EOF
41.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
41.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
41.1275 - then
41.1276 - ac_cv_c_stack_direction=1
41.1277 - else
41.1278 -@@ -2982,13 +3095,13 @@
41.1279 -
41.1280 -
41.1281 - echo $ac_n "checking size of short""... $ac_c" 1>&6
41.1282 --echo "configure:2986: checking size of short" >&5
41.1283 -+echo "configure:3099: checking size of short" >&5
41.1284 - if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
41.1285 - echo $ac_n "(cached) $ac_c" 1>&6
41.1286 - else
41.1287 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1288 - cat > conftest.$ac_ext <<EOF
41.1289 --#line 2992 "configure"
41.1290 -+#line 3105 "configure"
41.1291 - #include "confdefs.h"
41.1292 - #include "confdefs.h"
41.1293 - #include <sys/types.h>
41.1294 -@@ -2998,7 +3111,7 @@
41.1295 - switch (0) case 0: case (sizeof (short) == $ac_size):;
41.1296 - ; return 0; }
41.1297 - EOF
41.1298 --if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1299 -+if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1300 - rm -rf conftest*
41.1301 - ac_cv_sizeof_short=$ac_size
41.1302 - else
41.1303 -@@ -3021,13 +3134,13 @@
41.1304 -
41.1305 -
41.1306 - echo $ac_n "checking size of int""... $ac_c" 1>&6
41.1307 --echo "configure:3025: checking size of int" >&5
41.1308 -+echo "configure:3138: checking size of int" >&5
41.1309 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
41.1310 - echo $ac_n "(cached) $ac_c" 1>&6
41.1311 - else
41.1312 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1313 - cat > conftest.$ac_ext <<EOF
41.1314 --#line 3031 "configure"
41.1315 -+#line 3144 "configure"
41.1316 - #include "confdefs.h"
41.1317 - #include "confdefs.h"
41.1318 - #include <sys/types.h>
41.1319 -@@ -3037,7 +3150,7 @@
41.1320 - switch (0) case 0: case (sizeof (int) == $ac_size):;
41.1321 - ; return 0; }
41.1322 - EOF
41.1323 --if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1324 -+if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1325 - rm -rf conftest*
41.1326 - ac_cv_sizeof_int=$ac_size
41.1327 - else
41.1328 -@@ -3060,13 +3173,13 @@
41.1329 -
41.1330 -
41.1331 - echo $ac_n "checking size of long""... $ac_c" 1>&6
41.1332 --echo "configure:3064: checking size of long" >&5
41.1333 -+echo "configure:3177: checking size of long" >&5
41.1334 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
41.1335 - echo $ac_n "(cached) $ac_c" 1>&6
41.1336 - else
41.1337 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1338 - cat > conftest.$ac_ext <<EOF
41.1339 --#line 3070 "configure"
41.1340 -+#line 3183 "configure"
41.1341 - #include "confdefs.h"
41.1342 - #include "confdefs.h"
41.1343 - #include <sys/types.h>
41.1344 -@@ -3076,7 +3189,7 @@
41.1345 - switch (0) case 0: case (sizeof (long) == $ac_size):;
41.1346 - ; return 0; }
41.1347 - EOF
41.1348 --if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1349 -+if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1350 - rm -rf conftest*
41.1351 - ac_cv_sizeof_long=$ac_size
41.1352 - else
41.1353 -@@ -3099,13 +3212,13 @@
41.1354 -
41.1355 -
41.1356 - echo $ac_n "checking size of long long""... $ac_c" 1>&6
41.1357 --echo "configure:3103: checking size of long long" >&5
41.1358 -+echo "configure:3216: checking size of long long" >&5
41.1359 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
41.1360 - echo $ac_n "(cached) $ac_c" 1>&6
41.1361 - else
41.1362 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1363 - cat > conftest.$ac_ext <<EOF
41.1364 --#line 3109 "configure"
41.1365 -+#line 3222 "configure"
41.1366 - #include "confdefs.h"
41.1367 - #include "confdefs.h"
41.1368 - #include <sys/types.h>
41.1369 -@@ -3115,7 +3228,7 @@
41.1370 - switch (0) case 0: case (sizeof (long long) == $ac_size):;
41.1371 - ; return 0; }
41.1372 - EOF
41.1373 --if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1374 -+if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1375 - rm -rf conftest*
41.1376 - ac_cv_sizeof_long_long=$ac_size
41.1377 - else
41.1378 -@@ -3138,13 +3251,13 @@
41.1379 -
41.1380 -
41.1381 - echo $ac_n "checking size of float""... $ac_c" 1>&6
41.1382 --echo "configure:3142: checking size of float" >&5
41.1383 -+echo "configure:3255: checking size of float" >&5
41.1384 - if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
41.1385 - echo $ac_n "(cached) $ac_c" 1>&6
41.1386 - else
41.1387 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1388 - cat > conftest.$ac_ext <<EOF
41.1389 --#line 3148 "configure"
41.1390 -+#line 3261 "configure"
41.1391 - #include "confdefs.h"
41.1392 - #include "confdefs.h"
41.1393 - #include <sys/types.h>
41.1394 -@@ -3154,7 +3267,7 @@
41.1395 - switch (0) case 0: case (sizeof (float) == $ac_size):;
41.1396 - ; return 0; }
41.1397 - EOF
41.1398 --if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1399 -+if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1400 - rm -rf conftest*
41.1401 - ac_cv_sizeof_float=$ac_size
41.1402 - else
41.1403 -@@ -3177,13 +3290,13 @@
41.1404 -
41.1405 -
41.1406 - echo $ac_n "checking size of double""... $ac_c" 1>&6
41.1407 --echo "configure:3181: checking size of double" >&5
41.1408 -+echo "configure:3294: checking size of double" >&5
41.1409 - if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
41.1410 - echo $ac_n "(cached) $ac_c" 1>&6
41.1411 - else
41.1412 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1413 - cat > conftest.$ac_ext <<EOF
41.1414 --#line 3187 "configure"
41.1415 -+#line 3300 "configure"
41.1416 - #include "confdefs.h"
41.1417 - #include "confdefs.h"
41.1418 - #include <sys/types.h>
41.1419 -@@ -3193,7 +3306,7 @@
41.1420 - switch (0) case 0: case (sizeof (double) == $ac_size):;
41.1421 - ; return 0; }
41.1422 - EOF
41.1423 --if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1424 -+if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1425 - rm -rf conftest*
41.1426 - ac_cv_sizeof_double=$ac_size
41.1427 - else
41.1428 -@@ -3216,13 +3329,13 @@
41.1429 -
41.1430 -
41.1431 - echo $ac_n "checking size of long double""... $ac_c" 1>&6
41.1432 --echo "configure:3220: checking size of long double" >&5
41.1433 -+echo "configure:3333: checking size of long double" >&5
41.1434 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
41.1435 - echo $ac_n "(cached) $ac_c" 1>&6
41.1436 - else
41.1437 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1438 - cat > conftest.$ac_ext <<EOF
41.1439 --#line 3226 "configure"
41.1440 -+#line 3339 "configure"
41.1441 - #include "confdefs.h"
41.1442 - #include "confdefs.h"
41.1443 - #include <sys/types.h>
41.1444 -@@ -3232,7 +3345,7 @@
41.1445 - switch (0) case 0: case (sizeof (long double) == $ac_size):;
41.1446 - ; return 0; }
41.1447 - EOF
41.1448 --if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1449 -+if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1450 - rm -rf conftest*
41.1451 - ac_cv_sizeof_long_double=$ac_size
41.1452 - else
41.1453 -@@ -3256,13 +3369,13 @@
41.1454 -
41.1455 -
41.1456 - echo $ac_n "checking size of void *""... $ac_c" 1>&6
41.1457 --echo "configure:3260: checking size of void *" >&5
41.1458 -+echo "configure:3373: checking size of void *" >&5
41.1459 - if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
41.1460 - echo $ac_n "(cached) $ac_c" 1>&6
41.1461 - else
41.1462 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
41.1463 - cat > conftest.$ac_ext <<EOF
41.1464 --#line 3266 "configure"
41.1465 -+#line 3379 "configure"
41.1466 - #include "confdefs.h"
41.1467 - #include "confdefs.h"
41.1468 - #include <sys/types.h>
41.1469 -@@ -3272,7 +3385,7 @@
41.1470 - switch (0) case 0: case (sizeof (void *) == $ac_size):;
41.1471 - ; return 0; }
41.1472 - EOF
41.1473 --if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1474 -+if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1475 - rm -rf conftest*
41.1476 - ac_cv_sizeof_void_p=$ac_size
41.1477 - else
41.1478 -@@ -3295,14 +3408,14 @@
41.1479 -
41.1480 -
41.1481 - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
41.1482 --echo "configure:3299: checking whether byte ordering is bigendian" >&5
41.1483 -+echo "configure:3412: checking whether byte ordering is bigendian" >&5
41.1484 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
41.1485 - echo $ac_n "(cached) $ac_c" 1>&6
41.1486 - else
41.1487 - ac_cv_c_bigendian=unknown
41.1488 - # See if sys/param.h defines the BYTE_ORDER macro.
41.1489 - cat > conftest.$ac_ext <<EOF
41.1490 --#line 3306 "configure"
41.1491 -+#line 3419 "configure"
41.1492 - #include "confdefs.h"
41.1493 - #include <sys/types.h>
41.1494 - #include <sys/param.h>
41.1495 -@@ -3313,11 +3426,11 @@
41.1496 - #endif
41.1497 - ; return 0; }
41.1498 - EOF
41.1499 --if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1500 -+if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1501 - rm -rf conftest*
41.1502 - # It does; now see whether it defined to BIG_ENDIAN or not.
41.1503 - cat > conftest.$ac_ext <<EOF
41.1504 --#line 3321 "configure"
41.1505 -+#line 3434 "configure"
41.1506 - #include "confdefs.h"
41.1507 - #include <sys/types.h>
41.1508 - #include <sys/param.h>
41.1509 -@@ -3328,7 +3441,7 @@
41.1510 - #endif
41.1511 - ; return 0; }
41.1512 - EOF
41.1513 --if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1514 -+if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
41.1515 - rm -rf conftest*
41.1516 - ac_cv_c_bigendian=yes
41.1517 - else
41.1518 -@@ -3348,7 +3461,7 @@
41.1519 - echo $ac_n "cross-compiling... " 2>&6
41.1520 - else
41.1521 - cat > conftest.$ac_ext <<EOF
41.1522 --#line 3352 "configure"
41.1523 -+#line 3465 "configure"
41.1524 - #include "confdefs.h"
41.1525 - main () {
41.1526 - /* Are we little or big endian? From Harbison&Steele. */
41.1527 -@@ -3361,7 +3474,7 @@
41.1528 - exit (u.c[sizeof (long) - 1] == 1);
41.1529 - }
41.1530 - EOF
41.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
41.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
41.1533 - then
41.1534 - ac_cv_c_bigendian=no
41.1535 - else
41.1536 -@@ -3379,7 +3492,7 @@
41.1537 - echo "$ac_t""$ac_cv_c_bigendian" 1>&6
41.1538 - if test $ac_cv_c_bigendian = unknown; then
41.1539 - echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
41.1540 --echo "configure:3383: checking to probe for byte ordering" >&5
41.1541 -+echo "configure:3496: checking to probe for byte ordering" >&5
41.1542 -
41.1543 - cat >conftest.c <<EOF
41.1544 - short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41.1545 -@@ -3414,6 +3527,10 @@
41.1546 - #define WORDS_BIGENDIAN 1
41.1547 - EOF
41.1548 -
41.1549 -+ cat >> confdefs.h <<\EOF
41.1550 -+#define HOST_WORDS_BIG_ENDIAN 1
41.1551 -+EOF
41.1552 -+
41.1553 - BYTEORDER=4321
41.1554 - else
41.1555 - BYTEORDER=1234
41.1556 -@@ -3429,7 +3546,7 @@
41.1557 -
41.1558 - if test x$TARGET = xSPARC; then
41.1559 - echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
41.1560 --echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
41.1561 -+echo "configure:3550: checking assembler and linker support unaligned pc related relocs" >&5
41.1562 - if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
41.1563 - echo $ac_n "(cached) $ac_c" 1>&6
41.1564 - else
41.1565 -@@ -3439,14 +3556,14 @@
41.1566 - CFLAGS="$CFLAGS -fpic"
41.1567 - LDFLAGS="$LDFLAGS -shared"
41.1568 - cat > conftest.$ac_ext <<EOF
41.1569 --#line 3443 "configure"
41.1570 -+#line 3560 "configure"
41.1571 - #include "confdefs.h"
41.1572 - asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
41.1573 - int main() {
41.1574 -
41.1575 - ; return 0; }
41.1576 - EOF
41.1577 --if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1578 -+if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
41.1579 - rm -rf conftest*
41.1580 - libffi_cv_as_sparc_ua_pcrel=yes
41.1581 - else
41.1582 -@@ -3709,6 +3826,8 @@
41.1583 - s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
41.1584 - s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
41.1585 - s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
41.1586 -+s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
41.1587 -+s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
41.1588 - s%@SPARC_TRUE@%$SPARC_TRUE%g
41.1589 - s%@SPARC_FALSE@%$SPARC_FALSE%g
41.1590 - s%@X86_TRUE@%$X86_TRUE%g
41.1591 -@@ -3729,6 +3848,12 @@
41.1592 - s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
41.1593 - s%@ARM_TRUE@%$ARM_TRUE%g
41.1594 - s%@ARM_FALSE@%$ARM_FALSE%g
41.1595 -+s%@S390_TRUE@%$S390_TRUE%g
41.1596 -+s%@S390_FALSE@%$S390_FALSE%g
41.1597 -+s%@X86_64_TRUE@%$X86_64_TRUE%g
41.1598 -+s%@X86_64_FALSE@%$X86_64_FALSE%g
41.1599 -+s%@SH_TRUE@%$SH_TRUE%g
41.1600 -+s%@SH_FALSE@%$SH_FALSE%g
41.1601 - s%@CPP@%$CPP%g
41.1602 - s%@ALLOCA@%$ALLOCA%g
41.1603 - s%@TARGET@%$TARGET%g
41.1604 -@@ -3969,7 +4094,7 @@
41.1605 -
41.1606 - if test -n "$CONFIG_FILES"; then
41.1607 - LD="${ORIGINAL_LD_FOR_MULTILIBS}"
41.1608 -- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
41.1609 -+ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
41.1610 - fi
41.1611 -
41.1612 - exit 0
41.1613 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure.in gcc/libffi/configure.in
41.1614 ---- gcc-3.2.2.orig/libffi/configure.in Tue Jan 28 10:43:56 2003
41.1615 -+++ gcc/libffi/configure.in Sat Feb 1 20:16:19 2003
41.1616 -@@ -22,14 +22,15 @@
41.1617 -
41.1618 - if test "${srcdir}" = "."; then
41.1619 - if test "${with_target_subdir}" != "."; then
41.1620 -- libffi_basedir="${srcdir}/${with_multisrctop}.."
41.1621 -+ libffi_basedir="${with_multisrctop}../"
41.1622 - else
41.1623 -- libffi_basedir="${srcdir}/${with_multisrctop}"
41.1624 -+ libffi_basedir="${with_multisrctop}"
41.1625 - fi
41.1626 - else
41.1627 -- libffi_basedir="${srcdir}"
41.1628 -+ libffi_basedir=
41.1629 - fi
41.1630 - AC_SUBST(libffi_basedir)
41.1631 -+AC_CONFIG_AUX_DIR(${libffi_basedir}..)
41.1632 -
41.1633 - AC_CANONICAL_HOST
41.1634 -
41.1635 -@@ -56,17 +57,23 @@
41.1636 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
41.1637 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
41.1638 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
41.1639 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
41.1640 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
41.1641 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
41.1642 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
41.1643 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
41.1644 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
41.1645 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
41.1646 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
41.1647 -+mips64*-*);;
41.1648 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
41.1649 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
41.1650 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
41.1651 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
41.1652 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
41.1653 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
41.1654 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
41.1655 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
41.1656 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
41.1657 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
41.1658 -+sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
41.1659 - esac
41.1660 -
41.1661 - if test $TARGETDIR = unknown; then
41.1662 -@@ -75,6 +82,7 @@
41.1663 -
41.1664 - AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
41.1665 - AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
41.1666 -+AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
41.1667 - AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
41.1668 - AM_CONDITIONAL(X86, test x$TARGET = xX86)
41.1669 - AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
41.1670 -@@ -85,6 +93,13 @@
41.1671 - AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
41.1672 - AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
41.1673 - AM_CONDITIONAL(ARM, test x$TARGET = xARM)
41.1674 -+AM_CONDITIONAL(S390, test x$TARGET = xS390)
41.1675 -+AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
41.1676 -+AM_CONDITIONAL(SH, test x$TARGET = xSH)
41.1677 -+
41.1678 -+if test x$TARGET = xMIPS_LINUX; then
41.1679 -+ TARGET=MIPS
41.1680 -+fi
41.1681 -
41.1682 - AC_HEADER_STDC
41.1683 - AC_CHECK_FUNCS(memcpy)
41.1684 -@@ -171,7 +186,7 @@
41.1685 - [
41.1686 - if test -n "$CONFIG_FILES"; then
41.1687 - LD="${ORIGINAL_LD_FOR_MULTILIBS}"
41.1688 -- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
41.1689 -+ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
41.1690 - fi
41.1691 - ],
41.1692 - srcdir=${srcdir}
41.1693 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/Makefile.in gcc/libffi/include/Makefile.in
41.1694 ---- gcc-3.2.2.orig/libffi/include/Makefile.in Tue Oct 9 14:32:16 2001
41.1695 -+++ gcc/libffi/include/Makefile.in Mon Apr 29 13:14:44 2002
41.1696 -@@ -99,7 +99,7 @@
41.1697 -
41.1698 - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
41.1699 -
41.1700 --TAR = gnutar
41.1701 -+TAR = gtar
41.1702 - GZIP_ENV = --best
41.1703 - all: all-redirect
41.1704 - .SUFFIXES:
41.1705 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/ffi.h.in gcc/libffi/include/ffi.h.in
41.1706 ---- gcc-3.2.2.orig/libffi/include/ffi.h.in Wed Mar 13 07:35:56 2002
41.1707 -+++ gcc/libffi/include/ffi.h.in Wed Jan 29 00:54:28 2003
41.1708 -@@ -1,5 +1,5 @@
41.1709 - /* -----------------------------------------------------------------*-C-*-
41.1710 -- libffi @VERSION@ - Copyright (c) 1996-2002 Cygnus Solutions
41.1711 -+ libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions
41.1712 -
41.1713 - Permission is hereby granted, free of charge, to any person obtaining
41.1714 - a copy of this software and associated documentation files (the
41.1715 -@@ -164,6 +164,12 @@
41.1716 - #endif
41.1717 - #endif
41.1718 -
41.1719 -+#ifdef S390
41.1720 -+#if defined (__s390x__)
41.1721 -+#define S390X
41.1722 -+#endif
41.1723 -+#endif
41.1724 -+
41.1725 - #ifndef LIBFFI_ASM
41.1726 -
41.1727 - /* ---- Generic type definitions ----------------------------------------- */
41.1728 -@@ -189,16 +195,23 @@
41.1729 - #endif
41.1730 - #endif
41.1731 -
41.1732 -- /* ---- Intel x86 ---------------- */
41.1733 --#ifdef X86
41.1734 -+ /* ---- Intel x86 Win32 ---------- */
41.1735 -+#ifdef X86_WIN32
41.1736 - FFI_SYSV,
41.1737 -+ FFI_STDCALL,
41.1738 -+ /* TODO: Add fastcall support for the sake of completeness */
41.1739 - FFI_DEFAULT_ABI = FFI_SYSV,
41.1740 - #endif
41.1741 -
41.1742 -- /* ---- Intel x86 Win32 ---------- */
41.1743 --#ifdef X86_WIN32
41.1744 -+ /* ---- Intel x86 and AMD x86-64 - */
41.1745 -+#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
41.1746 - FFI_SYSV,
41.1747 -+ FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
41.1748 -+#ifdef __i386__
41.1749 - FFI_DEFAULT_ABI = FFI_SYSV,
41.1750 -+#else
41.1751 -+ FFI_DEFAULT_ABI = FFI_UNIX64,
41.1752 -+#endif
41.1753 - #endif
41.1754 -
41.1755 - /* ---- Intel ia64 ---------------- */
41.1756 -@@ -251,6 +264,18 @@
41.1757 - FFI_DEFAULT_ABI = FFI_SYSV,
41.1758 - #endif
41.1759 -
41.1760 -+ /* ---- S390 --------------------- */
41.1761 -+#ifdef S390
41.1762 -+ FFI_SYSV,
41.1763 -+ FFI_DEFAULT_ABI = FFI_SYSV,
41.1764 -+#endif
41.1765 -+
41.1766 -+ /* ---- SuperH ------------------- */
41.1767 -+#ifdef SH
41.1768 -+ FFI_SYSV,
41.1769 -+ FFI_DEFAULT_ABI = FFI_SYSV,
41.1770 -+#endif
41.1771 -+
41.1772 - /* Leave this for debugging purposes */
41.1773 - FFI_LAST_ABI
41.1774 -
41.1775 -@@ -264,7 +289,7 @@
41.1776 - /*@null@*/ struct _ffi_type **elements;
41.1777 - } ffi_type;
41.1778 -
41.1779 --/* These are defined in ffi.c */
41.1780 -+/* These are defined in types.c */
41.1781 - extern ffi_type ffi_type_void;
41.1782 - extern ffi_type ffi_type_uint8;
41.1783 - extern ffi_type ffi_type_sint8;
41.1784 -@@ -373,13 +398,7 @@
41.1785 -
41.1786 - /* ---- Definitions for closures ----------------------------------------- */
41.1787 -
41.1788 --#ifdef X86
41.1789 --
41.1790 --#define FFI_CLOSURES 1 /* x86 supports closures */
41.1791 --#define FFI_TRAMPOLINE_SIZE 10
41.1792 --#define FFI_NATIVE_RAW_API 1 /* and has native raw api support */
41.1793 --
41.1794 --#elif defined(X86_WIN32)
41.1795 -+#ifdef __i386__
41.1796 -
41.1797 - #define FFI_CLOSURES 1 /* x86 supports closures */
41.1798 - #define FFI_TRAMPOLINE_SIZE 10
41.1799 -@@ -424,6 +443,40 @@
41.1800 - #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */
41.1801 - #define FFI_NATIVE_RAW_API 0
41.1802 -
41.1803 -+#elif defined(SPARC64)
41.1804 -+
41.1805 -+#define FFI_CLOSURES 1
41.1806 -+#define FFI_TRAMPOLINE_SIZE 24
41.1807 -+#define FFI_NATIVE_RAW_API 0
41.1808 -+
41.1809 -+#elif defined(SPARC)
41.1810 -+
41.1811 -+#define FFI_CLOSURES 1
41.1812 -+#define FFI_TRAMPOLINE_SIZE 16
41.1813 -+#define FFI_NATIVE_RAW_API 0
41.1814 -+
41.1815 -+#elif defined(S390)
41.1816 -+
41.1817 -+#define FFI_CLOSURES 1
41.1818 -+#ifdef S390X
41.1819 -+#define FFI_TRAMPOLINE_SIZE 32
41.1820 -+#else
41.1821 -+#define FFI_TRAMPOLINE_SIZE 16
41.1822 -+#endif
41.1823 -+#define FFI_NATIVE_RAW_API 0
41.1824 -+
41.1825 -+#elif defined(SH)
41.1826 -+
41.1827 -+#define FFI_CLOSURES 1
41.1828 -+#define FFI_TRAMPOLINE_SIZE 16
41.1829 -+#define FFI_NATIVE_RAW_API 0
41.1830 -+
41.1831 -+#elif defined(__x86_64__)
41.1832 -+
41.1833 -+#define FFI_CLOSURES 1
41.1834 -+#define FFI_TRAMPOLINE_SIZE 24
41.1835 -+#define FFI_NATIVE_RAW_API 0
41.1836 -+
41.1837 - #else
41.1838 -
41.1839 - #define FFI_CLOSURES 0
41.1840 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/ffi.c gcc/libffi/src/arm/ffi.c
41.1841 ---- gcc-3.2.2.orig/libffi/src/arm/ffi.c Sat Mar 3 07:21:23 2001
41.1842 -+++ gcc/libffi/src/arm/ffi.c Fri Jul 19 08:08:30 2002
41.1843 -@@ -36,13 +36,10 @@
41.1844 - /*@=exportheader@*/
41.1845 - {
41.1846 - register unsigned int i;
41.1847 -- register int tmp;
41.1848 -- register unsigned int avn;
41.1849 - register void **p_argv;
41.1850 - register char *argp;
41.1851 - register ffi_type **p_arg;
41.1852 -
41.1853 -- tmp = 0;
41.1854 - argp = stack;
41.1855 -
41.1856 - if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
41.1857 -@@ -50,11 +47,10 @@
41.1858 - argp += 4;
41.1859 - }
41.1860 -
41.1861 -- avn = ecif->cif->nargs;
41.1862 - p_argv = ecif->avalue;
41.1863 -
41.1864 - for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
41.1865 -- (i != 0) && (avn != 0);
41.1866 -+ (i != 0);
41.1867 - i--, p_arg++)
41.1868 - {
41.1869 - size_t z;
41.1870 -@@ -64,9 +60,6 @@
41.1871 - argp = (char *) ALIGN(argp, (*p_arg)->alignment);
41.1872 - }
41.1873 -
41.1874 -- if (avn != 0)
41.1875 -- {
41.1876 -- avn--;
41.1877 - z = (*p_arg)->size;
41.1878 - if (z < sizeof(int))
41.1879 - {
41.1880 -@@ -107,7 +100,6 @@
41.1881 - }
41.1882 - p_argv++;
41.1883 - argp += z;
41.1884 -- }
41.1885 - }
41.1886 -
41.1887 - return;
41.1888 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/sysv.S gcc/libffi/src/arm/sysv.S
41.1889 ---- gcc-3.2.2.orig/libffi/src/arm/sysv.S Sat Mar 3 07:21:23 2001
41.1890 -+++ gcc/libffi/src/arm/sysv.S Mon Sep 30 03:08:58 2002
41.1891 -@@ -28,8 +28,15 @@
41.1892 - #ifdef HAVE_MACHINE_ASM_H
41.1893 - #include <machine/asm.h>
41.1894 - #else
41.1895 --/* XXX these lose for some platforms, I'm sure. */
41.1896 -+#ifdef __USER_LABEL_PREFIX__
41.1897 -+#define CONCAT1(a, b) CONCAT2(a, b)
41.1898 -+#define CONCAT2(a, b) a ## b
41.1899 -+
41.1900 -+/* Use the right prefix for global labels. */
41.1901 -+#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
41.1902 -+#else
41.1903 - #define CNAME(x) x
41.1904 -+#endif
41.1905 - #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
41.1906 - #endif
41.1907 -
41.1908 -@@ -96,12 +103,20 @@
41.1909 -
41.1910 - # return FLOAT
41.1911 - cmp a4, #FFI_TYPE_FLOAT
41.1912 -+#ifdef __SOFTFP__
41.1913 -+ streq a1, [a3]
41.1914 -+#else
41.1915 - stfeqs f0, [a3]
41.1916 -+#endif
41.1917 - beq epilogue
41.1918 -
41.1919 - # return DOUBLE or LONGDOUBLE
41.1920 - cmp a4, #FFI_TYPE_DOUBLE
41.1921 -+#ifdef __SOFTFP__
41.1922 -+ stmeqia a3, {a1, a2}
41.1923 -+#else
41.1924 - stfeqd f0, [a3]
41.1925 -+#endif
41.1926 -
41.1927 - epilogue:
41.1928 - ldmfd sp!, {a1-a4, fp, pc}
41.1929 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/java_raw_api.c gcc/libffi/src/java_raw_api.c
41.1930 ---- gcc-3.2.2.orig/libffi/src/java_raw_api.c Tue Apr 9 07:31:14 2002
41.1931 -+++ gcc/libffi/src/java_raw_api.c Tue Oct 8 23:55:02 2002
41.1932 -@@ -81,21 +81,14 @@
41.1933 - {
41.1934 - case FFI_TYPE_UINT8:
41.1935 - case FFI_TYPE_SINT8:
41.1936 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);
41.1937 -+ *args = (void*) ((char*)(raw++) + 3);
41.1938 - break;
41.1939 -
41.1940 - case FFI_TYPE_UINT16:
41.1941 - case FFI_TYPE_SINT16:
41.1942 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2);
41.1943 -+ *args = (void*) ((char*)(raw++) + 2);
41.1944 - break;
41.1945 -
41.1946 --#if SIZEOF_ARG >= 4
41.1947 -- case FFI_TYPE_UINT32:
41.1948 -- case FFI_TYPE_SINT32:
41.1949 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4);
41.1950 -- break;
41.1951 --#endif
41.1952 --
41.1953 - #if SIZEOF_ARG == 8
41.1954 - case FFI_TYPE_UINT64:
41.1955 - case FFI_TYPE_SINT64:
41.1956 -@@ -157,31 +150,54 @@
41.1957 - switch ((*tp)->type)
41.1958 - {
41.1959 - case FFI_TYPE_UINT8:
41.1960 -+#if WORDS_BIGENDIAN
41.1961 -+ *(UINT32*)(raw++) = *(UINT8*) (*args);
41.1962 -+#else
41.1963 - (raw++)->uint = *(UINT8*) (*args);
41.1964 -+#endif
41.1965 - break;
41.1966 -
41.1967 - case FFI_TYPE_SINT8:
41.1968 -+#if WORDS_BIGENDIAN
41.1969 -+ *(SINT32*)(raw++) = *(SINT8*) (*args);
41.1970 -+#else
41.1971 - (raw++)->sint = *(SINT8*) (*args);
41.1972 -+#endif
41.1973 - break;
41.1974 -
41.1975 - case FFI_TYPE_UINT16:
41.1976 -+#if WORDS_BIGENDIAN
41.1977 -+ *(UINT32*)(raw++) = *(UINT16*) (*args);
41.1978 -+#else
41.1979 - (raw++)->uint = *(UINT16*) (*args);
41.1980 -+#endif
41.1981 - break;
41.1982 -
41.1983 - case FFI_TYPE_SINT16:
41.1984 -+#if WORDS_BIGENDIAN
41.1985 -+ *(SINT32*)(raw++) = *(SINT16*) (*args);
41.1986 -+#else
41.1987 - (raw++)->sint = *(SINT16*) (*args);
41.1988 -+#endif
41.1989 - break;
41.1990 -
41.1991 --#if SIZEOF_ARG >= 4
41.1992 - case FFI_TYPE_UINT32:
41.1993 -+#if WORDS_BIGENDIAN
41.1994 -+ *(UINT32*)(raw++) = *(UINT32*) (*args);
41.1995 -+#else
41.1996 - (raw++)->uint = *(UINT32*) (*args);
41.1997 -+#endif
41.1998 - break;
41.1999 -
41.2000 - case FFI_TYPE_SINT32:
41.2001 -+#if WORDS_BIGENDIAN
41.2002 -+ *(SINT32*)(raw++) = *(SINT32*) (*args);
41.2003 -+#else
41.2004 - (raw++)->sint = *(SINT32*) (*args);
41.2005 -- break;
41.2006 - #endif
41.2007 -- case FFI_TYPE_FLOAT:
41.2008 -+ break;
41.2009 -+
41.2010 -+ case FFI_TYPE_FLOAT:
41.2011 - (raw++)->flt = *(FLOAT32*) (*args);
41.2012 - break;
41.2013 -
41.2014 -@@ -211,6 +227,55 @@
41.2015 -
41.2016 - #if !FFI_NATIVE_RAW_API
41.2017 -
41.2018 -+static void
41.2019 -+ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
41.2020 -+{
41.2021 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
41.2022 -+ switch (cif->rtype->type)
41.2023 -+ {
41.2024 -+ case FFI_TYPE_UINT8:
41.2025 -+ case FFI_TYPE_UINT16:
41.2026 -+ case FFI_TYPE_UINT32:
41.2027 -+ *(UINT64 *)rvalue <<= 32;
41.2028 -+ break;
41.2029 -+
41.2030 -+ case FFI_TYPE_SINT8:
41.2031 -+ case FFI_TYPE_SINT16:
41.2032 -+ case FFI_TYPE_SINT32:
41.2033 -+ case FFI_TYPE_INT:
41.2034 -+ *(SINT64 *)rvalue <<= 32;
41.2035 -+ break;
41.2036 -+
41.2037 -+ default:
41.2038 -+ break;
41.2039 -+ }
41.2040 -+#endif
41.2041 -+}
41.2042 -+
41.2043 -+static void
41.2044 -+ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
41.2045 -+{
41.2046 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
41.2047 -+ switch (cif->rtype->type)
41.2048 -+ {
41.2049 -+ case FFI_TYPE_UINT8:
41.2050 -+ case FFI_TYPE_UINT16:
41.2051 -+ case FFI_TYPE_UINT32:
41.2052 -+ *(UINT64 *)rvalue >>= 32;
41.2053 -+ break;
41.2054 -+
41.2055 -+ case FFI_TYPE_SINT8:
41.2056 -+ case FFI_TYPE_SINT16:
41.2057 -+ case FFI_TYPE_SINT32:
41.2058 -+ case FFI_TYPE_INT:
41.2059 -+ *(SINT64 *)rvalue >>= 32;
41.2060 -+ break;
41.2061 -+
41.2062 -+ default:
41.2063 -+ break;
41.2064 -+ }
41.2065 -+#endif
41.2066 -+}
41.2067 -
41.2068 - /* This is a generic definition of ffi_raw_call, to be used if the
41.2069 - * native system does not provide a machine-specific implementation.
41.2070 -@@ -227,6 +292,7 @@
41.2071 - void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
41.2072 - ffi_java_raw_to_ptrarray (cif, raw, avalue);
41.2073 - ffi_call (cif, fn, rvalue, avalue);
41.2074 -+ ffi_java_rvalue_to_raw (cif, rvalue);
41.2075 - }
41.2076 -
41.2077 - #if FFI_CLOSURES /* base system provides closures */
41.2078 -@@ -240,6 +306,7 @@
41.2079 -
41.2080 - ffi_java_ptrarray_to_raw (cif, avalue, raw);
41.2081 - (*cl->fun) (cif, rvalue, raw, cl->user_data);
41.2082 -+ ffi_java_raw_to_rvalue (cif, rvalue);
41.2083 - }
41.2084 -
41.2085 - /* Again, here is the generic version of ffi_prep_raw_closure, which
41.2086 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/m68k/ffi.c gcc/libffi/src/m68k/ffi.c
41.2087 ---- gcc-3.2.2.orig/libffi/src/m68k/ffi.c Sun Aug 8 22:27:19 1999
41.2088 -+++ gcc/libffi/src/m68k/ffi.c Fri Jul 19 08:08:30 2002
41.2089 -@@ -16,14 +16,11 @@
41.2090 - ffi_prep_args (void *stack, extended_cif *ecif)
41.2091 - {
41.2092 - unsigned int i;
41.2093 -- int tmp;
41.2094 -- unsigned int avn;
41.2095 - void **p_argv;
41.2096 - char *argp;
41.2097 - ffi_type **p_arg;
41.2098 - void *struct_value_ptr;
41.2099 -
41.2100 -- tmp = 0;
41.2101 - argp = stack;
41.2102 -
41.2103 - if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
41.2104 -@@ -32,11 +29,10 @@
41.2105 - else
41.2106 - struct_value_ptr = NULL;
41.2107 -
41.2108 -- avn = ecif->cif->nargs;
41.2109 - p_argv = ecif->avalue;
41.2110 -
41.2111 - for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
41.2112 -- i != 0 && avn != 0;
41.2113 -+ i != 0;
41.2114 - i--, p_arg++)
41.2115 - {
41.2116 - size_t z;
41.2117 -@@ -45,9 +41,6 @@
41.2118 - if (((*p_arg)->alignment - 1) & (unsigned) argp)
41.2119 - argp = (char *) ALIGN (argp, (*p_arg)->alignment);
41.2120 -
41.2121 -- if (avn != 0)
41.2122 -- {
41.2123 -- avn--;
41.2124 - z = (*p_arg)->size;
41.2125 - if (z < sizeof (int))
41.2126 - {
41.2127 -@@ -82,7 +75,6 @@
41.2128 - memcpy (argp, *p_argv, z);
41.2129 - p_argv++;
41.2130 - argp += z;
41.2131 -- }
41.2132 - }
41.2133 -
41.2134 - return struct_value_ptr;
41.2135 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/mips/ffi.c gcc/libffi/src/mips/ffi.c
41.2136 ---- gcc-3.2.2.orig/libffi/src/mips/ffi.c Sat Mar 3 07:21:23 2001
41.2137 -+++ gcc/libffi/src/mips/ffi.c Fri Jul 19 08:08:31 2002
41.2138 -@@ -23,6 +23,7 @@
41.2139 - OTHER DEALINGS IN THE SOFTWARE.
41.2140 - ----------------------------------------------------------------------- */
41.2141 -
41.2142 -+#include <sgidefs.h>
41.2143 - #include <ffi.h>
41.2144 - #include <ffi_common.h>
41.2145 -
41.2146 -@@ -50,7 +51,6 @@
41.2147 - int flags)
41.2148 - {
41.2149 - register int i;
41.2150 -- register int avn;
41.2151 - register void **p_argv;
41.2152 - register char *argp;
41.2153 - register ffi_type **p_arg;
41.2154 -@@ -80,12 +80,9 @@
41.2155 - FIX_ARGP;
41.2156 - }
41.2157 -
41.2158 -- avn = ecif->cif->nargs;
41.2159 - p_argv = ecif->avalue;
41.2160 -
41.2161 -- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
41.2162 -- i && avn;
41.2163 -- i--, p_arg++)
41.2164 -+ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
41.2165 - {
41.2166 - size_t z;
41.2167 -
41.2168 -@@ -101,9 +98,6 @@
41.2169 - #define OFFSET sizeof(int)
41.2170 - #endif
41.2171 -
41.2172 -- if (avn)
41.2173 -- {
41.2174 -- avn--;
41.2175 - z = (*p_arg)->size;
41.2176 - if (z < sizeof(SLOT_TYPE_UNSIGNED))
41.2177 - {
41.2178 -@@ -179,7 +173,6 @@
41.2179 - p_argv++;
41.2180 - argp += z;
41.2181 - FIX_ARGP;
41.2182 -- }
41.2183 - }
41.2184 -
41.2185 - return;
41.2186 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/powerpc/darwin.S gcc/libffi/src/powerpc/darwin.S
41.2187 ---- gcc-3.2.2.orig/libffi/src/powerpc/darwin.S Sat Jan 19 01:22:34 2002
41.2188 -+++ gcc/libffi/src/powerpc/darwin.S Thu Jan 23 03:21:55 2003
41.2189 -@@ -3,8 +3,6 @@
41.2190 -
41.2191 - PowerPC Assembly glue.
41.2192 -
41.2193 -- $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $
41.2194 --
41.2195 - Permission is hereby granted, free of charge, to any person obtaining
41.2196 - a copy of this software and associated documentation files (the
41.2197 - ``Software''), to deal in the Software without restriction, including
41.2198 -@@ -39,30 +37,34 @@
41.2199 - .text
41.2200 - .align 2
41.2201 - _ffi_call_DARWIN:
41.2202 -- mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
41.2203 -+LFB0:
41.2204 -+ mr r12,r8 /* We only need r12 until the call,
41.2205 -+ so it doesn't have to be saved... */
41.2206 -+LFB1:
41.2207 - /* Save the old stack pointer as AP. */
41.2208 - mr r8,r1
41.2209 --
41.2210 -+LCFI0:
41.2211 - /* Allocate the stack space we need. */
41.2212 - stwux r1,r1,r4
41.2213 -
41.2214 - /* Save registers we use. */
41.2215 - mflr r9
41.2216 -
41.2217 -- stw r28,-16(r8)
41.2218 -+ stw r28,-16(r8)
41.2219 - stw r29,-12(r8)
41.2220 - stw r30, -8(r8)
41.2221 - stw r31, -4(r8)
41.2222 --
41.2223 -- stw r9, 8(r8)
41.2224 -+
41.2225 -+ stw r9, 8(r8)
41.2226 - stw r2, 20(r1)
41.2227 -+LCFI1:
41.2228 -
41.2229 - /* Save arguments over call... */
41.2230 -- mr r31,r5 /* flags, */
41.2231 -- mr r30,r6 /* rvalue, */
41.2232 -- mr r29,r7 /* function address, */
41.2233 -- mr r28,r8 /* our AP. */
41.2234 --
41.2235 -+ mr r31,r5 /* flags, */
41.2236 -+ mr r30,r6 /* rvalue, */
41.2237 -+ mr r29,r7 /* function address, */
41.2238 -+ mr r28,r8 /* our AP. */
41.2239 -+LCFI2:
41.2240 - /* Call ffi_prep_args. */
41.2241 - mr r4,r1
41.2242 - li r9,0
41.2243 -@@ -145,7 +147,8 @@
41.2244 - L(float_return_value):
41.2245 - stfs f1,0(r30)
41.2246 - b L(done_return_value)
41.2247 --//END(_ffi_call_DARWIN)
41.2248 -+LFE1:
41.2249 -+/* END(_ffi_call_DARWIN) */
41.2250 -
41.2251 - /* Provide a null definition of _ffi_call_AIX. */
41.2252 - .text
41.2253 -@@ -155,5 +158,61 @@
41.2254 - .align 2
41.2255 - _ffi_call_AIX:
41.2256 - blr
41.2257 --//END(_ffi_call_AIX)
41.2258 -+/* END(_ffi_call_AIX) */
41.2259 -
41.2260 -+.data
41.2261 -+.section __TEXT,__eh_frame
41.2262 -+Lframe1:
41.2263 -+ .set L$set$0,LECIE1-LSCIE1
41.2264 -+ .long L$set$0 ; Length of Common Information Entry
41.2265 -+LSCIE1:
41.2266 -+ .long 0x0 ; CIE Identifier Tag
41.2267 -+ .byte 0x1 ; CIE Version
41.2268 -+ .ascii "zR\0" ; CIE Augmentation
41.2269 -+ .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor
41.2270 -+ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor
41.2271 -+ .byte 0x41 ; CIE RA Column
41.2272 -+ .byte 0x1 ; uleb128 0x1; Augmentation size
41.2273 -+ .byte 0x10 ; FDE Encoding (pcrel)
41.2274 -+ .byte 0xc ; DW_CFA_def_cfa
41.2275 -+ .byte 0x1 ; uleb128 0x1
41.2276 -+ .byte 0x0 ; uleb128 0x0
41.2277 -+ .align 2
41.2278 -+LECIE1:
41.2279 -+LSFDE1:
41.2280 -+ .set L$set$1,LEFDE1-LASFDE1
41.2281 -+ .long L$set$1 ; FDE Length
41.2282 -+LASFDE1:
41.2283 -+ .set L$set$2,LASFDE1-Lframe1
41.2284 -+ .long L$set$2 ; FDE CIE offset
41.2285 -+ .long LFB0-. ; FDE initial location
41.2286 -+ .set L$set$3,LFE1-LFB0
41.2287 -+ .long L$set$3 ; FDE address range
41.2288 -+ .byte 0x0 ; uleb128 0x0; Augmentation size
41.2289 -+ .byte 0x4 ; DW_CFA_advance_loc4
41.2290 -+ .set L$set$4,LCFI0-LFB1
41.2291 -+ .long L$set$4
41.2292 -+ .byte 0xd ; DW_CFA_def_cfa_register
41.2293 -+ .byte 0x08 ; uleb128 0x08
41.2294 -+ .byte 0x4 ; DW_CFA_advance_loc4
41.2295 -+ .set L$set$5,LCFI1-LCFI0
41.2296 -+ .long L$set$5
41.2297 -+ .byte 0x11 ; DW_CFA_offset_extended_sf
41.2298 -+ .byte 0x41 ; uleb128 0x41
41.2299 -+ .byte 0x7e ; sleb128 -2
41.2300 -+ .byte 0x9f ; DW_CFA_offset, column 0x1f
41.2301 -+ .byte 0x1 ; uleb128 0x1
41.2302 -+ .byte 0x9e ; DW_CFA_offset, column 0x1e
41.2303 -+ .byte 0x2 ; uleb128 0x2
41.2304 -+ .byte 0x9d ; DW_CFA_offset, column 0x1d
41.2305 -+ .byte 0x3 ; uleb128 0x3
41.2306 -+ .byte 0x9c ; DW_CFA_offset, column 0x1c
41.2307 -+ .byte 0x4 ; uleb128 0x4
41.2308 -+ .byte 0x4 ; DW_CFA_advance_loc4
41.2309 -+ .set L$set$6,LCFI2-LCFI1
41.2310 -+ .long L$set$6
41.2311 -+ .byte 0xd ; DW_CFA_def_cfa_register
41.2312 -+ .byte 0x1c ; uleb128 0x1c
41.2313 -+ .align 2
41.2314 -+LEFDE1:
41.2315 -+
41.2316 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/prep_cif.c gcc/libffi/src/prep_cif.c
41.2317 ---- gcc-3.2.2.orig/libffi/src/prep_cif.c Sat Mar 3 07:21:22 2001
41.2318 -+++ gcc/libffi/src/prep_cif.c Mon Sep 30 20:59:42 2002
41.2319 -@@ -103,7 +103,8 @@
41.2320 - /* Perform a sanity check on the return type */
41.2321 - FFI_ASSERT(ffi_type_test(cif->rtype));
41.2322 -
41.2323 --#ifndef M68K
41.2324 -+ /* x86-64 and s390 stack space allocation is handled in prep_machdep. */
41.2325 -+#if !defined M68K && !defined __x86_64__ && !defined S390
41.2326 - /* Make space for the return structure pointer */
41.2327 - if (cif->rtype->type == FFI_TYPE_STRUCT
41.2328 - #ifdef SPARC
41.2329 -@@ -122,6 +123,7 @@
41.2330 - if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
41.2331 - return FFI_BAD_TYPEDEF;
41.2332 -
41.2333 -+#if !defined __x86_64__ && !defined S390
41.2334 - #ifdef SPARC
41.2335 - if (((*ptr)->type == FFI_TYPE_STRUCT
41.2336 - && ((*ptr)->size > 16 || cif->abi != FFI_V9))
41.2337 -@@ -137,6 +139,7 @@
41.2338 -
41.2339 - bytes += STACK_ARG_SIZE((*ptr)->size);
41.2340 - }
41.2341 -+#endif
41.2342 - }
41.2343 -
41.2344 - cif->bytes = bytes;
41.2345 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/ffi.c gcc/libffi/src/s390/ffi.c
41.2346 ---- gcc-3.2.2.orig/libffi/src/s390/ffi.c Thu Jan 1 09:00:00 1970
41.2347 -+++ gcc/libffi/src/s390/ffi.c Thu Feb 6 08:58:57 2003
41.2348 -@@ -0,0 +1,753 @@
41.2349 -+/* -----------------------------------------------------------------------
41.2350 -+ ffi.c - Copyright (c) 2000 Software AG
41.2351 -+
41.2352 -+ S390 Foreign Function Interface
41.2353 -+
41.2354 -+ Permission is hereby granted, free of charge, to any person obtaining
41.2355 -+ a copy of this software and associated documentation files (the
41.2356 -+ ``Software''), to deal in the Software without restriction, including
41.2357 -+ without limitation the rights to use, copy, modify, merge, publish,
41.2358 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.2359 -+ permit persons to whom the Software is furnished to do so, subject to
41.2360 -+ the following conditions:
41.2361 -+
41.2362 -+ The above copyright notice and this permission notice shall be included
41.2363 -+ in all copies or substantial portions of the Software.
41.2364 -+
41.2365 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.2366 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.2367 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.2368 -+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.2369 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.2370 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.2371 -+ OTHER DEALINGS IN THE SOFTWARE.
41.2372 -+ ----------------------------------------------------------------------- */
41.2373 -+/*====================================================================*/
41.2374 -+/* Includes */
41.2375 -+/* -------- */
41.2376 -+/*====================================================================*/
41.2377 -+
41.2378 -+#include <ffi.h>
41.2379 -+#include <ffi_common.h>
41.2380 -+
41.2381 -+#include <stdlib.h>
41.2382 -+#include <stdio.h>
41.2383 -+
41.2384 -+/*====================== End of Includes =============================*/
41.2385 -+
41.2386 -+/*====================================================================*/
41.2387 -+/* Defines */
41.2388 -+/* ------- */
41.2389 -+/*====================================================================*/
41.2390 -+
41.2391 -+/* Maximum number of GPRs available for argument passing. */
41.2392 -+#define MAX_GPRARGS 5
41.2393 -+
41.2394 -+/* Maximum number of FPRs available for argument passing. */
41.2395 -+#ifdef __s390x__
41.2396 -+#define MAX_FPRARGS 4
41.2397 -+#else
41.2398 -+#define MAX_FPRARGS 2
41.2399 -+#endif
41.2400 -+
41.2401 -+/* Round to multiple of 16. */
41.2402 -+#define ROUND_SIZE(size) (((size) + 15) & ~15)
41.2403 -+
41.2404 -+/* If these values change, sysv.S must be adapted! */
41.2405 -+#define FFI390_RET_VOID 0
41.2406 -+#define FFI390_RET_STRUCT 1
41.2407 -+#define FFI390_RET_FLOAT 2
41.2408 -+#define FFI390_RET_DOUBLE 3
41.2409 -+#define FFI390_RET_INT32 4
41.2410 -+#define FFI390_RET_INT64 5
41.2411 -+
41.2412 -+/*===================== End of Defines ===============================*/
41.2413 -+
41.2414 -+/*====================================================================*/
41.2415 -+/* Prototypes */
41.2416 -+/* ---------- */
41.2417 -+/*====================================================================*/
41.2418 -+
41.2419 -+static void ffi_prep_args (unsigned char *, extended_cif *);
41.2420 -+static int ffi_check_float_struct (ffi_type *);
41.2421 -+void
41.2422 -+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
41.2423 -+__attribute__ ((visibility ("hidden")))
41.2424 -+#endif
41.2425 -+ffi_closure_helper_SYSV (ffi_closure *, unsigned long *,
41.2426 -+ unsigned long long *, unsigned long *);
41.2427 -+
41.2428 -+/*====================== End of Prototypes ===========================*/
41.2429 -+
41.2430 -+/*====================================================================*/
41.2431 -+/* Externals */
41.2432 -+/* --------- */
41.2433 -+/*====================================================================*/
41.2434 -+
41.2435 -+extern void ffi_call_SYSV(unsigned,
41.2436 -+ extended_cif *,
41.2437 -+ void (*)(unsigned char *, extended_cif *),
41.2438 -+ unsigned,
41.2439 -+ void *,
41.2440 -+ void (*fn)());
41.2441 -+
41.2442 -+extern void ffi_closure_SYSV(void);
41.2443 -+
41.2444 -+/*====================== End of Externals ============================*/
41.2445 -+
41.2446 -+/*====================================================================*/
41.2447 -+/* */
41.2448 -+/* Name - ffi_check_struct_type. */
41.2449 -+/* */
41.2450 -+/* Function - Determine if a structure can be passed within a */
41.2451 -+/* general purpose or floating point register. */
41.2452 -+/* */
41.2453 -+/*====================================================================*/
41.2454 -+
41.2455 -+static int
41.2456 -+ffi_check_struct_type (ffi_type *arg)
41.2457 -+{
41.2458 -+ size_t size = arg->size;
41.2459 -+
41.2460 -+ /* If the struct has just one element, look at that element
41.2461 -+ to find out whether to consider the struct as floating point. */
41.2462 -+ while (arg->type == FFI_TYPE_STRUCT
41.2463 -+ && arg->elements[0] && !arg->elements[1])
41.2464 -+ arg = arg->elements[0];
41.2465 -+
41.2466 -+ /* Structs of size 1, 2, 4, and 8 are passed in registers,
41.2467 -+ just like the corresponding int/float types. */
41.2468 -+ switch (size)
41.2469 -+ {
41.2470 -+ case 1:
41.2471 -+ return FFI_TYPE_UINT8;
41.2472 -+
41.2473 -+ case 2:
41.2474 -+ return FFI_TYPE_UINT16;
41.2475 -+
41.2476 -+ case 4:
41.2477 -+ if (arg->type == FFI_TYPE_FLOAT)
41.2478 -+ return FFI_TYPE_FLOAT;
41.2479 -+ else
41.2480 -+ return FFI_TYPE_UINT32;
41.2481 -+
41.2482 -+ case 8:
41.2483 -+ if (arg->type == FFI_TYPE_DOUBLE)
41.2484 -+ return FFI_TYPE_DOUBLE;
41.2485 -+ else
41.2486 -+ return FFI_TYPE_UINT64;
41.2487 -+
41.2488 -+ default:
41.2489 -+ break;
41.2490 -+ }
41.2491 -+
41.2492 -+ /* Other structs are passed via a pointer to the data. */
41.2493 -+ return FFI_TYPE_POINTER;
41.2494 -+}
41.2495 -+
41.2496 -+/*======================== End of Routine ============================*/
41.2497 -+
41.2498 -+/*====================================================================*/
41.2499 -+/* */
41.2500 -+/* Name - ffi_prep_args. */
41.2501 -+/* */
41.2502 -+/* Function - Prepare parameters for call to function. */
41.2503 -+/* */
41.2504 -+/* ffi_prep_args is called by the assembly routine once stack space */
41.2505 -+/* has been allocated for the function's arguments. */
41.2506 -+/* */
41.2507 -+/*====================================================================*/
41.2508 -+
41.2509 -+static void
41.2510 -+ffi_prep_args (unsigned char *stack, extended_cif *ecif)
41.2511 -+{
41.2512 -+ /* The stack space will be filled with those areas:
41.2513 -+
41.2514 -+ FPR argument register save area (highest addresses)
41.2515 -+ GPR argument register save area
41.2516 -+ temporary struct copies
41.2517 -+ overflow argument area (lowest addresses)
41.2518 -+
41.2519 -+ We set up the following pointers:
41.2520 -+
41.2521 -+ p_fpr: bottom of the FPR area (growing upwards)
41.2522 -+ p_gpr: bottom of the GPR area (growing upwards)
41.2523 -+ p_ov: bottom of the overflow area (growing upwards)
41.2524 -+ p_struct: top of the struct copy area (growing downwards)
41.2525 -+
41.2526 -+ All areas are kept aligned to twice the word size. */
41.2527 -+
41.2528 -+ int gpr_off = ecif->cif->bytes;
41.2529 -+ int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long));
41.2530 -+
41.2531 -+ unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off);
41.2532 -+ unsigned long *p_gpr = (unsigned long *)(stack + gpr_off);
41.2533 -+ unsigned char *p_struct = (unsigned char *)p_gpr;
41.2534 -+ unsigned long *p_ov = (unsigned long *)stack;
41.2535 -+
41.2536 -+ int n_fpr = 0;
41.2537 -+ int n_gpr = 0;
41.2538 -+ int n_ov = 0;
41.2539 -+
41.2540 -+ ffi_type **ptr;
41.2541 -+ void **p_argv = ecif->avalue;
41.2542 -+ int i;
41.2543 -+
41.2544 -+ /* If we returning a structure then we set the first parameter register
41.2545 -+ to the address of where we are returning this structure. */
41.2546 -+
41.2547 -+ if (ecif->cif->flags == FFI390_RET_STRUCT)
41.2548 -+ p_gpr[n_gpr++] = (unsigned long) ecif->rvalue;
41.2549 -+
41.2550 -+ /* Now for the arguments. */
41.2551 -+
41.2552 -+ for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs;
41.2553 -+ i > 0;
41.2554 -+ i--, ptr++, p_argv++)
41.2555 -+ {
41.2556 -+ void *arg = *p_argv;
41.2557 -+ int type = (*ptr)->type;
41.2558 -+
41.2559 -+ /* Check how a structure type is passed. */
41.2560 -+ if (type == FFI_TYPE_STRUCT)
41.2561 -+ {
41.2562 -+ type = ffi_check_struct_type (*ptr);
41.2563 -+
41.2564 -+ /* If we pass the struct via pointer, copy the data. */
41.2565 -+ if (type == FFI_TYPE_POINTER)
41.2566 -+ {
41.2567 -+ p_struct -= ROUND_SIZE ((*ptr)->size);
41.2568 -+ memcpy (p_struct, (char *)arg, (*ptr)->size);
41.2569 -+ arg = &p_struct;
41.2570 -+ }
41.2571 -+ }
41.2572 -+
41.2573 -+ /* Pointers are passed like UINTs of the same size. */
41.2574 -+ if (type == FFI_TYPE_POINTER)
41.2575 -+#ifdef __s390x__
41.2576 -+ type = FFI_TYPE_UINT64;
41.2577 -+#else
41.2578 -+ type = FFI_TYPE_UINT32;
41.2579 -+#endif
41.2580 -+
41.2581 -+ /* Now handle all primitive int/float data types. */
41.2582 -+ switch (type)
41.2583 -+ {
41.2584 -+ case FFI_TYPE_DOUBLE:
41.2585 -+ if (n_fpr < MAX_FPRARGS)
41.2586 -+ p_fpr[n_fpr++] = *(unsigned long long *) arg;
41.2587 -+ else
41.2588 -+#ifdef __s390x__
41.2589 -+ p_ov[n_ov++] = *(unsigned long *) arg;
41.2590 -+#else
41.2591 -+ p_ov[n_ov++] = ((unsigned long *) arg)[0],
41.2592 -+ p_ov[n_ov++] = ((unsigned long *) arg)[1];
41.2593 -+#endif
41.2594 -+ break;
41.2595 -+
41.2596 -+ case FFI_TYPE_FLOAT:
41.2597 -+ if (n_fpr < MAX_FPRARGS)
41.2598 -+ p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32;
41.2599 -+ else
41.2600 -+ p_ov[n_ov++] = *(unsigned int *) arg;
41.2601 -+ break;
41.2602 -+
41.2603 -+ case FFI_TYPE_UINT64:
41.2604 -+ case FFI_TYPE_SINT64:
41.2605 -+#ifdef __s390x__
41.2606 -+ if (n_gpr < MAX_GPRARGS)
41.2607 -+ p_gpr[n_gpr++] = *(unsigned long *) arg;
41.2608 -+ else
41.2609 -+ p_ov[n_ov++] = *(unsigned long *) arg;
41.2610 -+#else
41.2611 -+ if (n_gpr == MAX_GPRARGS-1)
41.2612 -+ n_gpr = MAX_GPRARGS;
41.2613 -+ if (n_gpr < MAX_GPRARGS)
41.2614 -+ p_gpr[n_gpr++] = ((unsigned long *) arg)[0],
41.2615 -+ p_gpr[n_gpr++] = ((unsigned long *) arg)[1];
41.2616 -+ else
41.2617 -+ p_ov[n_ov++] = ((unsigned long *) arg)[0],
41.2618 -+ p_ov[n_ov++] = ((unsigned long *) arg)[1];
41.2619 -+#endif
41.2620 -+ break;
41.2621 -+
41.2622 -+ case FFI_TYPE_UINT32:
41.2623 -+ if (n_gpr < MAX_GPRARGS)
41.2624 -+ p_gpr[n_gpr++] = *(unsigned int *) arg;
41.2625 -+ else
41.2626 -+ p_ov[n_ov++] = *(unsigned int *) arg;
41.2627 -+ break;
41.2628 -+
41.2629 -+ case FFI_TYPE_INT:
41.2630 -+ case FFI_TYPE_SINT32:
41.2631 -+ if (n_gpr < MAX_GPRARGS)
41.2632 -+ p_gpr[n_gpr++] = *(signed int *) arg;
41.2633 -+ else
41.2634 -+ p_ov[n_ov++] = *(signed int *) arg;
41.2635 -+ break;
41.2636 -+
41.2637 -+ case FFI_TYPE_UINT16:
41.2638 -+ if (n_gpr < MAX_GPRARGS)
41.2639 -+ p_gpr[n_gpr++] = *(unsigned short *) arg;
41.2640 -+ else
41.2641 -+ p_ov[n_ov++] = *(unsigned short *) arg;
41.2642 -+ break;
41.2643 -+
41.2644 -+ case FFI_TYPE_SINT16:
41.2645 -+ if (n_gpr < MAX_GPRARGS)
41.2646 -+ p_gpr[n_gpr++] = *(signed short *) arg;
41.2647 -+ else
41.2648 -+ p_ov[n_ov++] = *(signed short *) arg;
41.2649 -+ break;
41.2650 -+
41.2651 -+ case FFI_TYPE_UINT8:
41.2652 -+ if (n_gpr < MAX_GPRARGS)
41.2653 -+ p_gpr[n_gpr++] = *(unsigned char *) arg;
41.2654 -+ else
41.2655 -+ p_ov[n_ov++] = *(unsigned char *) arg;
41.2656 -+ break;
41.2657 -+
41.2658 -+ case FFI_TYPE_SINT8:
41.2659 -+ if (n_gpr < MAX_GPRARGS)
41.2660 -+ p_gpr[n_gpr++] = *(signed char *) arg;
41.2661 -+ else
41.2662 -+ p_ov[n_ov++] = *(signed char *) arg;
41.2663 -+ break;
41.2664 -+
41.2665 -+ default:
41.2666 -+ FFI_ASSERT (0);
41.2667 -+ break;
41.2668 -+ }
41.2669 -+ }
41.2670 -+}
41.2671 -+
41.2672 -+/*======================== End of Routine ============================*/
41.2673 -+
41.2674 -+/*====================================================================*/
41.2675 -+/* */
41.2676 -+/* Name - ffi_prep_cif_machdep. */
41.2677 -+/* */
41.2678 -+/* Function - Perform machine dependent CIF processing. */
41.2679 -+/* */
41.2680 -+/*====================================================================*/
41.2681 -+
41.2682 -+ffi_status
41.2683 -+ffi_prep_cif_machdep(ffi_cif *cif)
41.2684 -+{
41.2685 -+ size_t struct_size = 0;
41.2686 -+ int n_gpr = 0;
41.2687 -+ int n_fpr = 0;
41.2688 -+ int n_ov = 0;
41.2689 -+
41.2690 -+ ffi_type **ptr;
41.2691 -+ int i;
41.2692 -+
41.2693 -+ /* Determine return value handling. */
41.2694 -+
41.2695 -+ switch (cif->rtype->type)
41.2696 -+ {
41.2697 -+ /* Void is easy. */
41.2698 -+ case FFI_TYPE_VOID:
41.2699 -+ cif->flags = FFI390_RET_VOID;
41.2700 -+ break;
41.2701 -+
41.2702 -+ /* Structures are returned via a hidden pointer. */
41.2703 -+ case FFI_TYPE_STRUCT:
41.2704 -+ cif->flags = FFI390_RET_STRUCT;
41.2705 -+ n_gpr++; /* We need one GPR to pass the pointer. */
41.2706 -+ break;
41.2707 -+
41.2708 -+ /* Floating point values are returned in fpr 0. */
41.2709 -+ case FFI_TYPE_FLOAT:
41.2710 -+ cif->flags = FFI390_RET_FLOAT;
41.2711 -+ break;
41.2712 -+
41.2713 -+ case FFI_TYPE_DOUBLE:
41.2714 -+ cif->flags = FFI390_RET_DOUBLE;
41.2715 -+ break;
41.2716 -+
41.2717 -+ /* Integer values are returned in gpr 2 (and gpr 3
41.2718 -+ for 64-bit values on 31-bit machines). */
41.2719 -+ case FFI_TYPE_UINT64:
41.2720 -+ case FFI_TYPE_SINT64:
41.2721 -+ cif->flags = FFI390_RET_INT64;
41.2722 -+ break;
41.2723 -+
41.2724 -+ case FFI_TYPE_POINTER:
41.2725 -+ case FFI_TYPE_INT:
41.2726 -+ case FFI_TYPE_UINT32:
41.2727 -+ case FFI_TYPE_SINT32:
41.2728 -+ case FFI_TYPE_UINT16:
41.2729 -+ case FFI_TYPE_SINT16:
41.2730 -+ case FFI_TYPE_UINT8:
41.2731 -+ case FFI_TYPE_SINT8:
41.2732 -+ /* These are to be extended to word size. */
41.2733 -+#ifdef __s390x__
41.2734 -+ cif->flags = FFI390_RET_INT64;
41.2735 -+#else
41.2736 -+ cif->flags = FFI390_RET_INT32;
41.2737 -+#endif
41.2738 -+ break;
41.2739 -+
41.2740 -+ default:
41.2741 -+ FFI_ASSERT (0);
41.2742 -+ break;
41.2743 -+ }
41.2744 -+
41.2745 -+ /* Now for the arguments. */
41.2746 -+
41.2747 -+ for (ptr = cif->arg_types, i = cif->nargs;
41.2748 -+ i > 0;
41.2749 -+ i--, ptr++)
41.2750 -+ {
41.2751 -+ int type = (*ptr)->type;
41.2752 -+
41.2753 -+ /* Check how a structure type is passed. */
41.2754 -+ if (type == FFI_TYPE_STRUCT)
41.2755 -+ {
41.2756 -+ type = ffi_check_struct_type (*ptr);
41.2757 -+
41.2758 -+ /* If we pass the struct via pointer, we must reserve space
41.2759 -+ to copy its data for proper call-by-value semantics. */
41.2760 -+ if (type == FFI_TYPE_POINTER)
41.2761 -+ struct_size += ROUND_SIZE ((*ptr)->size);
41.2762 -+ }
41.2763 -+
41.2764 -+ /* Now handle all primitive int/float data types. */
41.2765 -+ switch (type)
41.2766 -+ {
41.2767 -+ /* The first MAX_FPRARGS floating point arguments
41.2768 -+ go in FPRs, the rest overflow to the stack. */
41.2769 -+
41.2770 -+ case FFI_TYPE_DOUBLE:
41.2771 -+ if (n_fpr < MAX_FPRARGS)
41.2772 -+ n_fpr++;
41.2773 -+ else
41.2774 -+ n_ov += sizeof (double) / sizeof (long);
41.2775 -+ break;
41.2776 -+
41.2777 -+ case FFI_TYPE_FLOAT:
41.2778 -+ if (n_fpr < MAX_FPRARGS)
41.2779 -+ n_fpr++;
41.2780 -+ else
41.2781 -+ n_ov++;
41.2782 -+ break;
41.2783 -+
41.2784 -+ /* On 31-bit machines, 64-bit integers are passed in GPR pairs,
41.2785 -+ if one is still available, or else on the stack. If only one
41.2786 -+ register is free, skip the register (it won't be used for any
41.2787 -+ subsequent argument either). */
41.2788 -+
41.2789 -+#ifndef __s390x__
41.2790 -+ case FFI_TYPE_UINT64:
41.2791 -+ case FFI_TYPE_SINT64:
41.2792 -+ if (n_gpr == MAX_GPRARGS-1)
41.2793 -+ n_gpr = MAX_GPRARGS;
41.2794 -+ if (n_gpr < MAX_GPRARGS)
41.2795 -+ n_gpr += 2;
41.2796 -+ else
41.2797 -+ n_ov += 2;
41.2798 -+ break;
41.2799 -+#endif
41.2800 -+
41.2801 -+ /* Everything else is passed in GPRs (until MAX_GPRARGS
41.2802 -+ have been used) or overflows to the stack. */
41.2803 -+
41.2804 -+ default:
41.2805 -+ if (n_gpr < MAX_GPRARGS)
41.2806 -+ n_gpr++;
41.2807 -+ else
41.2808 -+ n_ov++;
41.2809 -+ break;
41.2810 -+ }
41.2811 -+ }
41.2812 -+
41.2813 -+ /* Total stack space as required for overflow arguments
41.2814 -+ and temporary structure copies. */
41.2815 -+
41.2816 -+ cif->bytes = ROUND_SIZE (n_ov * sizeof (long)) + struct_size;
41.2817 -+
41.2818 -+ return FFI_OK;
41.2819 -+}
41.2820 -+
41.2821 -+/*======================== End of Routine ============================*/
41.2822 -+
41.2823 -+/*====================================================================*/
41.2824 -+/* */
41.2825 -+/* Name - ffi_call. */
41.2826 -+/* */
41.2827 -+/* Function - Call the FFI routine. */
41.2828 -+/* */
41.2829 -+/*====================================================================*/
41.2830 -+
41.2831 -+void
41.2832 -+ffi_call(ffi_cif *cif,
41.2833 -+ void (*fn)(),
41.2834 -+ void *rvalue,
41.2835 -+ void **avalue)
41.2836 -+{
41.2837 -+ int ret_type = cif->flags;
41.2838 -+ extended_cif ecif;
41.2839 -+
41.2840 -+ ecif.cif = cif;
41.2841 -+ ecif.avalue = avalue;
41.2842 -+ ecif.rvalue = rvalue;
41.2843 -+
41.2844 -+ /* If we don't have a return value, we need to fake one. */
41.2845 -+ if (rvalue == NULL)
41.2846 -+ {
41.2847 -+ if (ret_type == FFI390_RET_STRUCT)
41.2848 -+ ecif.rvalue = alloca (cif->rtype->size);
41.2849 -+ else
41.2850 -+ ret_type = FFI390_RET_VOID;
41.2851 -+ }
41.2852 -+
41.2853 -+ switch (cif->abi)
41.2854 -+ {
41.2855 -+ case FFI_SYSV:
41.2856 -+ ffi_call_SYSV (cif->bytes, &ecif, ffi_prep_args,
41.2857 -+ ret_type, ecif.rvalue, fn);
41.2858 -+ break;
41.2859 -+
41.2860 -+ default:
41.2861 -+ FFI_ASSERT (0);
41.2862 -+ break;
41.2863 -+ }
41.2864 -+}
41.2865 -+
41.2866 -+/*======================== End of Routine ============================*/
41.2867 -+
41.2868 -+/*====================================================================*/
41.2869 -+/* */
41.2870 -+/* Name - ffi_closure_helper_SYSV. */
41.2871 -+/* */
41.2872 -+/* Function - Call a FFI closure target function. */
41.2873 -+/* */
41.2874 -+/*====================================================================*/
41.2875 -+
41.2876 -+void
41.2877 -+ffi_closure_helper_SYSV (ffi_closure *closure,
41.2878 -+ unsigned long *p_gpr,
41.2879 -+ unsigned long long *p_fpr,
41.2880 -+ unsigned long *p_ov)
41.2881 -+{
41.2882 -+ unsigned long long ret_buffer;
41.2883 -+
41.2884 -+ void *rvalue = &ret_buffer;
41.2885 -+ void **avalue;
41.2886 -+ void **p_arg;
41.2887 -+
41.2888 -+ int n_gpr = 0;
41.2889 -+ int n_fpr = 0;
41.2890 -+ int n_ov = 0;
41.2891 -+
41.2892 -+ ffi_type **ptr;
41.2893 -+ int i;
41.2894 -+
41.2895 -+ /* Allocate buffer for argument list pointers. */
41.2896 -+
41.2897 -+ p_arg = avalue = alloca (closure->cif->nargs * sizeof (void *));
41.2898 -+
41.2899 -+ /* If we returning a structure, pass the structure address
41.2900 -+ directly to the target function. Otherwise, have the target
41.2901 -+ function store the return value to the GPR save area. */
41.2902 -+
41.2903 -+ if (closure->cif->flags == FFI390_RET_STRUCT)
41.2904 -+ rvalue = (void *) p_gpr[n_gpr++];
41.2905 -+
41.2906 -+ /* Now for the arguments. */
41.2907 -+
41.2908 -+ for (ptr = closure->cif->arg_types, i = closure->cif->nargs;
41.2909 -+ i > 0;
41.2910 -+ i--, p_arg++, ptr++)
41.2911 -+ {
41.2912 -+ int deref_struct_pointer = 0;
41.2913 -+ int type = (*ptr)->type;
41.2914 -+
41.2915 -+ /* Check how a structure type is passed. */
41.2916 -+ if (type == FFI_TYPE_STRUCT)
41.2917 -+ {
41.2918 -+ type = ffi_check_struct_type (*ptr);
41.2919 -+
41.2920 -+ /* If we pass the struct via pointer, remember to
41.2921 -+ retrieve the pointer later. */
41.2922 -+ if (type == FFI_TYPE_POINTER)
41.2923 -+ deref_struct_pointer = 1;
41.2924 -+ }
41.2925 -+
41.2926 -+ /* Pointers are passed like UINTs of the same size. */
41.2927 -+ if (type == FFI_TYPE_POINTER)
41.2928 -+#ifdef __s390x__
41.2929 -+ type = FFI_TYPE_UINT64;
41.2930 -+#else
41.2931 -+ type = FFI_TYPE_UINT32;
41.2932 -+#endif
41.2933 -+
41.2934 -+ /* Now handle all primitive int/float data types. */
41.2935 -+ switch (type)
41.2936 -+ {
41.2937 -+ case FFI_TYPE_DOUBLE:
41.2938 -+ if (n_fpr < MAX_FPRARGS)
41.2939 -+ *p_arg = &p_fpr[n_fpr++];
41.2940 -+ else
41.2941 -+ *p_arg = &p_ov[n_ov],
41.2942 -+ n_ov += sizeof (double) / sizeof (long);
41.2943 -+ break;
41.2944 -+
41.2945 -+ case FFI_TYPE_FLOAT:
41.2946 -+ if (n_fpr < MAX_FPRARGS)
41.2947 -+ *p_arg = &p_fpr[n_fpr++];
41.2948 -+ else
41.2949 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
41.2950 -+ break;
41.2951 -+
41.2952 -+ case FFI_TYPE_UINT64:
41.2953 -+ case FFI_TYPE_SINT64:
41.2954 -+#ifdef __s390x__
41.2955 -+ if (n_gpr < MAX_GPRARGS)
41.2956 -+ *p_arg = &p_gpr[n_gpr++];
41.2957 -+ else
41.2958 -+ *p_arg = &p_ov[n_ov++];
41.2959 -+#else
41.2960 -+ if (n_gpr == MAX_GPRARGS-1)
41.2961 -+ n_gpr = MAX_GPRARGS;
41.2962 -+ if (n_gpr < MAX_GPRARGS)
41.2963 -+ *p_arg = &p_gpr[n_gpr], n_gpr += 2;
41.2964 -+ else
41.2965 -+ *p_arg = &p_ov[n_ov], n_ov += 2;
41.2966 -+#endif
41.2967 -+ break;
41.2968 -+
41.2969 -+ case FFI_TYPE_INT:
41.2970 -+ case FFI_TYPE_UINT32:
41.2971 -+ case FFI_TYPE_SINT32:
41.2972 -+ if (n_gpr < MAX_GPRARGS)
41.2973 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 4;
41.2974 -+ else
41.2975 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
41.2976 -+ break;
41.2977 -+
41.2978 -+ case FFI_TYPE_UINT16:
41.2979 -+ case FFI_TYPE_SINT16:
41.2980 -+ if (n_gpr < MAX_GPRARGS)
41.2981 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 2;
41.2982 -+ else
41.2983 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 2;
41.2984 -+ break;
41.2985 -+
41.2986 -+ case FFI_TYPE_UINT8:
41.2987 -+ case FFI_TYPE_SINT8:
41.2988 -+ if (n_gpr < MAX_GPRARGS)
41.2989 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 1;
41.2990 -+ else
41.2991 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 1;
41.2992 -+ break;
41.2993 -+
41.2994 -+ default:
41.2995 -+ FFI_ASSERT (0);
41.2996 -+ break;
41.2997 -+ }
41.2998 -+
41.2999 -+ /* If this is a struct passed via pointer, we need to
41.3000 -+ actually retrieve that pointer. */
41.3001 -+ if (deref_struct_pointer)
41.3002 -+ *p_arg = *(void **)*p_arg;
41.3003 -+ }
41.3004 -+
41.3005 -+
41.3006 -+ /* Call the target function. */
41.3007 -+ (closure->fun) (closure->cif, rvalue, avalue, closure->user_data);
41.3008 -+
41.3009 -+ /* Convert the return value. */
41.3010 -+ switch (closure->cif->rtype->type)
41.3011 -+ {
41.3012 -+ /* Void is easy, and so is struct. */
41.3013 -+ case FFI_TYPE_VOID:
41.3014 -+ case FFI_TYPE_STRUCT:
41.3015 -+ break;
41.3016 -+
41.3017 -+ /* Floating point values are returned in fpr 0. */
41.3018 -+ case FFI_TYPE_FLOAT:
41.3019 -+ p_fpr[0] = (long long) *(unsigned int *) rvalue << 32;
41.3020 -+ break;
41.3021 -+
41.3022 -+ case FFI_TYPE_DOUBLE:
41.3023 -+ p_fpr[0] = *(unsigned long long *) rvalue;
41.3024 -+ break;
41.3025 -+
41.3026 -+ /* Integer values are returned in gpr 2 (and gpr 3
41.3027 -+ for 64-bit values on 31-bit machines). */
41.3028 -+ case FFI_TYPE_UINT64:
41.3029 -+ case FFI_TYPE_SINT64:
41.3030 -+#ifdef __s390x__
41.3031 -+ p_gpr[0] = *(unsigned long *) rvalue;
41.3032 -+#else
41.3033 -+ p_gpr[0] = ((unsigned long *) rvalue)[0],
41.3034 -+ p_gpr[1] = ((unsigned long *) rvalue)[1];
41.3035 -+#endif
41.3036 -+ break;
41.3037 -+
41.3038 -+ case FFI_TYPE_POINTER:
41.3039 -+ case FFI_TYPE_UINT32:
41.3040 -+ case FFI_TYPE_UINT16:
41.3041 -+ case FFI_TYPE_UINT8:
41.3042 -+ p_gpr[0] = *(unsigned long *) rvalue;
41.3043 -+ break;
41.3044 -+
41.3045 -+ case FFI_TYPE_INT:
41.3046 -+ case FFI_TYPE_SINT32:
41.3047 -+ case FFI_TYPE_SINT16:
41.3048 -+ case FFI_TYPE_SINT8:
41.3049 -+ p_gpr[0] = *(signed long *) rvalue;
41.3050 -+ break;
41.3051 -+
41.3052 -+ default:
41.3053 -+ FFI_ASSERT (0);
41.3054 -+ break;
41.3055 -+ }
41.3056 -+}
41.3057 -+
41.3058 -+/*======================== End of Routine ============================*/
41.3059 -+
41.3060 -+/*====================================================================*/
41.3061 -+/* */
41.3062 -+/* Name - ffi_prep_closure. */
41.3063 -+/* */
41.3064 -+/* Function - Prepare a FFI closure. */
41.3065 -+/* */
41.3066 -+/*====================================================================*/
41.3067 -+
41.3068 -+ffi_status
41.3069 -+ffi_prep_closure (ffi_closure *closure,
41.3070 -+ ffi_cif *cif,
41.3071 -+ void (*fun) (ffi_cif *, void *, void **, void *),
41.3072 -+ void *user_data)
41.3073 -+{
41.3074 -+ FFI_ASSERT (cif->abi == FFI_SYSV);
41.3075 -+
41.3076 -+#ifndef __s390x__
41.3077 -+ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
41.3078 -+ *(short *)&closure->tramp [2] = 0x9801; /* lm %r0,%r1,6(%r1) */
41.3079 -+ *(short *)&closure->tramp [4] = 0x1006;
41.3080 -+ *(short *)&closure->tramp [6] = 0x07f1; /* br %r1 */
41.3081 -+ *(long *)&closure->tramp [8] = (long)closure;
41.3082 -+ *(long *)&closure->tramp[12] = (long)&ffi_closure_SYSV;
41.3083 -+#else
41.3084 -+ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
41.3085 -+ *(short *)&closure->tramp [2] = 0xeb01; /* lmg %r0,%r1,14(%r1) */
41.3086 -+ *(short *)&closure->tramp [4] = 0x100e;
41.3087 -+ *(short *)&closure->tramp [6] = 0x0004;
41.3088 -+ *(short *)&closure->tramp [8] = 0x07f1; /* br %r1 */
41.3089 -+ *(long *)&closure->tramp[16] = (long)closure;
41.3090 -+ *(long *)&closure->tramp[24] = (long)&ffi_closure_SYSV;
41.3091 -+#endif
41.3092 -+
41.3093 -+ closure->cif = cif;
41.3094 -+ closure->user_data = user_data;
41.3095 -+ closure->fun = fun;
41.3096 -+
41.3097 -+ return FFI_OK;
41.3098 -+}
41.3099 -+
41.3100 -+/*======================== End of Routine ============================*/
41.3101 -+
41.3102 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/sysv.S gcc/libffi/src/s390/sysv.S
41.3103 ---- gcc-3.2.2.orig/libffi/src/s390/sysv.S Thu Jan 1 09:00:00 1970
41.3104 -+++ gcc/libffi/src/s390/sysv.S Thu Nov 28 01:44:35 2002
41.3105 -@@ -0,0 +1,425 @@
41.3106 -+/* -----------------------------------------------------------------------
41.3107 -+ sysv.S - Copyright (c) 2000 Software AG
41.3108 -+
41.3109 -+ S390 Foreign Function Interface
41.3110 -+
41.3111 -+ Permission is hereby granted, free of charge, to any person obtaining
41.3112 -+ a copy of this software and associated documentation files (the
41.3113 -+ ``Software''), to deal in the Software without restriction, including
41.3114 -+ without limitation the rights to use, copy, modify, merge, publish,
41.3115 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.3116 -+ permit persons to whom the Software is furnished to do so, subject to
41.3117 -+ the following conditions:
41.3118 -+
41.3119 -+ The above copyright notice and this permission notice shall be included
41.3120 -+ in all copies or substantial portions of the Software.
41.3121 -+
41.3122 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.3123 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.3124 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.3125 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.3126 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.3127 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.3128 -+ OTHER DEALINGS IN THE SOFTWARE.
41.3129 -+ ----------------------------------------------------------------------- */
41.3130 -+
41.3131 -+#ifndef __s390x__
41.3132 -+
41.3133 -+.text
41.3134 -+
41.3135 -+ # r2: cif->bytes
41.3136 -+ # r3: &ecif
41.3137 -+ # r4: ffi_prep_args
41.3138 -+ # r5: ret_type
41.3139 -+ # r6: ecif.rvalue
41.3140 -+ # ov: fn
41.3141 -+
41.3142 -+ # This assumes we are using gas.
41.3143 -+ .globl ffi_call_SYSV
41.3144 -+ .type ffi_call_SYSV,%function
41.3145 -+ffi_call_SYSV:
41.3146 -+.LFB1:
41.3147 -+ stm %r6,%r15,24(%r15) # Save registers
41.3148 -+.LCFI0:
41.3149 -+ basr %r13,0 # Set up base register
41.3150 -+.Lbase:
41.3151 -+ lr %r11,%r15 # Set up frame pointer
41.3152 -+.LCFI1:
41.3153 -+ sr %r15,%r2
41.3154 -+ ahi %r15,-96-48 # Allocate stack
41.3155 -+ lr %r8,%r6 # Save ecif.rvalue
41.3156 -+ sr %r9,%r9
41.3157 -+ ic %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
41.3158 -+ l %r7,96(%r11) # Load function address
41.3159 -+ st %r11,0(%r15) # Set up back chain
41.3160 -+ ahi %r11,-48 # Register save area
41.3161 -+.LCFI2:
41.3162 -+
41.3163 -+ la %r2,96(%r15) # Save area
41.3164 -+ # r3 already holds &ecif
41.3165 -+ basr %r14,%r4 # Call ffi_prep_args
41.3166 -+
41.3167 -+ lm %r2,%r6,0(%r11) # Load arguments
41.3168 -+ ld %f0,32(%r11)
41.3169 -+ ld %f2,40(%r11)
41.3170 -+ la %r14,0(%r13,%r9) # Set return address
41.3171 -+ br %r7 # ... and call function
41.3172 -+
41.3173 -+.LretNone: # Return void
41.3174 -+ l %r4,48+56(%r11)
41.3175 -+ lm %r6,%r15,48+24(%r11)
41.3176 -+ br %r4
41.3177 -+
41.3178 -+.LretFloat:
41.3179 -+ l %r4,48+56(%r11)
41.3180 -+ ste %f0,0(%r8) # Return float
41.3181 -+ lm %r6,%r15,48+24(%r11)
41.3182 -+ br %r4
41.3183 -+
41.3184 -+.LretDouble:
41.3185 -+ l %r4,48+56(%r11)
41.3186 -+ std %f0,0(%r8) # Return double
41.3187 -+ lm %r6,%r15,48+24(%r11)
41.3188 -+ br %r4
41.3189 -+
41.3190 -+.LretInt32:
41.3191 -+ l %r4,48+56(%r11)
41.3192 -+ st %r2,0(%r8) # Return int
41.3193 -+ lm %r6,%r15,48+24(%r11)
41.3194 -+ br %r4
41.3195 -+
41.3196 -+.LretInt64:
41.3197 -+ l %r4,48+56(%r11)
41.3198 -+ stm %r2,%r3,0(%r8) # Return long long
41.3199 -+ lm %r6,%r15,48+24(%r11)
41.3200 -+ br %r4
41.3201 -+
41.3202 -+.Ltable:
41.3203 -+ .byte .LretNone-.Lbase # FFI390_RET_VOID
41.3204 -+ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
41.3205 -+ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
41.3206 -+ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
41.3207 -+ .byte .LretInt32-.Lbase # FFI390_RET_INT32
41.3208 -+ .byte .LretInt64-.Lbase # FFI390_RET_INT64
41.3209 -+
41.3210 -+.LFE1:
41.3211 -+.ffi_call_SYSV_end:
41.3212 -+ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
41.3213 -+
41.3214 -+
41.3215 -+ .globl ffi_closure_SYSV
41.3216 -+ .type ffi_closure_SYSV,%function
41.3217 -+ffi_closure_SYSV:
41.3218 -+.LFB2:
41.3219 -+ stm %r12,%r15,48(%r15) # Save registers
41.3220 -+.LCFI10:
41.3221 -+ basr %r13,0 # Set up base register
41.3222 -+.Lcbase:
41.3223 -+ stm %r2,%r6,8(%r15) # Save arguments
41.3224 -+ std %f0,64(%r15)
41.3225 -+ std %f2,72(%r15)
41.3226 -+ lr %r1,%r15 # Set up stack frame
41.3227 -+ ahi %r15,-96
41.3228 -+.LCFI11:
41.3229 -+ l %r12,.Lchelper-.Lcbase(%r13) # Get helper function
41.3230 -+ lr %r2,%r0 # Closure
41.3231 -+ la %r3,8(%r1) # GPRs
41.3232 -+ la %r4,64(%r1) # FPRs
41.3233 -+ la %r5,96(%r1) # Overflow
41.3234 -+ st %r1,0(%r15) # Set up back chain
41.3235 -+
41.3236 -+ bas %r14,0(%r12,%r13) # Call helper
41.3237 -+
41.3238 -+ l %r4,96+56(%r15)
41.3239 -+ ld %f0,96+64(%r15) # Load return registers
41.3240 -+ lm %r2,%r3,96+8(%r15)
41.3241 -+ lm %r12,%r15,96+48(%r15)
41.3242 -+ br %r4
41.3243 -+
41.3244 -+ .align 4
41.3245 -+.Lchelper:
41.3246 -+ .long ffi_closure_helper_SYSV-.Lcbase
41.3247 -+
41.3248 -+.LFE2:
41.3249 -+
41.3250 -+.ffi_closure_SYSV_end:
41.3251 -+ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
41.3252 -+
41.3253 -+
41.3254 -+ .section .eh_frame,"a",@progbits
41.3255 -+.Lframe1:
41.3256 -+ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
41.3257 -+.LSCIE1:
41.3258 -+ .4byte 0x0 # CIE Identifier Tag
41.3259 -+ .byte 0x1 # CIE Version
41.3260 -+ .ascii "zR\0" # CIE Augmentation
41.3261 -+ .uleb128 0x1 # CIE Code Alignment Factor
41.3262 -+ .sleb128 -4 # CIE Data Alignment Factor
41.3263 -+ .byte 0xe # CIE RA Column
41.3264 -+ .uleb128 0x1 # Augmentation size
41.3265 -+ .byte 0x1b # FDE Encoding (pcrel sdata4)
41.3266 -+ .byte 0xc # DW_CFA_def_cfa
41.3267 -+ .uleb128 0xf
41.3268 -+ .uleb128 0x60
41.3269 -+ .align 4
41.3270 -+.LECIE1:
41.3271 -+.LSFDE1:
41.3272 -+ .4byte .LEFDE1-.LASFDE1 # FDE Length
41.3273 -+.LASFDE1:
41.3274 -+ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
41.3275 -+ .4byte .LFB1-. # FDE initial location
41.3276 -+ .4byte .LFE1-.LFB1 # FDE address range
41.3277 -+ .uleb128 0x0 # Augmentation size
41.3278 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3279 -+ .4byte .LCFI0-.LFB1
41.3280 -+ .byte 0x8f # DW_CFA_offset, column 0xf
41.3281 -+ .uleb128 0x9
41.3282 -+ .byte 0x8e # DW_CFA_offset, column 0xe
41.3283 -+ .uleb128 0xa
41.3284 -+ .byte 0x8d # DW_CFA_offset, column 0xd
41.3285 -+ .uleb128 0xb
41.3286 -+ .byte 0x8c # DW_CFA_offset, column 0xc
41.3287 -+ .uleb128 0xc
41.3288 -+ .byte 0x8b # DW_CFA_offset, column 0xb
41.3289 -+ .uleb128 0xd
41.3290 -+ .byte 0x8a # DW_CFA_offset, column 0xa
41.3291 -+ .uleb128 0xe
41.3292 -+ .byte 0x89 # DW_CFA_offset, column 0x9
41.3293 -+ .uleb128 0xf
41.3294 -+ .byte 0x88 # DW_CFA_offset, column 0x8
41.3295 -+ .uleb128 0x10
41.3296 -+ .byte 0x87 # DW_CFA_offset, column 0x7
41.3297 -+ .uleb128 0x11
41.3298 -+ .byte 0x86 # DW_CFA_offset, column 0x6
41.3299 -+ .uleb128 0x12
41.3300 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3301 -+ .4byte .LCFI1-.LCFI0
41.3302 -+ .byte 0xd # DW_CFA_def_cfa_register
41.3303 -+ .uleb128 0xb
41.3304 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3305 -+ .4byte .LCFI2-.LCFI1
41.3306 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.3307 -+ .uleb128 0x90
41.3308 -+ .align 4
41.3309 -+.LEFDE1:
41.3310 -+.LSFDE2:
41.3311 -+ .4byte .LEFDE2-.LASFDE2 # FDE Length
41.3312 -+.LASFDE2:
41.3313 -+ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
41.3314 -+ .4byte .LFB2-. # FDE initial location
41.3315 -+ .4byte .LFE2-.LFB2 # FDE address range
41.3316 -+ .uleb128 0x0 # Augmentation size
41.3317 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3318 -+ .4byte .LCFI10-.LFB2
41.3319 -+ .byte 0x8f # DW_CFA_offset, column 0xf
41.3320 -+ .uleb128 0x9
41.3321 -+ .byte 0x8e # DW_CFA_offset, column 0xe
41.3322 -+ .uleb128 0xa
41.3323 -+ .byte 0x8d # DW_CFA_offset, column 0xd
41.3324 -+ .uleb128 0xb
41.3325 -+ .byte 0x8c # DW_CFA_offset, column 0xc
41.3326 -+ .uleb128 0xc
41.3327 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3328 -+ .4byte .LCFI11-.LCFI10
41.3329 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.3330 -+ .uleb128 0xc0
41.3331 -+ .align 4
41.3332 -+.LEFDE2:
41.3333 -+
41.3334 -+#else
41.3335 -+
41.3336 -+.text
41.3337 -+
41.3338 -+ # r2: cif->bytes
41.3339 -+ # r3: &ecif
41.3340 -+ # r4: ffi_prep_args
41.3341 -+ # r5: ret_type
41.3342 -+ # r6: ecif.rvalue
41.3343 -+ # ov: fn
41.3344 -+
41.3345 -+ # This assumes we are using gas.
41.3346 -+ .globl ffi_call_SYSV
41.3347 -+ .type ffi_call_SYSV,%function
41.3348 -+ffi_call_SYSV:
41.3349 -+.LFB1:
41.3350 -+ stmg %r6,%r15,48(%r15) # Save registers
41.3351 -+.LCFI0:
41.3352 -+ larl %r13,.Lbase # Set up base register
41.3353 -+ lgr %r11,%r15 # Set up frame pointer
41.3354 -+.LCFI1:
41.3355 -+ sgr %r15,%r2
41.3356 -+ aghi %r15,-160-80 # Allocate stack
41.3357 -+ lgr %r8,%r6 # Save ecif.rvalue
41.3358 -+ llgc %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
41.3359 -+ lg %r7,160(%r11) # Load function address
41.3360 -+ stg %r11,0(%r15) # Set up back chain
41.3361 -+ aghi %r11,-80 # Register save area
41.3362 -+.LCFI2:
41.3363 -+
41.3364 -+ la %r2,160(%r15) # Save area
41.3365 -+ # r3 already holds &ecif
41.3366 -+ basr %r14,%r4 # Call ffi_prep_args
41.3367 -+
41.3368 -+ lmg %r2,%r6,0(%r11) # Load arguments
41.3369 -+ ld %f0,48(%r11)
41.3370 -+ ld %f2,56(%r11)
41.3371 -+ ld %f4,64(%r11)
41.3372 -+ ld %f6,72(%r11)
41.3373 -+ la %r14,0(%r13,%r9) # Set return address
41.3374 -+ br %r7 # ... and call function
41.3375 -+
41.3376 -+.Lbase:
41.3377 -+.LretNone: # Return void
41.3378 -+ lg %r4,80+112(%r11)
41.3379 -+ lmg %r6,%r15,80+48(%r11)
41.3380 -+ br %r4
41.3381 -+
41.3382 -+.LretFloat:
41.3383 -+ lg %r4,80+112(%r11)
41.3384 -+ ste %f0,0(%r8) # Return float
41.3385 -+ lmg %r6,%r15,80+48(%r11)
41.3386 -+ br %r4
41.3387 -+
41.3388 -+.LretDouble:
41.3389 -+ lg %r4,80+112(%r11)
41.3390 -+ std %f0,0(%r8) # Return double
41.3391 -+ lmg %r6,%r15,80+48(%r11)
41.3392 -+ br %r4
41.3393 -+
41.3394 -+.LretInt32:
41.3395 -+ lg %r4,80+112(%r11)
41.3396 -+ st %r2,0(%r8) # Return int
41.3397 -+ lmg %r6,%r15,80+48(%r11)
41.3398 -+ br %r4
41.3399 -+
41.3400 -+.LretInt64:
41.3401 -+ lg %r4,80+112(%r11)
41.3402 -+ stg %r2,0(%r8) # Return long
41.3403 -+ lmg %r6,%r15,80+48(%r11)
41.3404 -+ br %r4
41.3405 -+
41.3406 -+.Ltable:
41.3407 -+ .byte .LretNone-.Lbase # FFI390_RET_VOID
41.3408 -+ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
41.3409 -+ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
41.3410 -+ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
41.3411 -+ .byte .LretInt32-.Lbase # FFI390_RET_INT32
41.3412 -+ .byte .LretInt64-.Lbase # FFI390_RET_INT64
41.3413 -+
41.3414 -+.LFE1:
41.3415 -+.ffi_call_SYSV_end:
41.3416 -+ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
41.3417 -+
41.3418 -+
41.3419 -+ .globl ffi_closure_SYSV
41.3420 -+ .type ffi_closure_SYSV,%function
41.3421 -+ffi_closure_SYSV:
41.3422 -+.LFB2:
41.3423 -+ stmg %r14,%r15,112(%r15) # Save registers
41.3424 -+.LCFI10:
41.3425 -+ stmg %r2,%r6,16(%r15) # Save arguments
41.3426 -+ std %f0,128(%r15)
41.3427 -+ std %f2,136(%r15)
41.3428 -+ std %f4,144(%r15)
41.3429 -+ std %f6,152(%r15)
41.3430 -+ lgr %r1,%r15 # Set up stack frame
41.3431 -+ aghi %r15,-160
41.3432 -+.LCFI11:
41.3433 -+ lgr %r2,%r0 # Closure
41.3434 -+ la %r3,16(%r1) # GPRs
41.3435 -+ la %r4,128(%r1) # FPRs
41.3436 -+ la %r5,160(%r1) # Overflow
41.3437 -+ stg %r1,0(%r15) # Set up back chain
41.3438 -+
41.3439 -+ brasl %r14,ffi_closure_helper_SYSV # Call helper
41.3440 -+
41.3441 -+ lg %r14,160+112(%r15)
41.3442 -+ ld %f0,160+128(%r15) # Load return registers
41.3443 -+ lg %r2,160+16(%r15)
41.3444 -+ la %r15,160(%r15)
41.3445 -+ br %r14
41.3446 -+.LFE2:
41.3447 -+
41.3448 -+.ffi_closure_SYSV_end:
41.3449 -+ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
41.3450 -+
41.3451 -+
41.3452 -+
41.3453 -+ .section .eh_frame,"a",@progbits
41.3454 -+.Lframe1:
41.3455 -+ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
41.3456 -+.LSCIE1:
41.3457 -+ .4byte 0x0 # CIE Identifier Tag
41.3458 -+ .byte 0x1 # CIE Version
41.3459 -+ .ascii "zR\0" # CIE Augmentation
41.3460 -+ .uleb128 0x1 # CIE Code Alignment Factor
41.3461 -+ .sleb128 -8 # CIE Data Alignment Factor
41.3462 -+ .byte 0xe # CIE RA Column
41.3463 -+ .uleb128 0x1 # Augmentation size
41.3464 -+ .byte 0x1b # FDE Encoding (pcrel sdata4)
41.3465 -+ .byte 0xc # DW_CFA_def_cfa
41.3466 -+ .uleb128 0xf
41.3467 -+ .uleb128 0xa0
41.3468 -+ .align 8
41.3469 -+.LECIE1:
41.3470 -+.LSFDE1:
41.3471 -+ .4byte .LEFDE1-.LASFDE1 # FDE Length
41.3472 -+.LASFDE1:
41.3473 -+ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
41.3474 -+ .4byte .LFB1-. # FDE initial location
41.3475 -+ .4byte .LFE1-.LFB1 # FDE address range
41.3476 -+ .uleb128 0x0 # Augmentation size
41.3477 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3478 -+ .4byte .LCFI0-.LFB1
41.3479 -+ .byte 0x8f # DW_CFA_offset, column 0xf
41.3480 -+ .uleb128 0x5
41.3481 -+ .byte 0x8e # DW_CFA_offset, column 0xe
41.3482 -+ .uleb128 0x6
41.3483 -+ .byte 0x8d # DW_CFA_offset, column 0xd
41.3484 -+ .uleb128 0x7
41.3485 -+ .byte 0x8c # DW_CFA_offset, column 0xc
41.3486 -+ .uleb128 0x8
41.3487 -+ .byte 0x8b # DW_CFA_offset, column 0xb
41.3488 -+ .uleb128 0x9
41.3489 -+ .byte 0x8a # DW_CFA_offset, column 0xa
41.3490 -+ .uleb128 0xa
41.3491 -+ .byte 0x89 # DW_CFA_offset, column 0x9
41.3492 -+ .uleb128 0xb
41.3493 -+ .byte 0x88 # DW_CFA_offset, column 0x8
41.3494 -+ .uleb128 0xc
41.3495 -+ .byte 0x87 # DW_CFA_offset, column 0x7
41.3496 -+ .uleb128 0xd
41.3497 -+ .byte 0x86 # DW_CFA_offset, column 0x6
41.3498 -+ .uleb128 0xe
41.3499 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3500 -+ .4byte .LCFI1-.LCFI0
41.3501 -+ .byte 0xd # DW_CFA_def_cfa_register
41.3502 -+ .uleb128 0xb
41.3503 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3504 -+ .4byte .LCFI2-.LCFI1
41.3505 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.3506 -+ .uleb128 0xf0
41.3507 -+ .align 8
41.3508 -+.LEFDE1:
41.3509 -+.LSFDE2:
41.3510 -+ .4byte .LEFDE2-.LASFDE2 # FDE Length
41.3511 -+.LASFDE2:
41.3512 -+ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
41.3513 -+ .4byte .LFB2-. # FDE initial location
41.3514 -+ .4byte .LFE2-.LFB2 # FDE address range
41.3515 -+ .uleb128 0x0 # Augmentation size
41.3516 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3517 -+ .4byte .LCFI10-.LFB2
41.3518 -+ .byte 0x8f # DW_CFA_offset, column 0xf
41.3519 -+ .uleb128 0x5
41.3520 -+ .byte 0x8e # DW_CFA_offset, column 0xe
41.3521 -+ .uleb128 0x6
41.3522 -+ .byte 0x4 # DW_CFA_advance_loc4
41.3523 -+ .4byte .LCFI11-.LCFI10
41.3524 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.3525 -+ .uleb128 0x140
41.3526 -+ .align 8
41.3527 -+.LEFDE2:
41.3528 -+
41.3529 -+#endif
41.3530 -+
41.3531 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/ffi.c gcc/libffi/src/sh/ffi.c
41.3532 ---- gcc-3.2.2.orig/libffi/src/sh/ffi.c Thu Jan 1 09:00:00 1970
41.3533 -+++ gcc/libffi/src/sh/ffi.c Fri Jul 19 10:08:43 2002
41.3534 -@@ -0,0 +1,722 @@
41.3535 -+/* -----------------------------------------------------------------------
41.3536 -+ ffi.c - Copyright (c) 2002 Kaz Kojima
41.3537 -+
41.3538 -+ SuperH Foreign Function Interface
41.3539 -+
41.3540 -+ Permission is hereby granted, free of charge, to any person obtaining
41.3541 -+ a copy of this software and associated documentation files (the
41.3542 -+ ``Software''), to deal in the Software without restriction, including
41.3543 -+ without limitation the rights to use, copy, modify, merge, publish,
41.3544 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.3545 -+ permit persons to whom the Software is furnished to do so, subject to
41.3546 -+ the following conditions:
41.3547 -+
41.3548 -+ The above copyright notice and this permission notice shall be included
41.3549 -+ in all copies or substantial portions of the Software.
41.3550 -+
41.3551 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.3552 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.3553 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.3554 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.3555 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.3556 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.3557 -+ OTHER DEALINGS IN THE SOFTWARE.
41.3558 -+ ----------------------------------------------------------------------- */
41.3559 -+
41.3560 -+#include <ffi.h>
41.3561 -+#include <ffi_common.h>
41.3562 -+
41.3563 -+#include <stdlib.h>
41.3564 -+
41.3565 -+#define NGREGARG 4
41.3566 -+#if defined(__SH4__)
41.3567 -+#define NFREGARG 8
41.3568 -+#endif
41.3569 -+
41.3570 -+#if defined(__HITACHI__)
41.3571 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
41.3572 -+#else
41.3573 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
41.3574 -+#endif
41.3575 -+
41.3576 -+/* If the structure has essentialy an unique element, return its type. */
41.3577 -+static int
41.3578 -+simple_type (ffi_type *arg)
41.3579 -+{
41.3580 -+ if (arg->type != FFI_TYPE_STRUCT)
41.3581 -+ return arg->type;
41.3582 -+ else if (arg->elements[1])
41.3583 -+ return FFI_TYPE_STRUCT;
41.3584 -+
41.3585 -+ return simple_type (arg->elements[0]);
41.3586 -+}
41.3587 -+
41.3588 -+static int
41.3589 -+return_type (ffi_type *arg)
41.3590 -+{
41.3591 -+ unsigned short type;
41.3592 -+
41.3593 -+ if (arg->type != FFI_TYPE_STRUCT)
41.3594 -+ return arg->type;
41.3595 -+
41.3596 -+ type = simple_type (arg->elements[0]);
41.3597 -+ if (! arg->elements[1])
41.3598 -+ {
41.3599 -+ switch (type)
41.3600 -+ {
41.3601 -+ case FFI_TYPE_SINT8:
41.3602 -+ case FFI_TYPE_UINT8:
41.3603 -+ case FFI_TYPE_SINT16:
41.3604 -+ case FFI_TYPE_UINT16:
41.3605 -+ case FFI_TYPE_SINT32:
41.3606 -+ case FFI_TYPE_UINT32:
41.3607 -+ return FFI_TYPE_INT;
41.3608 -+
41.3609 -+ default:
41.3610 -+ return type;
41.3611 -+ }
41.3612 -+ }
41.3613 -+
41.3614 -+ /* gcc uses r0/r1 pair for some kind of structures. */
41.3615 -+ if (arg->size <= 2 * sizeof (int))
41.3616 -+ {
41.3617 -+ int i = 0;
41.3618 -+ ffi_type *e;
41.3619 -+
41.3620 -+ while ((e = arg->elements[i++]))
41.3621 -+ {
41.3622 -+ type = simple_type (e);
41.3623 -+ switch (type)
41.3624 -+ {
41.3625 -+ case FFI_TYPE_SINT32:
41.3626 -+ case FFI_TYPE_UINT32:
41.3627 -+ case FFI_TYPE_INT:
41.3628 -+ case FFI_TYPE_FLOAT:
41.3629 -+ return FFI_TYPE_UINT64;
41.3630 -+
41.3631 -+ default:
41.3632 -+ break;
41.3633 -+ }
41.3634 -+ }
41.3635 -+ }
41.3636 -+
41.3637 -+ return FFI_TYPE_STRUCT;
41.3638 -+}
41.3639 -+
41.3640 -+/* ffi_prep_args is called by the assembly routine once stack space
41.3641 -+ has been allocated for the function's arguments */
41.3642 -+
41.3643 -+/*@-exportheader@*/
41.3644 -+void ffi_prep_args(char *stack, extended_cif *ecif)
41.3645 -+/*@=exportheader@*/
41.3646 -+{
41.3647 -+ register unsigned int i;
41.3648 -+ register int tmp;
41.3649 -+ register unsigned int avn;
41.3650 -+ register void **p_argv;
41.3651 -+ register char *argp;
41.3652 -+ register ffi_type **p_arg;
41.3653 -+ int greg, ireg;
41.3654 -+#if defined(__SH4__)
41.3655 -+ int freg = 0;
41.3656 -+#endif
41.3657 -+
41.3658 -+ tmp = 0;
41.3659 -+ argp = stack;
41.3660 -+
41.3661 -+ if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT)
41.3662 -+ {
41.3663 -+ *(void **) argp = ecif->rvalue;
41.3664 -+ argp += 4;
41.3665 -+ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
41.3666 -+ }
41.3667 -+ else
41.3668 -+ ireg = 0;
41.3669 -+
41.3670 -+ /* Set arguments for registers. */
41.3671 -+ greg = ireg;
41.3672 -+ avn = ecif->cif->nargs;
41.3673 -+ p_argv = ecif->avalue;
41.3674 -+
41.3675 -+ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
41.3676 -+ {
41.3677 -+ size_t z;
41.3678 -+
41.3679 -+ z = (*p_arg)->size;
41.3680 -+ if (z < sizeof(int))
41.3681 -+ {
41.3682 -+ if (greg++ >= NGREGARG)
41.3683 -+ continue;
41.3684 -+
41.3685 -+ z = sizeof(int);
41.3686 -+ switch ((*p_arg)->type)
41.3687 -+ {
41.3688 -+ case FFI_TYPE_SINT8:
41.3689 -+ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
41.3690 -+ break;
41.3691 -+
41.3692 -+ case FFI_TYPE_UINT8:
41.3693 -+ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
41.3694 -+ break;
41.3695 -+
41.3696 -+ case FFI_TYPE_SINT16:
41.3697 -+ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
41.3698 -+ break;
41.3699 -+
41.3700 -+ case FFI_TYPE_UINT16:
41.3701 -+ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
41.3702 -+ break;
41.3703 -+
41.3704 -+ case FFI_TYPE_STRUCT:
41.3705 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
41.3706 -+ break;
41.3707 -+
41.3708 -+ default:
41.3709 -+ FFI_ASSERT(0);
41.3710 -+ }
41.3711 -+ argp += z;
41.3712 -+ }
41.3713 -+ else if (z == sizeof(int))
41.3714 -+ {
41.3715 -+#if defined(__SH4__)
41.3716 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
41.3717 -+ {
41.3718 -+ if (freg++ >= NFREGARG)
41.3719 -+ continue;
41.3720 -+ }
41.3721 -+ else
41.3722 -+#endif
41.3723 -+ {
41.3724 -+ if (greg++ >= NGREGARG)
41.3725 -+ continue;
41.3726 -+ }
41.3727 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
41.3728 -+ argp += z;
41.3729 -+ }
41.3730 -+#if defined(__SH4__)
41.3731 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
41.3732 -+ {
41.3733 -+ if (freg + 1 >= NFREGARG)
41.3734 -+ continue;
41.3735 -+ freg = (freg + 1) & ~1;
41.3736 -+ freg += 2;
41.3737 -+ memcpy (argp, *p_argv, z);
41.3738 -+ argp += z;
41.3739 -+ }
41.3740 -+#endif
41.3741 -+ else
41.3742 -+ {
41.3743 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
41.3744 -+#if defined(__SH4__)
41.3745 -+ if (greg + n - 1 >= NGREGARG)
41.3746 -+ continue;
41.3747 -+ greg += n;
41.3748 -+#else
41.3749 -+ if (greg >= NGREGARG)
41.3750 -+ continue;
41.3751 -+ else if (greg + n - 1 >= NGREGARG)
41.3752 -+ greg = NGREGARG;
41.3753 -+ else
41.3754 -+ greg += n;
41.3755 -+#endif
41.3756 -+ memcpy (argp, *p_argv, z);
41.3757 -+ argp += z;
41.3758 -+ }
41.3759 -+ }
41.3760 -+
41.3761 -+ /* Set arguments on stack. */
41.3762 -+ greg = ireg;
41.3763 -+#if defined(__SH4__)
41.3764 -+ freg = 0;
41.3765 -+#endif
41.3766 -+ p_argv = ecif->avalue;
41.3767 -+
41.3768 -+ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
41.3769 -+ {
41.3770 -+ size_t z;
41.3771 -+
41.3772 -+ z = (*p_arg)->size;
41.3773 -+ if (z < sizeof(int))
41.3774 -+ {
41.3775 -+ if (greg++ < NGREGARG)
41.3776 -+ continue;
41.3777 -+
41.3778 -+ z = sizeof(int);
41.3779 -+ switch ((*p_arg)->type)
41.3780 -+ {
41.3781 -+ case FFI_TYPE_SINT8:
41.3782 -+ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
41.3783 -+ break;
41.3784 -+
41.3785 -+ case FFI_TYPE_UINT8:
41.3786 -+ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
41.3787 -+ break;
41.3788 -+
41.3789 -+ case FFI_TYPE_SINT16:
41.3790 -+ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
41.3791 -+ break;
41.3792 -+
41.3793 -+ case FFI_TYPE_UINT16:
41.3794 -+ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
41.3795 -+ break;
41.3796 -+
41.3797 -+ case FFI_TYPE_STRUCT:
41.3798 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
41.3799 -+ break;
41.3800 -+
41.3801 -+ default:
41.3802 -+ FFI_ASSERT(0);
41.3803 -+ }
41.3804 -+ argp += z;
41.3805 -+ }
41.3806 -+ else if (z == sizeof(int))
41.3807 -+ {
41.3808 -+#if defined(__SH4__)
41.3809 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
41.3810 -+ {
41.3811 -+ if (freg++ < NFREGARG)
41.3812 -+ continue;
41.3813 -+ }
41.3814 -+ else
41.3815 -+#endif
41.3816 -+ {
41.3817 -+ if (greg++ < NGREGARG)
41.3818 -+ continue;
41.3819 -+ }
41.3820 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
41.3821 -+ argp += z;
41.3822 -+ }
41.3823 -+#if defined(__SH4__)
41.3824 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
41.3825 -+ {
41.3826 -+ if (freg + 1 < NFREGARG)
41.3827 -+ {
41.3828 -+ freg = (freg + 1) & ~1;
41.3829 -+ freg += 2;
41.3830 -+ continue;
41.3831 -+ }
41.3832 -+ memcpy (argp, *p_argv, z);
41.3833 -+ argp += z;
41.3834 -+ }
41.3835 -+#endif
41.3836 -+ else
41.3837 -+ {
41.3838 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
41.3839 -+ if (greg + n - 1 < NGREGARG)
41.3840 -+ {
41.3841 -+ greg += n;
41.3842 -+ continue;
41.3843 -+ }
41.3844 -+#if (! defined(__SH4__))
41.3845 -+ else if (greg < NGREGARG)
41.3846 -+ {
41.3847 -+ greg = NGREGARG;
41.3848 -+ continue;
41.3849 -+ }
41.3850 -+#endif
41.3851 -+ memcpy (argp, *p_argv, z);
41.3852 -+ argp += z;
41.3853 -+ }
41.3854 -+ }
41.3855 -+
41.3856 -+ return;
41.3857 -+}
41.3858 -+
41.3859 -+/* Perform machine dependent cif processing */
41.3860 -+ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
41.3861 -+{
41.3862 -+ int i, j;
41.3863 -+ int size, type;
41.3864 -+ int n, m;
41.3865 -+ int greg;
41.3866 -+#if defined(__SH4__)
41.3867 -+ int freg = 0;
41.3868 -+#endif
41.3869 -+
41.3870 -+ cif->flags = 0;
41.3871 -+
41.3872 -+ greg = ((return_type (cif->rtype) == FFI_TYPE_STRUCT) &&
41.3873 -+ STRUCT_VALUE_ADDRESS_WITH_ARG) ? 1 : 0;
41.3874 -+
41.3875 -+#if defined(__SH4__)
41.3876 -+ for (i = j = 0; i < cif->nargs && j < 12; i++)
41.3877 -+ {
41.3878 -+ type = (cif->arg_types)[i]->type;
41.3879 -+ switch (type)
41.3880 -+ {
41.3881 -+ case FFI_TYPE_FLOAT:
41.3882 -+ if (freg >= NFREGARG)
41.3883 -+ continue;
41.3884 -+ freg++;
41.3885 -+ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
41.3886 -+ j++;
41.3887 -+ break;
41.3888 -+
41.3889 -+ case FFI_TYPE_DOUBLE:
41.3890 -+ if ((freg + 1) >= NFREGARG)
41.3891 -+ continue;
41.3892 -+ freg = (freg + 1) & ~1;
41.3893 -+ freg += 2;
41.3894 -+ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
41.3895 -+ j++;
41.3896 -+ break;
41.3897 -+
41.3898 -+ default:
41.3899 -+ size = (cif->arg_types)[i]->size;
41.3900 -+ n = (size + sizeof (int) - 1) / sizeof (int);
41.3901 -+ if (greg + n - 1 >= NGREGARG)
41.3902 -+ continue;
41.3903 -+ greg += n;
41.3904 -+ for (m = 0; m < n; m++)
41.3905 -+ cif->flags += FFI_TYPE_INT << (2 * j++);
41.3906 -+ break;
41.3907 -+ }
41.3908 -+ }
41.3909 -+#else
41.3910 -+ for (i = j = 0; i < cif->nargs && j < 4; i++)
41.3911 -+ {
41.3912 -+ size = (cif->arg_types)[i]->size;
41.3913 -+ n = (size + sizeof (int) - 1) / sizeof (int);
41.3914 -+ if (greg >= NGREGARG)
41.3915 -+ continue;
41.3916 -+ else if (greg + n - 1 >= NGREGARG)
41.3917 -+ greg = NGREGARG;
41.3918 -+ else
41.3919 -+ greg += n;
41.3920 -+ for (m = 0; m < n; m++)
41.3921 -+ cif->flags += FFI_TYPE_INT << (2 * j++);
41.3922 -+ }
41.3923 -+#endif
41.3924 -+
41.3925 -+ /* Set the return type flag */
41.3926 -+ switch (cif->rtype->type)
41.3927 -+ {
41.3928 -+ case FFI_TYPE_STRUCT:
41.3929 -+ cif->flags += (unsigned) (return_type (cif->rtype)) << 24;
41.3930 -+ break;
41.3931 -+
41.3932 -+ case FFI_TYPE_VOID:
41.3933 -+ case FFI_TYPE_FLOAT:
41.3934 -+ case FFI_TYPE_DOUBLE:
41.3935 -+ case FFI_TYPE_SINT64:
41.3936 -+ case FFI_TYPE_UINT64:
41.3937 -+ cif->flags += (unsigned) cif->rtype->type << 24;
41.3938 -+ break;
41.3939 -+
41.3940 -+ default:
41.3941 -+ cif->flags += FFI_TYPE_INT << 24;
41.3942 -+ break;
41.3943 -+ }
41.3944 -+
41.3945 -+ return FFI_OK;
41.3946 -+}
41.3947 -+
41.3948 -+/*@-declundef@*/
41.3949 -+/*@-exportheader@*/
41.3950 -+extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
41.3951 -+ /*@out@*/ extended_cif *,
41.3952 -+ unsigned, unsigned,
41.3953 -+ /*@out@*/ unsigned *,
41.3954 -+ void (*fn)());
41.3955 -+/*@=declundef@*/
41.3956 -+/*@=exportheader@*/
41.3957 -+
41.3958 -+void ffi_call(/*@dependent@*/ ffi_cif *cif,
41.3959 -+ void (*fn)(),
41.3960 -+ /*@out@*/ void *rvalue,
41.3961 -+ /*@dependent@*/ void **avalue)
41.3962 -+{
41.3963 -+ extended_cif ecif;
41.3964 -+
41.3965 -+ ecif.cif = cif;
41.3966 -+ ecif.avalue = avalue;
41.3967 -+
41.3968 -+ /* If the return value is a struct and we don't have a return */
41.3969 -+ /* value address then we need to make one */
41.3970 -+
41.3971 -+ if ((rvalue == NULL) &&
41.3972 -+ (cif->rtype->type == FFI_TYPE_STRUCT))
41.3973 -+ {
41.3974 -+ /*@-sysunrecog@*/
41.3975 -+ ecif.rvalue = alloca(cif->rtype->size);
41.3976 -+ /*@=sysunrecog@*/
41.3977 -+ }
41.3978 -+ else
41.3979 -+ ecif.rvalue = rvalue;
41.3980 -+
41.3981 -+
41.3982 -+ switch (cif->abi)
41.3983 -+ {
41.3984 -+ case FFI_SYSV:
41.3985 -+ /*@-usedef@*/
41.3986 -+ ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
41.3987 -+ cif->flags, ecif.rvalue, fn);
41.3988 -+ /*@=usedef@*/
41.3989 -+ break;
41.3990 -+ default:
41.3991 -+ FFI_ASSERT(0);
41.3992 -+ break;
41.3993 -+ }
41.3994 -+}
41.3995 -+
41.3996 -+extern void ffi_closure_SYSV (void);
41.3997 -+#if defined(__SH4__)
41.3998 -+extern void __ic_invalidate (void *line);
41.3999 -+#endif
41.4000 -+
41.4001 -+ffi_status
41.4002 -+ffi_prep_closure (ffi_closure* closure,
41.4003 -+ ffi_cif* cif,
41.4004 -+ void (*fun)(ffi_cif*, void*, void**, void*),
41.4005 -+ void *user_data)
41.4006 -+{
41.4007 -+ unsigned int *tramp;
41.4008 -+
41.4009 -+ FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
41.4010 -+
41.4011 -+ tramp = (unsigned int *) &closure->tramp[0];
41.4012 -+#ifdef __LITTLE_ENDIAN__
41.4013 -+ tramp[0] = 0xd301d202;
41.4014 -+ tramp[1] = 0x0009422b;
41.4015 -+#else
41.4016 -+ tramp[0] = 0xd202d301;
41.4017 -+ tramp[1] = 0x422b0009;
41.4018 -+#endif
41.4019 -+ *(void **) &tramp[2] = (void *)closure; /* ctx */
41.4020 -+ *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */
41.4021 -+
41.4022 -+ closure->cif = cif;
41.4023 -+ closure->fun = fun;
41.4024 -+ closure->user_data = user_data;
41.4025 -+
41.4026 -+#if defined(__SH4__)
41.4027 -+ /* Flush the icache. */
41.4028 -+ __ic_invalidate(&closure->tramp[0]);
41.4029 -+#endif
41.4030 -+
41.4031 -+ return FFI_OK;
41.4032 -+}
41.4033 -+
41.4034 -+/* Basically the trampoline invokes ffi_closure_SYSV, and on
41.4035 -+ * entry, r3 holds the address of the closure.
41.4036 -+ * After storing the registers that could possibly contain
41.4037 -+ * parameters to be passed into the stack frame and setting
41.4038 -+ * up space for a return value, ffi_closure_SYSV invokes the
41.4039 -+ * following helper function to do most of the work.
41.4040 -+ */
41.4041 -+
41.4042 -+#ifdef __LITTLE_ENDIAN__
41.4043 -+#define OFS_INT8 0
41.4044 -+#define OFS_INT16 2
41.4045 -+#else
41.4046 -+#define OFS_INT8 3
41.4047 -+#define OFS_INT16 2
41.4048 -+#endif
41.4049 -+
41.4050 -+int
41.4051 -+ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
41.4052 -+ unsigned long *pgr, unsigned long *pfr,
41.4053 -+ unsigned long *pst)
41.4054 -+{
41.4055 -+ void **avalue;
41.4056 -+ ffi_type **p_arg;
41.4057 -+ int i, avn;
41.4058 -+ int ireg, greg = 0;
41.4059 -+#if defined(__SH4__)
41.4060 -+ int freg = 0;
41.4061 -+#endif
41.4062 -+ ffi_cif *cif;
41.4063 -+ double temp;
41.4064 -+
41.4065 -+ cif = closure->cif;
41.4066 -+ avalue = alloca(cif->nargs * sizeof(void *));
41.4067 -+
41.4068 -+ /* Copy the caller's structure return value address so that the closure
41.4069 -+ returns the data directly to the caller. */
41.4070 -+ if (cif->rtype->type == FFI_TYPE_STRUCT)
41.4071 -+ {
41.4072 -+ rvalue = *pgr++;
41.4073 -+ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
41.4074 -+ }
41.4075 -+ else
41.4076 -+ ireg = 0;
41.4077 -+
41.4078 -+ cif = closure->cif;
41.4079 -+ greg = ireg;
41.4080 -+ avn = cif->nargs;
41.4081 -+
41.4082 -+ /* Grab the addresses of the arguments from the stack frame. */
41.4083 -+ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
41.4084 -+ {
41.4085 -+ size_t z;
41.4086 -+
41.4087 -+ z = (*p_arg)->size;
41.4088 -+ if (z < sizeof(int))
41.4089 -+ {
41.4090 -+ if (greg++ >= NGREGARG)
41.4091 -+ continue;
41.4092 -+
41.4093 -+ z = sizeof(int);
41.4094 -+ switch ((*p_arg)->type)
41.4095 -+ {
41.4096 -+ case FFI_TYPE_SINT8:
41.4097 -+ case FFI_TYPE_UINT8:
41.4098 -+ avalue[i] = (((char *)pgr) + OFS_INT8);
41.4099 -+ break;
41.4100 -+
41.4101 -+ case FFI_TYPE_SINT16:
41.4102 -+ case FFI_TYPE_UINT16:
41.4103 -+ avalue[i] = (((char *)pgr) + OFS_INT16);
41.4104 -+ break;
41.4105 -+
41.4106 -+ case FFI_TYPE_STRUCT:
41.4107 -+ avalue[i] = pgr;
41.4108 -+ break;
41.4109 -+
41.4110 -+ default:
41.4111 -+ FFI_ASSERT(0);
41.4112 -+ }
41.4113 -+ pgr++;
41.4114 -+ }
41.4115 -+ else if (z == sizeof(int))
41.4116 -+ {
41.4117 -+#if defined(__SH4__)
41.4118 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
41.4119 -+ {
41.4120 -+ if (freg++ >= NFREGARG)
41.4121 -+ continue;
41.4122 -+ avalue[i] = pfr;
41.4123 -+ pfr++;
41.4124 -+ }
41.4125 -+ else
41.4126 -+#endif
41.4127 -+ {
41.4128 -+ if (greg++ >= NGREGARG)
41.4129 -+ continue;
41.4130 -+ avalue[i] = pgr;
41.4131 -+ pgr++;
41.4132 -+ }
41.4133 -+ }
41.4134 -+#if defined(__SH4__)
41.4135 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
41.4136 -+ {
41.4137 -+ if (freg + 1 >= NFREGARG)
41.4138 -+ continue;
41.4139 -+ freg = (freg + 1) & ~1;
41.4140 -+ freg += 2;
41.4141 -+ avalue[i] = pfr;
41.4142 -+ pfr += 2;
41.4143 -+ }
41.4144 -+#endif
41.4145 -+ else
41.4146 -+ {
41.4147 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
41.4148 -+#if defined(__SH4__)
41.4149 -+ if (greg + n - 1 >= NGREGARG)
41.4150 -+ continue;
41.4151 -+ greg += n;
41.4152 -+#else
41.4153 -+ if (greg >= NGREGARG)
41.4154 -+ continue;
41.4155 -+ else if (greg + n - 1 >= NGREGARG)
41.4156 -+ greg = NGREGARG;
41.4157 -+ else
41.4158 -+ greg += n;
41.4159 -+#endif
41.4160 -+ avalue[i] = pgr;
41.4161 -+ pgr += n;
41.4162 -+ }
41.4163 -+ }
41.4164 -+
41.4165 -+ greg = ireg;
41.4166 -+#if defined(__SH4__)
41.4167 -+ freg = 0;
41.4168 -+#endif
41.4169 -+
41.4170 -+ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
41.4171 -+ {
41.4172 -+ size_t z;
41.4173 -+
41.4174 -+ z = (*p_arg)->size;
41.4175 -+ if (z < sizeof(int))
41.4176 -+ {
41.4177 -+ if (greg++ < NGREGARG)
41.4178 -+ continue;
41.4179 -+
41.4180 -+ z = sizeof(int);
41.4181 -+ switch ((*p_arg)->type)
41.4182 -+ {
41.4183 -+ case FFI_TYPE_SINT8:
41.4184 -+ case FFI_TYPE_UINT8:
41.4185 -+ avalue[i] = (((char *)pst) + OFS_INT8);
41.4186 -+ break;
41.4187 -+
41.4188 -+ case FFI_TYPE_SINT16:
41.4189 -+ case FFI_TYPE_UINT16:
41.4190 -+ avalue[i] = (((char *)pst) + OFS_INT16);
41.4191 -+ break;
41.4192 -+
41.4193 -+ case FFI_TYPE_STRUCT:
41.4194 -+ avalue[i] = pst;
41.4195 -+ break;
41.4196 -+
41.4197 -+ default:
41.4198 -+ FFI_ASSERT(0);
41.4199 -+ }
41.4200 -+ pst++;
41.4201 -+ }
41.4202 -+ else if (z == sizeof(int))
41.4203 -+ {
41.4204 -+#if defined(__SH4__)
41.4205 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
41.4206 -+ {
41.4207 -+ if (freg++ < NFREGARG)
41.4208 -+ continue;
41.4209 -+ }
41.4210 -+ else
41.4211 -+#endif
41.4212 -+ {
41.4213 -+ if (greg++ < NGREGARG)
41.4214 -+ continue;
41.4215 -+ }
41.4216 -+ avalue[i] = pst;
41.4217 -+ pst++;
41.4218 -+ }
41.4219 -+#if defined(__SH4__)
41.4220 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
41.4221 -+ {
41.4222 -+ if (freg + 1 < NFREGARG)
41.4223 -+ {
41.4224 -+ freg = (freg + 1) & ~1;
41.4225 -+ freg += 2;
41.4226 -+ continue;
41.4227 -+ }
41.4228 -+ avalue[i] = pst;
41.4229 -+ pst += 2;
41.4230 -+ }
41.4231 -+#endif
41.4232 -+ else
41.4233 -+ {
41.4234 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
41.4235 -+ if (greg + n - 1 < NGREGARG)
41.4236 -+ {
41.4237 -+ greg += n;
41.4238 -+ continue;
41.4239 -+ }
41.4240 -+#if (! defined(__SH4__))
41.4241 -+ else if (greg < NGREGARG)
41.4242 -+ {
41.4243 -+ greg = NGREGARG;
41.4244 -+ continue;
41.4245 -+ }
41.4246 -+#endif
41.4247 -+ avalue[i] = pst;
41.4248 -+ pst += n;
41.4249 -+ }
41.4250 -+ }
41.4251 -+
41.4252 -+ (closure->fun) (cif, rvalue, avalue, closure->user_data);
41.4253 -+
41.4254 -+ /* Tell ffi_closure_osf how to perform return type promotions. */
41.4255 -+ return cif->rtype->type;
41.4256 -+}
41.4257 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/sysv.S gcc/libffi/src/sh/sysv.S
41.4258 ---- gcc-3.2.2.orig/libffi/src/sh/sysv.S Thu Jan 1 09:00:00 1970
41.4259 -+++ gcc/libffi/src/sh/sysv.S Tue Dec 17 03:22:48 2002
41.4260 -@@ -0,0 +1,773 @@
41.4261 -+/* -----------------------------------------------------------------------
41.4262 -+ sysv.S - Copyright (c) 2002 Kaz Kojima
41.4263 -+
41.4264 -+ SuperH Foreign Function Interface
41.4265 -+
41.4266 -+ Permission is hereby granted, free of charge, to any person obtaining
41.4267 -+ a copy of this software and associated documentation files (the
41.4268 -+ ``Software''), to deal in the Software without restriction, including
41.4269 -+ without limitation the rights to use, copy, modify, merge, publish,
41.4270 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.4271 -+ permit persons to whom the Software is furnished to do so, subject to
41.4272 -+ the following conditions:
41.4273 -+
41.4274 -+ The above copyright notice and this permission notice shall be included
41.4275 -+ in all copies or substantial portions of the Software.
41.4276 -+
41.4277 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.4278 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.4279 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.4280 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.4281 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.4282 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.4283 -+ OTHER DEALINGS IN THE SOFTWARE.
41.4284 -+ ----------------------------------------------------------------------- */
41.4285 -+
41.4286 -+#define LIBFFI_ASM
41.4287 -+#include <ffi.h>
41.4288 -+#ifdef HAVE_MACHINE_ASM_H
41.4289 -+#include <machine/asm.h>
41.4290 -+#else
41.4291 -+/* XXX these lose for some platforms, I'm sure. */
41.4292 -+#define CNAME(x) x
41.4293 -+#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
41.4294 -+#endif
41.4295 -+
41.4296 -+#if defined(__HITACHI__)
41.4297 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
41.4298 -+#else
41.4299 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
41.4300 -+#endif
41.4301 -+
41.4302 -+.text
41.4303 -+
41.4304 -+ # r4: ffi_prep_args
41.4305 -+ # r5: &ecif
41.4306 -+ # r6: bytes
41.4307 -+ # r7: flags
41.4308 -+ # sp+0: rvalue
41.4309 -+ # sp+4: fn
41.4310 -+
41.4311 -+ # This assumes we are using gas.
41.4312 -+ENTRY(ffi_call_SYSV)
41.4313 -+ # Save registers
41.4314 -+.LFB1:
41.4315 -+ mov.l r8,@-r15
41.4316 -+.LCFI0:
41.4317 -+ mov.l r9,@-r15
41.4318 -+.LCFI1:
41.4319 -+ mov.l r10,@-r15
41.4320 -+.LCFI2:
41.4321 -+ mov.l r12,@-r15
41.4322 -+.LCFI3:
41.4323 -+ mov.l r14,@-r15
41.4324 -+.LCFI4:
41.4325 -+ sts.l pr,@-r15
41.4326 -+.LCFI5:
41.4327 -+ mov r15,r14
41.4328 -+.LCFI6:
41.4329 -+#if defined(__SH4__)
41.4330 -+ mov r6,r8
41.4331 -+ mov r7,r9
41.4332 -+
41.4333 -+ sub r6,r15
41.4334 -+ add #-16,r15
41.4335 -+ mov #~7,r0
41.4336 -+ and r0,r15
41.4337 -+
41.4338 -+ mov r4,r0
41.4339 -+ jsr @r0
41.4340 -+ mov r15,r4
41.4341 -+
41.4342 -+ mov r9,r1
41.4343 -+ shlr8 r9
41.4344 -+ shlr8 r9
41.4345 -+ shlr8 r9
41.4346 -+
41.4347 -+ mov #FFI_TYPE_STRUCT,r2
41.4348 -+ cmp/eq r2,r9
41.4349 -+ bf 1f
41.4350 -+#if STRUCT_VALUE_ADDRESS_WITH_ARG
41.4351 -+ mov.l @r15+,r4
41.4352 -+ bra 2f
41.4353 -+ mov #5,r2
41.4354 -+#else
41.4355 -+ mov.l @r15+,r10
41.4356 -+#endif
41.4357 -+1:
41.4358 -+ mov #4,r2
41.4359 -+2:
41.4360 -+ mov #4,r3
41.4361 -+
41.4362 -+L_pass:
41.4363 -+ cmp/pl r8
41.4364 -+ bf L_call_it
41.4365 -+
41.4366 -+ mov r1,r0
41.4367 -+ and #3,r0
41.4368 -+
41.4369 -+L_pass_d:
41.4370 -+ cmp/eq #FFI_TYPE_DOUBLE,r0
41.4371 -+ bf L_pass_f
41.4372 -+
41.4373 -+ mov r3,r0
41.4374 -+ and #1,r0
41.4375 -+ tst r0,r0
41.4376 -+ bt 1f
41.4377 -+ add #1,r3
41.4378 -+1:
41.4379 -+ mov r15,r0
41.4380 -+ and #7,r0
41.4381 -+ tst r0,r0
41.4382 -+ bt 2f
41.4383 -+ add #4,r15
41.4384 -+2:
41.4385 -+ mov #12,r0
41.4386 -+ cmp/hs r0,r3
41.4387 -+ bt/s 3f
41.4388 -+ shlr2 r1
41.4389 -+ bsr L_pop_d
41.4390 -+ nop
41.4391 -+3:
41.4392 -+ add #2,r3
41.4393 -+ bra L_pass
41.4394 -+ add #-8,r8
41.4395 -+
41.4396 -+L_pop_d:
41.4397 -+ mov r3,r0
41.4398 -+ add r0,r0
41.4399 -+ add r3,r0
41.4400 -+ add #-12,r0
41.4401 -+ braf r0
41.4402 -+ nop
41.4403 -+#ifdef __LITTLE_ENDIAN__
41.4404 -+ fmov.s @r15+,fr5
41.4405 -+ rts
41.4406 -+ fmov.s @r15+,fr4
41.4407 -+ fmov.s @r15+,fr7
41.4408 -+ rts
41.4409 -+ fmov.s @r15+,fr6
41.4410 -+ fmov.s @r15+,fr9
41.4411 -+ rts
41.4412 -+ fmov.s @r15+,fr8
41.4413 -+ fmov.s @r15+,fr11
41.4414 -+ rts
41.4415 -+ fmov.s @r15+,fr10
41.4416 -+#else
41.4417 -+ fmov.s @r15+,fr4
41.4418 -+ rts
41.4419 -+ fmov.s @r15+,fr5
41.4420 -+ fmov.s @r15+,fr6
41.4421 -+ rts
41.4422 -+ fmov.s @r15+,fr7
41.4423 -+ fmov.s @r15+,fr8
41.4424 -+ rts
41.4425 -+ fmov.s @r15+,fr9
41.4426 -+ fmov.s @r15+,fr10
41.4427 -+ rts
41.4428 -+ fmov.s @r15+,fr11
41.4429 -+#endif
41.4430 -+
41.4431 -+L_pass_f:
41.4432 -+ cmp/eq #FFI_TYPE_FLOAT,r0
41.4433 -+ bf L_pass_i
41.4434 -+
41.4435 -+ mov #12,r0
41.4436 -+ cmp/hs r0,r3
41.4437 -+ bt/s 2f
41.4438 -+ shlr2 r1
41.4439 -+ bsr L_pop_f
41.4440 -+ nop
41.4441 -+2:
41.4442 -+ add #1,r3
41.4443 -+ bra L_pass
41.4444 -+ add #-4,r8
41.4445 -+
41.4446 -+L_pop_f:
41.4447 -+ mov r3,r0
41.4448 -+ shll2 r0
41.4449 -+ add #-16,r0
41.4450 -+ braf r0
41.4451 -+ nop
41.4452 -+#ifdef __LITTLE_ENDIAN__
41.4453 -+ rts
41.4454 -+ fmov.s @r15+,fr5
41.4455 -+ rts
41.4456 -+ fmov.s @r15+,fr4
41.4457 -+ rts
41.4458 -+ fmov.s @r15+,fr7
41.4459 -+ rts
41.4460 -+ fmov.s @r15+,fr6
41.4461 -+ rts
41.4462 -+ fmov.s @r15+,fr9
41.4463 -+ rts
41.4464 -+ fmov.s @r15+,fr8
41.4465 -+ rts
41.4466 -+ fmov.s @r15+,fr11
41.4467 -+ rts
41.4468 -+ fmov.s @r15+,fr10
41.4469 -+#else
41.4470 -+ rts
41.4471 -+ fmov.s @r15+,fr4
41.4472 -+ rts
41.4473 -+ fmov.s @r15+,fr5
41.4474 -+ rts
41.4475 -+ fmov.s @r15+,fr6
41.4476 -+ rts
41.4477 -+ fmov.s @r15+,fr7
41.4478 -+ rts
41.4479 -+ fmov.s @r15+,fr8
41.4480 -+ rts
41.4481 -+ fmov.s @r15+,fr9
41.4482 -+ rts
41.4483 -+ fmov.s @r15+,fr10
41.4484 -+ rts
41.4485 -+ fmov.s @r15+,fr11
41.4486 -+#endif
41.4487 -+
41.4488 -+L_pass_i:
41.4489 -+ cmp/eq #FFI_TYPE_INT,r0
41.4490 -+ bf L_call_it
41.4491 -+
41.4492 -+ mov #8,r0
41.4493 -+ cmp/hs r0,r2
41.4494 -+ bt/s 2f
41.4495 -+ shlr2 r1
41.4496 -+ bsr L_pop_i
41.4497 -+ nop
41.4498 -+2:
41.4499 -+ add #1,r2
41.4500 -+ bra L_pass
41.4501 -+ add #-4,r8
41.4502 -+
41.4503 -+L_pop_i:
41.4504 -+ mov r2,r0
41.4505 -+ shll2 r0
41.4506 -+ add #-16,r0
41.4507 -+ braf r0
41.4508 -+ nop
41.4509 -+ rts
41.4510 -+ mov.l @r15+,r4
41.4511 -+ rts
41.4512 -+ mov.l @r15+,r5
41.4513 -+ rts
41.4514 -+ mov.l @r15+,r6
41.4515 -+ rts
41.4516 -+ mov.l @r15+,r7
41.4517 -+
41.4518 -+L_call_it:
41.4519 -+ # call function
41.4520 -+#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
41.4521 -+ mov r10, r2
41.4522 -+#endif
41.4523 -+ mov.l @(28,r14),r1
41.4524 -+ jsr @r1
41.4525 -+ nop
41.4526 -+
41.4527 -+L_ret_d:
41.4528 -+ mov #FFI_TYPE_DOUBLE,r2
41.4529 -+ cmp/eq r2,r9
41.4530 -+ bf L_ret_ll
41.4531 -+
41.4532 -+ mov.l @(24,r14),r1
41.4533 -+#ifdef __LITTLE_ENDIAN__
41.4534 -+ fmov.s fr1,@r1
41.4535 -+ add #4,r1
41.4536 -+ bra L_epilogue
41.4537 -+ fmov.s fr0,@r1
41.4538 -+#else
41.4539 -+ fmov.s fr0,@r1
41.4540 -+ add #4,r1
41.4541 -+ bra L_epilogue
41.4542 -+ fmov.s fr1,@r1
41.4543 -+#endif
41.4544 -+
41.4545 -+L_ret_ll:
41.4546 -+ mov #FFI_TYPE_SINT64,r2
41.4547 -+ cmp/eq r2,r9
41.4548 -+ bt/s 1f
41.4549 -+ mov #FFI_TYPE_UINT64,r2
41.4550 -+ cmp/eq r2,r9
41.4551 -+ bf L_ret_f
41.4552 -+
41.4553 -+1:
41.4554 -+ mov.l @(24,r14),r2
41.4555 -+ mov.l r0,@r2
41.4556 -+ bra L_epilogue
41.4557 -+ mov.l r1,@(4,r2)
41.4558 -+
41.4559 -+L_ret_f:
41.4560 -+ mov #FFI_TYPE_FLOAT,r2
41.4561 -+ cmp/eq r2,r9
41.4562 -+ bf L_ret_i
41.4563 -+
41.4564 -+ mov.l @(24,r14),r1
41.4565 -+ bra L_epilogue
41.4566 -+ fmov.s fr0,@r1
41.4567 -+
41.4568 -+L_ret_i:
41.4569 -+ mov #FFI_TYPE_INT,r2
41.4570 -+ cmp/eq r2,r9
41.4571 -+ bf L_epilogue
41.4572 -+
41.4573 -+ mov.l @(24,r14),r1
41.4574 -+ bra L_epilogue
41.4575 -+ mov.l r0,@r1
41.4576 -+
41.4577 -+L_epilogue:
41.4578 -+ # Remove the space we pushed for the args
41.4579 -+ mov r14,r15
41.4580 -+
41.4581 -+ lds.l @r15+,pr
41.4582 -+ mov.l @r15+,r14
41.4583 -+ mov.l @r15+,r12
41.4584 -+ mov.l @r15+,r10
41.4585 -+ mov.l @r15+,r9
41.4586 -+ rts
41.4587 -+ mov.l @r15+,r8
41.4588 -+#else
41.4589 -+ mov r6,r8
41.4590 -+ mov r7,r9
41.4591 -+
41.4592 -+ sub r6,r15
41.4593 -+ add #-16,r15
41.4594 -+ mov #~7,r0
41.4595 -+ and r0,r15
41.4596 -+
41.4597 -+ mov r4,r0
41.4598 -+ jsr @r0
41.4599 -+ mov r15,r4
41.4600 -+
41.4601 -+ mov r9,r3
41.4602 -+ shlr8 r9
41.4603 -+ shlr8 r9
41.4604 -+ shlr8 r9
41.4605 -+
41.4606 -+ mov #FFI_TYPE_STRUCT,r2
41.4607 -+ cmp/eq r2,r9
41.4608 -+ bf 1f
41.4609 -+#if STRUCT_VALUE_ADDRESS_WITH_ARG
41.4610 -+ mov.l @r15+,r4
41.4611 -+ bra 2f
41.4612 -+ mov #5,r2
41.4613 -+#else
41.4614 -+ mov.l @r15+,r10
41.4615 -+#endif
41.4616 -+1:
41.4617 -+ mov #4,r2
41.4618 -+2:
41.4619 -+
41.4620 -+L_pass:
41.4621 -+ cmp/pl r8
41.4622 -+ bf L_call_it
41.4623 -+
41.4624 -+ mov r3,r0
41.4625 -+ and #3,r0
41.4626 -+
41.4627 -+L_pass_d:
41.4628 -+ cmp/eq #FFI_TYPE_DOUBLE,r0
41.4629 -+ bf L_pass_i
41.4630 -+
41.4631 -+ mov r15,r0
41.4632 -+ and #7,r0
41.4633 -+ tst r0,r0
41.4634 -+ bt 1f
41.4635 -+ add #4,r15
41.4636 -+1:
41.4637 -+ mov #8,r0
41.4638 -+ cmp/hs r0,r2
41.4639 -+ bt/s 2f
41.4640 -+ shlr2 r3
41.4641 -+ bsr L_pop_d
41.4642 -+ nop
41.4643 -+2:
41.4644 -+ add #2,r2
41.4645 -+ bra L_pass
41.4646 -+ add #-8,r8
41.4647 -+
41.4648 -+L_pop_d:
41.4649 -+ mov r2,r0
41.4650 -+ add r0,r0
41.4651 -+ add r2,r0
41.4652 -+ add #-12,r0
41.4653 -+ add r0,r0
41.4654 -+ braf r0
41.4655 -+ nop
41.4656 -+ mov.l @r15+,r4
41.4657 -+ rts
41.4658 -+ mov.l @r15+,r5
41.4659 -+ mov.l @r15+,r5
41.4660 -+ rts
41.4661 -+ mov.l @r15+,r6
41.4662 -+ mov.l @r15+,r6
41.4663 -+ rts
41.4664 -+ mov.l @r15+,r7
41.4665 -+ rts
41.4666 -+ mov.l @r15+,r7
41.4667 -+
41.4668 -+L_pass_i:
41.4669 -+ mov #8,r0
41.4670 -+ cmp/hs r0,r2
41.4671 -+ bt/s 2f
41.4672 -+ shlr2 r3
41.4673 -+ bsr L_pop_i
41.4674 -+ nop
41.4675 -+2:
41.4676 -+ add #1,r2
41.4677 -+ bra L_pass
41.4678 -+ add #-4,r8
41.4679 -+
41.4680 -+L_pop_i:
41.4681 -+ mov r2,r0
41.4682 -+ shll2 r0
41.4683 -+ add #-16,r0
41.4684 -+ braf r0
41.4685 -+ nop
41.4686 -+ rts
41.4687 -+ mov.l @r15+,r4
41.4688 -+ rts
41.4689 -+ mov.l @r15+,r5
41.4690 -+ rts
41.4691 -+ mov.l @r15+,r6
41.4692 -+ rts
41.4693 -+ mov.l @r15+,r7
41.4694 -+
41.4695 -+L_call_it:
41.4696 -+ # call function
41.4697 -+#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
41.4698 -+ mov r10, r2
41.4699 -+#endif
41.4700 -+ mov.l @(28,r14),r1
41.4701 -+ jsr @r1
41.4702 -+ nop
41.4703 -+
41.4704 -+L_ret_d:
41.4705 -+ mov #FFI_TYPE_DOUBLE,r2
41.4706 -+ cmp/eq r2,r9
41.4707 -+ bf L_ret_ll
41.4708 -+
41.4709 -+ mov.l @(24,r14),r2
41.4710 -+ mov.l r0,@r2
41.4711 -+ bra L_epilogue
41.4712 -+ mov.l r1,@(4,r2)
41.4713 -+
41.4714 -+L_ret_ll:
41.4715 -+ mov #FFI_TYPE_SINT64,r2
41.4716 -+ cmp/eq r2,r9
41.4717 -+ bt/s 1f
41.4718 -+ mov #FFI_TYPE_UINT64,r2
41.4719 -+ cmp/eq r2,r9
41.4720 -+ bf L_ret_i
41.4721 -+
41.4722 -+1:
41.4723 -+ mov.l @(24,r14),r2
41.4724 -+ mov.l r0,@r2
41.4725 -+ bra L_epilogue
41.4726 -+ mov.l r1,@(4,r2)
41.4727 -+
41.4728 -+L_ret_i:
41.4729 -+ mov #FFI_TYPE_FLOAT,r2
41.4730 -+ cmp/eq r2,r9
41.4731 -+ bt 1f
41.4732 -+ mov #FFI_TYPE_INT,r2
41.4733 -+ cmp/eq r2,r9
41.4734 -+ bf L_epilogue
41.4735 -+1:
41.4736 -+ mov.l @(24,r14),r1
41.4737 -+ bra L_epilogue
41.4738 -+ mov.l r0,@r1
41.4739 -+
41.4740 -+L_epilogue:
41.4741 -+ # Remove the space we pushed for the args
41.4742 -+ mov r14,r15
41.4743 -+
41.4744 -+ lds.l @r15+,pr
41.4745 -+ mov.l @r15+,r14
41.4746 -+ mov.l @r15+,r12
41.4747 -+ mov.l @r15+,r10
41.4748 -+ mov.l @r15+,r9
41.4749 -+ rts
41.4750 -+ mov.l @r15+,r8
41.4751 -+#endif
41.4752 -+.LFE1:
41.4753 -+.ffi_call_SYSV_end:
41.4754 -+ .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
41.4755 -+
41.4756 -+.globl ffi_closure_helper_SYSV
41.4757 -+
41.4758 -+ENTRY(ffi_closure_SYSV)
41.4759 -+.LFB2:
41.4760 -+ mov.l r14,@-r15
41.4761 -+.LCFI7:
41.4762 -+ sts.l pr,@-r15
41.4763 -+
41.4764 -+ /* Stack layout:
41.4765 -+ ...
41.4766 -+ 32 bytes (floating register parameters, SH-4 only)
41.4767 -+ 16 bytes (register parameters)
41.4768 -+ 4 bytes (result)
41.4769 -+ 4 bytes (5th arg)
41.4770 -+ <- new stack pointer
41.4771 -+ */
41.4772 -+.LCFI8:
41.4773 -+#if defined(__SH4__)
41.4774 -+ add #-56,r15
41.4775 -+#else
41.4776 -+ add #-24,r15
41.4777 -+#endif
41.4778 -+.LCFI9:
41.4779 -+ mov r15,r14
41.4780 -+.LCFIA:
41.4781 -+ mov r14,r1
41.4782 -+ add #24,r1
41.4783 -+ mov.l r7,@-r1
41.4784 -+ mov.l r6,@-r1
41.4785 -+ mov.l r5,@-r1
41.4786 -+ mov.l r4,@-r1
41.4787 -+ mov r1,r6
41.4788 -+
41.4789 -+#if defined(__SH4__)
41.4790 -+ mov r14,r1
41.4791 -+ add #56,r1
41.4792 -+#ifdef __LITTLE_ENDIAN__
41.4793 -+ fmov.s fr10,@-r1
41.4794 -+ fmov.s fr11,@-r1
41.4795 -+ fmov.s fr8,@-r1
41.4796 -+ fmov.s fr9,@-r1
41.4797 -+ fmov.s fr6,@-r1
41.4798 -+ fmov.s fr7,@-r1
41.4799 -+ fmov.s fr4,@-r1
41.4800 -+ fmov.s fr5,@-r1
41.4801 -+#else
41.4802 -+ fmov.s fr11,@-r1
41.4803 -+ fmov.s fr10,@-r1
41.4804 -+ fmov.s fr9,@-r1
41.4805 -+ fmov.s fr8,@-r1
41.4806 -+ fmov.s fr7,@-r1
41.4807 -+ fmov.s fr6,@-r1
41.4808 -+ fmov.s fr5,@-r1
41.4809 -+ fmov.s fr4,@-r1
41.4810 -+#endif
41.4811 -+ mov r1,r7
41.4812 -+#endif
41.4813 -+
41.4814 -+ mov r14,r1
41.4815 -+ add #4,r1
41.4816 -+ mov r1,r5
41.4817 -+
41.4818 -+ mov r14,r1
41.4819 -+#if defined(__SH4__)
41.4820 -+ add #64,r1
41.4821 -+#else
41.4822 -+ add #32,r1
41.4823 -+#endif
41.4824 -+ mov.l r1,@r14
41.4825 -+
41.4826 -+ mov.l L_helper,r0
41.4827 -+ jsr @r0
41.4828 -+ mov r3,r4
41.4829 -+
41.4830 -+ shll r0
41.4831 -+ mov r0,r1
41.4832 -+ mova L_table,r0
41.4833 -+ add r1,r0
41.4834 -+ mov.w @r0,r0
41.4835 -+ mov r14,r2
41.4836 -+ braf r0
41.4837 -+ add #4,r2
41.4838 -+0:
41.4839 -+ .align 2
41.4840 -+L_helper:
41.4841 -+ .long ffi_closure_helper_SYSV
41.4842 -+L_table:
41.4843 -+ .short L_case_v - 0b /* FFI_TYPE_VOID */
41.4844 -+ .short L_case_i - 0b /* FFI_TYPE_INT */
41.4845 -+#if defined(__SH4__)
41.4846 -+ .short L_case_f - 0b /* FFI_TYPE_FLOAT */
41.4847 -+ .short L_case_d - 0b /* FFI_TYPE_DOUBLE */
41.4848 -+ .short L_case_d - 0b /* FFI_TYPE_LONGDOUBLE */
41.4849 -+#else
41.4850 -+ .short L_case_i - 0b /* FFI_TYPE_FLOAT */
41.4851 -+ .short L_case_ll - 0b /* FFI_TYPE_DOUBLE */
41.4852 -+ .short L_case_ll - 0b /* FFI_TYPE_LONGDOUBLE */
41.4853 -+#endif
41.4854 -+ .short L_case_uq - 0b /* FFI_TYPE_UINT8 */
41.4855 -+ .short L_case_q - 0b /* FFI_TYPE_SINT8 */
41.4856 -+ .short L_case_uh - 0b /* FFI_TYPE_UINT16 */
41.4857 -+ .short L_case_h - 0b /* FFI_TYPE_SINT16 */
41.4858 -+ .short L_case_i - 0b /* FFI_TYPE_UINT32 */
41.4859 -+ .short L_case_i - 0b /* FFI_TYPE_SINT32 */
41.4860 -+ .short L_case_ll - 0b /* FFI_TYPE_UINT64 */
41.4861 -+ .short L_case_ll - 0b /* FFI_TYPE_SINT64 */
41.4862 -+ .short L_case_v - 0b /* FFI_TYPE_STRUCT */
41.4863 -+ .short L_case_i - 0b /* FFI_TYPE_POINTER */
41.4864 -+
41.4865 -+#if defined(__SH4__)
41.4866 -+L_case_d:
41.4867 -+#ifdef __LITTLE_ENDIAN__
41.4868 -+ fmov.s @r2+,fr1
41.4869 -+ bra L_case_v
41.4870 -+ fmov.s @r2,fr0
41.4871 -+#else
41.4872 -+ fmov.s @r2+,fr0
41.4873 -+ bra L_case_v
41.4874 -+ fmov.s @r2,fr1
41.4875 -+#endif
41.4876 -+
41.4877 -+L_case_f:
41.4878 -+ bra L_case_v
41.4879 -+ fmov.s @r2,fr0
41.4880 -+#endif
41.4881 -+
41.4882 -+L_case_ll:
41.4883 -+ mov.l @r2+,r0
41.4884 -+ bra L_case_v
41.4885 -+ mov.l @r2,r1
41.4886 -+
41.4887 -+L_case_i:
41.4888 -+ bra L_case_v
41.4889 -+ mov.l @r2,r0
41.4890 -+
41.4891 -+L_case_q:
41.4892 -+#ifdef __LITTLE_ENDIAN__
41.4893 -+#else
41.4894 -+ add #3,r2
41.4895 -+#endif
41.4896 -+ bra L_case_v
41.4897 -+ mov.b @r2,r0
41.4898 -+
41.4899 -+L_case_uq:
41.4900 -+#ifdef __LITTLE_ENDIAN__
41.4901 -+#else
41.4902 -+ add #3,r2
41.4903 -+#endif
41.4904 -+ mov.b @r2,r0
41.4905 -+ bra L_case_v
41.4906 -+ extu.b r0,r0
41.4907 -+
41.4908 -+L_case_h:
41.4909 -+#ifdef __LITTLE_ENDIAN__
41.4910 -+#else
41.4911 -+ add #2,r2
41.4912 -+#endif
41.4913 -+ bra L_case_v
41.4914 -+ mov.w @r2,r0
41.4915 -+
41.4916 -+L_case_uh:
41.4917 -+#ifdef __LITTLE_ENDIAN__
41.4918 -+#else
41.4919 -+ add #2,r2
41.4920 -+#endif
41.4921 -+ mov.w @r2,r0
41.4922 -+ extu.w r0,r0
41.4923 -+ /* fall through */
41.4924 -+
41.4925 -+L_case_v:
41.4926 -+#if defined(__SH4__)
41.4927 -+ add #56,r15
41.4928 -+#else
41.4929 -+ add #24,r15
41.4930 -+#endif
41.4931 -+ lds.l @r15+,pr
41.4932 -+ rts
41.4933 -+ mov.l @r15+,r14
41.4934 -+.LFE2:
41.4935 -+.ffi_closure_SYSV_end:
41.4936 -+ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
41.4937 -+
41.4938 -+ .section ".eh_frame","aw",@progbits
41.4939 -+__FRAME_BEGIN__:
41.4940 -+ .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */
41.4941 -+.LSCIE1:
41.4942 -+ .4byte 0x0 /* CIE Identifier Tag */
41.4943 -+ .byte 0x1 /* CIE Version */
41.4944 -+ .byte 0x0 /* CIE Augmentation */
41.4945 -+ .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */
41.4946 -+ .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */
41.4947 -+ .byte 0x11 /* CIE RA Column */
41.4948 -+ .byte 0xc /* DW_CFA_def_cfa */
41.4949 -+ .byte 0xf /* uleb128 0xf */
41.4950 -+ .byte 0x0 /* uleb128 0x0 */
41.4951 -+ .align 2
41.4952 -+.LECIE1:
41.4953 -+.LSFDE1:
41.4954 -+ .4byte .LEFDE1-.LASFDE1 /* FDE Length */
41.4955 -+.LASFDE1:
41.4956 -+ .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */
41.4957 -+ .4byte .LFB1 /* FDE initial location */
41.4958 -+ .4byte .LFE1-.LFB1 /* FDE address range */
41.4959 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4960 -+ .4byte .LCFI0-.LFB1
41.4961 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4962 -+ .byte 0x4 /* uleb128 0x4 */
41.4963 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4964 -+ .4byte .LCFI1-.LCFI0
41.4965 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4966 -+ .byte 0x8 /* uleb128 0x4 */
41.4967 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4968 -+ .4byte .LCFI2-.LCFI1
41.4969 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4970 -+ .byte 0xc /* uleb128 0x4 */
41.4971 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4972 -+ .4byte .LCFI3-.LCFI2
41.4973 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4974 -+ .byte 0x10 /* uleb128 0x4 */
41.4975 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4976 -+ .4byte .LCFI4-.LCFI3
41.4977 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4978 -+ .byte 0x14 /* uleb128 0x4 */
41.4979 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4980 -+ .4byte .LCFI5-.LCFI4
41.4981 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.4982 -+ .byte 0x18 /* uleb128 0x4 */
41.4983 -+ .byte 0x91 /* DW_CFA_offset, column 0x11 */
41.4984 -+ .byte 0x6 /* uleb128 0x6 */
41.4985 -+ .byte 0x8e /* DW_CFA_offset, column 0xe */
41.4986 -+ .byte 0x5 /* uleb128 0x5 */
41.4987 -+ .byte 0x8c /* DW_CFA_offset, column 0xc */
41.4988 -+ .byte 0x4 /* uleb128 0x4 */
41.4989 -+ .byte 0x8a /* DW_CFA_offset, column 0xa */
41.4990 -+ .byte 0x3 /* uleb128 0x3 */
41.4991 -+ .byte 0x89 /* DW_CFA_offset, column 0x9 */
41.4992 -+ .byte 0x2 /* uleb128 0x2 */
41.4993 -+ .byte 0x88 /* DW_CFA_offset, column 0x8 */
41.4994 -+ .byte 0x1 /* uleb128 0x1 */
41.4995 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.4996 -+ .4byte .LCFI6-.LCFI5
41.4997 -+ .byte 0xd /* DW_CFA_def_cfa_register */
41.4998 -+ .byte 0xe /* uleb128 0xe */
41.4999 -+ .align 2
41.5000 -+.LEFDE1:
41.5001 -+
41.5002 -+.LSFDE3:
41.5003 -+ .4byte .LEFDE3-.LASFDE3 /* FDE Length */
41.5004 -+.LASFDE3:
41.5005 -+ .4byte .LASFDE3-__FRAME_BEGIN__ /* FDE CIE offset */
41.5006 -+ .4byte .LFB2 /* FDE initial location */
41.5007 -+ .4byte .LFE2-.LFB2 /* FDE address range */
41.5008 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.5009 -+ .4byte .LCFI7-.LFB2
41.5010 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.5011 -+ .byte 0x4 /* uleb128 0x4 */
41.5012 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.5013 -+ .4byte .LCFI8-.LCFI7
41.5014 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.5015 -+ .byte 0x8 /* uleb128 0x8 */
41.5016 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.5017 -+ .4byte .LCFI9-.LCFI8
41.5018 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
41.5019 -+#if defined(__SH4__)
41.5020 -+ .byte 8+56 /* uleb128 8+56 */
41.5021 -+#else
41.5022 -+ .byte 8+24 /* uleb128 8+24 */
41.5023 -+#endif
41.5024 -+ .byte 0x91 /* DW_CFA_offset, column 0x11 */
41.5025 -+ .byte 0x2
41.5026 -+ .byte 0x8e /* DW_CFA_offset, column 0xe */
41.5027 -+ .byte 0x1
41.5028 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
41.5029 -+ .4byte .LCFIA-.LCFI9
41.5030 -+ .byte 0xd /* DW_CFA_def_cfa_register */
41.5031 -+ .byte 0xe /* uleb128 0xe */
41.5032 -+ .align 2
41.5033 -+.LEFDE3:
41.5034 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/ffi.c gcc/libffi/src/sparc/ffi.c
41.5035 ---- gcc-3.2.2.orig/libffi/src/sparc/ffi.c Sat Mar 3 07:21:23 2001
41.5036 -+++ gcc/libffi/src/sparc/ffi.c Sat Jan 4 08:08:56 2003
41.5037 -@@ -1,5 +1,5 @@
41.5038 - /* -----------------------------------------------------------------------
41.5039 -- ffi.c - Copyright (c) 1996 Cygnus Solutions
41.5040 -+ ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions
41.5041 -
41.5042 - Sparc Foreign Function Interface
41.5043 -
41.5044 -@@ -28,20 +28,22 @@
41.5045 -
41.5046 - #include <stdlib.h>
41.5047 -
41.5048 -+#ifdef SPARC64
41.5049 -+extern void ffi_closure_v9(void);
41.5050 -+#else
41.5051 -+extern void ffi_closure_v8(void);
41.5052 -+#endif
41.5053 -+
41.5054 - /* ffi_prep_args is called by the assembly routine once stack space
41.5055 - has been allocated for the function's arguments */
41.5056 -
41.5057 - void ffi_prep_args_v8(char *stack, extended_cif *ecif)
41.5058 - {
41.5059 - int i;
41.5060 -- int tmp;
41.5061 -- int avn;
41.5062 - void **p_argv;
41.5063 - char *argp;
41.5064 - ffi_type **p_arg;
41.5065 -
41.5066 -- tmp = 0;
41.5067 --
41.5068 - /* Skip 16 words for the window save area */
41.5069 - argp = stack + 16*sizeof(int);
41.5070 -
41.5071 -@@ -66,18 +68,12 @@
41.5072 - ((int*)argp)[5] = 0;
41.5073 - #endif
41.5074 -
41.5075 -- avn = ecif->cif->nargs;
41.5076 - p_argv = ecif->avalue;
41.5077 -
41.5078 -- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
41.5079 -- i && avn;
41.5080 -- i--, p_arg++)
41.5081 -+ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
41.5082 - {
41.5083 - size_t z;
41.5084 -
41.5085 -- if (avn)
41.5086 -- {
41.5087 -- avn--;
41.5088 - if ((*p_arg)->type == FFI_TYPE_STRUCT
41.5089 - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
41.5090 - || (*p_arg)->type == FFI_TYPE_LONGDOUBLE
41.5091 -@@ -122,7 +118,6 @@
41.5092 - }
41.5093 - p_argv++;
41.5094 - argp += z;
41.5095 -- }
41.5096 - }
41.5097 -
41.5098 - return;
41.5099 -@@ -420,3 +415,101 @@
41.5100 - }
41.5101 -
41.5102 - }
41.5103 -+
41.5104 -+ffi_status
41.5105 -+ffi_prep_closure (ffi_closure* closure,
41.5106 -+ ffi_cif* cif,
41.5107 -+ void (*fun)(ffi_cif*, void*, void**, void*),
41.5108 -+ void *user_data)
41.5109 -+{
41.5110 -+ unsigned int *tramp = (unsigned int *) &closure->tramp[0];
41.5111 -+ unsigned long fn;
41.5112 -+ unsigned long ctx = (unsigned long) closure;
41.5113 -+
41.5114 -+#ifdef SPARC64
41.5115 -+ /* Trampoline address is equal to the closure address. We take advantage
41.5116 -+ of that to reduce the trampoline size by 8 bytes. */
41.5117 -+ FFI_ASSERT (cif->abi == FFI_V9);
41.5118 -+ fn = (unsigned long) ffi_closure_v9;
41.5119 -+ tramp[0] = 0x83414000; /* rd %pc, %g1 */
41.5120 -+ tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */
41.5121 -+ tramp[2] = 0x81c14000; /* jmp %g5 */
41.5122 -+ tramp[3] = 0x01000000; /* nop */
41.5123 -+ *((unsigned long *) &tramp[4]) = fn;
41.5124 -+#else
41.5125 -+ FFI_ASSERT (cif->abi == FFI_V8);
41.5126 -+ fn = (unsigned long) ffi_closure_v8;
41.5127 -+ tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */
41.5128 -+ tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */
41.5129 -+ tramp[2] = 0x81c06000 | (fn & 0x3ff); /* jmp %g1+%lo(fn) */
41.5130 -+ tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or %g2, %lo(ctx) */
41.5131 -+#endif
41.5132 -+
41.5133 -+ closure->cif = cif;
41.5134 -+ closure->fun = fun;
41.5135 -+ closure->user_data = user_data;
41.5136 -+
41.5137 -+ /* Flush the Icache. FIXME: alignment isn't certain, assume 8 bytes */
41.5138 -+#ifdef SPARC64
41.5139 -+ asm volatile ("flush %0" : : "r" (closure) : "memory");
41.5140 -+ asm volatile ("flush %0" : : "r" (((char *) closure) + 8) : "memory");
41.5141 -+#else
41.5142 -+ asm volatile ("iflush %0" : : "r" (closure) : "memory");
41.5143 -+ asm volatile ("iflush %0" : : "r" (((char *) closure) + 8) : "memory");
41.5144 -+#endif
41.5145 -+
41.5146 -+ return FFI_OK;
41.5147 -+}
41.5148 -+
41.5149 -+int
41.5150 -+ffi_closure_sparc_inner(ffi_closure *closure,
41.5151 -+ void *rvalue, unsigned long *gpr, double *fpr)
41.5152 -+{
41.5153 -+ ffi_cif *cif;
41.5154 -+ void **avalue;
41.5155 -+ ffi_type **arg_types;
41.5156 -+ int i, avn, argn;
41.5157 -+
41.5158 -+ cif = closure->cif;
41.5159 -+ avalue = alloca(cif->nargs * sizeof(void *));
41.5160 -+
41.5161 -+ argn = 0;
41.5162 -+
41.5163 -+ /* Copy the caller's structure return address to that the closure
41.5164 -+ returns the data directly to the caller. */
41.5165 -+ if (cif->flags == FFI_TYPE_STRUCT)
41.5166 -+ {
41.5167 -+ rvalue = (void *) gpr[0];
41.5168 -+ argn = 1;
41.5169 -+ }
41.5170 -+
41.5171 -+ i = 0;
41.5172 -+ avn = cif->nargs;
41.5173 -+ arg_types = cif->arg_types;
41.5174 -+
41.5175 -+ /* Grab the addresses of the arguments from the stack frame. */
41.5176 -+ while (i < avn)
41.5177 -+ {
41.5178 -+ /* Assume big-endian. FIXME */
41.5179 -+ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
41.5180 -+
41.5181 -+#ifdef SPARC64
41.5182 -+ if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT
41.5183 -+ || arg_types[i]->type == FFI_TYPE_DOUBLE
41.5184 -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
41.5185 -+ || arg_types[i]->type == FFI_TYPE_LONGDOUBLE
41.5186 -+#endif
41.5187 -+ ))
41.5188 -+ avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size;
41.5189 -+ else
41.5190 -+#endif
41.5191 -+ avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size;
41.5192 -+ i++;
41.5193 -+ }
41.5194 -+
41.5195 -+ /* Invoke the closure. */
41.5196 -+ (closure->fun) (cif, rvalue, avalue, closure->user_data);
41.5197 -+
41.5198 -+ /* Tell ffi_closure_sparc how to perform return type promotions. */
41.5199 -+ return cif->rtype->type;
41.5200 -+}
41.5201 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v8.S gcc/libffi/src/sparc/v8.S
41.5202 ---- gcc-3.2.2.orig/libffi/src/sparc/v8.S Mon Apr 29 05:12:04 2002
41.5203 -+++ gcc/libffi/src/sparc/v8.S Sat Jan 4 08:08:56 2003
41.5204 -@@ -1,5 +1,5 @@
41.5205 - /* -----------------------------------------------------------------------
41.5206 -- v8.S - Copyright (c) 1996, 1997 Cygnus Solutions
41.5207 -+ v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions
41.5208 -
41.5209 - Sparc Foreign Function Interface
41.5210 -
41.5211 -@@ -94,6 +94,72 @@
41.5212 - .ffi_call_V8_end:
41.5213 - .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
41.5214 -
41.5215 -+
41.5216 -+#define STACKFRAME 104 /* 16*4 register window +
41.5217 -+ 1*4 struct return +
41.5218 -+ 6*4 args backing store +
41.5219 -+ 3*4 locals */
41.5220 -+
41.5221 -+/* ffi_closure_v8(...)
41.5222 -+
41.5223 -+ Receives the closure argument in %g2. */
41.5224 -+
41.5225 -+ .text
41.5226 -+ .align 8
41.5227 -+ .globl ffi_closure_v8
41.5228 -+
41.5229 -+ffi_closure_v8:
41.5230 -+ .register %g2, #scratch
41.5231 -+.LLFB2:
41.5232 -+ save %sp, -STACKFRAME, %sp
41.5233 -+.LLCFI1:
41.5234 -+
41.5235 -+ ! Store all of the potential argument registers in va_list format.
41.5236 -+ st %i0, [%fp+68+0]
41.5237 -+ st %i1, [%fp+68+4]
41.5238 -+ st %i2, [%fp+68+8]
41.5239 -+ st %i3, [%fp+68+12]
41.5240 -+ st %i4, [%fp+68+16]
41.5241 -+ st %i5, [%fp+68+20]
41.5242 -+
41.5243 -+ ! Call ffi_closure_sparc_inner to do the bulk of the work.
41.5244 -+ mov %g2, %o0
41.5245 -+ add %fp, -8, %o1
41.5246 -+ add %fp, 68, %o2
41.5247 -+ call ffi_closure_sparc_inner
41.5248 -+ mov 0, %o3
41.5249 -+
41.5250 -+ ! Load up the return value in the proper type.
41.5251 -+ cmp %o0, FFI_TYPE_VOID
41.5252 -+ be done1
41.5253 -+
41.5254 -+ cmp %o0, FFI_TYPE_FLOAT
41.5255 -+ be,a done1
41.5256 -+ ld [%fp-8], %f0
41.5257 -+
41.5258 -+ cmp %o0, FFI_TYPE_DOUBLE
41.5259 -+ be,a done1
41.5260 -+ ldd [%fp-8], %f0
41.5261 -+
41.5262 -+ cmp %o0, FFI_TYPE_SINT64
41.5263 -+ be,a integer
41.5264 -+ ld [%fp-4], %i1
41.5265 -+
41.5266 -+ cmp %o0, FFI_TYPE_UINT64
41.5267 -+ be,a integer
41.5268 -+ ld [%fp-4], %i1
41.5269 -+
41.5270 -+integer:
41.5271 -+ ld [%fp-8], %i0
41.5272 -+
41.5273 -+done1:
41.5274 -+ ret
41.5275 -+ restore
41.5276 -+.LLFE2:
41.5277 -+
41.5278 -+.ffi_closure_v8_end:
41.5279 -+ .size ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8
41.5280 -+
41.5281 - #ifdef SPARC64
41.5282 - #define WS 8
41.5283 - #define nword xword
41.5284 -@@ -148,3 +214,26 @@
41.5285 - .byte 0x1f ! uleb128 0x1f
41.5286 - .align WS
41.5287 - .LLEFDE1:
41.5288 -+.LLSFDE2:
41.5289 -+ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
41.5290 -+.LLASFDE2:
41.5291 -+ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
41.5292 -+#ifdef HAVE_AS_SPARC_UA_PCREL
41.5293 -+ .uaword %r_disp32(.LLFB2)
41.5294 -+ .uaword .LLFE2-.LLFB2 ! FDE address range
41.5295 -+#else
41.5296 -+ .align WS
41.5297 -+ .nword .LLFB2
41.5298 -+ .uanword .LLFE2-.LLFB2 ! FDE address range
41.5299 -+#endif
41.5300 -+ .byte 0x0 ! uleb128 0x0; Augmentation size
41.5301 -+ .byte 0x4 ! DW_CFA_advance_loc4
41.5302 -+ .uaword .LLCFI1-.LLFB2
41.5303 -+ .byte 0xd ! DW_CFA_def_cfa_register
41.5304 -+ .byte 0x1e ! uleb128 0x1e
41.5305 -+ .byte 0x2d ! DW_CFA_GNU_window_save
41.5306 -+ .byte 0x9 ! DW_CFA_register
41.5307 -+ .byte 0xf ! uleb128 0xf
41.5308 -+ .byte 0x1f ! uleb128 0x1f
41.5309 -+ .align WS
41.5310 -+.LLEFDE2:
41.5311 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v9.S gcc/libffi/src/sparc/v9.S
41.5312 ---- gcc-3.2.2.orig/libffi/src/sparc/v9.S Mon Apr 29 05:12:04 2002
41.5313 -+++ gcc/libffi/src/sparc/v9.S Sat Jan 4 08:08:56 2003
41.5314 -@@ -1,5 +1,5 @@
41.5315 - /* -----------------------------------------------------------------------
41.5316 -- v9.S - Copyright (c) 2000 Cygnus Solutions
41.5317 -+ v9.S - Copyright (c) 2000, 2003 Cygnus Solutions
41.5318 -
41.5319 - Sparc 64bit Foreign Function Interface
41.5320 -
41.5321 -@@ -99,7 +99,7 @@
41.5322 - cmp %i3, FFI_TYPE_STRUCT
41.5323 - be,pn %icc, dostruct
41.5324 -
41.5325 -- cmp %i3, FFI_TYPE_LONGDOUBLE
41.5326 -+ cmp %i3, FFI_TYPE_LONGDOUBLE
41.5327 - bne,pt %icc, done
41.5328 - nop
41.5329 - std %f0, [%i4+0]
41.5330 -@@ -125,6 +125,88 @@
41.5331 - .ffi_call_V9_end:
41.5332 - .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
41.5333 -
41.5334 -+
41.5335 -+#define STACKFRAME 240 /* 16*8 register window +
41.5336 -+ 6*8 args backing store +
41.5337 -+ 8*8 locals */
41.5338 -+#define FP %fp+STACK_BIAS
41.5339 -+
41.5340 -+/* ffi_closure_v9(...)
41.5341 -+
41.5342 -+ Receives the closure argument in %g1. */
41.5343 -+
41.5344 -+ .text
41.5345 -+ .align 8
41.5346 -+ .globl ffi_closure_v9
41.5347 -+
41.5348 -+ffi_closure_v9:
41.5349 -+.LLFB2:
41.5350 -+ save %sp, -STACKFRAME, %sp
41.5351 -+.LLCFI1:
41.5352 -+
41.5353 -+ ! Store all of the potential argument registers in va_list format.
41.5354 -+ stx %i0, [FP+128+0]
41.5355 -+ stx %i1, [FP+128+8]
41.5356 -+ stx %i2, [FP+128+16]
41.5357 -+ stx %i3, [FP+128+24]
41.5358 -+ stx %i4, [FP+128+32]
41.5359 -+ stx %i5, [FP+128+40]
41.5360 -+
41.5361 -+ ! Store possible floating point argument registers too.
41.5362 -+ std %f0, [FP-48]
41.5363 -+ std %f2, [FP-40]
41.5364 -+ std %f4, [FP-32]
41.5365 -+ std %f6, [FP-24]
41.5366 -+ std %f8, [FP-16]
41.5367 -+ std %f10, [FP-8]
41.5368 -+
41.5369 -+ ! Call ffi_closure_sparc_inner to do the bulk of the work.
41.5370 -+ mov %g1, %o0
41.5371 -+ add %fp, STACK_BIAS-64, %o1
41.5372 -+ add %fp, STACK_BIAS+128, %o2
41.5373 -+ call ffi_closure_sparc_inner
41.5374 -+ add %fp, STACK_BIAS-48, %o3
41.5375 -+
41.5376 -+ ! Load up the return value in the proper type.
41.5377 -+ cmp %o0, FFI_TYPE_VOID
41.5378 -+ be,pn %icc, done1
41.5379 -+
41.5380 -+ cmp %o0, FFI_TYPE_FLOAT
41.5381 -+ be,a,pn %icc, done1
41.5382 -+ ld [FP-64], %f0
41.5383 -+
41.5384 -+ cmp %o0, FFI_TYPE_DOUBLE
41.5385 -+ be,a,pn %icc, done1
41.5386 -+ ldd [FP-64], %f0
41.5387 -+
41.5388 -+ cmp %o0, FFI_TYPE_LONGDOUBLE
41.5389 -+ be,a,pn %icc, longdouble1
41.5390 -+ ldd [FP-64], %f0
41.5391 -+
41.5392 -+ cmp %o0, FFI_TYPE_STRUCT
41.5393 -+ be,pn %icc, struct1
41.5394 -+
41.5395 -+ ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER
41.5396 -+ ldx [FP-64], %i0
41.5397 -+
41.5398 -+done1:
41.5399 -+ ret
41.5400 -+ restore
41.5401 -+
41.5402 -+struct1:
41.5403 -+ ldx [FP-56], %i2
41.5404 -+ ret
41.5405 -+ restore
41.5406 -+
41.5407 -+longdouble1:
41.5408 -+ ldd [FP-56], %f2
41.5409 -+ ret
41.5410 -+ restore
41.5411 -+.LLFE2:
41.5412 -+
41.5413 -+.ffi_closure_v9_end:
41.5414 -+ .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9
41.5415 -+
41.5416 - .section ".eh_frame",#alloc,#write
41.5417 - .LLframe1:
41.5418 - .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
41.5419 -@@ -169,5 +251,27 @@
41.5420 - .byte 0x1f ! uleb128 0x1f
41.5421 - .align 8
41.5422 - .LLEFDE1:
41.5423 --
41.5424 -+.LLSFDE2:
41.5425 -+ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
41.5426 -+.LLASFDE2:
41.5427 -+ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
41.5428 -+#ifdef HAVE_AS_SPARC_UA_PCREL
41.5429 -+ .uaword %r_disp32(.LLFB2)
41.5430 -+ .uaword .LLFE2-.LLFB2 ! FDE address range
41.5431 -+#else
41.5432 -+ .align 8
41.5433 -+ .xword .LLFB2
41.5434 -+ .uaxword .LLFE2-.LLFB2 ! FDE address range
41.5435 -+#endif
41.5436 -+ .byte 0x0 ! uleb128 0x0; Augmentation size
41.5437 -+ .byte 0x4 ! DW_CFA_advance_loc4
41.5438 -+ .uaword .LLCFI1-.LLFB2
41.5439 -+ .byte 0xd ! DW_CFA_def_cfa_register
41.5440 -+ .byte 0x1e ! uleb128 0x1e
41.5441 -+ .byte 0x2d ! DW_CFA_GNU_window_save
41.5442 -+ .byte 0x9 ! DW_CFA_register
41.5443 -+ .byte 0xf ! uleb128 0xf
41.5444 -+ .byte 0x1f ! uleb128 0x1f
41.5445 -+ .align 8
41.5446 -+.LLEFDE2:
41.5447 - #endif
41.5448 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/types.c gcc/libffi/src/types.c
41.5449 ---- gcc-3.2.2.orig/libffi/src/types.c Tue Mar 27 11:39:16 2001
41.5450 -+++ gcc/libffi/src/types.c Wed Nov 27 07:24:05 2002
41.5451 -@@ -42,7 +42,8 @@
41.5452 - FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
41.5453 - FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
41.5454 -
41.5455 --#if defined ALPHA || defined SPARC64
41.5456 -+#if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \
41.5457 -+ || defined IA64
41.5458 -
41.5459 - FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER);
41.5460 -
41.5461 -@@ -52,22 +53,12 @@
41.5462 -
41.5463 - #endif
41.5464 -
41.5465 --#ifdef X86
41.5466 -+#if defined X86 || defined X86_WIN32 || defined ARM || defined M68K
41.5467 -
41.5468 - FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
41.5469 - FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
41.5470 -
41.5471 --#elif defined X86_WIN32
41.5472 --
41.5473 --FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
41.5474 --FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
41.5475 --
41.5476 --#elif defined ARM
41.5477 --
41.5478 --FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
41.5479 --FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
41.5480 --
41.5481 --#elif defined M68K
41.5482 -+#elif defined SH
41.5483 -
41.5484 - FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
41.5485 - FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
41.5486 -@@ -80,12 +71,7 @@
41.5487 - #endif
41.5488 -
41.5489 -
41.5490 --#ifdef X86
41.5491 --
41.5492 --FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
41.5493 --FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
41.5494 --
41.5495 --#elif defined X86_WIN32
41.5496 -+#if defined X86 || defined X86_WIN32 || defined M68K
41.5497 -
41.5498 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
41.5499 - FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
41.5500 -@@ -95,25 +81,25 @@
41.5501 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
41.5502 - FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
41.5503 -
41.5504 --#elif defined M68K
41.5505 -+#elif defined SH
41.5506 -
41.5507 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
41.5508 --FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
41.5509 -+FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
41.5510 -
41.5511 - #elif defined SPARC
41.5512 -
41.5513 - FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
41.5514 --
41.5515 - #ifdef SPARC64
41.5516 --
41.5517 - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
41.5518 --
41.5519 - #else
41.5520 --
41.5521 - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
41.5522 --
41.5523 - #endif
41.5524 -
41.5525 -+#elif defined X86_64
41.5526 -+
41.5527 -+FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
41.5528 -+FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
41.5529 -+
41.5530 - #else
41.5531 -
41.5532 - FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
41.5533 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi.c gcc/libffi/src/x86/ffi.c
41.5534 ---- gcc-3.2.2.orig/libffi/src/x86/ffi.c Tue May 28 18:22:08 2002
41.5535 -+++ gcc/libffi/src/x86/ffi.c Fri Dec 6 10:16:45 2002
41.5536 -@@ -1,5 +1,8 @@
41.5537 - /* -----------------------------------------------------------------------
41.5538 -- ffi.c - Copyright (c) 1996, 1998, 1999 Cygnus Solutions
41.5539 -+ ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc.
41.5540 -+ Copyright (c) 2002 Ranjit Mathew
41.5541 -+ Copyright (c) 2002 Bo Thorsen
41.5542 -+ Copyright (c) 2002 Roger Sayle
41.5543 -
41.5544 - x86 Foreign Function Interface
41.5545 -
41.5546 -@@ -23,6 +26,8 @@
41.5547 - OTHER DEALINGS IN THE SOFTWARE.
41.5548 - ----------------------------------------------------------------------- */
41.5549 -
41.5550 -+#ifndef __x86_64__
41.5551 -+
41.5552 - #include <ffi.h>
41.5553 - #include <ffi_common.h>
41.5554 -
41.5555 -@@ -36,12 +41,10 @@
41.5556 - /*@=exportheader@*/
41.5557 - {
41.5558 - register unsigned int i;
41.5559 -- register int tmp;
41.5560 - register void **p_argv;
41.5561 - register char *argp;
41.5562 - register ffi_type **p_arg;
41.5563 -
41.5564 -- tmp = 0;
41.5565 - argp = stack;
41.5566 -
41.5567 - if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
41.5568 -@@ -148,6 +151,18 @@
41.5569 - /*@=declundef@*/
41.5570 - /*@=exportheader@*/
41.5571 -
41.5572 -+#ifdef X86_WIN32
41.5573 -+/*@-declundef@*/
41.5574 -+/*@-exportheader@*/
41.5575 -+extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
41.5576 -+ /*@out@*/ extended_cif *,
41.5577 -+ unsigned, unsigned,
41.5578 -+ /*@out@*/ unsigned *,
41.5579 -+ void (*fn)());
41.5580 -+/*@=declundef@*/
41.5581 -+/*@=exportheader@*/
41.5582 -+#endif /* X86_WIN32 */
41.5583 -+
41.5584 - void ffi_call(/*@dependent@*/ ffi_cif *cif,
41.5585 - void (*fn)(),
41.5586 - /*@out@*/ void *rvalue,
41.5587 -@@ -180,6 +195,14 @@
41.5588 - cif->flags, ecif.rvalue, fn);
41.5589 - /*@=usedef@*/
41.5590 - break;
41.5591 -+#ifdef X86_WIN32
41.5592 -+ case FFI_STDCALL:
41.5593 -+ /*@-usedef@*/
41.5594 -+ ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
41.5595 -+ cif->flags, ecif.rvalue, fn);
41.5596 -+ /*@=usedef@*/
41.5597 -+ break;
41.5598 -+#endif /* X86_WIN32 */
41.5599 - default:
41.5600 - FFI_ASSERT(0);
41.5601 - break;
41.5602 -@@ -266,12 +289,10 @@
41.5603 - /*@=exportheader@*/
41.5604 - {
41.5605 - register unsigned int i;
41.5606 -- register int tmp;
41.5607 - register void **p_argv;
41.5608 - register char *argp;
41.5609 - register ffi_type **p_arg;
41.5610 -
41.5611 -- tmp = 0;
41.5612 - argp = stack;
41.5613 -
41.5614 - if ( cif->rtype->type == FFI_TYPE_STRUCT ) {
41.5615 -@@ -281,13 +302,14 @@
41.5616 -
41.5617 - p_argv = avalue;
41.5618 -
41.5619 -- for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
41.5620 -+ for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
41.5621 - {
41.5622 - size_t z;
41.5623 -
41.5624 - /* Align if necessary */
41.5625 -- if (((*p_arg)->alignment - 1) & (unsigned) argp)
41.5626 -+ if (((*p_arg)->alignment - 1) & (unsigned) argp) {
41.5627 - argp = (char *) ALIGN(argp, (*p_arg)->alignment);
41.5628 -+ }
41.5629 -
41.5630 - z = (*p_arg)->size;
41.5631 -
41.5632 -@@ -298,7 +320,7 @@
41.5633 - p_argv++;
41.5634 - argp += z;
41.5635 - }
41.5636 --
41.5637 -+
41.5638 - return;
41.5639 - }
41.5640 -
41.5641 -@@ -449,6 +471,15 @@
41.5642 - /*@out@*/ unsigned *,
41.5643 - void (*fn)());
41.5644 -
41.5645 -+#ifdef X86_WIN32
41.5646 -+extern void
41.5647 -+ffi_call_STDCALL(void (*)(char *, extended_cif *),
41.5648 -+ /*@out@*/ extended_cif *,
41.5649 -+ unsigned, unsigned,
41.5650 -+ /*@out@*/ unsigned *,
41.5651 -+ void (*fn)());
41.5652 -+#endif /* X86_WIN32 */
41.5653 -+
41.5654 - void
41.5655 - ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
41.5656 - void (*fn)(),
41.5657 -@@ -483,6 +514,14 @@
41.5658 - cif->flags, ecif.rvalue, fn);
41.5659 - /*@=usedef@*/
41.5660 - break;
41.5661 -+#ifdef X86_WIN32
41.5662 -+ case FFI_STDCALL:
41.5663 -+ /*@-usedef@*/
41.5664 -+ ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
41.5665 -+ cif->flags, ecif.rvalue, fn);
41.5666 -+ /*@=usedef@*/
41.5667 -+ break;
41.5668 -+#endif /* X86_WIN32 */
41.5669 - default:
41.5670 - FFI_ASSERT(0);
41.5671 - break;
41.5672 -@@ -490,3 +529,5 @@
41.5673 - }
41.5674 -
41.5675 - #endif
41.5676 -+
41.5677 -+#endif /* __x86_64__ */
41.5678 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi64.c gcc/libffi/src/x86/ffi64.c
41.5679 ---- gcc-3.2.2.orig/libffi/src/x86/ffi64.c Thu Jan 1 09:00:00 1970
41.5680 -+++ gcc/libffi/src/x86/ffi64.c Wed Jan 29 00:54:28 2003
41.5681 -@@ -0,0 +1,706 @@
41.5682 -+/* -----------------------------------------------------------------------
41.5683 -+ ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
41.5684 -+
41.5685 -+ x86-64 Foreign Function Interface
41.5686 -+
41.5687 -+ Permission is hereby granted, free of charge, to any person obtaining
41.5688 -+ a copy of this software and associated documentation files (the
41.5689 -+ ``Software''), to deal in the Software without restriction, including
41.5690 -+ without limitation the rights to use, copy, modify, merge, publish,
41.5691 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.5692 -+ permit persons to whom the Software is furnished to do so, subject to
41.5693 -+ the following conditions:
41.5694 -+
41.5695 -+ The above copyright notice and this permission notice shall be included
41.5696 -+ in all copies or substantial portions of the Software.
41.5697 -+
41.5698 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.5699 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.5700 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.5701 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.5702 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.5703 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.5704 -+ OTHER DEALINGS IN THE SOFTWARE.
41.5705 -+ ----------------------------------------------------------------------- */
41.5706 -+
41.5707 -+#include <ffi.h>
41.5708 -+#include <ffi_common.h>
41.5709 -+
41.5710 -+#include <stdlib.h>
41.5711 -+#include <stdarg.h>
41.5712 -+
41.5713 -+/* ffi_prep_args is called by the assembly routine once stack space
41.5714 -+ has been allocated for the function's arguments */
41.5715 -+
41.5716 -+#ifdef __x86_64__
41.5717 -+
41.5718 -+#define MAX_GPR_REGS 6
41.5719 -+#define MAX_SSE_REGS 8
41.5720 -+typedef struct
41.5721 -+{
41.5722 -+ /* Registers for argument passing. */
41.5723 -+ long gpr[MAX_GPR_REGS];
41.5724 -+ __int128_t sse[MAX_SSE_REGS];
41.5725 -+
41.5726 -+ /* Stack space for arguments. */
41.5727 -+ char argspace[0];
41.5728 -+} stackLayout;
41.5729 -+
41.5730 -+/* All reference to register classes here is identical to the code in
41.5731 -+ gcc/config/i386/i386.c. Do *not* change one without the other. */
41.5732 -+
41.5733 -+/* Register class used for passing given 64bit part of the argument.
41.5734 -+ These represent classes as documented by the PS ABI, with the exception
41.5735 -+ of SSESF, SSEDF classes, that are basically SSE class, just gcc will
41.5736 -+ use SF or DFmode move instead of DImode to avoid reformating penalties.
41.5737 -+
41.5738 -+ Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
41.5739 -+ whenever possible (upper half does contain padding).
41.5740 -+ */
41.5741 -+enum x86_64_reg_class
41.5742 -+ {
41.5743 -+ X86_64_NO_CLASS,
41.5744 -+ X86_64_INTEGER_CLASS,
41.5745 -+ X86_64_INTEGERSI_CLASS,
41.5746 -+ X86_64_SSE_CLASS,
41.5747 -+ X86_64_SSESF_CLASS,
41.5748 -+ X86_64_SSEDF_CLASS,
41.5749 -+ X86_64_SSEUP_CLASS,
41.5750 -+ X86_64_X87_CLASS,
41.5751 -+ X86_64_X87UP_CLASS,
41.5752 -+ X86_64_MEMORY_CLASS
41.5753 -+ };
41.5754 -+
41.5755 -+#define MAX_CLASSES 4
41.5756 -+
41.5757 -+/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
41.5758 -+ of this code is to classify each 8bytes of incoming argument by the register
41.5759 -+ class and assign registers accordingly. */
41.5760 -+
41.5761 -+/* Return the union class of CLASS1 and CLASS2.
41.5762 -+ See the x86-64 PS ABI for details. */
41.5763 -+
41.5764 -+static enum x86_64_reg_class
41.5765 -+merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
41.5766 -+{
41.5767 -+ /* Rule #1: If both classes are equal, this is the resulting class. */
41.5768 -+ if (class1 == class2)
41.5769 -+ return class1;
41.5770 -+
41.5771 -+ /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
41.5772 -+ the other class. */
41.5773 -+ if (class1 == X86_64_NO_CLASS)
41.5774 -+ return class2;
41.5775 -+ if (class2 == X86_64_NO_CLASS)
41.5776 -+ return class1;
41.5777 -+
41.5778 -+ /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
41.5779 -+ if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
41.5780 -+ return X86_64_MEMORY_CLASS;
41.5781 -+
41.5782 -+ /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
41.5783 -+ if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
41.5784 -+ || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
41.5785 -+ return X86_64_INTEGERSI_CLASS;
41.5786 -+ if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
41.5787 -+ || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
41.5788 -+ return X86_64_INTEGER_CLASS;
41.5789 -+
41.5790 -+ /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
41.5791 -+ if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
41.5792 -+ || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
41.5793 -+ return X86_64_MEMORY_CLASS;
41.5794 -+
41.5795 -+ /* Rule #6: Otherwise class SSE is used. */
41.5796 -+ return X86_64_SSE_CLASS;
41.5797 -+}
41.5798 -+
41.5799 -+/* Classify the argument of type TYPE and mode MODE.
41.5800 -+ CLASSES will be filled by the register class used to pass each word
41.5801 -+ of the operand. The number of words is returned. In case the parameter
41.5802 -+ should be passed in memory, 0 is returned. As a special case for zero
41.5803 -+ sized containers, classes[0] will be NO_CLASS and 1 is returned.
41.5804 -+
41.5805 -+ See the x86-64 PS ABI for details.
41.5806 -+*/
41.5807 -+static int
41.5808 -+classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
41.5809 -+ int *byte_offset)
41.5810 -+{
41.5811 -+ /* First, align to the right place. */
41.5812 -+ *byte_offset = ALIGN(*byte_offset, type->alignment);
41.5813 -+
41.5814 -+ switch (type->type)
41.5815 -+ {
41.5816 -+ case FFI_TYPE_UINT8:
41.5817 -+ case FFI_TYPE_SINT8:
41.5818 -+ case FFI_TYPE_UINT16:
41.5819 -+ case FFI_TYPE_SINT16:
41.5820 -+ case FFI_TYPE_UINT32:
41.5821 -+ case FFI_TYPE_SINT32:
41.5822 -+ case FFI_TYPE_UINT64:
41.5823 -+ case FFI_TYPE_SINT64:
41.5824 -+ case FFI_TYPE_POINTER:
41.5825 -+ if (((*byte_offset) % 8 + type->size) <= 4)
41.5826 -+ classes[0] = X86_64_INTEGERSI_CLASS;
41.5827 -+ else
41.5828 -+ classes[0] = X86_64_INTEGER_CLASS;
41.5829 -+ return 1;
41.5830 -+ case FFI_TYPE_FLOAT:
41.5831 -+ if (((*byte_offset) % 8) == 0)
41.5832 -+ classes[0] = X86_64_SSESF_CLASS;
41.5833 -+ else
41.5834 -+ classes[0] = X86_64_SSE_CLASS;
41.5835 -+ return 1;
41.5836 -+ case FFI_TYPE_DOUBLE:
41.5837 -+ classes[0] = X86_64_SSEDF_CLASS;
41.5838 -+ return 1;
41.5839 -+ case FFI_TYPE_LONGDOUBLE:
41.5840 -+ classes[0] = X86_64_X87_CLASS;
41.5841 -+ classes[1] = X86_64_X87UP_CLASS;
41.5842 -+ return 2;
41.5843 -+ case FFI_TYPE_STRUCT:
41.5844 -+ {
41.5845 -+ const int UNITS_PER_WORD = 8;
41.5846 -+ int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
41.5847 -+ ffi_type **ptr;
41.5848 -+ int i;
41.5849 -+ enum x86_64_reg_class subclasses[MAX_CLASSES];
41.5850 -+
41.5851 -+ /* If the struct is larger than 16 bytes, pass it on the stack. */
41.5852 -+ if (type->size > 16)
41.5853 -+ return 0;
41.5854 -+
41.5855 -+ for (i = 0; i < words; i++)
41.5856 -+ classes[i] = X86_64_NO_CLASS;
41.5857 -+
41.5858 -+ /* Merge the fields of structure. */
41.5859 -+ for (ptr=type->elements; (*ptr)!=NULL; ptr++)
41.5860 -+ {
41.5861 -+ int num;
41.5862 -+
41.5863 -+ num = classify_argument (*ptr, subclasses, byte_offset);
41.5864 -+ if (num == 0)
41.5865 -+ return 0;
41.5866 -+ for (i = 0; i < num; i++)
41.5867 -+ {
41.5868 -+ int pos = *byte_offset / 8;
41.5869 -+ classes[i + pos] =
41.5870 -+ merge_classes (subclasses[i], classes[i + pos]);
41.5871 -+ }
41.5872 -+
41.5873 -+ if ((*ptr)->type != FFI_TYPE_STRUCT)
41.5874 -+ *byte_offset += (*ptr)->size;
41.5875 -+ }
41.5876 -+
41.5877 -+ /* Final merger cleanup. */
41.5878 -+ for (i = 0; i < words; i++)
41.5879 -+ {
41.5880 -+ /* If one class is MEMORY, everything should be passed in
41.5881 -+ memory. */
41.5882 -+ if (classes[i] == X86_64_MEMORY_CLASS)
41.5883 -+ return 0;
41.5884 -+
41.5885 -+ /* The X86_64_SSEUP_CLASS should be always preceded by
41.5886 -+ X86_64_SSE_CLASS. */
41.5887 -+ if (classes[i] == X86_64_SSEUP_CLASS
41.5888 -+ && (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
41.5889 -+ classes[i] = X86_64_SSE_CLASS;
41.5890 -+
41.5891 -+ /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
41.5892 -+ if (classes[i] == X86_64_X87UP_CLASS
41.5893 -+ && (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
41.5894 -+ classes[i] = X86_64_SSE_CLASS;
41.5895 -+ }
41.5896 -+ return words;
41.5897 -+ }
41.5898 -+
41.5899 -+ default:
41.5900 -+ FFI_ASSERT(0);
41.5901 -+ }
41.5902 -+ return 0; /* Never reached. */
41.5903 -+}
41.5904 -+
41.5905 -+/* Examine the argument and return set number of register required in each
41.5906 -+ class. Return 0 iff parameter should be passed in memory. */
41.5907 -+static int
41.5908 -+examine_argument (ffi_type *type, int in_return, int *int_nregs,int *sse_nregs)
41.5909 -+{
41.5910 -+ enum x86_64_reg_class class[MAX_CLASSES];
41.5911 -+ int offset = 0;
41.5912 -+ int n;
41.5913 -+
41.5914 -+ n = classify_argument (type, class, &offset);
41.5915 -+
41.5916 -+ if (n == 0)
41.5917 -+ return 0;
41.5918 -+
41.5919 -+ *int_nregs = 0;
41.5920 -+ *sse_nregs = 0;
41.5921 -+ for (n--; n>=0; n--)
41.5922 -+ switch (class[n])
41.5923 -+ {
41.5924 -+ case X86_64_INTEGER_CLASS:
41.5925 -+ case X86_64_INTEGERSI_CLASS:
41.5926 -+ (*int_nregs)++;
41.5927 -+ break;
41.5928 -+ case X86_64_SSE_CLASS:
41.5929 -+ case X86_64_SSESF_CLASS:
41.5930 -+ case X86_64_SSEDF_CLASS:
41.5931 -+ (*sse_nregs)++;
41.5932 -+ break;
41.5933 -+ case X86_64_NO_CLASS:
41.5934 -+ case X86_64_SSEUP_CLASS:
41.5935 -+ break;
41.5936 -+ case X86_64_X87_CLASS:
41.5937 -+ case X86_64_X87UP_CLASS:
41.5938 -+ if (!in_return)
41.5939 -+ return 0;
41.5940 -+ break;
41.5941 -+ default:
41.5942 -+ abort ();
41.5943 -+ }
41.5944 -+ return 1;
41.5945 -+}
41.5946 -+
41.5947 -+/* Functions to load floats and double to an SSE register placeholder. */
41.5948 -+extern void float2sse (float, __int128_t *);
41.5949 -+extern void double2sse (double, __int128_t *);
41.5950 -+extern void floatfloat2sse (void *, __int128_t *);
41.5951 -+
41.5952 -+/* Functions to put the floats and doubles back. */
41.5953 -+extern float sse2float (__int128_t *);
41.5954 -+extern double sse2double (__int128_t *);
41.5955 -+extern void sse2floatfloat(__int128_t *, void *);
41.5956 -+
41.5957 -+/*@-exportheader@*/
41.5958 -+void
41.5959 -+ffi_prep_args (stackLayout *stack, extended_cif *ecif)
41.5960 -+/*@=exportheader@*/
41.5961 -+{
41.5962 -+ int gprcount, ssecount, i, g, s;
41.5963 -+ void **p_argv;
41.5964 -+ void *argp = &stack->argspace;
41.5965 -+ ffi_type **p_arg;
41.5966 -+
41.5967 -+ /* First check if the return value should be passed in memory. If so,
41.5968 -+ pass the pointer as the first argument. */
41.5969 -+ gprcount = ssecount = 0;
41.5970 -+ if (ecif->cif->rtype->type != FFI_TYPE_VOID
41.5971 -+ && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
41.5972 -+ (void *)stack->gpr[gprcount++] = ecif->rvalue;
41.5973 -+
41.5974 -+ for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
41.5975 -+ i!=0; i--, p_arg++, p_argv++)
41.5976 -+ {
41.5977 -+ int in_register = 0;
41.5978 -+
41.5979 -+ switch ((*p_arg)->type)
41.5980 -+ {
41.5981 -+ case FFI_TYPE_SINT8:
41.5982 -+ case FFI_TYPE_SINT16:
41.5983 -+ case FFI_TYPE_SINT32:
41.5984 -+ case FFI_TYPE_SINT64:
41.5985 -+ case FFI_TYPE_UINT8:
41.5986 -+ case FFI_TYPE_UINT16:
41.5987 -+ case FFI_TYPE_UINT32:
41.5988 -+ case FFI_TYPE_UINT64:
41.5989 -+ case FFI_TYPE_POINTER:
41.5990 -+ if (gprcount < MAX_GPR_REGS)
41.5991 -+ {
41.5992 -+ stack->gpr[gprcount] = 0;
41.5993 -+ stack->gpr[gprcount++] = *(long long *)(*p_argv);
41.5994 -+ in_register = 1;
41.5995 -+ }
41.5996 -+ break;
41.5997 -+
41.5998 -+ case FFI_TYPE_FLOAT:
41.5999 -+ if (ssecount < MAX_SSE_REGS)
41.6000 -+ {
41.6001 -+ float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
41.6002 -+ in_register = 1;
41.6003 -+ }
41.6004 -+ break;
41.6005 -+
41.6006 -+ case FFI_TYPE_DOUBLE:
41.6007 -+ if (ssecount < MAX_SSE_REGS)
41.6008 -+ {
41.6009 -+ double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
41.6010 -+ in_register = 1;
41.6011 -+ }
41.6012 -+ break;
41.6013 -+ }
41.6014 -+
41.6015 -+ if (in_register)
41.6016 -+ continue;
41.6017 -+
41.6018 -+ /* Either all places in registers where filled, or this is a
41.6019 -+ type that potentially goes into a memory slot. */
41.6020 -+ if (examine_argument (*p_arg, 0, &g, &s) == 0
41.6021 -+ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
41.6022 -+ {
41.6023 -+ /* Pass this argument in memory. */
41.6024 -+ argp = (void *)ALIGN(argp, (*p_arg)->alignment);
41.6025 -+ memcpy (argp, *p_argv, (*p_arg)->size);
41.6026 -+ argp += (*p_arg)->size;
41.6027 -+ }
41.6028 -+ else
41.6029 -+ {
41.6030 -+ /* All easy cases are eliminated. Now fire the big guns. */
41.6031 -+
41.6032 -+ enum x86_64_reg_class classes[MAX_CLASSES];
41.6033 -+ int offset = 0, j, num;
41.6034 -+ void *a;
41.6035 -+
41.6036 -+ num = classify_argument (*p_arg, classes, &offset);
41.6037 -+ for (j=0, a=*p_argv; j<num; j++, a+=8)
41.6038 -+ {
41.6039 -+ switch (classes[j])
41.6040 -+ {
41.6041 -+ case X86_64_INTEGER_CLASS:
41.6042 -+ case X86_64_INTEGERSI_CLASS:
41.6043 -+ stack->gpr[gprcount++] = *(long long *)a;
41.6044 -+ break;
41.6045 -+ case X86_64_SSE_CLASS:
41.6046 -+ floatfloat2sse (a, &stack->sse[ssecount++]);
41.6047 -+ break;
41.6048 -+ case X86_64_SSESF_CLASS:
41.6049 -+ float2sse (*(float *)a, &stack->sse[ssecount++]);
41.6050 -+ break;
41.6051 -+ case X86_64_SSEDF_CLASS:
41.6052 -+ double2sse (*(double *)a, &stack->sse[ssecount++]);
41.6053 -+ break;
41.6054 -+ default:
41.6055 -+ abort();
41.6056 -+ }
41.6057 -+ }
41.6058 -+ }
41.6059 -+ }
41.6060 -+}
41.6061 -+
41.6062 -+/* Perform machine dependent cif processing. */
41.6063 -+ffi_status
41.6064 -+ffi_prep_cif_machdep (ffi_cif *cif)
41.6065 -+{
41.6066 -+ int gprcount, ssecount, i, g, s;
41.6067 -+
41.6068 -+ gprcount = ssecount = 0;
41.6069 -+
41.6070 -+ /* Reset the byte count. We handle this size estimation here. */
41.6071 -+ cif->bytes = 0;
41.6072 -+
41.6073 -+ /* If the return value should be passed in memory, pass the pointer
41.6074 -+ as the first argument. The actual memory isn't allocated here. */
41.6075 -+ if (cif->rtype->type != FFI_TYPE_VOID
41.6076 -+ && examine_argument (cif->rtype, 1, &g, &s) == 0)
41.6077 -+ gprcount = 1;
41.6078 -+
41.6079 -+ /* Go over all arguments and determine the way they should be passed.
41.6080 -+ If it's in a register and there is space for it, let that be so. If
41.6081 -+ not, add it's size to the stack byte count. */
41.6082 -+ for (i=0; i<cif->nargs; i++)
41.6083 -+ {
41.6084 -+ if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
41.6085 -+ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
41.6086 -+ {
41.6087 -+ /* This is passed in memory. First align to the basic type. */
41.6088 -+ cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
41.6089 -+
41.6090 -+ /* Stack arguments are *always* at least 8 byte aligned. */
41.6091 -+ cif->bytes = ALIGN(cif->bytes, 8);
41.6092 -+
41.6093 -+ /* Now add the size of this argument. */
41.6094 -+ cif->bytes += cif->arg_types[i]->size;
41.6095 -+ }
41.6096 -+ else
41.6097 -+ {
41.6098 -+ gprcount += g;
41.6099 -+ ssecount += s;
41.6100 -+ }
41.6101 -+ }
41.6102 -+
41.6103 -+ /* Set the flag for the closures return. */
41.6104 -+ switch (cif->rtype->type)
41.6105 -+ {
41.6106 -+ case FFI_TYPE_VOID:
41.6107 -+ case FFI_TYPE_STRUCT:
41.6108 -+ case FFI_TYPE_SINT64:
41.6109 -+ case FFI_TYPE_FLOAT:
41.6110 -+ case FFI_TYPE_DOUBLE:
41.6111 -+ case FFI_TYPE_LONGDOUBLE:
41.6112 -+ cif->flags = (unsigned) cif->rtype->type;
41.6113 -+ break;
41.6114 -+
41.6115 -+ case FFI_TYPE_UINT64:
41.6116 -+ cif->flags = FFI_TYPE_SINT64;
41.6117 -+ break;
41.6118 -+
41.6119 -+ default:
41.6120 -+ cif->flags = FFI_TYPE_INT;
41.6121 -+ break;
41.6122 -+ }
41.6123 -+
41.6124 -+ return FFI_OK;
41.6125 -+}
41.6126 -+
41.6127 -+typedef struct
41.6128 -+{
41.6129 -+ long gpr[2];
41.6130 -+ __int128_t sse[2];
41.6131 -+ long double st0;
41.6132 -+} return_value;
41.6133 -+
41.6134 -+void
41.6135 -+ffi_fill_return_value (return_value *rv, extended_cif *ecif)
41.6136 -+{
41.6137 -+ enum x86_64_reg_class classes[MAX_CLASSES];
41.6138 -+ int i = 0, num;
41.6139 -+ long *gpr = rv->gpr;
41.6140 -+ __int128_t *sse = rv->sse;
41.6141 -+ signed char sc;
41.6142 -+ signed short ss;
41.6143 -+
41.6144 -+ /* This is needed because of the way x86-64 handles signed short
41.6145 -+ integers. */
41.6146 -+ switch (ecif->cif->rtype->type)
41.6147 -+ {
41.6148 -+ case FFI_TYPE_SINT8:
41.6149 -+ sc = *(signed char *)gpr;
41.6150 -+ *(long long *)ecif->rvalue = (long long)sc;
41.6151 -+ return;
41.6152 -+ case FFI_TYPE_SINT16:
41.6153 -+ ss = *(signed short *)gpr;
41.6154 -+ *(long long *)ecif->rvalue = (long long)ss;
41.6155 -+ return;
41.6156 -+ default:
41.6157 -+ /* Just continue. */
41.6158 -+ ;
41.6159 -+ }
41.6160 -+
41.6161 -+ num = classify_argument (ecif->cif->rtype, classes, &i);
41.6162 -+
41.6163 -+ if (num == 0)
41.6164 -+ /* Return in memory. */
41.6165 -+ ecif->rvalue = (void *) rv->gpr[0];
41.6166 -+ else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
41.6167 -+ classes[1] == X86_64_X87UP_CLASS)
41.6168 -+ /* This is a long double (this is easiest to handle this way instead
41.6169 -+ of an eightbyte at a time as in the loop below. */
41.6170 -+ *((long double *)ecif->rvalue) = rv->st0;
41.6171 -+ else
41.6172 -+ {
41.6173 -+ void *a;
41.6174 -+
41.6175 -+ for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
41.6176 -+ {
41.6177 -+ switch (classes[i])
41.6178 -+ {
41.6179 -+ case X86_64_INTEGER_CLASS:
41.6180 -+ case X86_64_INTEGERSI_CLASS:
41.6181 -+ *(long long *)a = *gpr;
41.6182 -+ gpr++;
41.6183 -+ break;
41.6184 -+ case X86_64_SSE_CLASS:
41.6185 -+ sse2floatfloat (sse++, a);
41.6186 -+ break;
41.6187 -+ case X86_64_SSESF_CLASS:
41.6188 -+ *(float *)a = sse2float (sse++);
41.6189 -+ break;
41.6190 -+ case X86_64_SSEDF_CLASS:
41.6191 -+ *(double *)a = sse2double (sse++);
41.6192 -+ break;
41.6193 -+ default:
41.6194 -+ abort();
41.6195 -+ }
41.6196 -+ }
41.6197 -+ }
41.6198 -+}
41.6199 -+
41.6200 -+/*@-declundef@*/
41.6201 -+/*@-exportheader@*/
41.6202 -+extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
41.6203 -+ void (*) (return_value *, extended_cif *),
41.6204 -+ /*@out@*/ extended_cif *,
41.6205 -+ unsigned, /*@out@*/ unsigned *, void (*fn)());
41.6206 -+/*@=declundef@*/
41.6207 -+/*@=exportheader@*/
41.6208 -+
41.6209 -+void ffi_call(/*@dependent@*/ ffi_cif *cif,
41.6210 -+ void (*fn)(),
41.6211 -+ /*@out@*/ void *rvalue,
41.6212 -+ /*@dependent@*/ void **avalue)
41.6213 -+{
41.6214 -+ extended_cif ecif;
41.6215 -+ int dummy;
41.6216 -+
41.6217 -+ ecif.cif = cif;
41.6218 -+ ecif.avalue = avalue;
41.6219 -+
41.6220 -+ /* If the return value is a struct and we don't have a return */
41.6221 -+ /* value address then we need to make one */
41.6222 -+
41.6223 -+ if ((rvalue == NULL) &&
41.6224 -+ (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
41.6225 -+ {
41.6226 -+ /*@-sysunrecog@*/
41.6227 -+ ecif.rvalue = alloca(cif->rtype->size);
41.6228 -+ /*@=sysunrecog@*/
41.6229 -+ }
41.6230 -+ else
41.6231 -+ ecif.rvalue = rvalue;
41.6232 -+
41.6233 -+ /* Stack must always be 16byte aligned. Make it so. */
41.6234 -+ cif->bytes = ALIGN(cif->bytes, 16);
41.6235 -+
41.6236 -+ switch (cif->abi)
41.6237 -+ {
41.6238 -+ case FFI_SYSV:
41.6239 -+ /* Calling 32bit code from 64bit is not possible */
41.6240 -+ FFI_ASSERT(0);
41.6241 -+ break;
41.6242 -+
41.6243 -+ case FFI_UNIX64:
41.6244 -+ /*@-usedef@*/
41.6245 -+ ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
41.6246 -+ cif->bytes, ecif.rvalue, fn);
41.6247 -+ /*@=usedef@*/
41.6248 -+ break;
41.6249 -+
41.6250 -+ default:
41.6251 -+ FFI_ASSERT(0);
41.6252 -+ break;
41.6253 -+ }
41.6254 -+}
41.6255 -+
41.6256 -+extern void ffi_closure_UNIX64(void);
41.6257 -+
41.6258 -+ffi_status
41.6259 -+ffi_prep_closure (ffi_closure* closure,
41.6260 -+ ffi_cif* cif,
41.6261 -+ void (*fun)(ffi_cif*, void*, void**, void*),
41.6262 -+ void *user_data)
41.6263 -+{
41.6264 -+ volatile unsigned short *tramp;
41.6265 -+
41.6266 -+ /* FFI_ASSERT (cif->abi == FFI_OSF); */
41.6267 -+
41.6268 -+ tramp = (volatile unsigned short *) &closure->tramp[0];
41.6269 -+ tramp[0] = 0xbb49; /* mov <code>, %r11 */
41.6270 -+ tramp[5] = 0xba49; /* mov <data>, %r10 */
41.6271 -+ tramp[10] = 0xff49; /* jmp *%r11 */
41.6272 -+ tramp[11] = 0x00e3;
41.6273 -+ *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
41.6274 -+ *(void * volatile *) &tramp[6] = closure;
41.6275 -+
41.6276 -+ closure->cif = cif;
41.6277 -+ closure->fun = fun;
41.6278 -+ closure->user_data = user_data;
41.6279 -+
41.6280 -+ return FFI_OK;
41.6281 -+}
41.6282 -+
41.6283 -+int
41.6284 -+ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
41.6285 -+{
41.6286 -+ ffi_cif *cif;
41.6287 -+ void **avalue;
41.6288 -+ ffi_type **arg_types;
41.6289 -+ long i, avn, argn;
41.6290 -+
41.6291 -+ cif = closure->cif;
41.6292 -+ avalue = alloca(cif->nargs * sizeof(void *));
41.6293 -+
41.6294 -+ argn = 0;
41.6295 -+
41.6296 -+ i = 0;
41.6297 -+ avn = cif->nargs;
41.6298 -+ arg_types = cif->arg_types;
41.6299 -+
41.6300 -+ /* Grab the addresses of the arguments from the stack frame. */
41.6301 -+ while (i < avn)
41.6302 -+ {
41.6303 -+ switch (arg_types[i]->type)
41.6304 -+ {
41.6305 -+ case FFI_TYPE_SINT8:
41.6306 -+ case FFI_TYPE_UINT8:
41.6307 -+ case FFI_TYPE_SINT16:
41.6308 -+ case FFI_TYPE_UINT16:
41.6309 -+ case FFI_TYPE_SINT32:
41.6310 -+ case FFI_TYPE_UINT32:
41.6311 -+ case FFI_TYPE_SINT64:
41.6312 -+ case FFI_TYPE_UINT64:
41.6313 -+ case FFI_TYPE_POINTER:
41.6314 -+ {
41.6315 -+ if (l->gp_offset > 48-8)
41.6316 -+ {
41.6317 -+ avalue[i] = l->overflow_arg_area;
41.6318 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
41.6319 -+ }
41.6320 -+ else
41.6321 -+ {
41.6322 -+ avalue[i] = (char *)l->reg_save_area + l->gp_offset;
41.6323 -+ l->gp_offset += 8;
41.6324 -+ }
41.6325 -+ }
41.6326 -+ break;
41.6327 -+
41.6328 -+ case FFI_TYPE_STRUCT:
41.6329 -+ /* FIXME */
41.6330 -+ FFI_ASSERT(0);
41.6331 -+ break;
41.6332 -+
41.6333 -+ case FFI_TYPE_DOUBLE:
41.6334 -+ {
41.6335 -+ if (l->fp_offset > 176-16)
41.6336 -+ {
41.6337 -+ avalue[i] = l->overflow_arg_area;
41.6338 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
41.6339 -+ }
41.6340 -+ else
41.6341 -+ {
41.6342 -+ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
41.6343 -+ l->fp_offset += 16;
41.6344 -+ }
41.6345 -+ }
41.6346 -+#if DEBUG_FFI
41.6347 -+ fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
41.6348 -+#endif
41.6349 -+ break;
41.6350 -+
41.6351 -+ case FFI_TYPE_FLOAT:
41.6352 -+ {
41.6353 -+ if (l->fp_offset > 176-16)
41.6354 -+ {
41.6355 -+ avalue[i] = l->overflow_arg_area;
41.6356 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
41.6357 -+ }
41.6358 -+ else
41.6359 -+ {
41.6360 -+ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
41.6361 -+ l->fp_offset += 16;
41.6362 -+ }
41.6363 -+ }
41.6364 -+#if DEBUG_FFI
41.6365 -+ fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
41.6366 -+#endif
41.6367 -+ break;
41.6368 -+
41.6369 -+ default:
41.6370 -+ FFI_ASSERT(0);
41.6371 -+ }
41.6372 -+
41.6373 -+ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
41.6374 -+ i++;
41.6375 -+ }
41.6376 -+
41.6377 -+ /* Invoke the closure. */
41.6378 -+ (closure->fun) (cif, rp, avalue, closure->user_data);
41.6379 -+
41.6380 -+ /* FIXME: Structs not supported. */
41.6381 -+ FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
41.6382 -+
41.6383 -+ /* Tell ffi_closure_UNIX64 how to perform return type promotions. */
41.6384 -+
41.6385 -+ return cif->rtype->type;
41.6386 -+}
41.6387 -+#endif /* ifndef __x86_64__ */
41.6388 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/sysv.S gcc/libffi/src/x86/sysv.S
41.6389 ---- gcc-3.2.2.orig/libffi/src/x86/sysv.S Tue Jul 17 02:10:53 2001
41.6390 -+++ gcc/libffi/src/x86/sysv.S Fri Jul 19 08:08:31 2002
41.6391 -@@ -1,5 +1,5 @@
41.6392 - /* -----------------------------------------------------------------------
41.6393 -- sysv.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
41.6394 -+ sysv.S - Copyright (c) 1996, 1998, 2001, 2002 Cygnus Solutions
41.6395 -
41.6396 - X86 Foreign Function Interface
41.6397 -
41.6398 -@@ -23,6 +23,8 @@
41.6399 - OTHER DEALINGS IN THE SOFTWARE.
41.6400 - ----------------------------------------------------------------------- */
41.6401 -
41.6402 -+#ifndef __x86_64__
41.6403 -+
41.6404 - #define LIBFFI_ASM
41.6405 - #include <ffi.h>
41.6406 -
41.6407 -@@ -163,3 +165,5 @@
41.6408 - .align 4
41.6409 - .LEFDE1:
41.6410 - .set .LLFDE1,.LEFDE1-.LSFDE1
41.6411 -+
41.6412 -+#endif /* ifndef __x86_64__ */
41.6413 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/unix64.S gcc/libffi/src/x86/unix64.S
41.6414 ---- gcc-3.2.2.orig/libffi/src/x86/unix64.S Thu Jan 1 09:00:00 1970
41.6415 -+++ gcc/libffi/src/x86/unix64.S Wed Jan 29 00:54:28 2003
41.6416 -@@ -0,0 +1,302 @@
41.6417 -+/* -----------------------------------------------------------------------
41.6418 -+ unix64.S - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
41.6419 -+
41.6420 -+ x86-64 Foreign Function Interface
41.6421 -+
41.6422 -+ Permission is hereby granted, free of charge, to any person obtaining
41.6423 -+ a copy of this software and associated documentation files (the
41.6424 -+ ``Software''), to deal in the Software without restriction, including
41.6425 -+ without limitation the rights to use, copy, modify, merge, publish,
41.6426 -+ distribute, sublicense, and/or sell copies of the Software, and to
41.6427 -+ permit persons to whom the Software is furnished to do so, subject to
41.6428 -+ the following conditions:
41.6429 -+
41.6430 -+ The above copyright notice and this permission notice shall be included
41.6431 -+ in all copies or substantial portions of the Software.
41.6432 -+
41.6433 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
41.6434 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
41.6435 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
41.6436 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
41.6437 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
41.6438 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
41.6439 -+ OTHER DEALINGS IN THE SOFTWARE.
41.6440 -+ ----------------------------------------------------------------------- */
41.6441 -+
41.6442 -+#ifdef __x86_64__
41.6443 -+#define LIBFFI_ASM
41.6444 -+#include <ffi.h>
41.6445 -+
41.6446 -+ .section .rodata
41.6447 -+.LC0:
41.6448 -+ .string "asm in progress %lld\n"
41.6449 -+.LC1:
41.6450 -+ .string "asm in progress\n"
41.6451 -+.text
41.6452 -+ .align 2
41.6453 -+.globl ffi_call_UNIX64
41.6454 -+ .type ffi_call_UNIX64,@function
41.6455 -+
41.6456 -+ffi_call_UNIX64:
41.6457 -+.LFB1:
41.6458 -+ pushq %rbp
41.6459 -+.LCFI0:
41.6460 -+ movq %rsp, %rbp
41.6461 -+.LCFI1:
41.6462 -+ /* Save all arguments */
41.6463 -+ subq $48, %rsp
41.6464 -+.LCFI2:
41.6465 -+ movq %rdi, -8(%rbp) /* ffi_prep_args */
41.6466 -+ movq %rsi, -16(%rbp) /* ffi_fill_return_value */
41.6467 -+ movq %rdx, -24(%rbp) /* ecif */
41.6468 -+ movq %rcx, -32(%rbp) /* cif->bytes */
41.6469 -+ movq %r8, -40(%rbp) /* ecif.rvalue */
41.6470 -+ movq %r9, -48(%rbp) /* fn */
41.6471 -+
41.6472 -+ /* Make room for all of the new args and the register args */
41.6473 -+ addl $176, %ecx
41.6474 -+.LCFI3:
41.6475 -+ subq %rcx, %rsp
41.6476 -+.LCFI4:
41.6477 -+ /* Setup the call to ffi_prep_args. */
41.6478 -+ movq %rdi, %rax /* &ffi_prep_args */
41.6479 -+ movq %rsp, %rdi /* stackLayout */
41.6480 -+ movq %rdx, %rsi /* ecif */
41.6481 -+ call *%rax /* ffi_prep_args(stackLayout, ecif);*/
41.6482 -+
41.6483 -+ /* ffi_prep_args have put all the register contents into the */
41.6484 -+ /* stackLayout struct. Now put the register values in place. */
41.6485 -+ movq (%rsp), %rdi
41.6486 -+ movq 8(%rsp), %rsi
41.6487 -+ movq 16(%rsp), %rdx
41.6488 -+ movq 24(%rsp), %rcx
41.6489 -+ movq 32(%rsp), %r8
41.6490 -+ movq 40(%rsp), %r9
41.6491 -+ movaps 48(%rsp), %xmm0
41.6492 -+ movaps 64(%rsp), %xmm1
41.6493 -+ movaps 80(%rsp), %xmm2
41.6494 -+ movaps 96(%rsp), %xmm3
41.6495 -+ movaps 112(%rsp), %xmm4
41.6496 -+ movaps 128(%rsp), %xmm5
41.6497 -+ movaps 144(%rsp), %xmm6
41.6498 -+ movaps 160(%rsp), %xmm7
41.6499 -+
41.6500 -+ /* Remove space for stackLayout so stack arguments are placed
41.6501 -+ correctly for the call. */
41.6502 -+.LCFI5:
41.6503 -+ addq $176, %rsp
41.6504 -+.LCFI6:
41.6505 -+ /* Call the user function. */
41.6506 -+ call *-48(%rbp)
41.6507 -+
41.6508 -+ /* Make stack space for the return_value struct. */
41.6509 -+ subq $64, %rsp
41.6510 -+
41.6511 -+ /* Fill in all potential return values to this struct. */
41.6512 -+ movq %rax, (%rsp)
41.6513 -+ movq %rdx, 8(%rsp)
41.6514 -+ movaps %xmm0, 16(%rsp)
41.6515 -+ movaps %xmm1, 32(%rsp)
41.6516 -+ fstpt 48(%rsp)
41.6517 -+
41.6518 -+ /* Now call ffi_fill_return_value. */
41.6519 -+ movq %rsp, %rdi /* struct return_value */
41.6520 -+ movq -24(%rbp), %rsi /* ecif */
41.6521 -+ movq -16(%rbp), %rax /* &ffi_fill_return_value */
41.6522 -+ call *%rax /* call it */
41.6523 -+
41.6524 -+ /* And the work is done. */
41.6525 -+ leave
41.6526 -+ ret
41.6527 -+.LFE1:
41.6528 -+.ffi_call_UNIX64_end:
41.6529 -+ .size ffi_call_UNIX64,.ffi_call_UNIX64_end-ffi_call_UNIX64
41.6530 -+
41.6531 -+.text
41.6532 -+ .align 2
41.6533 -+.globl float2sse
41.6534 -+ .type float2sse,@function
41.6535 -+float2sse:
41.6536 -+ /* Save the contents of this sse-float in a pointer. */
41.6537 -+ movaps %xmm0, (%rdi)
41.6538 -+ ret
41.6539 -+
41.6540 -+ .align 2
41.6541 -+.globl floatfloat2sse
41.6542 -+ .type floatfloat2sse,@function
41.6543 -+floatfloat2sse:
41.6544 -+ /* Save the contents of these two sse-floats in a pointer. */
41.6545 -+ movq (%rdi), %xmm0
41.6546 -+ movaps %xmm0, (%rsi)
41.6547 -+ ret
41.6548 -+
41.6549 -+ .align 2
41.6550 -+.globl double2sse
41.6551 -+ .type double2sse,@function
41.6552 -+double2sse:
41.6553 -+ /* Save the contents of this sse-double in a pointer. */
41.6554 -+ movaps %xmm0, (%rdi)
41.6555 -+ ret
41.6556 -+
41.6557 -+ .align 2
41.6558 -+.globl sse2float
41.6559 -+ .type sse2float,@function
41.6560 -+sse2float:
41.6561 -+ /* Save the contents of this sse-float in a pointer. */
41.6562 -+ movaps (%rdi), %xmm0
41.6563 -+ ret
41.6564 -+
41.6565 -+ .align 2
41.6566 -+.globl sse2double
41.6567 -+ .type sse2double,@function
41.6568 -+sse2double:
41.6569 -+ /* Save the contents of this pointer in a sse-double. */
41.6570 -+ movaps (%rdi), %xmm0
41.6571 -+ ret
41.6572 -+
41.6573 -+ .align 2
41.6574 -+.globl sse2floatfloat
41.6575 -+ .type sse2floatfloat,@function
41.6576 -+sse2floatfloat:
41.6577 -+ /* Save the contents of this pointer in two sse-floats. */
41.6578 -+ movaps (%rdi), %xmm0
41.6579 -+ movq %xmm0, (%rsi)
41.6580 -+ ret
41.6581 -+
41.6582 -+ .align 2
41.6583 -+.globl ffi_closure_UNIX64
41.6584 -+ .type ffi_closure_UNIX64,@function
41.6585 -+
41.6586 -+ffi_closure_UNIX64:
41.6587 -+.LFB2:
41.6588 -+ pushq %rbp
41.6589 -+.LCFI10:
41.6590 -+ movq %rsp, %rbp
41.6591 -+.LCFI11:
41.6592 -+ subq $240, %rsp
41.6593 -+.LCFI12:
41.6594 -+ movq %rdi, -176(%rbp)
41.6595 -+ movq %rsi, -168(%rbp)
41.6596 -+ movq %rdx, -160(%rbp)
41.6597 -+ movq %rcx, -152(%rbp)
41.6598 -+ movq %r8, -144(%rbp)
41.6599 -+ movq %r9, -136(%rbp)
41.6600 -+ /* FIXME: We can avoid all this stashing of XMM registers by
41.6601 -+ (in ffi_prep_closure) computing the number of
41.6602 -+ floating-point args and moving it into %rax before calling
41.6603 -+ this function. Once this is done, uncomment the next few
41.6604 -+ lines and only the essential XMM registers will be written
41.6605 -+ to memory. This is a significant saving. */
41.6606 -+/* movzbl %al, %eax */
41.6607 -+/* movq %rax, %rdx */
41.6608 -+/* leaq 0(,%rdx,4), %rax */
41.6609 -+/* leaq 2f(%rip), %rdx */
41.6610 -+/* subq %rax, %rdx */
41.6611 -+ leaq -1(%rbp), %rax
41.6612 -+/* jmp *%rdx */
41.6613 -+ movaps %xmm7, -15(%rax)
41.6614 -+ movaps %xmm6, -31(%rax)
41.6615 -+ movaps %xmm5, -47(%rax)
41.6616 -+ movaps %xmm4, -63(%rax)
41.6617 -+ movaps %xmm3, -79(%rax)
41.6618 -+ movaps %xmm2, -95(%rax)
41.6619 -+ movaps %xmm1, -111(%rax)
41.6620 -+ movaps %xmm0, -127(%rax)
41.6621 -+2:
41.6622 -+ movl %edi, -180(%rbp)
41.6623 -+ movl $0, -224(%rbp)
41.6624 -+ movl $48, -220(%rbp)
41.6625 -+ leaq 16(%rbp), %rax
41.6626 -+ movq %rax, -216(%rbp)
41.6627 -+ leaq -176(%rbp), %rdx
41.6628 -+ movq %rdx, -208(%rbp)
41.6629 -+ leaq -224(%rbp), %rsi
41.6630 -+ movq %r10, %rdi
41.6631 -+ movq %rsp, %rdx
41.6632 -+ call ffi_closure_UNIX64_inner@PLT
41.6633 -+
41.6634 -+ cmpl $FFI_TYPE_FLOAT, %eax
41.6635 -+ je 1f
41.6636 -+ cmpl $FFI_TYPE_DOUBLE, %eax
41.6637 -+ je 2f
41.6638 -+ cmpl $FFI_TYPE_LONGDOUBLE, %eax
41.6639 -+ je 3f
41.6640 -+ cmpl $FFI_TYPE_STRUCT, %eax
41.6641 -+ je 4f
41.6642 -+ popq %rax
41.6643 -+ leave
41.6644 -+ ret
41.6645 -+1:
41.6646 -+2:
41.6647 -+3:
41.6648 -+ movaps -240(%rbp), %xmm0
41.6649 -+ leave
41.6650 -+ ret
41.6651 -+4:
41.6652 -+ leave
41.6653 -+ ret
41.6654 -+.LFE2:
41.6655 -+
41.6656 -+ .section .eh_frame,"a",@progbits
41.6657 -+.Lframe0:
41.6658 -+ .long .LECIE1-.LSCIE1
41.6659 -+.LSCIE1:
41.6660 -+ .long 0x0
41.6661 -+ .byte 0x1
41.6662 -+ .string "zR"
41.6663 -+ .uleb128 0x1
41.6664 -+ .sleb128 -8
41.6665 -+ .byte 0x10
41.6666 -+ .uleb128 0x1
41.6667 -+ .byte 0x1b
41.6668 -+ .byte 0xc
41.6669 -+ .uleb128 0x7
41.6670 -+ .uleb128 0x8
41.6671 -+ .byte 0x90
41.6672 -+ .uleb128 0x1
41.6673 -+ .align 8
41.6674 -+.LECIE1:
41.6675 -+.LSFDE1:
41.6676 -+ .long .LEFDE1-.LASFDE1
41.6677 -+.LASFDE1:
41.6678 -+ .long .LASFDE1-.Lframe0
41.6679 -+
41.6680 -+ .long .LFB1-.
41.6681 -+ .long .LFE1-.LFB1
41.6682 -+ .uleb128 0x0
41.6683 -+ .byte 0x4 # DW_CFA_advance_loc4
41.6684 -+ .long .LCFI0-.LFB1
41.6685 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.6686 -+ .uleb128 0x10
41.6687 -+ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
41.6688 -+ .uleb128 0x2
41.6689 -+ .byte 0x4 # DW_CFA_advance_loc4
41.6690 -+ .long .LCFI1-.LCFI0
41.6691 -+ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
41.6692 -+ .uleb128 0x2
41.6693 -+ .byte 0xd # DW_CFA_def_cfa_reg: r6
41.6694 -+ .uleb128 0x6
41.6695 -+ .align 8
41.6696 -+.LEFDE1:
41.6697 -+.LSFDE3:
41.6698 -+ .long .LEFDE3-.LASFDE3 # FDE Length
41.6699 -+.LASFDE3:
41.6700 -+ .long .LASFDE3-.Lframe0 # FDE CIE offset
41.6701 -+
41.6702 -+ .long .LFB2-. # FDE initial location
41.6703 -+ .long .LFE2-.LFB2 # FDE address range
41.6704 -+ .uleb128 0x0 # Augmentation size
41.6705 -+ .byte 0x4 # DW_CFA_advance_loc4
41.6706 -+ .long .LCFI10-.LFB2
41.6707 -+ .byte 0xe # DW_CFA_def_cfa_offset
41.6708 -+ .uleb128 0x10
41.6709 -+ .byte 0x86 # DW_CFA_offset, column 0x6
41.6710 -+ .uleb128 0x2
41.6711 -+ .byte 0x4 # DW_CFA_advance_loc4
41.6712 -+ .long .LCFI11-.LCFI10
41.6713 -+ .byte 0xd # DW_CFA_def_cfa_register
41.6714 -+ .uleb128 0x6
41.6715 -+ .align 8
41.6716 -+.LEFDE3:
41.6717 -+
41.6718 -+#endif /* __x86_64__ */
41.6719 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/win32.S gcc/libffi/src/x86/win32.S
41.6720 ---- gcc-3.2.2.orig/libffi/src/x86/win32.S Tue Mar 27 11:39:16 2001
41.6721 -+++ gcc/libffi/src/x86/win32.S Fri Dec 6 10:16:45 2002
41.6722 -@@ -1,5 +1,8 @@
41.6723 - /* -----------------------------------------------------------------------
41.6724 -- win32.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
41.6725 -+ win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc.
41.6726 -+ Copyright (c) 2001 John Beniton
41.6727 -+ Copyright (c) 2002 Ranjit Mathew
41.6728 -+
41.6729 -
41.6730 - X86 Foreign Function Interface
41.6731 -
41.6732 -@@ -52,7 +55,10 @@
41.6733 - # Return stack to previous state and call the function
41.6734 - addl $8,%esp
41.6735 -
41.6736 -- call *28(%ebp)
41.6737 -+ # FIXME: Align the stack to a 128-bit boundary to avoid
41.6738 -+ # potential performance hits.
41.6739 -+
41.6740 -+ call *28(%ebp)
41.6741 -
41.6742 - # Remove the space we pushed for the args
41.6743 - movl 16(%ebp),%ecx
41.6744 -@@ -123,3 +129,98 @@
41.6745 - ret
41.6746 -
41.6747 - .ffi_call_SYSV_end:
41.6748 -+
41.6749 -+ # This assumes we are using gas.
41.6750 -+ .balign 16
41.6751 -+.globl _ffi_call_STDCALL
41.6752 -+
41.6753 -+_ffi_call_STDCALL:
41.6754 -+ pushl %ebp
41.6755 -+ movl %esp,%ebp
41.6756 -+
41.6757 -+ # Make room for all of the new args.
41.6758 -+ movl 16(%ebp),%ecx
41.6759 -+ subl %ecx,%esp
41.6760 -+
41.6761 -+ movl %esp,%eax
41.6762 -+
41.6763 -+ # Place all of the ffi_prep_args in position
41.6764 -+ pushl 12(%ebp)
41.6765 -+ pushl %eax
41.6766 -+ call *8(%ebp)
41.6767 -+
41.6768 -+ # Return stack to previous state and call the function
41.6769 -+ addl $8,%esp
41.6770 -+
41.6771 -+ # FIXME: Align the stack to a 128-bit boundary to avoid
41.6772 -+ # potential performance hits.
41.6773 -+
41.6774 -+ call *28(%ebp)
41.6775 -+
41.6776 -+ # stdcall functions pop arguments off the stack themselves
41.6777 -+
41.6778 -+ # Load %ecx with the return type code
41.6779 -+ movl 20(%ebp),%ecx
41.6780 -+
41.6781 -+ # If the return value pointer is NULL, assume no return value.
41.6782 -+ cmpl $0,24(%ebp)
41.6783 -+ jne sc_retint
41.6784 -+
41.6785 -+ # Even if there is no space for the return value, we are
41.6786 -+ # obliged to handle floating-point values.
41.6787 -+ cmpl $FFI_TYPE_FLOAT,%ecx
41.6788 -+ jne sc_noretval
41.6789 -+ fstp %st(0)
41.6790 -+
41.6791 -+ jmp sc_epilogue
41.6792 -+
41.6793 -+sc_retint:
41.6794 -+ cmpl $FFI_TYPE_INT,%ecx
41.6795 -+ jne sc_retfloat
41.6796 -+ # Load %ecx with the pointer to storage for the return value
41.6797 -+ movl 24(%ebp),%ecx
41.6798 -+ movl %eax,0(%ecx)
41.6799 -+ jmp sc_epilogue
41.6800 -+
41.6801 -+sc_retfloat:
41.6802 -+ cmpl $FFI_TYPE_FLOAT,%ecx
41.6803 -+ jne sc_retdouble
41.6804 -+ # Load %ecx with the pointer to storage for the return value
41.6805 -+ movl 24(%ebp),%ecx
41.6806 -+ fstps (%ecx)
41.6807 -+ jmp sc_epilogue
41.6808 -+
41.6809 -+sc_retdouble:
41.6810 -+ cmpl $FFI_TYPE_DOUBLE,%ecx
41.6811 -+ jne sc_retlongdouble
41.6812 -+ # Load %ecx with the pointer to storage for the return value
41.6813 -+ movl 24(%ebp),%ecx
41.6814 -+ fstpl (%ecx)
41.6815 -+ jmp sc_epilogue
41.6816 -+
41.6817 -+sc_retlongdouble:
41.6818 -+ cmpl $FFI_TYPE_LONGDOUBLE,%ecx
41.6819 -+ jne sc_retint64
41.6820 -+ # Load %ecx with the pointer to storage for the return value
41.6821 -+ movl 24(%ebp),%ecx
41.6822 -+ fstpt (%ecx)
41.6823 -+ jmp sc_epilogue
41.6824 -+
41.6825 -+sc_retint64:
41.6826 -+ cmpl $FFI_TYPE_SINT64,%ecx
41.6827 -+ jne sc_retstruct
41.6828 -+ # Load %ecx with the pointer to storage for the return value
41.6829 -+ movl 24(%ebp),%ecx
41.6830 -+ movl %eax,0(%ecx)
41.6831 -+ movl %edx,4(%ecx)
41.6832 -+
41.6833 -+sc_retstruct:
41.6834 -+ # Nothing to do!
41.6835 -+
41.6836 -+sc_noretval:
41.6837 -+sc_epilogue:
41.6838 -+ movl %ebp,%esp
41.6839 -+ popl %ebp
41.6840 -+ ret
41.6841 -+
41.6842 -+.ffi_call_STDCALL_end:
41.6843 ---- gcc-3.2.2.orig/libjava/configure.host Mon Jun 10 13:15:26 2002
41.6844 -+++ gcc-3.2.2/libjava/configure.host Sat Feb 15 19:57:25 2003
41.6845 -@@ -115,6 +115,12 @@
41.6846 - enable_getenv_properties_default=no
41.6847 - enable_main_args_default=no
41.6848 - ;;
41.6849 -+ sh-* | sh[34]*-*)
41.6850 -+ sysdeps_dir=sh
41.6851 -+ libgcj_flags="${libgcj_flags} -mieee"
41.6852 -+ libgcj_interpreter=yes
41.6853 -+ enable_hash_synchronization_default=yes
41.6854 -+ ;;
41.6855 - esac
41.6856 -
41.6857 - # This case statement supports generic port properties and may refine
41.6858 -@@ -126,7 +132,8 @@
41.6859 - powerpc*-linux* | \
41.6860 - alpha*-linux* | \
41.6861 - sparc*-linux* | \
41.6862 -- ia64-*)
41.6863 -+ ia64-* | \
41.6864 -+ sh-linux* | sh[34]*-linux*)
41.6865 - can_unwind_signal=yes
41.6866 - ;;
41.6867 - *-*-darwin*)
42.1 --- a/patches/gcc/3.2.3/150-ppc-asm-spec.patch Wed Oct 21 18:08:31 2009 +0200
42.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
42.3 @@ -1,54 +0,0 @@
42.4 -Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
42.5 -
42.6 -Fixes the following errors when building gcc for ppc7450:
42.7 -
42.8 -/tmp/ccYph3gd.s: Assembler messages:
42.9 -/tmp/ccYph3gd.s:3823: Error: Unrecognized opcode: `mfvrsave'
42.10 -/tmp/ccYph3gd.s:3857: Error: Unrecognized opcode: `stvx'
42.11 -/tmp/ccYph3gd.s:4026: Error: Unrecognized opcode: `lvx'
42.12 -/tmp/ccYph3gd.s:4027: Error: Unrecognized opcode: `mtvrsave'
42.13 -make[2]: *** [libgcc/./unwind-dw2.o] Error 1
42.14 -make[2]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.3.2/build-gcc-core/gcc'
42.15 -make[1]: *** [stmp-multilib] Error 2
42.16 -make[1]: Leaving directory `/opt/crosstool-0.28-rc35/build/powerpc-7450-linux-gnu/gcc-3.2.3-glibc-2.3.2/build-gcc-core/gcc'
42.17 -make: *** [all-gcc] Error 2
42.18 -
42.19 -Note that the "-mcpu=7450" option must appear on the "gcc" command line in
42.20 -order for "-maltivec" to be passed to the assembler. Or, "-maltivec" itself
42.21 -may be passed to the "gcc" command.
42.22 -
42.23 -Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
42.24 -
42.25 -===================================================================
42.26 ---- gcc-3.2.3/gcc/config/rs6000/rs6000.h~ 2003-03-29 07:39:20.000000000 -0500
42.27 -+++ gcc-3.2.3/gcc/config/rs6000/rs6000.h 2004-08-23 16:33:21.000000000 -0400
42.28 -@@ -77,8 +77,8 @@
42.29 - %{mcpu=604e: -D_ARCH_PPC} \
42.30 - %{mcpu=620: -D_ARCH_PPC} \
42.31 - %{mcpu=740: -D_ARCH_PPC} \
42.32 --%{mcpu=7400: -D_ARCH_PPC} \
42.33 --%{mcpu=7450: -D_ARCH_PPC} \
42.34 -+%{mcpu=7400: -D_ARCH_PPC -D__ALTIVEC__} \
42.35 -+%{mcpu=7450: -D_ARCH_PPC -D__ALTIVEC__} \
42.36 - %{mcpu=750: -D_ARCH_PPC} \
42.37 - %{mcpu=801: -D_ARCH_PPC} \
42.38 - %{mcpu=821: -D_ARCH_PPC} \
42.39 -@@ -117,14 +117,15 @@
42.40 - %{mcpu=604e: -mppc} \
42.41 - %{mcpu=620: -mppc} \
42.42 - %{mcpu=740: -mppc} \
42.43 --%{mcpu=7400: -mppc} \
42.44 --%{mcpu=7450: -mppc} \
42.45 -+%{mcpu=7400: -mppc -maltivec} \
42.46 -+%{mcpu=7450: -mppc -maltivec} \
42.47 - %{mcpu=750: -mppc} \
42.48 - %{mcpu=801: -mppc} \
42.49 - %{mcpu=821: -mppc} \
42.50 - %{mcpu=823: -mppc} \
42.51 - %{mcpu=860: -mppc} \
42.52 --%{maltivec: -maltivec}"
42.53 -+%{maltivec: -maltivec} \
42.54 -+-many"
42.55 -
42.56 - #define CPP_DEFAULT_SPEC ""
42.57 -
43.1 --- a/patches/gcc/3.2.3/160-trap-posix.patch Wed Oct 21 18:08:31 2009 +0200
43.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43.3 @@ -1,45 +0,0 @@
43.4 -#
43.5 -# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
43.6 -#
43.7 -# Error:
43.8 -#
43.9 -# creating libintl.h
43.10 -# Configuring etc...
43.11 -# loading cache ../config.cache
43.12 -# checking for a BSD compatible install... (cached) /usr/bin/install -c
43.13 -# creating ./config.status
43.14 -# creating Makefile
43.15 -# trap: usage: trap [-lp] [[arg] signal_spec ...]
43.16 -#
43.17 -# Description:
43.18 -#
43.19 -# non-posix conform usage of trap causes bash >= 3.0 to fail
43.20 -#
43.21 -# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
43.22 -#
43.23 -# Status:
43.24 -#
43.25 -# fixed in gcc >= 3.3.5
43.26 -# backport of gcc-3.3.5 fix
43.27 -#
43.28 -diff -ruN gcc-3.2.3-orig/configure gcc-3.2.3/configure
43.29 ---- gcc-3.2.3-orig/configure 2002-06-24 18:14:28.000000000 +0200
43.30 -+++ gcc-3.2.3/configure 2005-04-20 18:42:49.000000000 +0200
43.31 -@@ -697,7 +697,7 @@
43.32 - if test -f skip-this-dir; then
43.33 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
43.34 - # and reset the trap handler.
43.35 -- trap 0
43.36 -+ trap '' 0
43.37 - rm -rf Makefile* ${tmpdir}
43.38 - # Execute the final clean-up actions
43.39 - ${config_shell} skip-this-dir
43.40 -@@ -1615,7 +1615,7 @@
43.41 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
43.42 - # and reset the trap handler.
43.43 - rm -rf ${tmpdir}
43.44 --trap 0
43.45 -+trap '' 0
43.46 -
43.47 - exit 0
43.48 -
44.1 --- a/patches/gcc/3.2.3/170-libstdc++-v3-dg.exp.patch Wed Oct 21 18:08:31 2009 +0200
44.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
44.3 @@ -1,54 +0,0 @@
44.4 -Without this patch, the command
44.5 -
44.6 -RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
44.7 -
44.8 -fails in two ways:
44.9 -1. the -L option meant to locate the testsuite directory is incorrect, and
44.10 -2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
44.11 -is the native compiler is invoked when we really wanted to invoke the cross-compiler
44.12 -we just built.
44.13 -
44.14 -Here's an example log of the problem in action. Every testcase fails, this shows just one:
44.15 --------------
44.16 -Invoking the compiler as g++ -ggdb3 -DDEBUG_ASSERT -I/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite /home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc -g -O2 -DDEBUG_ASSERT -L/testsuite -lv3test -lm -o ./binders.exe
44.17 -compiler exited with status 1
44.18 -output is:
44.19 -/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h: In method `void binder2nd<mem_fun1_ref_t<void,Elem,int> >::operator ()(const Elem &) const':^M
44.20 -/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_algo.h:83: instantiated from `for_each<Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> > >(Elem *, Elem *, binder2nd<mem_fun1_ref_t<void,Elem,int> >)'^M
44.21 -/home3/dank/wk/ixos/dap_interim/linux/3rdParty/crosstool/crosstool-0.12/build/powerpc-750-linux-gnu/gcc-3.3-glibc-2.2.5/gcc-3.3/libstdc++-v3/testsuite/20_util/binders.cc:43: instantiated from here^M
44.22 -/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:224: conversion from `const Elem' to `Elem &' discards qualifiers^M
44.23 -/usr/lib/gcc-lib/i386-linux/2.95.4/../../../../include/g++-3/stl_function.h:622: in passing argument 1 of `mem_fun1_ref_t<void,Elem,int>::operator ()(Elem &, int) const'^M
44.24 -...
44.25 -FAIL: 20_util/binders.cc (test for excess errors)
44.26 -WARNING: 20_util/binders.cc compilation failed to produce executable
44.27 --------------
44.28 -
44.29 -And here's the patch. I'm not happy with it, and it probably gets some cases wrong,
44.30 -but it seems to work for the common native case and for my cross-compiler case.
44.31 -
44.32 ---- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old Sun Jul 13 10:42:01 2003
44.33 -+++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp Sun Jul 13 11:39:54 2003
44.34 -@@ -46,8 +46,23 @@
44.35 - global gluefile wrap_flags
44.36 - global ld_library_path
44.37 - global tool_root_dir
44.38 -+ global target_triplet
44.39 -
44.40 - set blddir [lookfor_file [get_multilibs] libstdc++-v3]
44.41 -+ if { $blddir == "" } {
44.42 -+ set multilibs [get_multilibs]
44.43 -+ # FIXME: assume multilib only one level deep
44.44 -+ set multisub [file tail $multilibs]
44.45 -+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
44.46 -+ set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
44.47 -+ }
44.48 -+ if { $blddir == "" } {
44.49 -+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
44.50 -+ set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
44.51 -+ }
44.52 -+ if { $blddir == "" } {
44.53 -+ error "Can't find libstdc++-v3"
44.54 -+ }
44.55 -
44.56 - # By default, we assume we want to run program images.
44.57 - global dg-do-what-default
45.1 --- a/patches/gcc/3.2.3/README-mips Wed Oct 21 18:08:31 2009 +0200
45.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
45.3 @@ -1,1648 +0,0 @@
45.4 -See also http://www.spinics.net/lists/mips/msg12236.html
45.5 -
45.6 -ftp://ftp.linux-mips.org/pub/linux/mips/redhat/7.3/test/SRPMS/gcc-3.2-7.1.src.rpm
45.7 -contains the following patches and spec file.
45.8 -You may wish to investigate some of these patches; I haven't.
45.9 -I think this is mostly the Red Hat 8.0 srpm for a prerelease gcc-3.2, plus a couple
45.10 -mips specific fixes, but you'd have to ask H.J.Lu or compare with the regular
45.11 -Red Hat 8.0 srpm to find out.
45.12 -In any case, the spec file is interesting reading.
45.13 -- Dan K.
45.14 -
45.15 -total 1164
45.16 - 4 boehm-gc-LINUX.patch
45.17 - 4 boehm-gc-mips.patch
45.18 - 4 contrib-touch.patch
45.19 - 8 gcc-arch.patch
45.20 - 4 gcc-c++-template.patch
45.21 - 4 gcc-copy.patch
45.22 - 4 gcc-cross-bfd.patch
45.23 - 4 gcc-cross.patch
45.24 - 4 gcc-gcj-cross.patch
45.25 - 4 gcc-libffi-mips.patch
45.26 - 4 gcc-libgcc.patch
45.27 - 480 gcc-libstdc++-glibc-2.2.patch
45.28 - 4 gcc-libstdc++-mips.patch
45.29 - 4 gcc-linux-atexit.patch
45.30 - 8 gcc-linux-crt.patch
45.31 - 4 gcc-mips-coff.patch
45.32 - 4 gcc-mips-file.patch
45.33 - 4 gcc-mips-ieee.patch
45.34 - 4 gcc-mips-return.patch
45.35 - 4 gcc-ppc-linux.patch
45.36 - 8 gcc-sizeof.patch
45.37 - 4 gcc-test-atexit.patch
45.38 - 4 gcc-testsuite-c++.patch
45.39 - 4 gcc-var.patch
45.40 - 8 gcc32-2.96-RH-compat.patch
45.41 - 4 gcc32-ada-addr2line.patch
45.42 - 8 gcc32-ada-link.patch
45.43 - 12 gcc32-attr-visibility.patch
45.44 - 4 gcc32-attr-visibility2.patch
45.45 - 4 gcc32-attr-visibility3.patch
45.46 - 4 gcc32-attr-visibility4.patch
45.47 - 4 gcc32-attr-visibility5.patch
45.48 - 8 gcc32-boehm-gc-libs.patch
45.49 - 4 gcc32-bogus-inline.patch
45.50 - 4 gcc32-c++-nrv-test.patch
45.51 - 4 gcc32-c++-pretty_function.patch
45.52 - 16 gcc32-c++-tail-pad-backout.patch
45.53 - 4 gcc32-c++-tsubst-asm.patch
45.54 - 4 gcc32-cfg-eh.patch
45.55 - 4 gcc32-debug-pr7241.patch
45.56 - 4 gcc32-doc-gcov.patch
45.57 - 4 gcc32-duplicate-decl.patch
45.58 - 4 gcc32-dwarf2-pr6381.patch
45.59 - 4 gcc32-dwarf2-pr6436-test.patch
45.60 - 4 gcc32-fde-merge-compat.patch
45.61 - 4 gcc32-fold-const-associate.patch
45.62 - 4 gcc32-fold-const2.patch
45.63 - 24 gcc32-hard-reg-sharing.patch
45.64 - 4 gcc32-hard-reg-sharing2.patch
45.65 - 4 gcc32-i386-default-momit-leaf-frame-pointer.patch
45.66 - 4 gcc32-i386-memtest-test.patch
45.67 - 4 gcc32-i386-no-default-momit-leaf-frame-pointer.patch
45.68 - 4 gcc32-i386-pic-label-thunk.patch
45.69 - 4 gcc32-i386-pr7242.patch
45.70 - 4 gcc32-i386-profile-olfp.patch
45.71 - 4 gcc32-inline-label.patch
45.72 - 4 gcc32-interface_only.patch
45.73 - 4 gcc32-java-no-rpath.patch
45.74 - 20 gcc32-libstdc++-glibc23-1.patch
45.75 - 4 gcc32-libstdc++-glibc23-2.patch
45.76 - 4 gcc32-libstdc++-glibc23-3.patch
45.77 - 4 gcc32-libstdc++-glibc23-4.patch
45.78 - 4 gcc32-loop-prefetch.patch
45.79 - 4 gcc32-pr6842.patch
45.80 - 8 gcc32-rh69989.patch
45.81 - 40 gcc32-s390-java.patch
45.82 - 4 gcc32-sparc-sll1.patch
45.83 - 4 gcc32-test-rh65771.patch
45.84 - 8 gcc32-test-rotate.patch
45.85 - 12 gcc32-tls-dwarf2.patch
45.86 - 140 gcc32-tls.patch
45.87 - 4 gcc32-tls2.patch
45.88 - 4 gcc32-tls3.patch
45.89 - 4 gcc32-tls4.patch
45.90 - 4 gcc32-tls5.patch
45.91 - 24 gcc32-tree-code.patch
45.92 - 4 gcc32-trunc_int_for_mode.patch
45.93 - 4 gcc32-typeof-asm.patch
45.94 - 4 gcc32-x86_64-libiberty-pic.patch
45.95 - 4 gcc32-x86_64-pr7559.patch
45.96 - 4 gcc32-x86_64-q_regs_operand.patch
45.97 - 4 gcc32-x86_64-rip-lowercase.patch
45.98 - 4 libjava-cross.patch
45.99 - 4 libtool-libs.patch
45.100 - 4 libtool-mips.patch
45.101 -
45.102 ----------- gcc32.spec ---------
45.103 -
45.104 -%if %{_arch} != %{_build_arch}
45.105 -%define cross_compile 1
45.106 -%else
45.107 -%define cross_compile 0
45.108 -%endif
45.109 -%{?_with_crosscompile: %{expand: %%define cross_compile 1}}
45.110 -
45.111 -%if %{cross_compile}
45.112 -%define make_check 0
45.113 -%else
45.114 -%define make_check 1
45.115 -%endif
45.116 -%{?_without_check: %{expand: %%define make_check 0}}
45.117 -%{?_with_check: %{expand: %%define make_check 1}}
45.118 -
45.119 -%define default 0
45.120 -%{?_with_default: %{expand: %%define default 1}}
45.121 -
45.122 -%define gcconly 0
45.123 -%{?_with_gcconly: %{expand: %%define gcconly 1}}
45.124 -
45.125 -%define DATE 20020903
45.126 -%define gcc_version 3.2
45.127 -%define gcc_release 7.1
45.128 -%ifarch %{ix86} alpha ia64 ppc
45.129 -%define build_ada 1
45.130 -%else
45.131 -%define build_ada 0
45.132 -%endif
45.133 -%{?_without_ada: %{expand: %%define build_ada 0}}
45.134 -%if %{cross_compile}
45.135 -%define build_ada 0
45.136 -%endif
45.137 -Summary: Various compilers (C, C++, Objective-C, Java, ...)
45.138 -%if !%{gcconly}
45.139 -Name: gcc
45.140 -Version: 3.2
45.141 -Release: %{gcc_release}
45.142 -%else
45.143 -Name: gcc-%{gcc_version}
45.144 -Version: %{gcc_release}
45.145 -Release: 1
45.146 -%endif
45.147 -Copyright: GPL
45.148 -Group: Development/Languages
45.149 -Source0: gcc-%{version}-%{DATE}.tar.bz2
45.150 -URL: http://gcc.gnu.org
45.151 -BuildRoot: %{_tmppath}/%{name}-%{version}-root
45.152 -BuildRequires: binutils >= 2.12.90.0.9-1
45.153 -BuildRequires: zlib-devel, gettext, dejagnu
45.154 -# Make sure pthread.h doesn't contain __thread tokens
45.155 -BuildRequires: glibc-devel >= 2.2.5-36.2
45.156 -%if %{build_ada}
45.157 -# Ada requires Ada to build
45.158 -BuildRequires: gcc-gnat >= 3.1, libgnat >= 3.1
45.159 -%endif
45.160 -Requires: cpp = %{version}-%{release}
45.161 -# Need .eh_frame ld optimizations
45.162 -# Need proper visibility support
45.163 -Requires: binutils >= 2.12.90.0.7-1
45.164 -# Make sure gdb will understand DW_FORM_strp
45.165 -Conflicts: gdb < 5.1-2
45.166 -Requires: glibc-devel >= 2.2.5-36.2
45.167 -Requires: libgcc >= %{version}-%{release}
45.168 -%if !%{gcconly}
45.169 -Obsoletes: gcc3
45.170 -%endif
45.171 -Prereq: /sbin/install-info
45.172 -
45.173 -Patch1: gcc32-2.96-RH-compat.patch
45.174 -Patch2: gcc32-boehm-gc-libs.patch
45.175 -Patch3: gcc32-bogus-inline.patch
45.176 -Patch6: gcc32-fde-merge-compat.patch
45.177 -Patch7: gcc32-attr-visibility.patch
45.178 -Patch8: gcc32-attr-visibility2.patch
45.179 -Patch9: gcc32-duplicate-decl.patch
45.180 -Patch10: gcc32-trunc_int_for_mode.patch
45.181 -Patch11: gcc32-sparc-sll1.patch
45.182 -Patch12: gcc32-x86_64-q_regs_operand.patch
45.183 -Patch13: gcc32-dwarf2-pr6381.patch
45.184 -Patch14: gcc32-dwarf2-pr6436-test.patch
45.185 -Patch15: gcc32-c++-pretty_function.patch
45.186 -Patch16: gcc32-c++-tsubst-asm.patch
45.187 -Patch18: gcc32-i386-memtest-test.patch
45.188 -Patch19: gcc32-fold-const2.patch
45.189 -Patch21: gcc32-ada-addr2line.patch
45.190 -Patch22: gcc32-ada-link.patch
45.191 -Patch23: gcc32-java-no-rpath.patch
45.192 -Patch25: gcc32-s390-java.patch
45.193 -Patch26: gcc32-test-rotate.patch
45.194 -Patch27: gcc32-x86_64-libiberty-pic.patch
45.195 -Patch29: gcc32-test-rh65771.patch
45.196 -Patch30: gcc32-i386-default-momit-leaf-frame-pointer.patch
45.197 -Patch31: gcc32-i386-pic-label-thunk.patch
45.198 -Patch34: gcc32-pr6842.patch
45.199 -Patch35: gcc32-tls.patch
45.200 -Patch36: gcc32-i386-profile-olfp.patch
45.201 -Patch37: gcc32-tree-code.patch
45.202 -Patch38: gcc32-hard-reg-sharing.patch
45.203 -Patch39: gcc32-hard-reg-sharing2.patch
45.204 -Patch40: gcc32-c++-nrv-test.patch
45.205 -Patch41: gcc32-debug-pr7241.patch
45.206 -Patch42: gcc32-i386-pr7242.patch
45.207 -Patch43: gcc32-cfg-eh.patch
45.208 -Patch44: gcc32-attr-visibility3.patch
45.209 -Patch45: gcc32-tls2.patch
45.210 -Patch46: gcc32-fold-const-associate.patch
45.211 -Patch47: gcc32-inline-label.patch
45.212 -Patch48: gcc32-typeof-asm.patch
45.213 -Patch50: gcc32-rh69989.patch
45.214 -Patch51: gcc32-tls3.patch
45.215 -Patch52: gcc32-tls4.patch
45.216 -Patch54: gcc32-tls5.patch
45.217 -Patch55: gcc32-tls-dwarf2.patch
45.218 -Patch56: gcc32-x86_64-pr7559.patch
45.219 -Patch57: gcc32-loop-prefetch.patch
45.220 -Patch58: gcc32-doc-gcov.patch
45.221 -Patch59: gcc32-attr-visibility4.patch
45.222 -Patch60: gcc32-c++-tail-pad-backout.patch
45.223 -Patch61: gcc32-attr-visibility5.patch
45.224 -Patch62: gcc32-i386-no-default-momit-leaf-frame-pointer.patch
45.225 -Patch64: gcc32-x86_64-rip-lowercase.patch
45.226 -Patch65: gcc32-libstdc++-glibc23-1.patch
45.227 -Patch66: gcc32-libstdc++-glibc23-2.patch
45.228 -Patch67: gcc32-libstdc++-glibc23-3.patch
45.229 -Patch68: gcc32-libstdc++-glibc23-4.patch
45.230 -Patch69: gcc32-interface_only.patch
45.231 -
45.232 -%define _gnu %{nil}
45.233 -
45.234 -Patch10000: boehm-gc-mips.patch
45.235 -Patch10001: boehm-gc-LINUX.patch
45.236 -Patch10002: gcc-libffi-mips.patch
45.237 -
45.238 -Patch11000: gcc-mips-coff.patch
45.239 -Patch11001: gcc-mips-file.patch
45.240 -Patch11002: gcc-mips-ieee.patch
45.241 -Patch11003: gcc-mips-return.patch
45.242 -Patch11004: gcc-libstdc++-mips.patch
45.243 -Patch11005: libtool-mips.patch
45.244 -
45.245 -Patch12000: gcc-libgcc.patch
45.246 -
45.247 -Patch13000: gcc-ppc-linux.patch
45.248 -Patch13001: gcc-linux-crt.patch
45.249 -
45.250 -Patch14000: gcc-linux-atexit.patch
45.251 -Patch14001: gcc-test-atexit.patch
45.252 -
45.253 -Patch15000: gcc-var.patch
45.254 -Patch15001: gcc-copy.patch
45.255 -
45.256 -Patch16000: gcc-c++-template.patch
45.257 -Patch16001: gcc-testsuite-c++.patch
45.258 -
45.259 -Patch17000: gcc-cross.patch
45.260 -Patch17001: gcc-cross-bfd.patch
45.261 -Patch17002: gcc-sizeof.patch
45.262 -Patch17003: gcc-arch.patch
45.263 -
45.264 -Patch18000: libjava-cross.patch
45.265 -Patch18001: gcc-gcj-cross.patch
45.266 -
45.267 -Patch19000: contrib-touch.patch
45.268 -
45.269 -Patch20000: libtool-libs.patch
45.270 -
45.271 -Patch21000: gcc-libstdc++-glibc-2.2.patch
45.272 -
45.273 -%description
45.274 -The gcc package contains the GNU Compiler Collection version 3.2.
45.275 -You'll need this package in order to compile C code.
45.276 -
45.277 -%package -n libgcc
45.278 -Summary: GCC version 3.2 shared support library
45.279 -Group: System Environment/Libraries
45.280 -
45.281 -%description -n libgcc
45.282 -This package contains GCC shared support library which is needed
45.283 -e.g. for exception handling support.
45.284 -
45.285 -%package c++
45.286 -Summary: C++ support for GCC
45.287 -Group: Development/Languages
45.288 -Requires: gcc = %{version}-%{release}
45.289 -Requires: libstdc++ = %{version}
45.290 -Requires: libstdc++-devel = %{version}
45.291 -Obsoletes: gcc3-c++
45.292 -
45.293 -%description c++
45.294 -This package adds C++ support to the GNU Compiler Collection.
45.295 -It includes support for most of the current C++ specification,
45.296 -including templates and exception handling.
45.297 -
45.298 -%package -n libstdc++
45.299 -Summary: GNU Standard C++ Library
45.300 -Group: System Environment/Libraries
45.301 -Obsoletes: libstdc++3
45.302 -
45.303 -%description -n libstdc++
45.304 -The libstdc++ package contains a rewritten standard compliant GCC Standard
45.305 -C++ Library.
45.306 -
45.307 -%package -n libstdc++-devel
45.308 -Summary: Header files and libraries for C++ development
45.309 -Group: Development/Libraries
45.310 -Requires: libstdc++ = %{version}-%{release}
45.311 -Obsoletes: libstdc++3-devel
45.312 -
45.313 -%description -n libstdc++-devel
45.314 -This is the GNU implementation of the standard C++ libraries. This
45.315 -package includes the header files and libraries needed for C++
45.316 -development. This includes rewritten implementation of STL.
45.317 -
45.318 -%package objc
45.319 -Summary: Objective-C support for GCC
45.320 -Group: Development/Languages
45.321 -Requires: gcc = %{version}-%{release}
45.322 -Requires: libobjc = %{version}-%{release}
45.323 -Obsoletes: gcc3-objc
45.324 -
45.325 -%description objc
45.326 -gcc-objc provides Objective-C support for the GCC.
45.327 -Mainly used on systems running NeXTSTEP, Objective-C is an
45.328 -object-oriented derivative of the C language.
45.329 -
45.330 -%package -n libobjc
45.331 -Summary: Objective-C runtime
45.332 -Group: System Environment/Libraries
45.333 -
45.334 -%description -n libobjc
45.335 -This package contains Objective-C shared library which is needed to run
45.336 -Objective-C dynamically linked programs.
45.337 -
45.338 -%package g77
45.339 -Summary: Fortran 77 support
45.340 -Group: Development/Languages
45.341 -Requires: gcc = %{version}-%{release}
45.342 -Requires: libf2c = %{version}-%{release}
45.343 -Prereq: /sbin/install-info
45.344 -Obsoletes: gcc3-g77
45.345 -
45.346 -%description g77
45.347 -The gcc-g77 package provides support for compiling Fortran 77
45.348 -programs with the GNU Compiler Collection.
45.349 -
45.350 -%package -n libf2c
45.351 -Summary: Fortran 77 runtime
45.352 -Group: System Environment/Libraries
45.353 -
45.354 -%description -n libf2c
45.355 -This package contains Fortran 77 shared library which is needed to run
45.356 -Fortran 77 dynamically linked programs.
45.357 -
45.358 -%package java
45.359 -Summary: Java support for GCC
45.360 -Group: Development/Languages
45.361 -Requires: gcc = %{version}-%{release}
45.362 -Requires: libgcj >= %{version}, libgcj-devel >= %{version}
45.363 -Obsoletes: gcc3-java
45.364 -Prereq: /sbin/install-info
45.365 -
45.366 -%description java
45.367 -This package adds support for compiling Java(tm) programs and
45.368 -bytecode into native code.
45.369 -
45.370 -%package -n libgcj
45.371 -Summary: Java runtime library for gcc
45.372 -Group: System Environment/Libraries
45.373 -Requires: zip >= 2.1
45.374 -Obsoletes: gcc-libgcj
45.375 -Obsoletes: libgcj3
45.376 -# Kaffe includes jar too
45.377 -Conflicts: kaffe
45.378 -
45.379 -%description -n libgcj
45.380 -The Java(tm) runtime library. You will need this package to run your Java
45.381 -programs compiled using the Java compiler from GNU Compiler Collection (gcj).
45.382 -
45.383 -%package -n libgcj-devel
45.384 -Summary: Libraries for Java development using GCC
45.385 -Group: Development/Languages
45.386 -Requires: zip >= 2.1, libgcj = %{version}
45.387 -Obsoletes: libgcj3-devel
45.388 -
45.389 -%description -n libgcj-devel
45.390 -The Java(tm) static libraries and C header files. You will need this
45.391 -package to compile your Java programs using the GCC Java compiler (gcj).
45.392 -
45.393 -%package -n cpp
45.394 -Summary: The C Preprocessor.
45.395 -Group: Development/Languages
45.396 -Prereq: /sbin/install-info
45.397 -%ifarch ia64
45.398 -Obsoletes: gnupro
45.399 -%endif
45.400 -
45.401 -%description -n cpp
45.402 -Cpp is the GNU C-Compatible Compiler Preprocessor.
45.403 -Cpp is a macro processor which is used automatically
45.404 -by the C compiler to transform your program before actual
45.405 -compilation. It is called a macro processor because it allows
45.406 -you to define macros, abbreviations for longer
45.407 -constructs.
45.408 -
45.409 -The C preprocessor provides four separate functionalities: the
45.410 -inclusion of header files (files of declarations that can be
45.411 -substituted into your program); macro expansion (you can define macros,
45.412 -and the C preprocessor will replace the macros with their definitions
45.413 -throughout the program); conditional compilation (using special
45.414 -preprocessing directives, you can include or exclude parts of the
45.415 -program according to various conditions); and line control (if you use
45.416 -a program to combine or rearrange source files into an intermediate
45.417 -file which is then compiled, you can use line control to inform the
45.418 -compiler about where each source line originated).
45.419 -
45.420 -You should install this package if you are a C programmer and you use
45.421 -macros.
45.422 -
45.423 -%package gnat
45.424 -Summary: Ada 95 support for GCC
45.425 -Group: Development/Languages
45.426 -Requires: gcc = %{version}-%{release}, libgnat = %{version}-%{release}
45.427 -Obsoletes: gnat-devel, gcc3-gnat
45.428 -Prereq: /sbin/install-info
45.429 -
45.430 -%description gnat
45.431 -GNAT is a GNU Ada 95 front-end to GCC. This package includes development tools,
45.432 -the documents and Ada 95 compiler.
45.433 -
45.434 -%package -n libgnat
45.435 -Summary: GNU Ada 95 runtime shared libraries
45.436 -Group: System Environment/Libraries
45.437 -Obsoletes: gnat libgnat3
45.438 -
45.439 -%description -n libgnat
45.440 -GNAT is a GNU Ada 95 front-end to GCC. This package includes shared libraries,
45.441 -which are required to run programs compiled with the GNAT.
45.442 -
45.443 -%prep
45.444 -%setup -q -n gcc-%{version}-%{DATE}
45.445 -%patch1 -p0 -b .2.96-RH-compat~
45.446 -%patch2 -p0 -b .boehm-gc-libs~
45.447 -%patch3 -p0 -b .bogus-inline~
45.448 -%patch6 -p0 -b .fde-merge-compat~
45.449 -%patch7 -p0 -b .attr-visibility~
45.450 -%patch8 -p0 -b .attr-visibility2~
45.451 -%patch9 -p0 -b .duplicate-decl~
45.452 -%patch10 -p0 -b .trunc_int_for_mode~
45.453 -%patch11 -p0 -b .sparc-sll1~
45.454 -%patch12 -p0 -b .x86_64-q_regs_operand~
45.455 -%patch13 -p0 -b .dwarf2-pr6381~
45.456 -%patch14 -p0 -b .dwarf2-pr6436-test~
45.457 -%patch15 -p0 -b .c++-pretty_function~
45.458 -%patch16 -p0 -b .c++-tsubst-asm~
45.459 -%patch18 -p0 -b .i386-memtest-test~
45.460 -%patch19 -p0 -b .fold-const2~
45.461 -%patch21 -p0 -b .ada-addr2line~
45.462 -%patch22 -p0 -b .ada-link~
45.463 -%patch23 -p0 -b .java-no-rpath~
45.464 -%patch25 -p0 -b .s390-java~
45.465 -%patch26 -p0 -b .test-rotate~
45.466 -%patch27 -p0 -b .x86_64-libiberty-pic~
45.467 -%patch29 -p0 -b .test-rh65771~
45.468 -%patch30 -p0 -b .i386-default-momit-leaf-frame-pointer~
45.469 -%patch31 -p0 -b .i386-pic-label-thunk~
45.470 -%patch34 -p0 -b .pr6842~
45.471 -%patch35 -p0 -b .tls~
45.472 -%patch36 -p0 -b .i386-profile-olfp~
45.473 -%patch37 -p0 -b .tree-code~
45.474 -%patch38 -p0 -b .hard-reg-sharing~
45.475 -%patch39 -p0 -b .hard-reg-sharing2~
45.476 -%patch40 -p0 -b .c++-nrv-test~
45.477 -%patch41 -p0 -b .debug-pr7241~
45.478 -%patch42 -p0 -b .i386-pr7242~
45.479 -%patch43 -p0 -b .cfg-eh~
45.480 -%patch44 -p0 -b .attr-visibility3~
45.481 -%patch45 -p0 -b .tls2~
45.482 -%patch46 -p0 -b .fold-const-associate~
45.483 -%patch47 -p0 -b .inline-label~
45.484 -%patch48 -p0 -b .typeof-asm~
45.485 -%patch50 -p0 -b .rh69989~
45.486 -%patch51 -p0 -b .tls3~
45.487 -%patch52 -p0 -b .tls4~
45.488 -%patch54 -p0 -b .tls5~
45.489 -%patch55 -p0 -b .tls-dwarf2~
45.490 -%patch56 -p0 -b .x86_64-pr7559~
45.491 -%patch57 -p0 -b .loop-prefetch~
45.492 -%patch58 -p0 -b .doc-gcov~
45.493 -%patch59 -p0 -b .attr-visibility4~
45.494 -%patch60 -p0 -b .c++-tail-pad-backout~
45.495 -%patch61 -p0 -b .attr-visibility5~
45.496 -%patch62 -p0 -b .i386-no-default-momit-leaf-frame-pointer~
45.497 -%patch64 -p0 -b .x86_64-rip-lowercase~
45.498 -%patch65 -p0 -b .libstdc++-glibc23-1~
45.499 -%patch66 -p0 -b .libstdc++-glibc23-2~
45.500 -%patch67 -p0 -b .libstdc++-glibc23-3~
45.501 -%patch68 -p0 -b .libstdc++-glibc23-4~
45.502 -%patch69 -p0 -b .interface_only
45.503 -
45.504 -%patch10000 -p0 -b .mips
45.505 -%patch10001 -p0 -b .LINUX
45.506 -%patch10002 -p0 -b .mips
45.507 -pushd boehm-gc
45.508 -autoconf
45.509 -popd
45.510 -pushd libffi
45.511 -autoconf
45.512 -# Ignore the error from automake
45.513 -automake --cygnus Makefile || :
45.514 -popd
45.515 -
45.516 -%patch11000 -p0 -b .coff
45.517 -%patch11001 -p0 -b .file
45.518 -%patch11002 -p0 -b .ieee
45.519 -%patch11003 -p0 -b .return
45.520 -%patch11004 -p0 -b .mips
45.521 -%patch11005 -p1 -b .mips
45.522 -
45.523 -%patch12000 -p0 -b .libgcc
45.524 -
45.525 -%patch13000 -p0 -b .ppc
45.526 -%patch13001 -p0 -b .crt
45.527 -
45.528 -%patch14000 -p0 -b .order
45.529 -%patch14001 -p0 -b .order
45.530 -
45.531 -%patch15000 -p0 -b .var
45.532 -%patch15001 -p0 -b .copy
45.533 -
45.534 -%patch16000 -p0 -b .template
45.535 -%patch16001 -p0 -b .template
45.536 -
45.537 -%patch17000 -p1 -b .cross
45.538 -%patch17001 -p0 -b .cross-bfd
45.539 -%patch17002 -p1 -b .sizeof
45.540 -%patch17003 -p0 -b .arch
45.541 -pushd gcc
45.542 -autoheader
45.543 -autoconf
45.544 -popd
45.545 -pushd fastjar
45.546 -aclocal
45.547 -autoconf
45.548 -popd
45.549 -pushd libffi
45.550 -aclocal
45.551 -autoconf
45.552 -popd
45.553 -
45.554 -%patch18000 -p0 -b .cross
45.555 -%patch18001 -p0 -b .build
45.556 -pushd libjava
45.557 -autoconf
45.558 -automake --foreign Makefile
45.559 -popd
45.560 -
45.561 -%patch19000 -p0 -b .touch
45.562 -
45.563 -%patch20000 -p0 -b .libs
45.564 -
45.565 -%patch21000 -p0 -b .glibc-2.2
45.566 -pushd libstdc++-v3
45.567 -autoconf
45.568 -popd
45.569 -
45.570 -perl -pi -e 's/3\.2\.1/3.2/' gcc/version.c gcc/f/version.c gcc/ada/gnatvsn.ads
45.571 -perl -pi -e 's/"%{gcc_version}"/"%{gcc_version} \(release\)"/' gcc/version.c
45.572 -perl -pi -e 's/\((prerelease|experimental|release)\)/\(Red Hat Linux 8.0 %{version}-%{gcc_release}\)/' gcc/version.c gcc/f/version.c
45.573 -perl -pi -e 's/\((prerelease|experimental|release)\)/\(%{version}-%{gcc_release}\)/' gcc/ada/gnatvsn.ads
45.574 -perl -pi -e 's/#define GCCBUGURL.*$/#define GCCBUGURL "<URL:http:\/\/bugzilla.redhat.com\/bugzilla\/>"/' gcc/system.h
45.575 -# The version string is now longer than 32 bytes and the line containing it
45.576 -# doesn't fit into 80 columns
45.577 -#perl -pi -e 's/:= 32/:= 64/;s/(Gnat_Version_String.*:=)/\1\n /' gcc/ada/gnatvsn.ads
45.578 -
45.579 -./contrib/gcc_update --touch
45.580 -
45.581 -%build
45.582 -rm -fr obj-%{_target_platform}
45.583 -mkdir obj-%{_target_platform}
45.584 -cd obj-%{_target_platform}
45.585 -
45.586 -%if %{_arch} != %{_build_arch}
45.587 -%ifos linux
45.588 -export ac_cv_func_mmap_anywhere=yes
45.589 -export ac_cv_func_mmap_file=yes
45.590 -export ac_cv_func_mmap_fixed_mapped=yes
45.591 -export ac_cv_func_strncmp_works=yes
45.592 -export gcc_cv_func_printf_ptr=yes
45.593 -%endif
45.594 -%endif
45.595 -
45.596 -DEFAULT_FLAGS=
45.597 -%if %{default}
45.598 -%ifarch %{ix86}
45.599 -TARGET_CPU="%{_target_cpu}"
45.600 -DEFAULT_FLAGS="--with-arch=$TARGET_CPU --with-cpu=$TARGET_CPU"
45.601 -%endif
45.602 -%endif
45.603 -
45.604 -CC=%{__cc}
45.605 -OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'`
45.606 -CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="$OPT_FLAGS" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
45.607 - ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
45.608 - --enable-shared --enable-threads=posix --disable-checking --host=%{_target_platform} \
45.609 - $DEFAULT_FLAGS \
45.610 -%if %{cross_compile}
45.611 - --target=%{_target_platform} --build=%{_build_alias} \
45.612 -%endif
45.613 - --with-system-zlib --enable-__cxa_atexit
45.614 -
45.615 -# We have to make sure all gcc configure files are up to date for
45.616 -# parallel build. We have to do it twice due to the stupid Makefile.
45.617 -make -C gcc cstamp-h
45.618 -make -C gcc cstamp-h
45.619 -
45.620 -# if RPM_BUILD_NCPUS unset, set it
45.621 -if [ -z "$RPM_BUILD_NCPUS" ] ; then
45.622 - if [ -x /usr/bin/getconf ] ; then
45.623 - RPM_BUILD_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN)
45.624 - if [ $RPM_BUILD_NCPUS -eq 0 ]; then
45.625 - RPM_BUILD_NCPUS=1
45.626 - fi
45.627 - else
45.628 - RPM_BUILD_NCPUS=1
45.629 - fi
45.630 -fi
45.631 -
45.632 -RPM_BUILD_NCPUS=`expr $RPM_BUILD_NCPUS + $RPM_BUILD_NCPUS`
45.633 -
45.634 -cat <<EOF > makefile
45.635 -MAKE=make -j $RPM_BUILD_NCPUS
45.636 -include Makefile
45.637 -CFLAGS:=\$(CFLAGS) -pipe
45.638 -CXXFLAGS:=\$(CXXFLAGS) -pipe
45.639 -EOF
45.640 -
45.641 -# FIXME: It is a kludge.
45.642 -export GCJFLAGS="$OPT_FLAGS"
45.643 -
45.644 -%if %{cross_compile}
45.645 -make -j$RPM_BUILD_NCPUS \
45.646 - CC=%{__cc} \
45.647 - CXX=%{__cxx} \
45.648 - AR=%{__ar} \
45.649 - AS=%{__as} \
45.650 - LD=%{__ld} \
45.651 - NM=%{__nm} \
45.652 - RANLIB=%{__ranlib} \
45.653 - CC_FOR_TARGET=%{__cc} \
45.654 - GCC_FOR_TARGET=%{__cc} \
45.655 - CXX_FOR_TARGET=%{__cxx} \
45.656 - AR_FOR_TARGET=%{__ar} \
45.657 - AS_FOR_TARGET=%{__as} \
45.658 - LD_FOR_TARGET=%{__ld} \
45.659 - NM_FOR_TARGET=%{__nm} \
45.660 - RANLIB_FOR_TARGET=%{__ranlib} \
45.661 - HOST_CC=cc \
45.662 - CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
45.663 - CFLAGS_FOR_BUILD="-O -pipe" \
45.664 - CFLAGS="$RPM_OPT_FLAGS -pipe" \
45.665 - CXXFLAGS="$RPM_OPT_FLAGS -pipe"
45.666 -%else
45.667 -make -j$RPM_BUILD_NCPUS bootstrap-lean
45.668 -#make -j$RPM_BUILD_NCPUS bootstrap
45.669 -%endif
45.670 -
45.671 -%if %{build_ada}
45.672 -# This doesn't work with -j$RPM_BUILD_NCPUS
45.673 -make -C gcc gnatlib-shared
45.674 -make -C gcc gnattools
45.675 -make -C gcc/ada doc
45.676 -%endif
45.677 -
45.678 -%if %{make_check}
45.679 -# run the tests.
45.680 -make -j$RPM_BUILD_NCPUS -k check || :
45.681 -%ifarch %{ix86}
45.682 -ln -sf i686-pc-linux-gnu ../libstdc++-v3/config/abi/%{_target_platform}
45.683 -ln -sf i686-pc-linux-gnu ../libstdc++-v3/config/abi/%{_target_platform}-gnu
45.684 -%endif
45.685 -echo ====================TESTING=========================
45.686 -( ../contrib/test_summary || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}'
45.687 -%ifarch %{ix86}
45.688 -make -C %{_target_platform}/libstdc++-v3 check-abi
45.689 -%endif
45.690 -echo ====================TESTING END=====================
45.691 -#cd %{_target_platform}/libstdc++-v3
45.692 -#./mkcheck 0
45.693 -#cd ../..
45.694 -%endif
45.695 -
45.696 -%if !%{cross_compile}
45.697 -# Make protoize
45.698 -make -C gcc CC="./xgcc -B ./ -O2" proto
45.699 -%endif
45.700 -
45.701 -# Make generated man pages even if Pod::Man is not new enough
45.702 -perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
45.703 -for i in ../gcc/doc/*.texi; do
45.704 - cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i
45.705 -done
45.706 -make -C gcc generated-manpages
45.707 -for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
45.708 -
45.709 -# Copy various doc files here and there
45.710 -cd ..
45.711 -mkdir -p rpm.doc/g77 rpm.doc/objc
45.712 -mkdir -p rpm.doc/boehm-gc rpm.doc/fastjar rpm.doc/libffi rpm.doc/libjava
45.713 -
45.714 -(cd gcc/f; for i in ChangeLog*; do
45.715 - cp -p $i ../../rpm.doc/g77/$i.f
45.716 -done)
45.717 -(cd libf2c; for i in ChangeLog*; do
45.718 - cp -p $i ../rpm.doc/g77/$i.libf2c
45.719 -done)
45.720 -(cd gcc/objc; for i in README*; do
45.721 - cp -p $i ../../rpm.doc/objc/$i.objc
45.722 -done)
45.723 -(cd libobjc; for i in README*; do
45.724 - cp -p $i ../rpm.doc/objc/$i.libobjc
45.725 -done)
45.726 -(cd boehm-gc; for i in ChangeLog*; do
45.727 - cp -p $i ../rpm.doc/boehm-gc/$i.gc
45.728 -done)
45.729 -(cd fastjar; for i in ChangeLog* README*; do
45.730 - cp -p $i ../rpm.doc/fastjar/$i.fastjar
45.731 -done)
45.732 -(cd libffi; for i in ChangeLog* README* LICENSE; do
45.733 - cp -p $i ../rpm.doc/libffi/$i.libffi
45.734 -done)
45.735 -(cd libjava; for i in ChangeLog* README*; do
45.736 - cp -p $i ../rpm.doc/libjava/$i.libjava
45.737 -done)
45.738 -
45.739 -%install
45.740 -rm -fr $RPM_BUILD_ROOT
45.741 -
45.742 -perl -pi -e \
45.743 - 's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
45.744 - libstdc++-v3/docs/html/documentation.html
45.745 -ln -sf documentation.html libstdc++-v3/docs/html/index.html
45.746 -find libstdc++-v3/docs/html -name CVS | xargs rm -rf
45.747 -
45.748 -cd obj-%{_target_platform}
45.749 -TARGET_PLATFORM=%{_target_platform}
45.750 -
45.751 -# There are some MP bugs in libstdc++ and libjava Makefiles
45.752 -make -C %{_target_platform}/libstdc++-v3
45.753 -make -C %{_target_platform}/libjava
45.754 -
45.755 -make prefix=$RPM_BUILD_ROOT%{_prefix} mandir=$RPM_BUILD_ROOT%{_mandir} \
45.756 -%if %{cross_compile}
45.757 - CC=%{__cc} \
45.758 - CXX=%{__cxx} \
45.759 - AR=%{__ar} \
45.760 - AS=%{__as} \
45.761 - LD=%{__ld} \
45.762 - NM=%{__nm} \
45.763 - RANLIB=%{__ranlib} \
45.764 - CC_FOR_TARGET=%{__cc} \
45.765 - GCC_FOR_TARGET=%{__cc} \
45.766 - CXX_FOR_TARGET=%{__cxx} \
45.767 - AR_FOR_TARGET=%{__ar} \
45.768 - AS_FOR_TARGET=%{__as} \
45.769 - LD_FOR_TARGET=%{__ld} \
45.770 - NM_FOR_TARGET=%{__nm} \
45.771 - RANLIB_FOR_TARGET=%{__ranlib} \
45.772 - HOST_CC=cc \
45.773 - CFLAGS_FOR_TARGET="$RPM_OPT_FLAGS -pipe" \
45.774 - CFLAGS_FOR_BUILD="-O -pipe" \
45.775 - CFLAGS="$RPM_OPT_FLAGS -pipe" \
45.776 - CXXFLAGS="$RPM_OPT_FLAGS -pipe" \
45.777 -%endif
45.778 - infodir=$RPM_BUILD_ROOT%{_infodir} install
45.779 -%if %{build_ada}
45.780 -pushd gcc/ada
45.781 -cp -a gnat-style.info* gnat_rm.info* $RPM_BUILD_ROOT%{_infodir}/
45.782 -for i in gnat_ug_unx.info*; do
45.783 - sed 's/gnat_ug_unx/gnat_ug/g' $i > $RPM_BUILD_ROOT%{_infodir}/`echo $i | sed 's/gnat_ug_unx/gnat_ug/'`
45.784 -done
45.785 -chmod 644 $RPM_BUILD_ROOT%{_infodir}/gnat*
45.786 -popd
45.787 -%endif
45.788 -
45.789 -FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1)
45.790 -
45.791 -file $RPM_BUILD_ROOT/%{_prefix}/bin/* | grep ELF | cut -d':' -f1 | xargs %{__strip} || :
45.792 -%{__strip} $FULLPATH/{cc1,cc1obj,cc1plus,cpp0,tradcpp0,f771,jc1,jvgenmain}
45.793 -
45.794 -# fix some things
45.795 -ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/cc
45.796 -mkdir -p $RPM_BUILD_ROOT/lib
45.797 -ln -sf ..%{_prefix}/bin/cpp $RPM_BUILD_ROOT/lib/cpp
45.798 -ln -sf g77 $RPM_BUILD_ROOT%{_prefix}/bin/f77
45.799 -rm -f $RPM_BUILD_ROOT%{_infodir}/dir
45.800 -gzip -9 $RPM_BUILD_ROOT%{_infodir}/*.info*
45.801 -ln -sf gcc $RPM_BUILD_ROOT%{_prefix}/bin/gnatgcc
45.802 -
45.803 -mv $RPM_BUILD_ROOT%{_prefix}/lib/libgcj.*a $FULLPATH/
45.804 -sed 's/-lgcjgc//g;s/-lzgcj//g;s/-lpthread//g' $RPM_BUILD_ROOT%{_prefix}/lib/libgcj.spec > $FULLPATH/libgcj.spec
45.805 -mv $RPM_BUILD_ROOT%{_prefix}/include/gc*.h $FULLPATH/include/
45.806 -mv $RPM_BUILD_ROOT%{_prefix}/include/j*.h $FULLPATH/include/
45.807 -mv -f $RPM_BUILD_ROOT%{_prefix}/include/{java,javax,gnu,org} $FULLPATH/include/
45.808 -mkdir -p $FULLPATH/include/gcj
45.809 -mv -f $RPM_BUILD_ROOT%{_prefix}/include/gcj/* $FULLPATH/include/gcj/
45.810 -rmdir $RPM_BUILD_ROOT%{_prefix}/include/gcj
45.811 -
45.812 -mkdir -p $RPM_BUILD_ROOT/%{_lib}
45.813 -mv -f `find $RPM_BUILD_ROOT%{_prefix}/lib -name libgcc_s.so.1` $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
45.814 -chmod 755 $RPM_BUILD_ROOT/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
45.815 -ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.1
45.816 -ln -sf ../../%{_lib}/libgcc_s.so.1 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
45.817 -#ln -sf `echo "%{_prefix}" | sed 's~/[^/]*~\.\./~g'`../%{_lib}/libgcc_s.so.1 \
45.818 -# $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libgcc_s.so
45.819 -#mv -f $FULLPATH/libobjc.so.1* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
45.820 -%if %{build_ada}
45.821 -mv -f $FULLPATH/adalib/libgnarl-*.so.* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
45.822 -mv -f $FULLPATH/adalib/libgnat-*.so.* $RPM_BUILD_ROOT%{_prefix}/%{_lib}/
45.823 -rm -f $FULLPATH/adalib/libgnarl.so* $FULLPATH/adalib/libgnat.so*
45.824 -%endif
45.825 -pushd $FULLPATH
45.826 -if [ "%{_lib}" = "lib" ]; then
45.827 -ln -sf ../../../libobjc.so.1 libobjc.so
45.828 -ln -sf ../../../libstdc++.so.5.* libstdc++.so
45.829 -ln -sf ../../../libgcj.so.3.* libgcj.so
45.830 -ln -sf ../../../libg2c.so.0.* libg2c.so
45.831 -%if %{build_ada}
45.832 -cd adalib
45.833 -ln -sf ../../../../libgnarl-*.so.* libgnarl.so
45.834 -ln -sf ../../../../libgnat-*.so.* libgnat.so
45.835 -cd ..
45.836 -%endif
45.837 -else
45.838 -ln -sf ../../../../%{_lib}/libobjc.so.1 libobjc.so
45.839 -ln -sf ../../../../%{_lib}/libstdc++.so.5.* libstdc++.so
45.840 -ln -sf ../../../../%{_lib}/libgcj.so.3.* libgcj.so
45.841 -ln -sf ../../../../%{_lib}/libg2c.so.0.* libg2c.so
45.842 -%if %{build_ada}
45.843 -cd adalib
45.844 -ln -sf ../../../../../%{_lib}/libgnarl-*.so.* libgnarl.so
45.845 -ln -sf ../../../../../%{_lib}/libgnat-*.so.* libgnat.so
45.846 -cd ..
45.847 -%endif
45.848 -fi
45.849 -mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libstdc++.*a .
45.850 -mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libsupc++.*a .
45.851 -mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libg2c.*a .
45.852 -mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libfrtbegin.*a .
45.853 -mv -f $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.*a .
45.854 -# Strip debug info from Fortran/ObjC/Java static libraries
45.855 -%{__strip} -g libg2c.a libobjc.a libgcj.a
45.856 -# Fix up .la files
45.857 -for i in *.la; do
45.858 - sed -e '/^libdir/s_%{_prefix}/lib_%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}_' \
45.859 - -e '/^dependency_libs/s_%{_prefix}/lib_%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}_' \
45.860 - -e '/^dependency_libs/s~'\''$~ '\''~' \
45.861 - -e '/^dependency_libs/s~[ ][ ]*~ ~g' \
45.862 - -e '/^dependency_libs/s~-L[^ ]* ~~g' \
45.863 - -e '/^dependency_libs/s~-lgcc_s -lgcc -lc -lgcc_s -lgcc ~~g' \
45.864 - -e '/^dependency_libs/s~-lgcc -lc -lgcc ~~g' \
45.865 - -e '/^dependency_libs/s~-lc ~~g' \
45.866 - -e '/^dependency_libs/s~-lm \(-lm \)*~-lm ~g' \
45.867 - $i > $i.tmp
45.868 - mv -f $i.tmp $i
45.869 -done
45.870 -popd
45.871 -chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libg2c.so.0.*
45.872 -chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libobjc.so.1.*
45.873 -%if %{build_ada}
45.874 -chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libgnarl*so*
45.875 -chmod 755 $RPM_BUILD_ROOT%{_prefix}/lib/libgnat*so*
45.876 -%endif
45.877 -
45.878 -cat > $RPM_BUILD_ROOT%{_prefix}/bin/c89 <<"EOF"
45.879 -#!/bin/sh
45.880 -fl="-std=c89"
45.881 -for opt; do
45.882 - case "$opt" in
45.883 - -ansi|-std=c89|-std=iso9899:1990) fl="";;
45.884 - -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
45.885 - exit 1;;
45.886 - esac
45.887 -done
45.888 -exec %{_prefix}/bin/gcc $fl ${1+"$@"}
45.889 -EOF
45.890 -cat > $RPM_BUILD_ROOT%{_prefix}/bin/c99 <<"EOF"
45.891 -#!/bin/sh
45.892 -fl="-std=c99"
45.893 -for opt; do
45.894 - case "$opt" in
45.895 - -std=c99|-std=iso9899:1999) fl="";;
45.896 - -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
45.897 - exit 1;;
45.898 - esac
45.899 -done
45.900 -exec %{_prefix}/bin/gcc $fl ${1+"$@"}
45.901 -EOF
45.902 -chmod 755 $RPM_BUILD_ROOT%{_prefix}/bin/c?9
45.903 -
45.904 -cd ..
45.905 -%find_lang %{name}
45.906 -
45.907 -%if %{cross_compile}
45.908 -# Install syslimits.h for canadian cross compile.
45.909 -pushd $RPM_BUILD_DIR/gcc-%{gcc_version}-%{DATE}/obj-%{_target_platform}
45.910 -cp -af ../gcc/gsyslimits.h $FULLPATH/include/syslimits.h
45.911 -# Fix the specs file.
45.912 -cat gcc/specs |
45.913 -awk '
45.914 -BEGIN {
45.915 - cross=0;
45.916 -}
45.917 -/cross_compile/ { print; cross = 1; next; }
45.918 -/^1$/ {
45.919 - if (cross == 0) {
45.920 - print;
45.921 - }
45.922 - else {
45.923 - cross = 0;
45.924 - print "0";
45.925 - }
45.926 - next;
45.927 -}
45.928 -{ print; }
45.929 -' > $FULLPATH/specs
45.930 -popd
45.931 -%endif
45.932 -
45.933 -%clean
45.934 -rm -rf $RPM_BUILD_ROOT
45.935 -
45.936 -%post
45.937 -/sbin/install-info \
45.938 - --info-dir=%{_infodir} %{_infodir}/gcc.info.gz
45.939 -
45.940 -%preun
45.941 -if [ $1 = 0 ]; then
45.942 - /sbin/install-info --delete \
45.943 - --info-dir=%{_infodir} %{_infodir}/gcc.info.gz
45.944 -fi
45.945 -
45.946 -%post -n cpp
45.947 -/sbin/install-info \
45.948 - --info-dir=%{_infodir} %{_infodir}/cpp.info.gz
45.949 -
45.950 -%preun -n cpp
45.951 -if [ $1 = 0 ]; then
45.952 - /sbin/install-info --delete \
45.953 - --info-dir=%{_infodir} %{_infodir}/cpp.info.gz
45.954 -fi
45.955 -
45.956 -%post g77
45.957 -/sbin/install-info \
45.958 - --info-dir=%{_infodir} %{_infodir}/g77.info.gz
45.959 -
45.960 -%preun g77
45.961 -if [ $1 = 0 ]; then
45.962 - /sbin/install-info --delete \
45.963 - --info-dir=%{_infodir} %{_infodir}/g77.info.gz
45.964 -fi
45.965 -
45.966 -%post java
45.967 -/sbin/install-info \
45.968 - --info-dir=%{_infodir} %{_infodir}/gcj.info.gz
45.969 -
45.970 -%preun java
45.971 -if [ $1 = 0 ]; then
45.972 - /sbin/install-info --delete \
45.973 - --info-dir=%{_infodir} %{_infodir}/gcj.info.gz
45.974 -fi
45.975 -
45.976 -%post gnat
45.977 -/sbin/install-info \
45.978 - --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz
45.979 -/sbin/install-info \
45.980 - --info-dir=%{_infodir} %{_infodir}/gnat_ug.info.gz
45.981 -
45.982 -%preun gnat
45.983 -if [ $1 = 0 ]; then
45.984 - /sbin/install-info --delete \
45.985 - --info-dir=%{_infodir} %{_infodir}/gnat_rm.info.gz
45.986 - /sbin/install-info --delete \
45.987 - --info-dir=%{_infodir} %{_infodir}/gnat_ug.info.gz
45.988 -fi
45.989 -
45.990 -%post -n libgcc -p /sbin/ldconfig
45.991 -
45.992 -%postun -n libgcc -p /sbin/ldconfig
45.993 -
45.994 -%post -n libstdc++ -p /sbin/ldconfig
45.995 -
45.996 -%postun -n libstdc++ -p /sbin/ldconfig
45.997 -
45.998 -%post -n libobjc -p /sbin/ldconfig
45.999 -
45.1000 -%postun -n libobjc -p /sbin/ldconfig
45.1001 -
45.1002 -%post -n libgcj -p /sbin/ldconfig
45.1003 -
45.1004 -%postun -n libgcj -p /sbin/ldconfig
45.1005 -
45.1006 -%post -n libf2c -p /sbin/ldconfig
45.1007 -
45.1008 -%postun -n libf2c -p /sbin/ldconfig
45.1009 -
45.1010 -%post -n libgnat -p /sbin/ldconfig
45.1011 -
45.1012 -%postun -n libgnat -p /sbin/ldconfig
45.1013 -
45.1014 -%files -f %{name}.lang
45.1015 -%defattr(-,root,root)
45.1016 -%{_prefix}/bin/cc
45.1017 -%{_prefix}/bin/c89
45.1018 -%{_prefix}/bin/c99
45.1019 -%{_prefix}/bin/gcc
45.1020 -%{_prefix}/bin/gcov
45.1021 -%if !%{cross_compile}
45.1022 -%{_prefix}/bin/protoize
45.1023 -%{_prefix}/bin/unprotoize
45.1024 -%endif
45.1025 -%{_prefix}/bin/%{_target_platform}-gcc
45.1026 -%{_mandir}/man1/gcc.1*
45.1027 -%{_mandir}/man1/gcov.1*
45.1028 -%{_infodir}/gcc*
45.1029 -%dir %{_prefix}/lib/gcc-lib
45.1030 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1031 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1032 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
45.1033 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stddef.h
45.1034 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stdarg.h
45.1035 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/varargs.h
45.1036 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/float.h
45.1037 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/limits.h
45.1038 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/stdbool.h
45.1039 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/iso646.h
45.1040 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/syslimits.h
45.1041 -%ifarch %{ix86} x86_64
45.1042 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/mmintrin.h
45.1043 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/xmmintrin.h
45.1044 -%endif
45.1045 -%ifarch ia64
45.1046 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/ia64intrin.h
45.1047 -%endif
45.1048 -%ifarch ppc
45.1049 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/ppc-asm.h
45.1050 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/altivec.h
45.1051 -%endif
45.1052 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/README
45.1053 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1
45.1054 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/collect2
45.1055 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/crt*.o
45.1056 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcc.a
45.1057 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcc_eh.a
45.1058 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/specs
45.1059 -%{_prefix}/%{_lib}/libgcc_s.so
45.1060 -%doc gcc/README* gcc/*ChangeLog*
45.1061 -
45.1062 -%if !%{gcconly}
45.1063 -%files -n cpp
45.1064 -%defattr(-,root,root)
45.1065 -/lib/cpp
45.1066 -%endif
45.1067 -%{_prefix}/bin/cpp
45.1068 -%{_mandir}/man1/cpp.1*
45.1069 -%{_infodir}/cpp*
45.1070 -%dir %{_prefix}/lib/gcc-lib
45.1071 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1072 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1073 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cpp0
45.1074 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/tradcpp0
45.1075 -
45.1076 -%files -n libgcc
45.1077 -%defattr(-,root,root)
45.1078 -/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
45.1079 -/%{_lib}/libgcc_s.so.1
45.1080 -
45.1081 -%if !%{gcconly}
45.1082 -%files c++
45.1083 -%defattr(-,root,root)
45.1084 -%{_prefix}/bin/%{_target_platform}-*++
45.1085 -%{_prefix}/bin/g++
45.1086 -%{_prefix}/bin/c++
45.1087 -%{_prefix}/bin/c++filt
45.1088 -%{_mandir}/man1/g++.1*
45.1089 -%dir %{_prefix}/lib/gcc-lib
45.1090 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1091 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1092 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1plus
45.1093 -%doc gcc/cp/ChangeLog*
45.1094 -
45.1095 -%files -n libstdc++
45.1096 -%defattr(-,root,root)
45.1097 -%{_prefix}/%{_lib}/libstdc++.so.5*
45.1098 -
45.1099 -%files -n libstdc++-devel
45.1100 -%defattr(-,root,root)
45.1101 -%{_prefix}/include/c++
45.1102 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libstdc++.so
45.1103 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libstdc++.a
45.1104 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libsupc++.a
45.1105 -%doc libstdc++-v3/ChangeLog* libstdc++-v3/README* libstdc++-v3/docs/html/
45.1106 -
45.1107 -%files objc
45.1108 -%defattr(-,root,root)
45.1109 -%dir %{_prefix}/lib/gcc-lib
45.1110 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1111 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1112 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
45.1113 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/objc
45.1114 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/cc1obj
45.1115 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libobjc.a
45.1116 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libobjc.so
45.1117 -%doc rpm.doc/objc/*
45.1118 -%doc libobjc/THREADS* libobjc/ChangeLog
45.1119 -
45.1120 -%files -n libobjc
45.1121 -%defattr(-,root,root)
45.1122 -%{_prefix}/%{_lib}/libobjc.so.1*
45.1123 -
45.1124 -%files g77
45.1125 -%defattr(-,root,root)
45.1126 -%{_prefix}/bin/g77
45.1127 -%{_prefix}/bin/f77
45.1128 -%{_mandir}/man1/g77.1*
45.1129 -%{_infodir}/g77*
45.1130 -%dir %{_prefix}/lib/gcc-lib
45.1131 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1132 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1133 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include
45.1134 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/f771
45.1135 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libfrtbegin.a
45.1136 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libg2c.a
45.1137 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libg2c.so
45.1138 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/g2c.h
45.1139 -%doc gcc/f/README rpm.doc/g77/*
45.1140 -
45.1141 -%files -n libf2c
45.1142 -%defattr(-,root,root)
45.1143 -%{_prefix}/%{_lib}/libg2c.so.0*
45.1144 -
45.1145 -%files java
45.1146 -%defattr(-,root,root)
45.1147 -%{_prefix}/bin/gcj
45.1148 -%{_prefix}/bin/gcjh
45.1149 -%{_prefix}/bin/jcf-dump
45.1150 -%{_prefix}/bin/jv-scan
45.1151 -%{_mandir}/man1/gcj.1*
45.1152 -%{_mandir}/man1/gcjh.1*
45.1153 -%{_mandir}/man1/jcf-dump.1*
45.1154 -%{_mandir}/man1/jv-scan.1*
45.1155 -%{_infodir}/gcj*
45.1156 -%dir %{_prefix}/lib/gcc-lib
45.1157 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1158 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1159 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/jc1
45.1160 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/jvgenmain
45.1161 -%doc gcc/java/ChangeLog*
45.1162 -
45.1163 -%files -n libgcj
45.1164 -%defattr(-,root,root)
45.1165 -%{_prefix}/bin/jv-convert
45.1166 -%{_prefix}/bin/gij
45.1167 -%{_prefix}/bin/jar
45.1168 -%{_prefix}/bin/grepjar
45.1169 -%{_prefix}/bin/rmic
45.1170 -%{_prefix}/bin/rmiregistry
45.1171 -%{_mandir}/man1/jv-convert.1*
45.1172 -%{_mandir}/man1/gij.1*
45.1173 -%{_mandir}/man1/rmic.1*
45.1174 -%{_mandir}/man1/rmiregistry.1*
45.1175 -%{_prefix}/%{_lib}/libgcj.so.*
45.1176 -%{_prefix}/share/java
45.1177 -%{_prefix}/lib/security
45.1178 -
45.1179 -%files -n libgcj-devel
45.1180 -%defattr(-,root,root)
45.1181 -%{_prefix}/bin/addr2name.awk
45.1182 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.a
45.1183 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.so
45.1184 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/libgcj.spec
45.1185 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gc*.h
45.1186 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/j*.h
45.1187 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/java
45.1188 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/javax
45.1189 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gnu
45.1190 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/gcj
45.1191 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/include/org
45.1192 -%doc rpm.doc/boehm-gc/* rpm.doc/fastjar/* rpm.doc/libffi/*
45.1193 -%doc rpm.doc/libjava/*
45.1194 -
45.1195 -%if %{build_ada}
45.1196 -%files gnat
45.1197 -%defattr(-,root,root)
45.1198 -%{_prefix}/bin/gnat*
45.1199 -%{_infodir}/gnat*
45.1200 -%dir %{_prefix}/lib/gcc-lib
45.1201 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}
45.1202 -%dir %{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}
45.1203 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/adainclude
45.1204 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/adalib
45.1205 -%{_prefix}/lib/gcc-lib/%{_target_platform}/%{gcc_version}/gnat1
45.1206 -%doc gcc/ada/ChangeLog
45.1207 -
45.1208 -%files -n libgnat
45.1209 -%defattr(-,root,root)
45.1210 -%{_prefix}/%{_lib}/libgnat-*.so.*
45.1211 -%{_prefix}/%{_lib}/libgnarl-*.so.*
45.1212 -%endif
45.1213 -%endif
45.1214 -
45.1215 -%changelog
45.1216 -* Tue Sep 3 2002 Bill Nottingham <notting@redhat.com> 3.2-7
45.1217 -- fix calling of C++ destructors in certain cases
45.1218 -
45.1219 -* Tue Sep 3 2002 Jakub Jelinek <jakub@redhat.com> 3.2-6
45.1220 -- update from CVS (but revert C++ tail padding patches
45.1221 - for now)
45.1222 -- further fixes to make libstdc++-v3 build on glibc 2.3
45.1223 -- run libstdc++-v3 make check-abi on IA-32 during testing
45.1224 -
45.1225 -* Fri Aug 30 2002 Jakub Jelinek <jakub@redhat.com> 3.2-5
45.1226 -- disable tail copy patches, they seem to still have problems
45.1227 -- make libstdc++-v3 build on glibc 2.3 (and use thread-local
45.1228 - locale model)
45.1229 -- fix c89 and c99 scripts (#73104)
45.1230 -
45.1231 -* Wed Aug 26 2002 Jakub Jelinek <jakub@redhat.com> 3.2-4
45.1232 -- reorder alpha_encode_section_info checks slightly to fix an ICE
45.1233 - when building glibc and to take better advantage of visibility
45.1234 - attribute on Alpha
45.1235 -- as gdb is not there yet, disable -momit-leaf-frame-pointer
45.1236 - by default for now on IA-32
45.1237 -- fix IA-64 bootstrap with tail padding patch (Jason Merrill, Daniel Berlin)
45.1238 -- fix x86-64 %RIP to %rip, only output (%rip) if no other relocation
45.1239 - is used (Richard Henderson)
45.1240 -
45.1241 -* Fri Aug 23 2002 Jakub Jelinek <jakub@redhat.com> 3.2-3
45.1242 -- take advantage of __attribute__((visibility())) on Alpha
45.1243 -- avoid copying tail padding (Jason Merrill)
45.1244 -
45.1245 -* Thu Aug 22 2002 Jakub Jelinek <jakub@redhat.com> 3.2-2
45.1246 -- fixed Dwarf2 DW_OP_GNU_push_tls_address patch from Richard Henderson
45.1247 -- don't mention removed -a and -ax options in the documentation
45.1248 - (Nathan Sidwell, #72233)
45.1249 -- fixed __typeof() followed by __asm() redirection from Alexandre Oliva
45.1250 -
45.1251 -* Wed Aug 14 2002 Jakub Jelinek <jakub@redhat.com> 3.2-1
45.1252 -- update to 3.2 release
45.1253 -- fix x86-64 PR target/7559 (Jan Hubicka)
45.1254 -- fix -fprefetch-loop-arrays (Janis Johnson)
45.1255 -- fix x86-64 prefetch (Jan Hubicka)
45.1256 -
45.1257 -* Fri Aug 9 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.3
45.1258 -- istream fix (Benjamin Kosnik)
45.1259 -- emit Dwarf2 DW_OP_GNU_push_tls_address extension for TLS (Richard Henderson)
45.1260 -- temporarily disable __typeof() + __asm() fix
45.1261 -
45.1262 -* Thu Aug 8 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.2
45.1263 -- update from 3.2 branch
45.1264 - - ABI incompatible changes in libstdc++.so.5, long long bitfield
45.1265 - layout on IA-32 (both C and C++), oversized bitfields layout
45.1266 - on IA-32 and bitfields with base type with __attribute__((aligned ()))
45.1267 - - fix strstream segfaults (#68292, Benjamin Kosnik)
45.1268 -- fix __attribute__((visibility())) together with __asm__()
45.1269 - function redirection
45.1270 -- fix __typeof() followed by __asm() redirection (Alexandre Oliva)
45.1271 -- fix TLS ICE on glibc (#70061)
45.1272 -- fix K6 ICE on linux kernel (#69989, Richard Sandiford, Jan Hubicka)
45.1273 -- fix inlining bug with labels (#70941)
45.1274 -- fix fold-const bug (#70541)
45.1275 -- fix PR preprocessor/7358 (Neil Booth)
45.1276 -- error when mixing __thread and non-__thread declarations
45.1277 - (#70059, Aldy Hernandez)
45.1278 -- fix TLS bug on g++.dg/tls/diag-1.C (Jason Merrill)
45.1279 -- add -mcmodel= x86-64 documentation (Andreas Jaeger)
45.1280 -- avoid TLS emitting movl %gs:0, MEMORY on IA-32 (#71033)
45.1281 -
45.1282 -* Mon Jul 22 2002 Jakub Jelinek <jakub@redhat.com> 3.2-0.1
45.1283 -- first attempt for gcc 3.2
45.1284 -- remove .la files
45.1285 -
45.1286 -* Sat Jul 20 2002 Jakub Jelinek <jakub@redhat.com> 3.1-10
45.1287 -- update from 3.1 branch
45.1288 - - add throw() to set_new_handler (Andreas Schwab)
45.1289 - - fixed PR optimization/7147, optimization/7153
45.1290 -- make sure pic register is set up even when the only @PLT calls
45.1291 - are done in EH basic blocks (Richard Henderson)
45.1292 -
45.1293 -* Sun Jul 14 2002 Jakub Jelinek <jakub@redhat.com> 3.1-9
45.1294 -- define %%_gnu to nothing for compatibility
45.1295 -
45.1296 -* Sat Jul 13 2002 Jakub Jelinek <jakub@redhat.com> 3.1-8
45.1297 -- update from 3.1 branch
45.1298 - - fix OpenOffice miscompilation (PR c++/7279, Jason Merrill)
45.1299 - - PRs c++/7224, c++/6255, optimization/7145, c++/6706, preprocessor/7070,
45.1300 - middle-end/6963, target/6841, target/6770, target/6719,
45.1301 - other/6836, libstdc++/7057, libstdc++/7097, libstdc++/3946,
45.1302 - libstdc++/7173
45.1303 - - fix a GC bug with named labels in C++ (Jim Wilson)
45.1304 - - fix ICE on Mesa (Bernd Schmidt, #65771)
45.1305 -- added some NRV tests
45.1306 -- fix typo in i386 specs (PR c/7242)
45.1307 -- fix IA-32 ICE with shifts by negative values followed by compare
45.1308 - (PR middle-end/7245, #68395)
45.1309 -- fixed DWARF-2 output for const char * (PR debug/7241)
45.1310 -- actually enable __cxa_atexit for standard compliance at configury time
45.1311 -- added PPC as Ada enabled architecture
45.1312 -
45.1313 -* Wed Jun 19 2002 Jakub Jelinek <jakub@redhat.com> 3.1-7
45.1314 -- update from 3.1 branch
45.1315 - - PRs target/6922, opt/6722, c/7030, c/6677, objc/6834, c++/6892,
45.1316 - c++/6723, opt/6793
45.1317 -- use __cxa_atexit for standard compliance:
45.1318 - if your C++ project knows it won't call atexit from within its
45.1319 - static constructors, use -fno-use-cxa-atexit to optimize it
45.1320 -- share hard register rtxs where possible to speed the compiler up (Jeff Law)
45.1321 -- optimize tree_code_* arrays (Kaveh Ghazi)
45.1322 -- don't link prefix.o into libgnat, link libgnat against libgcc_s and
45.1323 - libgnarl against libgnat
45.1324 -- fix typo in GNAT %%post (#66847, #66941, #66639)
45.1325 -- add TLS support
45.1326 -
45.1327 -* Fri Jun 7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-6
45.1328 -- add GNAT
45.1329 -- remove DT_RPATH from Java binaries (#66103)
45.1330 -- obsolete kaffe, install jar as %{_prefix}/bin/jar
45.1331 -- add include/org directory in java
45.1332 -- add rmic and rmiregistry programs to libgcj
45.1333 -- add info documentation for gcj and various man pages
45.1334 -- add message catalogues for da, el, es, fr, ja, nl, sv, tr
45.1335 -- don't put IA-64 vtables with relocations into read-only sections
45.1336 - with -fpic
45.1337 -
45.1338 -* Tue Jun 4 2002 Jakub Jelinek <jakub@redhat.com> 3.1-5
45.1339 -- update from 3.1 branch
45.1340 - - PRs optimization/6822, preprocessor/6844, target/6838, target/6788,
45.1341 - libstdc++/6886, libstdc++/6795, libstdc++/6811
45.1342 -- m$ compatibility for unnamed fields as typedef of struct/union
45.1343 - (PR c/6660)
45.1344 -- fix -fverbose-asm with unnamed fields (PR c/6809)
45.1345 -- fix -mmmx ICE (PR optimization/6842)
45.1346 -- default to -momit-leaf-frame-pointer on i386 (Richard Henderson)
45.1347 -- use linkonce section/hidden symbol for i686 pic getpc thunks
45.1348 - (Richard Henderson)
45.1349 -
45.1350 -* Tue May 28 2002 Jakub Jelinek <jakub@redhat.com> 3.1-4
45.1351 -- rebuilt
45.1352 -
45.1353 -* Sat May 25 2002 Jakub Jelinek <jakub@redhat.com> 3.1-3
45.1354 -- update from 3.1 branch
45.1355 - - PRs other/6782, preprocessor/6780, preprocessor/6517,
45.1356 - libstdc++/6282, libstdc++/6701, libstdc++/6701
45.1357 - - fix out << "" bug (Ben Kosnik, #65409, PR libstdc++/6750)
45.1358 -- 3 new patches
45.1359 - - fix C++ __PRETTY_FUNCTION__ (PR c++/6794)
45.1360 - - fix ICE on jikes (#65379)
45.1361 - - add test for fixed mozilla miscompilation
45.1362 -- include intrinsic headers on IA-32/x86-64, include altivec.h on PPC
45.1363 -
45.1364 -* Wed May 22 2002 Jakub Jelinek <jakub@redhat.com> 3.1-2
45.1365 -- update from 3.1 branch
45.1366 -- 8 new patches
45.1367 - - fix as version test for 2.12.1 and newer binutils non-CVS releases
45.1368 - - fix ICE in do_subst (#65049)
45.1369 - - fix SSE conditional move (PR target/6753)
45.1370 - - fix SPARC CSE ICE (PR optimization/6759)
45.1371 - - fix x86_64 dbx64_register_map typo (Jan Hubicka)
45.1372 - - fix DWARF-2 with flag_asynchronous_unwind_tables set for leaf
45.1373 - functions (Jan Hubicka)
45.1374 - - fix DWARF-2 x86_64 __builtin_dwarf_reg_sizes (Jan Hubicka)
45.1375 - - fix x86_64 movabsdi (Michael Matz)
45.1376 -
45.1377 -* Wed May 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-1
45.1378 -- update to 3.1 final
45.1379 -- 15 new patches
45.1380 - - fix PR c/6643
45.1381 - - fix fold-const.c typo
45.1382 - - fix unitialized pointer-to-member values (Alexandre Oliva)
45.1383 - - fix templates with asm inputs (Jason Merrill)
45.1384 - - fix -fdata-section (Andreas Schwab)
45.1385 - - readd warning about i386 -malign-double into documentation (Jan Hubicka)
45.1386 - - fix PR libstdc++/6594 (Ben Kosnik)
45.1387 - - fix PR PR libstdc++/6648 (Paolo Carlini)
45.1388 - - fix libstdc++ testsuite rlimits (Rainer Orth)
45.1389 - - s390 java support (Gerhard Tonn)
45.1390 - - rotate testcases (Tom Rix)
45.1391 - - build libiberty with -fpic on x86_64 (Andreas Schwab)
45.1392 - - fix x86_64 multilib build (Bo Thorsen)
45.1393 - - fix x86_64 ASM_OUTPUT_MI_THUNK (Jan Hubicka)
45.1394 - - fix loop-2[cd].c tests on i386 (Eric Botcazou)
45.1395 -- fix typo in g77 info files tweaking
45.1396 -- fix libgcj.so symlink
45.1397 -
45.1398 -* Thu May 9 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.28
45.1399 -- update to CVS 3.1 branch
45.1400 - - PR c++/6212, target/6429, opt/6534, c/6543, target/6561, c/6569
45.1401 -- fix x86_64 q_regs_operand (Jan Hubicka)
45.1402 -- better PR c++/6381 fix (Jason Merrill)
45.1403 -
45.1404 -* Fri May 3 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.27
45.1405 -- update to CVS 3.1 branch
45.1406 - - PR target/5628, libstdc++/5820, c++/6396, preprocessor/6489,
45.1407 - libstdc++/6501, libstdc++/6511, target/6512, libstdc++/6513,
45.1408 - bootstrap/6514, opt/6516, bootstrap/6525, c++/6527, libstdc++/6533,
45.1409 - target/6540
45.1410 -- fix PR target/6542, target/6522, libstdc++/6549
45.1411 -
45.1412 -* Mon Apr 29 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.26
45.1413 -- update to CVS 3.1 branch
45.1414 - - PR c/3581, libstdc++/4150, libstdc++/4164, c/5154, c/5430, c++/5504,
45.1415 - c++/5658, c++/5719, f/6138, libgcj/6158, middle-end/6205, c++/6256,
45.1416 - c/6300, c++/6331, c/6343, c/6344, c++/6352, c/6358, libstdc++/6360,
45.1417 - c++/6395, target/6413, libstdc++/6414, target/6422, bootstrap/6445,
45.1418 - optimization/6475, target/6476, c++/6477, c++/6479, c++/6486, c++/6492,
45.1419 - target/6494, target/6496, c/6497, target/6500
45.1420 -- fix PR c++/6396
45.1421 -- run make check as part of build process
45.1422 -
45.1423 -* Thu Apr 18 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.25
45.1424 -- update to CVS 3.1 branch
45.1425 - - PR opt/420, c++/525, target/817, target/1538, opt/3967, target/3997,
45.1426 - opt/4120, bootstrap/4191, opt/4311, optimization/4328, c++/4884, c++/4934,
45.1427 - c/5078, c++/5104, opt/5120, c++/5189, c++/5373, target/5446, c/5484,
45.1428 - c++/5507, c++/5571, c++/5636, target/5672, target/5715, target/5886,
45.1429 - c++/5933, c++/5964, c++/5998, opt/6007, target/6032, target/6041,
45.1430 - target/6054, c++/6073, target/6082, optimization/6086, target/6087,
45.1431 - middle-end/6096, middle-end/6098, middle-end/6099, middle-end/6100,
45.1432 - middle-end/6102, fortran/6106, c++/6119, opt/6165, optimization/6177,
45.1433 - c++/6179, optimization/6189, c/6202, c/6223, optimization/6233,
45.1434 - middle-end/6279, c/6290, optimization/6305, target/6305, bootstrap/6315,
45.1435 - c++/6320...
45.1436 -- fix PR c++/6316
45.1437 -
45.1438 -* Wed Mar 27 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.24
45.1439 -- update to CVS 3.1 branch
45.1440 - - PRs c/5656, c/5972, bootstrap/4192, target/4792, bootstrap/4195,
45.1441 - optimization/5854, target/6043, c++/6037, bootstrap/4128, target/5740,
45.1442 - c/5597, optimization/5863, optimization/5742, target/3177, c/5354,
45.1443 - optimization/5999, target/5977, middle-end/5731, target/5312...
45.1444 -
45.1445 -* Fri Mar 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.23.1
45.1446 -- fix info and man page generation
45.1447 -
45.1448 -* Thu Mar 14 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.23
45.1449 -- update to CVS 3.1 branch
45.1450 - - fix IA-64 packet selection (PR optimization/5892)
45.1451 - - make highest_pow2_factor work for all constants (PR middle-end/5877)
45.1452 - - fix -Wunused (#61047)
45.1453 - - fix loop on mixed mode class assignments (#60923)
45.1454 - - fix wide character literals
45.1455 - - support SPARC v9 long distance branches (PR target/5626)
45.1456 - - fix SPARC leaf functions
45.1457 - - fix a rtl sharing problem (Richard Henderson, #60760,
45.1458 - PR optimization/5844)
45.1459 - - fix va_arg with variable size types (PR c/3711)
45.1460 - - PRs optimization/5901, optimization/5878, 5693, preprocessor/5899
45.1461 -- fix C++ ?: at the end of stmt expr (PR c++/5373)
45.1462 -- fix loop unrolling with sibcalls (PR optimization/5891)
45.1463 -
45.1464 -* Thu Mar 7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.22
45.1465 -- update to CVS 3.1 branch
45.1466 - - fix ICE with volatile long long (#60650)
45.1467 - - fix tempbuf.h (Philipp Thomas, #60212)
45.1468 - - fix -fssa-ccp (Jeff Law, #60651)
45.1469 - - versioned libstdc++
45.1470 - - backport __attribute__((visibility("..."))) patches from trunk
45.1471 -- include libstdc++ html documentation
45.1472 -
45.1473 -* Tue Feb 5 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.21
45.1474 -- update to CVS HEAD
45.1475 - - fix demangler (H.J. Lu, #59300, #59310)
45.1476 - - fix typo in IA-32 specs file (#59081)
45.1477 - - support moving SFmode values in MMX regs if -mmmx (#59083)
45.1478 - - fix recog_for_combine (#59084)
45.1479 - - don't ICE when inserting insns on edge from bb0 to bb0 (Bernd Schmidt,
45.1480 - #59087)
45.1481 - - make sure configure has not time in the future (#59203)
45.1482 - - fix division/modulo by certain constants (#58065, PR c/5304)
45.1483 - - fix -Wswitch (PR c/4475)
45.1484 -
45.1485 -* Thu Jan 31 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.20
45.1486 -- update to CVS HEAD
45.1487 - - fix jar (Tom Tromey)
45.1488 - - fix loop unrolling (Richard Henderson)
45.1489 -
45.1490 -* Wed Jan 30 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.19
45.1491 -- update to CVS HEAD
45.1492 - - fix a reload bug on ia32 (#58579, #58648)
45.1493 - - issue error about unknown -W* options (#58909)
45.1494 - - fix ia64 libbfd miscompilation (#58694)
45.1495 - - register all pending unparsed_text structures with GC (#58647)
45.1496 - - fix __builtin_apply with ia32 -msse (#58447)
45.1497 - - prevent ia64 prologue insns saving regs required for eh from being
45.1498 - deleted (#58387)
45.1499 -
45.1500 -* Tue Jan 15 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.18
45.1501 -- update to CVS HEAD
45.1502 - - handle static x[] = { [X...Y] = (foo) { Z } } (#58338)
45.1503 - - fix getdents.os miscompilation (Richard Henderson, #58308)
45.1504 - - fix ICE in try_forward_edges (#58125)
45.1505 - - fix ICE with -fexceptions -foptimize-sibling-calls
45.1506 -
45.1507 -* Tue Jan 8 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.17
45.1508 -- avoid division by 0 when computing prediction probabilities (#57992)
45.1509 -- fix ICE due to store_expr not adjusting value back for mode
45.1510 -- increase -ftemplate-depth default value to 500
45.1511 -
45.1512 -* Mon Jan 7 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.16
45.1513 -- if using PT_GNU_EH_FRAME registry, work around assembler bug resp. feature
45.1514 - and don't provide weak prototypes of functions which won't be used
45.1515 -- on Alpha, fix a typo so that crtbeginT.o is built and installed
45.1516 -- fix glibc inl-tester miscompilation on ia32
45.1517 -
45.1518 -* Sun Jan 6 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.15
45.1519 -- update to CVS HEAD (fix glibc bootstrap failure)
45.1520 -
45.1521 -* Thu Jan 3 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.14
45.1522 -- update to CVS HEAD (#57907)
45.1523 - - fix alpha bootstrap (Richard Henderson)
45.1524 -- fix simplification of (div:SI (???:DI ???) (const_int 1))
45.1525 - (#57916)
45.1526 -- add contrib/gcc_update --touch
45.1527 -
45.1528 -* Tue Jan 1 2002 Jakub Jelinek <jakub@redhat.com> 3.1-0.13
45.1529 -- update to CVS HEAD (fix glibc miscompilation on alpha)
45.1530 -- fix objc to not emit __objc_class_name_* without type and size
45.1531 -
45.1532 -* Mon Dec 31 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.12
45.1533 -- update to CVS HEAD
45.1534 -- fix sed commands for .la files
45.1535 -- make Alpha use PT_GNU_EH_FRAME
45.1536 -
45.1537 -* Thu Dec 27 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.11
45.1538 -- update to CVS HEAD (#57165, #57212, #57467, #57488, #57502,
45.1539 - #57505, #57574)
45.1540 -- readd .la files after fixing them up by sed
45.1541 -- add %%defattr(-,root,root) to libobjc subpackage
45.1542 -
45.1543 -* Mon Dec 3 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.10
45.1544 -- one more gcc.spec fix for passing --gdwarf-2 resp. --gstabs to as
45.1545 -- fix conditional register dead computation on IA-64
45.1546 -- fix extern array of incomplete structures handling
45.1547 -- fix gcc -xc -
45.1548 -- fix Fortran ICEs with SAVE_EXPRs (Richard Kenner)
45.1549 -
45.1550 -* Tue Nov 27 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.9
45.1551 -- update to CVS HEAD
45.1552 -- make DWARF 2 preferred debugging format on Linux
45.1553 -
45.1554 -* Mon Nov 12 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.8
45.1555 -- don't ship .la files (#56072)
45.1556 -- include libfrtbegin.a (#56098)
45.1557 -
45.1558 -* Mon Nov 12 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.7
45.1559 -- update to CVS HEAD
45.1560 -- back out Nov 7th loop.c change for now
45.1561 -
45.1562 -* Fri Nov 9 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.6
45.1563 -- update to CVS HEAD
45.1564 -- frame unwind compatibility with 7.[12] binutils
45.1565 -
45.1566 -* Tue Nov 6 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.5
45.1567 -- update to CVS HEAD
45.1568 -- merge DW_EH_PE_indirect constants and their relocs
45.1569 -
45.1570 -* Thu Oct 25 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.4
45.1571 -- don't loop forever or ICE on bogus array initializers (#53704)
45.1572 -- fix store motion with pure calls
45.1573 -- disable store motion for now
45.1574 -
45.1575 -* Tue Oct 23 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.3
45.1576 -- fix inlining of C nested functions with auto prototypes
45.1577 -
45.1578 -* Mon Oct 22 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.2
45.1579 -- update to CVS HEAD
45.1580 -- tree inlining fix from Alexandre Oliva
45.1581 -- fix anonymous union ICE on alpha
45.1582 -
45.1583 -* Mon Oct 15 2001 Jakub Jelinek <jakub@redhat.com> 3.1-0.1
45.1584 -- switch package to main compiler from alternate compiler
45.1585 -- update to CVS HEAD
45.1586 -- early gcc-2.96-RH compatibility in __frame_state_for
45.1587 -- change weak function tests for functions always present in GLIBC 2.2
45.1588 - into simple non-weak calls in crt*.o to avoid unnecessary symbol
45.1589 - lookups and prelink conflicts
45.1590 -- don't link against libgcc_s C shared libraries
45.1591 -
45.1592 -* Tue Oct 2 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-4
45.1593 -- update from CVS 3.0 branch
45.1594 - - ia64 function descriptors in vtables
45.1595 -- handle large files in Fortran (#53328)
45.1596 -- allow Java programs to be statically linked (#53605)
45.1597 -- remove #include_next patch, Benjamin commited it
45.1598 -
45.1599 -* Thu Sep 6 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-3
45.1600 -- don't use #include_next in <bits/std_c*> headers (Benjamin Kosnik, #53262)
45.1601 -
45.1602 -* Wed Sep 5 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-2
45.1603 -- update from CVS 3.0 branch
45.1604 -- check all gcc-2.96-RH patches whether they have made it into 3.0.1,
45.1605 - and if not, whether they are appropriate for 3.0.1
45.1606 -- 8 new patches
45.1607 - - add 36 testcases from gcc-2.96-RH
45.1608 - - fix ICE on very questionable C++ code from JDK (#39858, #52960)
45.1609 - - fix -frepo (Nathan Sidwell, #52877)
45.1610 - - avoid generating bogus .stabs (#49214)
45.1611 - - issue a clear error message about invalid ia32 floating point
45.1612 - asm constraints (#27137)
45.1613 - - fix some comment typos
45.1614 - - fix ADDRESSOF recognition (#29686)
45.1615 -
45.1616 -* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 3.0.1-1
45.1617 -- update from CVS (3.0.1 final)
45.1618 -- properly handle throw() exception specifiers in template decls (#51824)
45.1619 -- fix IA-64 varargs handling in presence of additional anonymous arguments
45.1620 - (#50757)
45.1621 -- fix boehm-gc for prelink
45.1622 -- fix a typo in gcc3-c++ description (#52323)
45.1623 -- remove Chill from package summary (#51764)
45.1624 -
45.1625 -* Tue Aug 7 2001 Jakub Jelinek <jakub@redhat.com> 3.0-6
45.1626 -- update from CVS
45.1627 - - fix glibc vfprintf miscompilation
45.1628 -- don't warn about if (&foo) if foo is weak (H.J.Lu, #50855)
45.1629 -
45.1630 -* Wed Jul 25 2001 Jakub Jelinek <jakub@redhat.com> 3.0-5
45.1631 -- include libgcjgc.a in libgcj3-devel
45.1632 -- include libgcjgc.so.* in libgcj3 on ia64
45.1633 -- remove dependency on libgcj on ia64
45.1634 -- add ldconfig to libgcj3 post/postun
45.1635 -
45.1636 -* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com> 3.0-4
45.1637 -- update from CVS
45.1638 -- make gcc3-java/libgcj3* packages, so that they can coexist
45.1639 - with 2.96-RH Java
45.1640 -- make sure shared Java libraries are built with proper dependencies
45.1641 -
45.1642 -* Wed Jul 11 2001 Jakub Jelinek <jakub@redhat.com> 3.0-3
45.1643 -- fix libgcc_s.so and libstdc++.so symlinks
45.1644 -- don't ship jar
45.1645 -
45.1646 -* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com> 3.0-2
45.1647 -- move libstdc++.so into gcc-lib
45.1648 -- add libobjc.so symlink
45.1649 -
45.1650 -* Tue Jul 10 2001 Jakub Jelinek <jakub@redhat.com> 3.0-1
45.1651 -- new rpm
46.1 --- a/patches/gcc/3.2.3/README-sh Wed Oct 21 18:08:31 2009 +0200
46.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
46.3 @@ -1,16 +0,0 @@
46.4 -http://mirror.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains the following patches:
46.5 -
46.6 -gcc-20030210-sh-linux-1.patch
46.7 -gcc-3.2.3-libffi-1.patch
46.8 -gcc-3.2.3-sh-linux-dwarf2-1.patch (*not* applied by the spec file, it's in there by accident)
46.9 -
46.10 -gcc-3.2.3-libffi-1.patch was needed just to build, I think.
46.11 -
46.12 -After that was applied, sh4 gcc seemed to compile fine, but c++ programs
46.13 -failed to execute because libstdc++.so.5 was built without version
46.14 -info. This was caused directly by libstdc++-v3/configure setting
46.15 -SYMVER_MAP=config/linker-map.dummy because it sees that
46.16 -no libgcc_s.so was generated; configure says
46.17 - checking for shared libgcc... no.
46.18 -
46.19 -Applying gcc-20030210-sh-linux-1.patch in hopes it makes those problems go away.
47.1 --- a/patches/gcc/3.2.3/gcc-sh-linux.spec Wed Oct 21 18:08:31 2009 +0200
47.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
47.3 @@ -1,739 +0,0 @@
47.4 -Summary: The GNU Compiler Collection for SuperH.
47.5 -%define GCC_VERSION 3.2.3
47.6 -%define arch_list sh3-linux sh3eb-linux sh4-linux sh4eb-linux
47.7 -%define TARGET_LIBSTDC 1
47.8 -%define TARGET_JAVA 1
47.9 -
47.10 -Name: gcc
47.11 -Version: 3.2.3
47.12 -Release: 3
47.13 -
47.14 -Copyright: GPL
47.15 -Group: Development/Languages
47.16 -Source0: gcc-%{GCC_VERSION}.tar.bz2
47.17 -Patch1: gcc-20030210-sh-linux-1.patch
47.18 -Patch2: gcc-3.2.3-libffi-1.patch
47.19 -Patch3: gcc-3.2.3-sh-linux-dwarf2-1.patch
47.20 -Buildroot: /var/tmp/gcc-%{_target}-root
47.21 -ExclusiveArch: i386 sh3 sh3eb sh4 sh4eb
47.22 -
47.23 -%description
47.24 -This package contains the GNU Compiler Collection: gcc and g++.
47.25 -You'll need this package in order to compile C/C++ code.
47.26 -
47.27 -%ifarch i386
47.28 -
47.29 -# ==================== Cross Compiler ===============================
47.30 -
47.31 -%package sh-linux
47.32 -Summary: The GNU Compiler Collection for sh-linux.
47.33 -Group: Development/Languages
47.34 -Requires: binutils-sh-linux >= 2.13.2
47.35 -Provides: gcc-sh-linux
47.36 -Obsoletes: gcc-sh3-linux gcc-sh3eb-linux gcc-sh4-linux gcc-sh4eb-linux
47.37 -Obsoletes: gcc-sh3-linux-c++ gcc-sh3eb-linux-c++ gcc-sh4-linux-c++ gcc-sh4eb-linux-c++
47.38 -Obsoletes: libstdc++-sh3-linux libstdc++-sh3eb-linux libstdc++-sh4-linux libstdc++-sh4eb-linux
47.39 -AutoReqProv: no
47.40 -
47.41 -%description sh-linux
47.42 -The gcc-sh-linux package contains GNU Compiler Collection: gcc g++ and libstdc++-v3.
47.43 -
47.44 -It includes support for most of the current C++ specification, including templates and
47.45 -exception handling. It does also include the standard C++ library and C++ header files.
47.46 -You'll need this package in order to cross compile C/C++ code for sh-linux.
47.47 -
47.48 -%package -n libgcj-sh-linux
47.49 -Summary: Header files and libraries for sh-linux Java development.
47.50 -Group: Development/Libraries
47.51 -Requires: gcc-sh-linux = %{version}-%{release}
47.52 -AutoReqProv: no
47.53 -
47.54 -%description -n libgcj-sh-linux
47.55 -The Java static libraries and C header files. You will need this
47.56 -package to compile your Java programs for sh-linux using the gcc Java compiler (gcj).
47.57 -
47.58 -%else
47.59 -# =========================== Native Compiler =================================
47.60 -%package libgcc
47.61 -Summary: runtime libraries for the GNU Compiler Collection.
47.62 -Group: System Environment/Libraries
47.63 -
47.64 -%description libgcc
47.65 -This package contains libgcc shared libraries for the GNU C Compiler Collection.
47.66 -You'll need this package in order to execute C,C++,JAVA code
47.67 -that uses shared libgcc.
47.68 -
47.69 -%package c++
47.70 -Summary: C++ support for gcc
47.71 -Group: Development/Languages
47.72 -Requires: gcc = %{version}-%{release}
47.73 -
47.74 -%description c++
47.75 -This package adds C++ support to the GNU Compiler Collection. It includes
47.76 -support for most of the current C++ specification, including templates and
47.77 -exception handling. It does include the static standard C++
47.78 -library and C++ header files; the library for dynamically linking
47.79 -programs is available separately.
47.80 -
47.81 -%package -n libstdc++
47.82 -Summary: GNU c++ library.
47.83 -Group: System Environment/Libraries
47.84 -
47.85 -%description -n libstdc++
47.86 -The libstdc++ package contains a snapshot of the GCC Standard C++
47.87 -Library v3, an ongoing project to implement the ISO 14882 Standard C++
47.88 -library.
47.89 -
47.90 -%package -n libstdc++-devel
47.91 -Summary: Header files and libraries for C++ development
47.92 -Group: Development/Libraries
47.93 -Requires: libstdc++ = %{version}-%{release}, gcc-c++ = %{version}-%{release}
47.94 -
47.95 -%description -n libstdc++-devel
47.96 -This is the GNU implementation of the standard C++ libraries. This
47.97 -package includes the header files and libraries needed for C++
47.98 -development. This includes SGI's implementation of the STL.
47.99 -
47.100 -%package java
47.101 -Summary: Java support for gcc
47.102 -Group: Development/Languages
47.103 -Requires: gcc = %{version}-%{release}, libgcj = %{version}-%{release}, libgcj-devel = %{version}-%{release}
47.104 -
47.105 -%description java
47.106 -This package adds experimental support for compiling Java(tm) programs and
47.107 -bytecode into native code. To use this you will also need the libgcj and
47.108 -libgcj-devel packages.
47.109 -
47.110 -%package -n libgcj
47.111 -Summary: Java runtime library for gcc.
47.112 -Group: System Environment/Libraries
47.113 -
47.114 -%description -n libgcj
47.115 -The Java runtime library. You will need this package to run your Java
47.116 -programs compiled using the gcc Java compiler (gcj).
47.117 -
47.118 -%package -n libgcj-devel
47.119 -Summary: Header files and libraries for Java development.
47.120 -Group: Development/Libraries
47.121 -Requires: libgcj = %{version}-%{release}
47.122 -
47.123 -%description -n libgcj-devel
47.124 -The Java static libraries and C header files. You will need this
47.125 -package to compile your Java programs using the gcc Java compiler (gcj).
47.126 -
47.127 -%endif
47.128 -
47.129 -%prep
47.130 -%setup -q -n gcc-%{GCC_VERSION}
47.131 -%patch1 -p1
47.132 -%patch2 -p1
47.133 -##%patch3 -p1
47.134 -
47.135 -%build
47.136 -%ifarch i386
47.137 -# build cross compiler for i386-linux host
47.138 -for arch in sh-linux; do
47.139 - rm -rf ${arch}
47.140 - mkdir ${arch}
47.141 -
47.142 - CONFIG_ARGS="\
47.143 - --prefix=%{_prefix} \
47.144 - --mandir=%{_mandir} \
47.145 - --infodir=%{_infodir} \
47.146 - --target=${arch} \
47.147 - --host=%{_host} \
47.148 - --build=%{_build} \
47.149 - --enable-languages=c,c++,java \
47.150 - --with-system-zlib \
47.151 - --with-gxx-include-dir=%{_prefix}/${arch}/include/g++-v3 \
47.152 - --includedir=%{_prefix}/${arch}/include \
47.153 - --disable-checking \
47.154 - --disable-shared \
47.155 - --enable-__cxa_atexit \
47.156 - --enable-c99 \
47.157 - --enable-threads=posix \
47.158 - --enable-long-long"
47.159 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.160 - CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
47.161 - fi
47.162 - ( cd $arch
47.163 - ../configure ${CONFIG_ARGS}
47.164 - )
47.165 - if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
47.166 - sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
47.167 - mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
47.168 - fi
47.169 - make all-gcc -C ${arch}
47.170 -
47.171 - if [ %{TARGET_LIBSTDC} -ne 0 ]; then
47.172 - CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
47.173 - make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host" all-target-libstdc++-v3 -C ${arch}
47.174 - fi
47.175 -
47.176 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.177 - make all-fastjar -C ${arch}
47.178 - CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--host=%{_host}/--host=${arch}/`"
47.179 - dir=`pwd`
47.180 -
47.181 - ac_cv_file__proc_self_exe=yes \
47.182 - ac_cv_prog_GCJ="$dir/$arch/gcc/gcj -B$dir/$arch/$arch/libjava/ -B$dir/$arch/gcc/ -B%{_prefix}/$arch/bin/ -B%{_prefix}/$arch/lib/ -isystem %{_prefix}/$arch/include" \
47.183 - make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host --enable-multilib --with-target-subdir=${arch} --with-x=no" \
47.184 - all-target-libjava -C ${arch}
47.185 - fi
47.186 -
47.187 -%else
47.188 -# Canadian cross (build native compiler)
47.189 -for arch in %{_target}; do
47.190 - rm -rf ${arch}
47.191 - mkdir -p ${arch}
47.192 - CONFIG_ARGS="\
47.193 - --prefix=%{_prefix} \
47.194 - --mandir=%{_mandir} \
47.195 - --infodir=%{_infodir} \
47.196 - --target=${arch} \
47.197 - --host=${arch} \
47.198 - --build=%{_build} \
47.199 - --enable-languages=c,c++,java \
47.200 - --with-system-zlib \
47.201 - --with-gxx-include-dir=%{_prefix}/include/g++-v3 \
47.202 - --disable-checking \
47.203 - --disable-shared \
47.204 - --enable-__cxa_atexit \
47.205 - --enable-c99 \
47.206 - --enable-threads=posix \
47.207 - --enable-long-long"
47.208 -
47.209 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.210 - CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
47.211 - fi
47.212 -
47.213 - ( cd ${arch}
47.214 - CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ \
47.215 - ../configure $CONFIG_ARGS
47.216 - )
47.217 -
47.218 - if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
47.219 - sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
47.220 - mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
47.221 - fi
47.222 -
47.223 - make all-build-libiberty all-gcc -C ${arch}
47.224 -
47.225 - if [ %{TARGET_LIBSTDC} -ne 0 ]; then
47.226 - CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
47.227 - make TARGET_CONFIGARGS="${CONFIG_ARGS}" all-target-libstdc++-v3 -C ${arch}
47.228 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.229 - ( mkdir -p ${arch}/fastjar; cd ${arch}/fastjar; rm *; ../../fastjar/configure --with-system-zlib; make )
47.230 - ac_cv_file__proc_self_exe=yes \
47.231 - CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ GCJ=${arch}-gcj \
47.232 - make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-x=no" configure-target-libjava -C ${arch}
47.233 -
47.234 - make -C ${arch}/${arch}/libffi
47.235 - make -C ${arch}/${arch}/boehm-gc
47.236 - make -C ${arch}/${arch}/zlib
47.237 - make GCJ=${arch}-gcj GCJH=${arch}-gcjh ZIP=${arch}-jar -C ${arch}/${arch}/libjava
47.238 - (
47.239 - rm -rf ${arch}/${arch}/fastjar
47.240 - mkdir -p ${arch}/${arch}/fastjar
47.241 - cd ${arch}/${arch}/fastjar
47.242 -
47.243 - ac_cv_sizeof_char=1 \
47.244 - ac_cv_sizeof_short=2 \
47.245 - ac_cv_sizeof_int=4 \
47.246 - ac_cv_sizeof_long=4 \
47.247 - ac_cv_sizeof_long_long=8 \
47.248 - ac_cv_sizeof_float=4 \
47.249 - ac_cv_sizeof_double=8 \
47.250 - ac_cv_sizeof_long_double=8 \
47.251 - ac_cv_sizeof_void_p=4 \
47.252 - ac_cv_file__proc_self_exe=yes \
47.253 - ac_cv_header_langinfo_h=yes \
47.254 - CC=${arch}-gcc ../../../fastjar/configure $CONFIG_ARGS
47.255 -
47.256 - make
47.257 - )
47.258 -
47.259 - fi
47.260 - fi
47.261 -%endif
47.262 -done
47.263 -
47.264 -%install
47.265 -rm -rf $RPM_BUILD_ROOT
47.266 -mkdir -p ${RPM_BUILD_ROOT}/{%{_prefix}/bin,lib}
47.267 -
47.268 -%ifarch i386
47.269 - ARCH_STRTIP=strip
47.270 - EXESUFFIX=""
47.271 - arch=sh-linux
47.272 - TOOLPREFIX=${arch}-
47.273 - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/{bin,include,lib,share}
47.274 - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/lib/{m4,mb/m4}
47.275 - make DESTDIR=${RPM_BUILD_ROOT} \
47.276 - install-gcc \
47.277 - install-fastjar \
47.278 - -C ${arch}
47.279 -%if 0
47.280 - ( cd ${RPM_BUILD_ROOT}%{_prefix}/sh-linux/lib
47.281 - rm -f libgcc_s_*.so
47.282 - mv libgcc_s_mb.so.1 mb/libgcc_s.so.1
47.283 - mv libgcc_s_m4.so.1 m4/libgcc_s.so.1
47.284 - mv libgcc_s_mb_m4.so.1 mb/m4/libgcc_s.so.1
47.285 - ln -s libgcc_s.so.1 mb/libgcc_s.so
47.286 - ln -s libgcc_s.so.1 m4/libgcc_s.so
47.287 - ln -s libgcc_s.so.1 mb/m4/libgcc_s.so
47.288 - )
47.289 -%endif
47.290 -
47.291 - if [ %{TARGET_LIBSTDC} -ne 0 ]; then
47.292 - make DESTDIR=${RPM_BUILD_ROOT} \
47.293 - install-target-libstdc++-v3 \
47.294 - -C ${arch}
47.295 - fi
47.296 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.297 - make DESTDIR=${RPM_BUILD_ROOT} \
47.298 - install-target-libjava \
47.299 - install-target-boehm-gc \
47.300 - install-target-zlib \
47.301 - -C ${arch}
47.302 - make DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix}/${arch} \
47.303 - install -C ${arch}/${arch}/libffi
47.304 - mv -f $RPM_BUILD_ROOT%{_prefix}/share/java $RPM_BUILD_ROOT%{_prefix}/sh-linux/share/
47.305 - fi
47.306 - rm -f $RPM_BUILD_ROOT%{_prefix}/bin/{gcov,gccbug}
47.307 - rm -f $RPM_BUILD_ROOT%{_prefix}/${arch}/bin/{gij,jv-convert}
47.308 - sed -e 's/@@VERSION@@/%{GCC_VERSION}/g' debian/shCPU-linux-GCC >$RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
47.309 - chmod 0755 $RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
47.310 -
47.311 - LIBSTDC=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libstdc++.so*`
47.312 - LIBGCJ=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libgcj.so*`
47.313 - LIBFFI=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libffi*.so*`
47.314 - # literally (binary-ly) same
47.315 - PROGS="cpp c++ g++ g77 gcc gcj"
47.316 - DRIVERS="cc1 cc1obj cc1plus collect2 cpp0 f771 jc1 tradcpp0 jvgenmain"
47.317 - OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o"
47.318 - LIBS="libgcc.a libgcc_eh.a libobjc.a"
47.319 - LIBS_1="$LIBSTDC \
47.320 - $LIBGCJ libgcj.spec \
47.321 - $LIBFFI "
47.322 - LIBS_2="libstdc++.a libstdc++.la \
47.323 - libsupc++.a libsupc++.la \
47.324 - libgcj.a libgcj.la \
47.325 - libffi.a libffi.la"
47.326 - INCLUDE="include"
47.327 -
47.328 - for CPU in sh3 sh3eb sh4 sh4eb; do
47.329 - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}
47.330 - mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${CPU}-linux/{lib,share/java}
47.331 - # Make symbolic links for include dir.
47.332 - ln -s ../sh-linux/include $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/include
47.333 -
47.334 - # Make symbolic links for libgcj.jar
47.335 - ln -s ../../sh-linux/share/java/libgcj-%{GCC_VERSION}.jar $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.336 -
47.337 - # Make symbolic links for executables.
47.338 - for p in ${PROGS}; do
47.339 - ln -s shCPU-linux-GCC $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-$p
47.340 - done
47.341 - ln -s sh-linux-gcjh $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-gcjh
47.342 -
47.343 - case "${CPU}" in
47.344 - sh3)
47.345 - MULTILIBDIR=
47.346 - MULTIPARENTDIR=
47.347 - AS_ENDIAN_FLAG="-little"
47.348 - CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
47.349 - CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
47.350 - CC1_CPU_ENDIAN_FLAGS="-ml -m3"
47.351 - CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m3"
47.352 - LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
47.353 - LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3-linux/lib"
47.354 - ;;
47.355 - sh3eb)
47.356 - MULTILIBDIR=/mb
47.357 - MULTIPARENTDIR=../
47.358 - AS_ENDIAN_FLAG="-big"
47.359 - CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
47.360 - CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
47.361 - CC1_CPU_ENDIAN_FLAGS="-mb -m3"
47.362 - CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m3"
47.363 - LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
47.364 - LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3eb-linux/lib"
47.365 - ;;
47.366 - sh4)
47.367 - MULTILIBDIR=/m4
47.368 - MULTIPARENTDIR=../
47.369 - AS_ENDIAN_FLAG="-little"
47.370 - CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
47.371 - CPP_CPU_DEFS="-D__SH4__"
47.372 - CC1_CPU_ENDIAN_FLAGS="-ml -m4"
47.373 - CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m4"
47.374 - LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
47.375 - LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4-linux/lib"
47.376 - ;;
47.377 - sh4eb)
47.378 - MULTILIBDIR=/mb/m4
47.379 - MULTIPARENTDIR=../../
47.380 - AS_ENDIAN_FLAG="-big"
47.381 - CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
47.382 - CPP_CPU_DEFS="-D__SH4__"
47.383 - CC1_CPU_ENDIAN_FLAGS="-mb -m4"
47.384 - CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m4"
47.385 - LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
47.386 - LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4eb-linux/lib"
47.387 - ;;
47.388 - esac
47.389 -
47.390 - # Make symbolic links for GCC drivers, objects, libraries, and include dir.
47.391 - for f in ${DRIVERS} ${INCLUDE}; do
47.392 - if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/$f ]; then
47.393 - ln -s ../../sh-linux/%{GCC_VERSION}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
47.394 - fi
47.395 - done
47.396 - for f in ${OBJS} ${LIBS}; do
47.397 - if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f ]; then
47.398 - ln -s ../../sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
47.399 - fi
47.400 - done
47.401 -
47.402 - for f in ${LIBS_1} ${LIBS_2}; do
47.403 - if [ -e $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f ]; then
47.404 - mv -f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/lib
47.405 - ln -s ${MULTIPARENTDIR}../../${CPU}-linux/lib/$f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f
47.406 - fi
47.407 - done
47.408 -
47.409 - sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
47.410 - -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
47.411 - -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
47.412 - -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
47.413 - -e "s+@CC1PLUS_CPU_ENDIAN_FLAGS@+${CC1PLUS_CPU_ENDIAN_FLAGS}+" \
47.414 - -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
47.415 - -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
47.416 - debian/edit-specs.in >${arch}/edit-specs-${CPU}.sed
47.417 -
47.418 - sed -f ${arch}/edit-specs-${CPU}.sed \
47.419 - $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs \
47.420 - > $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/specs
47.421 -
47.422 - done
47.423 -
47.424 -%else
47.425 - ARCH_STRTIP=%{_target}-strip
47.426 - EXESUFFIX=""
47.427 - TOOLPREFIX=""
47.428 - ln -s ..%{_prefix}/bin/cpp ${RPM_BUILD_ROOT}/lib/cpp
47.429 - ln -s gcc ${RPM_BUILD_ROOT}%{_prefix}/bin/cc
47.430 - arch=%{_target}
47.431 - make DESTDIR=${RPM_BUILD_ROOT} \
47.432 - install -C ${arch}
47.433 - if [ %{TARGET_JAVA} -ne 0 ]; then
47.434 - make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/libffi
47.435 - make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/fastjar
47.436 - mv -f ${RPM_BUILD_ROOT}/%{_prefix}/%{_lib}/libgcj.spec \
47.437 - ${RPM_BUILD_ROOT}/%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/
47.438 - fi
47.439 - $ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/gcov$EXESUFFIX || :
47.440 -
47.441 -cat >${arch}/edit-specs <<EOF
47.442 -/^*cross_compile:$/ {
47.443 -n
47.444 -c\\
47.445 -0
47.446 -}
47.447 -EOF
47.448 - sed -f ${arch}/edit-specs -e 's#-rpath-link.*/usr/%{_target}/lib##' \
47.449 - ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs \
47.450 - >${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$
47.451 - mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$ \
47.452 - ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs
47.453 -
47.454 - sed -e "s/dependency_libs=.*/dependency_libs='-lm -lgcc -lc -lgcc'/" \
47.455 - ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la \
47.456 - >${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$
47.457 - mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$ \
47.458 - ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la
47.459 -
47.460 - sed -e "s/dependency_libs=.*/dependency_libs='-lpthread -ldl -lz -lm -lgcc -lc -lgcc'/" \
47.461 - ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la \
47.462 - >${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$
47.463 - mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$ \
47.464 - ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la
47.465 -
47.466 -cat >$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h <<EOF
47.467 -#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
47.468 -#include_next <limits.h>
47.469 -#undef _GCC_NEXT_LIMITS_H
47.470 -EOF
47.471 -
47.472 -%endif
47.473 -
47.474 - $ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/${TOOLPREFIX}{gcc,cpp,c++,c++filt,gcj,gcjh,gij,jar,grepjar,jcf-dump,jv-convert,jv-scan}$EXESUFFIX || :
47.475 - FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/cc1${EXESUFFIX})
47.476 - $ARCH_STRTIP $FULLPATH/{cc1${EXESUFFIX},cc1plus${EXESUFFIX},cpp0${EXESUFFIX},tradcpp0${EXESUFFIX},collect2${EXESUFFIX},jc1${EXESUFFIX},jvgenmain${EXESUFFIX}} || :
47.477 -
47.478 - # Strip static libraries
47.479 - sh-linux-strip -S -R .comment `find $RPM_BUILD_ROOT -type f -name "*.a"` || :
47.480 -
47.481 - # Strip ELF shared objects
47.482 - for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) `; do
47.483 - if file $f | grep -q "shared object.*not stripped"; then
47.484 - sh-linux-strip --strip-unneeded -R .comment $f
47.485 - fi
47.486 - done
47.487 -
47.488 -%clean
47.489 -rm -rf $RPM_BUILD_ROOT
47.490 -
47.491 -# ==================== Cross Compiler ===============================
47.492 -%ifarch i386
47.493 -
47.494 -%files sh-linux
47.495 -%defattr(-,root,root)
47.496 -%{_prefix}/bin/sh*
47.497 -%dir %{_prefix}/lib/gcc-lib/sh-linux
47.498 -%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}
47.499 -%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include
47.500 -%dir %{_prefix}/lib/gcc-lib/sh3-linux
47.501 -%dir %{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}
47.502 -%dir %{_prefix}/lib/gcc-lib/sh3eb-linux
47.503 -%dir %{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}
47.504 -%dir %{_prefix}/lib/gcc-lib/sh4-linux
47.505 -%dir %{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}
47.506 -%dir %{_prefix}/lib/gcc-lib/sh4eb-linux
47.507 -%dir %{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}
47.508 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1
47.509 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1plus
47.510 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/collect2
47.511 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cpp0
47.512 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/*.o
47.513 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/libgcc*.a
47.514 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs
47.515 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/tradcpp0
47.516 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jc1
47.517 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jvgenmain
47.518 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/m4
47.519 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/mb
47.520 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stddef.h
47.521 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdarg.h
47.522 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/varargs.h
47.523 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/float.h
47.524 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/limits.h
47.525 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdbool.h
47.526 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/iso646.h
47.527 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/syslimits.h
47.528 -%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/README
47.529 -%{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}/*
47.530 -%{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}/*
47.531 -%{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}/*
47.532 -%{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}/*
47.533 -%{_mandir}/man1/sh-linux-*
47.534 -%dir %{_prefix}/sh-linux/include
47.535 -%{_prefix}/sh3-linux/include
47.536 -%{_prefix}/sh3eb-linux/include
47.537 -%{_prefix}/sh4-linux/include
47.538 -%{_prefix}/sh4eb-linux/include
47.539 -%endif
47.540 -
47.541 -%if %{TARGET_LIBSTDC}
47.542 -%ifarch i386
47.543 -%{_prefix}/sh-linux/include/g++-v3
47.544 -%{_prefix}/sh-linux/lib/libs*
47.545 -%{_prefix}/sh-linux/lib/m4/libs*
47.546 -%{_prefix}/sh-linux/lib/mb/libs*
47.547 -%{_prefix}/sh-linux/lib/mb/m4/libs*
47.548 -%{_prefix}/sh3-linux/lib/libs*
47.549 -%{_prefix}/sh4-linux/lib/libs*
47.550 -%{_prefix}/sh3eb-linux/lib/libs*
47.551 -%{_prefix}/sh4eb-linux/lib/libs*
47.552 -%endif
47.553 -%endif
47.554 -
47.555 -%if %{TARGET_JAVA}
47.556 -%ifarch i386
47.557 -%files -n libgcj-sh-linux
47.558 -%defattr(-,root,root)
47.559 -%{_prefix}/sh-linux/include/*.h
47.560 -%{_prefix}/sh-linux/include/gcj
47.561 -%{_prefix}/sh-linux/include/gnu/*
47.562 -%{_prefix}/sh-linux/include/java
47.563 -%{_prefix}/sh-linux/lib/lib*gcj*
47.564 -%{_prefix}/sh-linux/lib/m4/lib*gcj*
47.565 -%{_prefix}/sh-linux/lib/mb/lib*gcj*
47.566 -%{_prefix}/sh-linux/lib/mb/m4/lib*gcj*
47.567 -%{_prefix}/sh-linux/lib/libffi*
47.568 -%{_prefix}/sh-linux/lib/m4/libffi*
47.569 -%{_prefix}/sh-linux/lib/mb/libffi*
47.570 -%{_prefix}/sh-linux/lib/mb/m4/libffi*
47.571 -%{_prefix}/sh-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.572 -%{_prefix}/sh3-linux/lib/lib*gcj*
47.573 -%{_prefix}/sh3-linux/lib/libffi*
47.574 -%{_prefix}/sh3-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.575 -%{_prefix}/sh4-linux/lib/lib*gcj*
47.576 -%{_prefix}/sh4-linux/lib/libffi*
47.577 -%{_prefix}/sh4-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.578 -%{_prefix}/sh3eb-linux/lib/lib*gcj*
47.579 -%{_prefix}/sh3eb-linux/lib/libffi*
47.580 -%{_prefix}/sh3eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.581 -%{_prefix}/sh4eb-linux/lib/lib*gcj*
47.582 -%{_prefix}/sh4eb-linux/lib/libffi*
47.583 -%{_prefix}/sh4eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
47.584 -%endif
47.585 -%endif
47.586 -
47.587 -%ifarch sh3 sh3eb sh4 sh4eb
47.588 -# =========================== Native Compiler =================================
47.589 -%files
47.590 -%defattr(-,root,root)
47.591 -%dir %{_prefix}/lib/gcc-lib/%{_target}
47.592 -%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
47.593 -%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include
47.594 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1
47.595 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/collect2
47.596 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cpp0
47.597 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/crt*.o
47.598 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcc*.a
47.599 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/specs
47.600 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/tradcpp0
47.601 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stddef.h
47.602 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdarg.h
47.603 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/varargs.h
47.604 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/float.h
47.605 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/limits.h
47.606 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdbool.h
47.607 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/iso646.h
47.608 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h
47.609 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/README
47.610 -%{_prefix}/bin/gcc
47.611 -%{_prefix}/bin/%{_target}-gcc
47.612 -%{_prefix}/bin/cpp
47.613 -%{_prefix}/bin/gccbug
47.614 -%{_prefix}/bin/gcov
47.615 -%{_prefix}/bin/cc
47.616 -/lib/cpp
47.617 -%{_infodir}/cpp*
47.618 -%{_infodir}/gcc*
47.619 -
47.620 -%if 0
47.621 -%files libgcc
47.622 -%defattr(-,root,root)
47.623 -/lib/libgcc_s.so*
47.624 -%endif
47.625 -
47.626 -%files c++
47.627 -%defattr(-,root,root)
47.628 -%{_prefix}/bin/c++
47.629 -%{_prefix}/bin/g++
47.630 -%{_prefix}/bin/c++filt
47.631 -%{_prefix}/bin/%{_target}-c++
47.632 -%{_prefix}/bin/%{_target}-g++
47.633 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1plus
47.634 -%endif
47.635 -
47.636 -%if %{TARGET_LIBSTDC}
47.637 -%ifarch sh3 sh3eb sh4 sh4eb
47.638 -%files -n libstdc++
47.639 -%defattr(-,root,root)
47.640 -%{_prefix}/lib/libstdc++.so*
47.641 -
47.642 -%files -n libstdc++-devel
47.643 -%defattr(-,root,root)
47.644 -%{_prefix}/include/g++-v3
47.645 -%{_prefix}/lib/libstdc++.*a
47.646 -%endif
47.647 -%endif
47.648 -
47.649 -%if %{TARGET_JAVA}
47.650 -%ifarch sh3 sh3eb sh4 sh4eb
47.651 -%files java
47.652 -%defattr(-,root,root)
47.653 -%{_prefix}/bin/addr2name.awk
47.654 -%{_prefix}/bin/gcj
47.655 -%{_prefix}/bin/gcjh
47.656 -%{_prefix}/bin/gij
47.657 -%{_prefix}/bin/jar
47.658 -%{_prefix}/bin/grepjar
47.659 -%{_prefix}/bin/jcf-dump
47.660 -%{_prefix}/bin/jv-convert
47.661 -%{_prefix}/bin/jv-scan
47.662 -%dir %{_prefix}/lib/gcc-lib
47.663 -%dir %{_prefix}/lib/gcc-lib/%{_target}
47.664 -%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
47.665 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jc1
47.666 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jvgenmain
47.667 -%{_infodir}/gcj*
47.668 -
47.669 -%files -n libgcj
47.670 -%defattr(-,root,root)
47.671 -%{_prefix}/%{_lib}/libgcj.so*
47.672 -%{_prefix}/%{_lib}/libffi*.so*
47.673 -%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcj.spec
47.674 -%{_prefix}/share/java/libgcj-%{GCC_VERSION}.jar
47.675 -
47.676 -%files -n libgcj-devel
47.677 -%defattr(-,root,root)
47.678 -%{_prefix}/include/*.h
47.679 -%{_prefix}/include/gcj
47.680 -%{_prefix}/include/gnu/*
47.681 -%{_prefix}/include/java
47.682 -%{_prefix}/lib/libgcj.*a
47.683 -%{_prefix}/lib/libffi.*a
47.684 -%endif
47.685 -%endif
47.686 -
47.687 -%changelog
47.688 -* Wed Feb 19 2003 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.689 -- version 3.2.2.
47.690 -
47.691 -* Tue Feb 19 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.692 -- version 3.0.4.
47.693 -
47.694 -* Tue Feb 12 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.695 -- add java support.
47.696 -
47.697 -* Thu Feb 7 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.698 -- follow debian/SH update.
47.699 -
47.700 -* Tue Feb 5 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.701 -- follow debian/SH update.
47.702 -
47.703 -* Thu Jan 24 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.704 -- rebuild with new binutils.
47.705 -
47.706 -* Tue Jan 22 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.707 -- leaf function optimization fixed.
47.708 -
47.709 -* Thu Dec 06 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.710 -- add gcc-ice-rml patch.
47.711 -
47.712 -* Tue Nov 13 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.713 -- add configure option.
47.714 -
47.715 -* Thu Nov 01 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.716 -- tablejump fix by gniibe.
47.717 -
47.718 -* Mon Oct 22 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.719 -- updated gcc patch.
47.720 -
47.721 -* Wed Oct 17 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.722 -- updated gcc patch.
47.723 -
47.724 -* Tue Oct 02 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.725 -- gcc/config/sh/sh.c bug fix.
47.726 -
47.727 -* Fri Aug 24 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.728 -- gcc version 3.0.1.
47.729 -
47.730 -* Thu Jun 28 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.731 -- gcc version 3.0.
47.732 -- Add libstdc++ package.
47.733 -
47.734 -* Mon Apr 23 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.735 -- Add cygwin host.
47.736 -
47.737 -* Sat Dec 23 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.738 -- fix file attribute.
47.739 -- add asmspecs patch.
47.740 -
47.741 -* Sat Nov 11 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
47.742 -- initial version.
48.1 --- a/patches/gcc/3.3.6/100-fix-fixincl.patch Wed Oct 21 18:08:31 2009 +0200
48.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
48.3 @@ -1,70 +0,0 @@
48.4 -See http://gcc.gnu.org/PR22541
48.5 -
48.6 -From: Dan Kegel
48.7 -
48.8 -When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
48.9 -(the only two I've tried like this), the configure script happily copies
48.10 -the glibc include files from include to sys-include; here's the line
48.11 -from the log file (with $PREFIX instead of the real prefix):
48.12 -
48.13 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
48.14 -
48.15 -But later, when running fixincludes, it gives the error message
48.16 - The directory that should contain system headers does not exist:
48.17 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
48.18 -
48.19 -Nevertheless, it continues building; the header files it installs in
48.20 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
48.21 -do not include the boilerplate that would cause it to #include_next the
48.22 -glibc headers in the system header directory.
48.23 -Thus the resulting toolchain can't compile the following program:
48.24 -#include <limits.h>
48.25 -int x = PATH_MAX;
48.26 -because its limits.h doesn't include the glibc header.
48.27 -
48.28 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
48.29 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
48.30 - $PREFIX/lib/../i686-unknown-linux-gnu, but
48.31 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
48.32 -it is only created later, during 'make install'. (Which makes this problem
48.33 -confusing, since one only notices the breakage well after 'make install',
48.34 -at which point the path configure complained about does exist, and has the
48.35 -right stuff in it.)
48.36 -
48.37 -A possible fix is to replace the line in gcc/Makefile.in that says
48.38 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
48.39 -with a version that gets rid of extra ..'s, e.g.
48.40 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
48.41 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
48.42 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
48.43 -
48.44 -
48.45 ---- gcc-3.4.3/gcc/Makefile.in.foo 2005-05-20 11:41:39.000000000 -0700
48.46 -+++ gcc-3.4.3/gcc/Makefile.in 2005-05-20 12:08:46.000000000 -0700
48.47 -@@ -350,7 +350,10 @@
48.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
48.49 -
48.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
48.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
48.52 -+# Purge it of unneccessary internal relative paths
48.53 -+# to directories that might not exist yet.
48.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
48.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
48.56 -
48.57 - # Control whether to run fixproto and fixincludes.
48.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
48.59 -@@ -2532,11 +2535,13 @@
48.60 - $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
48.61 -
48.62 - # Build fixed copies of system files.
48.63 -+# Abort if no system headers available, unless building a crosscompiler.
48.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
48.65 - stmp-fixinc: fixinc.sh gsyslimits.h
48.66 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
48.67 - echo The directory that should contain system headers does not exist: >&2 ; \
48.68 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
48.69 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
48.70 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
48.71 - then sleep 1; else exit 1; fi; \
48.72 - fi
48.73 - rm -rf include; mkdir include
49.1 --- a/patches/gcc/3.3.6/110-arm-bigendian.patch Wed Oct 21 18:08:31 2009 +0200
49.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
49.3 @@ -1,62 +0,0 @@
49.4 -diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
49.5 ---- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h 2004-03-30 22:43:45.000000000 +0200
49.6 -+++ gcc-3.3.4/gcc/config/arm/linux-elf.h 2004-08-20 02:13:02.969084177 +0200
49.7 -@@ -30,17 +30,31 @@
49.8 - /* Do not assume anything about header files. */
49.9 - #define NO_IMPLICIT_EXTERN_C
49.10 -
49.11 -+/*
49.12 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
49.13 -+ * (big endian) configurations.
49.14 -+ */
49.15 -+#if TARGET_BIG_ENDIAN_DEFAULT
49.16 -+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
49.17 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
49.18 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
49.19 -+#else
49.20 -+#define TARGET_ENDIAN_DEFAULT 0
49.21 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
49.22 -+#define TARGET_LINKER_EMULATION "armelf_linux"
49.23 -+#endif
49.24 -+
49.25 - /* Default is to use APCS-32 mode. */
49.26 - #undef TARGET_DEFAULT
49.27 --#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
49.28 -+#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
49.29 -
49.30 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
49.31 -
49.32 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
49.33 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
49.34 -
49.35 - #undef MULTILIB_DEFAULTS
49.36 - #define MULTILIB_DEFAULTS \
49.37 -- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
49.38 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
49.39 -
49.40 - #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
49.41 -
49.42 -@@ -88,7 +102,7 @@
49.43 - %{rdynamic:-export-dynamic} \
49.44 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
49.45 - -X \
49.46 -- %{mbig-endian:-EB}" \
49.47 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
49.48 - SUBTARGET_EXTRA_LINK_SPEC
49.49 -
49.50 - #define TARGET_OS_CPP_BUILTINS() \
49.51 -diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
49.52 ---- gcc-3.3.4.orig/gcc/config.gcc 2004-04-29 06:42:47.000000000 +0200
49.53 -+++ gcc-3.3.4/gcc/config.gcc 2004-08-20 02:11:04.326143343 +0200
49.54 -@@ -699,6 +699,11 @@
49.55 - ;;
49.56 - arm*-*-linux*) # ARM GNU/Linux with ELF
49.57 - tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
49.58 -+ case $machine in
49.59 -+ arm*b-*)
49.60 -+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
49.61 -+ ;;
49.62 -+ esac
49.63 - tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
49.64 - extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
49.65 - gnu_ld=yes
50.1 --- a/patches/gcc/3.3.6/120-arm-pr22528.patch Wed Oct 21 18:08:31 2009 +0200
50.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
50.3 @@ -1,71 +0,0 @@
50.4 -From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
50.5 -Richard Earnshaw. Fixes http://gcc.gnu.org/PR22528
50.6 -
50.7 ---- gcc-3.3.4/gcc/config/arm/arm.md.orig 2004-03-30 22:43:44.000000000 +0200
50.8 -+++ gcc-3.3.4/gcc/config/arm/arm.md 2005-08-15 12:21:55.000000000 +0200
50.9 -@@ -4275,7 +4275,7 @@
50.10 - (set (match_dup 2)
50.11 - (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
50.12 - ;; store the high byte
50.13 -- (set (match_dup 4) (subreg:QI (match_dup 2) 0))] ;explicit subreg safe
50.14 -+ (set (match_dup 4) (match_dup 5))]
50.15 - "TARGET_ARM"
50.16 - "
50.17 - {
50.18 -@@ -4291,7 +4291,8 @@
50.19 - operands[1] = adjust_address (operands[1], QImode, 0);
50.20 - operands[3] = gen_lowpart (QImode, operands[0]);
50.21 - operands[0] = gen_lowpart (SImode, operands[0]);
50.22 -- operands[2] = gen_reg_rtx (SImode);
50.23 -+ operands[2] = gen_reg_rtx (SImode);
50.24 -+ operands[5] = gen_lowpart (QImode, operands[2]);
50.25 - }"
50.26 - )
50.27 -
50.28 -@@ -4299,7 +4300,7 @@
50.29 - [(set (match_dup 4) (match_dup 3))
50.30 - (set (match_dup 2)
50.31 - (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
50.32 -- (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 3))]
50.33 -+ (set (match_operand 1 "" "") (match_dup 5))]
50.34 - "TARGET_ARM"
50.35 - "
50.36 - {
50.37 -@@ -4316,13 +4317,14 @@
50.38 - operands[3] = gen_lowpart (QImode, operands[0]);
50.39 - operands[0] = gen_lowpart (SImode, operands[0]);
50.40 - operands[2] = gen_reg_rtx (SImode);
50.41 -+ operands[5] = gen_lowpart (QImode, operands[2]);
50.42 - }"
50.43 - )
50.44 -
50.45 - ;; Subroutine to store a half word integer constant into memory.
50.46 - (define_expand "storeinthi"
50.47 - [(set (match_operand 0 "" "")
50.48 -- (subreg:QI (match_operand 1 "" "") 0))
50.49 -+ (match_operand 1 "" ""))
50.50 - (set (match_dup 3) (match_dup 2))]
50.51 - "TARGET_ARM"
50.52 - "
50.53 -@@ -4363,6 +4365,7 @@
50.54 - operands[3] = adjust_address (op0, QImode, 1);
50.55 - operands[0] = adjust_address (operands[0], QImode, 0);
50.56 - operands[2] = gen_lowpart (QImode, operands[2]);
50.57 -+ operands[1] = gen_lowpart (QImode, operands[1]);
50.58 - }"
50.59 - )
50.60 -
50.61 -@@ -4682,11 +4685,12 @@
50.62 - (set (match_dup 3)
50.63 - (ashiftrt:SI (match_dup 2) (const_int 16)))
50.64 - (set (match_operand:HI 0 "s_register_operand" "")
50.65 -- (subreg:HI (match_dup 3) 0))]
50.66 -+ (match_dup 4))]
50.67 - "TARGET_ARM"
50.68 - "
50.69 - operands[2] = gen_reg_rtx (SImode);
50.70 - operands[3] = gen_reg_rtx (SImode);
50.71 -+ operands[4] = gen_lowpart (HImode, operands[3]);
50.72 - "
50.73 - )
50.74 -
51.1 --- a/patches/gcc/4.0.0/100-fix-fixincl.patch Wed Oct 21 18:08:31 2009 +0200
51.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
51.3 @@ -1,72 +0,0 @@
51.4 -See http://gcc.gnu.org/PR22541
51.5 -
51.6 -From: Dan Kegel
51.7 -
51.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
51.9 -the configure script happily copies the glibc include files from include to sys-include;
51.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
51.11 -
51.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
51.13 -
51.14 -But later, when running fixincludes, it gives the error message
51.15 - The directory that should contain system headers does not exist:
51.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
51.17 -
51.18 -Nevertheless, it continues building; the header files it installs in
51.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
51.20 -do not include the boilerplate that would cause it to #include_next the
51.21 -glibc headers in the system header directory.
51.22 -Thus the resulting toolchain can't compile the following program:
51.23 -#include <limits.h>
51.24 -int x = PATH_MAX;
51.25 -because its limits.h doesn't include the glibc header.
51.26 -
51.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
51.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
51.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
51.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
51.31 -it is only created later, during 'make install'. (Which makes this problem
51.32 -confusing, since one only notices the breakage well after 'make install',
51.33 -at which point the path configure complained about does exist, and has the
51.34 -right stuff in it.)
51.35 -
51.36 -A possible fix is to replace the line in gcc/Makefile.in that says
51.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
51.38 -with a version that gets rid of extra ..'s, e.g.
51.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
51.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
51.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
51.42 -
51.43 -[rediffed against gcc-4.0.0]
51.44 -
51.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
51.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
51.47 -@@ -378,7 +378,10 @@
51.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
51.49 -
51.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
51.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
51.52 -+# Purge it of unneccessary internal relative paths
51.53 -+# to directories that might not exist yet.
51.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
51.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
51.56 -
51.57 - # Control whether to run fixproto and fixincludes.
51.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
51.59 -@@ -2838,13 +2841,15 @@
51.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
51.61 -
51.62 - # Build fixed copies of system files.
51.63 -+# Abort if no system headers available, unless building a crosscompiler.
51.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
51.65 - stmp-fixinc: gsyslimits.h macro_list \
51.66 - ../$(build_subdir)/fixincludes/fixincl \
51.67 - ../$(build_subdir)/fixincludes/fixinc.sh
51.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
51.69 - echo The directory that should contain system headers does not exist: >&2 ; \
51.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
51.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
51.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
51.73 - then sleep 1; else exit 1; fi; \
51.74 - fi
51.75 - rm -rf include; mkdir include
52.1 --- a/patches/gcc/4.0.0/110-arm-bigendian.patch Wed Oct 21 18:08:31 2009 +0200
52.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
52.3 @@ -1,79 +0,0 @@
52.4 -By Lennert Buytenhek <buytenh@wantstofly.org>
52.5 -Adds support for arm*b-linux* big-endian ARM targets
52.6 -
52.7 -Fixes following build error for big-endian ARM targets:
52.8 -
52.9 -armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/bin/../lib/gcc/armeb-unknown-linux-gnu/4.0.0/../../../../armeb-unknown-linux-gnu/bin/ld: unrecognised emulation mode: armelf_linux
52.10 -Supported emulations: armelfb_linux armelfb
52.11 -collect2: ld returned 1 exit status
52.12 -make[2]: *** [crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/csu/crt1.o] Error 1
52.13 -make[2]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4/csu'
52.14 -make[1]: *** [csu/subdir_lib] Error 2
52.15 -make[1]: Leaving directory `crosstool-0.32/build/armeb-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/glibc-2.3.4'
52.16 -make: *** [lib] Error 2
52.17 -
52.18 -
52.19 -See http://gcc.gnu.org/PR16350
52.20 -
52.21 ---- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
52.22 -+++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
52.23 -@@ -31,19 +31,33 @@
52.24 - /* Do not assume anything about header files. */
52.25 - #define NO_IMPLICIT_EXTERN_C
52.26 -
52.27 -+/*
52.28 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
52.29 -+ * arm*b-*-linux* (big endian) configurations.
52.30 -+ */
52.31 -+#if TARGET_BIG_ENDIAN_DEFAULT
52.32 -+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
52.33 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
52.34 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
52.35 -+#else
52.36 -+#define TARGET_ENDIAN_DEFAULT 0
52.37 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
52.38 -+#define TARGET_LINKER_EMULATION "armelf_linux"
52.39 -+#endif
52.40 -+
52.41 - #undef TARGET_DEFAULT_FLOAT_ABI
52.42 - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
52.43 -
52.44 - #undef TARGET_DEFAULT
52.45 --#define TARGET_DEFAULT (0)
52.46 -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
52.47 -
52.48 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
52.49 -
52.50 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
52.51 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
52.52 -
52.53 - #undef MULTILIB_DEFAULTS
52.54 - #define MULTILIB_DEFAULTS \
52.55 -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
52.56 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
52.57 -
52.58 - /* The GNU C++ standard library requires that these macros be defined. */
52.59 - #undef CPLUSPLUS_CPP_SPEC
52.60 -@@ -90,7 +104,7 @@
52.61 - %{rdynamic:-export-dynamic} \
52.62 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
52.63 - -X \
52.64 -- %{mbig-endian:-EB}" \
52.65 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
52.66 - SUBTARGET_EXTRA_LINK_SPEC
52.67 -
52.68 - #define TARGET_OS_CPP_BUILTINS() \
52.69 ---- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
52.70 -+++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
52.71 -@@ -650,6 +650,11 @@
52.72 - ;;
52.73 - arm*-*-linux*) # ARM GNU/Linux with ELF
52.74 - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
52.75 -+ case $target in
52.76 -+ arm*b-*-linux*)
52.77 -+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
52.78 -+ ;;
52.79 -+ esac
52.80 - tmake_file="${tmake_file} arm/t-arm arm/t-linux"
52.81 - extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
52.82 - gnu_ld=yes
53.1 --- a/patches/gcc/4.0.0/120-pr20815-fix.patch Wed Oct 21 18:08:31 2009 +0200
53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
53.3 @@ -1,121 +0,0 @@
53.4 -Date: 18 May 2005 22:47:59 -0000
53.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
53.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
53.7 -To: dank@kegel.com
53.8 -References: <20050407215701.20815.dank@kegel.com>
53.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
53.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
53.11 -
53.12 -
53.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
53.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
53.15 -
53.16 ->
53.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
53.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
53.19 ->
53.20 -> coverage_checksum_string already knows a bit about ignoring random seed
53.21 -> produced mess. It looks like this needs to be extended somehow to
53.22 -> handle namespaces too...
53.23 -
53.24 -This seems to solve the missmatch. Would it be possible to test it on
53.25 -bigger testcase and if it works distile a testcase that don't use
53.26 -file IO so it is more suitable for gcc regtesting?
53.27 -
53.28 -Index: coverage.c
53.29 -===================================================================
53.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
53.31 -retrieving revision 1.6.2.12.2.12
53.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
53.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
53.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
53.35 -*************** coverage_checksum_string (unsigned chksu
53.36 -*** 471,505 ****
53.37 - as the checksums are used only for sanity checking. */
53.38 - for (i = 0; string[i]; i++)
53.39 - {
53.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
53.41 -! for (i = i + 9; string[i]; i++)
53.42 -! if (string[i]=='_')
53.43 -! {
53.44 -! int y;
53.45 -! unsigned seed;
53.46 -! int scan;
53.47 -!
53.48 -! for (y = 1; y < 9; y++)
53.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
53.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
53.51 -! break;
53.52 -! if (y != 9 || string[i + 9] != '_')
53.53 -! continue;
53.54 -! for (y = 10; y < 18; y++)
53.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
53.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
53.57 -! break;
53.58 -! if (y != 18)
53.59 -! continue;
53.60 -! scan = sscanf (string + i + 10, "%X", &seed);
53.61 -! gcc_assert (scan);
53.62 -! if (seed != crc32_string (0, flag_random_seed))
53.63 -! continue;
53.64 -! string = dup = xstrdup (string);
53.65 -! for (y = 10; y < 18; y++)
53.66 -! dup[i + y] = '0';
53.67 -! break;
53.68 -! }
53.69 - break;
53.70 - }
53.71 -
53.72 ---- 471,511 ----
53.73 - as the checksums are used only for sanity checking. */
53.74 - for (i = 0; string[i]; i++)
53.75 - {
53.76 -+ int offset = 0;
53.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
53.78 -+ offset = 11;
53.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
53.80 -! offset = 9;
53.81 -!
53.82 -! /* C++ namespaces do have scheme:
53.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
53.84 -! since filename might contain extra underscores there seems
53.85 -! to be no better chance then walk all possible offsets looking
53.86 -! for magicnuber. */
53.87 -! if (offset)
53.88 -! for (;string[offset]; offset++)
53.89 -! for (i = i + offset; string[i]; i++)
53.90 -! if (string[i]=='_')
53.91 -! {
53.92 -! int y;
53.93 -!
53.94 -! for (y = 1; y < 9; y++)
53.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
53.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
53.97 -! break;
53.98 -! if (y != 9 || string[i + 9] != '_')
53.99 -! continue;
53.100 -! for (y = 10; y < 18; y++)
53.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
53.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
53.103 -! break;
53.104 -! if (y != 18)
53.105 -! continue;
53.106 -! if (!dup)
53.107 -! string = dup = xstrdup (string);
53.108 -! for (y = 10; y < 18; y++)
53.109 -! dup[i + y] = '0';
53.110 -! }
53.111 - break;
53.112 - }
53.113 -
53.114 -
53.115 -
53.116 ---
53.117 -
53.118 -
53.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
53.120 -
53.121 -------- You are receiving this mail because: -------
53.122 -You reported the bug, or are watching the reporter.
53.123 -
53.124 -
54.1 --- a/patches/gcc/4.0.0/130-pr20973-fix.patch Wed Oct 21 18:08:31 2009 +0200
54.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
54.3 @@ -1,80 +0,0 @@
54.4 -http://gcc.gnu.org/PR20973
54.5 -
54.6 -"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically
54.7 -leads to all websites being misrendered. I can't easily reduce the testcase,
54.8 -but have applied the whole preprocessed source of css/cssstyleselector.ii.
54.9 -
54.10 -It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686
54.11 --fno-exceptions. A more detailed analysis will follow, as we've found out
54.12 -some things already."
54.13 -
54.14 ----
54.15 -
54.16 -Subject: Bug 20973
54.17 -
54.18 -CVSROOT: /cvs/gcc
54.19 -Module name: gcc
54.20 -Branch: gcc-4_0-branch
54.21 -Changes by: matz@gcc.gnu.org 2005-04-22 17:30:21
54.22 -
54.23 -Modified files:
54.24 - gcc : ChangeLog reload.c
54.25 -
54.26 -Log message:
54.27 - PR middle-end/20973
54.28 - * reload.c (push_reload, find_dummy_reload): Check for uninitialized
54.29 - pseudos.
54.30 -
54.31 -Patches:
54.32 -http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.177&r2=2.7592.2.178
54.33 -http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/reload.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.268&r2=1.268.2.1
54.34 -
54.35 ----
54.36 -
54.37 -===================================================================
54.38 -RCS file: /cvs/gcc/gcc/gcc/reload.c,v
54.39 -retrieving revision 1.268
54.40 -retrieving revision 1.268.2.1
54.41 -diff -u -r1.268 -r1.268.2.1
54.42 ---- gcc/gcc/reload.c 2005/02/24 22:06:06 1.268
54.43 -+++ gcc/gcc/reload.c 2005/04/22 17:30:15 1.268.2.1
54.44 -@@ -1520,7 +1520,7 @@
54.45 - But if there is no spilling in this block, that is OK.
54.46 - An explicitly used hard reg cannot be a spill reg. */
54.47 -
54.48 -- if (rld[i].reg_rtx == 0 && in != 0)
54.49 -+ if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
54.50 - {
54.51 - rtx note;
54.52 - int regno;
54.53 -@@ -1534,6 +1534,11 @@
54.54 - && REG_P (XEXP (note, 0))
54.55 - && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
54.56 - && reg_mentioned_p (XEXP (note, 0), in)
54.57 -+ /* Check that we don't use a hardreg for an uninitialized
54.58 -+ pseudo. See also find_dummy_reload(). */
54.59 -+ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
54.60 -+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
54.61 -+ ORIGINAL_REGNO (XEXP (note, 0))))
54.62 - && ! refers_to_regno_for_reload_p (regno,
54.63 - (regno
54.64 - + hard_regno_nregs[regno]
54.65 -@@ -1997,7 +2002,17 @@
54.66 - is a subreg, and in that case, out
54.67 - has a real mode. */
54.68 - (GET_MODE (out) != VOIDmode
54.69 -- ? GET_MODE (out) : outmode)))
54.70 -+ ? GET_MODE (out) : outmode))
54.71 -+ /* But only do all this if we can be sure, that this input
54.72 -+ operand doesn't correspond with an uninitialized pseudoreg.
54.73 -+ global can assign some hardreg to it, which is the same as
54.74 -+ a different pseudo also currently live (as it can ignore the
54.75 -+ conflict). So we never must introduce writes to such hardregs,
54.76 -+ as they would clobber the other live pseudo using the same.
54.77 -+ See also PR20973. */
54.78 -+ && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
54.79 -+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
54.80 -+ ORIGINAL_REGNO (in))))
54.81 - {
54.82 - unsigned int regno = REGNO (in) + in_offset;
54.83 - unsigned int nwords = hard_regno_nregs[regno][inmode];
55.1 --- a/patches/gcc/4.0.0/140-pr21173-fix.patch Wed Oct 21 18:08:31 2009 +0200
55.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
55.3 @@ -1,66 +0,0 @@
55.4 -See http://gcc.gnu.org/PR21173
55.5 -This is a fix for a last minute brown-bag bug with gcc-4.0.0
55.6 -
55.7 - ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] -------
55.8 -Subject: Bug 21173
55.9 -
55.10 -CVSROOT: /cvs/gcc
55.11 -Module name: gcc
55.12 -Branch: gcc-4_0-branch
55.13 -Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38
55.14 -
55.15 -Modified files:
55.16 - gcc : ChangeLog tree-ssa-pre.c
55.17 -
55.18 -Log message:
55.19 - 2005-04-25 Daniel Berlin <dberlin@dberlin.org>
55.20 -
55.21 - Fix PR tree-optimization/21173
55.22 -
55.23 - * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
55.24 - on things we pass to force_gimple_operand. Don't try to special
55.25 - case min_invariants.
55.26 -
55.27 -Patches:
55.28 -http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.192&r2=2.7592.2.193
55.29 -http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-pre.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.65.4.2&r2=2.65.4.3
55.30 -
55.31 -===================================================================
55.32 -RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
55.33 -retrieving revision 2.65.4.2
55.34 -retrieving revision 2.65.4.3
55.35 -diff -u -r2.65.4.2 -r2.65.4.3
55.36 ---- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
55.37 -+++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
55.38 -@@ -1330,7 +1330,8 @@
55.39 -
55.40 - folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
55.41 - genop1, genop2));
55.42 -- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
55.43 -+ newexpr = force_gimple_operand (unshare_expr (folded),
55.44 -+ &forced_stmts, false, NULL);
55.45 - if (forced_stmts)
55.46 - {
55.47 - tsi = tsi_start (forced_stmts);
55.48 -@@ -1372,14 +1373,8 @@
55.49 - add_referenced_tmp_var (temp);
55.50 - folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
55.51 - genop1));
55.52 -- /* If the generated operand is already GIMPLE min_invariant
55.53 -- just use it instead of calling force_gimple_operand on it,
55.54 -- since that may make it not invariant by copying it into an
55.55 -- assignment. */
55.56 -- if (!is_gimple_min_invariant (genop1))
55.57 -- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
55.58 -- else
55.59 -- newexpr = genop1;
55.60 -+ newexpr = force_gimple_operand (unshare_expr (folded),
55.61 -+ &forced_stmts, false, NULL);
55.62 - if (forced_stmts)
55.63 - {
55.64 - tsi = tsi_start (forced_stmts);
55.65 -
55.66 - 0K . 1.24 MB/s
55.67 -
55.68 -13:16:54 (1.24 MB/s) - `-' saved [1303]
55.69 -
56.1 --- a/patches/gcc/4.0.0/150-pr21951.patch Wed Oct 21 18:08:31 2009 +0200
56.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
56.3 @@ -1,153 +0,0 @@
56.4 -Workaround for buglet in std::vector etc. when compiling
56.5 -with gcc-4.0.0 -Wall -O -fno-exceptions
56.6 -Fixes:
56.7 -
56.8 -.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
56.9 -_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
56.10 -.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
56.11 -non-void function 'typename _Alloc::pointer std::vector<_Tp,
56.12 -_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
56.13 -_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
56.14 -
56.15 -See http://gcc.gnu.org/PR21951
56.16 -
56.17 ---- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old 2005-06-11 03:58:20.000000000 -0700
56.18 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h 2005-06-11 04:01:21.000000000 -0700
56.19 -@@ -765,13 +765,13 @@
56.20 - {
56.21 - std::__uninitialized_copy_a(__first, __last, __result,
56.22 - this->get_allocator());
56.23 -- return __result;
56.24 - }
56.25 - catch(...)
56.26 - {
56.27 - _M_deallocate(__result, __n);
56.28 - __throw_exception_again;
56.29 - }
56.30 -+ return __result;
56.31 - }
56.32 -
56.33 -
56.34 ---- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old 2005-06-11 03:58:20.000000000 -0700
56.35 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h 2005-06-11 04:05:18.990003248 -0700
56.36 -@@ -84,13 +84,13 @@
56.37 - {
56.38 - for (; __first != __last; ++__first, ++__cur)
56.39 - std::_Construct(&*__cur, *__first);
56.40 -- return __cur;
56.41 - }
56.42 - catch(...)
56.43 - {
56.44 - std::_Destroy(__result, __cur);
56.45 - __throw_exception_again;
56.46 - }
56.47 -+ return __cur;
56.48 - }
56.49 -
56.50 - /**
56.51 -@@ -236,13 +236,13 @@
56.52 - {
56.53 - for (; __first != __last; ++__first, ++__cur)
56.54 - __alloc.construct(&*__cur, *__first);
56.55 -- return __cur;
56.56 - }
56.57 - catch(...)
56.58 - {
56.59 - std::_Destroy(__result, __cur, __alloc);
56.60 - __throw_exception_again;
56.61 - }
56.62 -+ return __cur;
56.63 - }
56.64 -
56.65 - template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
56.66 -@@ -337,11 +337,13 @@
56.67 - {
56.68 - return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
56.69 - }
56.70 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
56.71 - catch(...)
56.72 - {
56.73 - std::_Destroy(__result, __mid, __alloc);
56.74 - __throw_exception_again;
56.75 - }
56.76 -+#endif
56.77 - }
56.78 -
56.79 - // __uninitialized_fill_copy
56.80 -@@ -360,11 +362,13 @@
56.81 - {
56.82 - return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
56.83 - }
56.84 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
56.85 - catch(...)
56.86 - {
56.87 - std::_Destroy(__result, __mid, __alloc);
56.88 - __throw_exception_again;
56.89 - }
56.90 -+#endif
56.91 - }
56.92 -
56.93 - // __uninitialized_copy_fill
56.94 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old 2005-06-11 03:58:20.000000000 -0700
56.95 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope 2005-06-11 04:13:26.628870872 -0700
56.96 -@@ -1645,11 +1645,13 @@
56.97 - _S_cond_store_eos(__buf[__size]);
56.98 - try
56.99 - { return _S_new_RopeLeaf(__buf, __size, __a); }
56.100 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
56.101 - catch(...)
56.102 - {
56.103 - _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
56.104 - __throw_exception_again;
56.105 - }
56.106 -+#endif
56.107 - }
56.108 -
56.109 - // Concatenation of nonempty strings.
56.110 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old 2005-06-11 03:58:20.000000000 -0700
56.111 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory 2005-06-11 04:13:52.897877376 -0700
56.112 -@@ -85,11 +85,13 @@
56.113 - std::_Construct(&*__cur, *__first);
56.114 - return pair<_InputIter, _ForwardIter>(__first, __cur);
56.115 - }
56.116 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
56.117 - catch(...)
56.118 - {
56.119 - std::_Destroy(__result, __cur);
56.120 - __throw_exception_again;
56.121 - }
56.122 -+#endif
56.123 - }
56.124 -
56.125 - template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
56.126 -@@ -144,11 +146,13 @@
56.127 - __alloc.construct(&*__cur, *__first);
56.128 - return pair<_InputIter, _ForwardIter>(__first, __cur);
56.129 - }
56.130 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
56.131 - catch(...)
56.132 - {
56.133 - std::_Destroy(__result, __cur, __alloc);
56.134 - __throw_exception_again;
56.135 - }
56.136 -+#endif
56.137 - }
56.138 -
56.139 - template<typename _InputIter, typename _Size, typename _ForwardIter,
56.140 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old 2005-06-11 03:58:20.000000000 -0700
56.141 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h 2005-06-11 04:14:28.384482592 -0700
56.142 -@@ -607,13 +607,13 @@
56.143 - try
56.144 - {
56.145 - this->get_allocator().construct(&__n->_M_val, __obj);
56.146 -- return __n;
56.147 - }
56.148 - catch(...)
56.149 - {
56.150 - _M_put_node(__n);
56.151 - __throw_exception_again;
56.152 - }
56.153 -+ return __n;
56.154 - }
56.155 -
56.156 - void
57.1 --- a/patches/gcc/4.0.1/100-fix-fixincl.patch Wed Oct 21 18:08:31 2009 +0200
57.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
57.3 @@ -1,72 +0,0 @@
57.4 -See http://gcc.gnu.org/PR22541
57.5 -
57.6 -From: Dan Kegel
57.7 -
57.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
57.9 -the configure script happily copies the glibc include files from include to sys-include;
57.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
57.11 -
57.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
57.13 -
57.14 -But later, when running fixincludes, it gives the error message
57.15 - The directory that should contain system headers does not exist:
57.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
57.17 -
57.18 -Nevertheless, it continues building; the header files it installs in
57.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
57.20 -do not include the boilerplate that would cause it to #include_next the
57.21 -glibc headers in the system header directory.
57.22 -Thus the resulting toolchain can't compile the following program:
57.23 -#include <limits.h>
57.24 -int x = PATH_MAX;
57.25 -because its limits.h doesn't include the glibc header.
57.26 -
57.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
57.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
57.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
57.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
57.31 -it is only created later, during 'make install'. (Which makes this problem
57.32 -confusing, since one only notices the breakage well after 'make install',
57.33 -at which point the path configure complained about does exist, and has the
57.34 -right stuff in it.)
57.35 -
57.36 -A possible fix is to replace the line in gcc/Makefile.in that says
57.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
57.38 -with a version that gets rid of extra ..'s, e.g.
57.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
57.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
57.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
57.42 -
57.43 -[rediffed against gcc-4.0.0]
57.44 -
57.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
57.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
57.47 -@@ -378,7 +378,10 @@
57.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
57.49 -
57.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
57.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
57.52 -+# Purge it of unneccessary internal relative paths
57.53 -+# to directories that might not exist yet.
57.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
57.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
57.56 -
57.57 - # Control whether to run fixproto and fixincludes.
57.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
57.59 -@@ -2838,13 +2841,15 @@
57.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
57.61 -
57.62 - # Build fixed copies of system files.
57.63 -+# Abort if no system headers available, unless building a crosscompiler.
57.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
57.65 - stmp-fixinc: gsyslimits.h macro_list \
57.66 - ../$(build_subdir)/fixincludes/fixincl \
57.67 - ../$(build_subdir)/fixincludes/fixinc.sh
57.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
57.69 - echo The directory that should contain system headers does not exist: >&2 ; \
57.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
57.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
57.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
57.73 - then sleep 1; else exit 1; fi; \
57.74 - fi
57.75 - rm -rf include; mkdir include
58.1 --- a/patches/gcc/4.0.1/110-pr20815-fix.patch Wed Oct 21 18:08:31 2009 +0200
58.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
58.3 @@ -1,121 +0,0 @@
58.4 -Date: 18 May 2005 22:47:59 -0000
58.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
58.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
58.7 -To: dank@kegel.com
58.8 -References: <20050407215701.20815.dank@kegel.com>
58.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
58.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
58.11 -
58.12 -
58.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
58.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
58.15 -
58.16 ->
58.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
58.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
58.19 ->
58.20 -> coverage_checksum_string already knows a bit about ignoring random seed
58.21 -> produced mess. It looks like this needs to be extended somehow to
58.22 -> handle namespaces too...
58.23 -
58.24 -This seems to solve the missmatch. Would it be possible to test it on
58.25 -bigger testcase and if it works distile a testcase that don't use
58.26 -file IO so it is more suitable for gcc regtesting?
58.27 -
58.28 -Index: coverage.c
58.29 -===================================================================
58.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
58.31 -retrieving revision 1.6.2.12.2.12
58.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
58.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
58.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
58.35 -*************** coverage_checksum_string (unsigned chksu
58.36 -*** 471,505 ****
58.37 - as the checksums are used only for sanity checking. */
58.38 - for (i = 0; string[i]; i++)
58.39 - {
58.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
58.41 -! for (i = i + 9; string[i]; i++)
58.42 -! if (string[i]=='_')
58.43 -! {
58.44 -! int y;
58.45 -! unsigned seed;
58.46 -! int scan;
58.47 -!
58.48 -! for (y = 1; y < 9; y++)
58.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
58.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
58.51 -! break;
58.52 -! if (y != 9 || string[i + 9] != '_')
58.53 -! continue;
58.54 -! for (y = 10; y < 18; y++)
58.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
58.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
58.57 -! break;
58.58 -! if (y != 18)
58.59 -! continue;
58.60 -! scan = sscanf (string + i + 10, "%X", &seed);
58.61 -! gcc_assert (scan);
58.62 -! if (seed != crc32_string (0, flag_random_seed))
58.63 -! continue;
58.64 -! string = dup = xstrdup (string);
58.65 -! for (y = 10; y < 18; y++)
58.66 -! dup[i + y] = '0';
58.67 -! break;
58.68 -! }
58.69 - break;
58.70 - }
58.71 -
58.72 ---- 471,511 ----
58.73 - as the checksums are used only for sanity checking. */
58.74 - for (i = 0; string[i]; i++)
58.75 - {
58.76 -+ int offset = 0;
58.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
58.78 -+ offset = 11;
58.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
58.80 -! offset = 9;
58.81 -!
58.82 -! /* C++ namespaces do have scheme:
58.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
58.84 -! since filename might contain extra underscores there seems
58.85 -! to be no better chance then walk all possible offsets looking
58.86 -! for magicnuber. */
58.87 -! if (offset)
58.88 -! for (;string[offset]; offset++)
58.89 -! for (i = i + offset; string[i]; i++)
58.90 -! if (string[i]=='_')
58.91 -! {
58.92 -! int y;
58.93 -!
58.94 -! for (y = 1; y < 9; y++)
58.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
58.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
58.97 -! break;
58.98 -! if (y != 9 || string[i + 9] != '_')
58.99 -! continue;
58.100 -! for (y = 10; y < 18; y++)
58.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
58.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
58.103 -! break;
58.104 -! if (y != 18)
58.105 -! continue;
58.106 -! if (!dup)
58.107 -! string = dup = xstrdup (string);
58.108 -! for (y = 10; y < 18; y++)
58.109 -! dup[i + y] = '0';
58.110 -! }
58.111 - break;
58.112 - }
58.113 -
58.114 -
58.115 -
58.116 ---
58.117 -
58.118 -
58.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
58.120 -
58.121 -------- You are receiving this mail because: -------
58.122 -You reported the bug, or are watching the reporter.
58.123 -
58.124 -
59.1 --- a/patches/gcc/4.0.1/120-pr21951-fix2.patch Wed Oct 21 18:08:31 2009 +0200
59.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59.3 @@ -1,71 +0,0 @@
59.4 -Workaround for buglet in std::vector etc. when compiling
59.5 -with gcc-4.0.1 -Wall -O -fno-exceptions
59.6 -Fixes:
59.7 -
59.8 -.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
59.9 -_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
59.10 -.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
59.11 -non-void function 'typename _Alloc::pointer std::vector<_Tp,
59.12 -_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
59.13 -_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
59.14 -
59.15 -See http://gcc.gnu.org/PR21951
59.16 -
59.17 -To: gcc-patches at gcc dot gnu dot org
59.18 -Subject: [4.0.x] may reach end warning in system headers
59.19 -Message-Id: <20050701183024.E138714C16A9@geoffk5.apple.com>
59.20 -Date: Fri, 1 Jul 2005 11:30:24 -0700 (PDT)
59.21 -From: gkeating at apple dot com (Geoffrey Keating)
59.22 -
59.23 -
59.24 -One of our users was getting
59.25 -
59.26 -/usr/include/gcc/darwin/4.0/c++/bits/stl_uninitialized.h:113: warning:
59.27 -control may reach end of non-void function '_ForwardIterator
59.28 -std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
59.29 -_ForwardIterator, __false_type) [with _InputIterator =
59.30 -__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
59.31 -std::vector<TPoolAllocator::tAllocState,
59.32 -std::allocator<TPoolAllocator::tAllocState> > >, _ForwardIterator =
59.33 -__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
59.34 -std::vector<TPoolAllocator::tAllocState,
59.35 -std::allocator<TPoolAllocator::tAllocState> > >]' being inlined
59.36 -
59.37 -which shouldn't be happening, he has no way to change a standard C++
59.38 -header. The warning is bogus anyway, but it's fixed in 4.1 through
59.39 -the CFG changes, which I don't really want to backport to the 4.0
59.40 -branch, so instead I'll add this patch. Other warnings generated from
59.41 -tree-inline.c check for DECL_SYSTEM_HEADER like this.
59.42 -
59.43 -Bootstrapped & tested on powerpc-darwin8, I'll commit when the branch
59.44 -is unfrozen.
59.45 -
59.46 ---
59.47 -- Geoffrey Keating <geoffk@apple.com>
59.48 -
59.49 -===File ~/patches/gcc-40-4121982.patch======================
59.50 -Index: ChangeLog
59.51 -2005-06-28 Geoffrey Keating <geoffk@apple.com>
59.52 -
59.53 - * tree-inline.c (expand_call_inline): Prevent 'may reach end'
59.54 - warning in system headers.
59.55 -
59.56 -Index: tree-inline.c
59.57 -===================================================================
59.58 -RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
59.59 -retrieving revision 1.170.8.4
59.60 -diff -u -p -u -p -r1.170.8.4 tree-inline.c
59.61 ---- gcc-4.0.1/gcc/tree-inline.c.old 6 Jun 2005 19:20:32 -0000 1.170.8.4
59.62 -+++ gcc-4.0.1/gcc/tree-inline.c 1 Jul 2005 18:27:26 -0000
59.63 -@@ -1693,7 +1693,8 @@ expand_call_inline (tree *tp, int *walk_
59.64 - && !TREE_NO_WARNING (fn)
59.65 - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
59.66 - && return_slot_addr == NULL_TREE
59.67 -- && block_may_fallthru (copy))
59.68 -+ && block_may_fallthru (copy)
59.69 -+ && !DECL_IN_SYSTEM_HEADER (fn))
59.70 - {
59.71 - warning ("control may reach end of non-void function %qD being inlined",
59.72 - fn);
59.73 -============================================================
59.74 -
60.1 --- a/patches/gcc/4.0.2/100-fix-fixincl.patch Wed Oct 21 18:08:31 2009 +0200
60.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
60.3 @@ -1,72 +0,0 @@
60.4 -See http://gcc.gnu.org/PR22541
60.5 -
60.6 -From: Dan Kegel
60.7 -
60.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
60.9 -the configure script happily copies the glibc include files from include to sys-include;
60.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
60.11 -
60.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
60.13 -
60.14 -But later, when running fixincludes, it gives the error message
60.15 - The directory that should contain system headers does not exist:
60.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
60.17 -
60.18 -Nevertheless, it continues building; the header files it installs in
60.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
60.20 -do not include the boilerplate that would cause it to #include_next the
60.21 -glibc headers in the system header directory.
60.22 -Thus the resulting toolchain can't compile the following program:
60.23 -#include <limits.h>
60.24 -int x = PATH_MAX;
60.25 -because its limits.h doesn't include the glibc header.
60.26 -
60.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
60.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
60.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
60.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
60.31 -it is only created later, during 'make install'. (Which makes this problem
60.32 -confusing, since one only notices the breakage well after 'make install',
60.33 -at which point the path configure complained about does exist, and has the
60.34 -right stuff in it.)
60.35 -
60.36 -A possible fix is to replace the line in gcc/Makefile.in that says
60.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
60.38 -with a version that gets rid of extra ..'s, e.g.
60.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
60.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
60.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
60.42 -
60.43 -[rediffed against gcc-4.0.0]
60.44 -
60.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
60.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
60.47 -@@ -378,7 +378,10 @@
60.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
60.49 -
60.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
60.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
60.52 -+# Purge it of unneccessary internal relative paths
60.53 -+# to directories that might not exist yet.
60.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
60.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
60.56 -
60.57 - # Control whether to run fixproto and fixincludes.
60.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
60.59 -@@ -2838,13 +2841,15 @@
60.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
60.61 -
60.62 - # Build fixed copies of system files.
60.63 -+# Abort if no system headers available, unless building a crosscompiler.
60.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
60.65 - stmp-fixinc: gsyslimits.h macro_list \
60.66 - ../$(build_subdir)/fixincludes/fixincl \
60.67 - ../$(build_subdir)/fixincludes/fixinc.sh
60.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
60.69 - echo The directory that should contain system headers does not exist: >&2 ; \
60.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
60.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
60.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
60.73 - then sleep 1; else exit 1; fi; \
60.74 - fi
60.75 - rm -rf include; mkdir include
61.1 --- a/patches/gcc/4.0.2/110-pr20815-fix.patch Wed Oct 21 18:08:31 2009 +0200
61.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
61.3 @@ -1,121 +0,0 @@
61.4 -Date: 18 May 2005 22:47:59 -0000
61.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
61.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
61.7 -To: dank@kegel.com
61.8 -References: <20050407215701.20815.dank@kegel.com>
61.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
61.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
61.11 -
61.12 -
61.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
61.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
61.15 -
61.16 ->
61.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
61.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
61.19 ->
61.20 -> coverage_checksum_string already knows a bit about ignoring random seed
61.21 -> produced mess. It looks like this needs to be extended somehow to
61.22 -> handle namespaces too...
61.23 -
61.24 -This seems to solve the missmatch. Would it be possible to test it on
61.25 -bigger testcase and if it works distile a testcase that don't use
61.26 -file IO so it is more suitable for gcc regtesting?
61.27 -
61.28 -Index: coverage.c
61.29 -===================================================================
61.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
61.31 -retrieving revision 1.6.2.12.2.12
61.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
61.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
61.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
61.35 -*************** coverage_checksum_string (unsigned chksu
61.36 -*** 471,505 ****
61.37 - as the checksums are used only for sanity checking. */
61.38 - for (i = 0; string[i]; i++)
61.39 - {
61.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
61.41 -! for (i = i + 9; string[i]; i++)
61.42 -! if (string[i]=='_')
61.43 -! {
61.44 -! int y;
61.45 -! unsigned seed;
61.46 -! int scan;
61.47 -!
61.48 -! for (y = 1; y < 9; y++)
61.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
61.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
61.51 -! break;
61.52 -! if (y != 9 || string[i + 9] != '_')
61.53 -! continue;
61.54 -! for (y = 10; y < 18; y++)
61.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
61.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
61.57 -! break;
61.58 -! if (y != 18)
61.59 -! continue;
61.60 -! scan = sscanf (string + i + 10, "%X", &seed);
61.61 -! gcc_assert (scan);
61.62 -! if (seed != crc32_string (0, flag_random_seed))
61.63 -! continue;
61.64 -! string = dup = xstrdup (string);
61.65 -! for (y = 10; y < 18; y++)
61.66 -! dup[i + y] = '0';
61.67 -! break;
61.68 -! }
61.69 - break;
61.70 - }
61.71 -
61.72 ---- 471,511 ----
61.73 - as the checksums are used only for sanity checking. */
61.74 - for (i = 0; string[i]; i++)
61.75 - {
61.76 -+ int offset = 0;
61.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
61.78 -+ offset = 11;
61.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
61.80 -! offset = 9;
61.81 -!
61.82 -! /* C++ namespaces do have scheme:
61.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
61.84 -! since filename might contain extra underscores there seems
61.85 -! to be no better chance then walk all possible offsets looking
61.86 -! for magicnuber. */
61.87 -! if (offset)
61.88 -! for (;string[offset]; offset++)
61.89 -! for (i = i + offset; string[i]; i++)
61.90 -! if (string[i]=='_')
61.91 -! {
61.92 -! int y;
61.93 -!
61.94 -! for (y = 1; y < 9; y++)
61.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
61.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
61.97 -! break;
61.98 -! if (y != 9 || string[i + 9] != '_')
61.99 -! continue;
61.100 -! for (y = 10; y < 18; y++)
61.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
61.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
61.103 -! break;
61.104 -! if (y != 18)
61.105 -! continue;
61.106 -! if (!dup)
61.107 -! string = dup = xstrdup (string);
61.108 -! for (y = 10; y < 18; y++)
61.109 -! dup[i + y] = '0';
61.110 -! }
61.111 - break;
61.112 - }
61.113 -
61.114 -
61.115 -
61.116 ---
61.117 -
61.118 -
61.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
61.120 -
61.121 -------- You are receiving this mail because: -------
61.122 -You reported the bug, or are watching the reporter.
61.123 -
61.124 -
62.1 --- a/patches/gcc/4.0.2/120-pr21623-workaround.patch Wed Oct 21 18:08:31 2009 +0200
62.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
62.3 @@ -1,53 +0,0 @@
62.4 -Message-ID: <434576E1.6020305@sscd.de>
62.5 -Date: Thu, 06 Oct 2005 21:11:29 +0200
62.6 -From: Alexander Sieb <sieb@sscd.de>
62.7 -To: crossgcc@sourceware.org
62.8 -Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
62.9 -
62.10 -Hi,
62.11 -
62.12 -attached you find the files I needed to add to crosstool-0.38
62.13 -in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
62.14 -
62.15 -Files attached:
62.16 -
62.17 -sh4-gcc4.dat:
62.18 - * gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
62.19 - kernel won't build as it uses the -m4-nofpu option.
62.20 -
62.21 -gcc-pr21623.patch:
62.22 - * Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
62.23 -
62.24 -glibc-2.3.5-sh-memset.patch:
62.25 - * A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
62.26 - See content for rationale.
62.27 -
62.28 --- snip --
62.29 -
62.30 --- Here's patch 1 of 2, plus URLs showing where it is in CVS --
62.31 -
62.32 -[http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00081.html]
62.33 -
62.34 -2005-09-30 Kaz Kojima <kkojima@gcc.gnu.org>
62.35 -
62.36 - * config/sh/sh.c (sh_register_move_cost): Add case for moving
62.37 - from T_REGS to FP register class.
62.38 -
62.39 -[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.c.diff?cvsroot=gcc&r1=1.347&r2=1.348]
62.40 -
62.41 -RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
62.42 -retrieving revision 1.347
62.43 -retrieving revision 1.348
62.44 -diff -u -r1.347 -r1.348
62.45 ---- gcc/gcc/config/sh/sh.c 2005/09/05 12:45:22 1.347
62.46 -+++ gcc/gcc/config/sh/sh.c 2005/10/03 22:07:08 1.348
62.47 -@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
62.48 - && REGCLASS_HAS_FP_REG (dstclass))
62.49 - return 4;
62.50 -
62.51 -+ if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
62.52 -+ return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
62.53 -+
62.54 - if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
62.55 - || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
62.56 - return 9;
63.1 --- a/patches/gcc/4.0.3/100-uclibc-conf.patch Wed Oct 21 18:08:31 2009 +0200
63.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
63.3 @@ -1,553 +0,0 @@
63.4 ---- gcc-4.0.2/gcc/config/t-linux-uclibc
63.5 -+++ gcc-4.0.2/gcc/config/t-linux-uclibc
63.6 -@@ -0,0 +1,5 @@
63.7 -+# Remove glibc specific files added in t-linux
63.8 -+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
63.9 -+
63.10 -+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
63.11 -+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
63.12 ---- gcc-4.0.2/gcc/config.gcc
63.13 -+++ gcc-4.0.2/gcc/config.gcc
63.14 -@@ -1778,7 +1778,7 @@
63.15 - ;;
63.16 - sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
63.17 - sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
63.18 -- sh-*-linux* | sh[346lbe]*-*-linux* | \
63.19 -+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
63.20 - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
63.21 - sh64-*-netbsd* | sh64l*-*-netbsd*)
63.22 - tmake_file="${tmake_file} sh/t-sh sh/t-elf"
63.23 -@@ -2234,10 +2234,16 @@
63.24 - *)
63.25 - echo "*** Configuration ${target} not supported" 1>&2
63.26 - exit 1
63.27 - ;;
63.28 - esac
63.29 -+
63.30 -+# Rather than hook into each target, just do it after all the linux
63.31 -+# targets have been processed
63.32 -+case ${target} in
63.33 -+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
63.34 -+esac
63.35 -
63.36 - case ${target} in
63.37 - i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
63.38 - tmake_file="${tmake_file} i386/t-gmm_malloc"
63.39 - ;;
63.40 ---- gcc-4.0.2/gcc/config/alpha/linux-elf.h
63.41 -+++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
63.42 -@@ -27,7 +27,11 @@
63.43 - #define SUBTARGET_EXTRA_SPECS \
63.44 - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
63.45 -
63.46 -+#ifdef USE_UCLIBC
63.47 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.48 -+#else
63.49 - #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.50 -+#endif
63.51 -
63.52 - #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
63.53 - %{O*:-O3} %{!O*:-O1} \
63.54 ---- gcc-4.0.2/gcc/config/arm/linux-elf.h
63.55 -+++ gcc-4.0.2/gcc/config/arm/linux-elf.h
63.56 -@@ -81,14 +81,19 @@
63.57 - #define ENDFILE_SPEC \
63.58 - "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
63.59 -
63.60 -+#ifdef USE_UCLIBC
63.61 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.62 -+#else
63.63 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.64 -+#endif
63.65 - #undef LINK_SPEC
63.66 - #define LINK_SPEC "%{h*} %{version:-v} \
63.67 - %{b} %{Wl,*:%*} \
63.68 - %{static:-Bstatic} \
63.69 - %{shared:-shared} \
63.70 - %{symbolic:-Bsymbolic} \
63.71 - %{rdynamic:-export-dynamic} \
63.72 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
63.73 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
63.74 - -X \
63.75 - %{mbig-endian:-EB}" \
63.76 - SUBTARGET_EXTRA_LINK_SPEC
63.77 ---- gcc-4.0.2/gcc/config/cris/linux.h
63.78 -+++ gcc-4.0.2/gcc/config/cris/linux.h
63.79 -@@ -79,6 +79,25 @@
63.80 - #undef CRIS_DEFAULT_CPU_VERSION
63.81 - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
63.82 -
63.83 -+#ifdef USE_UCLIBC
63.84 -+
63.85 -+#undef CRIS_SUBTARGET_VERSION
63.86 -+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
63.87 -+
63.88 -+#undef CRIS_LINK_SUBTARGET_SPEC
63.89 -+#define CRIS_LINK_SUBTARGET_SPEC \
63.90 -+ "-mcrislinux\
63.91 -+ -rpath-link include/asm/../..%s\
63.92 -+ %{shared} %{static}\
63.93 -+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
63.94 -+ %{!shared: \
63.95 -+ %{!static: \
63.96 -+ %{rdynamic:-export-dynamic} \
63.97 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
63.98 -+ %{!r:%{O2|O3: --gc-sections}}"
63.99 -+
63.100 -+#else /* USE_UCLIBC */
63.101 -+
63.102 - #undef CRIS_SUBTARGET_VERSION
63.103 - #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
63.104 -
63.105 -@@ -93,6 +112,8 @@
63.106 - %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
63.107 - %{!r:%{O2|O3: --gc-sections}}"
63.108 -
63.109 -+#endif /* USE_UCLIBC */
63.110 -+
63.111 -
63.112 - /* Node: Run-time Target */
63.113 -
63.114 ---- gcc-4.0.2/gcc/config/i386/linux.h
63.115 -+++ gcc-4.0.2/gcc/config/i386/linux.h
63.116 -@@ -107,6 +107,11 @@
63.117 - #define LINK_EMULATION "elf_i386"
63.118 - #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.119 -
63.120 -+#ifdef USE_UCLIBC
63.121 -+#undef DYNAMIC_LINKER
63.122 -+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.123 -+#endif
63.124 -+
63.125 - #undef SUBTARGET_EXTRA_SPECS
63.126 - #define SUBTARGET_EXTRA_SPECS \
63.127 - { "link_emulation", LINK_EMULATION },\
63.128 ---- gcc-4.0.2/gcc/config/i386/linux64.h
63.129 -+++ gcc-4.0.2/gcc/config/i386/linux64.h
63.130 -@@ -54,14 +54,21 @@
63.131 - When the -shared link option is used a final link is not being
63.132 - done. */
63.133 -
63.134 -+#ifdef USE_UCLIBC
63.135 -+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.136 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
63.137 -+#else
63.138 -+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.139 -+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
63.140 -+#endif
63.141 - #undef LINK_SPEC
63.142 - #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
63.143 - %{shared:-shared} \
63.144 - %{!shared: \
63.145 - %{!static: \
63.146 - %{rdynamic:-export-dynamic} \
63.147 -- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
63.148 -- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
63.149 -+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
63.150 -+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
63.151 - %{static:-static}}"
63.152 -
63.153 - #define MULTILIB_DEFAULTS { "m64" }
63.154 ---- gcc-4.0.2/gcc/config/ia64/linux.h
63.155 -+++ gcc-4.0.2/gcc/config/ia64/linux.h
63.156 -@@ -37,13 +37,18 @@
63.157 - /* Define this for shared library support because it isn't in the main
63.158 - linux.h file. */
63.159 -
63.160 -+#ifdef USE_UCLIBC
63.161 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.162 -+#else
63.163 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
63.164 -+#endif
63.165 - #undef LINK_SPEC
63.166 - #define LINK_SPEC "\
63.167 - %{shared:-shared} \
63.168 - %{!shared: \
63.169 - %{!static: \
63.170 - %{rdynamic:-export-dynamic} \
63.171 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
63.172 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.173 - %{static:-static}}"
63.174 -
63.175 -
63.176 ---- gcc-4.0.2/gcc/config/m68k/linux.h
63.177 -+++ gcc-4.0.2/gcc/config/m68k/linux.h
63.178 -@@ -127,12 +127,17 @@
63.179 -
63.180 - /* If ELF is the default format, we should not use /lib/elf. */
63.181 -
63.182 -+#ifdef USE_UCLIBC
63.183 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.184 -+#else
63.185 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
63.186 -+#endif
63.187 - #undef LINK_SPEC
63.188 - #define LINK_SPEC "-m m68kelf %{shared} \
63.189 - %{!shared: \
63.190 - %{!static: \
63.191 - %{rdynamic:-export-dynamic} \
63.192 -- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
63.193 -+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.194 - %{static}}"
63.195 -
63.196 - /* For compatibility with linux/a.out */
63.197 ---- gcc-4.0.2/gcc/config/mips/linux.h
63.198 -+++ gcc-4.0.2/gcc/config/mips/linux.h
63.199 -@@ -108,14 +108,19 @@
63.200 -
63.201 - /* Borrowed from sparc/linux.h */
63.202 - #undef LINK_SPEC
63.203 -+#ifdef USE_UCLIBC
63.204 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.205 -+#else
63.206 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
63.207 -+#endif
63.208 - #define LINK_SPEC \
63.209 - "%(endian_spec) \
63.210 - %{shared:-shared} \
63.211 - %{!shared: \
63.212 - %{!ibcs: \
63.213 - %{!static: \
63.214 - %{rdynamic:-export-dynamic} \
63.215 -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
63.216 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.217 - %{static:-static}}}"
63.218 -
63.219 - #undef SUBTARGET_ASM_SPEC
63.220 ---- gcc-4.0.2/gcc/config/pa/pa-linux.h
63.221 -+++ gcc-4.0.2/gcc/config/pa/pa-linux.h
63.222 -@@ -82,13 +82,18 @@
63.223 - /* Define this for shared library support because it isn't in the main
63.224 - linux.h file. */
63.225 -
63.226 -+#ifdef USE_UCLIBC
63.227 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.228 -+#else
63.229 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
63.230 -+#endif
63.231 - #undef LINK_SPEC
63.232 - #define LINK_SPEC "\
63.233 - %{shared:-shared} \
63.234 - %{!shared: \
63.235 - %{!static: \
63.236 - %{rdynamic:-export-dynamic} \
63.237 -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
63.238 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.239 - %{static:-static}}"
63.240 -
63.241 - /* glibc's profiling functions don't need gcc to allocate counters. */
63.242 ---- gcc-4.0.2/gcc/config/rs6000/linux.h
63.243 -+++ gcc-4.0.2/gcc/config/rs6000/linux.h
63.244 -@@ -69,7 +69,11 @@
63.245 - #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
63.246 -
63.247 - #undef LINK_OS_DEFAULT_SPEC
63.248 -+#ifdef USE_UCLIBC
63.249 -+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
63.250 -+#else
63.251 - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
63.252 -+#endif
63.253 -
63.254 - #define LINK_GCC_C_SEQUENCE_SPEC \
63.255 - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
63.256 ---- gcc-4.0.2/gcc/config/rs6000/sysv4.h
63.257 -+++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
63.258 -@@ -949,6 +949,7 @@
63.259 - mcall-linux : %(link_os_linux) ; \
63.260 - mcall-gnu : %(link_os_gnu) ; \
63.261 - mcall-netbsd : %(link_os_netbsd) ; \
63.262 -+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
63.263 - mcall-openbsd: %(link_os_openbsd) ; \
63.264 - : %(link_os_default) }"
63.265 -
63.266 -@@ -1127,6 +1128,10 @@
63.267 - %{rdynamic:-export-dynamic} \
63.268 - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
63.269 -
63.270 -+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
63.271 -+ %{rdynamic:-export-dynamic} \
63.272 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
63.273 -+
63.274 - #if defined(HAVE_LD_EH_FRAME_HDR)
63.275 - # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
63.276 - #endif
63.277 -@@ -1293,6 +1298,7 @@
63.278 - { "link_os_sim", LINK_OS_SIM_SPEC }, \
63.279 - { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
63.280 - { "link_os_linux", LINK_OS_LINUX_SPEC }, \
63.281 -+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
63.282 - { "link_os_gnu", LINK_OS_GNU_SPEC }, \
63.283 - { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
63.284 - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
63.285 ---- gcc-4.0.2/gcc/config/s390/linux.h
63.286 -+++ gcc-4.0.2/gcc/config/s390/linux.h
63.287 -@@ -77,6 +77,13 @@
63.288 - #define MULTILIB_DEFAULTS { "m31" }
63.289 - #endif
63.290 -
63.291 -+#ifdef USE_UCLIBC
63.292 -+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.293 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
63.294 -+#else
63.295 -+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
63.296 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
63.297 -+#endif
63.298 - #undef LINK_SPEC
63.299 - #define LINK_SPEC \
63.300 - "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
63.301 -@@ -86,8 +93,8 @@
63.302 - %{!static: \
63.303 - %{rdynamic:-export-dynamic} \
63.304 - %{!dynamic-linker: \
63.305 -- %{m31:-dynamic-linker /lib/ld.so.1} \
63.306 -- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
63.307 -+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
63.308 -+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
63.309 -
63.310 -
63.311 - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
63.312 ---- gcc-4.0.2/gcc/config/sh/linux.h
63.313 -+++ gcc-4.0.2/gcc/config/sh/linux.h
63.314 -@@ -67,11 +67,16 @@
63.315 - #undef SUBTARGET_LINK_EMUL_SUFFIX
63.316 - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
63.317 - #undef SUBTARGET_LINK_SPEC
63.318 -+#ifdef USE_UCLIBC
63.319 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.320 -+#else
63.321 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.322 -+#endif
63.323 - #define SUBTARGET_LINK_SPEC \
63.324 - "%{shared:-shared} \
63.325 - %{!static: \
63.326 - %{rdynamic:-export-dynamic} \
63.327 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
63.328 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.329 - %{static:-static}"
63.330 -
63.331 - #undef LIB_SPEC
63.332 ---- gcc-4.0.2/gcc/config/sparc/linux.h
63.333 -+++ gcc-4.0.2/gcc/config/sparc/linux.h
63.334 -@@ -130,14 +130,19 @@
63.335 -
63.336 - /* If ELF is the default format, we should not use /lib/elf. */
63.337 -
63.338 -+#ifdef USE_UCLIBC
63.339 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.340 -+#else
63.341 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.342 -+#endif
63.343 - #undef LINK_SPEC
63.344 - #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
63.345 - %{!mno-relax:%{!r:-relax}} \
63.346 - %{!shared: \
63.347 - %{!ibcs: \
63.348 - %{!static: \
63.349 - %{rdynamic:-export-dynamic} \
63.350 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
63.351 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.352 - %{static:-static}}}"
63.353 -
63.354 - /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
63.355 ---- gcc-4.0.2/gcc/config/sparc/linux64.h
63.356 -+++ gcc-4.0.2/gcc/config/sparc/linux64.h
63.357 -@@ -167,12 +166,17 @@
63.358 - { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
63.359 - { "link_arch", LINK_ARCH_SPEC },
63.360 -
63.361 -+#ifdef USE_UCLIBC
63.362 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
63.363 -+#else
63.364 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
63.365 -+#endif
63.366 - #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
63.367 - %{!shared: \
63.368 - %{!ibcs: \
63.369 - %{!static: \
63.370 - %{rdynamic:-export-dynamic} \
63.371 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
63.372 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
63.373 - %{static:-static}}} \
63.374 - "
63.375 -
63.376 ---- gcc-4.0.2/libtool.m4
63.377 -+++ gcc-4.0.2/libtool.m4
63.378 -@@ -682,6 +682,11 @@
63.379 - lt_cv_deplibs_check_method=pass_all
63.380 - ;;
63.381 -
63.382 -+linux-uclibc*)
63.383 -+ lt_cv_deplibs_check_method=pass_all
63.384 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.385 -+ ;;
63.386 -+
63.387 - netbsd* | knetbsd*-gnu)
63.388 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.389 - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
63.390 ---- gcc-4.0.2/ltconfig
63.391 -+++ gcc-4.0.2/ltconfig
63.392 -@@ -603,6 +603,7 @@
63.393 -
63.394 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
63.395 - case $host_os in
63.396 -+linux-uclibc*) ;;
63.397 - linux-gnu*) ;;
63.398 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
63.399 - esac
63.400 -@@ -1274,6 +1275,23 @@
63.401 - dynamic_linker='GNU/Linux ld.so'
63.402 - ;;
63.403 -
63.404 -+linux-uclibc*)
63.405 -+ version_type=linux
63.406 -+ need_lib_prefix=no
63.407 -+ need_version=no
63.408 -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
63.409 -+ soname_spec='${libname}${release}.so$major'
63.410 -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
63.411 -+ shlibpath_var=LD_LIBRARY_PATH
63.412 -+ shlibpath_overrides_runpath=no
63.413 -+ # This implies no fast_install, which is unacceptable.
63.414 -+ # Some rework will be needed to allow for fast_install
63.415 -+ # before this can be enabled.
63.416 -+ hardcode_into_libs=yes
63.417 -+ # Assume using the uClibc dynamic linker.
63.418 -+ dynamic_linker="uClibc ld.so"
63.419 -+ ;;
63.420 -+
63.421 - netbsd*)
63.422 - need_lib_prefix=no
63.423 - need_version=no
63.424 ---- gcc-4.0.2/libffi/configure
63.425 -+++ gcc-4.0.2/libffi/configure
63.426 -@@ -3457,6 +3457,11 @@
63.427 - lt_cv_deplibs_check_method=pass_all
63.428 - ;;
63.429 -
63.430 -+linux-uclibc*)
63.431 -+ lt_cv_deplibs_check_method=pass_all
63.432 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.433 -+ ;;
63.434 -+
63.435 - netbsd* | knetbsd*-gnu)
63.436 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.437 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.438 ---- gcc-4.0.2/libgfortran/configure
63.439 -+++ gcc-4.0.2/libgfortran/configure
63.440 -@@ -3681,6 +3681,11 @@
63.441 - lt_cv_deplibs_check_method=pass_all
63.442 - ;;
63.443 -
63.444 -+linux-uclibc*)
63.445 -+ lt_cv_deplibs_check_method=pass_all
63.446 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.447 -+ ;;
63.448 -+
63.449 - netbsd* | knetbsd*-gnu)
63.450 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.451 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.452 ---- gcc-4.0.2/libjava/configure
63.453 -+++ gcc-4.0.2/libjava/configure
63.454 -@@ -4351,6 +4351,11 @@
63.455 - lt_cv_deplibs_check_method=pass_all
63.456 - ;;
63.457 -
63.458 -+linux-uclibc*)
63.459 -+ lt_cv_deplibs_check_method=pass_all
63.460 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.461 -+ ;;
63.462 -+
63.463 - netbsd* | knetbsd*-gnu)
63.464 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.465 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.466 ---- gcc-4.0.2/libmudflap/configure
63.467 -+++ gcc-4.0.2/libmudflap/configure
63.468 -@@ -5380,6 +5380,11 @@
63.469 - lt_cv_deplibs_check_method=pass_all
63.470 - ;;
63.471 -
63.472 -+linux-uclibc*)
63.473 -+ lt_cv_deplibs_check_method=pass_all
63.474 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.475 -+ ;;
63.476 -+
63.477 - netbsd* | knetbsd*-gnu)
63.478 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.479 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.480 ---- gcc-4.0.2/libobjc/configure
63.481 -+++ gcc-4.0.2/libobjc/configure
63.482 -@@ -3283,6 +3283,11 @@
63.483 - lt_cv_deplibs_check_method=pass_all
63.484 - ;;
63.485 -
63.486 -+linux-uclibc*)
63.487 -+ lt_cv_deplibs_check_method=pass_all
63.488 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.489 -+ ;;
63.490 -+
63.491 - netbsd* | knetbsd*-gnu)
63.492 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.493 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.494 ---- gcc-4.0.2/boehm-gc/configure
63.495 -+++ gcc-4.0.2/boehm-gc/configure
63.496 -@@ -4320,6 +4320,11 @@
63.497 - lt_cv_deplibs_check_method=pass_all
63.498 - ;;
63.499 -
63.500 -+linux-uclibc*)
63.501 -+ lt_cv_deplibs_check_method=pass_all
63.502 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.503 -+ ;;
63.504 -+
63.505 - netbsd* | knetbsd*-gnu)
63.506 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.507 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
63.508 ---- gcc-4.0.2/configure
63.509 -+++ gcc-4.0.2/configure
63.510 -@@ -1141,7 +1141,7 @@
63.511 - ;;
63.512 - "")
63.513 - case "${target}" in
63.514 -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
63.515 -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
63.516 - # Enable libmudflap by default in GNU and friends.
63.517 - ;;
63.518 - *-*-freebsd*)
63.519 ---- gcc-4.0.2/configure.in
63.520 -+++ gcc-4.0.2/configure.in
63.521 -@@ -350,7 +350,7 @@
63.522 - ;;
63.523 - "")
63.524 - case "${target}" in
63.525 -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
63.526 -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
63.527 - # Enable libmudflap by default in GNU and friends.
63.528 - ;;
63.529 - *-*-freebsd*)
63.530 ---- gcc-4.0.2/contrib/regression/objs-gcc.sh
63.531 -+++ gcc-4.0.2/contrib/regression/objs-gcc.sh
63.532 -@@ -105,6 +105,10 @@
63.533 - then
63.534 - make all-gdb all-dejagnu all-ld || exit 1
63.535 - make install-gdb install-dejagnu install-ld || exit 1
63.536 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
63.537 -+ then
63.538 -+ make all-gdb all-dejagnu all-ld || exit 1
63.539 -+ make install-gdb install-dejagnu install-ld || exit 1
63.540 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
63.541 - make bootstrap || exit 1
63.542 - make install || exit 1
63.543 ---- gcc-4.0.2/zlib/configure
63.544 -+++ gcc-4.0.2/zlib/configure
63.545 -@@ -3426,6 +3426,11 @@
63.546 - lt_cv_deplibs_check_method=pass_all
63.547 - ;;
63.548 -
63.549 -+linux-uclibc*)
63.550 -+ lt_cv_deplibs_check_method=pass_all
63.551 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
63.552 -+ ;;
63.553 -+
63.554 - netbsd* | knetbsd*-gnu)
63.555 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
63.556 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
64.1 --- a/patches/gcc/4.0.3/110-uclibc-locale.patch Wed Oct 21 18:08:31 2009 +0200
64.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
64.3 @@ -1,3237 +0,0 @@
64.4 -diff -urN gcc-4.0.0-100/libstdc++-v3/acinclude.m4 gcc-4.0.0/libstdc++-v3/acinclude.m4
64.5 ---- gcc-4.0.0-100/libstdc++-v3/acinclude.m4 2005-04-30 13:06:53.000000000 -0500
64.6 -+++ gcc-4.0.0/libstdc++-v3/acinclude.m4 2005-04-28 20:19:01.000000000 -0500
64.7 -@@ -1104,7 +1104,7 @@
64.8 - AC_MSG_CHECKING([for C locale to use])
64.9 - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
64.10 - [use MODEL for target locale package],
64.11 -- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
64.12 -+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
64.13 -
64.14 - # If they didn't use this option switch, or if they specified --enable
64.15 - # with no specific model, we'll have to look for one. If they
64.16 -@@ -1120,6 +1120,9 @@
64.17 - # Default to "generic".
64.18 - if test $enable_clocale_flag = auto; then
64.19 - case ${target_os} in
64.20 -+ *-uclibc*)
64.21 -+ enable_clocale_flag=uclibc
64.22 -+ ;;
64.23 - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
64.24 - AC_EGREP_CPP([_GLIBCXX_ok], [
64.25 - #include <features.h>
64.26 -@@ -1263,6 +1266,40 @@
64.27 - CTIME_CC=config/locale/generic/time_members.cc
64.28 - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
64.29 - ;;
64.30 -+ uclibc)
64.31 -+ AC_MSG_RESULT(uclibc)
64.32 -+
64.33 -+ # Declare intention to use gettext, and add support for specific
64.34 -+ # languages.
64.35 -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
64.36 -+ ALL_LINGUAS="de fr"
64.37 -+
64.38 -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
64.39 -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
64.40 -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
64.41 -+ USE_NLS=yes
64.42 -+ fi
64.43 -+ # Export the build objects.
64.44 -+ for ling in $ALL_LINGUAS; do \
64.45 -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
64.46 -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
64.47 -+ done
64.48 -+ AC_SUBST(glibcxx_MOFILES)
64.49 -+ AC_SUBST(glibcxx_POFILES)
64.50 -+
64.51 -+ CLOCALE_H=config/locale/uclibc/c_locale.h
64.52 -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
64.53 -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
64.54 -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
64.55 -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
64.56 -+ CMESSAGES_H=config/locale/uclibc/messages_members.h
64.57 -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
64.58 -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
64.59 -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
64.60 -+ CTIME_H=config/locale/uclibc/time_members.h
64.61 -+ CTIME_CC=config/locale/uclibc/time_members.cc
64.62 -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
64.63 -+ ;;
64.64 - esac
64.65 -
64.66 - # This is where the testsuite looks for locale catalogs, using the
64.67 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
64.68 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 1969-12-31 18:00:00.000000000 -0600
64.69 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2005-04-28 01:13:15.000000000 -0500
64.70 -@@ -0,0 +1,59 @@
64.71 -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
64.72 -+
64.73 -+// Copyright (C) 2002, 2004 Free Software Foundation, Inc.
64.74 -+//
64.75 -+// This file is part of the GNU ISO C++ Library. This library is free
64.76 -+// software; you can redistribute it and/or modify it under the
64.77 -+// terms of the GNU General Public License as published by the
64.78 -+// Free Software Foundation; either version 2, or (at your option)
64.79 -+// any later version.
64.80 -+
64.81 -+// This library is distributed in the hope that it will be useful,
64.82 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.83 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.84 -+// GNU General Public License for more details.
64.85 -+
64.86 -+// You should have received a copy of the GNU General Public License along
64.87 -+// with this library; see the file COPYING. If not, write to the Free
64.88 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.89 -+// USA.
64.90 -+
64.91 -+// As a special exception, you may use this file as part of a free software
64.92 -+// library without restriction. Specifically, if other files instantiate
64.93 -+// templates or use macros or inline functions from this file, or you compile
64.94 -+// this file and link it with other files to produce an executable, this
64.95 -+// file does not by itself cause the resulting executable to be covered by
64.96 -+// the GNU General Public License. This exception does not however
64.97 -+// invalidate any other reasons why the executable file might be covered by
64.98 -+// the GNU General Public License.
64.99 -+
64.100 -+// Written by Jakub Jelinek <jakub@redhat.com>
64.101 -+
64.102 -+#include <clocale>
64.103 -+
64.104 -+#ifdef __UCLIBC_MJN3_ONLY__
64.105 -+#warning clean this up
64.106 -+#endif
64.107 -+
64.108 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.109 -+
64.110 -+extern "C" __typeof(iswctype_l) __iswctype_l;
64.111 -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
64.112 -+extern "C" __typeof(strcoll_l) __strcoll_l;
64.113 -+extern "C" __typeof(strftime_l) __strftime_l;
64.114 -+extern "C" __typeof(strtod_l) __strtod_l;
64.115 -+extern "C" __typeof(strtof_l) __strtof_l;
64.116 -+extern "C" __typeof(strtold_l) __strtold_l;
64.117 -+extern "C" __typeof(strxfrm_l) __strxfrm_l;
64.118 -+extern "C" __typeof(towlower_l) __towlower_l;
64.119 -+extern "C" __typeof(towupper_l) __towupper_l;
64.120 -+extern "C" __typeof(wcscoll_l) __wcscoll_l;
64.121 -+extern "C" __typeof(wcsftime_l) __wcsftime_l;
64.122 -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
64.123 -+extern "C" __typeof(wctype_l) __wctype_l;
64.124 -+extern "C" __typeof(newlocale) __newlocale;
64.125 -+extern "C" __typeof(freelocale) __freelocale;
64.126 -+extern "C" __typeof(duplocale) __duplocale;
64.127 -+extern "C" __typeof(uselocale) __uselocale;
64.128 -+
64.129 -+#endif // GLIBC 2.3 and later
64.130 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
64.131 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.cc 1969-12-31 18:00:00.000000000 -0600
64.132 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.cc 2005-04-28 01:13:15.000000000 -0500
64.133 -@@ -0,0 +1,160 @@
64.134 -+// Wrapper for underlying C-language localization -*- C++ -*-
64.135 -+
64.136 -+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
64.137 -+//
64.138 -+// This file is part of the GNU ISO C++ Library. This library is free
64.139 -+// software; you can redistribute it and/or modify it under the
64.140 -+// terms of the GNU General Public License as published by the
64.141 -+// Free Software Foundation; either version 2, or (at your option)
64.142 -+// any later version.
64.143 -+
64.144 -+// This library is distributed in the hope that it will be useful,
64.145 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.146 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.147 -+// GNU General Public License for more details.
64.148 -+
64.149 -+// You should have received a copy of the GNU General Public License along
64.150 -+// with this library; see the file COPYING. If not, write to the Free
64.151 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.152 -+// USA.
64.153 -+
64.154 -+// As a special exception, you may use this file as part of a free software
64.155 -+// library without restriction. Specifically, if other files instantiate
64.156 -+// templates or use macros or inline functions from this file, or you compile
64.157 -+// this file and link it with other files to produce an executable, this
64.158 -+// file does not by itself cause the resulting executable to be covered by
64.159 -+// the GNU General Public License. This exception does not however
64.160 -+// invalidate any other reasons why the executable file might be covered by
64.161 -+// the GNU General Public License.
64.162 -+
64.163 -+//
64.164 -+// ISO C++ 14882: 22.8 Standard locale categories.
64.165 -+//
64.166 -+
64.167 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.168 -+
64.169 -+#include <cerrno> // For errno
64.170 -+#include <locale>
64.171 -+#include <stdexcept>
64.172 -+#include <langinfo.h>
64.173 -+#include <bits/c++locale_internal.h>
64.174 -+
64.175 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.176 -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
64.177 -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
64.178 -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
64.179 -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
64.180 -+#define __strtof_l(S, E, L) strtof((S), (E))
64.181 -+#define __strtod_l(S, E, L) strtod((S), (E))
64.182 -+#define __strtold_l(S, E, L) strtold((S), (E))
64.183 -+#warning should dummy __newlocale check for C|POSIX ?
64.184 -+#define __newlocale(a, b, c) NULL
64.185 -+#define __freelocale(a) ((void)0)
64.186 -+#define __duplocale(a) __c_locale()
64.187 -+#endif
64.188 -+
64.189 -+namespace std
64.190 -+{
64.191 -+ template<>
64.192 -+ void
64.193 -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
64.194 -+ const __c_locale& __cloc)
64.195 -+ {
64.196 -+ if (!(__err & ios_base::failbit))
64.197 -+ {
64.198 -+ char* __sanity;
64.199 -+ errno = 0;
64.200 -+ float __f = __strtof_l(__s, &__sanity, __cloc);
64.201 -+ if (__sanity != __s && errno != ERANGE)
64.202 -+ __v = __f;
64.203 -+ else
64.204 -+ __err |= ios_base::failbit;
64.205 -+ }
64.206 -+ }
64.207 -+
64.208 -+ template<>
64.209 -+ void
64.210 -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
64.211 -+ const __c_locale& __cloc)
64.212 -+ {
64.213 -+ if (!(__err & ios_base::failbit))
64.214 -+ {
64.215 -+ char* __sanity;
64.216 -+ errno = 0;
64.217 -+ double __d = __strtod_l(__s, &__sanity, __cloc);
64.218 -+ if (__sanity != __s && errno != ERANGE)
64.219 -+ __v = __d;
64.220 -+ else
64.221 -+ __err |= ios_base::failbit;
64.222 -+ }
64.223 -+ }
64.224 -+
64.225 -+ template<>
64.226 -+ void
64.227 -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
64.228 -+ const __c_locale& __cloc)
64.229 -+ {
64.230 -+ if (!(__err & ios_base::failbit))
64.231 -+ {
64.232 -+ char* __sanity;
64.233 -+ errno = 0;
64.234 -+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
64.235 -+ if (__sanity != __s && errno != ERANGE)
64.236 -+ __v = __ld;
64.237 -+ else
64.238 -+ __err |= ios_base::failbit;
64.239 -+ }
64.240 -+ }
64.241 -+
64.242 -+ void
64.243 -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
64.244 -+ __c_locale __old)
64.245 -+ {
64.246 -+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
64.247 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.248 -+ if (!__cloc)
64.249 -+ {
64.250 -+ // This named locale is not supported by the underlying OS.
64.251 -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
64.252 -+ "name not valid"));
64.253 -+ }
64.254 -+#endif
64.255 -+ }
64.256 -+
64.257 -+ void
64.258 -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
64.259 -+ {
64.260 -+ if (_S_get_c_locale() != __cloc)
64.261 -+ __freelocale(__cloc);
64.262 -+ }
64.263 -+
64.264 -+ __c_locale
64.265 -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
64.266 -+ { return __duplocale(__cloc); }
64.267 -+} // namespace std
64.268 -+
64.269 -+namespace __gnu_cxx
64.270 -+{
64.271 -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
64.272 -+ {
64.273 -+ "LC_CTYPE",
64.274 -+ "LC_NUMERIC",
64.275 -+ "LC_TIME",
64.276 -+ "LC_COLLATE",
64.277 -+ "LC_MONETARY",
64.278 -+ "LC_MESSAGES",
64.279 -+#if _GLIBCXX_NUM_CATEGORIES != 0
64.280 -+ "LC_PAPER",
64.281 -+ "LC_NAME",
64.282 -+ "LC_ADDRESS",
64.283 -+ "LC_TELEPHONE",
64.284 -+ "LC_MEASUREMENT",
64.285 -+ "LC_IDENTIFICATION"
64.286 -+#endif
64.287 -+ };
64.288 -+}
64.289 -+
64.290 -+namespace std
64.291 -+{
64.292 -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
64.293 -+} // namespace std
64.294 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h
64.295 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/c_locale.h 1969-12-31 18:00:00.000000000 -0600
64.296 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/c_locale.h 2005-04-28 01:13:15.000000000 -0500
64.297 -@@ -0,0 +1,115 @@
64.298 -+// Wrapper for underlying C-language localization -*- C++ -*-
64.299 -+
64.300 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.301 -+//
64.302 -+// This file is part of the GNU ISO C++ Library. This library is free
64.303 -+// software; you can redistribute it and/or modify it under the
64.304 -+// terms of the GNU General Public License as published by the
64.305 -+// Free Software Foundation; either version 2, or (at your option)
64.306 -+// any later version.
64.307 -+
64.308 -+// This library is distributed in the hope that it will be useful,
64.309 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.310 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.311 -+// GNU General Public License for more details.
64.312 -+
64.313 -+// You should have received a copy of the GNU General Public License along
64.314 -+// with this library; see the file COPYING. If not, write to the Free
64.315 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.316 -+// USA.
64.317 -+
64.318 -+// As a special exception, you may use this file as part of a free software
64.319 -+// library without restriction. Specifically, if other files instantiate
64.320 -+// templates or use macros or inline functions from this file, or you compile
64.321 -+// this file and link it with other files to produce an executable, this
64.322 -+// file does not by itself cause the resulting executable to be covered by
64.323 -+// the GNU General Public License. This exception does not however
64.324 -+// invalidate any other reasons why the executable file might be covered by
64.325 -+// the GNU General Public License.
64.326 -+
64.327 -+//
64.328 -+// ISO C++ 14882: 22.8 Standard locale categories.
64.329 -+//
64.330 -+
64.331 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.332 -+
64.333 -+#ifndef _C_LOCALE_H
64.334 -+#define _C_LOCALE_H 1
64.335 -+
64.336 -+#pragma GCC system_header
64.337 -+
64.338 -+#include <cstring> // get std::strlen
64.339 -+#include <cstdio> // get std::snprintf or std::sprintf
64.340 -+#include <clocale>
64.341 -+#include <langinfo.h> // For codecvt
64.342 -+#ifdef __UCLIBC_MJN3_ONLY__
64.343 -+#warning fix this
64.344 -+#endif
64.345 -+#ifdef __UCLIBC_HAS_LOCALE__
64.346 -+#include <iconv.h> // For codecvt using iconv, iconv_t
64.347 -+#endif
64.348 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
64.349 -+#include <libintl.h> // For messages
64.350 -+#endif
64.351 -+
64.352 -+#ifdef __UCLIBC_MJN3_ONLY__
64.353 -+#warning what is _GLIBCXX_C_LOCALE_GNU for
64.354 -+#endif
64.355 -+#define _GLIBCXX_C_LOCALE_GNU 1
64.356 -+
64.357 -+#ifdef __UCLIBC_MJN3_ONLY__
64.358 -+#warning fix categories
64.359 -+#endif
64.360 -+// #define _GLIBCXX_NUM_CATEGORIES 6
64.361 -+#define _GLIBCXX_NUM_CATEGORIES 0
64.362 -+
64.363 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.364 -+namespace __gnu_cxx
64.365 -+{
64.366 -+ extern "C" __typeof(uselocale) __uselocale;
64.367 -+}
64.368 -+#endif
64.369 -+
64.370 -+namespace std
64.371 -+{
64.372 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.373 -+ typedef __locale_t __c_locale;
64.374 -+#else
64.375 -+ typedef int* __c_locale;
64.376 -+#endif
64.377 -+
64.378 -+ // Convert numeric value of type _Tv to string and return length of
64.379 -+ // string. If snprintf is available use it, otherwise fall back to
64.380 -+ // the unsafe sprintf which, in general, can be dangerous and should
64.381 -+ // be avoided.
64.382 -+ template<typename _Tv>
64.383 -+ int
64.384 -+ __convert_from_v(char* __out, const int __size, const char* __fmt,
64.385 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.386 -+ _Tv __v, const __c_locale& __cloc, int __prec)
64.387 -+ {
64.388 -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
64.389 -+#else
64.390 -+ _Tv __v, const __c_locale&, int __prec)
64.391 -+ {
64.392 -+# ifdef __UCLIBC_HAS_LOCALE__
64.393 -+ char* __old = std::setlocale(LC_ALL, NULL);
64.394 -+ char* __sav = new char[std::strlen(__old) + 1];
64.395 -+ std::strcpy(__sav, __old);
64.396 -+ std::setlocale(LC_ALL, "C");
64.397 -+# endif
64.398 -+#endif
64.399 -+
64.400 -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
64.401 -+
64.402 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.403 -+ __gnu_cxx::__uselocale(__old);
64.404 -+#elif defined __UCLIBC_HAS_LOCALE__
64.405 -+ std::setlocale(LC_ALL, __sav);
64.406 -+ delete [] __sav;
64.407 -+#endif
64.408 -+ return __ret;
64.409 -+ }
64.410 -+}
64.411 -+
64.412 -+#endif
64.413 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
64.414 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 1969-12-31 18:00:00.000000000 -0600
64.415 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc 2005-04-28 01:13:15.000000000 -0500
64.416 -@@ -0,0 +1,306 @@
64.417 -+// std::codecvt implementation details, GNU version -*- C++ -*-
64.418 -+
64.419 -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
64.420 -+//
64.421 -+// This file is part of the GNU ISO C++ Library. This library is free
64.422 -+// software; you can redistribute it and/or modify it under the
64.423 -+// terms of the GNU General Public License as published by the
64.424 -+// Free Software Foundation; either version 2, or (at your option)
64.425 -+// any later version.
64.426 -+
64.427 -+// This library is distributed in the hope that it will be useful,
64.428 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.429 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.430 -+// GNU General Public License for more details.
64.431 -+
64.432 -+// You should have received a copy of the GNU General Public License along
64.433 -+// with this library; see the file COPYING. If not, write to the Free
64.434 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.435 -+// USA.
64.436 -+
64.437 -+// As a special exception, you may use this file as part of a free software
64.438 -+// library without restriction. Specifically, if other files instantiate
64.439 -+// templates or use macros or inline functions from this file, or you compile
64.440 -+// this file and link it with other files to produce an executable, this
64.441 -+// file does not by itself cause the resulting executable to be covered by
64.442 -+// the GNU General Public License. This exception does not however
64.443 -+// invalidate any other reasons why the executable file might be covered by
64.444 -+// the GNU General Public License.
64.445 -+
64.446 -+//
64.447 -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
64.448 -+//
64.449 -+
64.450 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.451 -+
64.452 -+#include <locale>
64.453 -+#include <bits/c++locale_internal.h>
64.454 -+
64.455 -+namespace std
64.456 -+{
64.457 -+ // Specializations.
64.458 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.459 -+ codecvt_base::result
64.460 -+ codecvt<wchar_t, char, mbstate_t>::
64.461 -+ do_out(state_type& __state, const intern_type* __from,
64.462 -+ const intern_type* __from_end, const intern_type*& __from_next,
64.463 -+ extern_type* __to, extern_type* __to_end,
64.464 -+ extern_type*& __to_next) const
64.465 -+ {
64.466 -+ result __ret = ok;
64.467 -+ state_type __tmp_state(__state);
64.468 -+
64.469 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.470 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
64.471 -+#endif
64.472 -+
64.473 -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
64.474 -+ // in case we fall back to wcrtomb and then continue, in a loop.
64.475 -+ // NB: wcsnrtombs is a GNU extension
64.476 -+ for (__from_next = __from, __to_next = __to;
64.477 -+ __from_next < __from_end && __to_next < __to_end
64.478 -+ && __ret == ok;)
64.479 -+ {
64.480 -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
64.481 -+ __from_end - __from_next);
64.482 -+ if (!__from_chunk_end)
64.483 -+ __from_chunk_end = __from_end;
64.484 -+
64.485 -+ __from = __from_next;
64.486 -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
64.487 -+ __from_chunk_end - __from_next,
64.488 -+ __to_end - __to_next, &__state);
64.489 -+ if (__conv == static_cast<size_t>(-1))
64.490 -+ {
64.491 -+ // In case of error, in order to stop at the exact place we
64.492 -+ // have to start again from the beginning with a series of
64.493 -+ // wcrtomb.
64.494 -+ for (; __from < __from_next; ++__from)
64.495 -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
64.496 -+ __state = __tmp_state;
64.497 -+ __ret = error;
64.498 -+ }
64.499 -+ else if (__from_next && __from_next < __from_chunk_end)
64.500 -+ {
64.501 -+ __to_next += __conv;
64.502 -+ __ret = partial;
64.503 -+ }
64.504 -+ else
64.505 -+ {
64.506 -+ __from_next = __from_chunk_end;
64.507 -+ __to_next += __conv;
64.508 -+ }
64.509 -+
64.510 -+ if (__from_next < __from_end && __ret == ok)
64.511 -+ {
64.512 -+ extern_type __buf[MB_LEN_MAX];
64.513 -+ __tmp_state = __state;
64.514 -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
64.515 -+ if (__conv > static_cast<size_t>(__to_end - __to_next))
64.516 -+ __ret = partial;
64.517 -+ else
64.518 -+ {
64.519 -+ memcpy(__to_next, __buf, __conv);
64.520 -+ __state = __tmp_state;
64.521 -+ __to_next += __conv;
64.522 -+ ++__from_next;
64.523 -+ }
64.524 -+ }
64.525 -+ }
64.526 -+
64.527 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.528 -+ __uselocale(__old);
64.529 -+#endif
64.530 -+
64.531 -+ return __ret;
64.532 -+ }
64.533 -+
64.534 -+ codecvt_base::result
64.535 -+ codecvt<wchar_t, char, mbstate_t>::
64.536 -+ do_in(state_type& __state, const extern_type* __from,
64.537 -+ const extern_type* __from_end, const extern_type*& __from_next,
64.538 -+ intern_type* __to, intern_type* __to_end,
64.539 -+ intern_type*& __to_next) const
64.540 -+ {
64.541 -+ result __ret = ok;
64.542 -+ state_type __tmp_state(__state);
64.543 -+
64.544 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.545 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
64.546 -+#endif
64.547 -+
64.548 -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
64.549 -+ // in case we store a L'\0' and then continue, in a loop.
64.550 -+ // NB: mbsnrtowcs is a GNU extension
64.551 -+ for (__from_next = __from, __to_next = __to;
64.552 -+ __from_next < __from_end && __to_next < __to_end
64.553 -+ && __ret == ok;)
64.554 -+ {
64.555 -+ const extern_type* __from_chunk_end;
64.556 -+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
64.557 -+ __from_end
64.558 -+ - __from_next));
64.559 -+ if (!__from_chunk_end)
64.560 -+ __from_chunk_end = __from_end;
64.561 -+
64.562 -+ __from = __from_next;
64.563 -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
64.564 -+ __from_chunk_end - __from_next,
64.565 -+ __to_end - __to_next, &__state);
64.566 -+ if (__conv == static_cast<size_t>(-1))
64.567 -+ {
64.568 -+ // In case of error, in order to stop at the exact place we
64.569 -+ // have to start again from the beginning with a series of
64.570 -+ // mbrtowc.
64.571 -+ for (;; ++__to_next, __from += __conv)
64.572 -+ {
64.573 -+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
64.574 -+ &__tmp_state);
64.575 -+ if (__conv == static_cast<size_t>(-1)
64.576 -+ || __conv == static_cast<size_t>(-2))
64.577 -+ break;
64.578 -+ }
64.579 -+ __from_next = __from;
64.580 -+ __state = __tmp_state;
64.581 -+ __ret = error;
64.582 -+ }
64.583 -+ else if (__from_next && __from_next < __from_chunk_end)
64.584 -+ {
64.585 -+ // It is unclear what to return in this case (see DR 382).
64.586 -+ __to_next += __conv;
64.587 -+ __ret = partial;
64.588 -+ }
64.589 -+ else
64.590 -+ {
64.591 -+ __from_next = __from_chunk_end;
64.592 -+ __to_next += __conv;
64.593 -+ }
64.594 -+
64.595 -+ if (__from_next < __from_end && __ret == ok)
64.596 -+ {
64.597 -+ if (__to_next < __to_end)
64.598 -+ {
64.599 -+ // XXX Probably wrong for stateful encodings
64.600 -+ __tmp_state = __state;
64.601 -+ ++__from_next;
64.602 -+ *__to_next++ = L'\0';
64.603 -+ }
64.604 -+ else
64.605 -+ __ret = partial;
64.606 -+ }
64.607 -+ }
64.608 -+
64.609 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.610 -+ __uselocale(__old);
64.611 -+#endif
64.612 -+
64.613 -+ return __ret;
64.614 -+ }
64.615 -+
64.616 -+ int
64.617 -+ codecvt<wchar_t, char, mbstate_t>::
64.618 -+ do_encoding() const throw()
64.619 -+ {
64.620 -+ // XXX This implementation assumes that the encoding is
64.621 -+ // stateless and is either single-byte or variable-width.
64.622 -+ int __ret = 0;
64.623 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.624 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
64.625 -+#endif
64.626 -+ if (MB_CUR_MAX == 1)
64.627 -+ __ret = 1;
64.628 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.629 -+ __uselocale(__old);
64.630 -+#endif
64.631 -+ return __ret;
64.632 -+ }
64.633 -+
64.634 -+ int
64.635 -+ codecvt<wchar_t, char, mbstate_t>::
64.636 -+ do_max_length() const throw()
64.637 -+ {
64.638 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.639 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
64.640 -+#endif
64.641 -+ // XXX Probably wrong for stateful encodings.
64.642 -+ int __ret = MB_CUR_MAX;
64.643 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.644 -+ __uselocale(__old);
64.645 -+#endif
64.646 -+ return __ret;
64.647 -+ }
64.648 -+
64.649 -+ int
64.650 -+ codecvt<wchar_t, char, mbstate_t>::
64.651 -+ do_length(state_type& __state, const extern_type* __from,
64.652 -+ const extern_type* __end, size_t __max) const
64.653 -+ {
64.654 -+ int __ret = 0;
64.655 -+ state_type __tmp_state(__state);
64.656 -+
64.657 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.658 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
64.659 -+#endif
64.660 -+
64.661 -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
64.662 -+ // in case we advance past it and then continue, in a loop.
64.663 -+ // NB: mbsnrtowcs is a GNU extension
64.664 -+
64.665 -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
64.666 -+ // its fourth parameter (it wouldn't with NULL as first parameter).
64.667 -+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
64.668 -+ * __max));
64.669 -+ while (__from < __end && __max)
64.670 -+ {
64.671 -+ const extern_type* __from_chunk_end;
64.672 -+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
64.673 -+ __end
64.674 -+ - __from));
64.675 -+ if (!__from_chunk_end)
64.676 -+ __from_chunk_end = __end;
64.677 -+
64.678 -+ const extern_type* __tmp_from = __from;
64.679 -+ size_t __conv = mbsnrtowcs(__to, &__from,
64.680 -+ __from_chunk_end - __from,
64.681 -+ __max, &__state);
64.682 -+ if (__conv == static_cast<size_t>(-1))
64.683 -+ {
64.684 -+ // In case of error, in order to stop at the exact place we
64.685 -+ // have to start again from the beginning with a series of
64.686 -+ // mbrtowc.
64.687 -+ for (__from = __tmp_from;; __from += __conv)
64.688 -+ {
64.689 -+ __conv = mbrtowc(NULL, __from, __end - __from,
64.690 -+ &__tmp_state);
64.691 -+ if (__conv == static_cast<size_t>(-1)
64.692 -+ || __conv == static_cast<size_t>(-2))
64.693 -+ break;
64.694 -+ }
64.695 -+ __state = __tmp_state;
64.696 -+ __ret += __from - __tmp_from;
64.697 -+ break;
64.698 -+ }
64.699 -+ if (!__from)
64.700 -+ __from = __from_chunk_end;
64.701 -+
64.702 -+ __ret += __from - __tmp_from;
64.703 -+ __max -= __conv;
64.704 -+
64.705 -+ if (__from < __end && __max)
64.706 -+ {
64.707 -+ // XXX Probably wrong for stateful encodings
64.708 -+ __tmp_state = __state;
64.709 -+ ++__from;
64.710 -+ ++__ret;
64.711 -+ --__max;
64.712 -+ }
64.713 -+ }
64.714 -+
64.715 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.716 -+ __uselocale(__old);
64.717 -+#endif
64.718 -+
64.719 -+ return __ret;
64.720 -+ }
64.721 -+#endif
64.722 -+}
64.723 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
64.724 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/collate_members.cc 1969-12-31 18:00:00.000000000 -0600
64.725 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/collate_members.cc 2005-04-28 01:13:15.000000000 -0500
64.726 -@@ -0,0 +1,80 @@
64.727 -+// std::collate implementation details, GNU version -*- C++ -*-
64.728 -+
64.729 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
64.730 -+//
64.731 -+// This file is part of the GNU ISO C++ Library. This library is free
64.732 -+// software; you can redistribute it and/or modify it under the
64.733 -+// terms of the GNU General Public License as published by the
64.734 -+// Free Software Foundation; either version 2, or (at your option)
64.735 -+// any later version.
64.736 -+
64.737 -+// This library is distributed in the hope that it will be useful,
64.738 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.739 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.740 -+// GNU General Public License for more details.
64.741 -+
64.742 -+// You should have received a copy of the GNU General Public License along
64.743 -+// with this library; see the file COPYING. If not, write to the Free
64.744 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.745 -+// USA.
64.746 -+
64.747 -+// As a special exception, you may use this file as part of a free software
64.748 -+// library without restriction. Specifically, if other files instantiate
64.749 -+// templates or use macros or inline functions from this file, or you compile
64.750 -+// this file and link it with other files to produce an executable, this
64.751 -+// file does not by itself cause the resulting executable to be covered by
64.752 -+// the GNU General Public License. This exception does not however
64.753 -+// invalidate any other reasons why the executable file might be covered by
64.754 -+// the GNU General Public License.
64.755 -+
64.756 -+//
64.757 -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
64.758 -+//
64.759 -+
64.760 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.761 -+
64.762 -+#include <locale>
64.763 -+#include <bits/c++locale_internal.h>
64.764 -+
64.765 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.766 -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
64.767 -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
64.768 -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
64.769 -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
64.770 -+#endif
64.771 -+
64.772 -+namespace std
64.773 -+{
64.774 -+ // These are basically extensions to char_traits, and perhaps should
64.775 -+ // be put there instead of here.
64.776 -+ template<>
64.777 -+ int
64.778 -+ collate<char>::_M_compare(const char* __one, const char* __two) const
64.779 -+ {
64.780 -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
64.781 -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
64.782 -+ }
64.783 -+
64.784 -+ template<>
64.785 -+ size_t
64.786 -+ collate<char>::_M_transform(char* __to, const char* __from,
64.787 -+ size_t __n) const
64.788 -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
64.789 -+
64.790 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.791 -+ template<>
64.792 -+ int
64.793 -+ collate<wchar_t>::_M_compare(const wchar_t* __one,
64.794 -+ const wchar_t* __two) const
64.795 -+ {
64.796 -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
64.797 -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
64.798 -+ }
64.799 -+
64.800 -+ template<>
64.801 -+ size_t
64.802 -+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
64.803 -+ size_t __n) const
64.804 -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
64.805 -+#endif
64.806 -+}
64.807 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
64.808 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/ctype_members.cc 1969-12-31 18:00:00.000000000 -0600
64.809 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2005-04-28 01:13:15.000000000 -0500
64.810 -@@ -0,0 +1,300 @@
64.811 -+// std::ctype implementation details, GNU version -*- C++ -*-
64.812 -+
64.813 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.814 -+//
64.815 -+// This file is part of the GNU ISO C++ Library. This library is free
64.816 -+// software; you can redistribute it and/or modify it under the
64.817 -+// terms of the GNU General Public License as published by the
64.818 -+// Free Software Foundation; either version 2, or (at your option)
64.819 -+// any later version.
64.820 -+
64.821 -+// This library is distributed in the hope that it will be useful,
64.822 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.823 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.824 -+// GNU General Public License for more details.
64.825 -+
64.826 -+// You should have received a copy of the GNU General Public License along
64.827 -+// with this library; see the file COPYING. If not, write to the Free
64.828 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.829 -+// USA.
64.830 -+
64.831 -+// As a special exception, you may use this file as part of a free software
64.832 -+// library without restriction. Specifically, if other files instantiate
64.833 -+// templates or use macros or inline functions from this file, or you compile
64.834 -+// this file and link it with other files to produce an executable, this
64.835 -+// file does not by itself cause the resulting executable to be covered by
64.836 -+// the GNU General Public License. This exception does not however
64.837 -+// invalidate any other reasons why the executable file might be covered by
64.838 -+// the GNU General Public License.
64.839 -+
64.840 -+//
64.841 -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
64.842 -+//
64.843 -+
64.844 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.845 -+
64.846 -+#define _LIBC
64.847 -+#include <locale>
64.848 -+#undef _LIBC
64.849 -+#include <bits/c++locale_internal.h>
64.850 -+
64.851 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.852 -+#define __wctype_l(S, L) wctype((S))
64.853 -+#define __towupper_l(C, L) towupper((C))
64.854 -+#define __towlower_l(C, L) towlower((C))
64.855 -+#define __iswctype_l(C, M, L) iswctype((C), (M))
64.856 -+#endif
64.857 -+
64.858 -+namespace std
64.859 -+{
64.860 -+ // NB: The other ctype<char> specializations are in src/locale.cc and
64.861 -+ // various /config/os/* files.
64.862 -+ template<>
64.863 -+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
64.864 -+ : ctype<char>(0, false, __refs)
64.865 -+ {
64.866 -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
64.867 -+ {
64.868 -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
64.869 -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
64.870 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.871 -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
64.872 -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
64.873 -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
64.874 -+#endif
64.875 -+ }
64.876 -+ }
64.877 -+
64.878 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.879 -+ ctype<wchar_t>::__wmask_type
64.880 -+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
64.881 -+ {
64.882 -+ __wmask_type __ret;
64.883 -+ switch (__m)
64.884 -+ {
64.885 -+ case space:
64.886 -+ __ret = __wctype_l("space", _M_c_locale_ctype);
64.887 -+ break;
64.888 -+ case print:
64.889 -+ __ret = __wctype_l("print", _M_c_locale_ctype);
64.890 -+ break;
64.891 -+ case cntrl:
64.892 -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
64.893 -+ break;
64.894 -+ case upper:
64.895 -+ __ret = __wctype_l("upper", _M_c_locale_ctype);
64.896 -+ break;
64.897 -+ case lower:
64.898 -+ __ret = __wctype_l("lower", _M_c_locale_ctype);
64.899 -+ break;
64.900 -+ case alpha:
64.901 -+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
64.902 -+ break;
64.903 -+ case digit:
64.904 -+ __ret = __wctype_l("digit", _M_c_locale_ctype);
64.905 -+ break;
64.906 -+ case punct:
64.907 -+ __ret = __wctype_l("punct", _M_c_locale_ctype);
64.908 -+ break;
64.909 -+ case xdigit:
64.910 -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
64.911 -+ break;
64.912 -+ case alnum:
64.913 -+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
64.914 -+ break;
64.915 -+ case graph:
64.916 -+ __ret = __wctype_l("graph", _M_c_locale_ctype);
64.917 -+ break;
64.918 -+ default:
64.919 -+ __ret = __wmask_type();
64.920 -+ }
64.921 -+ return __ret;
64.922 -+ }
64.923 -+
64.924 -+ wchar_t
64.925 -+ ctype<wchar_t>::do_toupper(wchar_t __c) const
64.926 -+ { return __towupper_l(__c, _M_c_locale_ctype); }
64.927 -+
64.928 -+ const wchar_t*
64.929 -+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
64.930 -+ {
64.931 -+ while (__lo < __hi)
64.932 -+ {
64.933 -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
64.934 -+ ++__lo;
64.935 -+ }
64.936 -+ return __hi;
64.937 -+ }
64.938 -+
64.939 -+ wchar_t
64.940 -+ ctype<wchar_t>::do_tolower(wchar_t __c) const
64.941 -+ { return __towlower_l(__c, _M_c_locale_ctype); }
64.942 -+
64.943 -+ const wchar_t*
64.944 -+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
64.945 -+ {
64.946 -+ while (__lo < __hi)
64.947 -+ {
64.948 -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
64.949 -+ ++__lo;
64.950 -+ }
64.951 -+ return __hi;
64.952 -+ }
64.953 -+
64.954 -+ bool
64.955 -+ ctype<wchar_t>::
64.956 -+ do_is(mask __m, wchar_t __c) const
64.957 -+ {
64.958 -+ // Highest bitmask in ctype_base == 10, but extra in "C"
64.959 -+ // library for blank.
64.960 -+ bool __ret = false;
64.961 -+ const size_t __bitmasksize = 11;
64.962 -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
64.963 -+ if (__m & _M_bit[__bitcur]
64.964 -+ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
64.965 -+ {
64.966 -+ __ret = true;
64.967 -+ break;
64.968 -+ }
64.969 -+ return __ret;
64.970 -+ }
64.971 -+
64.972 -+ const wchar_t*
64.973 -+ ctype<wchar_t>::
64.974 -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
64.975 -+ {
64.976 -+ for (; __lo < __hi; ++__vec, ++__lo)
64.977 -+ {
64.978 -+ // Highest bitmask in ctype_base == 10, but extra in "C"
64.979 -+ // library for blank.
64.980 -+ const size_t __bitmasksize = 11;
64.981 -+ mask __m = 0;
64.982 -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
64.983 -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
64.984 -+ __m |= _M_bit[__bitcur];
64.985 -+ *__vec = __m;
64.986 -+ }
64.987 -+ return __hi;
64.988 -+ }
64.989 -+
64.990 -+ const wchar_t*
64.991 -+ ctype<wchar_t>::
64.992 -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
64.993 -+ {
64.994 -+ while (__lo < __hi && !this->do_is(__m, *__lo))
64.995 -+ ++__lo;
64.996 -+ return __lo;
64.997 -+ }
64.998 -+
64.999 -+ const wchar_t*
64.1000 -+ ctype<wchar_t>::
64.1001 -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
64.1002 -+ {
64.1003 -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
64.1004 -+ ++__lo;
64.1005 -+ return __lo;
64.1006 -+ }
64.1007 -+
64.1008 -+ wchar_t
64.1009 -+ ctype<wchar_t>::
64.1010 -+ do_widen(char __c) const
64.1011 -+ { return _M_widen[static_cast<unsigned char>(__c)]; }
64.1012 -+
64.1013 -+ const char*
64.1014 -+ ctype<wchar_t>::
64.1015 -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
64.1016 -+ {
64.1017 -+ while (__lo < __hi)
64.1018 -+ {
64.1019 -+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
64.1020 -+ ++__lo;
64.1021 -+ ++__dest;
64.1022 -+ }
64.1023 -+ return __hi;
64.1024 -+ }
64.1025 -+
64.1026 -+ char
64.1027 -+ ctype<wchar_t>::
64.1028 -+ do_narrow(wchar_t __wc, char __dfault) const
64.1029 -+ {
64.1030 -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
64.1031 -+ return _M_narrow[__wc];
64.1032 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1033 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
64.1034 -+#endif
64.1035 -+ const int __c = wctob(__wc);
64.1036 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1037 -+ __uselocale(__old);
64.1038 -+#endif
64.1039 -+ return (__c == EOF ? __dfault : static_cast<char>(__c));
64.1040 -+ }
64.1041 -+
64.1042 -+ const wchar_t*
64.1043 -+ ctype<wchar_t>::
64.1044 -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
64.1045 -+ char* __dest) const
64.1046 -+ {
64.1047 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1048 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
64.1049 -+#endif
64.1050 -+ if (_M_narrow_ok)
64.1051 -+ while (__lo < __hi)
64.1052 -+ {
64.1053 -+ if (*__lo >= 0 && *__lo < 128)
64.1054 -+ *__dest = _M_narrow[*__lo];
64.1055 -+ else
64.1056 -+ {
64.1057 -+ const int __c = wctob(*__lo);
64.1058 -+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
64.1059 -+ }
64.1060 -+ ++__lo;
64.1061 -+ ++__dest;
64.1062 -+ }
64.1063 -+ else
64.1064 -+ while (__lo < __hi)
64.1065 -+ {
64.1066 -+ const int __c = wctob(*__lo);
64.1067 -+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
64.1068 -+ ++__lo;
64.1069 -+ ++__dest;
64.1070 -+ }
64.1071 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1072 -+ __uselocale(__old);
64.1073 -+#endif
64.1074 -+ return __hi;
64.1075 -+ }
64.1076 -+
64.1077 -+ void
64.1078 -+ ctype<wchar_t>::_M_initialize_ctype()
64.1079 -+ {
64.1080 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1081 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
64.1082 -+#endif
64.1083 -+ wint_t __i;
64.1084 -+ for (__i = 0; __i < 128; ++__i)
64.1085 -+ {
64.1086 -+ const int __c = wctob(__i);
64.1087 -+ if (__c == EOF)
64.1088 -+ break;
64.1089 -+ else
64.1090 -+ _M_narrow[__i] = static_cast<char>(__c);
64.1091 -+ }
64.1092 -+ if (__i == 128)
64.1093 -+ _M_narrow_ok = true;
64.1094 -+ else
64.1095 -+ _M_narrow_ok = false;
64.1096 -+ for (size_t __j = 0;
64.1097 -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
64.1098 -+ _M_widen[__j] = btowc(__j);
64.1099 -+
64.1100 -+ for (size_t __k = 0; __k <= 11; ++__k)
64.1101 -+ {
64.1102 -+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
64.1103 -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
64.1104 -+ }
64.1105 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1106 -+ __uselocale(__old);
64.1107 -+#endif
64.1108 -+ }
64.1109 -+#endif // _GLIBCXX_USE_WCHAR_T
64.1110 -+}
64.1111 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
64.1112 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.cc 1969-12-31 18:00:00.000000000 -0600
64.1113 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.cc 2005-04-28 01:13:15.000000000 -0500
64.1114 -@@ -0,0 +1,100 @@
64.1115 -+// std::messages implementation details, GNU version -*- C++ -*-
64.1116 -+
64.1117 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
64.1118 -+//
64.1119 -+// This file is part of the GNU ISO C++ Library. This library is free
64.1120 -+// software; you can redistribute it and/or modify it under the
64.1121 -+// terms of the GNU General Public License as published by the
64.1122 -+// Free Software Foundation; either version 2, or (at your option)
64.1123 -+// any later version.
64.1124 -+
64.1125 -+// This library is distributed in the hope that it will be useful,
64.1126 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.1127 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.1128 -+// GNU General Public License for more details.
64.1129 -+
64.1130 -+// You should have received a copy of the GNU General Public License along
64.1131 -+// with this library; see the file COPYING. If not, write to the Free
64.1132 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.1133 -+// USA.
64.1134 -+
64.1135 -+// As a special exception, you may use this file as part of a free software
64.1136 -+// library without restriction. Specifically, if other files instantiate
64.1137 -+// templates or use macros or inline functions from this file, or you compile
64.1138 -+// this file and link it with other files to produce an executable, this
64.1139 -+// file does not by itself cause the resulting executable to be covered by
64.1140 -+// the GNU General Public License. This exception does not however
64.1141 -+// invalidate any other reasons why the executable file might be covered by
64.1142 -+// the GNU General Public License.
64.1143 -+
64.1144 -+//
64.1145 -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
64.1146 -+//
64.1147 -+
64.1148 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.1149 -+
64.1150 -+#include <locale>
64.1151 -+#include <bits/c++locale_internal.h>
64.1152 -+
64.1153 -+#ifdef __UCLIBC_MJN3_ONLY__
64.1154 -+#warning fix gettext stuff
64.1155 -+#endif
64.1156 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
64.1157 -+extern "C" char *__dcgettext(const char *domainname,
64.1158 -+ const char *msgid, int category);
64.1159 -+#undef gettext
64.1160 -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
64.1161 -+#else
64.1162 -+#undef gettext
64.1163 -+#define gettext(msgid) (msgid)
64.1164 -+#endif
64.1165 -+
64.1166 -+namespace std
64.1167 -+{
64.1168 -+ // Specializations.
64.1169 -+ template<>
64.1170 -+ string
64.1171 -+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
64.1172 -+ {
64.1173 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1174 -+ __c_locale __old = __uselocale(_M_c_locale_messages);
64.1175 -+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
64.1176 -+ __uselocale(__old);
64.1177 -+ return string(__msg);
64.1178 -+#elif defined __UCLIBC_HAS_LOCALE__
64.1179 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.1180 -+ setlocale(LC_ALL, _M_name_messages);
64.1181 -+ const char* __msg = gettext(__dfault.c_str());
64.1182 -+ setlocale(LC_ALL, __old);
64.1183 -+ free(__old);
64.1184 -+ return string(__msg);
64.1185 -+#else
64.1186 -+ const char* __msg = gettext(__dfault.c_str());
64.1187 -+ return string(__msg);
64.1188 -+#endif
64.1189 -+ }
64.1190 -+
64.1191 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.1192 -+ template<>
64.1193 -+ wstring
64.1194 -+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
64.1195 -+ {
64.1196 -+# ifdef __UCLIBC_HAS_XLOCALE__
64.1197 -+ __c_locale __old = __uselocale(_M_c_locale_messages);
64.1198 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
64.1199 -+ __uselocale(__old);
64.1200 -+ return _M_convert_from_char(__msg);
64.1201 -+# elif defined __UCLIBC_HAS_LOCALE__
64.1202 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.1203 -+ setlocale(LC_ALL, _M_name_messages);
64.1204 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
64.1205 -+ setlocale(LC_ALL, __old);
64.1206 -+ free(__old);
64.1207 -+ return _M_convert_from_char(__msg);
64.1208 -+# else
64.1209 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
64.1210 -+ return _M_convert_from_char(__msg);
64.1211 -+# endif
64.1212 -+ }
64.1213 -+#endif
64.1214 -+}
64.1215 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h
64.1216 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/messages_members.h 1969-12-31 18:00:00.000000000 -0600
64.1217 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/messages_members.h 2005-04-28 01:13:15.000000000 -0500
64.1218 -@@ -0,0 +1,118 @@
64.1219 -+// std::messages implementation details, GNU version -*- C++ -*-
64.1220 -+
64.1221 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.1222 -+//
64.1223 -+// This file is part of the GNU ISO C++ Library. This library is free
64.1224 -+// software; you can redistribute it and/or modify it under the
64.1225 -+// terms of the GNU General Public License as published by the
64.1226 -+// Free Software Foundation; either version 2, or (at your option)
64.1227 -+// any later version.
64.1228 -+
64.1229 -+// This library is distributed in the hope that it will be useful,
64.1230 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.1231 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.1232 -+// GNU General Public License for more details.
64.1233 -+
64.1234 -+// You should have received a copy of the GNU General Public License along
64.1235 -+// with this library; see the file COPYING. If not, write to the Free
64.1236 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.1237 -+// USA.
64.1238 -+
64.1239 -+// As a special exception, you may use this file as part of a free software
64.1240 -+// library without restriction. Specifically, if other files instantiate
64.1241 -+// templates or use macros or inline functions from this file, or you compile
64.1242 -+// this file and link it with other files to produce an executable, this
64.1243 -+// file does not by itself cause the resulting executable to be covered by
64.1244 -+// the GNU General Public License. This exception does not however
64.1245 -+// invalidate any other reasons why the executable file might be covered by
64.1246 -+// the GNU General Public License.
64.1247 -+
64.1248 -+//
64.1249 -+// ISO C++ 14882: 22.2.7.1.2 messages functions
64.1250 -+//
64.1251 -+
64.1252 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.1253 -+
64.1254 -+#ifdef __UCLIBC_MJN3_ONLY__
64.1255 -+#warning fix prototypes for *textdomain funcs
64.1256 -+#endif
64.1257 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
64.1258 -+extern "C" char *__textdomain(const char *domainname);
64.1259 -+extern "C" char *__bindtextdomain(const char *domainname,
64.1260 -+ const char *dirname);
64.1261 -+#else
64.1262 -+#undef __textdomain
64.1263 -+#undef __bindtextdomain
64.1264 -+#define __textdomain(D) ((void)0)
64.1265 -+#define __bindtextdomain(D,P) ((void)0)
64.1266 -+#endif
64.1267 -+
64.1268 -+ // Non-virtual member functions.
64.1269 -+ template<typename _CharT>
64.1270 -+ messages<_CharT>::messages(size_t __refs)
64.1271 -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
64.1272 -+ _M_name_messages(_S_get_c_name())
64.1273 -+ { }
64.1274 -+
64.1275 -+ template<typename _CharT>
64.1276 -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
64.1277 -+ size_t __refs)
64.1278 -+ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
64.1279 -+ _M_name_messages(__s)
64.1280 -+ {
64.1281 -+ char* __tmp = new char[std::strlen(__s) + 1];
64.1282 -+ std::strcpy(__tmp, __s);
64.1283 -+ _M_name_messages = __tmp;
64.1284 -+ }
64.1285 -+
64.1286 -+ template<typename _CharT>
64.1287 -+ typename messages<_CharT>::catalog
64.1288 -+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
64.1289 -+ const char* __dir) const
64.1290 -+ {
64.1291 -+ __bindtextdomain(__s.c_str(), __dir);
64.1292 -+ return this->do_open(__s, __loc);
64.1293 -+ }
64.1294 -+
64.1295 -+ // Virtual member functions.
64.1296 -+ template<typename _CharT>
64.1297 -+ messages<_CharT>::~messages()
64.1298 -+ {
64.1299 -+ if (_M_name_messages != _S_get_c_name())
64.1300 -+ delete [] _M_name_messages;
64.1301 -+ _S_destroy_c_locale(_M_c_locale_messages);
64.1302 -+ }
64.1303 -+
64.1304 -+ template<typename _CharT>
64.1305 -+ typename messages<_CharT>::catalog
64.1306 -+ messages<_CharT>::do_open(const basic_string<char>& __s,
64.1307 -+ const locale&) const
64.1308 -+ {
64.1309 -+ // No error checking is done, assume the catalog exists and can
64.1310 -+ // be used.
64.1311 -+ __textdomain(__s.c_str());
64.1312 -+ return 0;
64.1313 -+ }
64.1314 -+
64.1315 -+ template<typename _CharT>
64.1316 -+ void
64.1317 -+ messages<_CharT>::do_close(catalog) const
64.1318 -+ { }
64.1319 -+
64.1320 -+ // messages_byname
64.1321 -+ template<typename _CharT>
64.1322 -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
64.1323 -+ : messages<_CharT>(__refs)
64.1324 -+ {
64.1325 -+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
64.1326 -+ delete [] this->_M_name_messages;
64.1327 -+ char* __tmp = new char[std::strlen(__s) + 1];
64.1328 -+ std::strcpy(__tmp, __s);
64.1329 -+ this->_M_name_messages = __tmp;
64.1330 -+
64.1331 -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
64.1332 -+ {
64.1333 -+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
64.1334 -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
64.1335 -+ }
64.1336 -+ }
64.1337 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
64.1338 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/monetary_members.cc 1969-12-31 18:00:00.000000000 -0600
64.1339 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2005-04-28 01:23:02.000000000 -0500
64.1340 -@@ -0,0 +1,692 @@
64.1341 -+// std::moneypunct implementation details, GNU version -*- C++ -*-
64.1342 -+
64.1343 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.1344 -+//
64.1345 -+// This file is part of the GNU ISO C++ Library. This library is free
64.1346 -+// software; you can redistribute it and/or modify it under the
64.1347 -+// terms of the GNU General Public License as published by the
64.1348 -+// Free Software Foundation; either version 2, or (at your option)
64.1349 -+// any later version.
64.1350 -+
64.1351 -+// This library is distributed in the hope that it will be useful,
64.1352 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.1353 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.1354 -+// GNU General Public License for more details.
64.1355 -+
64.1356 -+// You should have received a copy of the GNU General Public License along
64.1357 -+// with this library; see the file COPYING. If not, write to the Free
64.1358 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.1359 -+// USA.
64.1360 -+
64.1361 -+// As a special exception, you may use this file as part of a free software
64.1362 -+// library without restriction. Specifically, if other files instantiate
64.1363 -+// templates or use macros or inline functions from this file, or you compile
64.1364 -+// this file and link it with other files to produce an executable, this
64.1365 -+// file does not by itself cause the resulting executable to be covered by
64.1366 -+// the GNU General Public License. This exception does not however
64.1367 -+// invalidate any other reasons why the executable file might be covered by
64.1368 -+// the GNU General Public License.
64.1369 -+
64.1370 -+//
64.1371 -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
64.1372 -+//
64.1373 -+
64.1374 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.1375 -+
64.1376 -+#define _LIBC
64.1377 -+#include <locale>
64.1378 -+#undef _LIBC
64.1379 -+#include <bits/c++locale_internal.h>
64.1380 -+
64.1381 -+#ifdef __UCLIBC_MJN3_ONLY__
64.1382 -+#warning optimize this for uclibc
64.1383 -+#warning tailor for stub locale support
64.1384 -+#endif
64.1385 -+
64.1386 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.1387 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
64.1388 -+#endif
64.1389 -+
64.1390 -+namespace std
64.1391 -+{
64.1392 -+ // Construct and return valid pattern consisting of some combination of:
64.1393 -+ // space none symbol sign value
64.1394 -+ money_base::pattern
64.1395 -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
64.1396 -+ {
64.1397 -+ pattern __ret;
64.1398 -+
64.1399 -+ // This insanely complicated routine attempts to construct a valid
64.1400 -+ // pattern for use with monyepunct. A couple of invariants:
64.1401 -+
64.1402 -+ // if (__precedes) symbol -> value
64.1403 -+ // else value -> symbol
64.1404 -+
64.1405 -+ // if (__space) space
64.1406 -+ // else none
64.1407 -+
64.1408 -+ // none == never first
64.1409 -+ // space never first or last
64.1410 -+
64.1411 -+ // Any elegant implementations of this are welcome.
64.1412 -+ switch (__posn)
64.1413 -+ {
64.1414 -+ case 0:
64.1415 -+ case 1:
64.1416 -+ // 1 The sign precedes the value and symbol.
64.1417 -+ __ret.field[0] = sign;
64.1418 -+ if (__space)
64.1419 -+ {
64.1420 -+ // Pattern starts with sign.
64.1421 -+ if (__precedes)
64.1422 -+ {
64.1423 -+ __ret.field[1] = symbol;
64.1424 -+ __ret.field[3] = value;
64.1425 -+ }
64.1426 -+ else
64.1427 -+ {
64.1428 -+ __ret.field[1] = value;
64.1429 -+ __ret.field[3] = symbol;
64.1430 -+ }
64.1431 -+ __ret.field[2] = space;
64.1432 -+ }
64.1433 -+ else
64.1434 -+ {
64.1435 -+ // Pattern starts with sign and ends with none.
64.1436 -+ if (__precedes)
64.1437 -+ {
64.1438 -+ __ret.field[1] = symbol;
64.1439 -+ __ret.field[2] = value;
64.1440 -+ }
64.1441 -+ else
64.1442 -+ {
64.1443 -+ __ret.field[1] = value;
64.1444 -+ __ret.field[2] = symbol;
64.1445 -+ }
64.1446 -+ __ret.field[3] = none;
64.1447 -+ }
64.1448 -+ break;
64.1449 -+ case 2:
64.1450 -+ // 2 The sign follows the value and symbol.
64.1451 -+ if (__space)
64.1452 -+ {
64.1453 -+ // Pattern either ends with sign.
64.1454 -+ if (__precedes)
64.1455 -+ {
64.1456 -+ __ret.field[0] = symbol;
64.1457 -+ __ret.field[2] = value;
64.1458 -+ }
64.1459 -+ else
64.1460 -+ {
64.1461 -+ __ret.field[0] = value;
64.1462 -+ __ret.field[2] = symbol;
64.1463 -+ }
64.1464 -+ __ret.field[1] = space;
64.1465 -+ __ret.field[3] = sign;
64.1466 -+ }
64.1467 -+ else
64.1468 -+ {
64.1469 -+ // Pattern ends with sign then none.
64.1470 -+ if (__precedes)
64.1471 -+ {
64.1472 -+ __ret.field[0] = symbol;
64.1473 -+ __ret.field[1] = value;
64.1474 -+ }
64.1475 -+ else
64.1476 -+ {
64.1477 -+ __ret.field[0] = value;
64.1478 -+ __ret.field[1] = symbol;
64.1479 -+ }
64.1480 -+ __ret.field[2] = sign;
64.1481 -+ __ret.field[3] = none;
64.1482 -+ }
64.1483 -+ break;
64.1484 -+ case 3:
64.1485 -+ // 3 The sign immediately precedes the symbol.
64.1486 -+ if (__precedes)
64.1487 -+ {
64.1488 -+ __ret.field[0] = sign;
64.1489 -+ __ret.field[1] = symbol;
64.1490 -+ if (__space)
64.1491 -+ {
64.1492 -+ __ret.field[2] = space;
64.1493 -+ __ret.field[3] = value;
64.1494 -+ }
64.1495 -+ else
64.1496 -+ {
64.1497 -+ __ret.field[2] = value;
64.1498 -+ __ret.field[3] = none;
64.1499 -+ }
64.1500 -+ }
64.1501 -+ else
64.1502 -+ {
64.1503 -+ __ret.field[0] = value;
64.1504 -+ if (__space)
64.1505 -+ {
64.1506 -+ __ret.field[1] = space;
64.1507 -+ __ret.field[2] = sign;
64.1508 -+ __ret.field[3] = symbol;
64.1509 -+ }
64.1510 -+ else
64.1511 -+ {
64.1512 -+ __ret.field[1] = sign;
64.1513 -+ __ret.field[2] = symbol;
64.1514 -+ __ret.field[3] = none;
64.1515 -+ }
64.1516 -+ }
64.1517 -+ break;
64.1518 -+ case 4:
64.1519 -+ // 4 The sign immediately follows the symbol.
64.1520 -+ if (__precedes)
64.1521 -+ {
64.1522 -+ __ret.field[0] = symbol;
64.1523 -+ __ret.field[1] = sign;
64.1524 -+ if (__space)
64.1525 -+ {
64.1526 -+ __ret.field[2] = space;
64.1527 -+ __ret.field[3] = value;
64.1528 -+ }
64.1529 -+ else
64.1530 -+ {
64.1531 -+ __ret.field[2] = value;
64.1532 -+ __ret.field[3] = none;
64.1533 -+ }
64.1534 -+ }
64.1535 -+ else
64.1536 -+ {
64.1537 -+ __ret.field[0] = value;
64.1538 -+ if (__space)
64.1539 -+ {
64.1540 -+ __ret.field[1] = space;
64.1541 -+ __ret.field[2] = symbol;
64.1542 -+ __ret.field[3] = sign;
64.1543 -+ }
64.1544 -+ else
64.1545 -+ {
64.1546 -+ __ret.field[1] = symbol;
64.1547 -+ __ret.field[2] = sign;
64.1548 -+ __ret.field[3] = none;
64.1549 -+ }
64.1550 -+ }
64.1551 -+ break;
64.1552 -+ default:
64.1553 -+ __ret = pattern();
64.1554 -+ }
64.1555 -+ return __ret;
64.1556 -+ }
64.1557 -+
64.1558 -+ template<>
64.1559 -+ void
64.1560 -+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
64.1561 -+ const char*)
64.1562 -+ {
64.1563 -+ if (!_M_data)
64.1564 -+ _M_data = new __moneypunct_cache<char, true>;
64.1565 -+
64.1566 -+ if (!__cloc)
64.1567 -+ {
64.1568 -+ // "C" locale
64.1569 -+ _M_data->_M_decimal_point = '.';
64.1570 -+ _M_data->_M_thousands_sep = ',';
64.1571 -+ _M_data->_M_grouping = "";
64.1572 -+ _M_data->_M_grouping_size = 0;
64.1573 -+ _M_data->_M_curr_symbol = "";
64.1574 -+ _M_data->_M_curr_symbol_size = 0;
64.1575 -+ _M_data->_M_positive_sign = "";
64.1576 -+ _M_data->_M_positive_sign_size = 0;
64.1577 -+ _M_data->_M_negative_sign = "";
64.1578 -+ _M_data->_M_negative_sign_size = 0;
64.1579 -+ _M_data->_M_frac_digits = 0;
64.1580 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
64.1581 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
64.1582 -+
64.1583 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
64.1584 -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
64.1585 -+ }
64.1586 -+ else
64.1587 -+ {
64.1588 -+ // Named locale.
64.1589 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
64.1590 -+ __cloc));
64.1591 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
64.1592 -+ __cloc));
64.1593 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
64.1594 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.1595 -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
64.1596 -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
64.1597 -+
64.1598 -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
64.1599 -+ if (!__nposn)
64.1600 -+ _M_data->_M_negative_sign = "()";
64.1601 -+ else
64.1602 -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
64.1603 -+ __cloc);
64.1604 -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
64.1605 -+
64.1606 -+ // _Intl == true
64.1607 -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
64.1608 -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
64.1609 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
64.1610 -+ __cloc));
64.1611 -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
64.1612 -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
64.1613 -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
64.1614 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
64.1615 -+ __pposn);
64.1616 -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
64.1617 -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
64.1618 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
64.1619 -+ __nposn);
64.1620 -+ }
64.1621 -+ }
64.1622 -+
64.1623 -+ template<>
64.1624 -+ void
64.1625 -+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
64.1626 -+ const char*)
64.1627 -+ {
64.1628 -+ if (!_M_data)
64.1629 -+ _M_data = new __moneypunct_cache<char, false>;
64.1630 -+
64.1631 -+ if (!__cloc)
64.1632 -+ {
64.1633 -+ // "C" locale
64.1634 -+ _M_data->_M_decimal_point = '.';
64.1635 -+ _M_data->_M_thousands_sep = ',';
64.1636 -+ _M_data->_M_grouping = "";
64.1637 -+ _M_data->_M_grouping_size = 0;
64.1638 -+ _M_data->_M_curr_symbol = "";
64.1639 -+ _M_data->_M_curr_symbol_size = 0;
64.1640 -+ _M_data->_M_positive_sign = "";
64.1641 -+ _M_data->_M_positive_sign_size = 0;
64.1642 -+ _M_data->_M_negative_sign = "";
64.1643 -+ _M_data->_M_negative_sign_size = 0;
64.1644 -+ _M_data->_M_frac_digits = 0;
64.1645 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
64.1646 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
64.1647 -+
64.1648 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
64.1649 -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
64.1650 -+ }
64.1651 -+ else
64.1652 -+ {
64.1653 -+ // Named locale.
64.1654 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
64.1655 -+ __cloc));
64.1656 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
64.1657 -+ __cloc));
64.1658 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
64.1659 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.1660 -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
64.1661 -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
64.1662 -+
64.1663 -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
64.1664 -+ if (!__nposn)
64.1665 -+ _M_data->_M_negative_sign = "()";
64.1666 -+ else
64.1667 -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
64.1668 -+ __cloc);
64.1669 -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
64.1670 -+
64.1671 -+ // _Intl == false
64.1672 -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
64.1673 -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
64.1674 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
64.1675 -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
64.1676 -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
64.1677 -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
64.1678 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
64.1679 -+ __pposn);
64.1680 -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
64.1681 -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
64.1682 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
64.1683 -+ __nposn);
64.1684 -+ }
64.1685 -+ }
64.1686 -+
64.1687 -+ template<>
64.1688 -+ moneypunct<char, true>::~moneypunct()
64.1689 -+ { delete _M_data; }
64.1690 -+
64.1691 -+ template<>
64.1692 -+ moneypunct<char, false>::~moneypunct()
64.1693 -+ { delete _M_data; }
64.1694 -+
64.1695 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.1696 -+ template<>
64.1697 -+ void
64.1698 -+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
64.1699 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1700 -+ const char*)
64.1701 -+#else
64.1702 -+ const char* __name)
64.1703 -+#endif
64.1704 -+ {
64.1705 -+ if (!_M_data)
64.1706 -+ _M_data = new __moneypunct_cache<wchar_t, true>;
64.1707 -+
64.1708 -+ if (!__cloc)
64.1709 -+ {
64.1710 -+ // "C" locale
64.1711 -+ _M_data->_M_decimal_point = L'.';
64.1712 -+ _M_data->_M_thousands_sep = L',';
64.1713 -+ _M_data->_M_grouping = "";
64.1714 -+ _M_data->_M_grouping_size = 0;
64.1715 -+ _M_data->_M_curr_symbol = L"";
64.1716 -+ _M_data->_M_curr_symbol_size = 0;
64.1717 -+ _M_data->_M_positive_sign = L"";
64.1718 -+ _M_data->_M_positive_sign_size = 0;
64.1719 -+ _M_data->_M_negative_sign = L"";
64.1720 -+ _M_data->_M_negative_sign_size = 0;
64.1721 -+ _M_data->_M_frac_digits = 0;
64.1722 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
64.1723 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
64.1724 -+
64.1725 -+ // Use ctype::widen code without the facet...
64.1726 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
64.1727 -+ _M_data->_M_atoms[__i] =
64.1728 -+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
64.1729 -+ }
64.1730 -+ else
64.1731 -+ {
64.1732 -+ // Named locale.
64.1733 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1734 -+ __c_locale __old = __uselocale(__cloc);
64.1735 -+#else
64.1736 -+ // Switch to named locale so that mbsrtowcs will work.
64.1737 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.1738 -+ setlocale(LC_ALL, __name);
64.1739 -+#endif
64.1740 -+
64.1741 -+#ifdef __UCLIBC_MJN3_ONLY__
64.1742 -+#warning fix this... should be monetary
64.1743 -+#endif
64.1744 -+#ifdef __UCLIBC__
64.1745 -+# ifdef __UCLIBC_HAS_XLOCALE__
64.1746 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
64.1747 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
64.1748 -+# else
64.1749 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
64.1750 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
64.1751 -+# endif
64.1752 -+#else
64.1753 -+ union { char *__s; wchar_t __w; } __u;
64.1754 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
64.1755 -+ _M_data->_M_decimal_point = __u.__w;
64.1756 -+
64.1757 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
64.1758 -+ _M_data->_M_thousands_sep = __u.__w;
64.1759 -+#endif
64.1760 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
64.1761 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.1762 -+
64.1763 -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
64.1764 -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
64.1765 -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
64.1766 -+
64.1767 -+ wchar_t* __wcs_ps = 0;
64.1768 -+ wchar_t* __wcs_ns = 0;
64.1769 -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
64.1770 -+ try
64.1771 -+ {
64.1772 -+ mbstate_t __state;
64.1773 -+ size_t __len = strlen(__cpossign);
64.1774 -+ if (__len)
64.1775 -+ {
64.1776 -+ ++__len;
64.1777 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1778 -+ __wcs_ps = new wchar_t[__len];
64.1779 -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
64.1780 -+ _M_data->_M_positive_sign = __wcs_ps;
64.1781 -+ }
64.1782 -+ else
64.1783 -+ _M_data->_M_positive_sign = L"";
64.1784 -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
64.1785 -+
64.1786 -+ __len = strlen(__cnegsign);
64.1787 -+ if (!__nposn)
64.1788 -+ _M_data->_M_negative_sign = L"()";
64.1789 -+ else if (__len)
64.1790 -+ {
64.1791 -+ ++__len;
64.1792 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1793 -+ __wcs_ns = new wchar_t[__len];
64.1794 -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
64.1795 -+ _M_data->_M_negative_sign = __wcs_ns;
64.1796 -+ }
64.1797 -+ else
64.1798 -+ _M_data->_M_negative_sign = L"";
64.1799 -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
64.1800 -+
64.1801 -+ // _Intl == true.
64.1802 -+ __len = strlen(__ccurr);
64.1803 -+ if (__len)
64.1804 -+ {
64.1805 -+ ++__len;
64.1806 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1807 -+ wchar_t* __wcs = new wchar_t[__len];
64.1808 -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
64.1809 -+ _M_data->_M_curr_symbol = __wcs;
64.1810 -+ }
64.1811 -+ else
64.1812 -+ _M_data->_M_curr_symbol = L"";
64.1813 -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
64.1814 -+ }
64.1815 -+ catch (...)
64.1816 -+ {
64.1817 -+ delete _M_data;
64.1818 -+ _M_data = 0;
64.1819 -+ delete __wcs_ps;
64.1820 -+ delete __wcs_ns;
64.1821 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1822 -+ __uselocale(__old);
64.1823 -+#else
64.1824 -+ setlocale(LC_ALL, __old);
64.1825 -+ free(__old);
64.1826 -+#endif
64.1827 -+ __throw_exception_again;
64.1828 -+ }
64.1829 -+
64.1830 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
64.1831 -+ __cloc));
64.1832 -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
64.1833 -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
64.1834 -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
64.1835 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
64.1836 -+ __pposn);
64.1837 -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
64.1838 -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
64.1839 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
64.1840 -+ __nposn);
64.1841 -+
64.1842 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1843 -+ __uselocale(__old);
64.1844 -+#else
64.1845 -+ setlocale(LC_ALL, __old);
64.1846 -+ free(__old);
64.1847 -+#endif
64.1848 -+ }
64.1849 -+ }
64.1850 -+
64.1851 -+ template<>
64.1852 -+ void
64.1853 -+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
64.1854 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1855 -+ const char*)
64.1856 -+#else
64.1857 -+ const char* __name)
64.1858 -+#endif
64.1859 -+ {
64.1860 -+ if (!_M_data)
64.1861 -+ _M_data = new __moneypunct_cache<wchar_t, false>;
64.1862 -+
64.1863 -+ if (!__cloc)
64.1864 -+ {
64.1865 -+ // "C" locale
64.1866 -+ _M_data->_M_decimal_point = L'.';
64.1867 -+ _M_data->_M_thousands_sep = L',';
64.1868 -+ _M_data->_M_grouping = "";
64.1869 -+ _M_data->_M_grouping_size = 0;
64.1870 -+ _M_data->_M_curr_symbol = L"";
64.1871 -+ _M_data->_M_curr_symbol_size = 0;
64.1872 -+ _M_data->_M_positive_sign = L"";
64.1873 -+ _M_data->_M_positive_sign_size = 0;
64.1874 -+ _M_data->_M_negative_sign = L"";
64.1875 -+ _M_data->_M_negative_sign_size = 0;
64.1876 -+ _M_data->_M_frac_digits = 0;
64.1877 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
64.1878 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
64.1879 -+
64.1880 -+ // Use ctype::widen code without the facet...
64.1881 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
64.1882 -+ _M_data->_M_atoms[__i] =
64.1883 -+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
64.1884 -+ }
64.1885 -+ else
64.1886 -+ {
64.1887 -+ // Named locale.
64.1888 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1889 -+ __c_locale __old = __uselocale(__cloc);
64.1890 -+#else
64.1891 -+ // Switch to named locale so that mbsrtowcs will work.
64.1892 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.1893 -+ setlocale(LC_ALL, __name);
64.1894 -+#endif
64.1895 -+
64.1896 -+#ifdef __UCLIBC_MJN3_ONLY__
64.1897 -+#warning fix this... should be monetary
64.1898 -+#endif
64.1899 -+#ifdef __UCLIBC__
64.1900 -+# ifdef __UCLIBC_HAS_XLOCALE__
64.1901 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
64.1902 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
64.1903 -+# else
64.1904 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
64.1905 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
64.1906 -+# endif
64.1907 -+#else
64.1908 -+ union { char *__s; wchar_t __w; } __u;
64.1909 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
64.1910 -+ _M_data->_M_decimal_point = __u.__w;
64.1911 -+
64.1912 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
64.1913 -+ _M_data->_M_thousands_sep = __u.__w;
64.1914 -+#endif
64.1915 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
64.1916 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.1917 -+
64.1918 -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
64.1919 -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
64.1920 -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
64.1921 -+
64.1922 -+ wchar_t* __wcs_ps = 0;
64.1923 -+ wchar_t* __wcs_ns = 0;
64.1924 -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
64.1925 -+ try
64.1926 -+ {
64.1927 -+ mbstate_t __state;
64.1928 -+ size_t __len;
64.1929 -+ __len = strlen(__cpossign);
64.1930 -+ if (__len)
64.1931 -+ {
64.1932 -+ ++__len;
64.1933 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1934 -+ __wcs_ps = new wchar_t[__len];
64.1935 -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
64.1936 -+ _M_data->_M_positive_sign = __wcs_ps;
64.1937 -+ }
64.1938 -+ else
64.1939 -+ _M_data->_M_positive_sign = L"";
64.1940 -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
64.1941 -+
64.1942 -+ __len = strlen(__cnegsign);
64.1943 -+ if (!__nposn)
64.1944 -+ _M_data->_M_negative_sign = L"()";
64.1945 -+ else if (__len)
64.1946 -+ {
64.1947 -+ ++__len;
64.1948 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1949 -+ __wcs_ns = new wchar_t[__len];
64.1950 -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
64.1951 -+ _M_data->_M_negative_sign = __wcs_ns;
64.1952 -+ }
64.1953 -+ else
64.1954 -+ _M_data->_M_negative_sign = L"";
64.1955 -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
64.1956 -+
64.1957 -+ // _Intl == true.
64.1958 -+ __len = strlen(__ccurr);
64.1959 -+ if (__len)
64.1960 -+ {
64.1961 -+ ++__len;
64.1962 -+ memset(&__state, 0, sizeof(mbstate_t));
64.1963 -+ wchar_t* __wcs = new wchar_t[__len];
64.1964 -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
64.1965 -+ _M_data->_M_curr_symbol = __wcs;
64.1966 -+ }
64.1967 -+ else
64.1968 -+ _M_data->_M_curr_symbol = L"";
64.1969 -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
64.1970 -+ }
64.1971 -+ catch (...)
64.1972 -+ {
64.1973 -+ delete _M_data;
64.1974 -+ _M_data = 0;
64.1975 -+ delete __wcs_ps;
64.1976 -+ delete __wcs_ns;
64.1977 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1978 -+ __uselocale(__old);
64.1979 -+#else
64.1980 -+ setlocale(LC_ALL, __old);
64.1981 -+ free(__old);
64.1982 -+#endif
64.1983 -+ __throw_exception_again;
64.1984 -+ }
64.1985 -+
64.1986 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
64.1987 -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
64.1988 -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
64.1989 -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
64.1990 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
64.1991 -+ __pposn);
64.1992 -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
64.1993 -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
64.1994 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
64.1995 -+ __nposn);
64.1996 -+
64.1997 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.1998 -+ __uselocale(__old);
64.1999 -+#else
64.2000 -+ setlocale(LC_ALL, __old);
64.2001 -+ free(__old);
64.2002 -+#endif
64.2003 -+ }
64.2004 -+ }
64.2005 -+
64.2006 -+ template<>
64.2007 -+ moneypunct<wchar_t, true>::~moneypunct()
64.2008 -+ {
64.2009 -+ if (_M_data->_M_positive_sign_size)
64.2010 -+ delete [] _M_data->_M_positive_sign;
64.2011 -+ if (_M_data->_M_negative_sign_size
64.2012 -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
64.2013 -+ delete [] _M_data->_M_negative_sign;
64.2014 -+ if (_M_data->_M_curr_symbol_size)
64.2015 -+ delete [] _M_data->_M_curr_symbol;
64.2016 -+ delete _M_data;
64.2017 -+ }
64.2018 -+
64.2019 -+ template<>
64.2020 -+ moneypunct<wchar_t, false>::~moneypunct()
64.2021 -+ {
64.2022 -+ if (_M_data->_M_positive_sign_size)
64.2023 -+ delete [] _M_data->_M_positive_sign;
64.2024 -+ if (_M_data->_M_negative_sign_size
64.2025 -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
64.2026 -+ delete [] _M_data->_M_negative_sign;
64.2027 -+ if (_M_data->_M_curr_symbol_size)
64.2028 -+ delete [] _M_data->_M_curr_symbol;
64.2029 -+ delete _M_data;
64.2030 -+ }
64.2031 -+#endif
64.2032 -+}
64.2033 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
64.2034 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/numeric_members.cc 1969-12-31 18:00:00.000000000 -0600
64.2035 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2005-04-28 01:20:20.000000000 -0500
64.2036 -@@ -0,0 +1,173 @@
64.2037 -+// std::numpunct implementation details, GNU version -*- C++ -*-
64.2038 -+
64.2039 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.2040 -+//
64.2041 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2042 -+// software; you can redistribute it and/or modify it under the
64.2043 -+// terms of the GNU General Public License as published by the
64.2044 -+// Free Software Foundation; either version 2, or (at your option)
64.2045 -+// any later version.
64.2046 -+
64.2047 -+// This library is distributed in the hope that it will be useful,
64.2048 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2049 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2050 -+// GNU General Public License for more details.
64.2051 -+
64.2052 -+// You should have received a copy of the GNU General Public License along
64.2053 -+// with this library; see the file COPYING. If not, write to the Free
64.2054 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2055 -+// USA.
64.2056 -+
64.2057 -+// As a special exception, you may use this file as part of a free software
64.2058 -+// library without restriction. Specifically, if other files instantiate
64.2059 -+// templates or use macros or inline functions from this file, or you compile
64.2060 -+// this file and link it with other files to produce an executable, this
64.2061 -+// file does not by itself cause the resulting executable to be covered by
64.2062 -+// the GNU General Public License. This exception does not however
64.2063 -+// invalidate any other reasons why the executable file might be covered by
64.2064 -+// the GNU General Public License.
64.2065 -+
64.2066 -+//
64.2067 -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
64.2068 -+//
64.2069 -+
64.2070 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.2071 -+
64.2072 -+#define _LIBC
64.2073 -+#include <locale>
64.2074 -+#undef _LIBC
64.2075 -+#include <bits/c++locale_internal.h>
64.2076 -+
64.2077 -+#ifdef __UCLIBC_MJN3_ONLY__
64.2078 -+#warning tailor for stub locale support
64.2079 -+#endif
64.2080 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.2081 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
64.2082 -+#endif
64.2083 -+
64.2084 -+namespace std
64.2085 -+{
64.2086 -+ template<>
64.2087 -+ void
64.2088 -+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
64.2089 -+ {
64.2090 -+ if (!_M_data)
64.2091 -+ _M_data = new __numpunct_cache<char>;
64.2092 -+
64.2093 -+ if (!__cloc)
64.2094 -+ {
64.2095 -+ // "C" locale
64.2096 -+ _M_data->_M_grouping = "";
64.2097 -+ _M_data->_M_grouping_size = 0;
64.2098 -+ _M_data->_M_use_grouping = false;
64.2099 -+
64.2100 -+ _M_data->_M_decimal_point = '.';
64.2101 -+ _M_data->_M_thousands_sep = ',';
64.2102 -+
64.2103 -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
64.2104 -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
64.2105 -+
64.2106 -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
64.2107 -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
64.2108 -+ }
64.2109 -+ else
64.2110 -+ {
64.2111 -+ // Named locale.
64.2112 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
64.2113 -+ __cloc));
64.2114 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
64.2115 -+ __cloc));
64.2116 -+
64.2117 -+ // Check for NULL, which implies no grouping.
64.2118 -+ if (_M_data->_M_thousands_sep == '\0')
64.2119 -+ _M_data->_M_grouping = "";
64.2120 -+ else
64.2121 -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
64.2122 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.2123 -+ }
64.2124 -+
64.2125 -+ // NB: There is no way to extact this info from posix locales.
64.2126 -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
64.2127 -+ _M_data->_M_truename = "true";
64.2128 -+ _M_data->_M_truename_size = 4;
64.2129 -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
64.2130 -+ _M_data->_M_falsename = "false";
64.2131 -+ _M_data->_M_falsename_size = 5;
64.2132 -+ }
64.2133 -+
64.2134 -+ template<>
64.2135 -+ numpunct<char>::~numpunct()
64.2136 -+ { delete _M_data; }
64.2137 -+
64.2138 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.2139 -+ template<>
64.2140 -+ void
64.2141 -+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
64.2142 -+ {
64.2143 -+ if (!_M_data)
64.2144 -+ _M_data = new __numpunct_cache<wchar_t>;
64.2145 -+
64.2146 -+ if (!__cloc)
64.2147 -+ {
64.2148 -+ // "C" locale
64.2149 -+ _M_data->_M_grouping = "";
64.2150 -+ _M_data->_M_grouping_size = 0;
64.2151 -+ _M_data->_M_use_grouping = false;
64.2152 -+
64.2153 -+ _M_data->_M_decimal_point = L'.';
64.2154 -+ _M_data->_M_thousands_sep = L',';
64.2155 -+
64.2156 -+ // Use ctype::widen code without the facet...
64.2157 -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
64.2158 -+ _M_data->_M_atoms_out[__i] =
64.2159 -+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
64.2160 -+
64.2161 -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
64.2162 -+ _M_data->_M_atoms_in[__j] =
64.2163 -+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
64.2164 -+ }
64.2165 -+ else
64.2166 -+ {
64.2167 -+ // Named locale.
64.2168 -+ // NB: In the GNU model wchar_t is always 32 bit wide.
64.2169 -+#ifdef __UCLIBC_MJN3_ONLY__
64.2170 -+#warning fix this
64.2171 -+#endif
64.2172 -+#ifdef __UCLIBC__
64.2173 -+# ifdef __UCLIBC_HAS_XLOCALE__
64.2174 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
64.2175 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
64.2176 -+# else
64.2177 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
64.2178 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
64.2179 -+# endif
64.2180 -+#else
64.2181 -+ union { char *__s; wchar_t __w; } __u;
64.2182 -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
64.2183 -+ _M_data->_M_decimal_point = __u.__w;
64.2184 -+
64.2185 -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
64.2186 -+ _M_data->_M_thousands_sep = __u.__w;
64.2187 -+#endif
64.2188 -+
64.2189 -+ if (_M_data->_M_thousands_sep == L'\0')
64.2190 -+ _M_data->_M_grouping = "";
64.2191 -+ else
64.2192 -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
64.2193 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
64.2194 -+ }
64.2195 -+
64.2196 -+ // NB: There is no way to extact this info from posix locales.
64.2197 -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
64.2198 -+ _M_data->_M_truename = L"true";
64.2199 -+ _M_data->_M_truename_size = 4;
64.2200 -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
64.2201 -+ _M_data->_M_falsename = L"false";
64.2202 -+ _M_data->_M_falsename_size = 5;
64.2203 -+ }
64.2204 -+
64.2205 -+ template<>
64.2206 -+ numpunct<wchar_t>::~numpunct()
64.2207 -+ { delete _M_data; }
64.2208 -+ #endif
64.2209 -+}
64.2210 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc
64.2211 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.cc 1969-12-31 18:00:00.000000000 -0600
64.2212 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.cc 2005-04-28 01:13:15.000000000 -0500
64.2213 -@@ -0,0 +1,406 @@
64.2214 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
64.2215 -+
64.2216 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.2217 -+//
64.2218 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2219 -+// software; you can redistribute it and/or modify it under the
64.2220 -+// terms of the GNU General Public License as published by the
64.2221 -+// Free Software Foundation; either version 2, or (at your option)
64.2222 -+// any later version.
64.2223 -+
64.2224 -+// This library is distributed in the hope that it will be useful,
64.2225 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2226 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2227 -+// GNU General Public License for more details.
64.2228 -+
64.2229 -+// You should have received a copy of the GNU General Public License along
64.2230 -+// with this library; see the file COPYING. If not, write to the Free
64.2231 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2232 -+// USA.
64.2233 -+
64.2234 -+// As a special exception, you may use this file as part of a free software
64.2235 -+// library without restriction. Specifically, if other files instantiate
64.2236 -+// templates or use macros or inline functions from this file, or you compile
64.2237 -+// this file and link it with other files to produce an executable, this
64.2238 -+// file does not by itself cause the resulting executable to be covered by
64.2239 -+// the GNU General Public License. This exception does not however
64.2240 -+// invalidate any other reasons why the executable file might be covered by
64.2241 -+// the GNU General Public License.
64.2242 -+
64.2243 -+//
64.2244 -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
64.2245 -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
64.2246 -+//
64.2247 -+
64.2248 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.2249 -+
64.2250 -+#include <locale>
64.2251 -+#include <bits/c++locale_internal.h>
64.2252 -+
64.2253 -+#ifdef __UCLIBC_MJN3_ONLY__
64.2254 -+#warning tailor for stub locale support
64.2255 -+#endif
64.2256 -+#ifndef __UCLIBC_HAS_XLOCALE__
64.2257 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
64.2258 -+#endif
64.2259 -+
64.2260 -+namespace std
64.2261 -+{
64.2262 -+ template<>
64.2263 -+ void
64.2264 -+ __timepunct<char>::
64.2265 -+ _M_put(char* __s, size_t __maxlen, const char* __format,
64.2266 -+ const tm* __tm) const
64.2267 -+ {
64.2268 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.2269 -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
64.2270 -+ _M_c_locale_timepunct);
64.2271 -+#else
64.2272 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.2273 -+ setlocale(LC_ALL, _M_name_timepunct);
64.2274 -+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
64.2275 -+ setlocale(LC_ALL, __old);
64.2276 -+ free(__old);
64.2277 -+#endif
64.2278 -+ // Make sure __s is null terminated.
64.2279 -+ if (__len == 0)
64.2280 -+ __s[0] = '\0';
64.2281 -+ }
64.2282 -+
64.2283 -+ template<>
64.2284 -+ void
64.2285 -+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
64.2286 -+ {
64.2287 -+ if (!_M_data)
64.2288 -+ _M_data = new __timepunct_cache<char>;
64.2289 -+
64.2290 -+ if (!__cloc)
64.2291 -+ {
64.2292 -+ // "C" locale
64.2293 -+ _M_c_locale_timepunct = _S_get_c_locale();
64.2294 -+
64.2295 -+ _M_data->_M_date_format = "%m/%d/%y";
64.2296 -+ _M_data->_M_date_era_format = "%m/%d/%y";
64.2297 -+ _M_data->_M_time_format = "%H:%M:%S";
64.2298 -+ _M_data->_M_time_era_format = "%H:%M:%S";
64.2299 -+ _M_data->_M_date_time_format = "";
64.2300 -+ _M_data->_M_date_time_era_format = "";
64.2301 -+ _M_data->_M_am = "AM";
64.2302 -+ _M_data->_M_pm = "PM";
64.2303 -+ _M_data->_M_am_pm_format = "";
64.2304 -+
64.2305 -+ // Day names, starting with "C"'s Sunday.
64.2306 -+ _M_data->_M_day1 = "Sunday";
64.2307 -+ _M_data->_M_day2 = "Monday";
64.2308 -+ _M_data->_M_day3 = "Tuesday";
64.2309 -+ _M_data->_M_day4 = "Wednesday";
64.2310 -+ _M_data->_M_day5 = "Thursday";
64.2311 -+ _M_data->_M_day6 = "Friday";
64.2312 -+ _M_data->_M_day7 = "Saturday";
64.2313 -+
64.2314 -+ // Abbreviated day names, starting with "C"'s Sun.
64.2315 -+ _M_data->_M_aday1 = "Sun";
64.2316 -+ _M_data->_M_aday2 = "Mon";
64.2317 -+ _M_data->_M_aday3 = "Tue";
64.2318 -+ _M_data->_M_aday4 = "Wed";
64.2319 -+ _M_data->_M_aday5 = "Thu";
64.2320 -+ _M_data->_M_aday6 = "Fri";
64.2321 -+ _M_data->_M_aday7 = "Sat";
64.2322 -+
64.2323 -+ // Month names, starting with "C"'s January.
64.2324 -+ _M_data->_M_month01 = "January";
64.2325 -+ _M_data->_M_month02 = "February";
64.2326 -+ _M_data->_M_month03 = "March";
64.2327 -+ _M_data->_M_month04 = "April";
64.2328 -+ _M_data->_M_month05 = "May";
64.2329 -+ _M_data->_M_month06 = "June";
64.2330 -+ _M_data->_M_month07 = "July";
64.2331 -+ _M_data->_M_month08 = "August";
64.2332 -+ _M_data->_M_month09 = "September";
64.2333 -+ _M_data->_M_month10 = "October";
64.2334 -+ _M_data->_M_month11 = "November";
64.2335 -+ _M_data->_M_month12 = "December";
64.2336 -+
64.2337 -+ // Abbreviated month names, starting with "C"'s Jan.
64.2338 -+ _M_data->_M_amonth01 = "Jan";
64.2339 -+ _M_data->_M_amonth02 = "Feb";
64.2340 -+ _M_data->_M_amonth03 = "Mar";
64.2341 -+ _M_data->_M_amonth04 = "Apr";
64.2342 -+ _M_data->_M_amonth05 = "May";
64.2343 -+ _M_data->_M_amonth06 = "Jun";
64.2344 -+ _M_data->_M_amonth07 = "Jul";
64.2345 -+ _M_data->_M_amonth08 = "Aug";
64.2346 -+ _M_data->_M_amonth09 = "Sep";
64.2347 -+ _M_data->_M_amonth10 = "Oct";
64.2348 -+ _M_data->_M_amonth11 = "Nov";
64.2349 -+ _M_data->_M_amonth12 = "Dec";
64.2350 -+ }
64.2351 -+ else
64.2352 -+ {
64.2353 -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
64.2354 -+
64.2355 -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
64.2356 -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
64.2357 -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
64.2358 -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
64.2359 -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
64.2360 -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
64.2361 -+ __cloc);
64.2362 -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
64.2363 -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
64.2364 -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
64.2365 -+
64.2366 -+ // Day names, starting with "C"'s Sunday.
64.2367 -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
64.2368 -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
64.2369 -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
64.2370 -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
64.2371 -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
64.2372 -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
64.2373 -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
64.2374 -+
64.2375 -+ // Abbreviated day names, starting with "C"'s Sun.
64.2376 -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
64.2377 -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
64.2378 -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
64.2379 -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
64.2380 -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
64.2381 -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
64.2382 -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
64.2383 -+
64.2384 -+ // Month names, starting with "C"'s January.
64.2385 -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
64.2386 -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
64.2387 -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
64.2388 -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
64.2389 -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
64.2390 -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
64.2391 -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
64.2392 -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
64.2393 -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
64.2394 -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
64.2395 -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
64.2396 -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
64.2397 -+
64.2398 -+ // Abbreviated month names, starting with "C"'s Jan.
64.2399 -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
64.2400 -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
64.2401 -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
64.2402 -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
64.2403 -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
64.2404 -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
64.2405 -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
64.2406 -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
64.2407 -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
64.2408 -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
64.2409 -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
64.2410 -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
64.2411 -+ }
64.2412 -+ }
64.2413 -+
64.2414 -+#ifdef _GLIBCXX_USE_WCHAR_T
64.2415 -+ template<>
64.2416 -+ void
64.2417 -+ __timepunct<wchar_t>::
64.2418 -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
64.2419 -+ const tm* __tm) const
64.2420 -+ {
64.2421 -+#ifdef __UCLIBC_HAS_XLOCALE__
64.2422 -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
64.2423 -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
64.2424 -+ _M_c_locale_timepunct);
64.2425 -+#else
64.2426 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
64.2427 -+ setlocale(LC_ALL, _M_name_timepunct);
64.2428 -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
64.2429 -+ setlocale(LC_ALL, __old);
64.2430 -+ free(__old);
64.2431 -+#endif
64.2432 -+ // Make sure __s is null terminated.
64.2433 -+ if (__len == 0)
64.2434 -+ __s[0] = L'\0';
64.2435 -+ }
64.2436 -+
64.2437 -+ template<>
64.2438 -+ void
64.2439 -+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
64.2440 -+ {
64.2441 -+ if (!_M_data)
64.2442 -+ _M_data = new __timepunct_cache<wchar_t>;
64.2443 -+
64.2444 -+#warning wide time stuff
64.2445 -+// if (!__cloc)
64.2446 -+ {
64.2447 -+ // "C" locale
64.2448 -+ _M_c_locale_timepunct = _S_get_c_locale();
64.2449 -+
64.2450 -+ _M_data->_M_date_format = L"%m/%d/%y";
64.2451 -+ _M_data->_M_date_era_format = L"%m/%d/%y";
64.2452 -+ _M_data->_M_time_format = L"%H:%M:%S";
64.2453 -+ _M_data->_M_time_era_format = L"%H:%M:%S";
64.2454 -+ _M_data->_M_date_time_format = L"";
64.2455 -+ _M_data->_M_date_time_era_format = L"";
64.2456 -+ _M_data->_M_am = L"AM";
64.2457 -+ _M_data->_M_pm = L"PM";
64.2458 -+ _M_data->_M_am_pm_format = L"";
64.2459 -+
64.2460 -+ // Day names, starting with "C"'s Sunday.
64.2461 -+ _M_data->_M_day1 = L"Sunday";
64.2462 -+ _M_data->_M_day2 = L"Monday";
64.2463 -+ _M_data->_M_day3 = L"Tuesday";
64.2464 -+ _M_data->_M_day4 = L"Wednesday";
64.2465 -+ _M_data->_M_day5 = L"Thursday";
64.2466 -+ _M_data->_M_day6 = L"Friday";
64.2467 -+ _M_data->_M_day7 = L"Saturday";
64.2468 -+
64.2469 -+ // Abbreviated day names, starting with "C"'s Sun.
64.2470 -+ _M_data->_M_aday1 = L"Sun";
64.2471 -+ _M_data->_M_aday2 = L"Mon";
64.2472 -+ _M_data->_M_aday3 = L"Tue";
64.2473 -+ _M_data->_M_aday4 = L"Wed";
64.2474 -+ _M_data->_M_aday5 = L"Thu";
64.2475 -+ _M_data->_M_aday6 = L"Fri";
64.2476 -+ _M_data->_M_aday7 = L"Sat";
64.2477 -+
64.2478 -+ // Month names, starting with "C"'s January.
64.2479 -+ _M_data->_M_month01 = L"January";
64.2480 -+ _M_data->_M_month02 = L"February";
64.2481 -+ _M_data->_M_month03 = L"March";
64.2482 -+ _M_data->_M_month04 = L"April";
64.2483 -+ _M_data->_M_month05 = L"May";
64.2484 -+ _M_data->_M_month06 = L"June";
64.2485 -+ _M_data->_M_month07 = L"July";
64.2486 -+ _M_data->_M_month08 = L"August";
64.2487 -+ _M_data->_M_month09 = L"September";
64.2488 -+ _M_data->_M_month10 = L"October";
64.2489 -+ _M_data->_M_month11 = L"November";
64.2490 -+ _M_data->_M_month12 = L"December";
64.2491 -+
64.2492 -+ // Abbreviated month names, starting with "C"'s Jan.
64.2493 -+ _M_data->_M_amonth01 = L"Jan";
64.2494 -+ _M_data->_M_amonth02 = L"Feb";
64.2495 -+ _M_data->_M_amonth03 = L"Mar";
64.2496 -+ _M_data->_M_amonth04 = L"Apr";
64.2497 -+ _M_data->_M_amonth05 = L"May";
64.2498 -+ _M_data->_M_amonth06 = L"Jun";
64.2499 -+ _M_data->_M_amonth07 = L"Jul";
64.2500 -+ _M_data->_M_amonth08 = L"Aug";
64.2501 -+ _M_data->_M_amonth09 = L"Sep";
64.2502 -+ _M_data->_M_amonth10 = L"Oct";
64.2503 -+ _M_data->_M_amonth11 = L"Nov";
64.2504 -+ _M_data->_M_amonth12 = L"Dec";
64.2505 -+ }
64.2506 -+#if 0
64.2507 -+ else
64.2508 -+ {
64.2509 -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
64.2510 -+
64.2511 -+ union { char *__s; wchar_t *__w; } __u;
64.2512 -+
64.2513 -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
64.2514 -+ _M_data->_M_date_format = __u.__w;
64.2515 -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
64.2516 -+ _M_data->_M_date_era_format = __u.__w;
64.2517 -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
64.2518 -+ _M_data->_M_time_format = __u.__w;
64.2519 -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
64.2520 -+ _M_data->_M_time_era_format = __u.__w;
64.2521 -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
64.2522 -+ _M_data->_M_date_time_format = __u.__w;
64.2523 -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
64.2524 -+ _M_data->_M_date_time_era_format = __u.__w;
64.2525 -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
64.2526 -+ _M_data->_M_am = __u.__w;
64.2527 -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
64.2528 -+ _M_data->_M_pm = __u.__w;
64.2529 -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
64.2530 -+ _M_data->_M_am_pm_format = __u.__w;
64.2531 -+
64.2532 -+ // Day names, starting with "C"'s Sunday.
64.2533 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
64.2534 -+ _M_data->_M_day1 = __u.__w;
64.2535 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
64.2536 -+ _M_data->_M_day2 = __u.__w;
64.2537 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
64.2538 -+ _M_data->_M_day3 = __u.__w;
64.2539 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
64.2540 -+ _M_data->_M_day4 = __u.__w;
64.2541 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
64.2542 -+ _M_data->_M_day5 = __u.__w;
64.2543 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
64.2544 -+ _M_data->_M_day6 = __u.__w;
64.2545 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
64.2546 -+ _M_data->_M_day7 = __u.__w;
64.2547 -+
64.2548 -+ // Abbreviated day names, starting with "C"'s Sun.
64.2549 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
64.2550 -+ _M_data->_M_aday1 = __u.__w;
64.2551 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
64.2552 -+ _M_data->_M_aday2 = __u.__w;
64.2553 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
64.2554 -+ _M_data->_M_aday3 = __u.__w;
64.2555 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
64.2556 -+ _M_data->_M_aday4 = __u.__w;
64.2557 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
64.2558 -+ _M_data->_M_aday5 = __u.__w;
64.2559 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
64.2560 -+ _M_data->_M_aday6 = __u.__w;
64.2561 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
64.2562 -+ _M_data->_M_aday7 = __u.__w;
64.2563 -+
64.2564 -+ // Month names, starting with "C"'s January.
64.2565 -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
64.2566 -+ _M_data->_M_month01 = __u.__w;
64.2567 -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
64.2568 -+ _M_data->_M_month02 = __u.__w;
64.2569 -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
64.2570 -+ _M_data->_M_month03 = __u.__w;
64.2571 -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
64.2572 -+ _M_data->_M_month04 = __u.__w;
64.2573 -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
64.2574 -+ _M_data->_M_month05 = __u.__w;
64.2575 -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
64.2576 -+ _M_data->_M_month06 = __u.__w;
64.2577 -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
64.2578 -+ _M_data->_M_month07 = __u.__w;
64.2579 -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
64.2580 -+ _M_data->_M_month08 = __u.__w;
64.2581 -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
64.2582 -+ _M_data->_M_month09 = __u.__w;
64.2583 -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
64.2584 -+ _M_data->_M_month10 = __u.__w;
64.2585 -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
64.2586 -+ _M_data->_M_month11 = __u.__w;
64.2587 -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
64.2588 -+ _M_data->_M_month12 = __u.__w;
64.2589 -+
64.2590 -+ // Abbreviated month names, starting with "C"'s Jan.
64.2591 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
64.2592 -+ _M_data->_M_amonth01 = __u.__w;
64.2593 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
64.2594 -+ _M_data->_M_amonth02 = __u.__w;
64.2595 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
64.2596 -+ _M_data->_M_amonth03 = __u.__w;
64.2597 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
64.2598 -+ _M_data->_M_amonth04 = __u.__w;
64.2599 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
64.2600 -+ _M_data->_M_amonth05 = __u.__w;
64.2601 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
64.2602 -+ _M_data->_M_amonth06 = __u.__w;
64.2603 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
64.2604 -+ _M_data->_M_amonth07 = __u.__w;
64.2605 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
64.2606 -+ _M_data->_M_amonth08 = __u.__w;
64.2607 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
64.2608 -+ _M_data->_M_amonth09 = __u.__w;
64.2609 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
64.2610 -+ _M_data->_M_amonth10 = __u.__w;
64.2611 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
64.2612 -+ _M_data->_M_amonth11 = __u.__w;
64.2613 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
64.2614 -+ _M_data->_M_amonth12 = __u.__w;
64.2615 -+ }
64.2616 -+#endif // 0
64.2617 -+ }
64.2618 -+#endif
64.2619 -+}
64.2620 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h
64.2621 ---- gcc-4.0.0-100/libstdc++-v3/config/locale/uclibc/time_members.h 1969-12-31 18:00:00.000000000 -0600
64.2622 -+++ gcc-4.0.0/libstdc++-v3/config/locale/uclibc/time_members.h 2004-05-22 18:46:31.000000000 -0500
64.2623 -@@ -0,0 +1,68 @@
64.2624 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
64.2625 -+
64.2626 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
64.2627 -+//
64.2628 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2629 -+// software; you can redistribute it and/or modify it under the
64.2630 -+// terms of the GNU General Public License as published by the
64.2631 -+// Free Software Foundation; either version 2, or (at your option)
64.2632 -+// any later version.
64.2633 -+
64.2634 -+// This library is distributed in the hope that it will be useful,
64.2635 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2636 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2637 -+// GNU General Public License for more details.
64.2638 -+
64.2639 -+// You should have received a copy of the GNU General Public License along
64.2640 -+// with this library; see the file COPYING. If not, write to the Free
64.2641 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2642 -+// USA.
64.2643 -+
64.2644 -+// As a special exception, you may use this file as part of a free software
64.2645 -+// library without restriction. Specifically, if other files instantiate
64.2646 -+// templates or use macros or inline functions from this file, or you compile
64.2647 -+// this file and link it with other files to produce an executable, this
64.2648 -+// file does not by itself cause the resulting executable to be covered by
64.2649 -+// the GNU General Public License. This exception does not however
64.2650 -+// invalidate any other reasons why the executable file might be covered by
64.2651 -+// the GNU General Public License.
64.2652 -+
64.2653 -+//
64.2654 -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
64.2655 -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
64.2656 -+//
64.2657 -+
64.2658 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
64.2659 -+
64.2660 -+ template<typename _CharT>
64.2661 -+ __timepunct<_CharT>::__timepunct(size_t __refs)
64.2662 -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
64.2663 -+ _M_name_timepunct(_S_get_c_name())
64.2664 -+ { _M_initialize_timepunct(); }
64.2665 -+
64.2666 -+ template<typename _CharT>
64.2667 -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
64.2668 -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
64.2669 -+ _M_name_timepunct(_S_get_c_name())
64.2670 -+ { _M_initialize_timepunct(); }
64.2671 -+
64.2672 -+ template<typename _CharT>
64.2673 -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
64.2674 -+ size_t __refs)
64.2675 -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
64.2676 -+ _M_name_timepunct(__s)
64.2677 -+ {
64.2678 -+ char* __tmp = new char[std::strlen(__s) + 1];
64.2679 -+ std::strcpy(__tmp, __s);
64.2680 -+ _M_name_timepunct = __tmp;
64.2681 -+ _M_initialize_timepunct(__cloc);
64.2682 -+ }
64.2683 -+
64.2684 -+ template<typename _CharT>
64.2685 -+ __timepunct<_CharT>::~__timepunct()
64.2686 -+ {
64.2687 -+ if (_M_name_timepunct != _S_get_c_name())
64.2688 -+ delete [] _M_name_timepunct;
64.2689 -+ delete _M_data;
64.2690 -+ _S_destroy_c_locale(_M_c_locale_timepunct);
64.2691 -+ }
64.2692 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h
64.2693 ---- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_base.h 1969-12-31 18:00:00.000000000 -0600
64.2694 -+++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_base.h 2005-04-28 01:10:27.000000000 -0500
64.2695 -@@ -0,0 +1,64 @@
64.2696 -+// Locale support -*- C++ -*-
64.2697 -+
64.2698 -+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
64.2699 -+// Free Software Foundation, Inc.
64.2700 -+//
64.2701 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2702 -+// software; you can redistribute it and/or modify it under the
64.2703 -+// terms of the GNU General Public License as published by the
64.2704 -+// Free Software Foundation; either version 2, or (at your option)
64.2705 -+// any later version.
64.2706 -+
64.2707 -+// This library is distributed in the hope that it will be useful,
64.2708 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2709 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2710 -+// GNU General Public License for more details.
64.2711 -+
64.2712 -+// You should have received a copy of the GNU General Public License along
64.2713 -+// with this library; see the file COPYING. If not, write to the Free
64.2714 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2715 -+// USA.
64.2716 -+
64.2717 -+// As a special exception, you may use this file as part of a free software
64.2718 -+// library without restriction. Specifically, if other files instantiate
64.2719 -+// templates or use macros or inline functions from this file, or you compile
64.2720 -+// this file and link it with other files to produce an executable, this
64.2721 -+// file does not by itself cause the resulting executable to be covered by
64.2722 -+// the GNU General Public License. This exception does not however
64.2723 -+// invalidate any other reasons why the executable file might be covered by
64.2724 -+// the GNU General Public License.
64.2725 -+
64.2726 -+//
64.2727 -+// ISO C++ 14882: 22.1 Locales
64.2728 -+//
64.2729 -+
64.2730 -+/** @file ctype_base.h
64.2731 -+ * This is an internal header file, included by other library headers.
64.2732 -+ * You should not attempt to use it directly.
64.2733 -+ */
64.2734 -+
64.2735 -+// Information as gleaned from /usr/include/ctype.h
64.2736 -+
64.2737 -+ /// @brief Base class for ctype.
64.2738 -+ struct ctype_base
64.2739 -+ {
64.2740 -+ // Note: In uClibc, the following two types depend on configuration.
64.2741 -+
64.2742 -+ // Non-standard typedefs.
64.2743 -+ typedef const __ctype_touplow_t* __to_type;
64.2744 -+
64.2745 -+ // NB: Offsets into ctype<char>::_M_table force a particular size
64.2746 -+ // on the mask type. Because of this, we don't use an enum.
64.2747 -+ typedef __ctype_mask_t mask;
64.2748 -+ static const mask upper = _ISupper;
64.2749 -+ static const mask lower = _ISlower;
64.2750 -+ static const mask alpha = _ISalpha;
64.2751 -+ static const mask digit = _ISdigit;
64.2752 -+ static const mask xdigit = _ISxdigit;
64.2753 -+ static const mask space = _ISspace;
64.2754 -+ static const mask print = _ISprint;
64.2755 -+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
64.2756 -+ static const mask cntrl = _IScntrl;
64.2757 -+ static const mask punct = _ISpunct;
64.2758 -+ static const mask alnum = _ISalpha | _ISdigit;
64.2759 -+ };
64.2760 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
64.2761 ---- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_inline.h 1969-12-31 18:00:00.000000000 -0600
64.2762 -+++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_inline.h 2002-06-24 00:49:19.000000000 -0500
64.2763 -@@ -0,0 +1,69 @@
64.2764 -+// Locale support -*- C++ -*-
64.2765 -+
64.2766 -+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
64.2767 -+//
64.2768 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2769 -+// software; you can redistribute it and/or modify it under the
64.2770 -+// terms of the GNU General Public License as published by the
64.2771 -+// Free Software Foundation; either version 2, or (at your option)
64.2772 -+// any later version.
64.2773 -+
64.2774 -+// This library is distributed in the hope that it will be useful,
64.2775 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2776 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2777 -+// GNU General Public License for more details.
64.2778 -+
64.2779 -+// You should have received a copy of the GNU General Public License along
64.2780 -+// with this library; see the file COPYING. If not, write to the Free
64.2781 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2782 -+// USA.
64.2783 -+
64.2784 -+// As a special exception, you may use this file as part of a free software
64.2785 -+// library without restriction. Specifically, if other files instantiate
64.2786 -+// templates or use macros or inline functions from this file, or you compile
64.2787 -+// this file and link it with other files to produce an executable, this
64.2788 -+// file does not by itself cause the resulting executable to be covered by
64.2789 -+// the GNU General Public License. This exception does not however
64.2790 -+// invalidate any other reasons why the executable file might be covered by
64.2791 -+// the GNU General Public License.
64.2792 -+
64.2793 -+//
64.2794 -+// ISO C++ 14882: 22.1 Locales
64.2795 -+//
64.2796 -+
64.2797 -+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
64.2798 -+// functions go in ctype.cc
64.2799 -+
64.2800 -+ bool
64.2801 -+ ctype<char>::
64.2802 -+ is(mask __m, char __c) const
64.2803 -+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
64.2804 -+
64.2805 -+ const char*
64.2806 -+ ctype<char>::
64.2807 -+ is(const char* __low, const char* __high, mask* __vec) const
64.2808 -+ {
64.2809 -+ while (__low < __high)
64.2810 -+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
64.2811 -+ return __high;
64.2812 -+ }
64.2813 -+
64.2814 -+ const char*
64.2815 -+ ctype<char>::
64.2816 -+ scan_is(mask __m, const char* __low, const char* __high) const
64.2817 -+ {
64.2818 -+ while (__low < __high
64.2819 -+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
64.2820 -+ ++__low;
64.2821 -+ return __low;
64.2822 -+ }
64.2823 -+
64.2824 -+ const char*
64.2825 -+ ctype<char>::
64.2826 -+ scan_not(mask __m, const char* __low, const char* __high) const
64.2827 -+ {
64.2828 -+ while (__low < __high
64.2829 -+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
64.2830 -+ ++__low;
64.2831 -+ return __low;
64.2832 -+ }
64.2833 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
64.2834 ---- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/ctype_noninline.h 1969-12-31 18:00:00.000000000 -0600
64.2835 -+++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h 2005-04-28 01:10:27.000000000 -0500
64.2836 -@@ -0,0 +1,92 @@
64.2837 -+// Locale support -*- C++ -*-
64.2838 -+
64.2839 -+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
64.2840 -+// Free Software Foundation, Inc.
64.2841 -+//
64.2842 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2843 -+// software; you can redistribute it and/or modify it under the
64.2844 -+// terms of the GNU General Public License as published by the
64.2845 -+// Free Software Foundation; either version 2, or (at your option)
64.2846 -+// any later version.
64.2847 -+
64.2848 -+// This library is distributed in the hope that it will be useful,
64.2849 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2850 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2851 -+// GNU General Public License for more details.
64.2852 -+
64.2853 -+// You should have received a copy of the GNU General Public License along
64.2854 -+// with this library; see the file COPYING. If not, write to the Free
64.2855 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2856 -+// USA.
64.2857 -+
64.2858 -+// As a special exception, you may use this file as part of a free software
64.2859 -+// library without restriction. Specifically, if other files instantiate
64.2860 -+// templates or use macros or inline functions from this file, or you compile
64.2861 -+// this file and link it with other files to produce an executable, this
64.2862 -+// file does not by itself cause the resulting executable to be covered by
64.2863 -+// the GNU General Public License. This exception does not however
64.2864 -+// invalidate any other reasons why the executable file might be covered by
64.2865 -+// the GNU General Public License.
64.2866 -+
64.2867 -+//
64.2868 -+// ISO C++ 14882: 22.1 Locales
64.2869 -+//
64.2870 -+
64.2871 -+// Information as gleaned from /usr/include/ctype.h
64.2872 -+
64.2873 -+ const ctype_base::mask*
64.2874 -+ ctype<char>::classic_table() throw()
64.2875 -+ { return __C_ctype_b; }
64.2876 -+
64.2877 -+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
64.2878 -+ size_t __refs)
64.2879 -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
64.2880 -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
64.2881 -+ {
64.2882 -+ _M_toupper = __C_ctype_toupper;
64.2883 -+ _M_tolower = __C_ctype_tolower;
64.2884 -+ _M_table = __table ? __table : __C_ctype_b;
64.2885 -+ memset(_M_widen, 0, sizeof(_M_widen));
64.2886 -+ memset(_M_narrow, 0, sizeof(_M_narrow));
64.2887 -+ }
64.2888 -+
64.2889 -+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
64.2890 -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
64.2891 -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
64.2892 -+ {
64.2893 -+ _M_toupper = __C_ctype_toupper;
64.2894 -+ _M_tolower = __C_ctype_tolower;
64.2895 -+ _M_table = __table ? __table : __C_ctype_b;
64.2896 -+ memset(_M_widen, 0, sizeof(_M_widen));
64.2897 -+ memset(_M_narrow, 0, sizeof(_M_narrow));
64.2898 -+ }
64.2899 -+
64.2900 -+ char
64.2901 -+ ctype<char>::do_toupper(char __c) const
64.2902 -+ { return _M_toupper[static_cast<unsigned char>(__c)]; }
64.2903 -+
64.2904 -+ const char*
64.2905 -+ ctype<char>::do_toupper(char* __low, const char* __high) const
64.2906 -+ {
64.2907 -+ while (__low < __high)
64.2908 -+ {
64.2909 -+ *__low = _M_toupper[static_cast<unsigned char>(*__low)];
64.2910 -+ ++__low;
64.2911 -+ }
64.2912 -+ return __high;
64.2913 -+ }
64.2914 -+
64.2915 -+ char
64.2916 -+ ctype<char>::do_tolower(char __c) const
64.2917 -+ { return _M_tolower[static_cast<unsigned char>(__c)]; }
64.2918 -+
64.2919 -+ const char*
64.2920 -+ ctype<char>::do_tolower(char* __low, const char* __high) const
64.2921 -+ {
64.2922 -+ while (__low < __high)
64.2923 -+ {
64.2924 -+ *__low = _M_tolower[static_cast<unsigned char>(*__low)];
64.2925 -+ ++__low;
64.2926 -+ }
64.2927 -+ return __high;
64.2928 -+ }
64.2929 -diff -urN gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h
64.2930 ---- gcc-4.0.0-100/libstdc++-v3/config/os/uclibc/os_defines.h 1969-12-31 18:00:00.000000000 -0600
64.2931 -+++ gcc-4.0.0/libstdc++-v3/config/os/uclibc/os_defines.h 2005-04-28 01:10:27.000000000 -0500
64.2932 -@@ -0,0 +1,44 @@
64.2933 -+// Specific definitions for GNU/Linux -*- C++ -*-
64.2934 -+
64.2935 -+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
64.2936 -+//
64.2937 -+// This file is part of the GNU ISO C++ Library. This library is free
64.2938 -+// software; you can redistribute it and/or modify it under the
64.2939 -+// terms of the GNU General Public License as published by the
64.2940 -+// Free Software Foundation; either version 2, or (at your option)
64.2941 -+// any later version.
64.2942 -+
64.2943 -+// This library is distributed in the hope that it will be useful,
64.2944 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
64.2945 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64.2946 -+// GNU General Public License for more details.
64.2947 -+
64.2948 -+// You should have received a copy of the GNU General Public License along
64.2949 -+// with this library; see the file COPYING. If not, write to the Free
64.2950 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
64.2951 -+// USA.
64.2952 -+
64.2953 -+// As a special exception, you may use this file as part of a free software
64.2954 -+// library without restriction. Specifically, if other files instantiate
64.2955 -+// templates or use macros or inline functions from this file, or you compile
64.2956 -+// this file and link it with other files to produce an executable, this
64.2957 -+// file does not by itself cause the resulting executable to be covered by
64.2958 -+// the GNU General Public License. This exception does not however
64.2959 -+// invalidate any other reasons why the executable file might be covered by
64.2960 -+// the GNU General Public License.
64.2961 -+
64.2962 -+#ifndef _GLIBCXX_OS_DEFINES
64.2963 -+#define _GLIBCXX_OS_DEFINES 1
64.2964 -+
64.2965 -+// System-specific #define, typedefs, corrections, etc, go here. This
64.2966 -+// file will come before all others.
64.2967 -+
64.2968 -+// This keeps isanum, et al from being propagated as macros.
64.2969 -+#define __NO_CTYPE 1
64.2970 -+
64.2971 -+#include <features.h>
64.2972 -+
64.2973 -+// We must not see the optimized string functions GNU libc defines.
64.2974 -+#define __NO_STRING_INLINES
64.2975 -+
64.2976 -+#endif
64.2977 -diff -urN gcc-4.0.0-100/libstdc++-v3/configure gcc-4.0.0/libstdc++-v3/configure
64.2978 ---- gcc-4.0.0-100/libstdc++-v3/configure 2005-04-30 13:06:53.683055232 -0500
64.2979 -+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 12:24:24.000000000 -0500
64.2980 -@@ -3998,6 +3998,11 @@
64.2981 - lt_cv_deplibs_check_method=pass_all
64.2982 - ;;
64.2983 -
64.2984 -+linux-uclibc*)
64.2985 -+ lt_cv_deplibs_check_method=pass_all
64.2986 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
64.2987 -+ ;;
64.2988 -+
64.2989 - netbsd* | knetbsd*-gnu)
64.2990 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
64.2991 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
64.2992 -@@ -5672,7 +5677,7 @@
64.2993 - enableval="$enable_clocale"
64.2994 -
64.2995 - case "$enableval" in
64.2996 -- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
64.2997 -+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
64.2998 - *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
64.2999 - echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
64.3000 - { (exit 1); exit 1; }; } ;;
64.3001 -@@ -5697,6 +5702,9 @@
64.3002 - # Default to "generic".
64.3003 - if test $enable_clocale_flag = auto; then
64.3004 - case ${target_os} in
64.3005 -+ linux-uclibc*)
64.3006 -+ enable_clocale_flag=uclibc
64.3007 -+ ;;
64.3008 - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
64.3009 - cat >conftest.$ac_ext <<_ACEOF
64.3010 - /* confdefs.h. */
64.3011 -@@ -5927,6 +5935,76 @@
64.3012 - CTIME_CC=config/locale/generic/time_members.cc
64.3013 - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
64.3014 - ;;
64.3015 -+ uclibc)
64.3016 -+ echo "$as_me:$LINENO: result: uclibc" >&5
64.3017 -+echo "${ECHO_T}uclibc" >&6
64.3018 -+
64.3019 -+ # Declare intention to use gettext, and add support for specific
64.3020 -+ # languages.
64.3021 -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
64.3022 -+ ALL_LINGUAS="de fr"
64.3023 -+
64.3024 -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
64.3025 -+ # Extract the first word of "msgfmt", so it can be a program name with args.
64.3026 -+set dummy msgfmt; ac_word=$2
64.3027 -+echo "$as_me:$LINENO: checking for $ac_word" >&5
64.3028 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
64.3029 -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
64.3030 -+ echo $ECHO_N "(cached) $ECHO_C" >&6
64.3031 -+else
64.3032 -+ if test -n "$check_msgfmt"; then
64.3033 -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
64.3034 -+else
64.3035 -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64.3036 -+for as_dir in $PATH
64.3037 -+do
64.3038 -+ IFS=$as_save_IFS
64.3039 -+ test -z "$as_dir" && as_dir=.
64.3040 -+ for ac_exec_ext in '' $ac_executable_extensions; do
64.3041 -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64.3042 -+ ac_cv_prog_check_msgfmt="yes"
64.3043 -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
64.3044 -+ break 2
64.3045 -+ fi
64.3046 -+done
64.3047 -+done
64.3048 -+
64.3049 -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
64.3050 -+fi
64.3051 -+fi
64.3052 -+check_msgfmt=$ac_cv_prog_check_msgfmt
64.3053 -+if test -n "$check_msgfmt"; then
64.3054 -+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
64.3055 -+echo "${ECHO_T}$check_msgfmt" >&6
64.3056 -+else
64.3057 -+ echo "$as_me:$LINENO: result: no" >&5
64.3058 -+echo "${ECHO_T}no" >&6
64.3059 -+fi
64.3060 -+
64.3061 -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
64.3062 -+ USE_NLS=yes
64.3063 -+ fi
64.3064 -+ # Export the build objects.
64.3065 -+ for ling in $ALL_LINGUAS; do \
64.3066 -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
64.3067 -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
64.3068 -+ done
64.3069 -+
64.3070 -+
64.3071 -+
64.3072 -+ CLOCALE_H=config/locale/uclibc/c_locale.h
64.3073 -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
64.3074 -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
64.3075 -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
64.3076 -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
64.3077 -+ CMESSAGES_H=config/locale/uclibc/messages_members.h
64.3078 -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
64.3079 -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
64.3080 -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
64.3081 -+ CTIME_H=config/locale/uclibc/time_members.h
64.3082 -+ CTIME_CC=config/locale/uclibc/time_members.cc
64.3083 -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
64.3084 -+ ;;
64.3085 - esac
64.3086 -
64.3087 - # This is where the testsuite looks for locale catalogs, using the
64.3088 -diff -urN gcc-4.0.0-100/libstdc++-v3/configure.host gcc-4.0.0/libstdc++-v3/configure.host
64.3089 ---- gcc-4.0.0-100/libstdc++-v3/configure.host 2005-04-30 13:06:53.688054472 -0500
64.3090 -+++ gcc-4.0.0/libstdc++-v3/configure.host 2005-04-28 20:20:32.000000000 -0500
64.3091 -@@ -249,6 +249,12 @@
64.3092 - ;;
64.3093 - esac
64.3094 -
64.3095 -+# Override for uClibc since linux-uclibc gets mishandled above.
64.3096 -+case "${host_os}" in
64.3097 -+ *-uclibc*)
64.3098 -+ os_include_dir="os/uclibc"
64.3099 -+ ;;
64.3100 -+esac
64.3101 -
64.3102 - # Set any OS-dependent and CPU-dependent bits.
64.3103 - # THIS TABLE IS SORTED. KEEP IT THAT WAY.
64.3104 -diff -urN gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 gcc-4.0.0/libstdc++-v3/crossconfig.m4
64.3105 ---- gcc-4.0.0-100/libstdc++-v3/crossconfig.m4 2005-04-30 13:06:53.689054320 -0500
64.3106 -+++ gcc-4.0.0/libstdc++-v3/crossconfig.m4 2005-04-28 20:27:15.000000000 -0500
64.3107 -@@ -142,6 +142,98 @@
64.3108 - ;;
64.3109 - esac
64.3110 - ;;
64.3111 -+ *-uclibc*)
64.3112 -+# Temporary hack until we implement the float versions of the libm funcs
64.3113 -+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
64.3114 -+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
64.3115 -+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
64.3116 -+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
64.3117 -+ AC_SUBST(SECTION_FLAGS)
64.3118 -+ GLIBCXX_CHECK_LINKER_FEATURES
64.3119 -+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
64.3120 -+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
64.3121 -+
64.3122 -+ # For LFS.
64.3123 -+ AC_DEFINE(HAVE_INT64_T)
64.3124 -+ case "$target" in
64.3125 -+ *-uclinux*)
64.3126 -+ # Don't enable LFS with uClinux
64.3127 -+ ;;
64.3128 -+ *)
64.3129 -+ AC_DEFINE(_GLIBCXX_USE_LFS)
64.3130 -+ esac
64.3131 -+
64.3132 -+ # For showmanyc_helper().
64.3133 -+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
64.3134 -+ GLIBCXX_CHECK_POLL
64.3135 -+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
64.3136 -+
64.3137 -+ # For xsputn_2().
64.3138 -+ AC_CHECK_HEADERS(sys/uio.h)
64.3139 -+ GLIBCXX_CHECK_WRITEV
64.3140 -+
64.3141 -+# AC_DEFINE(HAVE_ACOSF)
64.3142 -+# AC_DEFINE(HAVE_ASINF)
64.3143 -+# AC_DEFINE(HAVE_ATANF)
64.3144 -+# AC_DEFINE(HAVE_ATAN2F)
64.3145 -+ AC_DEFINE(HAVE_CEILF)
64.3146 -+ AC_DEFINE(HAVE_COPYSIGN)
64.3147 -+# AC_DEFINE(HAVE_COPYSIGNF)
64.3148 -+# AC_DEFINE(HAVE_COSF)
64.3149 -+# AC_DEFINE(HAVE_COSHF)
64.3150 -+# AC_DEFINE(HAVE_EXPF)
64.3151 -+# AC_DEFINE(HAVE_FABSF)
64.3152 -+ AC_DEFINE(HAVE_FINITE)
64.3153 -+ AC_DEFINE(HAVE_FINITEF)
64.3154 -+ AC_DEFINE(HAVE_FLOORF)
64.3155 -+# AC_DEFINE(HAVE_FMODF)
64.3156 -+# AC_DEFINE(HAVE_FREXPF)
64.3157 -+ AC_DEFINE(HAVE_HYPOT)
64.3158 -+# AC_DEFINE(HAVE_HYPOTF)
64.3159 -+ AC_DEFINE(HAVE_ISINF)
64.3160 -+ AC_DEFINE(HAVE_ISINFF)
64.3161 -+ AC_DEFINE(HAVE_ISNAN)
64.3162 -+ AC_DEFINE(HAVE_ISNANF)
64.3163 -+# AC_DEFINE(HAVE_LOGF)
64.3164 -+# AC_DEFINE(HAVE_LOG10F)
64.3165 -+# AC_DEFINE(HAVE_MODFF)
64.3166 -+# AC_DEFINE(HAVE_SINF)
64.3167 -+# AC_DEFINE(HAVE_SINHF)
64.3168 -+# AC_DEFINE(HAVE_SINCOS)
64.3169 -+# AC_DEFINE(HAVE_SINCOSF)
64.3170 -+ AC_DEFINE(HAVE_SQRTF)
64.3171 -+# AC_DEFINE(HAVE_TANF)
64.3172 -+# AC_DEFINE(HAVE_TANHF)
64.3173 -+ if test x"long_double_math_on_this_cpu" = x"yes"; then
64.3174 -+# AC_DEFINE(HAVE_ACOSL)
64.3175 -+# AC_DEFINE(HAVE_ASINL)
64.3176 -+# AC_DEFINE(HAVE_ATANL)
64.3177 -+# AC_DEFINE(HAVE_ATAN2L)
64.3178 -+# AC_DEFINE(HAVE_CEILL)
64.3179 -+# AC_DEFINE(HAVE_COPYSIGNL)
64.3180 -+# AC_DEFINE(HAVE_COSL)
64.3181 -+# AC_DEFINE(HAVE_COSHL)
64.3182 -+# AC_DEFINE(HAVE_EXPL)
64.3183 -+# AC_DEFINE(HAVE_FABSL)
64.3184 -+# AC_DEFINE(HAVE_FINITEL)
64.3185 -+# AC_DEFINE(HAVE_FLOORL)
64.3186 -+# AC_DEFINE(HAVE_FMODL)
64.3187 -+# AC_DEFINE(HAVE_FREXPL)
64.3188 -+# AC_DEFINE(HAVE_HYPOTL)
64.3189 -+# AC_DEFINE(HAVE_ISINFL)
64.3190 -+# AC_DEFINE(HAVE_ISNANL)
64.3191 -+# AC_DEFINE(HAVE_LOGL)
64.3192 -+# AC_DEFINE(HAVE_LOG10L)
64.3193 -+# AC_DEFINE(HAVE_MODFL)
64.3194 -+# AC_DEFINE(HAVE_POWL)
64.3195 -+# AC_DEFINE(HAVE_SINL)
64.3196 -+# AC_DEFINE(HAVE_SINHL)
64.3197 -+# AC_DEFINE(HAVE_SINCOSL)
64.3198 -+# AC_DEFINE(HAVE_SQRTL)
64.3199 -+# AC_DEFINE(HAVE_TANL)
64.3200 -+# AC_DEFINE(HAVE_TANHL)
64.3201 -+ fi
64.3202 -+ ;;
64.3203 - *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
64.3204 - AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
64.3205 - machine/endian.h machine/param.h sys/machine.h sys/types.h \
64.3206 -@@ -156,7 +248,7 @@
64.3207 - AC_DEFINE(HAVE_INT64_T)
64.3208 - case "$target" in
64.3209 - *-uclinux*)
64.3210 -- # Don't enable LFS with uClibc
64.3211 -+ # Don't enable LFS with uClinux
64.3212 - ;;
64.3213 - *)
64.3214 - AC_DEFINE(_GLIBCXX_USE_LFS)
64.3215 -diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h
64.3216 ---- gcc-4.0.0-100/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-30 13:06:53.690054168 -0500
64.3217 -+++ gcc-4.0.0/libstdc++-v3/include/c_compatibility/wchar.h 2005-04-28 20:15:56.000000000 -0500
64.3218 -@@ -101,7 +101,9 @@
64.3219 - using std::wmemcpy;
64.3220 - using std::wmemmove;
64.3221 - using std::wmemset;
64.3222 -+#if _GLIBCXX_HAVE_WCSFTIME
64.3223 - using std::wcsftime;
64.3224 -+#endif
64.3225 -
64.3226 - #if _GLIBCXX_USE_C99
64.3227 - using std::wcstold;
64.3228 -diff -urN gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h
64.3229 ---- gcc-4.0.0-100/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-30 13:06:53.691054016 -0500
64.3230 -+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cwchar.h 2005-04-28 20:15:56.000000000 -0500
64.3231 -@@ -179,7 +179,9 @@
64.3232 - using ::wcscoll;
64.3233 - using ::wcscpy;
64.3234 - using ::wcscspn;
64.3235 -+#if _GLIBCXX_HAVE_WCSFTIME
64.3236 - using ::wcsftime;
64.3237 -+#endif
64.3238 - using ::wcslen;
64.3239 - using ::wcsncat;
64.3240 - using ::wcsncmp;
65.1 --- a/patches/gcc/4.0.3/120-libstdc++-pic.patch Wed Oct 21 18:08:31 2009 +0200
65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
65.3 @@ -1,45 +0,0 @@
65.4 ---- gcc-4.0.0/libstdc++-v3/src/Makefile.am
65.5 -+++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
65.6 -@@ -214,6 +214,10 @@
65.7 - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
65.8 -
65.9 -
65.10 -+install-exec-local:
65.11 -+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
65.12 -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
65.13 -+
65.14 - # Added bits to build debug library.
65.15 - if GLIBCXX_BUILD_DEBUG
65.16 - all-local: build_debug
65.17 ---- gcc-4.0.0/libstdc++-v3/src/Makefile.in
65.18 -+++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
65.19 -@@ -625,7 +625,7 @@
65.20 -
65.21 - install-data-am: install-data-local
65.22 -
65.23 --install-exec-am: install-toolexeclibLTLIBRARIES
65.24 -+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
65.25 -
65.26 - install-info: install-info-am
65.27 -
65.28 -@@ -664,7 +664,7 @@
65.29 - maintainer-clean-generic mostlyclean mostlyclean-compile \
65.30 - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
65.31 - tags uninstall uninstall-am uninstall-info-am \
65.32 -- uninstall-toolexeclibLTLIBRARIES
65.33 -+ uninstall-toolexeclibLTLIBRARIES install-exec-local
65.34 -
65.35 - @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
65.36 - @GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
65.37 -@@ -743,6 +743,11 @@
65.38 - install_debug:
65.39 - (cd ${debugdir} && $(MAKE) \
65.40 - toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
65.41 -+
65.42 -+install-exec-local:
65.43 -+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
65.44 -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
65.45 -+
65.46 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
65.47 - # Otherwise a system limit (for SysV at least) may be exceeded.
65.48 - .NOEXPORT:
66.1 --- a/patches/gcc/4.0.3/130-missing-execinfo_h.patch Wed Oct 21 18:08:31 2009 +0200
66.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
66.3 @@ -1,11 +0,0 @@
66.4 ---- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
66.5 -+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
66.6 -@@ -500,7 +500,7 @@
66.7 - #ifdef __linux__
66.8 - # include <features.h>
66.9 - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
66.10 -- && !defined(__ia64__)
66.11 -+ && !defined(__ia64__) && !defined(__UCLIBC__)
66.12 - # ifndef GC_HAVE_BUILTIN_BACKTRACE
66.13 - # define GC_HAVE_BUILTIN_BACKTRACE
66.14 - # endif
67.1 --- a/patches/gcc/4.0.3/140-c99-snprintf.patch Wed Oct 21 18:08:31 2009 +0200
67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
67.3 @@ -1,11 +0,0 @@
67.4 ---- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
67.5 -+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
67.6 -@@ -142,7 +142,7 @@
67.7 - using ::vsprintf;
67.8 - }
67.9 -
67.10 --#if _GLIBCXX_USE_C99
67.11 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
67.12 -
67.13 - #undef snprintf
67.14 - #undef vfscanf
68.1 --- a/patches/gcc/4.0.3/150-c99-complex-ugly-hack.patch Wed Oct 21 18:08:31 2009 +0200
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,12 +0,0 @@
68.4 ---- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
68.5 -+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
68.6 -@@ -7194,6 +7194,9 @@
68.7 - cat >>conftest.$ac_ext <<_ACEOF
68.8 - /* end confdefs.h. */
68.9 - #include <complex.h>
68.10 -+#ifdef __UCLIBC__
68.11 -+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
68.12 -+#endif
68.13 - int
68.14 - main ()
68.15 - {
69.1 --- a/patches/gcc/4.0.3/160-index_macro.patch Wed Oct 21 18:08:31 2009 +0200
69.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
69.3 @@ -1,24 +0,0 @@
69.4 ---- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
69.5 -+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
69.6 -@@ -59,6 +59,9 @@
69.7 - #include <bits/allocator.h>
69.8 - #include <ext/hash_fun.h>
69.9 -
69.10 -+/* cope w/ index defined as macro, SuSv3 proposal */
69.11 -+#undef index
69.12 -+
69.13 - # ifdef __GC
69.14 - # define __GC_CONST const
69.15 - # else
69.16 ---- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
69.17 -+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
69.18 -@@ -53,6 +53,9 @@
69.19 - #include <ext/memory> // For uninitialized_copy_n
69.20 - #include <ext/numeric> // For power
69.21 -
69.22 -+/* cope w/ index defined as macro, SuSv3 proposal */
69.23 -+#undef index
69.24 -+
69.25 - namespace __gnu_cxx
69.26 - {
69.27 - using std::size_t;
70.1 --- a/patches/gcc/4.0.3/170-sdk-libstdc++-includes.patch Wed Oct 21 18:08:31 2009 +0200
70.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
70.3 @@ -1,22 +0,0 @@
70.4 -diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
70.5 ---- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
70.6 -+++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
70.7 -@@ -18,5 +18,5 @@
70.8 - $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
70.9 -
70.10 - # -I/-D flags to pass when compiling.
70.11 --AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
70.12 -+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
70.13 -
70.14 -diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
70.15 ---- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
70.16 -+++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
70.17 -@@ -32,7 +32,7 @@
70.18 -
70.19 - libmath_la_SOURCES = stubs.c
70.20 -
70.21 --AM_CPPFLAGS = $(CANADIAN_INCLUDES)
70.22 -+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
70.23 -
70.24 - # Only compiling "C" sources in this directory.
70.25 - LIBTOOL = @LIBTOOL@ --tag CC
71.1 --- a/patches/gcc/4.0.3/180-arm-bigendian.patch Wed Oct 21 18:08:31 2009 +0200
71.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
71.3 @@ -1,67 +0,0 @@
71.4 -By Lennert Buytenhek <buytenh@wantstofly.org>
71.5 -Adds support for arm*b-linux* big-endian ARM targets
71.6 -
71.7 -See http://gcc.gnu.org/PR16350
71.8 -
71.9 ---- gcc-4.0.3/gcc/config/arm/linux-elf.h
71.10 -+++ gcc-4.0.3/gcc/config/arm/linux-elf.h
71.11 -@@ -31,19 +31,33 @@
71.12 - /* Do not assume anything about header files. */
71.13 - #define NO_IMPLICIT_EXTERN_C
71.14 -
71.15 -+/*
71.16 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
71.17 -+ * (big endian) configurations.
71.18 -+ */
71.19 -+#if TARGET_BIG_ENDIAN_DEFAULT
71.20 -+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
71.21 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
71.22 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
71.23 -+#else
71.24 -+#define TARGET_ENDIAN_DEFAULT 0
71.25 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
71.26 -+#define TARGET_LINKER_EMULATION "armelf_linux"
71.27 -+#endif
71.28 -+
71.29 - #undef TARGET_DEFAULT_FLOAT_ABI
71.30 - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
71.31 -
71.32 - #undef TARGET_DEFAULT
71.33 --#define TARGET_DEFAULT (0)
71.34 -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
71.35 -
71.36 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
71.37 -
71.38 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
71.39 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
71.40 -
71.41 - #undef MULTILIB_DEFAULTS
71.42 - #define MULTILIB_DEFAULTS \
71.43 -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
71.44 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
71.45 -
71.46 - /* The GNU C++ standard library requires that these macros be defined. */
71.47 - #undef CPLUSPLUS_CPP_SPEC
71.48 -@@ -90,7 +104,7 @@
71.49 - %{rdynamic:-export-dynamic} \
71.50 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
71.51 - -X \
71.52 -- %{mbig-endian:-EB}" \
71.53 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
71.54 - SUBTARGET_EXTRA_LINK_SPEC
71.55 -
71.56 - #define TARGET_OS_CPP_BUILTINS() \
71.57 ---- gcc-4.0.3/gcc/config.gcc
71.58 -+++ gcc-4.0.3/gcc/config.gcc
71.59 -@@ -672,6 +672,11 @@
71.60 - ;;
71.61 - arm*-*-linux*) # ARM GNU/Linux with ELF
71.62 - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
71.63 -+ case $target in
71.64 -+ arm*b-*)
71.65 -+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
71.66 -+ ;;
71.67 -+ esac
71.68 - tmake_file="${tmake_file} arm/t-arm arm/t-linux"
71.69 - extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
71.70 - gnu_ld=yes
72.1 --- a/patches/gcc/4.1.0/100-fix-fixincl.patch Wed Oct 21 18:08:31 2009 +0200
72.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
72.3 @@ -1,71 +0,0 @@
72.4 -See http://gcc.gnu.org/PR22541
72.5 -
72.6 -From: Dan Kegel
72.7 -
72.8 -When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
72.9 -the configure script happily copies the glibc include files from include to sys-include;
72.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
72.11 -
72.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
72.13 -
72.14 -But later, when running fixincludes, it gives the error message
72.15 - The directory that should contain system headers does not exist:
72.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
72.17 -
72.18 -Nevertheless, it continues building; the header files it installs in
72.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
72.20 -do not include the boilerplate that would cause it to #include_next the
72.21 -glibc headers in the system header directory.
72.22 -Thus the resulting toolchain can't compile the following program:
72.23 -#include <limits.h>
72.24 -int x = PATH_MAX;
72.25 -because its limits.h doesn't include the glibc header.
72.26 -
72.27 -The problem is that gcc/Makefile.in assumes that
72.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
72.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
72.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
72.31 -it is only created later, during 'make install'. (Which makes this problem
72.32 -confusing, since one only notices the breakage well after 'make install',
72.33 -at which point the path configure complained about does exist, and has the
72.34 -right stuff in it.)
72.35 -
72.36 -A fix that I've been using for a while is to use sed to canonicalize
72.37 -the path. The sed syntax is a bit obtuse, but it works.
72.38 -
72.39 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
72.40 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
72.41 -
72.42 -[rediffed against gcc-4.1-20060210]
72.43 -
72.44 ---- gcc-4.1-20060210/gcc/Makefile.in.old 2006-01-11 06:29:29.000000000 -0800
72.45 -+++ gcc-4.1-20060210/gcc/Makefile.in 2006-02-14 16:08:54.000000000 -0800
72.46 -@@ -388,7 +388,10 @@
72.47 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
72.48 -
72.49 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
72.50 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
72.51 -+# Purge it of unneccessary internal relative paths
72.52 -+# to directories that might not exist yet.
72.53 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
72.54 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
72.55 -
72.56 - # Control whether to run fixproto and fixincludes.
72.57 - STMP_FIXPROTO = @STMP_FIXPROTO@
72.58 -@@ -3167,13 +3170,15 @@
72.59 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
72.60 -
72.61 - # Build fixed copies of system files.
72.62 -+# Abort if no system headers available, unless building a crosscompiler.
72.63 -+# Canonicalize $gcc_tooldir/sys-include in same way as $SYSTEM_HEADER_DIR was canonicalized so test still works
72.64 - stmp-fixinc: gsyslimits.h macro_list \
72.65 - $(build_objdir)/fixincludes/fixincl \
72.66 - $(build_objdir)/fixincludes/fixinc.sh
72.67 - @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
72.68 - echo The directory that should contain system headers does not exist: >&2 ; \
72.69 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
72.70 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
72.71 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
72.72 - then sleep 1; else exit 1; fi; \
72.73 - fi
72.74 - rm -rf include; mkdir include
73.1 --- a/patches/gcc/4.1.1/100-uclibc-conf.patch Wed Oct 21 18:08:31 2009 +0200
73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
73.3 @@ -1,544 +0,0 @@
73.4 ---- gcc-4.1.0/gcc/config/t-linux-uclibc
73.5 -+++ gcc-4.1.0/gcc/config/t-linux-uclibc
73.6 -@@ -0,0 +1,5 @@
73.7 -+# Remove glibc specific files added in t-linux
73.8 -+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
73.9 -+
73.10 -+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
73.11 -+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
73.12 ---- gcc-4.1.0/gcc/config.gcc
73.13 -+++ gcc-4.1.0/gcc/config.gcc
73.14 -@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
73.15 - ;;
73.16 - sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
73.17 - sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
73.18 -- sh-*-linux* | sh[346lbe]*-*-linux* | \
73.19 -+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
73.20 - sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
73.21 - sh64-*-netbsd* | sh64l*-*-netbsd*)
73.22 - tmake_file="${tmake_file} sh/t-sh sh/t-elf"
73.23 -@@ -2341,6 +2341,12 @@ m32c-*-elf*)
73.24 - ;;
73.25 - esac
73.26 -
73.27 -+# Rather than hook into each target, just do it after all the linux
73.28 -+# targets have been processed
73.29 -+case ${target} in
73.30 -+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
73.31 -+esac
73.32 -+
73.33 - case ${target} in
73.34 - i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
73.35 - tmake_file="${tmake_file} i386/t-gmm_malloc"
73.36 ---- gcc-4.1.0/boehm-gc/configure
73.37 -+++ gcc-4.1.0/boehm-gc/configure
73.38 -@@ -4320,6 +4320,11 @@ linux-gnu*)
73.39 - lt_cv_deplibs_check_method=pass_all
73.40 - ;;
73.41 -
73.42 -+linux-uclibc*)
73.43 -+ lt_cv_deplibs_check_method=pass_all
73.44 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.45 -+ ;;
73.46 -+
73.47 - netbsd* | knetbsd*-gnu)
73.48 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.49 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.50 ---- gcc-4.1.0/configure
73.51 -+++ gcc-4.1.0/configure
73.52 -@@ -1133,7 +1133,7 @@ no)
73.53 - ;;
73.54 - "")
73.55 - case "${target}" in
73.56 -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
73.57 -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
73.58 - # Enable libmudflap by default in GNU and friends.
73.59 - ;;
73.60 - *-*-freebsd*)
73.61 ---- gcc-4.1.0/configure.in
73.62 -+++ gcc-4.1.0/configure.in
73.63 -@@ -341,7 +341,7 @@ no)
73.64 - ;;
73.65 - "")
73.66 - case "${target}" in
73.67 -- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
73.68 -+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
73.69 - # Enable libmudflap by default in GNU and friends.
73.70 - ;;
73.71 - *-*-freebsd*)
73.72 ---- gcc-4.1.0/contrib/regression/objs-gcc.sh
73.73 -+++ gcc-4.1.0/contrib/regression/objs-gcc.sh
73.74 -@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
73.75 - then
73.76 - make all-gdb all-dejagnu all-ld || exit 1
73.77 - make install-gdb install-dejagnu install-ld || exit 1
73.78 -+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
73.79 -+ then
73.80 -+ make all-gdb all-dejagnu all-ld || exit 1
73.81 -+ make install-gdb install-dejagnu install-ld || exit 1
73.82 - elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
73.83 - make bootstrap || exit 1
73.84 - make install || exit 1
73.85 ---- gcc-4.1.0/gcc/config/alpha/linux-elf.h
73.86 -+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
73.87 -@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */
73.88 - #define SUBTARGET_EXTRA_SPECS \
73.89 - { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
73.90 -
73.91 -+#if defined USE_UCLIBC
73.92 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.93 -+#else
73.94 - #define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
73.95 -+#endif
73.96 -
73.97 - #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
73.98 - %{O*:-O3} %{!O*:-O1} \
73.99 ---- gcc-4.1.0/gcc/config/arm/linux-elf.h
73.100 -+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
73.101 -@@ -51,7 +51,11 @@
73.102 -
73.103 - #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
73.104 -
73.105 -+#ifdef USE_UCLIBC
73.106 -+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
73.107 -+#else
73.108 - #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
73.109 -+#endif
73.110 -
73.111 - #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
73.112 - %{b} \
73.113 ---- gcc-4.1.0/gcc/config/cris/linux.h
73.114 -+++ gcc-4.1.0/gcc/config/cris/linux.h
73.115 -@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */
73.116 - #undef CRIS_DEFAULT_CPU_VERSION
73.117 - #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
73.118 -
73.119 -+#ifdef USE_UCLIBC
73.120 -+
73.121 -+#undef CRIS_SUBTARGET_VERSION
73.122 -+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
73.123 -+
73.124 -+#undef CRIS_LINK_SUBTARGET_SPEC
73.125 -+#define CRIS_LINK_SUBTARGET_SPEC \
73.126 -+ "-mcrislinux\
73.127 -+ -rpath-link include/asm/../..%s\
73.128 -+ %{shared} %{static}\
73.129 -+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
73.130 -+ %{!shared: \
73.131 -+ %{!static: \
73.132 -+ %{rdynamic:-export-dynamic} \
73.133 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
73.134 -+ %{!r:%{O2|O3: --gc-sections}}"
73.135 -+
73.136 -+#else /* USE_UCLIBC */
73.137 -+
73.138 - #undef CRIS_SUBTARGET_VERSION
73.139 - #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
73.140 -
73.141 -@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */
73.142 - %{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
73.143 - %{!r:%{O2|O3: --gc-sections}}"
73.144 -
73.145 -+#endif /* USE_UCLIBC */
73.146 -+
73.147 -
73.148 - /* Node: Run-time Target */
73.149 -
73.150 ---- gcc-4.1.0/gcc/config/i386/linux.h
73.151 -+++ gcc-4.1.0/gcc/config/i386/linux.h
73.152 -@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */
73.153 - #define LINK_EMULATION "elf_i386"
73.154 - #define DYNAMIC_LINKER "/lib/ld-linux.so.2"
73.155 -
73.156 -+#if defined USE_UCLIBC
73.157 -+#undef DYNAMIC_LINKER
73.158 -+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.159 -+#endif
73.160 -+
73.161 - #undef SUBTARGET_EXTRA_SPECS
73.162 - #define SUBTARGET_EXTRA_SPECS \
73.163 - { "link_emulation", LINK_EMULATION },\
73.164 ---- gcc-4.1.0/gcc/config/i386/linux64.h
73.165 -+++ gcc-4.1.0/gcc/config/i386/linux64.h
73.166 -@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */
73.167 - When the -shared link option is used a final link is not being
73.168 - done. */
73.169 -
73.170 -+#ifdef USE_UCLIBC
73.171 -+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.172 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
73.173 -+#else
73.174 -+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
73.175 -+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
73.176 -+#endif
73.177 - #undef LINK_SPEC
73.178 - #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
73.179 - %{shared:-shared} \
73.180 - %{!shared: \
73.181 - %{!static: \
73.182 - %{rdynamic:-export-dynamic} \
73.183 -- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
73.184 -- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
73.185 -+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
73.186 -+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
73.187 - %{static:-static}}"
73.188 -
73.189 - /* Similar to standard Linux, but adding -ffast-math support. */
73.190 ---- gcc-4.1.0/gcc/config/ia64/linux.h
73.191 -+++ gcc-4.1.0/gcc/config/ia64/linux.h
73.192 -@@ -37,13 +37,18 @@ do { \
73.193 - /* Define this for shared library support because it isn't in the main
73.194 - linux.h file. */
73.195 -
73.196 -+#ifdef USE_UCLIBC
73.197 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.198 -+#else
73.199 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
73.200 -+#endif
73.201 - #undef LINK_SPEC
73.202 - #define LINK_SPEC "\
73.203 - %{shared:-shared} \
73.204 - %{!shared: \
73.205 - %{!static: \
73.206 - %{rdynamic:-export-dynamic} \
73.207 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
73.208 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.209 - %{static:-static}}"
73.210 -
73.211 -
73.212 ---- gcc-4.1.0/gcc/config/m68k/linux.h
73.213 -+++ gcc-4.1.0/gcc/config/m68k/linux.h
73.214 -@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */
73.215 -
73.216 - /* If ELF is the default format, we should not use /lib/elf. */
73.217 -
73.218 -+#ifdef USE_UCLIBC
73.219 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.220 -+#else
73.221 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
73.222 -+#endif
73.223 - #undef LINK_SPEC
73.224 - #define LINK_SPEC "-m m68kelf %{shared} \
73.225 - %{!shared: \
73.226 - %{!static: \
73.227 - %{rdynamic:-export-dynamic} \
73.228 -- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
73.229 -+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.230 - %{static}}"
73.231 -
73.232 - /* For compatibility with linux/a.out */
73.233 ---- gcc-4.1.0/gcc/config/mips/linux.h
73.234 -+++ gcc-4.1.0/gcc/config/mips/linux.h
73.235 -@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */
73.236 -
73.237 - /* Borrowed from sparc/linux.h */
73.238 - #undef LINK_SPEC
73.239 -+#ifdef USE_UCLIBC
73.240 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.241 -+#else
73.242 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
73.243 -+#endif
73.244 - #define LINK_SPEC \
73.245 - "%(endian_spec) \
73.246 - %{shared:-shared} \
73.247 -@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */
73.248 - %{!ibcs: \
73.249 - %{!static: \
73.250 - %{rdynamic:-export-dynamic} \
73.251 -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
73.252 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.253 - %{static:-static}}}"
73.254 -
73.255 - #undef SUBTARGET_ASM_SPEC
73.256 ---- gcc-4.1.0/gcc/config/pa/pa-linux.h
73.257 -+++ gcc-4.1.0/gcc/config/pa/pa-linux.h
73.258 -@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */
73.259 - /* Define this for shared library support because it isn't in the main
73.260 - linux.h file. */
73.261 -
73.262 -+#ifdef USE_UCLIBC
73.263 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.264 -+#else
73.265 -+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
73.266 -+#endif
73.267 - #undef LINK_SPEC
73.268 - #define LINK_SPEC "\
73.269 - %{shared:-shared} \
73.270 - %{!shared: \
73.271 - %{!static: \
73.272 - %{rdynamic:-export-dynamic} \
73.273 -- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
73.274 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.275 - %{static:-static}}"
73.276 -
73.277 - /* glibc's profiling functions don't need gcc to allocate counters. */
73.278 ---- gcc-4.1.0/gcc/config/rs6000/linux.h
73.279 -+++ gcc-4.1.0/gcc/config/rs6000/linux.h
73.280 -@@ -72,7 +72,11 @@
73.281 - #define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
73.282 -
73.283 - #undef LINK_OS_DEFAULT_SPEC
73.284 -+#ifdef USE_UCLIBC
73.285 -+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
73.286 -+#else
73.287 - #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
73.288 -+#endif
73.289 -
73.290 - #define LINK_GCC_C_SEQUENCE_SPEC \
73.291 - "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
73.292 ---- gcc-4.1.0/gcc/config/rs6000/sysv4.h
73.293 -+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
73.294 -@@ -866,6 +866,7 @@ extern int fixuplabelno;
73.295 - mcall-linux : %(link_os_linux) ; \
73.296 - mcall-gnu : %(link_os_gnu) ; \
73.297 - mcall-netbsd : %(link_os_netbsd) ; \
73.298 -+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
73.299 - mcall-openbsd: %(link_os_openbsd) ; \
73.300 - : %(link_os_default) }"
73.301 -
73.302 -@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
73.303 - %{rdynamic:-export-dynamic} \
73.304 - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
73.305 -
73.306 -+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
73.307 -+ %{rdynamic:-export-dynamic} \
73.308 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
73.309 -+
73.310 - #if defined(HAVE_LD_EH_FRAME_HDR)
73.311 - # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
73.312 - #endif
73.313 -@@ -1209,6 +1214,7 @@ ncrtn.o%s"
73.314 - { "link_os_sim", LINK_OS_SIM_SPEC }, \
73.315 - { "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
73.316 - { "link_os_linux", LINK_OS_LINUX_SPEC }, \
73.317 -+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
73.318 - { "link_os_gnu", LINK_OS_GNU_SPEC }, \
73.319 - { "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
73.320 - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
73.321 ---- gcc-4.1.0/gcc/config/s390/linux.h
73.322 -+++ gcc-4.1.0/gcc/config/s390/linux.h
73.323 -@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
73.324 - #define MULTILIB_DEFAULTS { "m31" }
73.325 - #endif
73.326 -
73.327 -+#ifdef USE_UCLIBC
73.328 -+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.329 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
73.330 -+#else
73.331 -+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
73.332 -+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
73.333 -+#endif
73.334 - #undef LINK_SPEC
73.335 - #define LINK_SPEC \
73.336 - "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
73.337 -@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
73.338 - %{!static: \
73.339 - %{rdynamic:-export-dynamic} \
73.340 - %{!dynamic-linker: \
73.341 -- %{m31:-dynamic-linker /lib/ld.so.1} \
73.342 -- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
73.343 -+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
73.344 -+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
73.345 -
73.346 -
73.347 - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
73.348 ---- gcc-4.1.0/gcc/config/sh/linux.h
73.349 -+++ gcc-4.1.0/gcc/config/sh/linux.h
73.350 -@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */
73.351 - #undef SUBTARGET_LINK_EMUL_SUFFIX
73.352 - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
73.353 - #undef SUBTARGET_LINK_SPEC
73.354 -+#ifdef USE_UCLIBC
73.355 -+#define SUBTARGET_LINK_SPEC \
73.356 -+ "%{shared:-shared} \
73.357 -+ %{!static: \
73.358 -+ %{rdynamic:-export-dynamic} \
73.359 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
73.360 -+ %{static:-static}"
73.361 -+#else
73.362 - #define SUBTARGET_LINK_SPEC \
73.363 - "%{shared:-shared} \
73.364 - %{!static: \
73.365 - %{rdynamic:-export-dynamic} \
73.366 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
73.367 - %{static:-static}"
73.368 -+#endif
73.369 -
73.370 - /* Output assembler code to STREAM to call the profiler. */
73.371 -
73.372 ---- gcc-4.1.0/gcc/config/sparc/linux.h
73.373 -+++ gcc-4.1.0/gcc/config/sparc/linux.h
73.374 -@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */
73.375 -
73.376 - /* If ELF is the default format, we should not use /lib/elf. */
73.377 -
73.378 -+#ifdef USE_UCLIBC
73.379 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.380 -+#else
73.381 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
73.382 -+#endif
73.383 - #undef LINK_SPEC
73.384 - #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
73.385 - %{!mno-relax:%{!r:-relax}} \
73.386 -@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */
73.387 - %{!ibcs: \
73.388 - %{!static: \
73.389 - %{rdynamic:-export-dynamic} \
73.390 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
73.391 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.392 - %{static:-static}}}"
73.393 -
73.394 - /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
73.395 ---- gcc-4.1.0/gcc/config/sparc/linux64.h
73.396 -+++ gcc-4.1.0/gcc/config/sparc/linux64.h
73.397 -@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */
73.398 - { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
73.399 - { "link_arch", LINK_ARCH_SPEC },
73.400 -
73.401 -+#ifdef USE_UCLIBC
73.402 -+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
73.403 -+#else
73.404 -+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
73.405 -+#endif
73.406 - #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
73.407 - %{!shared: \
73.408 - %{!ibcs: \
73.409 - %{!static: \
73.410 - %{rdynamic:-export-dynamic} \
73.411 -- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
73.412 -+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
73.413 - %{static:-static}}} \
73.414 - "
73.415 -
73.416 ---- gcc-4.1.0/libffi/configure
73.417 -+++ gcc-4.1.0/libffi/configure
73.418 -@@ -3457,6 +3457,11 @@ linux-gnu*)
73.419 - lt_cv_deplibs_check_method=pass_all
73.420 - ;;
73.421 -
73.422 -+linux-uclibc*)
73.423 -+ lt_cv_deplibs_check_method=pass_all
73.424 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.425 -+ ;;
73.426 -+
73.427 - netbsd* | knetbsd*-gnu)
73.428 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.429 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.430 ---- gcc-4.1.0/libgfortran/configure
73.431 -+++ gcc-4.1.0/libgfortran/configure
73.432 -@@ -3699,6 +3699,11 @@ linux-gnu*)
73.433 - lt_cv_deplibs_check_method=pass_all
73.434 - ;;
73.435 -
73.436 -+linux-uclibc*)
73.437 -+ lt_cv_deplibs_check_method=pass_all
73.438 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.439 -+ ;;
73.440 -+
73.441 - netbsd* | knetbsd*-gnu)
73.442 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.443 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.444 ---- gcc-4.1.0/libjava/configure
73.445 -+++ gcc-4.1.0/libjava/configure
73.446 -@@ -5137,6 +5137,11 @@ linux-gnu*)
73.447 - lt_cv_deplibs_check_method=pass_all
73.448 - ;;
73.449 -
73.450 -+linux-uclibc*)
73.451 -+ lt_cv_deplibs_check_method=pass_all
73.452 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.453 -+ ;;
73.454 -+
73.455 - netbsd* | knetbsd*-gnu)
73.456 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.457 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.458 ---- gcc-4.1.0/libmudflap/configure
73.459 -+++ gcc-4.1.0/libmudflap/configure
73.460 -@@ -5382,6 +5382,11 @@ linux-gnu*)
73.461 - lt_cv_deplibs_check_method=pass_all
73.462 - ;;
73.463 -
73.464 -+linux-uclibc*)
73.465 -+ lt_cv_deplibs_check_method=pass_all
73.466 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.467 -+ ;;
73.468 -+
73.469 - netbsd* | knetbsd*-gnu)
73.470 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.471 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.472 ---- gcc-4.1.0/libobjc/configure
73.473 -+++ gcc-4.1.0/libobjc/configure
73.474 -@@ -3312,6 +3312,11 @@ linux-gnu*)
73.475 - lt_cv_deplibs_check_method=pass_all
73.476 - ;;
73.477 -
73.478 -+linux-uclibc*)
73.479 -+ lt_cv_deplibs_check_method=pass_all
73.480 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.481 -+ ;;
73.482 -+
73.483 - netbsd* | knetbsd*-gnu)
73.484 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.485 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
73.486 ---- gcc-4.1.0/libtool.m4
73.487 -+++ gcc-4.1.0/libtool.m4
73.488 -@@ -743,6 +743,11 @@ linux-gnu*)
73.489 - lt_cv_deplibs_check_method=pass_all
73.490 - ;;
73.491 -
73.492 -+linux-uclibc*)
73.493 -+ lt_cv_deplibs_check_method=pass_all
73.494 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.495 -+ ;;
73.496 -+
73.497 - netbsd* | knetbsd*-gnu)
73.498 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.499 - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
73.500 ---- gcc-4.1.0/ltconfig
73.501 -+++ gcc-4.1.0/ltconfig
73.502 -@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
73.503 -
73.504 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
73.505 - case $host_os in
73.506 -+linux-uclibc*) ;;
73.507 - linux-gnu*) ;;
73.508 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
73.509 - esac
73.510 -@@ -1274,6 +1275,23 @@ linux-gnu*)
73.511 - dynamic_linker='GNU/Linux ld.so'
73.512 - ;;
73.513 -
73.514 -+linux-uclibc*)
73.515 -+ version_type=linux
73.516 -+ need_lib_prefix=no
73.517 -+ need_version=no
73.518 -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
73.519 -+ soname_spec='${libname}${release}.so$major'
73.520 -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
73.521 -+ shlibpath_var=LD_LIBRARY_PATH
73.522 -+ shlibpath_overrides_runpath=no
73.523 -+ # This implies no fast_install, which is unacceptable.
73.524 -+ # Some rework will be needed to allow for fast_install
73.525 -+ # before this can be enabled.
73.526 -+ hardcode_into_libs=yes
73.527 -+ # Assume using the uClibc dynamic linker.
73.528 -+ dynamic_linker="uClibc ld.so"
73.529 -+ ;;
73.530 -+
73.531 - netbsd*)
73.532 - need_lib_prefix=no
73.533 - need_version=no
73.534 ---- gcc-4.1.0/zlib/configure
73.535 -+++ gcc-4.1.0/zlib/configure
73.536 -@@ -3426,6 +3426,11 @@ linux-gnu*)
73.537 - lt_cv_deplibs_check_method=pass_all
73.538 - ;;
73.539 -
73.540 -+linux-uclibc*)
73.541 -+ lt_cv_deplibs_check_method=pass_all
73.542 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
73.543 -+ ;;
73.544 -+
73.545 - netbsd* | knetbsd*-gnu)
73.546 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
73.547 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
74.1 --- a/patches/gcc/4.1.1/110-arm-eabi.patch Wed Oct 21 18:08:31 2009 +0200
74.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
74.3 @@ -1,27 +0,0 @@
74.4 ---- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
74.5 -+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
74.6 -@@ -674,7 +674,7 @@
74.7 - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
74.8 - tmake_file="${tmake_file} t-linux arm/t-arm"
74.9 - case ${target} in
74.10 -- arm*-*-linux-gnueabi)
74.11 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
74.12 - tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
74.13 - tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
74.14 - # The BPABI long long divmod functions return a 128-bit value in
74.15 -
74.16 -diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
74.17 ---- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
74.18 -+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
74.19 -@@ -53,7 +53,11 @@
74.20 - /* Use ld-linux.so.3 so that it will be possible to run "classic"
74.21 - GNU/Linux binaries on an EABI system. */
74.22 - #undef LINUX_TARGET_INTERPRETER
74.23 -+#ifdef USE_UCLIBC
74.24 -+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
74.25 -+#else
74.26 - #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
74.27 -+#endif
74.28 -
74.29 - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
74.30 - use the GNU/Linux version, not the generic BPABI version. */
75.1 --- a/patches/gcc/4.1.1/120-uclibc-locale.patch Wed Oct 21 18:08:31 2009 +0200
75.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
75.3 @@ -1,3239 +0,0 @@
75.4 ---- gcc-4.1.0-dist/libstdc++-v3/acinclude.m4
75.5 -+++ gcc-4.1.0/libstdc++-v3/acinclude.m4
75.6 -@@ -1071,7 +1071,7 @@
75.7 - AC_MSG_CHECKING([for C locale to use])
75.8 - GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
75.9 - [use MODEL for target locale package],
75.10 -- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
75.11 -+ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
75.12 -
75.13 - # If they didn't use this option switch, or if they specified --enable
75.14 - # with no specific model, we'll have to look for one. If they
75.15 -@@ -1087,6 +1087,9 @@
75.16 - # Default to "generic".
75.17 - if test $enable_clocale_flag = auto; then
75.18 - case ${target_os} in
75.19 -+ *-uclibc*)
75.20 -+ enable_clocale_flag=uclibc
75.21 -+ ;;
75.22 - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
75.23 - AC_EGREP_CPP([_GLIBCXX_ok], [
75.24 - #include <features.h>
75.25 -@@ -1230,6 +1233,40 @@
75.26 - CTIME_CC=config/locale/generic/time_members.cc
75.27 - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
75.28 - ;;
75.29 -+ uclibc)
75.30 -+ AC_MSG_RESULT(uclibc)
75.31 -+
75.32 -+ # Declare intention to use gettext, and add support for specific
75.33 -+ # languages.
75.34 -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
75.35 -+ ALL_LINGUAS="de fr"
75.36 -+
75.37 -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
75.38 -+ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
75.39 -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
75.40 -+ USE_NLS=yes
75.41 -+ fi
75.42 -+ # Export the build objects.
75.43 -+ for ling in $ALL_LINGUAS; do \
75.44 -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
75.45 -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
75.46 -+ done
75.47 -+ AC_SUBST(glibcxx_MOFILES)
75.48 -+ AC_SUBST(glibcxx_POFILES)
75.49 -+
75.50 -+ CLOCALE_H=config/locale/uclibc/c_locale.h
75.51 -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
75.52 -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
75.53 -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
75.54 -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
75.55 -+ CMESSAGES_H=config/locale/uclibc/messages_members.h
75.56 -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
75.57 -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
75.58 -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
75.59 -+ CTIME_H=config/locale/uclibc/time_members.h
75.60 -+ CTIME_CC=config/locale/uclibc/time_members.cc
75.61 -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
75.62 -+ ;;
75.63 - esac
75.64 -
75.65 - # This is where the testsuite looks for locale catalogs, using the
75.66 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
75.67 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
75.68 -@@ -0,0 +1,63 @@
75.69 -+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
75.70 -+
75.71 -+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
75.72 -+//
75.73 -+// This file is part of the GNU ISO C++ Library. This library is free
75.74 -+// software; you can redistribute it and/or modify it under the
75.75 -+// terms of the GNU General Public License as published by the
75.76 -+// Free Software Foundation; either version 2, or (at your option)
75.77 -+// any later version.
75.78 -+
75.79 -+// This library is distributed in the hope that it will be useful,
75.80 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.81 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.82 -+// GNU General Public License for more details.
75.83 -+
75.84 -+// You should have received a copy of the GNU General Public License along
75.85 -+// with this library; see the file COPYING. If not, write to the Free
75.86 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.87 -+// USA.
75.88 -+
75.89 -+// As a special exception, you may use this file as part of a free software
75.90 -+// library without restriction. Specifically, if other files instantiate
75.91 -+// templates or use macros or inline functions from this file, or you compile
75.92 -+// this file and link it with other files to produce an executable, this
75.93 -+// file does not by itself cause the resulting executable to be covered by
75.94 -+// the GNU General Public License. This exception does not however
75.95 -+// invalidate any other reasons why the executable file might be covered by
75.96 -+// the GNU General Public License.
75.97 -+
75.98 -+// Written by Jakub Jelinek <jakub@redhat.com>
75.99 -+
75.100 -+#include <bits/c++config.h>
75.101 -+#include <clocale>
75.102 -+
75.103 -+#ifdef __UCLIBC_MJN3_ONLY__
75.104 -+#warning clean this up
75.105 -+#endif
75.106 -+
75.107 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.108 -+
75.109 -+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
75.110 -+extern "C" __typeof(strcoll_l) __strcoll_l;
75.111 -+extern "C" __typeof(strftime_l) __strftime_l;
75.112 -+extern "C" __typeof(strtod_l) __strtod_l;
75.113 -+extern "C" __typeof(strtof_l) __strtof_l;
75.114 -+extern "C" __typeof(strtold_l) __strtold_l;
75.115 -+extern "C" __typeof(strxfrm_l) __strxfrm_l;
75.116 -+extern "C" __typeof(newlocale) __newlocale;
75.117 -+extern "C" __typeof(freelocale) __freelocale;
75.118 -+extern "C" __typeof(duplocale) __duplocale;
75.119 -+extern "C" __typeof(uselocale) __uselocale;
75.120 -+
75.121 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.122 -+extern "C" __typeof(iswctype_l) __iswctype_l;
75.123 -+extern "C" __typeof(towlower_l) __towlower_l;
75.124 -+extern "C" __typeof(towupper_l) __towupper_l;
75.125 -+extern "C" __typeof(wcscoll_l) __wcscoll_l;
75.126 -+extern "C" __typeof(wcsftime_l) __wcsftime_l;
75.127 -+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
75.128 -+extern "C" __typeof(wctype_l) __wctype_l;
75.129 -+#endif
75.130 -+
75.131 -+#endif // GLIBC 2.3 and later
75.132 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.cc
75.133 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.cc
75.134 -@@ -0,0 +1,152 @@
75.135 -+// Wrapper for underlying C-language localization -*- C++ -*-
75.136 -+
75.137 -+// Copyright (C) 2001, 2002, 2003, 2004, 2005
75.138 -+// Free Software Foundation, Inc.
75.139 -+//
75.140 -+// This file is part of the GNU ISO C++ Library. This library is free
75.141 -+// software; you can redistribute it and/or modify it under the
75.142 -+// terms of the GNU General Public License as published by the
75.143 -+// Free Software Foundation; either version 2, or (at your option)
75.144 -+// any later version.
75.145 -+
75.146 -+// This library is distributed in the hope that it will be useful,
75.147 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.148 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.149 -+// GNU General Public License for more details.
75.150 -+
75.151 -+// You should have received a copy of the GNU General Public License along
75.152 -+// with this library; see the file COPYING. If not, write to the Free
75.153 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.154 -+// USA.
75.155 -+
75.156 -+// As a special exception, you may use this file as part of a free software
75.157 -+// library without restriction. Specifically, if other files instantiate
75.158 -+// templates or use macros or inline functions from this file, or you compile
75.159 -+// this file and link it with other files to produce an executable, this
75.160 -+// file does not by itself cause the resulting executable to be covered by
75.161 -+// the GNU General Public License. This exception does not however
75.162 -+// invalidate any other reasons why the executable file might be covered by
75.163 -+// the GNU General Public License.
75.164 -+
75.165 -+//
75.166 -+// ISO C++ 14882: 22.8 Standard locale categories.
75.167 -+//
75.168 -+
75.169 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.170 -+
75.171 -+#include <cerrno> // For errno
75.172 -+#include <locale>
75.173 -+#include <stdexcept>
75.174 -+#include <langinfo.h>
75.175 -+#include <bits/c++locale_internal.h>
75.176 -+
75.177 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.178 -+#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
75.179 -+#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
75.180 -+#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
75.181 -+#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
75.182 -+#define __strtof_l(S, E, L) strtof((S), (E))
75.183 -+#define __strtod_l(S, E, L) strtod((S), (E))
75.184 -+#define __strtold_l(S, E, L) strtold((S), (E))
75.185 -+#warning should dummy __newlocale check for C|POSIX ?
75.186 -+#define __newlocale(a, b, c) NULL
75.187 -+#define __freelocale(a) ((void)0)
75.188 -+#define __duplocale(a) __c_locale()
75.189 -+#endif
75.190 -+
75.191 -+namespace std
75.192 -+{
75.193 -+ template<>
75.194 -+ void
75.195 -+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
75.196 -+ const __c_locale& __cloc)
75.197 -+ {
75.198 -+ char* __sanity;
75.199 -+ errno = 0;
75.200 -+ float __f = __strtof_l(__s, &__sanity, __cloc);
75.201 -+ if (__sanity != __s && errno != ERANGE)
75.202 -+ __v = __f;
75.203 -+ else
75.204 -+ __err |= ios_base::failbit;
75.205 -+ }
75.206 -+
75.207 -+ template<>
75.208 -+ void
75.209 -+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
75.210 -+ const __c_locale& __cloc)
75.211 -+ {
75.212 -+ char* __sanity;
75.213 -+ errno = 0;
75.214 -+ double __d = __strtod_l(__s, &__sanity, __cloc);
75.215 -+ if (__sanity != __s && errno != ERANGE)
75.216 -+ __v = __d;
75.217 -+ else
75.218 -+ __err |= ios_base::failbit;
75.219 -+ }
75.220 -+
75.221 -+ template<>
75.222 -+ void
75.223 -+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
75.224 -+ const __c_locale& __cloc)
75.225 -+ {
75.226 -+ char* __sanity;
75.227 -+ errno = 0;
75.228 -+ long double __ld = __strtold_l(__s, &__sanity, __cloc);
75.229 -+ if (__sanity != __s && errno != ERANGE)
75.230 -+ __v = __ld;
75.231 -+ else
75.232 -+ __err |= ios_base::failbit;
75.233 -+ }
75.234 -+
75.235 -+ void
75.236 -+ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
75.237 -+ __c_locale __old)
75.238 -+ {
75.239 -+ __cloc = __newlocale(1 << LC_ALL, __s, __old);
75.240 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.241 -+ if (!__cloc)
75.242 -+ {
75.243 -+ // This named locale is not supported by the underlying OS.
75.244 -+ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
75.245 -+ "name not valid"));
75.246 -+ }
75.247 -+#endif
75.248 -+ }
75.249 -+
75.250 -+ void
75.251 -+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
75.252 -+ {
75.253 -+ if (__cloc && _S_get_c_locale() != __cloc)
75.254 -+ __freelocale(__cloc);
75.255 -+ }
75.256 -+
75.257 -+ __c_locale
75.258 -+ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
75.259 -+ { return __duplocale(__cloc); }
75.260 -+} // namespace std
75.261 -+
75.262 -+namespace __gnu_cxx
75.263 -+{
75.264 -+ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
75.265 -+ {
75.266 -+ "LC_CTYPE",
75.267 -+ "LC_NUMERIC",
75.268 -+ "LC_TIME",
75.269 -+ "LC_COLLATE",
75.270 -+ "LC_MONETARY",
75.271 -+ "LC_MESSAGES",
75.272 -+#if _GLIBCXX_NUM_CATEGORIES != 0
75.273 -+ "LC_PAPER",
75.274 -+ "LC_NAME",
75.275 -+ "LC_ADDRESS",
75.276 -+ "LC_TELEPHONE",
75.277 -+ "LC_MEASUREMENT",
75.278 -+ "LC_IDENTIFICATION"
75.279 -+#endif
75.280 -+ };
75.281 -+}
75.282 -+
75.283 -+namespace std
75.284 -+{
75.285 -+ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
75.286 -+} // namespace std
75.287 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/c_locale.h
75.288 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/c_locale.h
75.289 -@@ -0,0 +1,117 @@
75.290 -+// Wrapper for underlying C-language localization -*- C++ -*-
75.291 -+
75.292 -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
75.293 -+//
75.294 -+// This file is part of the GNU ISO C++ Library. This library is free
75.295 -+// software; you can redistribute it and/or modify it under the
75.296 -+// terms of the GNU General Public License as published by the
75.297 -+// Free Software Foundation; either version 2, or (at your option)
75.298 -+// any later version.
75.299 -+
75.300 -+// This library is distributed in the hope that it will be useful,
75.301 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.302 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.303 -+// GNU General Public License for more details.
75.304 -+
75.305 -+// You should have received a copy of the GNU General Public License along
75.306 -+// with this library; see the file COPYING. If not, write to the Free
75.307 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.308 -+// USA.
75.309 -+
75.310 -+// As a special exception, you may use this file as part of a free software
75.311 -+// library without restriction. Specifically, if other files instantiate
75.312 -+// templates or use macros or inline functions from this file, or you compile
75.313 -+// this file and link it with other files to produce an executable, this
75.314 -+// file does not by itself cause the resulting executable to be covered by
75.315 -+// the GNU General Public License. This exception does not however
75.316 -+// invalidate any other reasons why the executable file might be covered by
75.317 -+// the GNU General Public License.
75.318 -+
75.319 -+//
75.320 -+// ISO C++ 14882: 22.8 Standard locale categories.
75.321 -+//
75.322 -+
75.323 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.324 -+
75.325 -+#ifndef _C_LOCALE_H
75.326 -+#define _C_LOCALE_H 1
75.327 -+
75.328 -+#pragma GCC system_header
75.329 -+
75.330 -+#include <cstring> // get std::strlen
75.331 -+#include <cstdio> // get std::snprintf or std::sprintf
75.332 -+#include <clocale>
75.333 -+#include <langinfo.h> // For codecvt
75.334 -+#ifdef __UCLIBC_MJN3_ONLY__
75.335 -+#warning fix this
75.336 -+#endif
75.337 -+#ifdef __UCLIBC_HAS_LOCALE__
75.338 -+#include <iconv.h> // For codecvt using iconv, iconv_t
75.339 -+#endif
75.340 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
75.341 -+#include <libintl.h> // For messages
75.342 -+#endif
75.343 -+
75.344 -+#ifdef __UCLIBC_MJN3_ONLY__
75.345 -+#warning what is _GLIBCXX_C_LOCALE_GNU for
75.346 -+#endif
75.347 -+#define _GLIBCXX_C_LOCALE_GNU 1
75.348 -+
75.349 -+#ifdef __UCLIBC_MJN3_ONLY__
75.350 -+#warning fix categories
75.351 -+#endif
75.352 -+// #define _GLIBCXX_NUM_CATEGORIES 6
75.353 -+#define _GLIBCXX_NUM_CATEGORIES 0
75.354 -+
75.355 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.356 -+namespace __gnu_cxx
75.357 -+{
75.358 -+ extern "C" __typeof(uselocale) __uselocale;
75.359 -+}
75.360 -+#endif
75.361 -+
75.362 -+namespace std
75.363 -+{
75.364 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.365 -+ typedef __locale_t __c_locale;
75.366 -+#else
75.367 -+ typedef int* __c_locale;
75.368 -+#endif
75.369 -+
75.370 -+ // Convert numeric value of type _Tv to string and return length of
75.371 -+ // string. If snprintf is available use it, otherwise fall back to
75.372 -+ // the unsafe sprintf which, in general, can be dangerous and should
75.373 -+ // be avoided.
75.374 -+ template<typename _Tv>
75.375 -+ int
75.376 -+ __convert_from_v(char* __out,
75.377 -+ const int __size __attribute__ ((__unused__)),
75.378 -+ const char* __fmt,
75.379 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.380 -+ _Tv __v, const __c_locale& __cloc, int __prec)
75.381 -+ {
75.382 -+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
75.383 -+#else
75.384 -+ _Tv __v, const __c_locale&, int __prec)
75.385 -+ {
75.386 -+# ifdef __UCLIBC_HAS_LOCALE__
75.387 -+ char* __old = std::setlocale(LC_ALL, NULL);
75.388 -+ char* __sav = new char[std::strlen(__old) + 1];
75.389 -+ std::strcpy(__sav, __old);
75.390 -+ std::setlocale(LC_ALL, "C");
75.391 -+# endif
75.392 -+#endif
75.393 -+
75.394 -+ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
75.395 -+
75.396 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.397 -+ __gnu_cxx::__uselocale(__old);
75.398 -+#elif defined __UCLIBC_HAS_LOCALE__
75.399 -+ std::setlocale(LC_ALL, __sav);
75.400 -+ delete [] __sav;
75.401 -+#endif
75.402 -+ return __ret;
75.403 -+ }
75.404 -+}
75.405 -+
75.406 -+#endif
75.407 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
75.408 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
75.409 -@@ -0,0 +1,306 @@
75.410 -+// std::codecvt implementation details, GNU version -*- C++ -*-
75.411 -+
75.412 -+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
75.413 -+//
75.414 -+// This file is part of the GNU ISO C++ Library. This library is free
75.415 -+// software; you can redistribute it and/or modify it under the
75.416 -+// terms of the GNU General Public License as published by the
75.417 -+// Free Software Foundation; either version 2, or (at your option)
75.418 -+// any later version.
75.419 -+
75.420 -+// This library is distributed in the hope that it will be useful,
75.421 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.422 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.423 -+// GNU General Public License for more details.
75.424 -+
75.425 -+// You should have received a copy of the GNU General Public License along
75.426 -+// with this library; see the file COPYING. If not, write to the Free
75.427 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.428 -+// USA.
75.429 -+
75.430 -+// As a special exception, you may use this file as part of a free software
75.431 -+// library without restriction. Specifically, if other files instantiate
75.432 -+// templates or use macros or inline functions from this file, or you compile
75.433 -+// this file and link it with other files to produce an executable, this
75.434 -+// file does not by itself cause the resulting executable to be covered by
75.435 -+// the GNU General Public License. This exception does not however
75.436 -+// invalidate any other reasons why the executable file might be covered by
75.437 -+// the GNU General Public License.
75.438 -+
75.439 -+//
75.440 -+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
75.441 -+//
75.442 -+
75.443 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.444 -+
75.445 -+#include <locale>
75.446 -+#include <bits/c++locale_internal.h>
75.447 -+
75.448 -+namespace std
75.449 -+{
75.450 -+ // Specializations.
75.451 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.452 -+ codecvt_base::result
75.453 -+ codecvt<wchar_t, char, mbstate_t>::
75.454 -+ do_out(state_type& __state, const intern_type* __from,
75.455 -+ const intern_type* __from_end, const intern_type*& __from_next,
75.456 -+ extern_type* __to, extern_type* __to_end,
75.457 -+ extern_type*& __to_next) const
75.458 -+ {
75.459 -+ result __ret = ok;
75.460 -+ state_type __tmp_state(__state);
75.461 -+
75.462 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.463 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
75.464 -+#endif
75.465 -+
75.466 -+ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
75.467 -+ // in case we fall back to wcrtomb and then continue, in a loop.
75.468 -+ // NB: wcsnrtombs is a GNU extension
75.469 -+ for (__from_next = __from, __to_next = __to;
75.470 -+ __from_next < __from_end && __to_next < __to_end
75.471 -+ && __ret == ok;)
75.472 -+ {
75.473 -+ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
75.474 -+ __from_end - __from_next);
75.475 -+ if (!__from_chunk_end)
75.476 -+ __from_chunk_end = __from_end;
75.477 -+
75.478 -+ __from = __from_next;
75.479 -+ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
75.480 -+ __from_chunk_end - __from_next,
75.481 -+ __to_end - __to_next, &__state);
75.482 -+ if (__conv == static_cast<size_t>(-1))
75.483 -+ {
75.484 -+ // In case of error, in order to stop at the exact place we
75.485 -+ // have to start again from the beginning with a series of
75.486 -+ // wcrtomb.
75.487 -+ for (; __from < __from_next; ++__from)
75.488 -+ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
75.489 -+ __state = __tmp_state;
75.490 -+ __ret = error;
75.491 -+ }
75.492 -+ else if (__from_next && __from_next < __from_chunk_end)
75.493 -+ {
75.494 -+ __to_next += __conv;
75.495 -+ __ret = partial;
75.496 -+ }
75.497 -+ else
75.498 -+ {
75.499 -+ __from_next = __from_chunk_end;
75.500 -+ __to_next += __conv;
75.501 -+ }
75.502 -+
75.503 -+ if (__from_next < __from_end && __ret == ok)
75.504 -+ {
75.505 -+ extern_type __buf[MB_LEN_MAX];
75.506 -+ __tmp_state = __state;
75.507 -+ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
75.508 -+ if (__conv > static_cast<size_t>(__to_end - __to_next))
75.509 -+ __ret = partial;
75.510 -+ else
75.511 -+ {
75.512 -+ memcpy(__to_next, __buf, __conv);
75.513 -+ __state = __tmp_state;
75.514 -+ __to_next += __conv;
75.515 -+ ++__from_next;
75.516 -+ }
75.517 -+ }
75.518 -+ }
75.519 -+
75.520 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.521 -+ __uselocale(__old);
75.522 -+#endif
75.523 -+
75.524 -+ return __ret;
75.525 -+ }
75.526 -+
75.527 -+ codecvt_base::result
75.528 -+ codecvt<wchar_t, char, mbstate_t>::
75.529 -+ do_in(state_type& __state, const extern_type* __from,
75.530 -+ const extern_type* __from_end, const extern_type*& __from_next,
75.531 -+ intern_type* __to, intern_type* __to_end,
75.532 -+ intern_type*& __to_next) const
75.533 -+ {
75.534 -+ result __ret = ok;
75.535 -+ state_type __tmp_state(__state);
75.536 -+
75.537 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.538 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
75.539 -+#endif
75.540 -+
75.541 -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
75.542 -+ // in case we store a L'\0' and then continue, in a loop.
75.543 -+ // NB: mbsnrtowcs is a GNU extension
75.544 -+ for (__from_next = __from, __to_next = __to;
75.545 -+ __from_next < __from_end && __to_next < __to_end
75.546 -+ && __ret == ok;)
75.547 -+ {
75.548 -+ const extern_type* __from_chunk_end;
75.549 -+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
75.550 -+ __from_end
75.551 -+ - __from_next));
75.552 -+ if (!__from_chunk_end)
75.553 -+ __from_chunk_end = __from_end;
75.554 -+
75.555 -+ __from = __from_next;
75.556 -+ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
75.557 -+ __from_chunk_end - __from_next,
75.558 -+ __to_end - __to_next, &__state);
75.559 -+ if (__conv == static_cast<size_t>(-1))
75.560 -+ {
75.561 -+ // In case of error, in order to stop at the exact place we
75.562 -+ // have to start again from the beginning with a series of
75.563 -+ // mbrtowc.
75.564 -+ for (;; ++__to_next, __from += __conv)
75.565 -+ {
75.566 -+ __conv = mbrtowc(__to_next, __from, __from_end - __from,
75.567 -+ &__tmp_state);
75.568 -+ if (__conv == static_cast<size_t>(-1)
75.569 -+ || __conv == static_cast<size_t>(-2))
75.570 -+ break;
75.571 -+ }
75.572 -+ __from_next = __from;
75.573 -+ __state = __tmp_state;
75.574 -+ __ret = error;
75.575 -+ }
75.576 -+ else if (__from_next && __from_next < __from_chunk_end)
75.577 -+ {
75.578 -+ // It is unclear what to return in this case (see DR 382).
75.579 -+ __to_next += __conv;
75.580 -+ __ret = partial;
75.581 -+ }
75.582 -+ else
75.583 -+ {
75.584 -+ __from_next = __from_chunk_end;
75.585 -+ __to_next += __conv;
75.586 -+ }
75.587 -+
75.588 -+ if (__from_next < __from_end && __ret == ok)
75.589 -+ {
75.590 -+ if (__to_next < __to_end)
75.591 -+ {
75.592 -+ // XXX Probably wrong for stateful encodings
75.593 -+ __tmp_state = __state;
75.594 -+ ++__from_next;
75.595 -+ *__to_next++ = L'\0';
75.596 -+ }
75.597 -+ else
75.598 -+ __ret = partial;
75.599 -+ }
75.600 -+ }
75.601 -+
75.602 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.603 -+ __uselocale(__old);
75.604 -+#endif
75.605 -+
75.606 -+ return __ret;
75.607 -+ }
75.608 -+
75.609 -+ int
75.610 -+ codecvt<wchar_t, char, mbstate_t>::
75.611 -+ do_encoding() const throw()
75.612 -+ {
75.613 -+ // XXX This implementation assumes that the encoding is
75.614 -+ // stateless and is either single-byte or variable-width.
75.615 -+ int __ret = 0;
75.616 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.617 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
75.618 -+#endif
75.619 -+ if (MB_CUR_MAX == 1)
75.620 -+ __ret = 1;
75.621 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.622 -+ __uselocale(__old);
75.623 -+#endif
75.624 -+ return __ret;
75.625 -+ }
75.626 -+
75.627 -+ int
75.628 -+ codecvt<wchar_t, char, mbstate_t>::
75.629 -+ do_max_length() const throw()
75.630 -+ {
75.631 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.632 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
75.633 -+#endif
75.634 -+ // XXX Probably wrong for stateful encodings.
75.635 -+ int __ret = MB_CUR_MAX;
75.636 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.637 -+ __uselocale(__old);
75.638 -+#endif
75.639 -+ return __ret;
75.640 -+ }
75.641 -+
75.642 -+ int
75.643 -+ codecvt<wchar_t, char, mbstate_t>::
75.644 -+ do_length(state_type& __state, const extern_type* __from,
75.645 -+ const extern_type* __end, size_t __max) const
75.646 -+ {
75.647 -+ int __ret = 0;
75.648 -+ state_type __tmp_state(__state);
75.649 -+
75.650 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.651 -+ __c_locale __old = __uselocale(_M_c_locale_codecvt);
75.652 -+#endif
75.653 -+
75.654 -+ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
75.655 -+ // in case we advance past it and then continue, in a loop.
75.656 -+ // NB: mbsnrtowcs is a GNU extension
75.657 -+
75.658 -+ // A dummy internal buffer is needed in order for mbsnrtocws to consider
75.659 -+ // its fourth parameter (it wouldn't with NULL as first parameter).
75.660 -+ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
75.661 -+ * __max));
75.662 -+ while (__from < __end && __max)
75.663 -+ {
75.664 -+ const extern_type* __from_chunk_end;
75.665 -+ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
75.666 -+ __end
75.667 -+ - __from));
75.668 -+ if (!__from_chunk_end)
75.669 -+ __from_chunk_end = __end;
75.670 -+
75.671 -+ const extern_type* __tmp_from = __from;
75.672 -+ size_t __conv = mbsnrtowcs(__to, &__from,
75.673 -+ __from_chunk_end - __from,
75.674 -+ __max, &__state);
75.675 -+ if (__conv == static_cast<size_t>(-1))
75.676 -+ {
75.677 -+ // In case of error, in order to stop at the exact place we
75.678 -+ // have to start again from the beginning with a series of
75.679 -+ // mbrtowc.
75.680 -+ for (__from = __tmp_from;; __from += __conv)
75.681 -+ {
75.682 -+ __conv = mbrtowc(NULL, __from, __end - __from,
75.683 -+ &__tmp_state);
75.684 -+ if (__conv == static_cast<size_t>(-1)
75.685 -+ || __conv == static_cast<size_t>(-2))
75.686 -+ break;
75.687 -+ }
75.688 -+ __state = __tmp_state;
75.689 -+ __ret += __from - __tmp_from;
75.690 -+ break;
75.691 -+ }
75.692 -+ if (!__from)
75.693 -+ __from = __from_chunk_end;
75.694 -+
75.695 -+ __ret += __from - __tmp_from;
75.696 -+ __max -= __conv;
75.697 -+
75.698 -+ if (__from < __end && __max)
75.699 -+ {
75.700 -+ // XXX Probably wrong for stateful encodings
75.701 -+ __tmp_state = __state;
75.702 -+ ++__from;
75.703 -+ ++__ret;
75.704 -+ --__max;
75.705 -+ }
75.706 -+ }
75.707 -+
75.708 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.709 -+ __uselocale(__old);
75.710 -+#endif
75.711 -+
75.712 -+ return __ret;
75.713 -+ }
75.714 -+#endif
75.715 -+}
75.716 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/collate_members.cc
75.717 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/collate_members.cc
75.718 -@@ -0,0 +1,80 @@
75.719 -+// std::collate implementation details, GNU version -*- C++ -*-
75.720 -+
75.721 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
75.722 -+//
75.723 -+// This file is part of the GNU ISO C++ Library. This library is free
75.724 -+// software; you can redistribute it and/or modify it under the
75.725 -+// terms of the GNU General Public License as published by the
75.726 -+// Free Software Foundation; either version 2, or (at your option)
75.727 -+// any later version.
75.728 -+
75.729 -+// This library is distributed in the hope that it will be useful,
75.730 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.731 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.732 -+// GNU General Public License for more details.
75.733 -+
75.734 -+// You should have received a copy of the GNU General Public License along
75.735 -+// with this library; see the file COPYING. If not, write to the Free
75.736 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.737 -+// USA.
75.738 -+
75.739 -+// As a special exception, you may use this file as part of a free software
75.740 -+// library without restriction. Specifically, if other files instantiate
75.741 -+// templates or use macros or inline functions from this file, or you compile
75.742 -+// this file and link it with other files to produce an executable, this
75.743 -+// file does not by itself cause the resulting executable to be covered by
75.744 -+// the GNU General Public License. This exception does not however
75.745 -+// invalidate any other reasons why the executable file might be covered by
75.746 -+// the GNU General Public License.
75.747 -+
75.748 -+//
75.749 -+// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
75.750 -+//
75.751 -+
75.752 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.753 -+
75.754 -+#include <locale>
75.755 -+#include <bits/c++locale_internal.h>
75.756 -+
75.757 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.758 -+#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
75.759 -+#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
75.760 -+#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
75.761 -+#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
75.762 -+#endif
75.763 -+
75.764 -+namespace std
75.765 -+{
75.766 -+ // These are basically extensions to char_traits, and perhaps should
75.767 -+ // be put there instead of here.
75.768 -+ template<>
75.769 -+ int
75.770 -+ collate<char>::_M_compare(const char* __one, const char* __two) const
75.771 -+ {
75.772 -+ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
75.773 -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
75.774 -+ }
75.775 -+
75.776 -+ template<>
75.777 -+ size_t
75.778 -+ collate<char>::_M_transform(char* __to, const char* __from,
75.779 -+ size_t __n) const
75.780 -+ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
75.781 -+
75.782 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.783 -+ template<>
75.784 -+ int
75.785 -+ collate<wchar_t>::_M_compare(const wchar_t* __one,
75.786 -+ const wchar_t* __two) const
75.787 -+ {
75.788 -+ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
75.789 -+ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
75.790 -+ }
75.791 -+
75.792 -+ template<>
75.793 -+ size_t
75.794 -+ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
75.795 -+ size_t __n) const
75.796 -+ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
75.797 -+#endif
75.798 -+}
75.799 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/ctype_members.cc
75.800 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/ctype_members.cc
75.801 -@@ -0,0 +1,314 @@
75.802 -+// std::ctype implementation details, GNU version -*- C++ -*-
75.803 -+
75.804 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
75.805 -+//
75.806 -+// This file is part of the GNU ISO C++ Library. This library is free
75.807 -+// software; you can redistribute it and/or modify it under the
75.808 -+// terms of the GNU General Public License as published by the
75.809 -+// Free Software Foundation; either version 2, or (at your option)
75.810 -+// any later version.
75.811 -+
75.812 -+// This library is distributed in the hope that it will be useful,
75.813 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.814 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.815 -+// GNU General Public License for more details.
75.816 -+
75.817 -+// You should have received a copy of the GNU General Public License along
75.818 -+// with this library; see the file COPYING. If not, write to the Free
75.819 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.820 -+// USA.
75.821 -+
75.822 -+// As a special exception, you may use this file as part of a free software
75.823 -+// library without restriction. Specifically, if other files instantiate
75.824 -+// templates or use macros or inline functions from this file, or you compile
75.825 -+// this file and link it with other files to produce an executable, this
75.826 -+// file does not by itself cause the resulting executable to be covered by
75.827 -+// the GNU General Public License. This exception does not however
75.828 -+// invalidate any other reasons why the executable file might be covered by
75.829 -+// the GNU General Public License.
75.830 -+
75.831 -+//
75.832 -+// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
75.833 -+//
75.834 -+
75.835 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.836 -+
75.837 -+#define _LIBC
75.838 -+#include <locale>
75.839 -+#undef _LIBC
75.840 -+#include <bits/c++locale_internal.h>
75.841 -+
75.842 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.843 -+#define __wctype_l(S, L) wctype((S))
75.844 -+#define __towupper_l(C, L) towupper((C))
75.845 -+#define __towlower_l(C, L) towlower((C))
75.846 -+#define __iswctype_l(C, M, L) iswctype((C), (M))
75.847 -+#endif
75.848 -+
75.849 -+namespace std
75.850 -+{
75.851 -+ // NB: The other ctype<char> specializations are in src/locale.cc and
75.852 -+ // various /config/os/* files.
75.853 -+ template<>
75.854 -+ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
75.855 -+ : ctype<char>(0, false, __refs)
75.856 -+ {
75.857 -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
75.858 -+ {
75.859 -+ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
75.860 -+ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
75.861 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.862 -+ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
75.863 -+ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
75.864 -+ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
75.865 -+#endif
75.866 -+ }
75.867 -+ }
75.868 -+
75.869 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.870 -+ ctype<wchar_t>::__wmask_type
75.871 -+ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
75.872 -+ {
75.873 -+ __wmask_type __ret;
75.874 -+ switch (__m)
75.875 -+ {
75.876 -+ case space:
75.877 -+ __ret = __wctype_l("space", _M_c_locale_ctype);
75.878 -+ break;
75.879 -+ case print:
75.880 -+ __ret = __wctype_l("print", _M_c_locale_ctype);
75.881 -+ break;
75.882 -+ case cntrl:
75.883 -+ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
75.884 -+ break;
75.885 -+ case upper:
75.886 -+ __ret = __wctype_l("upper", _M_c_locale_ctype);
75.887 -+ break;
75.888 -+ case lower:
75.889 -+ __ret = __wctype_l("lower", _M_c_locale_ctype);
75.890 -+ break;
75.891 -+ case alpha:
75.892 -+ __ret = __wctype_l("alpha", _M_c_locale_ctype);
75.893 -+ break;
75.894 -+ case digit:
75.895 -+ __ret = __wctype_l("digit", _M_c_locale_ctype);
75.896 -+ break;
75.897 -+ case punct:
75.898 -+ __ret = __wctype_l("punct", _M_c_locale_ctype);
75.899 -+ break;
75.900 -+ case xdigit:
75.901 -+ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
75.902 -+ break;
75.903 -+ case alnum:
75.904 -+ __ret = __wctype_l("alnum", _M_c_locale_ctype);
75.905 -+ break;
75.906 -+ case graph:
75.907 -+ __ret = __wctype_l("graph", _M_c_locale_ctype);
75.908 -+ break;
75.909 -+ default:
75.910 -+ __ret = __wmask_type();
75.911 -+ }
75.912 -+ return __ret;
75.913 -+ }
75.914 -+
75.915 -+ wchar_t
75.916 -+ ctype<wchar_t>::do_toupper(wchar_t __c) const
75.917 -+ { return __towupper_l(__c, _M_c_locale_ctype); }
75.918 -+
75.919 -+ const wchar_t*
75.920 -+ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
75.921 -+ {
75.922 -+ while (__lo < __hi)
75.923 -+ {
75.924 -+ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
75.925 -+ ++__lo;
75.926 -+ }
75.927 -+ return __hi;
75.928 -+ }
75.929 -+
75.930 -+ wchar_t
75.931 -+ ctype<wchar_t>::do_tolower(wchar_t __c) const
75.932 -+ { return __towlower_l(__c, _M_c_locale_ctype); }
75.933 -+
75.934 -+ const wchar_t*
75.935 -+ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
75.936 -+ {
75.937 -+ while (__lo < __hi)
75.938 -+ {
75.939 -+ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
75.940 -+ ++__lo;
75.941 -+ }
75.942 -+ return __hi;
75.943 -+ }
75.944 -+
75.945 -+ bool
75.946 -+ ctype<wchar_t>::
75.947 -+ do_is(mask __m, wchar_t __c) const
75.948 -+ {
75.949 -+ // The case of __m == ctype_base::space is particularly important,
75.950 -+ // due to its use in many istream functions. Therefore we deal with
75.951 -+ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
75.952 -+ // is the mask corresponding to ctype_base::space. NB: an encoding
75.953 -+ // change would not affect correctness!
75.954 -+ bool __ret = false;
75.955 -+ if (__m == _M_bit[5])
75.956 -+ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
75.957 -+ else
75.958 -+ {
75.959 -+ // Highest bitmask in ctype_base == 10, but extra in "C"
75.960 -+ // library for blank.
75.961 -+ const size_t __bitmasksize = 11;
75.962 -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
75.963 -+ if (__m & _M_bit[__bitcur])
75.964 -+ {
75.965 -+ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
75.966 -+ {
75.967 -+ __ret = true;
75.968 -+ break;
75.969 -+ }
75.970 -+ else if (__m == _M_bit[__bitcur])
75.971 -+ break;
75.972 -+ }
75.973 -+ }
75.974 -+ return __ret;
75.975 -+ }
75.976 -+
75.977 -+ const wchar_t*
75.978 -+ ctype<wchar_t>::
75.979 -+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
75.980 -+ {
75.981 -+ for (; __lo < __hi; ++__vec, ++__lo)
75.982 -+ {
75.983 -+ // Highest bitmask in ctype_base == 10, but extra in "C"
75.984 -+ // library for blank.
75.985 -+ const size_t __bitmasksize = 11;
75.986 -+ mask __m = 0;
75.987 -+ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
75.988 -+ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
75.989 -+ __m |= _M_bit[__bitcur];
75.990 -+ *__vec = __m;
75.991 -+ }
75.992 -+ return __hi;
75.993 -+ }
75.994 -+
75.995 -+ const wchar_t*
75.996 -+ ctype<wchar_t>::
75.997 -+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
75.998 -+ {
75.999 -+ while (__lo < __hi && !this->do_is(__m, *__lo))
75.1000 -+ ++__lo;
75.1001 -+ return __lo;
75.1002 -+ }
75.1003 -+
75.1004 -+ const wchar_t*
75.1005 -+ ctype<wchar_t>::
75.1006 -+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
75.1007 -+ {
75.1008 -+ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
75.1009 -+ ++__lo;
75.1010 -+ return __lo;
75.1011 -+ }
75.1012 -+
75.1013 -+ wchar_t
75.1014 -+ ctype<wchar_t>::
75.1015 -+ do_widen(char __c) const
75.1016 -+ { return _M_widen[static_cast<unsigned char>(__c)]; }
75.1017 -+
75.1018 -+ const char*
75.1019 -+ ctype<wchar_t>::
75.1020 -+ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
75.1021 -+ {
75.1022 -+ while (__lo < __hi)
75.1023 -+ {
75.1024 -+ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
75.1025 -+ ++__lo;
75.1026 -+ ++__dest;
75.1027 -+ }
75.1028 -+ return __hi;
75.1029 -+ }
75.1030 -+
75.1031 -+ char
75.1032 -+ ctype<wchar_t>::
75.1033 -+ do_narrow(wchar_t __wc, char __dfault) const
75.1034 -+ {
75.1035 -+ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
75.1036 -+ return _M_narrow[__wc];
75.1037 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1038 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
75.1039 -+#endif
75.1040 -+ const int __c = wctob(__wc);
75.1041 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1042 -+ __uselocale(__old);
75.1043 -+#endif
75.1044 -+ return (__c == EOF ? __dfault : static_cast<char>(__c));
75.1045 -+ }
75.1046 -+
75.1047 -+ const wchar_t*
75.1048 -+ ctype<wchar_t>::
75.1049 -+ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
75.1050 -+ char* __dest) const
75.1051 -+ {
75.1052 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1053 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
75.1054 -+#endif
75.1055 -+ if (_M_narrow_ok)
75.1056 -+ while (__lo < __hi)
75.1057 -+ {
75.1058 -+ if (*__lo >= 0 && *__lo < 128)
75.1059 -+ *__dest = _M_narrow[*__lo];
75.1060 -+ else
75.1061 -+ {
75.1062 -+ const int __c = wctob(*__lo);
75.1063 -+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
75.1064 -+ }
75.1065 -+ ++__lo;
75.1066 -+ ++__dest;
75.1067 -+ }
75.1068 -+ else
75.1069 -+ while (__lo < __hi)
75.1070 -+ {
75.1071 -+ const int __c = wctob(*__lo);
75.1072 -+ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
75.1073 -+ ++__lo;
75.1074 -+ ++__dest;
75.1075 -+ }
75.1076 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1077 -+ __uselocale(__old);
75.1078 -+#endif
75.1079 -+ return __hi;
75.1080 -+ }
75.1081 -+
75.1082 -+ void
75.1083 -+ ctype<wchar_t>::_M_initialize_ctype()
75.1084 -+ {
75.1085 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1086 -+ __c_locale __old = __uselocale(_M_c_locale_ctype);
75.1087 -+#endif
75.1088 -+ wint_t __i;
75.1089 -+ for (__i = 0; __i < 128; ++__i)
75.1090 -+ {
75.1091 -+ const int __c = wctob(__i);
75.1092 -+ if (__c == EOF)
75.1093 -+ break;
75.1094 -+ else
75.1095 -+ _M_narrow[__i] = static_cast<char>(__c);
75.1096 -+ }
75.1097 -+ if (__i == 128)
75.1098 -+ _M_narrow_ok = true;
75.1099 -+ else
75.1100 -+ _M_narrow_ok = false;
75.1101 -+ for (size_t __j = 0;
75.1102 -+ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
75.1103 -+ _M_widen[__j] = btowc(__j);
75.1104 -+
75.1105 -+ for (size_t __k = 0; __k <= 11; ++__k)
75.1106 -+ {
75.1107 -+ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
75.1108 -+ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
75.1109 -+ }
75.1110 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1111 -+ __uselocale(__old);
75.1112 -+#endif
75.1113 -+ }
75.1114 -+#endif // _GLIBCXX_USE_WCHAR_T
75.1115 -+}
75.1116 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.cc
75.1117 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.cc
75.1118 -@@ -0,0 +1,100 @@
75.1119 -+// std::messages implementation details, GNU version -*- C++ -*-
75.1120 -+
75.1121 -+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
75.1122 -+//
75.1123 -+// This file is part of the GNU ISO C++ Library. This library is free
75.1124 -+// software; you can redistribute it and/or modify it under the
75.1125 -+// terms of the GNU General Public License as published by the
75.1126 -+// Free Software Foundation; either version 2, or (at your option)
75.1127 -+// any later version.
75.1128 -+
75.1129 -+// This library is distributed in the hope that it will be useful,
75.1130 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.1131 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.1132 -+// GNU General Public License for more details.
75.1133 -+
75.1134 -+// You should have received a copy of the GNU General Public License along
75.1135 -+// with this library; see the file COPYING. If not, write to the Free
75.1136 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.1137 -+// USA.
75.1138 -+
75.1139 -+// As a special exception, you may use this file as part of a free software
75.1140 -+// library without restriction. Specifically, if other files instantiate
75.1141 -+// templates or use macros or inline functions from this file, or you compile
75.1142 -+// this file and link it with other files to produce an executable, this
75.1143 -+// file does not by itself cause the resulting executable to be covered by
75.1144 -+// the GNU General Public License. This exception does not however
75.1145 -+// invalidate any other reasons why the executable file might be covered by
75.1146 -+// the GNU General Public License.
75.1147 -+
75.1148 -+//
75.1149 -+// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
75.1150 -+//
75.1151 -+
75.1152 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.1153 -+
75.1154 -+#include <locale>
75.1155 -+#include <bits/c++locale_internal.h>
75.1156 -+
75.1157 -+#ifdef __UCLIBC_MJN3_ONLY__
75.1158 -+#warning fix gettext stuff
75.1159 -+#endif
75.1160 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
75.1161 -+extern "C" char *__dcgettext(const char *domainname,
75.1162 -+ const char *msgid, int category);
75.1163 -+#undef gettext
75.1164 -+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
75.1165 -+#else
75.1166 -+#undef gettext
75.1167 -+#define gettext(msgid) (msgid)
75.1168 -+#endif
75.1169 -+
75.1170 -+namespace std
75.1171 -+{
75.1172 -+ // Specializations.
75.1173 -+ template<>
75.1174 -+ string
75.1175 -+ messages<char>::do_get(catalog, int, int, const string& __dfault) const
75.1176 -+ {
75.1177 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1178 -+ __c_locale __old = __uselocale(_M_c_locale_messages);
75.1179 -+ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
75.1180 -+ __uselocale(__old);
75.1181 -+ return string(__msg);
75.1182 -+#elif defined __UCLIBC_HAS_LOCALE__
75.1183 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.1184 -+ setlocale(LC_ALL, _M_name_messages);
75.1185 -+ const char* __msg = gettext(__dfault.c_str());
75.1186 -+ setlocale(LC_ALL, __old);
75.1187 -+ free(__old);
75.1188 -+ return string(__msg);
75.1189 -+#else
75.1190 -+ const char* __msg = gettext(__dfault.c_str());
75.1191 -+ return string(__msg);
75.1192 -+#endif
75.1193 -+ }
75.1194 -+
75.1195 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.1196 -+ template<>
75.1197 -+ wstring
75.1198 -+ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
75.1199 -+ {
75.1200 -+# ifdef __UCLIBC_HAS_XLOCALE__
75.1201 -+ __c_locale __old = __uselocale(_M_c_locale_messages);
75.1202 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
75.1203 -+ __uselocale(__old);
75.1204 -+ return _M_convert_from_char(__msg);
75.1205 -+# elif defined __UCLIBC_HAS_LOCALE__
75.1206 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.1207 -+ setlocale(LC_ALL, _M_name_messages);
75.1208 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
75.1209 -+ setlocale(LC_ALL, __old);
75.1210 -+ free(__old);
75.1211 -+ return _M_convert_from_char(__msg);
75.1212 -+# else
75.1213 -+ char* __msg = gettext(_M_convert_to_char(__dfault));
75.1214 -+ return _M_convert_from_char(__msg);
75.1215 -+# endif
75.1216 -+ }
75.1217 -+#endif
75.1218 -+}
75.1219 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/messages_members.h
75.1220 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/messages_members.h
75.1221 -@@ -0,0 +1,121 @@
75.1222 -+// std::messages implementation details, GNU version -*- C++ -*-
75.1223 -+
75.1224 -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
75.1225 -+//
75.1226 -+// This file is part of the GNU ISO C++ Library. This library is free
75.1227 -+// software; you can redistribute it and/or modify it under the
75.1228 -+// terms of the GNU General Public License as published by the
75.1229 -+// Free Software Foundation; either version 2, or (at your option)
75.1230 -+// any later version.
75.1231 -+
75.1232 -+// This library is distributed in the hope that it will be useful,
75.1233 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.1234 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.1235 -+// GNU General Public License for more details.
75.1236 -+
75.1237 -+// You should have received a copy of the GNU General Public License along
75.1238 -+// with this library; see the file COPYING. If not, write to the Free
75.1239 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.1240 -+// USA.
75.1241 -+
75.1242 -+// As a special exception, you may use this file as part of a free software
75.1243 -+// library without restriction. Specifically, if other files instantiate
75.1244 -+// templates or use macros or inline functions from this file, or you compile
75.1245 -+// this file and link it with other files to produce an executable, this
75.1246 -+// file does not by itself cause the resulting executable to be covered by
75.1247 -+// the GNU General Public License. This exception does not however
75.1248 -+// invalidate any other reasons why the executable file might be covered by
75.1249 -+// the GNU General Public License.
75.1250 -+
75.1251 -+//
75.1252 -+// ISO C++ 14882: 22.2.7.1.2 messages functions
75.1253 -+//
75.1254 -+
75.1255 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.1256 -+
75.1257 -+#ifdef __UCLIBC_MJN3_ONLY__
75.1258 -+#warning fix prototypes for *textdomain funcs
75.1259 -+#endif
75.1260 -+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
75.1261 -+extern "C" char *__textdomain(const char *domainname);
75.1262 -+extern "C" char *__bindtextdomain(const char *domainname,
75.1263 -+ const char *dirname);
75.1264 -+#else
75.1265 -+#undef __textdomain
75.1266 -+#undef __bindtextdomain
75.1267 -+#define __textdomain(D) ((void)0)
75.1268 -+#define __bindtextdomain(D,P) ((void)0)
75.1269 -+#endif
75.1270 -+
75.1271 -+ // Non-virtual member functions.
75.1272 -+ template<typename _CharT>
75.1273 -+ messages<_CharT>::messages(size_t __refs)
75.1274 -+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
75.1275 -+ _M_name_messages(_S_get_c_name())
75.1276 -+ { }
75.1277 -+
75.1278 -+ template<typename _CharT>
75.1279 -+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
75.1280 -+ size_t __refs)
75.1281 -+ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
75.1282 -+ {
75.1283 -+ const size_t __len = std::strlen(__s) + 1;
75.1284 -+ char* __tmp = new char[__len];
75.1285 -+ std::memcpy(__tmp, __s, __len);
75.1286 -+ _M_name_messages = __tmp;
75.1287 -+
75.1288 -+ // Last to avoid leaking memory if new throws.
75.1289 -+ _M_c_locale_messages = _S_clone_c_locale(__cloc);
75.1290 -+ }
75.1291 -+
75.1292 -+ template<typename _CharT>
75.1293 -+ typename messages<_CharT>::catalog
75.1294 -+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
75.1295 -+ const char* __dir) const
75.1296 -+ {
75.1297 -+ __bindtextdomain(__s.c_str(), __dir);
75.1298 -+ return this->do_open(__s, __loc);
75.1299 -+ }
75.1300 -+
75.1301 -+ // Virtual member functions.
75.1302 -+ template<typename _CharT>
75.1303 -+ messages<_CharT>::~messages()
75.1304 -+ {
75.1305 -+ if (_M_name_messages != _S_get_c_name())
75.1306 -+ delete [] _M_name_messages;
75.1307 -+ _S_destroy_c_locale(_M_c_locale_messages);
75.1308 -+ }
75.1309 -+
75.1310 -+ template<typename _CharT>
75.1311 -+ typename messages<_CharT>::catalog
75.1312 -+ messages<_CharT>::do_open(const basic_string<char>& __s,
75.1313 -+ const locale&) const
75.1314 -+ {
75.1315 -+ // No error checking is done, assume the catalog exists and can
75.1316 -+ // be used.
75.1317 -+ __textdomain(__s.c_str());
75.1318 -+ return 0;
75.1319 -+ }
75.1320 -+
75.1321 -+ template<typename _CharT>
75.1322 -+ void
75.1323 -+ messages<_CharT>::do_close(catalog) const
75.1324 -+ { }
75.1325 -+
75.1326 -+ // messages_byname
75.1327 -+ template<typename _CharT>
75.1328 -+ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
75.1329 -+ : messages<_CharT>(__refs)
75.1330 -+ {
75.1331 -+ if (this->_M_name_messages != locale::facet::_S_get_c_name())
75.1332 -+ delete [] this->_M_name_messages;
75.1333 -+ char* __tmp = new char[std::strlen(__s) + 1];
75.1334 -+ std::strcpy(__tmp, __s);
75.1335 -+ this->_M_name_messages = __tmp;
75.1336 -+
75.1337 -+ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
75.1338 -+ {
75.1339 -+ this->_S_destroy_c_locale(this->_M_c_locale_messages);
75.1340 -+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
75.1341 -+ }
75.1342 -+ }
75.1343 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/monetary_members.cc
75.1344 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/monetary_members.cc
75.1345 -@@ -0,0 +1,692 @@
75.1346 -+// std::moneypunct implementation details, GNU version -*- C++ -*-
75.1347 -+
75.1348 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
75.1349 -+//
75.1350 -+// This file is part of the GNU ISO C++ Library. This library is free
75.1351 -+// software; you can redistribute it and/or modify it under the
75.1352 -+// terms of the GNU General Public License as published by the
75.1353 -+// Free Software Foundation; either version 2, or (at your option)
75.1354 -+// any later version.
75.1355 -+
75.1356 -+// This library is distributed in the hope that it will be useful,
75.1357 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.1358 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.1359 -+// GNU General Public License for more details.
75.1360 -+
75.1361 -+// You should have received a copy of the GNU General Public License along
75.1362 -+// with this library; see the file COPYING. If not, write to the Free
75.1363 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.1364 -+// USA.
75.1365 -+
75.1366 -+// As a special exception, you may use this file as part of a free software
75.1367 -+// library without restriction. Specifically, if other files instantiate
75.1368 -+// templates or use macros or inline functions from this file, or you compile
75.1369 -+// this file and link it with other files to produce an executable, this
75.1370 -+// file does not by itself cause the resulting executable to be covered by
75.1371 -+// the GNU General Public License. This exception does not however
75.1372 -+// invalidate any other reasons why the executable file might be covered by
75.1373 -+// the GNU General Public License.
75.1374 -+
75.1375 -+//
75.1376 -+// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
75.1377 -+//
75.1378 -+
75.1379 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.1380 -+
75.1381 -+#define _LIBC
75.1382 -+#include <locale>
75.1383 -+#undef _LIBC
75.1384 -+#include <bits/c++locale_internal.h>
75.1385 -+
75.1386 -+#ifdef __UCLIBC_MJN3_ONLY__
75.1387 -+#warning optimize this for uclibc
75.1388 -+#warning tailor for stub locale support
75.1389 -+#endif
75.1390 -+
75.1391 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.1392 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
75.1393 -+#endif
75.1394 -+
75.1395 -+namespace std
75.1396 -+{
75.1397 -+ // Construct and return valid pattern consisting of some combination of:
75.1398 -+ // space none symbol sign value
75.1399 -+ money_base::pattern
75.1400 -+ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
75.1401 -+ {
75.1402 -+ pattern __ret;
75.1403 -+
75.1404 -+ // This insanely complicated routine attempts to construct a valid
75.1405 -+ // pattern for use with monyepunct. A couple of invariants:
75.1406 -+
75.1407 -+ // if (__precedes) symbol -> value
75.1408 -+ // else value -> symbol
75.1409 -+
75.1410 -+ // if (__space) space
75.1411 -+ // else none
75.1412 -+
75.1413 -+ // none == never first
75.1414 -+ // space never first or last
75.1415 -+
75.1416 -+ // Any elegant implementations of this are welcome.
75.1417 -+ switch (__posn)
75.1418 -+ {
75.1419 -+ case 0:
75.1420 -+ case 1:
75.1421 -+ // 1 The sign precedes the value and symbol.
75.1422 -+ __ret.field[0] = sign;
75.1423 -+ if (__space)
75.1424 -+ {
75.1425 -+ // Pattern starts with sign.
75.1426 -+ if (__precedes)
75.1427 -+ {
75.1428 -+ __ret.field[1] = symbol;
75.1429 -+ __ret.field[3] = value;
75.1430 -+ }
75.1431 -+ else
75.1432 -+ {
75.1433 -+ __ret.field[1] = value;
75.1434 -+ __ret.field[3] = symbol;
75.1435 -+ }
75.1436 -+ __ret.field[2] = space;
75.1437 -+ }
75.1438 -+ else
75.1439 -+ {
75.1440 -+ // Pattern starts with sign and ends with none.
75.1441 -+ if (__precedes)
75.1442 -+ {
75.1443 -+ __ret.field[1] = symbol;
75.1444 -+ __ret.field[2] = value;
75.1445 -+ }
75.1446 -+ else
75.1447 -+ {
75.1448 -+ __ret.field[1] = value;
75.1449 -+ __ret.field[2] = symbol;
75.1450 -+ }
75.1451 -+ __ret.field[3] = none;
75.1452 -+ }
75.1453 -+ break;
75.1454 -+ case 2:
75.1455 -+ // 2 The sign follows the value and symbol.
75.1456 -+ if (__space)
75.1457 -+ {
75.1458 -+ // Pattern either ends with sign.
75.1459 -+ if (__precedes)
75.1460 -+ {
75.1461 -+ __ret.field[0] = symbol;
75.1462 -+ __ret.field[2] = value;
75.1463 -+ }
75.1464 -+ else
75.1465 -+ {
75.1466 -+ __ret.field[0] = value;
75.1467 -+ __ret.field[2] = symbol;
75.1468 -+ }
75.1469 -+ __ret.field[1] = space;
75.1470 -+ __ret.field[3] = sign;
75.1471 -+ }
75.1472 -+ else
75.1473 -+ {
75.1474 -+ // Pattern ends with sign then none.
75.1475 -+ if (__precedes)
75.1476 -+ {
75.1477 -+ __ret.field[0] = symbol;
75.1478 -+ __ret.field[1] = value;
75.1479 -+ }
75.1480 -+ else
75.1481 -+ {
75.1482 -+ __ret.field[0] = value;
75.1483 -+ __ret.field[1] = symbol;
75.1484 -+ }
75.1485 -+ __ret.field[2] = sign;
75.1486 -+ __ret.field[3] = none;
75.1487 -+ }
75.1488 -+ break;
75.1489 -+ case 3:
75.1490 -+ // 3 The sign immediately precedes the symbol.
75.1491 -+ if (__precedes)
75.1492 -+ {
75.1493 -+ __ret.field[0] = sign;
75.1494 -+ __ret.field[1] = symbol;
75.1495 -+ if (__space)
75.1496 -+ {
75.1497 -+ __ret.field[2] = space;
75.1498 -+ __ret.field[3] = value;
75.1499 -+ }
75.1500 -+ else
75.1501 -+ {
75.1502 -+ __ret.field[2] = value;
75.1503 -+ __ret.field[3] = none;
75.1504 -+ }
75.1505 -+ }
75.1506 -+ else
75.1507 -+ {
75.1508 -+ __ret.field[0] = value;
75.1509 -+ if (__space)
75.1510 -+ {
75.1511 -+ __ret.field[1] = space;
75.1512 -+ __ret.field[2] = sign;
75.1513 -+ __ret.field[3] = symbol;
75.1514 -+ }
75.1515 -+ else
75.1516 -+ {
75.1517 -+ __ret.field[1] = sign;
75.1518 -+ __ret.field[2] = symbol;
75.1519 -+ __ret.field[3] = none;
75.1520 -+ }
75.1521 -+ }
75.1522 -+ break;
75.1523 -+ case 4:
75.1524 -+ // 4 The sign immediately follows the symbol.
75.1525 -+ if (__precedes)
75.1526 -+ {
75.1527 -+ __ret.field[0] = symbol;
75.1528 -+ __ret.field[1] = sign;
75.1529 -+ if (__space)
75.1530 -+ {
75.1531 -+ __ret.field[2] = space;
75.1532 -+ __ret.field[3] = value;
75.1533 -+ }
75.1534 -+ else
75.1535 -+ {
75.1536 -+ __ret.field[2] = value;
75.1537 -+ __ret.field[3] = none;
75.1538 -+ }
75.1539 -+ }
75.1540 -+ else
75.1541 -+ {
75.1542 -+ __ret.field[0] = value;
75.1543 -+ if (__space)
75.1544 -+ {
75.1545 -+ __ret.field[1] = space;
75.1546 -+ __ret.field[2] = symbol;
75.1547 -+ __ret.field[3] = sign;
75.1548 -+ }
75.1549 -+ else
75.1550 -+ {
75.1551 -+ __ret.field[1] = symbol;
75.1552 -+ __ret.field[2] = sign;
75.1553 -+ __ret.field[3] = none;
75.1554 -+ }
75.1555 -+ }
75.1556 -+ break;
75.1557 -+ default:
75.1558 -+ __ret = pattern();
75.1559 -+ }
75.1560 -+ return __ret;
75.1561 -+ }
75.1562 -+
75.1563 -+ template<>
75.1564 -+ void
75.1565 -+ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
75.1566 -+ const char*)
75.1567 -+ {
75.1568 -+ if (!_M_data)
75.1569 -+ _M_data = new __moneypunct_cache<char, true>;
75.1570 -+
75.1571 -+ if (!__cloc)
75.1572 -+ {
75.1573 -+ // "C" locale
75.1574 -+ _M_data->_M_decimal_point = '.';
75.1575 -+ _M_data->_M_thousands_sep = ',';
75.1576 -+ _M_data->_M_grouping = "";
75.1577 -+ _M_data->_M_grouping_size = 0;
75.1578 -+ _M_data->_M_curr_symbol = "";
75.1579 -+ _M_data->_M_curr_symbol_size = 0;
75.1580 -+ _M_data->_M_positive_sign = "";
75.1581 -+ _M_data->_M_positive_sign_size = 0;
75.1582 -+ _M_data->_M_negative_sign = "";
75.1583 -+ _M_data->_M_negative_sign_size = 0;
75.1584 -+ _M_data->_M_frac_digits = 0;
75.1585 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
75.1586 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
75.1587 -+
75.1588 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
75.1589 -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
75.1590 -+ }
75.1591 -+ else
75.1592 -+ {
75.1593 -+ // Named locale.
75.1594 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
75.1595 -+ __cloc));
75.1596 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
75.1597 -+ __cloc));
75.1598 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
75.1599 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.1600 -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
75.1601 -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
75.1602 -+
75.1603 -+ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
75.1604 -+ if (!__nposn)
75.1605 -+ _M_data->_M_negative_sign = "()";
75.1606 -+ else
75.1607 -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
75.1608 -+ __cloc);
75.1609 -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
75.1610 -+
75.1611 -+ // _Intl == true
75.1612 -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
75.1613 -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
75.1614 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
75.1615 -+ __cloc));
75.1616 -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
75.1617 -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
75.1618 -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
75.1619 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
75.1620 -+ __pposn);
75.1621 -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
75.1622 -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
75.1623 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
75.1624 -+ __nposn);
75.1625 -+ }
75.1626 -+ }
75.1627 -+
75.1628 -+ template<>
75.1629 -+ void
75.1630 -+ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
75.1631 -+ const char*)
75.1632 -+ {
75.1633 -+ if (!_M_data)
75.1634 -+ _M_data = new __moneypunct_cache<char, false>;
75.1635 -+
75.1636 -+ if (!__cloc)
75.1637 -+ {
75.1638 -+ // "C" locale
75.1639 -+ _M_data->_M_decimal_point = '.';
75.1640 -+ _M_data->_M_thousands_sep = ',';
75.1641 -+ _M_data->_M_grouping = "";
75.1642 -+ _M_data->_M_grouping_size = 0;
75.1643 -+ _M_data->_M_curr_symbol = "";
75.1644 -+ _M_data->_M_curr_symbol_size = 0;
75.1645 -+ _M_data->_M_positive_sign = "";
75.1646 -+ _M_data->_M_positive_sign_size = 0;
75.1647 -+ _M_data->_M_negative_sign = "";
75.1648 -+ _M_data->_M_negative_sign_size = 0;
75.1649 -+ _M_data->_M_frac_digits = 0;
75.1650 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
75.1651 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
75.1652 -+
75.1653 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
75.1654 -+ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
75.1655 -+ }
75.1656 -+ else
75.1657 -+ {
75.1658 -+ // Named locale.
75.1659 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
75.1660 -+ __cloc));
75.1661 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
75.1662 -+ __cloc));
75.1663 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
75.1664 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.1665 -+ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
75.1666 -+ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
75.1667 -+
75.1668 -+ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
75.1669 -+ if (!__nposn)
75.1670 -+ _M_data->_M_negative_sign = "()";
75.1671 -+ else
75.1672 -+ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
75.1673 -+ __cloc);
75.1674 -+ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
75.1675 -+
75.1676 -+ // _Intl == false
75.1677 -+ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
75.1678 -+ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
75.1679 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
75.1680 -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
75.1681 -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
75.1682 -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
75.1683 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
75.1684 -+ __pposn);
75.1685 -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
75.1686 -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
75.1687 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
75.1688 -+ __nposn);
75.1689 -+ }
75.1690 -+ }
75.1691 -+
75.1692 -+ template<>
75.1693 -+ moneypunct<char, true>::~moneypunct()
75.1694 -+ { delete _M_data; }
75.1695 -+
75.1696 -+ template<>
75.1697 -+ moneypunct<char, false>::~moneypunct()
75.1698 -+ { delete _M_data; }
75.1699 -+
75.1700 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.1701 -+ template<>
75.1702 -+ void
75.1703 -+ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
75.1704 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1705 -+ const char*)
75.1706 -+#else
75.1707 -+ const char* __name)
75.1708 -+#endif
75.1709 -+ {
75.1710 -+ if (!_M_data)
75.1711 -+ _M_data = new __moneypunct_cache<wchar_t, true>;
75.1712 -+
75.1713 -+ if (!__cloc)
75.1714 -+ {
75.1715 -+ // "C" locale
75.1716 -+ _M_data->_M_decimal_point = L'.';
75.1717 -+ _M_data->_M_thousands_sep = L',';
75.1718 -+ _M_data->_M_grouping = "";
75.1719 -+ _M_data->_M_grouping_size = 0;
75.1720 -+ _M_data->_M_curr_symbol = L"";
75.1721 -+ _M_data->_M_curr_symbol_size = 0;
75.1722 -+ _M_data->_M_positive_sign = L"";
75.1723 -+ _M_data->_M_positive_sign_size = 0;
75.1724 -+ _M_data->_M_negative_sign = L"";
75.1725 -+ _M_data->_M_negative_sign_size = 0;
75.1726 -+ _M_data->_M_frac_digits = 0;
75.1727 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
75.1728 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
75.1729 -+
75.1730 -+ // Use ctype::widen code without the facet...
75.1731 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
75.1732 -+ _M_data->_M_atoms[__i] =
75.1733 -+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
75.1734 -+ }
75.1735 -+ else
75.1736 -+ {
75.1737 -+ // Named locale.
75.1738 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1739 -+ __c_locale __old = __uselocale(__cloc);
75.1740 -+#else
75.1741 -+ // Switch to named locale so that mbsrtowcs will work.
75.1742 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.1743 -+ setlocale(LC_ALL, __name);
75.1744 -+#endif
75.1745 -+
75.1746 -+#ifdef __UCLIBC_MJN3_ONLY__
75.1747 -+#warning fix this... should be monetary
75.1748 -+#endif
75.1749 -+#ifdef __UCLIBC__
75.1750 -+# ifdef __UCLIBC_HAS_XLOCALE__
75.1751 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
75.1752 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
75.1753 -+# elif defined __UCLIBC_HAS_LOCALE__
75.1754 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
75.1755 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
75.1756 -+# endif
75.1757 -+#else
75.1758 -+ union { char *__s; wchar_t __w; } __u;
75.1759 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
75.1760 -+ _M_data->_M_decimal_point = __u.__w;
75.1761 -+
75.1762 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
75.1763 -+ _M_data->_M_thousands_sep = __u.__w;
75.1764 -+#endif
75.1765 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
75.1766 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.1767 -+
75.1768 -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
75.1769 -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
75.1770 -+ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
75.1771 -+
75.1772 -+ wchar_t* __wcs_ps = 0;
75.1773 -+ wchar_t* __wcs_ns = 0;
75.1774 -+ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
75.1775 -+ try
75.1776 -+ {
75.1777 -+ mbstate_t __state;
75.1778 -+ size_t __len = strlen(__cpossign);
75.1779 -+ if (__len)
75.1780 -+ {
75.1781 -+ ++__len;
75.1782 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1783 -+ __wcs_ps = new wchar_t[__len];
75.1784 -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
75.1785 -+ _M_data->_M_positive_sign = __wcs_ps;
75.1786 -+ }
75.1787 -+ else
75.1788 -+ _M_data->_M_positive_sign = L"";
75.1789 -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
75.1790 -+
75.1791 -+ __len = strlen(__cnegsign);
75.1792 -+ if (!__nposn)
75.1793 -+ _M_data->_M_negative_sign = L"()";
75.1794 -+ else if (__len)
75.1795 -+ {
75.1796 -+ ++__len;
75.1797 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1798 -+ __wcs_ns = new wchar_t[__len];
75.1799 -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
75.1800 -+ _M_data->_M_negative_sign = __wcs_ns;
75.1801 -+ }
75.1802 -+ else
75.1803 -+ _M_data->_M_negative_sign = L"";
75.1804 -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
75.1805 -+
75.1806 -+ // _Intl == true.
75.1807 -+ __len = strlen(__ccurr);
75.1808 -+ if (__len)
75.1809 -+ {
75.1810 -+ ++__len;
75.1811 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1812 -+ wchar_t* __wcs = new wchar_t[__len];
75.1813 -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
75.1814 -+ _M_data->_M_curr_symbol = __wcs;
75.1815 -+ }
75.1816 -+ else
75.1817 -+ _M_data->_M_curr_symbol = L"";
75.1818 -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
75.1819 -+ }
75.1820 -+ catch (...)
75.1821 -+ {
75.1822 -+ delete _M_data;
75.1823 -+ _M_data = 0;
75.1824 -+ delete __wcs_ps;
75.1825 -+ delete __wcs_ns;
75.1826 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1827 -+ __uselocale(__old);
75.1828 -+#else
75.1829 -+ setlocale(LC_ALL, __old);
75.1830 -+ free(__old);
75.1831 -+#endif
75.1832 -+ __throw_exception_again;
75.1833 -+ }
75.1834 -+
75.1835 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
75.1836 -+ __cloc));
75.1837 -+ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
75.1838 -+ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
75.1839 -+ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
75.1840 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
75.1841 -+ __pposn);
75.1842 -+ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
75.1843 -+ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
75.1844 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
75.1845 -+ __nposn);
75.1846 -+
75.1847 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1848 -+ __uselocale(__old);
75.1849 -+#else
75.1850 -+ setlocale(LC_ALL, __old);
75.1851 -+ free(__old);
75.1852 -+#endif
75.1853 -+ }
75.1854 -+ }
75.1855 -+
75.1856 -+ template<>
75.1857 -+ void
75.1858 -+ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
75.1859 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1860 -+ const char*)
75.1861 -+#else
75.1862 -+ const char* __name)
75.1863 -+#endif
75.1864 -+ {
75.1865 -+ if (!_M_data)
75.1866 -+ _M_data = new __moneypunct_cache<wchar_t, false>;
75.1867 -+
75.1868 -+ if (!__cloc)
75.1869 -+ {
75.1870 -+ // "C" locale
75.1871 -+ _M_data->_M_decimal_point = L'.';
75.1872 -+ _M_data->_M_thousands_sep = L',';
75.1873 -+ _M_data->_M_grouping = "";
75.1874 -+ _M_data->_M_grouping_size = 0;
75.1875 -+ _M_data->_M_curr_symbol = L"";
75.1876 -+ _M_data->_M_curr_symbol_size = 0;
75.1877 -+ _M_data->_M_positive_sign = L"";
75.1878 -+ _M_data->_M_positive_sign_size = 0;
75.1879 -+ _M_data->_M_negative_sign = L"";
75.1880 -+ _M_data->_M_negative_sign_size = 0;
75.1881 -+ _M_data->_M_frac_digits = 0;
75.1882 -+ _M_data->_M_pos_format = money_base::_S_default_pattern;
75.1883 -+ _M_data->_M_neg_format = money_base::_S_default_pattern;
75.1884 -+
75.1885 -+ // Use ctype::widen code without the facet...
75.1886 -+ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
75.1887 -+ _M_data->_M_atoms[__i] =
75.1888 -+ static_cast<wchar_t>(money_base::_S_atoms[__i]);
75.1889 -+ }
75.1890 -+ else
75.1891 -+ {
75.1892 -+ // Named locale.
75.1893 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1894 -+ __c_locale __old = __uselocale(__cloc);
75.1895 -+#else
75.1896 -+ // Switch to named locale so that mbsrtowcs will work.
75.1897 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.1898 -+ setlocale(LC_ALL, __name);
75.1899 -+#endif
75.1900 -+
75.1901 -+#ifdef __UCLIBC_MJN3_ONLY__
75.1902 -+#warning fix this... should be monetary
75.1903 -+#endif
75.1904 -+#ifdef __UCLIBC__
75.1905 -+# ifdef __UCLIBC_HAS_XLOCALE__
75.1906 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
75.1907 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
75.1908 -+# elif defined __UCLIBC_HAS_LOCALE__
75.1909 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
75.1910 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
75.1911 -+# endif
75.1912 -+#else
75.1913 -+ union { char *__s; wchar_t __w; } __u;
75.1914 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
75.1915 -+ _M_data->_M_decimal_point = __u.__w;
75.1916 -+
75.1917 -+ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
75.1918 -+ _M_data->_M_thousands_sep = __u.__w;
75.1919 -+#endif
75.1920 -+ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
75.1921 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.1922 -+
75.1923 -+ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
75.1924 -+ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
75.1925 -+ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
75.1926 -+
75.1927 -+ wchar_t* __wcs_ps = 0;
75.1928 -+ wchar_t* __wcs_ns = 0;
75.1929 -+ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
75.1930 -+ try
75.1931 -+ {
75.1932 -+ mbstate_t __state;
75.1933 -+ size_t __len;
75.1934 -+ __len = strlen(__cpossign);
75.1935 -+ if (__len)
75.1936 -+ {
75.1937 -+ ++__len;
75.1938 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1939 -+ __wcs_ps = new wchar_t[__len];
75.1940 -+ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
75.1941 -+ _M_data->_M_positive_sign = __wcs_ps;
75.1942 -+ }
75.1943 -+ else
75.1944 -+ _M_data->_M_positive_sign = L"";
75.1945 -+ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
75.1946 -+
75.1947 -+ __len = strlen(__cnegsign);
75.1948 -+ if (!__nposn)
75.1949 -+ _M_data->_M_negative_sign = L"()";
75.1950 -+ else if (__len)
75.1951 -+ {
75.1952 -+ ++__len;
75.1953 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1954 -+ __wcs_ns = new wchar_t[__len];
75.1955 -+ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
75.1956 -+ _M_data->_M_negative_sign = __wcs_ns;
75.1957 -+ }
75.1958 -+ else
75.1959 -+ _M_data->_M_negative_sign = L"";
75.1960 -+ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
75.1961 -+
75.1962 -+ // _Intl == true.
75.1963 -+ __len = strlen(__ccurr);
75.1964 -+ if (__len)
75.1965 -+ {
75.1966 -+ ++__len;
75.1967 -+ memset(&__state, 0, sizeof(mbstate_t));
75.1968 -+ wchar_t* __wcs = new wchar_t[__len];
75.1969 -+ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
75.1970 -+ _M_data->_M_curr_symbol = __wcs;
75.1971 -+ }
75.1972 -+ else
75.1973 -+ _M_data->_M_curr_symbol = L"";
75.1974 -+ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
75.1975 -+ }
75.1976 -+ catch (...)
75.1977 -+ {
75.1978 -+ delete _M_data;
75.1979 -+ _M_data = 0;
75.1980 -+ delete __wcs_ps;
75.1981 -+ delete __wcs_ns;
75.1982 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.1983 -+ __uselocale(__old);
75.1984 -+#else
75.1985 -+ setlocale(LC_ALL, __old);
75.1986 -+ free(__old);
75.1987 -+#endif
75.1988 -+ __throw_exception_again;
75.1989 -+ }
75.1990 -+
75.1991 -+ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
75.1992 -+ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
75.1993 -+ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
75.1994 -+ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
75.1995 -+ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
75.1996 -+ __pposn);
75.1997 -+ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
75.1998 -+ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
75.1999 -+ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
75.2000 -+ __nposn);
75.2001 -+
75.2002 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.2003 -+ __uselocale(__old);
75.2004 -+#else
75.2005 -+ setlocale(LC_ALL, __old);
75.2006 -+ free(__old);
75.2007 -+#endif
75.2008 -+ }
75.2009 -+ }
75.2010 -+
75.2011 -+ template<>
75.2012 -+ moneypunct<wchar_t, true>::~moneypunct()
75.2013 -+ {
75.2014 -+ if (_M_data->_M_positive_sign_size)
75.2015 -+ delete [] _M_data->_M_positive_sign;
75.2016 -+ if (_M_data->_M_negative_sign_size
75.2017 -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
75.2018 -+ delete [] _M_data->_M_negative_sign;
75.2019 -+ if (_M_data->_M_curr_symbol_size)
75.2020 -+ delete [] _M_data->_M_curr_symbol;
75.2021 -+ delete _M_data;
75.2022 -+ }
75.2023 -+
75.2024 -+ template<>
75.2025 -+ moneypunct<wchar_t, false>::~moneypunct()
75.2026 -+ {
75.2027 -+ if (_M_data->_M_positive_sign_size)
75.2028 -+ delete [] _M_data->_M_positive_sign;
75.2029 -+ if (_M_data->_M_negative_sign_size
75.2030 -+ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
75.2031 -+ delete [] _M_data->_M_negative_sign;
75.2032 -+ if (_M_data->_M_curr_symbol_size)
75.2033 -+ delete [] _M_data->_M_curr_symbol;
75.2034 -+ delete _M_data;
75.2035 -+ }
75.2036 -+#endif
75.2037 -+}
75.2038 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/numeric_members.cc
75.2039 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/numeric_members.cc
75.2040 -@@ -0,0 +1,173 @@
75.2041 -+// std::numpunct implementation details, GNU version -*- C++ -*-
75.2042 -+
75.2043 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
75.2044 -+//
75.2045 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2046 -+// software; you can redistribute it and/or modify it under the
75.2047 -+// terms of the GNU General Public License as published by the
75.2048 -+// Free Software Foundation; either version 2, or (at your option)
75.2049 -+// any later version.
75.2050 -+
75.2051 -+// This library is distributed in the hope that it will be useful,
75.2052 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2053 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2054 -+// GNU General Public License for more details.
75.2055 -+
75.2056 -+// You should have received a copy of the GNU General Public License along
75.2057 -+// with this library; see the file COPYING. If not, write to the Free
75.2058 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.2059 -+// USA.
75.2060 -+
75.2061 -+// As a special exception, you may use this file as part of a free software
75.2062 -+// library without restriction. Specifically, if other files instantiate
75.2063 -+// templates or use macros or inline functions from this file, or you compile
75.2064 -+// this file and link it with other files to produce an executable, this
75.2065 -+// file does not by itself cause the resulting executable to be covered by
75.2066 -+// the GNU General Public License. This exception does not however
75.2067 -+// invalidate any other reasons why the executable file might be covered by
75.2068 -+// the GNU General Public License.
75.2069 -+
75.2070 -+//
75.2071 -+// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
75.2072 -+//
75.2073 -+
75.2074 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.2075 -+
75.2076 -+#define _LIBC
75.2077 -+#include <locale>
75.2078 -+#undef _LIBC
75.2079 -+#include <bits/c++locale_internal.h>
75.2080 -+
75.2081 -+#ifdef __UCLIBC_MJN3_ONLY__
75.2082 -+#warning tailor for stub locale support
75.2083 -+#endif
75.2084 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.2085 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
75.2086 -+#endif
75.2087 -+
75.2088 -+namespace std
75.2089 -+{
75.2090 -+ template<>
75.2091 -+ void
75.2092 -+ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
75.2093 -+ {
75.2094 -+ if (!_M_data)
75.2095 -+ _M_data = new __numpunct_cache<char>;
75.2096 -+
75.2097 -+ if (!__cloc)
75.2098 -+ {
75.2099 -+ // "C" locale
75.2100 -+ _M_data->_M_grouping = "";
75.2101 -+ _M_data->_M_grouping_size = 0;
75.2102 -+ _M_data->_M_use_grouping = false;
75.2103 -+
75.2104 -+ _M_data->_M_decimal_point = '.';
75.2105 -+ _M_data->_M_thousands_sep = ',';
75.2106 -+
75.2107 -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
75.2108 -+ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
75.2109 -+
75.2110 -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
75.2111 -+ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
75.2112 -+ }
75.2113 -+ else
75.2114 -+ {
75.2115 -+ // Named locale.
75.2116 -+ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
75.2117 -+ __cloc));
75.2118 -+ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
75.2119 -+ __cloc));
75.2120 -+
75.2121 -+ // Check for NULL, which implies no grouping.
75.2122 -+ if (_M_data->_M_thousands_sep == '\0')
75.2123 -+ _M_data->_M_grouping = "";
75.2124 -+ else
75.2125 -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
75.2126 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.2127 -+ }
75.2128 -+
75.2129 -+ // NB: There is no way to extact this info from posix locales.
75.2130 -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
75.2131 -+ _M_data->_M_truename = "true";
75.2132 -+ _M_data->_M_truename_size = 4;
75.2133 -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
75.2134 -+ _M_data->_M_falsename = "false";
75.2135 -+ _M_data->_M_falsename_size = 5;
75.2136 -+ }
75.2137 -+
75.2138 -+ template<>
75.2139 -+ numpunct<char>::~numpunct()
75.2140 -+ { delete _M_data; }
75.2141 -+
75.2142 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.2143 -+ template<>
75.2144 -+ void
75.2145 -+ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
75.2146 -+ {
75.2147 -+ if (!_M_data)
75.2148 -+ _M_data = new __numpunct_cache<wchar_t>;
75.2149 -+
75.2150 -+ if (!__cloc)
75.2151 -+ {
75.2152 -+ // "C" locale
75.2153 -+ _M_data->_M_grouping = "";
75.2154 -+ _M_data->_M_grouping_size = 0;
75.2155 -+ _M_data->_M_use_grouping = false;
75.2156 -+
75.2157 -+ _M_data->_M_decimal_point = L'.';
75.2158 -+ _M_data->_M_thousands_sep = L',';
75.2159 -+
75.2160 -+ // Use ctype::widen code without the facet...
75.2161 -+ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
75.2162 -+ _M_data->_M_atoms_out[__i] =
75.2163 -+ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
75.2164 -+
75.2165 -+ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
75.2166 -+ _M_data->_M_atoms_in[__j] =
75.2167 -+ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
75.2168 -+ }
75.2169 -+ else
75.2170 -+ {
75.2171 -+ // Named locale.
75.2172 -+ // NB: In the GNU model wchar_t is always 32 bit wide.
75.2173 -+#ifdef __UCLIBC_MJN3_ONLY__
75.2174 -+#warning fix this
75.2175 -+#endif
75.2176 -+#ifdef __UCLIBC__
75.2177 -+# ifdef __UCLIBC_HAS_XLOCALE__
75.2178 -+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
75.2179 -+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
75.2180 -+# elif defined __UCLIBC_HAS_LOCALE__
75.2181 -+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
75.2182 -+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
75.2183 -+# endif
75.2184 -+#else
75.2185 -+ union { char *__s; wchar_t __w; } __u;
75.2186 -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
75.2187 -+ _M_data->_M_decimal_point = __u.__w;
75.2188 -+
75.2189 -+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
75.2190 -+ _M_data->_M_thousands_sep = __u.__w;
75.2191 -+#endif
75.2192 -+
75.2193 -+ if (_M_data->_M_thousands_sep == L'\0')
75.2194 -+ _M_data->_M_grouping = "";
75.2195 -+ else
75.2196 -+ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
75.2197 -+ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
75.2198 -+ }
75.2199 -+
75.2200 -+ // NB: There is no way to extact this info from posix locales.
75.2201 -+ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
75.2202 -+ _M_data->_M_truename = L"true";
75.2203 -+ _M_data->_M_truename_size = 4;
75.2204 -+ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
75.2205 -+ _M_data->_M_falsename = L"false";
75.2206 -+ _M_data->_M_falsename_size = 5;
75.2207 -+ }
75.2208 -+
75.2209 -+ template<>
75.2210 -+ numpunct<wchar_t>::~numpunct()
75.2211 -+ { delete _M_data; }
75.2212 -+ #endif
75.2213 -+}
75.2214 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.cc
75.2215 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.cc
75.2216 -@@ -0,0 +1,406 @@
75.2217 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
75.2218 -+
75.2219 -+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
75.2220 -+//
75.2221 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2222 -+// software; you can redistribute it and/or modify it under the
75.2223 -+// terms of the GNU General Public License as published by the
75.2224 -+// Free Software Foundation; either version 2, or (at your option)
75.2225 -+// any later version.
75.2226 -+
75.2227 -+// This library is distributed in the hope that it will be useful,
75.2228 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2229 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2230 -+// GNU General Public License for more details.
75.2231 -+
75.2232 -+// You should have received a copy of the GNU General Public License along
75.2233 -+// with this library; see the file COPYING. If not, write to the Free
75.2234 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.2235 -+// USA.
75.2236 -+
75.2237 -+// As a special exception, you may use this file as part of a free software
75.2238 -+// library without restriction. Specifically, if other files instantiate
75.2239 -+// templates or use macros or inline functions from this file, or you compile
75.2240 -+// this file and link it with other files to produce an executable, this
75.2241 -+// file does not by itself cause the resulting executable to be covered by
75.2242 -+// the GNU General Public License. This exception does not however
75.2243 -+// invalidate any other reasons why the executable file might be covered by
75.2244 -+// the GNU General Public License.
75.2245 -+
75.2246 -+//
75.2247 -+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
75.2248 -+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
75.2249 -+//
75.2250 -+
75.2251 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.2252 -+
75.2253 -+#include <locale>
75.2254 -+#include <bits/c++locale_internal.h>
75.2255 -+
75.2256 -+#ifdef __UCLIBC_MJN3_ONLY__
75.2257 -+#warning tailor for stub locale support
75.2258 -+#endif
75.2259 -+#ifndef __UCLIBC_HAS_XLOCALE__
75.2260 -+#define __nl_langinfo_l(N, L) nl_langinfo((N))
75.2261 -+#endif
75.2262 -+
75.2263 -+namespace std
75.2264 -+{
75.2265 -+ template<>
75.2266 -+ void
75.2267 -+ __timepunct<char>::
75.2268 -+ _M_put(char* __s, size_t __maxlen, const char* __format,
75.2269 -+ const tm* __tm) const
75.2270 -+ {
75.2271 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.2272 -+ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
75.2273 -+ _M_c_locale_timepunct);
75.2274 -+#else
75.2275 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.2276 -+ setlocale(LC_ALL, _M_name_timepunct);
75.2277 -+ const size_t __len = strftime(__s, __maxlen, __format, __tm);
75.2278 -+ setlocale(LC_ALL, __old);
75.2279 -+ free(__old);
75.2280 -+#endif
75.2281 -+ // Make sure __s is null terminated.
75.2282 -+ if (__len == 0)
75.2283 -+ __s[0] = '\0';
75.2284 -+ }
75.2285 -+
75.2286 -+ template<>
75.2287 -+ void
75.2288 -+ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
75.2289 -+ {
75.2290 -+ if (!_M_data)
75.2291 -+ _M_data = new __timepunct_cache<char>;
75.2292 -+
75.2293 -+ if (!__cloc)
75.2294 -+ {
75.2295 -+ // "C" locale
75.2296 -+ _M_c_locale_timepunct = _S_get_c_locale();
75.2297 -+
75.2298 -+ _M_data->_M_date_format = "%m/%d/%y";
75.2299 -+ _M_data->_M_date_era_format = "%m/%d/%y";
75.2300 -+ _M_data->_M_time_format = "%H:%M:%S";
75.2301 -+ _M_data->_M_time_era_format = "%H:%M:%S";
75.2302 -+ _M_data->_M_date_time_format = "";
75.2303 -+ _M_data->_M_date_time_era_format = "";
75.2304 -+ _M_data->_M_am = "AM";
75.2305 -+ _M_data->_M_pm = "PM";
75.2306 -+ _M_data->_M_am_pm_format = "";
75.2307 -+
75.2308 -+ // Day names, starting with "C"'s Sunday.
75.2309 -+ _M_data->_M_day1 = "Sunday";
75.2310 -+ _M_data->_M_day2 = "Monday";
75.2311 -+ _M_data->_M_day3 = "Tuesday";
75.2312 -+ _M_data->_M_day4 = "Wednesday";
75.2313 -+ _M_data->_M_day5 = "Thursday";
75.2314 -+ _M_data->_M_day6 = "Friday";
75.2315 -+ _M_data->_M_day7 = "Saturday";
75.2316 -+
75.2317 -+ // Abbreviated day names, starting with "C"'s Sun.
75.2318 -+ _M_data->_M_aday1 = "Sun";
75.2319 -+ _M_data->_M_aday2 = "Mon";
75.2320 -+ _M_data->_M_aday3 = "Tue";
75.2321 -+ _M_data->_M_aday4 = "Wed";
75.2322 -+ _M_data->_M_aday5 = "Thu";
75.2323 -+ _M_data->_M_aday6 = "Fri";
75.2324 -+ _M_data->_M_aday7 = "Sat";
75.2325 -+
75.2326 -+ // Month names, starting with "C"'s January.
75.2327 -+ _M_data->_M_month01 = "January";
75.2328 -+ _M_data->_M_month02 = "February";
75.2329 -+ _M_data->_M_month03 = "March";
75.2330 -+ _M_data->_M_month04 = "April";
75.2331 -+ _M_data->_M_month05 = "May";
75.2332 -+ _M_data->_M_month06 = "June";
75.2333 -+ _M_data->_M_month07 = "July";
75.2334 -+ _M_data->_M_month08 = "August";
75.2335 -+ _M_data->_M_month09 = "September";
75.2336 -+ _M_data->_M_month10 = "October";
75.2337 -+ _M_data->_M_month11 = "November";
75.2338 -+ _M_data->_M_month12 = "December";
75.2339 -+
75.2340 -+ // Abbreviated month names, starting with "C"'s Jan.
75.2341 -+ _M_data->_M_amonth01 = "Jan";
75.2342 -+ _M_data->_M_amonth02 = "Feb";
75.2343 -+ _M_data->_M_amonth03 = "Mar";
75.2344 -+ _M_data->_M_amonth04 = "Apr";
75.2345 -+ _M_data->_M_amonth05 = "May";
75.2346 -+ _M_data->_M_amonth06 = "Jun";
75.2347 -+ _M_data->_M_amonth07 = "Jul";
75.2348 -+ _M_data->_M_amonth08 = "Aug";
75.2349 -+ _M_data->_M_amonth09 = "Sep";
75.2350 -+ _M_data->_M_amonth10 = "Oct";
75.2351 -+ _M_data->_M_amonth11 = "Nov";
75.2352 -+ _M_data->_M_amonth12 = "Dec";
75.2353 -+ }
75.2354 -+ else
75.2355 -+ {
75.2356 -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
75.2357 -+
75.2358 -+ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
75.2359 -+ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
75.2360 -+ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
75.2361 -+ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
75.2362 -+ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
75.2363 -+ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
75.2364 -+ __cloc);
75.2365 -+ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
75.2366 -+ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
75.2367 -+ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
75.2368 -+
75.2369 -+ // Day names, starting with "C"'s Sunday.
75.2370 -+ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
75.2371 -+ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
75.2372 -+ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
75.2373 -+ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
75.2374 -+ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
75.2375 -+ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
75.2376 -+ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
75.2377 -+
75.2378 -+ // Abbreviated day names, starting with "C"'s Sun.
75.2379 -+ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
75.2380 -+ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
75.2381 -+ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
75.2382 -+ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
75.2383 -+ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
75.2384 -+ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
75.2385 -+ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
75.2386 -+
75.2387 -+ // Month names, starting with "C"'s January.
75.2388 -+ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
75.2389 -+ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
75.2390 -+ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
75.2391 -+ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
75.2392 -+ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
75.2393 -+ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
75.2394 -+ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
75.2395 -+ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
75.2396 -+ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
75.2397 -+ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
75.2398 -+ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
75.2399 -+ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
75.2400 -+
75.2401 -+ // Abbreviated month names, starting with "C"'s Jan.
75.2402 -+ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
75.2403 -+ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
75.2404 -+ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
75.2405 -+ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
75.2406 -+ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
75.2407 -+ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
75.2408 -+ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
75.2409 -+ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
75.2410 -+ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
75.2411 -+ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
75.2412 -+ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
75.2413 -+ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
75.2414 -+ }
75.2415 -+ }
75.2416 -+
75.2417 -+#ifdef _GLIBCXX_USE_WCHAR_T
75.2418 -+ template<>
75.2419 -+ void
75.2420 -+ __timepunct<wchar_t>::
75.2421 -+ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
75.2422 -+ const tm* __tm) const
75.2423 -+ {
75.2424 -+#ifdef __UCLIBC_HAS_XLOCALE__
75.2425 -+ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
75.2426 -+ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
75.2427 -+ _M_c_locale_timepunct);
75.2428 -+#else
75.2429 -+ char* __old = strdup(setlocale(LC_ALL, NULL));
75.2430 -+ setlocale(LC_ALL, _M_name_timepunct);
75.2431 -+ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
75.2432 -+ setlocale(LC_ALL, __old);
75.2433 -+ free(__old);
75.2434 -+#endif
75.2435 -+ // Make sure __s is null terminated.
75.2436 -+ if (__len == 0)
75.2437 -+ __s[0] = L'\0';
75.2438 -+ }
75.2439 -+
75.2440 -+ template<>
75.2441 -+ void
75.2442 -+ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
75.2443 -+ {
75.2444 -+ if (!_M_data)
75.2445 -+ _M_data = new __timepunct_cache<wchar_t>;
75.2446 -+
75.2447 -+#warning wide time stuff
75.2448 -+// if (!__cloc)
75.2449 -+ {
75.2450 -+ // "C" locale
75.2451 -+ _M_c_locale_timepunct = _S_get_c_locale();
75.2452 -+
75.2453 -+ _M_data->_M_date_format = L"%m/%d/%y";
75.2454 -+ _M_data->_M_date_era_format = L"%m/%d/%y";
75.2455 -+ _M_data->_M_time_format = L"%H:%M:%S";
75.2456 -+ _M_data->_M_time_era_format = L"%H:%M:%S";
75.2457 -+ _M_data->_M_date_time_format = L"";
75.2458 -+ _M_data->_M_date_time_era_format = L"";
75.2459 -+ _M_data->_M_am = L"AM";
75.2460 -+ _M_data->_M_pm = L"PM";
75.2461 -+ _M_data->_M_am_pm_format = L"";
75.2462 -+
75.2463 -+ // Day names, starting with "C"'s Sunday.
75.2464 -+ _M_data->_M_day1 = L"Sunday";
75.2465 -+ _M_data->_M_day2 = L"Monday";
75.2466 -+ _M_data->_M_day3 = L"Tuesday";
75.2467 -+ _M_data->_M_day4 = L"Wednesday";
75.2468 -+ _M_data->_M_day5 = L"Thursday";
75.2469 -+ _M_data->_M_day6 = L"Friday";
75.2470 -+ _M_data->_M_day7 = L"Saturday";
75.2471 -+
75.2472 -+ // Abbreviated day names, starting with "C"'s Sun.
75.2473 -+ _M_data->_M_aday1 = L"Sun";
75.2474 -+ _M_data->_M_aday2 = L"Mon";
75.2475 -+ _M_data->_M_aday3 = L"Tue";
75.2476 -+ _M_data->_M_aday4 = L"Wed";
75.2477 -+ _M_data->_M_aday5 = L"Thu";
75.2478 -+ _M_data->_M_aday6 = L"Fri";
75.2479 -+ _M_data->_M_aday7 = L"Sat";
75.2480 -+
75.2481 -+ // Month names, starting with "C"'s January.
75.2482 -+ _M_data->_M_month01 = L"January";
75.2483 -+ _M_data->_M_month02 = L"February";
75.2484 -+ _M_data->_M_month03 = L"March";
75.2485 -+ _M_data->_M_month04 = L"April";
75.2486 -+ _M_data->_M_month05 = L"May";
75.2487 -+ _M_data->_M_month06 = L"June";
75.2488 -+ _M_data->_M_month07 = L"July";
75.2489 -+ _M_data->_M_month08 = L"August";
75.2490 -+ _M_data->_M_month09 = L"September";
75.2491 -+ _M_data->_M_month10 = L"October";
75.2492 -+ _M_data->_M_month11 = L"November";
75.2493 -+ _M_data->_M_month12 = L"December";
75.2494 -+
75.2495 -+ // Abbreviated month names, starting with "C"'s Jan.
75.2496 -+ _M_data->_M_amonth01 = L"Jan";
75.2497 -+ _M_data->_M_amonth02 = L"Feb";
75.2498 -+ _M_data->_M_amonth03 = L"Mar";
75.2499 -+ _M_data->_M_amonth04 = L"Apr";
75.2500 -+ _M_data->_M_amonth05 = L"May";
75.2501 -+ _M_data->_M_amonth06 = L"Jun";
75.2502 -+ _M_data->_M_amonth07 = L"Jul";
75.2503 -+ _M_data->_M_amonth08 = L"Aug";
75.2504 -+ _M_data->_M_amonth09 = L"Sep";
75.2505 -+ _M_data->_M_amonth10 = L"Oct";
75.2506 -+ _M_data->_M_amonth11 = L"Nov";
75.2507 -+ _M_data->_M_amonth12 = L"Dec";
75.2508 -+ }
75.2509 -+#if 0
75.2510 -+ else
75.2511 -+ {
75.2512 -+ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
75.2513 -+
75.2514 -+ union { char *__s; wchar_t *__w; } __u;
75.2515 -+
75.2516 -+ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
75.2517 -+ _M_data->_M_date_format = __u.__w;
75.2518 -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
75.2519 -+ _M_data->_M_date_era_format = __u.__w;
75.2520 -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
75.2521 -+ _M_data->_M_time_format = __u.__w;
75.2522 -+ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
75.2523 -+ _M_data->_M_time_era_format = __u.__w;
75.2524 -+ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
75.2525 -+ _M_data->_M_date_time_format = __u.__w;
75.2526 -+ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
75.2527 -+ _M_data->_M_date_time_era_format = __u.__w;
75.2528 -+ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
75.2529 -+ _M_data->_M_am = __u.__w;
75.2530 -+ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
75.2531 -+ _M_data->_M_pm = __u.__w;
75.2532 -+ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
75.2533 -+ _M_data->_M_am_pm_format = __u.__w;
75.2534 -+
75.2535 -+ // Day names, starting with "C"'s Sunday.
75.2536 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
75.2537 -+ _M_data->_M_day1 = __u.__w;
75.2538 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
75.2539 -+ _M_data->_M_day2 = __u.__w;
75.2540 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
75.2541 -+ _M_data->_M_day3 = __u.__w;
75.2542 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
75.2543 -+ _M_data->_M_day4 = __u.__w;
75.2544 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
75.2545 -+ _M_data->_M_day5 = __u.__w;
75.2546 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
75.2547 -+ _M_data->_M_day6 = __u.__w;
75.2548 -+ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
75.2549 -+ _M_data->_M_day7 = __u.__w;
75.2550 -+
75.2551 -+ // Abbreviated day names, starting with "C"'s Sun.
75.2552 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
75.2553 -+ _M_data->_M_aday1 = __u.__w;
75.2554 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
75.2555 -+ _M_data->_M_aday2 = __u.__w;
75.2556 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
75.2557 -+ _M_data->_M_aday3 = __u.__w;
75.2558 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
75.2559 -+ _M_data->_M_aday4 = __u.__w;
75.2560 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
75.2561 -+ _M_data->_M_aday5 = __u.__w;
75.2562 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
75.2563 -+ _M_data->_M_aday6 = __u.__w;
75.2564 -+ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
75.2565 -+ _M_data->_M_aday7 = __u.__w;
75.2566 -+
75.2567 -+ // Month names, starting with "C"'s January.
75.2568 -+ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
75.2569 -+ _M_data->_M_month01 = __u.__w;
75.2570 -+ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
75.2571 -+ _M_data->_M_month02 = __u.__w;
75.2572 -+ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
75.2573 -+ _M_data->_M_month03 = __u.__w;
75.2574 -+ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
75.2575 -+ _M_data->_M_month04 = __u.__w;
75.2576 -+ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
75.2577 -+ _M_data->_M_month05 = __u.__w;
75.2578 -+ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
75.2579 -+ _M_data->_M_month06 = __u.__w;
75.2580 -+ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
75.2581 -+ _M_data->_M_month07 = __u.__w;
75.2582 -+ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
75.2583 -+ _M_data->_M_month08 = __u.__w;
75.2584 -+ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
75.2585 -+ _M_data->_M_month09 = __u.__w;
75.2586 -+ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
75.2587 -+ _M_data->_M_month10 = __u.__w;
75.2588 -+ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
75.2589 -+ _M_data->_M_month11 = __u.__w;
75.2590 -+ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
75.2591 -+ _M_data->_M_month12 = __u.__w;
75.2592 -+
75.2593 -+ // Abbreviated month names, starting with "C"'s Jan.
75.2594 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
75.2595 -+ _M_data->_M_amonth01 = __u.__w;
75.2596 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
75.2597 -+ _M_data->_M_amonth02 = __u.__w;
75.2598 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
75.2599 -+ _M_data->_M_amonth03 = __u.__w;
75.2600 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
75.2601 -+ _M_data->_M_amonth04 = __u.__w;
75.2602 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
75.2603 -+ _M_data->_M_amonth05 = __u.__w;
75.2604 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
75.2605 -+ _M_data->_M_amonth06 = __u.__w;
75.2606 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
75.2607 -+ _M_data->_M_amonth07 = __u.__w;
75.2608 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
75.2609 -+ _M_data->_M_amonth08 = __u.__w;
75.2610 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
75.2611 -+ _M_data->_M_amonth09 = __u.__w;
75.2612 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
75.2613 -+ _M_data->_M_amonth10 = __u.__w;
75.2614 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
75.2615 -+ _M_data->_M_amonth11 = __u.__w;
75.2616 -+ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
75.2617 -+ _M_data->_M_amonth12 = __u.__w;
75.2618 -+ }
75.2619 -+#endif // 0
75.2620 -+ }
75.2621 -+#endif
75.2622 -+}
75.2623 ---- gcc-4.1.0-dist/libstdc++-v3/config/locale/uclibc/time_members.h
75.2624 -+++ gcc-4.1.0/libstdc++-v3/config/locale/uclibc/time_members.h
75.2625 -@@ -0,0 +1,76 @@
75.2626 -+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
75.2627 -+
75.2628 -+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
75.2629 -+//
75.2630 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2631 -+// software; you can redistribute it and/or modify it under the
75.2632 -+// terms of the GNU General Public License as published by the
75.2633 -+// Free Software Foundation; either version 2, or (at your option)
75.2634 -+// any later version.
75.2635 -+
75.2636 -+// This library is distributed in the hope that it will be useful,
75.2637 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2638 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2639 -+// GNU General Public License for more details.
75.2640 -+
75.2641 -+// You should have received a copy of the GNU General Public License along
75.2642 -+// with this library; see the file COPYING. If not, write to the Free
75.2643 -+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
75.2644 -+// USA.
75.2645 -+
75.2646 -+// As a special exception, you may use this file as part of a free software
75.2647 -+// library without restriction. Specifically, if other files instantiate
75.2648 -+// templates or use macros or inline functions from this file, or you compile
75.2649 -+// this file and link it with other files to produce an executable, this
75.2650 -+// file does not by itself cause the resulting executable to be covered by
75.2651 -+// the GNU General Public License. This exception does not however
75.2652 -+// invalidate any other reasons why the executable file might be covered by
75.2653 -+// the GNU General Public License.
75.2654 -+
75.2655 -+//
75.2656 -+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
75.2657 -+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
75.2658 -+//
75.2659 -+
75.2660 -+// Written by Benjamin Kosnik <bkoz@redhat.com>
75.2661 -+
75.2662 -+ template<typename _CharT>
75.2663 -+ __timepunct<_CharT>::__timepunct(size_t __refs)
75.2664 -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
75.2665 -+ _M_name_timepunct(_S_get_c_name())
75.2666 -+ { _M_initialize_timepunct(); }
75.2667 -+
75.2668 -+ template<typename _CharT>
75.2669 -+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
75.2670 -+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
75.2671 -+ _M_name_timepunct(_S_get_c_name())
75.2672 -+ { _M_initialize_timepunct(); }
75.2673 -+
75.2674 -+ template<typename _CharT>
75.2675 -+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
75.2676 -+ size_t __refs)
75.2677 -+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
75.2678 -+ _M_name_timepunct(NULL)
75.2679 -+ {
75.2680 -+ const size_t __len = std::strlen(__s) + 1;
75.2681 -+ char* __tmp = new char[__len];
75.2682 -+ std::memcpy(__tmp, __s, __len);
75.2683 -+ _M_name_timepunct = __tmp;
75.2684 -+
75.2685 -+ try
75.2686 -+ { _M_initialize_timepunct(__cloc); }
75.2687 -+ catch(...)
75.2688 -+ {
75.2689 -+ delete [] _M_name_timepunct;
75.2690 -+ __throw_exception_again;
75.2691 -+ }
75.2692 -+ }
75.2693 -+
75.2694 -+ template<typename _CharT>
75.2695 -+ __timepunct<_CharT>::~__timepunct()
75.2696 -+ {
75.2697 -+ if (_M_name_timepunct != _S_get_c_name())
75.2698 -+ delete [] _M_name_timepunct;
75.2699 -+ delete _M_data;
75.2700 -+ _S_destroy_c_locale(_M_c_locale_timepunct);
75.2701 -+ }
75.2702 ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_base.h
75.2703 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_base.h
75.2704 -@@ -0,0 +1,64 @@
75.2705 -+// Locale support -*- C++ -*-
75.2706 -+
75.2707 -+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004
75.2708 -+// Free Software Foundation, Inc.
75.2709 -+//
75.2710 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2711 -+// software; you can redistribute it and/or modify it under the
75.2712 -+// terms of the GNU General Public License as published by the
75.2713 -+// Free Software Foundation; either version 2, or (at your option)
75.2714 -+// any later version.
75.2715 -+
75.2716 -+// This library is distributed in the hope that it will be useful,
75.2717 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2718 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2719 -+// GNU General Public License for more details.
75.2720 -+
75.2721 -+// You should have received a copy of the GNU General Public License along
75.2722 -+// with this library; see the file COPYING. If not, write to the Free
75.2723 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
75.2724 -+// USA.
75.2725 -+
75.2726 -+// As a special exception, you may use this file as part of a free software
75.2727 -+// library without restriction. Specifically, if other files instantiate
75.2728 -+// templates or use macros or inline functions from this file, or you compile
75.2729 -+// this file and link it with other files to produce an executable, this
75.2730 -+// file does not by itself cause the resulting executable to be covered by
75.2731 -+// the GNU General Public License. This exception does not however
75.2732 -+// invalidate any other reasons why the executable file might be covered by
75.2733 -+// the GNU General Public License.
75.2734 -+
75.2735 -+//
75.2736 -+// ISO C++ 14882: 22.1 Locales
75.2737 -+//
75.2738 -+
75.2739 -+/** @file ctype_base.h
75.2740 -+ * This is an internal header file, included by other library headers.
75.2741 -+ * You should not attempt to use it directly.
75.2742 -+ */
75.2743 -+
75.2744 -+// Information as gleaned from /usr/include/ctype.h
75.2745 -+
75.2746 -+ /// @brief Base class for ctype.
75.2747 -+ struct ctype_base
75.2748 -+ {
75.2749 -+ // Note: In uClibc, the following two types depend on configuration.
75.2750 -+
75.2751 -+ // Non-standard typedefs.
75.2752 -+ typedef const __ctype_touplow_t* __to_type;
75.2753 -+
75.2754 -+ // NB: Offsets into ctype<char>::_M_table force a particular size
75.2755 -+ // on the mask type. Because of this, we don't use an enum.
75.2756 -+ typedef __ctype_mask_t mask;
75.2757 -+ static const mask upper = _ISupper;
75.2758 -+ static const mask lower = _ISlower;
75.2759 -+ static const mask alpha = _ISalpha;
75.2760 -+ static const mask digit = _ISdigit;
75.2761 -+ static const mask xdigit = _ISxdigit;
75.2762 -+ static const mask space = _ISspace;
75.2763 -+ static const mask print = _ISprint;
75.2764 -+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
75.2765 -+ static const mask cntrl = _IScntrl;
75.2766 -+ static const mask punct = _ISpunct;
75.2767 -+ static const mask alnum = _ISalpha | _ISdigit;
75.2768 -+ };
75.2769 ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_inline.h
75.2770 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_inline.h
75.2771 -@@ -0,0 +1,69 @@
75.2772 -+// Locale support -*- C++ -*-
75.2773 -+
75.2774 -+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
75.2775 -+//
75.2776 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2777 -+// software; you can redistribute it and/or modify it under the
75.2778 -+// terms of the GNU General Public License as published by the
75.2779 -+// Free Software Foundation; either version 2, or (at your option)
75.2780 -+// any later version.
75.2781 -+
75.2782 -+// This library is distributed in the hope that it will be useful,
75.2783 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2784 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2785 -+// GNU General Public License for more details.
75.2786 -+
75.2787 -+// You should have received a copy of the GNU General Public License along
75.2788 -+// with this library; see the file COPYING. If not, write to the Free
75.2789 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
75.2790 -+// USA.
75.2791 -+
75.2792 -+// As a special exception, you may use this file as part of a free software
75.2793 -+// library without restriction. Specifically, if other files instantiate
75.2794 -+// templates or use macros or inline functions from this file, or you compile
75.2795 -+// this file and link it with other files to produce an executable, this
75.2796 -+// file does not by itself cause the resulting executable to be covered by
75.2797 -+// the GNU General Public License. This exception does not however
75.2798 -+// invalidate any other reasons why the executable file might be covered by
75.2799 -+// the GNU General Public License.
75.2800 -+
75.2801 -+//
75.2802 -+// ISO C++ 14882: 22.1 Locales
75.2803 -+//
75.2804 -+
75.2805 -+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
75.2806 -+// functions go in ctype.cc
75.2807 -+
75.2808 -+ bool
75.2809 -+ ctype<char>::
75.2810 -+ is(mask __m, char __c) const
75.2811 -+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
75.2812 -+
75.2813 -+ const char*
75.2814 -+ ctype<char>::
75.2815 -+ is(const char* __low, const char* __high, mask* __vec) const
75.2816 -+ {
75.2817 -+ while (__low < __high)
75.2818 -+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
75.2819 -+ return __high;
75.2820 -+ }
75.2821 -+
75.2822 -+ const char*
75.2823 -+ ctype<char>::
75.2824 -+ scan_is(mask __m, const char* __low, const char* __high) const
75.2825 -+ {
75.2826 -+ while (__low < __high
75.2827 -+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
75.2828 -+ ++__low;
75.2829 -+ return __low;
75.2830 -+ }
75.2831 -+
75.2832 -+ const char*
75.2833 -+ ctype<char>::
75.2834 -+ scan_not(mask __m, const char* __low, const char* __high) const
75.2835 -+ {
75.2836 -+ while (__low < __high
75.2837 -+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
75.2838 -+ ++__low;
75.2839 -+ return __low;
75.2840 -+ }
75.2841 ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/ctype_noninline.h
75.2842 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/ctype_noninline.h
75.2843 -@@ -0,0 +1,92 @@
75.2844 -+// Locale support -*- C++ -*-
75.2845 -+
75.2846 -+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
75.2847 -+// Free Software Foundation, Inc.
75.2848 -+//
75.2849 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2850 -+// software; you can redistribute it and/or modify it under the
75.2851 -+// terms of the GNU General Public License as published by the
75.2852 -+// Free Software Foundation; either version 2, or (at your option)
75.2853 -+// any later version.
75.2854 -+
75.2855 -+// This library is distributed in the hope that it will be useful,
75.2856 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2857 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2858 -+// GNU General Public License for more details.
75.2859 -+
75.2860 -+// You should have received a copy of the GNU General Public License along
75.2861 -+// with this library; see the file COPYING. If not, write to the Free
75.2862 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
75.2863 -+// USA.
75.2864 -+
75.2865 -+// As a special exception, you may use this file as part of a free software
75.2866 -+// library without restriction. Specifically, if other files instantiate
75.2867 -+// templates or use macros or inline functions from this file, or you compile
75.2868 -+// this file and link it with other files to produce an executable, this
75.2869 -+// file does not by itself cause the resulting executable to be covered by
75.2870 -+// the GNU General Public License. This exception does not however
75.2871 -+// invalidate any other reasons why the executable file might be covered by
75.2872 -+// the GNU General Public License.
75.2873 -+
75.2874 -+//
75.2875 -+// ISO C++ 14882: 22.1 Locales
75.2876 -+//
75.2877 -+
75.2878 -+// Information as gleaned from /usr/include/ctype.h
75.2879 -+
75.2880 -+ const ctype_base::mask*
75.2881 -+ ctype<char>::classic_table() throw()
75.2882 -+ { return __C_ctype_b; }
75.2883 -+
75.2884 -+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
75.2885 -+ size_t __refs)
75.2886 -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
75.2887 -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
75.2888 -+ {
75.2889 -+ _M_toupper = __C_ctype_toupper;
75.2890 -+ _M_tolower = __C_ctype_tolower;
75.2891 -+ _M_table = __table ? __table : __C_ctype_b;
75.2892 -+ memset(_M_widen, 0, sizeof(_M_widen));
75.2893 -+ memset(_M_narrow, 0, sizeof(_M_narrow));
75.2894 -+ }
75.2895 -+
75.2896 -+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
75.2897 -+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
75.2898 -+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
75.2899 -+ {
75.2900 -+ _M_toupper = __C_ctype_toupper;
75.2901 -+ _M_tolower = __C_ctype_tolower;
75.2902 -+ _M_table = __table ? __table : __C_ctype_b;
75.2903 -+ memset(_M_widen, 0, sizeof(_M_widen));
75.2904 -+ memset(_M_narrow, 0, sizeof(_M_narrow));
75.2905 -+ }
75.2906 -+
75.2907 -+ char
75.2908 -+ ctype<char>::do_toupper(char __c) const
75.2909 -+ { return _M_toupper[static_cast<unsigned char>(__c)]; }
75.2910 -+
75.2911 -+ const char*
75.2912 -+ ctype<char>::do_toupper(char* __low, const char* __high) const
75.2913 -+ {
75.2914 -+ while (__low < __high)
75.2915 -+ {
75.2916 -+ *__low = _M_toupper[static_cast<unsigned char>(*__low)];
75.2917 -+ ++__low;
75.2918 -+ }
75.2919 -+ return __high;
75.2920 -+ }
75.2921 -+
75.2922 -+ char
75.2923 -+ ctype<char>::do_tolower(char __c) const
75.2924 -+ { return _M_tolower[static_cast<unsigned char>(__c)]; }
75.2925 -+
75.2926 -+ const char*
75.2927 -+ ctype<char>::do_tolower(char* __low, const char* __high) const
75.2928 -+ {
75.2929 -+ while (__low < __high)
75.2930 -+ {
75.2931 -+ *__low = _M_tolower[static_cast<unsigned char>(*__low)];
75.2932 -+ ++__low;
75.2933 -+ }
75.2934 -+ return __high;
75.2935 -+ }
75.2936 ---- gcc-4.1.0-dist/libstdc++-v3/config/os/uclibc/os_defines.h
75.2937 -+++ gcc-4.1.0/libstdc++-v3/config/os/uclibc/os_defines.h
75.2938 -@@ -0,0 +1,44 @@
75.2939 -+// Specific definitions for GNU/Linux -*- C++ -*-
75.2940 -+
75.2941 -+// Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
75.2942 -+//
75.2943 -+// This file is part of the GNU ISO C++ Library. This library is free
75.2944 -+// software; you can redistribute it and/or modify it under the
75.2945 -+// terms of the GNU General Public License as published by the
75.2946 -+// Free Software Foundation; either version 2, or (at your option)
75.2947 -+// any later version.
75.2948 -+
75.2949 -+// This library is distributed in the hope that it will be useful,
75.2950 -+// but WITHOUT ANY WARRANTY; without even the implied warranty of
75.2951 -+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
75.2952 -+// GNU General Public License for more details.
75.2953 -+
75.2954 -+// You should have received a copy of the GNU General Public License along
75.2955 -+// with this library; see the file COPYING. If not, write to the Free
75.2956 -+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
75.2957 -+// USA.
75.2958 -+
75.2959 -+// As a special exception, you may use this file as part of a free software
75.2960 -+// library without restriction. Specifically, if other files instantiate
75.2961 -+// templates or use macros or inline functions from this file, or you compile
75.2962 -+// this file and link it with other files to produce an executable, this
75.2963 -+// file does not by itself cause the resulting executable to be covered by
75.2964 -+// the GNU General Public License. This exception does not however
75.2965 -+// invalidate any other reasons why the executable file might be covered by
75.2966 -+// the GNU General Public License.
75.2967 -+
75.2968 -+#ifndef _GLIBCXX_OS_DEFINES
75.2969 -+#define _GLIBCXX_OS_DEFINES 1
75.2970 -+
75.2971 -+// System-specific #define, typedefs, corrections, etc, go here. This
75.2972 -+// file will come before all others.
75.2973 -+
75.2974 -+// This keeps isanum, et al from being propagated as macros.
75.2975 -+#define __NO_CTYPE 1
75.2976 -+
75.2977 -+#include <features.h>
75.2978 -+
75.2979 -+// We must not see the optimized string functions GNU libc defines.
75.2980 -+#define __NO_STRING_INLINES
75.2981 -+
75.2982 -+#endif
75.2983 ---- gcc-4.1.0-dist/libstdc++-v3/configure
75.2984 -+++ gcc-4.1.0/libstdc++-v3/configure
75.2985 -@@ -4005,6 +4005,11 @@
75.2986 - lt_cv_deplibs_check_method=pass_all
75.2987 - ;;
75.2988 -
75.2989 -+linux-uclibc*)
75.2990 -+ lt_cv_deplibs_check_method=pass_all
75.2991 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
75.2992 -+ ;;
75.2993 -+
75.2994 - netbsd* | knetbsd*-gnu)
75.2995 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
75.2996 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
75.2997 -@@ -5740,7 +5745,7 @@
75.2998 - enableval="$enable_clocale"
75.2999 -
75.3000 - case "$enableval" in
75.3001 -- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
75.3002 -+ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
75.3003 - *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
75.3004 - echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
75.3005 - { (exit 1); exit 1; }; } ;;
75.3006 -@@ -5765,6 +5770,9 @@
75.3007 - # Default to "generic".
75.3008 - if test $enable_clocale_flag = auto; then
75.3009 - case ${target_os} in
75.3010 -+ linux-uclibc*)
75.3011 -+ enable_clocale_flag=uclibc
75.3012 -+ ;;
75.3013 - linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
75.3014 - cat >conftest.$ac_ext <<_ACEOF
75.3015 - /* confdefs.h. */
75.3016 -@@ -5995,6 +6003,76 @@
75.3017 - CTIME_CC=config/locale/generic/time_members.cc
75.3018 - CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
75.3019 - ;;
75.3020 -+ uclibc)
75.3021 -+ echo "$as_me:$LINENO: result: uclibc" >&5
75.3022 -+echo "${ECHO_T}uclibc" >&6
75.3023 -+
75.3024 -+ # Declare intention to use gettext, and add support for specific
75.3025 -+ # languages.
75.3026 -+ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
75.3027 -+ ALL_LINGUAS="de fr"
75.3028 -+
75.3029 -+ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
75.3030 -+ # Extract the first word of "msgfmt", so it can be a program name with args.
75.3031 -+set dummy msgfmt; ac_word=$2
75.3032 -+echo "$as_me:$LINENO: checking for $ac_word" >&5
75.3033 -+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
75.3034 -+if test "${ac_cv_prog_check_msgfmt+set}" = set; then
75.3035 -+ echo $ECHO_N "(cached) $ECHO_C" >&6
75.3036 -+else
75.3037 -+ if test -n "$check_msgfmt"; then
75.3038 -+ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
75.3039 -+else
75.3040 -+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
75.3041 -+for as_dir in $PATH
75.3042 -+do
75.3043 -+ IFS=$as_save_IFS
75.3044 -+ test -z "$as_dir" && as_dir=.
75.3045 -+ for ac_exec_ext in '' $ac_executable_extensions; do
75.3046 -+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
75.3047 -+ ac_cv_prog_check_msgfmt="yes"
75.3048 -+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
75.3049 -+ break 2
75.3050 -+ fi
75.3051 -+done
75.3052 -+done
75.3053 -+
75.3054 -+ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
75.3055 -+fi
75.3056 -+fi
75.3057 -+check_msgfmt=$ac_cv_prog_check_msgfmt
75.3058 -+if test -n "$check_msgfmt"; then
75.3059 -+ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
75.3060 -+echo "${ECHO_T}$check_msgfmt" >&6
75.3061 -+else
75.3062 -+ echo "$as_me:$LINENO: result: no" >&5
75.3063 -+echo "${ECHO_T}no" >&6
75.3064 -+fi
75.3065 -+
75.3066 -+ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
75.3067 -+ USE_NLS=yes
75.3068 -+ fi
75.3069 -+ # Export the build objects.
75.3070 -+ for ling in $ALL_LINGUAS; do \
75.3071 -+ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
75.3072 -+ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
75.3073 -+ done
75.3074 -+
75.3075 -+
75.3076 -+
75.3077 -+ CLOCALE_H=config/locale/uclibc/c_locale.h
75.3078 -+ CLOCALE_CC=config/locale/uclibc/c_locale.cc
75.3079 -+ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
75.3080 -+ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
75.3081 -+ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
75.3082 -+ CMESSAGES_H=config/locale/uclibc/messages_members.h
75.3083 -+ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
75.3084 -+ CMONEY_CC=config/locale/uclibc/monetary_members.cc
75.3085 -+ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
75.3086 -+ CTIME_H=config/locale/uclibc/time_members.h
75.3087 -+ CTIME_CC=config/locale/uclibc/time_members.cc
75.3088 -+ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
75.3089 -+ ;;
75.3090 - esac
75.3091 -
75.3092 - # This is where the testsuite looks for locale catalogs, using the
75.3093 ---- gcc-4.1.0-dist/libstdc++-v3/configure.host
75.3094 -+++ gcc-4.1.0/libstdc++-v3/configure.host
75.3095 -@@ -261,6 +261,12 @@
75.3096 - ;;
75.3097 - esac
75.3098 -
75.3099 -+# Override for uClibc since linux-uclibc gets mishandled above.
75.3100 -+case "${host_os}" in
75.3101 -+ *-uclibc*)
75.3102 -+ os_include_dir="os/uclibc"
75.3103 -+ ;;
75.3104 -+esac
75.3105 -
75.3106 - # Set any OS-dependent and CPU-dependent bits.
75.3107 - # THIS TABLE IS SORTED. KEEP IT THAT WAY.
75.3108 ---- gcc-4.1.0-dist/libstdc++-v3/crossconfig.m4
75.3109 -+++ gcc-4.1.0/libstdc++-v3/crossconfig.m4
75.3110 -@@ -143,6 +143,99 @@
75.3111 - ;;
75.3112 - esac
75.3113 - ;;
75.3114 -+ *-uclibc*)
75.3115 -+# Temporary hack until we implement the float versions of the libm funcs
75.3116 -+ AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
75.3117 -+ machine/endian.h machine/param.h sys/machine.h sys/types.h \
75.3118 -+ fp.h float.h endian.h inttypes.h locale.h float.h stdint.h])
75.3119 -+ SECTION_FLAGS='-ffunction-sections -fdata-sections'
75.3120 -+ AC_SUBST(SECTION_FLAGS)
75.3121 -+ GLIBCXX_CHECK_LINKER_FEATURES
75.3122 -+ GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT
75.3123 -+ GLIBCXX_CHECK_WCHAR_T_SUPPORT
75.3124 -+
75.3125 -+ # For LFS.
75.3126 -+ AC_DEFINE(HAVE_INT64_T)
75.3127 -+ case "$target" in
75.3128 -+ *-uclinux*)
75.3129 -+ # Don't enable LFS with uClinux
75.3130 -+ ;;
75.3131 -+ *)
75.3132 -+ AC_DEFINE(_GLIBCXX_USE_LFS)
75.3133 -+ esac
75.3134 -+
75.3135 -+ # For showmanyc_helper().
75.3136 -+ AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h)
75.3137 -+ GLIBCXX_CHECK_POLL
75.3138 -+ GLIBCXX_CHECK_S_ISREG_OR_S_IFREG
75.3139 -+
75.3140 -+ # For xsputn_2().
75.3141 -+ AC_CHECK_HEADERS(sys/uio.h)
75.3142 -+ GLIBCXX_CHECK_WRITEV
75.3143 -+
75.3144 -+# AC_DEFINE(HAVE_ACOSF)
75.3145 -+# AC_DEFINE(HAVE_ASINF)
75.3146 -+# AC_DEFINE(HAVE_ATANF)
75.3147 -+# AC_DEFINE(HAVE_ATAN2F)
75.3148 -+ AC_DEFINE(HAVE_CEILF)
75.3149 -+ AC_DEFINE(HAVE_COPYSIGN)
75.3150 -+# AC_DEFINE(HAVE_COPYSIGNF)
75.3151 -+# AC_DEFINE(HAVE_COSF)
75.3152 -+# AC_DEFINE(HAVE_COSHF)
75.3153 -+# AC_DEFINE(HAVE_EXPF)
75.3154 -+# AC_DEFINE(HAVE_FABSF)
75.3155 -+ AC_DEFINE(HAVE_FINITE)
75.3156 -+ AC_DEFINE(HAVE_FINITEF)
75.3157 -+ AC_DEFINE(HAVE_FLOORF)
75.3158 -+# AC_DEFINE(HAVE_FMODF)
75.3159 -+# AC_DEFINE(HAVE_FREXPF)
75.3160 -+ AC_DEFINE(HAVE_HYPOT)
75.3161 -+# AC_DEFINE(HAVE_HYPOTF)
75.3162 -+ AC_DEFINE(HAVE_ISINF)
75.3163 -+ AC_DEFINE(HAVE_ISINFF)
75.3164 -+ AC_DEFINE(HAVE_ISNAN)
75.3165 -+ AC_DEFINE(HAVE_ISNANF)
75.3166 -+# AC_DEFINE(HAVE_LOGF)
75.3167 -+# AC_DEFINE(HAVE_LOG10F)
75.3168 -+# AC_DEFINE(HAVE_MODFF)
75.3169 -+# AC_DEFINE(HAVE_SINF)
75.3170 -+# AC_DEFINE(HAVE_SINHF)
75.3171 -+# AC_DEFINE(HAVE_SINCOS)
75.3172 -+# AC_DEFINE(HAVE_SINCOSF)
75.3173 -+ AC_DEFINE(HAVE_SQRTF)
75.3174 -+# AC_DEFINE(HAVE_TANF)
75.3175 -+# AC_DEFINE(HAVE_TANHF)
75.3176 -+ if test x"long_double_math_on_this_cpu" = x"yes"; then
75.3177 -+ AC_MSG_ERROR([long_double_math_on_this_cpu is yes!])
75.3178 -+# AC_DEFINE(HAVE_ACOSL)
75.3179 -+# AC_DEFINE(HAVE_ASINL)
75.3180 -+# AC_DEFINE(HAVE_ATANL)
75.3181 -+# AC_DEFINE(HAVE_ATAN2L)
75.3182 -+# AC_DEFINE(HAVE_CEILL)
75.3183 -+# AC_DEFINE(HAVE_COPYSIGNL)
75.3184 -+# AC_DEFINE(HAVE_COSL)
75.3185 -+# AC_DEFINE(HAVE_COSHL)
75.3186 -+# AC_DEFINE(HAVE_EXPL)
75.3187 -+# AC_DEFINE(HAVE_FABSL)
75.3188 -+# AC_DEFINE(HAVE_FINITEL)
75.3189 -+# AC_DEFINE(HAVE_FLOORL)
75.3190 -+# AC_DEFINE(HAVE_FMODL)
75.3191 -+# AC_DEFINE(HAVE_FREXPL)
75.3192 -+# AC_DEFINE(HAVE_HYPOTL)
75.3193 -+# AC_DEFINE(HAVE_ISINFL)
75.3194 -+# AC_DEFINE(HAVE_ISNANL)
75.3195 -+# AC_DEFINE(HAVE_LOGL)
75.3196 -+# AC_DEFINE(HAVE_LOG10L)
75.3197 -+# AC_DEFINE(HAVE_MODFL)
75.3198 -+# AC_DEFINE(HAVE_POWL)
75.3199 -+# AC_DEFINE(HAVE_SINL)
75.3200 -+# AC_DEFINE(HAVE_SINHL)
75.3201 -+# AC_DEFINE(HAVE_SINCOSL)
75.3202 -+# AC_DEFINE(HAVE_SQRTL)
75.3203 -+# AC_DEFINE(HAVE_TANL)
75.3204 -+# AC_DEFINE(HAVE_TANHL)
75.3205 -+ fi
75.3206 -+ ;;
75.3207 - *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
75.3208 - AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
75.3209 - machine/endian.h machine/param.h sys/machine.h sys/types.h \
75.3210 -@@ -157,7 +250,7 @@
75.3211 - AC_DEFINE(HAVE_INT64_T)
75.3212 - case "$target" in
75.3213 - *-uclinux*)
75.3214 -- # Don't enable LFS with uClibc
75.3215 -+ # Don't enable LFS with uClinux
75.3216 - ;;
75.3217 - *)
75.3218 - AC_DEFINE(_GLIBCXX_USE_LFS)
75.3219 ---- gcc-4.1.0-dist/libstdc++-v3/include/c_compatibility/wchar.h
75.3220 -+++ gcc-4.1.0/libstdc++-v3/include/c_compatibility/wchar.h
75.3221 -@@ -101,7 +101,9 @@
75.3222 - using std::wmemcpy;
75.3223 - using std::wmemmove;
75.3224 - using std::wmemset;
75.3225 -+#if _GLIBCXX_HAVE_WCSFTIME
75.3226 - using std::wcsftime;
75.3227 -+#endif
75.3228 -
75.3229 - #if _GLIBCXX_USE_C99
75.3230 - using std::wcstold;
75.3231 ---- gcc-4.1.0-dist/libstdc++-v3/include/c_std/std_cwchar.h
75.3232 -+++ gcc-4.1.0/libstdc++-v3/include/c_std/std_cwchar.h
75.3233 -@@ -180,7 +180,9 @@
75.3234 - using ::wcscoll;
75.3235 - using ::wcscpy;
75.3236 - using ::wcscspn;
75.3237 -+#if _GLIBCXX_HAVE_WCSFTIME
75.3238 - using ::wcsftime;
75.3239 -+#endif
75.3240 - using ::wcslen;
75.3241 - using ::wcsncat;
75.3242 - using ::wcsncmp;
76.1 --- a/patches/gcc/4.1.1/130-libstdc++-pic.patch Wed Oct 21 18:08:31 2009 +0200
76.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
76.3 @@ -1,50 +0,0 @@
76.4 -# DP: Build and install libstdc++_pic.a library.
76.5 -
76.6 ---- gcc/libstdc++-v3/src/Makefile.am
76.7 -+++ gcc/libstdc++-v3/src/Makefile.am
76.8 -@@ -214,6 +214,12 @@
76.9 - $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
76.10 -
76.11 -
76.12 -+install-exec-local:
76.13 -+ifeq ($(enable_shared),yes)
76.14 -+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
76.15 -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
76.16 -+endif
76.17 -+
76.18 - # Added bits to build debug library.
76.19 - if GLIBCXX_BUILD_DEBUG
76.20 - all-local: build_debug
76.21 ---- gcc/libstdc++-v3/src/Makefile.in
76.22 -+++ gcc/libstdc++-v3/src/Makefile.in
76.23 -@@ -627,7 +627,7 @@
76.24 -
76.25 - install-data-am: install-data-local
76.26 -
76.27 --install-exec-am: install-toolexeclibLTLIBRARIES
76.28 -+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
76.29 -
76.30 - install-info: install-info-am
76.31 -
76.32 -@@ -660,6 +660,7 @@
76.33 - distclean-libtool distclean-tags distdir dvi dvi-am html \
76.34 - html-am info info-am install install-am install-data \
76.35 - install-data-am install-data-local install-exec \
76.36 -+ install-exec-local \
76.37 - install-exec-am install-info install-info-am install-man \
76.38 - install-strip install-toolexeclibLTLIBRARIES installcheck \
76.39 - installcheck-am installdirs maintainer-clean \
76.40 -@@ -743,6 +743,13 @@
76.41 - install_debug:
76.42 - (cd ${debugdir} && $(MAKE) \
76.43 - toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
76.44 -+
76.45 -+install-exec-local:
76.46 -+ifeq ($(enable_shared),yes)
76.47 -+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
76.48 -+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
76.49 -+endif
76.50 -+
76.51 - # Tell versions [3.59,3.63) of GNU make to not export all variables.
76.52 - # Otherwise a system limit (for SysV at least) may be exceeded.
76.53 - .NOEXPORT:
77.1 --- a/patches/gcc/4.1.1/140-missing-execinfo_h.patch Wed Oct 21 18:08:31 2009 +0200
77.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
77.3 @@ -1,11 +0,0 @@
77.4 ---- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
77.5 -+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
77.6 -@@ -500,7 +500,7 @@
77.7 - #ifdef __linux__
77.8 - # include <features.h>
77.9 - # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
77.10 -- && !defined(__ia64__)
77.11 -+ && !defined(__ia64__) && !defined(__UCLIBC__)
77.12 - # ifndef GC_HAVE_BUILTIN_BACKTRACE
77.13 - # define GC_HAVE_BUILTIN_BACKTRACE
77.14 - # endif
78.1 --- a/patches/gcc/4.1.1/150-c99-snprintf.patch Wed Oct 21 18:08:31 2009 +0200
78.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
78.3 @@ -1,11 +0,0 @@
78.4 ---- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
78.5 -+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
78.6 -@@ -142,7 +142,7 @@
78.7 - using ::vsprintf;
78.8 - }
78.9 -
78.10 --#if _GLIBCXX_USE_C99
78.11 -+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
78.12 -
78.13 - #undef snprintf
78.14 - #undef vfscanf
79.1 --- a/patches/gcc/4.1.1/160-c99-complex-ugly-hack.patch Wed Oct 21 18:08:31 2009 +0200
79.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
79.3 @@ -1,12 +0,0 @@
79.4 ---- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
79.5 -+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
79.6 -@@ -7194,6 +7194,9 @@
79.7 - cat >>conftest.$ac_ext <<_ACEOF
79.8 - /* end confdefs.h. */
79.9 - #include <complex.h>
79.10 -+#ifdef __UCLIBC__
79.11 -+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
79.12 -+#endif
79.13 - int
79.14 - main ()
79.15 - {
80.1 --- a/patches/gcc/4.1.1/170-index_macro.patch Wed Oct 21 18:08:31 2009 +0200
80.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
80.3 @@ -1,24 +0,0 @@
80.4 ---- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
80.5 -+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
80.6 -@@ -59,6 +59,9 @@
80.7 - #include <bits/allocator.h>
80.8 - #include <ext/hash_fun.h>
80.9 -
80.10 -+/* cope w/ index defined as macro, SuSv3 proposal */
80.11 -+#undef index
80.12 -+
80.13 - # ifdef __GC
80.14 - # define __GC_CONST const
80.15 - # else
80.16 ---- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
80.17 -+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
80.18 -@@ -53,6 +53,9 @@
80.19 - #include <ext/memory> // For uninitialized_copy_n
80.20 - #include <ext/numeric> // For power
80.21 -
80.22 -+/* cope w/ index defined as macro, SuSv3 proposal */
80.23 -+#undef index
80.24 -+
80.25 - namespace __gnu_cxx
80.26 - {
80.27 - using std::size_t;
81.1 --- a/patches/gcc/4.1.1/180-sh-pr24836.patch Wed Oct 21 18:08:31 2009 +0200
81.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81.3 @@ -1,25 +0,0 @@
81.4 -http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
81.5 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
81.6 -
81.7 ---- gcc/gcc/configure.ac (revision 106699)
81.8 -+++ gcc/gcc/configure.ac (working copy)
81.9 -@@ -2446,7 +2446,7 @@
81.10 - tls_first_minor=14
81.11 - tls_as_opt="-m64 -Aesame --fatal-warnings"
81.12 - ;;
81.13 -- sh-*-* | sh[34]-*-*)
81.14 -+ sh-*-* | sh[34]*-*-*)
81.15 - conftest_s='
81.16 - .section ".tdata","awT",@progbits
81.17 - foo: .long 25
81.18 ---- gcc/gcc/configure
81.19 -+++ gcc/gcc/configure
81.20 -@@ -14846,7 +14846,7 @@
81.21 - tls_first_minor=14
81.22 - tls_as_opt="-m64 -Aesame --fatal-warnings"
81.23 - ;;
81.24 -- sh-*-* | sh[34]-*-*)
81.25 -+ sh-*-* | sh[34]*-*-*)
81.26 - conftest_s='
81.27 - .section ".tdata","awT",@progbits
81.28 - foo: .long 25
82.1 --- a/patches/gcc/4.1.1/190-arm-bigendian.patch Wed Oct 21 18:08:31 2009 +0200
82.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
82.3 @@ -1,67 +0,0 @@
82.4 -By Lennert Buytenhek <buytenh@wantstofly.org>
82.5 -Adds support for arm*b-linux* big-endian ARM targets
82.6 -
82.7 -See http://gcc.gnu.org/PR16350
82.8 -
82.9 ---- gcc-4.1.0/gcc/config/arm/linux-elf.h
82.10 -+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
82.11 -@@ -28,19 +28,33 @@
82.12 - #undef TARGET_VERSION
82.13 - #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
82.14 -
82.15 -+/*
82.16 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
82.17 -+ * (big endian) configurations.
82.18 -+ */
82.19 -+#if TARGET_BIG_ENDIAN_DEFAULT
82.20 -+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
82.21 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
82.22 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
82.23 -+#else
82.24 -+#define TARGET_ENDIAN_DEFAULT 0
82.25 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
82.26 -+#define TARGET_LINKER_EMULATION "armelf_linux"
82.27 -+#endif
82.28 -+
82.29 - #undef TARGET_DEFAULT_FLOAT_ABI
82.30 - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
82.31 -
82.32 - #undef TARGET_DEFAULT
82.33 --#define TARGET_DEFAULT (0)
82.34 -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
82.35 -
82.36 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
82.37 -
82.38 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
82.39 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
82.40 -
82.41 - #undef MULTILIB_DEFAULTS
82.42 - #define MULTILIB_DEFAULTS \
82.43 -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
82.44 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
82.45 -
82.46 - /* Now we define the strings used to build the spec file. */
82.47 - #undef LIB_SPEC
82.48 -@@ -61,7 +75,7 @@
82.49 - %{rdynamic:-export-dynamic} \
82.50 - %{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
82.51 - -X \
82.52 -- %{mbig-endian:-EB}" \
82.53 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
82.54 - SUBTARGET_EXTRA_LINK_SPEC
82.55 -
82.56 - #undef LINK_SPEC
82.57 ---- gcc-4.1.0/gcc/config.gcc
82.58 -+++ gcc-4.1.0/gcc/config.gcc
82.59 -@@ -672,6 +672,11 @@
82.60 - ;;
82.61 - arm*-*-linux*) # ARM GNU/Linux with ELF
82.62 - tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
82.63 -+ case $target in
82.64 -+ arm*b-*)
82.65 -+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
82.66 -+ ;;
82.67 -+ esac
82.68 - tmake_file="${tmake_file} t-linux arm/t-arm"
82.69 - case ${target} in
82.70 - arm*-*-linux-gnueabi)
83.1 --- a/patches/gcc/4.1.1/200-softfloat-fix.patch Wed Oct 21 18:08:31 2009 +0200
83.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
83.3 @@ -1,58 +0,0 @@
83.4 -This patch (C) 2007 Yann E. MORIN
83.5 -Licensed under GPL v2.
83.6 -
83.7 -First hunk of this patch solves compiling uClibc-0.9.28{,.1} :
83.8 -
83.9 -make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
83.10 - LD libuClibc-0.9.29.so
83.11 -libc/libc_so.a(difftime.os): In function `difftime':
83.12 -difftime.c:(.text+0x8): undefined reference to `__floatsidf'
83.13 -difftime.c:(.text+0x2c): undefined reference to `__subdf3'
83.14 -libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
83.15 -_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
83.16 -_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
83.17 -_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
83.18 -_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
83.19 -_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
83.20 -_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
83.21 -_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
83.22 -libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
83.23 -__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
83.24 -libc/libc_so.a(strtof.os): In function `strtof':
83.25 -strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
83.26 -/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
83.27 -In function `__fixunsdfsi':
83.28 -libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
83.29 -make[2]: *** [lib/libc.so] Error 1
83.30 -make[1]: *** [lib/libc.so.0] Error 2
83.31 -make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
83.32 -make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
83.33 -Error 2
83.34 -
83.35 -The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
83.36 -
83.37 -
83.38 -diff -dur gcc-4.1.1.no-softfloat-fix/gcc/config.gcc gcc-4.1.1/gcc/config.gcc
83.39 ---- gcc-4.1.1.no-softfloat-fix/gcc/config.gcc 2007-02-01 21:57:17.000000000 +0100
83.40 -+++ gcc-4.1.1/gcc/config.gcc 2007-02-01 22:11:06.000000000 +0100
83.41 -@@ -690,7 +690,7 @@
83.42 - default_use_cxa_atexit=yes
83.43 - ;;
83.44 - *)
83.45 -- tmake_file="$tmake_file arm/t-linux"
83.46 -+ tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
83.47 - ;;
83.48 - esac
83.49 - tm_file="$tm_file arm/aout.h arm/arm.h"
83.50 -diff -dur gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h gcc-4.1.1/gcc/config/arm/linux-elf.h
83.51 ---- gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h 2007-02-01 21:57:17.000000000 +0100
83.52 -+++ gcc-4.1.1/gcc/config/arm/linux-elf.h 2007-02-01 23:00:42.000000000 +0100
83.53 -@@ -63,7 +63,7 @@
83.54 - %{shared:-lc} \
83.55 - %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
83.56 -
83.57 --#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
83.58 -+#define LIBGCC_SPEC "-lgcc"
83.59 -
83.60 - #ifdef USE_UCLIBC
83.61 - #define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
84.1 --- a/patches/gdb/6.4/100-uclibc-conf.patch Wed Oct 21 18:08:31 2009 +0200
84.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
84.3 @@ -1,78 +0,0 @@
84.4 ---- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
84.5 -+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
84.6 -@@ -3583,6 +3583,11 @@
84.7 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
84.8 - ;;
84.9 -
84.10 -+linux-uclibc*)
84.11 -+ lt_cv_deplibs_check_method=pass_all
84.12 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
84.13 -+ ;;
84.14 -+
84.15 - netbsd* | knetbsd*-gnu)
84.16 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
84.17 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
84.18 ---- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
84.19 -+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
84.20 -@@ -653,6 +653,11 @@
84.21 - fi
84.22 - ;;
84.23 -
84.24 -+linux-uclibc*)
84.25 -+ lt_cv_deplibs_check_method=pass_all
84.26 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
84.27 -+ ;;
84.28 -+
84.29 - newsos6)
84.30 - [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
84.31 - lt_cv_file_magic_cmd=/usr/bin/file
84.32 ---- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
84.33 -+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
84.34 -@@ -602,7 +602,7 @@
84.35 -
84.36 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
84.37 - case $host_os in
84.38 --linux-gnu*) ;;
84.39 -+linux-gnu*|linux-uclibc*) ;;
84.40 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
84.41 - esac
84.42 -
84.43 -@@ -1270,6 +1270,24 @@
84.44 - dynamic_linker='GNU/Linux ld.so'
84.45 - ;;
84.46 -
84.47 -+linux-uclibc*)
84.48 -+ version_type=linux
84.49 -+ need_lib_prefix=no
84.50 -+ need_version=no
84.51 -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
84.52 -+ soname_spec='${libname}${release}.so$major'
84.53 -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
84.54 -+ shlibpath_var=LD_LIBRARY_PATH
84.55 -+ shlibpath_overrides_runpath=no
84.56 -+ # This implies no fast_install, which is unacceptable.
84.57 -+ # Some rework will be needed to allow for fast_install
84.58 -+ # before this can be enabled.
84.59 -+ # Note: copied from linux-gnu, and may not be appropriate.
84.60 -+ hardcode_into_libs=yes
84.61 -+ # Assume using the uClibc dynamic linker.
84.62 -+ dynamic_linker="uClibc ld.so"
84.63 -+ ;;
84.64 -+
84.65 - netbsd*)
84.66 - need_lib_prefix=no
84.67 - need_version=no
84.68 ---- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
84.69 -+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
84.70 -@@ -3595,6 +3595,11 @@
84.71 - fi
84.72 - ;;
84.73 -
84.74 -+linux-uclibc*)
84.75 -+ lt_cv_deplibs_check_method=pass_all
84.76 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
84.77 -+ ;;
84.78 -+
84.79 - newsos6)
84.80 - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
84.81 - lt_cv_file_magic_cmd=/usr/bin/file
85.1 --- a/patches/gdb/6.4/110-uclibc-readline-conf.patch Wed Oct 21 18:08:31 2009 +0200
85.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
85.3 @@ -1,15 +0,0 @@
85.4 ---- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
85.5 -+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
85.6 -@@ -6249,7 +6249,12 @@
85.7 -
85.8 -
85.9 - echo "$as_me:$LINENO: checking for mbstate_t" >&5
85.10 -+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
85.11 - echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
85.12 -+if test "${bash_cv_have_mbstate_t+set}" != set; then
85.13 -+ bash_cv_have_mbstate_t=yes
85.14 -+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
85.15 -+fi
85.16 - if test "${bash_cv_have_mbstate_t+set}" = set; then
85.17 - echo $ECHO_N "(cached) $ECHO_C" >&6
85.18 - else
86.1 --- a/patches/gdb/6.4/120-thread-timeout.patch Wed Oct 21 18:08:31 2009 +0200
86.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
86.3 @@ -1,34 +0,0 @@
86.4 ---- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
86.5 -+++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
86.6 -@@ -21,6 +21,7 @@
86.7 - Foundation, Inc., 59 Temple Place - Suite 330,
86.8 - Boston, MA 02111-1307, USA. */
86.9 -
86.10 -+#include <unistd.h>
86.11 - #include "server.h"
86.12 -
86.13 - #include "linux-low.h"
86.14 -@@ -142,6 +143,7 @@
86.15 - td_event_msg_t msg;
86.16 - td_err_e err;
86.17 - struct inferior_linux_data *tdata;
86.18 -+ int timeout;
86.19 -
86.20 - if (debug_threads)
86.21 - fprintf (stderr, "Thread creation event.\n");
86.22 -@@ -152,7 +154,13 @@
86.23 - In the LinuxThreads implementation, this is safe,
86.24 - because all events come from the manager thread
86.25 - (except for its own creation, of course). */
86.26 -- err = td_ta_event_getmsg (thread_agent, &msg);
86.27 -+ for (timeout = 0; timeout < 50000; timeout++)
86.28 -+ {
86.29 -+ err = td_ta_event_getmsg (thread_agent, &msg);
86.30 -+ if (err != TD_NOMSG)
86.31 -+ break;
86.32 -+ usleep(1000);
86.33 -+ }
86.34 - if (err != TD_OK)
86.35 - fprintf (stderr, "thread getmsg err: %s\n",
86.36 - thread_db_err_str (err));
86.37 -
87.1 --- a/patches/gdb/6.4/130-fix-compile-flag-mismatch.patch Wed Oct 21 18:08:31 2009 +0200
87.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
87.3 @@ -1,87 +0,0 @@
87.4 -diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
87.5 ---- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
87.6 -+++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
87.7 -@@ -309,7 +309,7 @@
87.8 - # include <unistd.h>
87.9 - #endif"
87.10 -
87.11 --ac_subdirs_all="$ac_subdirs_all doc testsuite"
87.12 -+ac_subdirs_all="$ac_subdirs_all doc"
87.13 - ac_subdirs_all="$ac_subdirs_all gdbtk"
87.14 - ac_subdirs_all="$ac_subdirs_all multi-ice"
87.15 - ac_subdirs_all="$ac_subdirs_all gdbserver"
87.16 -@@ -5940,7 +5940,7 @@
87.17 -
87.18 -
87.19 -
87.20 --subdirs="$subdirs doc testsuite"
87.21 -+subdirs="$subdirs doc"
87.22 -
87.23 -
87.24 - . $srcdir/configure.host
87.25 -diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
87.26 ---- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
87.27 -+++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
87.28 -@@ -1239,7 +1239,7 @@
87.29 - ac_cache_corrupted=: ;;
87.30 - ,);;
87.31 - *)
87.32 -- if test "x$ac_old_val" != "x$ac_new_val"; then
87.33 -+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
87.34 - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
87.35 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
87.36 - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
87.37 -diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
87.38 ---- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
87.39 -+++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
87.40 -@@ -1248,7 +1248,7 @@
87.41 - ac_cache_corrupted=: ;;
87.42 - ,);;
87.43 - *)
87.44 -- if test "x$ac_old_val" != "x$ac_new_val"; then
87.45 -+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then
87.46 - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
87.47 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
87.48 - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
87.49 -diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
87.50 ---- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
87.51 -+++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
87.52 -@@ -383,7 +383,7 @@
87.53 - # CFLAGS will be just -g. We want to ensure that TARGET libraries
87.54 - # (which we know are built with gcc) are built with optimizations so
87.55 - # prepend -O2 when setting CFLAGS_FOR_TARGET.
87.56 --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
87.57 -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
87.58 - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
87.59 -
87.60 - # If GCC_FOR_TARGET is not overriden on the command line, then this
87.61 -@@ -423,7 +423,7 @@
87.62 - fi; \
87.63 - fi`
87.64 -
87.65 --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
87.66 -+CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
87.67 - LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
87.68 -
87.69 - GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
87.70 -diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
87.71 ---- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
87.72 -+++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
87.73 -@@ -386,7 +386,7 @@
87.74 - # CFLAGS will be just -g. We want to ensure that TARGET libraries
87.75 - # (which we know are built with gcc) are built with optimizations so
87.76 - # prepend -O2 when setting CFLAGS_FOR_TARGET.
87.77 --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
87.78 -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
87.79 - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
87.80 -
87.81 - # If GCC_FOR_TARGET is not overriden on the command line, then this
87.82 -@@ -426,7 +426,7 @@
87.83 - fi; \
87.84 - fi`
87.85 -
87.86 --CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
87.87 -+CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
87.88 - LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
87.89 -
87.90 - GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
88.1 --- a/patches/gdb/6.4/400-mips-coredump.patch-2.4.23-29 Wed Oct 21 18:08:31 2009 +0200
88.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
88.3 @@ -1,28 +0,0 @@
88.4 -Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
88.5 -coredump handling by gdb for current kernels. Update the hardcoded constants
88.6 -to reflect the change.
88.7 ---- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
88.8 -+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
88.9 -@@ -53,12 +53,22 @@
88.10 -
88.11 - #define EF_REG0 6
88.12 - #define EF_REG31 37
88.13 -+
88.14 -+#if 0
88.15 - #define EF_LO 38
88.16 - #define EF_HI 39
88.17 - #define EF_CP0_EPC 40
88.18 - #define EF_CP0_BADVADDR 41
88.19 - #define EF_CP0_STATUS 42
88.20 - #define EF_CP0_CAUSE 43
88.21 -+#else
88.22 -+#define EF_CP0_STATUS 38
88.23 -+#define EF_LO 39
88.24 -+#define EF_HI 40
88.25 -+#define EF_CP0_BADVADDR 41
88.26 -+#define EF_CP0_CAUSE 42
88.27 -+#define EF_CP0_EPC 43
88.28 -+#endif
88.29 -
88.30 - #define EF_SIZE 180
88.31 -
89.1 --- a/patches/gdb/6.5/100-uclibc-conf.patch Wed Oct 21 18:08:31 2009 +0200
89.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
89.3 @@ -1,78 +0,0 @@
89.4 ---- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
89.5 -+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
89.6 -@@ -3583,6 +3583,11 @@
89.7 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
89.8 - ;;
89.9 -
89.10 -+linux-uclibc*)
89.11 -+ lt_cv_deplibs_check_method=pass_all
89.12 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
89.13 -+ ;;
89.14 -+
89.15 - netbsd* | knetbsd*-gnu)
89.16 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
89.17 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
89.18 ---- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
89.19 -+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
89.20 -@@ -653,6 +653,11 @@
89.21 - fi
89.22 - ;;
89.23 -
89.24 -+linux-uclibc*)
89.25 -+ lt_cv_deplibs_check_method=pass_all
89.26 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
89.27 -+ ;;
89.28 -+
89.29 - newsos6)
89.30 - [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
89.31 - lt_cv_file_magic_cmd=/usr/bin/file
89.32 ---- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
89.33 -+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
89.34 -@@ -602,7 +602,7 @@
89.35 -
89.36 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
89.37 - case $host_os in
89.38 --linux-gnu*) ;;
89.39 -+linux-gnu*|linux-uclibc*) ;;
89.40 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
89.41 - esac
89.42 -
89.43 -@@ -1270,6 +1270,24 @@
89.44 - dynamic_linker='GNU/Linux ld.so'
89.45 - ;;
89.46 -
89.47 -+linux-uclibc*)
89.48 -+ version_type=linux
89.49 -+ need_lib_prefix=no
89.50 -+ need_version=no
89.51 -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
89.52 -+ soname_spec='${libname}${release}.so$major'
89.53 -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
89.54 -+ shlibpath_var=LD_LIBRARY_PATH
89.55 -+ shlibpath_overrides_runpath=no
89.56 -+ # This implies no fast_install, which is unacceptable.
89.57 -+ # Some rework will be needed to allow for fast_install
89.58 -+ # before this can be enabled.
89.59 -+ # Note: copied from linux-gnu, and may not be appropriate.
89.60 -+ hardcode_into_libs=yes
89.61 -+ # Assume using the uClibc dynamic linker.
89.62 -+ dynamic_linker="uClibc ld.so"
89.63 -+ ;;
89.64 -+
89.65 - netbsd*)
89.66 - need_lib_prefix=no
89.67 - need_version=no
89.68 ---- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
89.69 -+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
89.70 -@@ -3595,6 +3595,11 @@
89.71 - fi
89.72 - ;;
89.73 -
89.74 -+linux-uclibc*)
89.75 -+ lt_cv_deplibs_check_method=pass_all
89.76 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
89.77 -+ ;;
89.78 -+
89.79 - newsos6)
89.80 - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
89.81 - lt_cv_file_magic_cmd=/usr/bin/file
90.1 --- a/patches/gdb/6.5/110-uclibc-readline-conf.patch Wed Oct 21 18:08:31 2009 +0200
90.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
90.3 @@ -1,15 +0,0 @@
90.4 ---- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
90.5 -+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
90.6 -@@ -6249,7 +6249,12 @@
90.7 -
90.8 -
90.9 - echo "$as_me:$LINENO: checking for mbstate_t" >&5
90.10 -+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
90.11 - echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
90.12 -+if test "${bash_cv_have_mbstate_t+set}" != set; then
90.13 -+ bash_cv_have_mbstate_t=yes
90.14 -+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
90.15 -+fi
90.16 - if test "${bash_cv_have_mbstate_t+set}" = set; then
90.17 - echo $ECHO_N "(cached) $ECHO_C" >&6
90.18 - else
91.1 --- a/patches/gdb/6.5/120-thread-timeout.patch Wed Oct 21 18:08:31 2009 +0200
91.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
91.3 @@ -1,33 +0,0 @@
91.4 ---- gdb-6.5/./gdb/gdbserver/thread-db.c.orig 2006-03-15 08:13:29.000000000 -0800
91.5 -+++ gdb-6.5/./gdb/gdbserver/thread-db.c 2008-04-01 21:21:23.000000000 -0700
91.6 -@@ -21,6 +21,7 @@
91.7 - Foundation, Inc., 51 Franklin Street, Fifth Floor,
91.8 - Boston, MA 02110-1301, USA. */
91.9 -
91.10 -+#include <unistd.h>
91.11 - #include "server.h"
91.12 -
91.13 - #include "linux-low.h"
91.14 -@@ -134,6 +135,7 @@ thread_db_create_event (CORE_ADDR where)
91.15 - td_event_msg_t msg;
91.16 - td_err_e err;
91.17 - struct inferior_linux_data *tdata;
91.18 -+ int timeout;
91.19 -
91.20 - if (debug_threads)
91.21 - fprintf (stderr, "Thread creation event.\n");
91.22 -@@ -144,7 +146,13 @@ thread_db_create_event (CORE_ADDR where)
91.23 - In the LinuxThreads implementation, this is safe,
91.24 - because all events come from the manager thread
91.25 - (except for its own creation, of course). */
91.26 -- err = td_ta_event_getmsg (thread_agent, &msg);
91.27 -+ for (timeout = 0; timeout < 50000; timeout++)
91.28 -+ {
91.29 -+ err = td_ta_event_getmsg (thread_agent, &msg);
91.30 -+ if (err != TD_NOMSG)
91.31 -+ break;
91.32 -+ usleep(1000);
91.33 -+ }
91.34 - if (err != TD_OK)
91.35 - fprintf (stderr, "thread getmsg err: %s\n",
91.36 - thread_db_err_str (err));
92.1 --- a/patches/gdb/6.5/130-fix-compile-flag-mismatch.patch Wed Oct 21 18:08:31 2009 +0200
92.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
92.3 @@ -1,69 +0,0 @@
92.4 -diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
92.5 ---- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
92.6 -+++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
92.7 -@@ -309,7 +309,7 @@
92.8 - # include <unistd.h>
92.9 - #endif"
92.10 -
92.11 --ac_subdirs_all="$ac_subdirs_all doc testsuite"
92.12 -+ac_subdirs_all="$ac_subdirs_all doc"
92.13 - ac_subdirs_all="$ac_subdirs_all gdbtk"
92.14 - ac_subdirs_all="$ac_subdirs_all multi-ice"
92.15 - ac_subdirs_all="$ac_subdirs_all gdbserver"
92.16 -@@ -5940,7 +5940,7 @@
92.17 -
92.18 -
92.19 -
92.20 --subdirs="$subdirs doc testsuite"
92.21 -+subdirs="$subdirs doc"
92.22 -
92.23 -
92.24 - . $srcdir/configure.host
92.25 -diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
92.26 ---- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
92.27 -+++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
92.28 -@@ -1239,7 +1239,7 @@
92.29 - ac_cache_corrupted=: ;;
92.30 - ,);;
92.31 - *)
92.32 -- if test "x$ac_old_val" != "x$ac_new_val"; then
92.33 -+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
92.34 - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
92.35 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
92.36 - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
92.37 -diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
92.38 ---- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
92.39 -+++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
92.40 -@@ -1248,7 +1248,7 @@
92.41 - ac_cache_corrupted=: ;;
92.42 - ,);;
92.43 - *)
92.44 -- if test "x$ac_old_val" != "x$ac_new_val"; then
92.45 -+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then
92.46 - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
92.47 - echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
92.48 - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
92.49 -diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
92.50 ---- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
92.51 -+++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
92.52 -@@ -383,7 +383,7 @@
92.53 - # CFLAGS will be just -g. We want to ensure that TARGET libraries
92.54 - # (which we know are built with gcc) are built with optimizations so
92.55 - # prepend -O2 when setting CFLAGS_FOR_TARGET.
92.56 --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
92.57 -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
92.58 - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
92.59 -
92.60 - # If GCC_FOR_TARGET is not overriden on the command line, then this
92.61 -diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
92.62 ---- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
92.63 -+++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
92.64 -@@ -386,7 +386,7 @@
92.65 - # CFLAGS will be just -g. We want to ensure that TARGET libraries
92.66 - # (which we know are built with gcc) are built with optimizations so
92.67 - # prepend -O2 when setting CFLAGS_FOR_TARGET.
92.68 --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
92.69 -+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
92.70 - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
92.71 -
92.72 - # If GCC_FOR_TARGET is not overriden on the command line, then this
93.1 --- a/patches/gdb/6.5/400-mips-coredump.patch-2.4.23-29 Wed Oct 21 18:08:31 2009 +0200
93.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
93.3 @@ -1,28 +0,0 @@
93.4 -Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
93.5 -coredump handling by gdb for current kernels. Update the hardcoded constants
93.6 -to reflect the change.
93.7 ---- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
93.8 -+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
93.9 -@@ -53,12 +53,22 @@
93.10 -
93.11 - #define EF_REG0 6
93.12 - #define EF_REG31 37
93.13 -+
93.14 -+#if 0
93.15 - #define EF_LO 38
93.16 - #define EF_HI 39
93.17 - #define EF_CP0_EPC 40
93.18 - #define EF_CP0_BADVADDR 41
93.19 - #define EF_CP0_STATUS 42
93.20 - #define EF_CP0_CAUSE 43
93.21 -+#else
93.22 -+#define EF_CP0_STATUS 38
93.23 -+#define EF_LO 39
93.24 -+#define EF_HI 40
93.25 -+#define EF_CP0_BADVADDR 41
93.26 -+#define EF_CP0_CAUSE 42
93.27 -+#define EF_CP0_EPC 43
93.28 -+#endif
93.29 -
93.30 - #define EF_SIZE 180
93.31 -
94.1 --- a/patches/uClibc/0.9.28.1/100-string-functions.patch Wed Oct 21 18:08:31 2009 +0200
94.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
94.3 @@ -1,14 +0,0 @@
94.4 -Give preference to target-optimised functions over glibc's ones,
94.5 -which in turn ahave precedence over generic ones.
94.6 -
94.7 ---- uClibc.orig/libc/Makefile 2005-07-20 08:10:44.000000000 +0200
94.8 -+++ uclibc/libc/Makefile 2005-07-28 13:33:40.000000000 +0200
94.9 -@@ -59,7 +59,7 @@
94.10 - $(AR) dN 2 $(LIBNAME) $$objs && \
94.11 - $(AR) dN 2 $(LIBNAME) $$objs
94.12 - @for objfile in obj.signal \
94.13 -- obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
94.14 -+ obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
94.15 - obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
94.16 - if [ -e $$objfile ] ; then \
94.17 - echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
95.1 --- a/patches/uClibc/0.9.28.1/110-install_dev.patch Wed Oct 21 18:08:31 2009 +0200
95.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
95.3 @@ -1,22 +0,0 @@
95.4 -We know that the kernel headers are in place. Don't try to install them.
95.5 -
95.6 -diff -dur uClibc-0.9.28.1.orig/Makefile uClibc-0.9.28.1/Makefile
95.7 ---- uClibc-0.9.28.1.orig/Makefile 2007-01-28 06:38:00.000000000 +0100
95.8 -+++ uClibc-0.9.28.1/Makefile 2007-01-28 18:55:46.000000000 +0100
95.9 -@@ -158,12 +158,10 @@
95.10 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
95.11 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
95.12 - -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
95.13 -- if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
95.14 -- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
95.15 -- else \
95.16 -- extra_exclude="" ; \
95.17 -- fi ; \
95.18 -- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
95.19 -+ extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
95.20 -+ tar -chf - include --exclude .svn --exclude CVS \
95.21 -+ --exclude include/linux \
95.22 -+ --exclude include/asm'*' \
95.23 - | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
95.24 - ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
95.25 - # Remove floating point related headers since float support is disabled.
96.1 --- a/patches/uClibc/0.9.28.1/120-no_LFS-no_readahead.patch Wed Oct 21 18:08:31 2009 +0200
96.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
96.3 @@ -1,14 +0,0 @@
96.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
96.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile 2007-01-26 00:54:19.000000000 +0100
96.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile 2007-02-01 08:44:37.000000000 +0100
96.7 -@@ -25,6 +25,10 @@
96.8 - SRCS := $(filter-out sbrk.c,$(SRCS))
96.9 - endif
96.10 -
96.11 -+ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
96.12 -+SRCS := $(filter-out readahead.c,$(SRCS))
96.13 -+endif
96.14 -+
96.15 - ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
96.16 - SRCS := $(filter-out ssp.c,$(SRCS))
96.17 - endif
97.1 --- a/patches/uClibc/0.9.28.1/130-time-locale.patch Wed Oct 21 18:08:31 2009 +0200
97.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
97.3 @@ -1,15 +0,0 @@
97.4 -Index: libc/misc/time/time.c
97.5 -===================================================================
97.6 ---- a/libc/misc/time/time.c (revision 17534)
97.7 -+++ b/libc/misc/time/time.c (revision 17647)
97.8 -@@ -158,7 +158,9 @@
97.9 - #endif
97.10 -
97.11 - #if defined (L_tzset) || defined (L_localtime_r) || defined(L_strftime) || \
97.12 -- defined(L__time_mktime) || defined(L__time_mktime_tzi)
97.13 -+ defined(L__time_mktime) || defined(L__time_mktime_tzi) || \
97.14 -+ ((defined(L_strftime) || defined(L_strftime_l)) && \
97.15 -+ defined(__UCLIBC_HAS_XLOCALE__))
97.16 -
97.17 - void _time_tzset (int);
97.18 -
98.1 --- a/patches/uClibc/0.9.28.1/140-ctype.patch Wed Oct 21 18:08:31 2009 +0200
98.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
98.3 @@ -1,17 +0,0 @@
98.4 -diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
98.5 ---- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:25 2005
98.6 -+++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:39 2005
98.7 -@@ -34,11 +34,11 @@
98.8 -
98.9 - /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
98.10 -
98.11 --typedef __uint16_t __ctype_mask_t;
98.12 -+typedef __uint32_t __ctype_mask_t;
98.13 -
98.14 - #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
98.15 -
98.16 --typedef __int16_t __ctype_touplow_t;
98.17 -+typedef __int32_t __ctype_touplow_t;
98.18 - #define __UCLIBC_CTYPE_B_TBL_OFFSET 128
98.19 - #define __UCLIBC_CTYPE_TO_TBL_OFFSET 128
98.20 -
99.1 --- a/patches/uClibc/0.9.28.1/150-custom-ISA.patch Wed Oct 21 18:08:31 2009 +0200
99.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
99.3 @@ -1,31 +0,0 @@
99.4 -diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
99.5 ---- uClibc-0.9.28.orig/Rules.mak 2005-08-18 00:49:49.000000000 +0200
99.6 -+++ uClibc-0.9.28/Rules.mak 2007-01-30 10:53:34.000000000 +0100
99.7 -@@ -168,6 +168,7 @@
99.8 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
99.9 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
99.10 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
99.11 -+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
99.12 - endif
99.13 -
99.14 - ifeq ($(strip $(TARGET_ARCH)),sh)
99.15 -diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
99.16 ---- uClibc-0.9.28.orig/extra/Configs/Config.mips 2005-08-18 00:49:41.000000000 +0200
99.17 -+++ uClibc-0.9.28/extra/Configs/Config.mips 2007-01-30 10:52:12.000000000 +0100
99.18 -@@ -63,4 +63,16 @@
99.19 - config CONFIG_MIPS_ISA_MIPS64
99.20 - bool "MIPS64"
99.21 -
99.22 -+config CONFIG_MIPS_ISA_CUSTOM
99.23 -+ bool "Custom"
99.24 -+
99.25 - endchoice
99.26 -+
99.27 -+config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
99.28 -+ string
99.29 -+ prompt "Custon ISA"
99.30 -+ depends on CONFIG_MIPS_ISA_CUSTOM
99.31 -+ default ""
99.32 -+ help
99.33 -+ Enter your custom ISA here (eg: lx4189!).
99.34 -+
100.1 --- a/patches/uClibc/0.9.28.1/160-mips-asm.h.patch Wed Oct 21 18:08:31 2009 +0200
100.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
100.3 @@ -1,41 +0,0 @@
100.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
100.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S 2007-02-07 11:18:12.000000000 +0100
100.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S 2007-02-07 10:41:34.000000000 +0100
100.7 -@@ -24,7 +24,7 @@
100.8 - #include <sys/regdef.h>
100.9 - #define _ERRNO_H 1
100.10 - #include <bits/errno.h>
100.11 --#include <asm/asm.h>
100.12 -+#include <sys/asm.h>
100.13 -
100.14 - /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
100.15 -
100.16 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
100.17 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:18:12.000000000 +0100
100.18 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:16:52.000000000 +0100
100.19 -@@ -3,9 +3,9 @@
100.20 - /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
100.21 -
100.22 - #include <features.h>
100.23 --#include <asm/asm.h>
100.24 -+#include <sys/asm.h>
100.25 - #include <asm/unistd.h>
100.26 --#include <asm/regdef.h>
100.27 -+#include <sys/regdef.h>
100.28 -
100.29 - .globl pipe
100.30 - .ent pipe, 0
100.31 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
100.32 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:18:12.000000000 +0100
100.33 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:17:03.000000000 +0100
100.34 -@@ -17,8 +17,8 @@
100.35 - 02111-1307 USA. */
100.36 -
100.37 - #include <features.h>
100.38 --#include <asm/asm.h>
100.39 --#include <asm/regdef.h>
100.40 -+#include <sys/asm.h>
100.41 -+#include <sys/regdef.h>
100.42 -
100.43 - #ifdef __PIC__
100.44 - .option pic2
101.1 --- a/patches/uClibc/0.9.28.2/100-string-functions.patch Wed Oct 21 18:08:31 2009 +0200
101.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
101.3 @@ -1,14 +0,0 @@
101.4 -Give preference to target-optimised functions over glibc's ones,
101.5 -which in turn ahave precedence over generic ones.
101.6 -
101.7 ---- uClibc.orig/libc/Makefile 2005-07-20 08:10:44.000000000 +0200
101.8 -+++ uclibc/libc/Makefile 2005-07-28 13:33:40.000000000 +0200
101.9 -@@ -59,7 +59,7 @@
101.10 - $(AR) dN 2 $(LIBNAME) $$objs && \
101.11 - $(AR) dN 2 $(LIBNAME) $$objs
101.12 - @for objfile in obj.signal \
101.13 -- obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
101.14 -+ obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
101.15 - obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
101.16 - if [ -e $$objfile ] ; then \
101.17 - echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
102.1 --- a/patches/uClibc/0.9.28.2/110-install_dev.patch Wed Oct 21 18:08:31 2009 +0200
102.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
102.3 @@ -1,22 +0,0 @@
102.4 -We know that the kernel headers are in place. Don't try to install them.
102.5 -
102.6 -diff -dur uClibc-0.9.28.1.orig/Makefile uClibc-0.9.28.1/Makefile
102.7 ---- uClibc-0.9.28.1.orig/Makefile 2007-01-28 06:38:00.000000000 +0100
102.8 -+++ uClibc-0.9.28.1/Makefile 2007-01-28 18:55:46.000000000 +0100
102.9 -@@ -158,12 +158,10 @@
102.10 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
102.11 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
102.12 - -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
102.13 -- if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
102.14 -- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
102.15 -- else \
102.16 -- extra_exclude="" ; \
102.17 -- fi ; \
102.18 -- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
102.19 -+ extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
102.20 -+ tar -chf - include --exclude .svn --exclude CVS \
102.21 -+ --exclude include/linux \
102.22 -+ --exclude include/asm'*' \
102.23 - | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
102.24 - echo '/* Dont use _syscall#() macros; use the syscall() function */' > \
102.25 - $(PREFIX)$(DEVEL_PREFIX)include/bits/syscalls.h
103.1 --- a/patches/uClibc/0.9.28.2/120-no_LFS-no_readahead.patch Wed Oct 21 18:08:31 2009 +0200
103.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
103.3 @@ -1,14 +0,0 @@
103.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
103.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile 2007-01-26 00:54:19.000000000 +0100
103.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile 2007-02-01 08:44:37.000000000 +0100
103.7 -@@ -25,6 +25,10 @@
103.8 - SRCS := $(filter-out sbrk.c,$(SRCS))
103.9 - endif
103.10 -
103.11 -+ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
103.12 -+SRCS := $(filter-out readahead.c,$(SRCS))
103.13 -+endif
103.14 -+
103.15 - ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
103.16 - SRCS := $(filter-out ssp.c,$(SRCS))
103.17 - endif
104.1 --- a/patches/uClibc/0.9.28.2/130-ctype.patch Wed Oct 21 18:08:31 2009 +0200
104.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
104.3 @@ -1,17 +0,0 @@
104.4 -diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
104.5 ---- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:25 2005
104.6 -+++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:39 2005
104.7 -@@ -34,11 +34,11 @@
104.8 -
104.9 - /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
104.10 -
104.11 --typedef __uint16_t __ctype_mask_t;
104.12 -+typedef __uint32_t __ctype_mask_t;
104.13 -
104.14 - #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
104.15 -
104.16 --typedef __int16_t __ctype_touplow_t;
104.17 -+typedef __int32_t __ctype_touplow_t;
104.18 - #define __UCLIBC_CTYPE_B_TBL_OFFSET 128
104.19 - #define __UCLIBC_CTYPE_TO_TBL_OFFSET 128
104.20 -
105.1 --- a/patches/uClibc/0.9.28.2/140-custom-ISA.patch Wed Oct 21 18:08:31 2009 +0200
105.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
105.3 @@ -1,31 +0,0 @@
105.4 -diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
105.5 ---- uClibc-0.9.28.orig/Rules.mak 2005-08-18 00:49:49.000000000 +0200
105.6 -+++ uClibc-0.9.28/Rules.mak 2007-01-30 10:53:34.000000000 +0100
105.7 -@@ -168,6 +168,7 @@
105.8 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
105.9 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
105.10 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
105.11 -+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
105.12 - endif
105.13 -
105.14 - ifeq ($(strip $(TARGET_ARCH)),sh)
105.15 -diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
105.16 ---- uClibc-0.9.28.orig/extra/Configs/Config.mips 2005-08-18 00:49:41.000000000 +0200
105.17 -+++ uClibc-0.9.28/extra/Configs/Config.mips 2007-01-30 10:52:12.000000000 +0100
105.18 -@@ -63,4 +63,16 @@
105.19 - config CONFIG_MIPS_ISA_MIPS64
105.20 - bool "MIPS64"
105.21 -
105.22 -+config CONFIG_MIPS_ISA_CUSTOM
105.23 -+ bool "Custom"
105.24 -+
105.25 - endchoice
105.26 -+
105.27 -+config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
105.28 -+ string
105.29 -+ prompt "Custon ISA"
105.30 -+ depends on CONFIG_MIPS_ISA_CUSTOM
105.31 -+ default ""
105.32 -+ help
105.33 -+ Enter your custom ISA here (eg: lx4189!).
105.34 -+
106.1 --- a/patches/uClibc/0.9.28.2/150-mips-asm.h.patch Wed Oct 21 18:08:31 2009 +0200
106.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
106.3 @@ -1,41 +0,0 @@
106.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
106.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S 2007-02-07 11:18:12.000000000 +0100
106.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S 2007-02-07 10:41:34.000000000 +0100
106.7 -@@ -24,7 +24,7 @@
106.8 - #include <sys/regdef.h>
106.9 - #define _ERRNO_H 1
106.10 - #include <bits/errno.h>
106.11 --#include <asm/asm.h>
106.12 -+#include <sys/asm.h>
106.13 -
106.14 - /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
106.15 -
106.16 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
106.17 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:18:12.000000000 +0100
106.18 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:16:52.000000000 +0100
106.19 -@@ -3,9 +3,9 @@
106.20 - /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
106.21 -
106.22 - #include <features.h>
106.23 --#include <asm/asm.h>
106.24 -+#include <sys/asm.h>
106.25 - #include <asm/unistd.h>
106.26 --#include <asm/regdef.h>
106.27 -+#include <sys/regdef.h>
106.28 -
106.29 - .globl pipe
106.30 - .ent pipe, 0
106.31 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
106.32 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:18:12.000000000 +0100
106.33 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:17:03.000000000 +0100
106.34 -@@ -17,8 +17,8 @@
106.35 - 02111-1307 USA. */
106.36 -
106.37 - #include <features.h>
106.38 --#include <asm/asm.h>
106.39 --#include <asm/regdef.h>
106.40 -+#include <sys/asm.h>
106.41 -+#include <sys/regdef.h>
106.42 -
106.43 - #ifdef __PIC__
106.44 - .option pic2
107.1 --- a/patches/uClibc/0.9.28/100-string-functions.patch Wed Oct 21 18:08:31 2009 +0200
107.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
107.3 @@ -1,11 +0,0 @@
107.4 ---- uClibc.orig/libc/Makefile 2005-07-20 08:10:44.000000000 +0200
107.5 -+++ uclibc/libc/Makefile 2005-07-28 13:33:40.000000000 +0200
107.6 -@@ -59,7 +59,7 @@
107.7 - $(AR) dN 2 $(LIBNAME) $$objs && \
107.8 - $(AR) dN 2 $(LIBNAME) $$objs
107.9 - @for objfile in obj.signal \
107.10 -- obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
107.11 -+ obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
107.12 - obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
107.13 - if [ -e $$objfile ] ; then \
107.14 - echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \
108.1 --- a/patches/uClibc/0.9.28/110-install_dev.patch Wed Oct 21 18:08:31 2009 +0200
108.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
108.3 @@ -1,39 +0,0 @@
108.4 -There are at least three weird glitches in the Makefile:
108.5 - - the test operator is a dual-equal sign (==) when it should be a single one (=);
108.6 - - the exclude options are not accepted as is by GNU tar;
108.7 - - how on earth could KERNEL_SOURCE possibly be equal to DEVEL_PREFIX ???
108.8 -
108.9 -We (Cedric DUVAL and I, Yann E. MORIN) are not quite sure why it is that way.
108.10 -We're not quite sure either on how to solve this.
108.11 -
108.12 -What we need is to built a toolchain; in no way we need to install the linux headers.
108.13 - ==> systematically exclude them from the [s]tar command.
108.14 -
108.15 -This patch is inspired by the svn repository of uClibc as of 20060209.
108.16 -diff -dur /home/ymorin/dev/uClibc-0.9.28/Makefile uClibc-0.9.28/Makefile
108.17 ---- /home/ymorin/dev/uClibc-0.9.28/Makefile 2005-08-18 00:49:49.000000000 +0200
108.18 -+++ uClibc-0.9.28/Makefile 2006-02-09 17:06:58.000000000 +0100
108.19 -@@ -158,12 +158,17 @@
108.20 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
108.21 - $(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
108.22 - -$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
108.23 -- if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
108.24 -- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
108.25 -- else \
108.26 -- extra_exclude="" ; \
108.27 -- fi ; \
108.28 -- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
108.29 -+# if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
108.30 -+# extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
108.31 -+# else \
108.32 -+# extra_exclude="" ; \
108.33 -+# fi ; \
108.34 -+# tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
108.35 -+# | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
108.36 -+ printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
108.37 -+ ls -1d include/linux include/asm* >> tar_exclude ; \
108.38 -+ tar -chf - -X tar_exclude include \
108.39 - | tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
108.40 -+ rm -f tar_exclude
108.41 - ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
108.42 - # Remove floating point related headers since float support is disabled.
109.1 --- a/patches/uClibc/0.9.28/120-no_LFS-no_readahead.patch Wed Oct 21 18:08:31 2009 +0200
109.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
109.3 @@ -1,14 +0,0 @@
109.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
109.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile 2007-01-26 00:54:19.000000000 +0100
109.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile 2007-02-01 08:44:37.000000000 +0100
109.7 -@@ -25,6 +25,10 @@
109.8 - SRCS := $(filter-out sbrk.c,$(SRCS))
109.9 - endif
109.10 -
109.11 -+ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
109.12 -+SRCS := $(filter-out readahead.c,$(SRCS))
109.13 -+endif
109.14 -+
109.15 - ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
109.16 - SRCS := $(filter-out ssp.c,$(SRCS))
109.17 - endif
110.1 --- a/patches/uClibc/0.9.28/130-ctype.patch Wed Oct 21 18:08:31 2009 +0200
110.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
110.3 @@ -1,17 +0,0 @@
110.4 -diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
110.5 ---- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:25 2005
110.6 -+++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:39 2005
110.7 -@@ -34,11 +34,11 @@
110.8 -
110.9 - /* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
110.10 -
110.11 --typedef __uint16_t __ctype_mask_t;
110.12 -+typedef __uint32_t __ctype_mask_t;
110.13 -
110.14 - #ifdef __UCLIBC_HAS_CTYPE_SIGNED__
110.15 -
110.16 --typedef __int16_t __ctype_touplow_t;
110.17 -+typedef __int32_t __ctype_touplow_t;
110.18 - #define __UCLIBC_CTYPE_B_TBL_OFFSET 128
110.19 - #define __UCLIBC_CTYPE_TO_TBL_OFFSET 128
110.20 -
111.1 --- a/patches/uClibc/0.9.28/140-fix_includes.sh.patch Wed Oct 21 18:08:31 2009 +0200
111.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
111.3 @@ -1,316 +0,0 @@
111.4 ---- uClibc-0.9.28/extra/scripts/fix_includes.sh.orig 2006-12-13 05:44:21.000000000 -0700
111.5 -+++ uClibc-0.9.28/extra/scripts/fix_includes.sh 2006-12-13 05:44:35.000000000 -0700
111.6 -@@ -1,183 +1,155 @@
111.7 - #!/bin/sh
111.8 --# Copyright (C) 2003 Erik Andersen <andersen@uclibc.org>
111.9 - #
111.10 --# This program is free software; you can redistribute it and/or
111.11 --# modify it under the terms of the GNU Library General Public
111.12 --# License as published by the Free Software Foundation; either
111.13 --# version 2 of the License, or (at your option) any later
111.14 --# version.
111.15 --#
111.16 --# This program is distributed in the hope that it will be useful,
111.17 --# but WITHOUT ANY WARRANTY; without even the implied warranty of
111.18 --# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111.19 --# GNU Library General Public License for more details.
111.20 --#
111.21 --# You should have received a copy of the GNU Library General
111.22 --# Public License along with this program; if not, write to the
111.23 --# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
111.24 --# Boston, MA 02111-1307 USA
111.25 --
111.26 --usage () {
111.27 -- echo ""
111.28 -- echo "usage: "`basename $0`" -k KERNEL_SOURCE_DIRECTORY -t TARGET_ARCH"
111.29 -- echo ""
111.30 -- echo "This utility scans the KERNEL_SOURCE_DIRECTORY directory and"
111.31 -- echo "checks that it contains well formed kernel headers suitable"
111.32 -- echo "for inclusion as the include/linux/ directory provided by"
111.33 -- echo "uClibc."
111.34 -- echo ""
111.35 -- echo "If the specified kernel headers are present and already"
111.36 -- echo "configured for the architecture specified by TARGET_ARCH,"
111.37 -- echo "they will be used as-is."
111.38 -- echo ""
111.39 -- echo "If the specified kernel headers are missing entirely, this"
111.40 -- echo "script will return an error."
111.41 -- echo ""
111.42 -- echo "If the specified kernel headers are present, but are either"
111.43 -- echo "not yet configured or are configured for an architecture"
111.44 -- echo "different than that specified by TARGET_ARCH, this script"
111.45 -- echo "will attempt to 'fix' the kernel headers and make them"
111.46 -- echo "suitable for use by uClibc. This fixing process may fail."
111.47 -- echo "It is therefore best to always provide kernel headers that"
111.48 -- echo "are already configured for the selected architecture."
111.49 -- echo ""
111.50 -- echo "Most Linux distributions provide 'kernel-headers' packages"
111.51 -- echo "that are suitable for use by uClibc."
111.52 -- echo ""
111.53 -- echo ""
111.54 -- exit 1;
111.55 -+# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
111.56 -+#
111.57 -+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
111.58 -+#
111.59 -+
111.60 -+usage() {
111.61 -+ echo ""
111.62 -+ echo "usage: "`basename $0`" -k KERNEL_SOURCE_DIRECTORY -t TARGET_ARCH"
111.63 -+ echo ""
111.64 -+ echo "This utility scans the KERNEL_SOURCE_DIRECTORY directory and"
111.65 -+ echo "checks that it contains well formed kernel headers suitable"
111.66 -+ echo "for inclusion as the include/linux/ directory provided by"
111.67 -+ echo "uClibc."
111.68 -+ echo ""
111.69 -+ echo "If the specified kernel headers are present and already"
111.70 -+ echo "configured for the architecture specified by TARGET_ARCH,"
111.71 -+ echo "they will be used as-is."
111.72 -+ echo ""
111.73 -+ echo "If the specified kernel headers are missing entirely, this"
111.74 -+ echo "script will return an error."
111.75 -+ echo ""
111.76 -+ echo "If the specified kernel headers are present, but are either"
111.77 -+ echo "not yet configured or are configured for an architecture"
111.78 -+ echo "different than that specified by TARGET_ARCH, this script"
111.79 -+ echo "will attempt to 'fix' the kernel headers and make them"
111.80 -+ echo "suitable for use by uClibc. This fixing process may fail."
111.81 -+ echo "It is therefore best to always provide kernel headers that"
111.82 -+ echo "are already configured for the selected architecture."
111.83 -+ echo ""
111.84 -+ echo "Most Linux distributions provide 'kernel-headers' packages"
111.85 -+ echo "that are suitable for use by uClibc."
111.86 -+ echo ""
111.87 -+ echo ""
111.88 -+ exit 1
111.89 - }
111.90 -
111.91 --HAS_MMU="y";
111.92 -+
111.93 -+#
111.94 -+# Parse our arguments
111.95 -+#
111.96 -+HAS_MMU="y"
111.97 - while [ -n "$1" ]; do
111.98 -- case $1 in
111.99 -- -k ) shift; if [ -n "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
111.100 -- -t ) shift; if [ -n "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
111.101 -- -n ) shift; HAS_MMU="n"; ;;
111.102 -- -* ) usage; ;;
111.103 -- * ) usage; ;;
111.104 -- esac;
111.105 --done;
111.106 -+ case $1 in
111.107 -+ -k ) shift; if [ -n "$1" ]; then KERNEL_SOURCE=$1; shift; else usage; fi; ;;
111.108 -+ -t ) shift; if [ -n "$1" ]; then TARGET_ARCH=$1; shift; else usage; fi; ;;
111.109 -+ -n ) shift; HAS_MMU="n"; ;;
111.110 -+ -* ) usage; ;;
111.111 -+ * ) usage; ;;
111.112 -+ esac
111.113 -+done
111.114 -
111.115 --if [ ! -f "$KERNEL_SOURCE/Makefile" -a ! -f "$KERNEL_SOURCE/include/linux/version.h" ]; then
111.116 -- echo "";
111.117 -- echo "";
111.118 -- echo "The file $KERNEL_SOURCE/Makefile or $KERNEL_SOURCE/include/linux/version.h is missing!";
111.119 -- echo "Perhaps your kernel source is broken?"
111.120 -- echo "";
111.121 -- echo "";
111.122 -- exit 1;
111.123 --fi;
111.124 -
111.125 --if [ ! -d "$KERNEL_SOURCE" ]; then
111.126 -- echo "";
111.127 -- echo "";
111.128 -- echo "$KERNEL_SOURCE is not a directory";
111.129 -- echo "";
111.130 -- echo "";
111.131 -- exit 1;
111.132 --fi;
111.133 --
111.134 --if [ -f "$KERNEL_SOURCE/Makefile" ] ; then
111.135 --# set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION
111.136 --eval `sed -n -e 's/^\([A-Z]*\) = \([0-9]*\)$/\1=\2/p' -e 's/^\([A-Z]*\) = \(-[-a-z0-9]*\)$/\1=\2/p' $KERNEL_SOURCE/Makefile`
111.137 --else
111.138 --ver=`grep UTS_RELEASE $KERNEL_SOURCE/include/linux/version.h | cut -d '"' -f 2`
111.139 --VERSION=`echo "$ver" | cut -d '.' -f 1`
111.140 --PATCHLEVEL=`echo "$ver" | cut -d '.' -f 2`
111.141 --if echo "$ver" | grep -q '-' ; then
111.142 --SUBLEVEL=`echo "$ver" | sed "s/${VERSION}.${PATCHLEVEL}.//" | cut -d '-' -f 1`
111.143 --EXTRAVERSION=`echo "$ver" | sed "s/${VERSION}.${PATCHLEVEL}.${SUBLEVEL}-//"`
111.144 --else
111.145 --SUBLEVEL=`echo "$ver" | cut -d '.' -f 3`
111.146 --#EXTRAVERSION=
111.147 --fi
111.148 -+#
111.149 -+# Perform some sanity checks on our kernel sources
111.150 -+#
111.151 -+if [ ! -f "$KERNEL_SOURCE/Makefile" -a ! -f "$KERNEL_SOURCE/include/linux/version.h" ]; then
111.152 -+ echo ""
111.153 -+ echo ""
111.154 -+ echo "The file $KERNEL_SOURCE/Makefile or $KERNEL_SOURCE/include/linux/version.h is missing!"
111.155 -+ echo "Perhaps your kernel source is broken?"
111.156 -+ echo ""
111.157 -+ echo ""
111.158 -+ exit 1
111.159 - fi
111.160 --if [ -z "$VERSION" -o -z "$PATCHLEVEL" -o -z "$SUBLEVEL" ]
111.161 --then
111.162 -- echo "Unable to determine version for kernel headers"
111.163 -- echo -e "\tprovided in directory $KERNEL_SOURCE"
111.164 -- exit 1
111.165 -+if [ ! -d "$KERNEL_SOURCE" ]; then
111.166 -+ echo ""
111.167 -+ echo ""
111.168 -+ echo "$KERNEL_SOURCE is not a directory"
111.169 -+ echo ""
111.170 -+ echo ""
111.171 -+ exit 1
111.172 - fi
111.173 -
111.174 --if [ "$MAKE_IS_SILENT" != "y" ]; then
111.175 --echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION}"
111.176 --echo -e "\n"
111.177 --echo "Using kernel headers from $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} for architecture '$TARGET_ARCH'"
111.178 --echo -e "\tprovided in directory $KERNEL_SOURCE"
111.179 --echo -e "\n"
111.180 --fi
111.181 -
111.182 -+#
111.183 - # Create a symlink to include/asm
111.184 --
111.185 -+#
111.186 - rm -f include/asm*
111.187 - if [ ! -d "$KERNEL_SOURCE/include/asm" ]; then
111.188 -- echo "";
111.189 -- echo "";
111.190 -- echo "The symlink $KERNEL_SOURCE/include/asm is missing\!";
111.191 -- echo "Perhaps you forgot to configure your kernel source?";
111.192 -- echo "You really should configure your kernel source tree so I";
111.193 -- echo "do not have to try and guess about this sort of thing.";
111.194 -- echo ""
111.195 -- echo "Attempting to guess a usable value....";
111.196 -- echo ""
111.197 -- echo "";
111.198 -- sleep 1;
111.199 --
111.200 -- if [ "$TARGET_ARCH" = "powerpc" ];then
111.201 -- set -x;
111.202 -- ln -fs $KERNEL_SOURCE/include/asm-ppc include/asm;
111.203 -- set +x;
111.204 -- elif [ "$TARGET_ARCH" = "mips" ];then
111.205 -- set -x;
111.206 -- ln -fs $KERNEL_SOURCE/include/asm-mips include/asm;
111.207 -- set +x;
111.208 -- elif [ "$TARGET_ARCH" = "arm" ];then
111.209 -- set -x;
111.210 -- ln -fs $KERNEL_SOURCE/include/asm-arm include/asm;
111.211 -- set +x;
111.212 -- if [ ! -L $KERNEL_SOURCE/include/asm-arm/proc ] ; then
111.213 -- if [ ! -L proc ] ; then
111.214 -- (cd include/asm;
111.215 -- ln -fs proc-armv proc;
111.216 -- ln -fs arch-ebsa285 arch);
111.217 -- fi
111.218 -+ echo ""
111.219 -+ echo ""
111.220 -+ echo "The symlink $KERNEL_SOURCE/include/asm is missing\!"
111.221 -+ echo "Perhaps you forgot to configure your kernel source?"
111.222 -+ echo "You really should configure your kernel source tree so I"
111.223 -+ echo "do not have to try and guess about this sort of thing."
111.224 -+ echo ""
111.225 -+ echo "Attempting to guess a usable value...."
111.226 -+ echo ""
111.227 -+ echo ""
111.228 -+ sleep 1
111.229 -+
111.230 -+ if [ "$TARGET_ARCH" = "powerpc" ]; then
111.231 -+ set -x
111.232 -+ ln -fs $KERNEL_SOURCE/include/asm-ppc include/asm
111.233 -+ set +x
111.234 -+ elif [ "$TARGET_ARCH" = "mips" ]; then
111.235 -+ set -x
111.236 -+ ln -fs $KERNEL_SOURCE/include/asm-mips include/asm
111.237 -+ set +x
111.238 -+ elif [ "$TARGET_ARCH" = "arm" ]; then
111.239 -+ set -x
111.240 -+ ln -fs $KERNEL_SOURCE/include/asm-arm include/asm
111.241 -+ set +x
111.242 -+ if [ ! -L $KERNEL_SOURCE/include/asm-arm/proc ]; then
111.243 -+ if [ ! -L proc ]; then
111.244 -+ (
111.245 -+ cd include/asm
111.246 -+ ln -fs proc-armv proc
111.247 -+ ln -fs arch-ebsa285 arch
111.248 -+ )
111.249 -+ fi
111.250 -+ fi
111.251 -+ elif [ "$TARGET_ARCH" = "cris" ]; then
111.252 -+ set -x
111.253 -+ ln -fs $KERNEL_SOURCE/include/asm-cris include/asm
111.254 -+ set +x
111.255 -+ elif [ "$HAS_MMU" != "y" ]; then
111.256 -+ if [ -d $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu ]; then
111.257 -+ set -x
111.258 -+ ln -fs $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu include/asm
111.259 -+ set +x
111.260 -+ else
111.261 -+ set -x
111.262 -+ ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm
111.263 -+ set +x
111.264 -+ fi
111.265 -+ else
111.266 -+ set -x
111.267 -+ ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm
111.268 -+ set +x
111.269 - fi;
111.270 -- elif [ "$TARGET_ARCH" = "cris" ]; then
111.271 -- set -x;
111.272 -- ln -fs $KERNEL_SOURCE/include/asm-cris include/asm;
111.273 -- set +x;
111.274 -- elif [ "$HAS_MMU" != "y" ]; then
111.275 -- if [ -d $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu ] ; then
111.276 -- set -x;
111.277 -- ln -fs $KERNEL_SOURCE/include/asm-${TARGET_ARCH}nommu include/asm;
111.278 -- set +x;
111.279 -- else
111.280 -- set -x;
111.281 -- ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm;
111.282 -- set +x;
111.283 -- fi;
111.284 -- else
111.285 -- set -x;
111.286 -- ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm;
111.287 -- set +x;
111.288 -- fi;
111.289 - else
111.290 --# No guessing required.....
111.291 --ln -fs $KERNEL_SOURCE/include/asm include/asm
111.292 --if [ -e $KERNEL_SOURCE/include/asm-$TARGET_ARCH ] ; then
111.293 --ln -fs $KERNEL_SOURCE/include/asm-$TARGET_ARCH include/asm-$TARGET_ARCH
111.294 -+ # No guessing required.....
111.295 -+ for x in $KERNEL_SOURCE/include/asm* ; do
111.296 -+ ln -fs ${x} include/
111.297 -+ done
111.298 - fi
111.299 --fi;
111.300 -
111.301 -
111.302 -+#
111.303 - # Annoyingly, 2.6.x kernel headers also need an include/asm-generic/ directory
111.304 --if [ $VERSION -eq 2 ] && [ $PATCHLEVEL -ge 6 ] ; then
111.305 -- ln -fs $KERNEL_SOURCE/include/asm-generic include/asm-generic
111.306 --fi;
111.307 -+#
111.308 -+if [ -e $KERNEL_SOURCE/include/asm-generic ]; then
111.309 -+ rm -f include/asm-generic
111.310 -+ ln -fs $KERNEL_SOURCE/include/asm-generic include/asm-generic
111.311 -+fi
111.312 -
111.313 -
111.314 -+#
111.315 - # Create the include/linux symlink.
111.316 -+#
111.317 - rm -f include/linux
111.318 - ln -fs $KERNEL_SOURCE/include/linux include/linux
111.319 --
112.1 --- a/patches/uClibc/0.9.28/150-custom-ISA.patch Wed Oct 21 18:08:31 2009 +0200
112.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
112.3 @@ -1,31 +0,0 @@
112.4 -diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
112.5 ---- uClibc-0.9.28.orig/Rules.mak 2005-08-18 00:49:49.000000000 +0200
112.6 -+++ uClibc-0.9.28/Rules.mak 2007-01-30 10:53:34.000000000 +0100
112.7 -@@ -168,6 +168,7 @@
112.8 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
112.9 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
112.10 - CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
112.11 -+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
112.12 - endif
112.13 -
112.14 - ifeq ($(strip $(TARGET_ARCH)),sh)
112.15 -diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
112.16 ---- uClibc-0.9.28.orig/extra/Configs/Config.mips 2005-08-18 00:49:41.000000000 +0200
112.17 -+++ uClibc-0.9.28/extra/Configs/Config.mips 2007-01-30 10:52:12.000000000 +0100
112.18 -@@ -63,4 +63,16 @@
112.19 - config CONFIG_MIPS_ISA_MIPS64
112.20 - bool "MIPS64"
112.21 -
112.22 -+config CONFIG_MIPS_ISA_CUSTOM
112.23 -+ bool "Custom"
112.24 -+
112.25 - endchoice
112.26 -+
112.27 -+config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
112.28 -+ string
112.29 -+ prompt "Custon ISA"
112.30 -+ depends on CONFIG_MIPS_ISA_CUSTOM
112.31 -+ default ""
112.32 -+ help
112.33 -+ Enter your custom ISA here (eg: lx4189!).
112.34 -+
113.1 --- a/patches/uClibc/0.9.28/160-mips-asm.h.patch Wed Oct 21 18:08:31 2009 +0200
113.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
113.3 @@ -1,41 +0,0 @@
113.4 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
113.5 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S 2007-02-07 11:18:12.000000000 +0100
113.6 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S 2007-02-07 10:41:34.000000000 +0100
113.7 -@@ -24,7 +24,7 @@
113.8 - #include <sys/regdef.h>
113.9 - #define _ERRNO_H 1
113.10 - #include <bits/errno.h>
113.11 --#include <asm/asm.h>
113.12 -+#include <sys/asm.h>
113.13 -
113.14 - /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
113.15 -
113.16 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
113.17 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:18:12.000000000 +0100
113.18 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:16:52.000000000 +0100
113.19 -@@ -3,9 +3,9 @@
113.20 - /*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
113.21 -
113.22 - #include <features.h>
113.23 --#include <asm/asm.h>
113.24 -+#include <sys/asm.h>
113.25 - #include <asm/unistd.h>
113.26 --#include <asm/regdef.h>
113.27 -+#include <sys/regdef.h>
113.28 -
113.29 - .globl pipe
113.30 - .ent pipe, 0
113.31 -diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
113.32 ---- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:18:12.000000000 +0100
113.33 -+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:17:03.000000000 +0100
113.34 -@@ -17,8 +17,8 @@
113.35 - 02111-1307 USA. */
113.36 -
113.37 - #include <features.h>
113.38 --#include <asm/asm.h>
113.39 --#include <asm/regdef.h>
113.40 -+#include <sys/asm.h>
113.41 -+#include <sys/regdef.h>
113.42 -
113.43 - #ifdef __PIC__
113.44 - .option pic2
114.1 --- a/patches/uClibc/20080801/100-ifaddrs.patch Wed Oct 21 18:08:31 2009 +0200
114.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
114.3 @@ -1,190 +0,0 @@
114.4 -Copyright 2008 Yann E. MORIN.
114.5 -
114.6 -This patch is needed to make gcc-4.3.1 able to build the Java frontend.
114.7 -
114.8 -Index: uClibc/libc/inet/ifaddrs.c
114.9 -===================================================================
114.10 ---- uClibc/libc/inet/ifaddrs.c (revision 23002)
114.11 -+++ uClibc/libc/inet/ifaddrs.c (working copy)
114.12 -@@ -22,7 +22,7 @@
114.13 - #include <alloca.h>
114.14 - #include <assert.h>
114.15 - #include <errno.h>
114.16 --#include "ifaddrs.h"
114.17 -+#include <ifaddrs.h>
114.18 - #include <net/if.h>
114.19 - #include <netinet/in.h>
114.20 - #include <netpacket/packet.h>
114.21 -Index: uClibc/libc/inet/ifaddrs.h
114.22 -===================================================================
114.23 ---- uClibc/libc/inet/ifaddrs.h (revision 23002)
114.24 -+++ uClibc/libc/inet/ifaddrs.h (working copy)
114.25 -@@ -1,76 +0,0 @@
114.26 --/* ifaddrs.h -- declarations for getting network interface addresses
114.27 -- Copyright (C) 2002 Free Software Foundation, Inc.
114.28 -- This file is part of the GNU C Library.
114.29 --
114.30 -- The GNU C Library is free software; you can redistribute it and/or
114.31 -- modify it under the terms of the GNU Lesser General Public
114.32 -- License as published by the Free Software Foundation; either
114.33 -- version 2.1 of the License, or (at your option) any later version.
114.34 --
114.35 -- The GNU C Library is distributed in the hope that it will be useful,
114.36 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
114.37 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
114.38 -- Lesser General Public License for more details.
114.39 --
114.40 -- You should have received a copy of the GNU Lesser General Public
114.41 -- License along with the GNU C Library; if not, write to the Free
114.42 -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
114.43 -- 02111-1307 USA. */
114.44 --
114.45 --#ifndef _IFADDRS_H
114.46 --#define _IFADDRS_H 1
114.47 --
114.48 --#include <features.h>
114.49 --#include <sys/socket.h>
114.50 --#include <stdbool.h>
114.51 --#include <stdint.h>
114.52 --
114.53 --__BEGIN_DECLS
114.54 --
114.55 --/* The `getifaddrs' function generates a linked list of these structures.
114.56 -- Each element of the list describes one network interface. */
114.57 --struct ifaddrs
114.58 --{
114.59 -- struct ifaddrs *ifa_next; /* Pointer to the next structure. */
114.60 --
114.61 -- char *ifa_name; /* Name of this network interface. */
114.62 -- unsigned int ifa_flags; /* Flags as from SIOCGIFFLAGS ioctl. */
114.63 --
114.64 -- struct sockaddr *ifa_addr; /* Network address of this interface. */
114.65 -- struct sockaddr *ifa_netmask; /* Netmask of this interface. */
114.66 -- union
114.67 -- {
114.68 -- /* At most one of the following two is valid. If the IFF_BROADCAST
114.69 -- bit is set in `ifa_flags', then `ifa_broadaddr' is valid. If the
114.70 -- IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid.
114.71 -- It is never the case that both these bits are set at once. */
114.72 -- struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
114.73 -- struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */
114.74 -- } ifa_ifu;
114.75 -- /* These very same macros are defined by <net/if.h> for `struct ifaddr'.
114.76 -- So if they are defined already, the existing definitions will be fine. */
114.77 --# ifndef ifa_broadaddr
114.78 --# define ifa_broadaddr ifa_ifu.ifu_broadaddr
114.79 --# endif
114.80 --# ifndef ifa_dstaddr
114.81 --# define ifa_dstaddr ifa_ifu.ifu_dstaddr
114.82 --# endif
114.83 --
114.84 -- void *ifa_data; /* Address-specific data (may be unused). */
114.85 --};
114.86 --
114.87 --
114.88 --/* Create a linked list of `struct ifaddrs' structures, one for each
114.89 -- network interface on the host machine. If successful, store the
114.90 -- list in *IFAP and return 0. On errors, return -1 and set `errno'.
114.91 --
114.92 -- The storage returned in *IFAP is allocated dynamically and can
114.93 -- only be properly freed by passing it to `freeifaddrs'. */
114.94 --extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
114.95 --
114.96 --/* Reclaim the storage allocated by a previous `getifaddrs' call. */
114.97 --extern void freeifaddrs (struct ifaddrs *__ifa) __THROW;
114.98 --
114.99 --__END_DECLS
114.100 --
114.101 --#endif /* ifaddrs.h */
114.102 -Index: uClibc/libc/inet/getaddrinfo.c
114.103 -===================================================================
114.104 ---- uClibc/libc/inet/getaddrinfo.c (revision 23002)
114.105 -+++ uClibc/libc/inet/getaddrinfo.c (working copy)
114.106 -@@ -68,7 +68,7 @@
114.107 - #include <sys/un.h>
114.108 - #include <sys/utsname.h>
114.109 - #include <net/if.h>
114.110 --#include "ifaddrs.h"
114.111 -+#include <ifaddrs.h>
114.112 -
114.113 - /* Experimentally off - libc_hidden_proto(memcpy) */
114.114 - /* Experimentally off - libc_hidden_proto(memset) */
114.115 ---- /dev/null 2008-08-04 09:44:45.624322752 +0200
114.116 -+++ uClibc/include/ifaddrs.h 2008-08-05 09:31:20.000000000 +0200
114.117 -@@ -0,0 +1,76 @@
114.118 -+/* ifaddrs.h -- declarations for getting network interface addresses
114.119 -+ Copyright (C) 2002 Free Software Foundation, Inc.
114.120 -+ This file is part of the GNU C Library.
114.121 -+
114.122 -+ The GNU C Library is free software; you can redistribute it and/or
114.123 -+ modify it under the terms of the GNU Lesser General Public
114.124 -+ License as published by the Free Software Foundation; either
114.125 -+ version 2.1 of the License, or (at your option) any later version.
114.126 -+
114.127 -+ The GNU C Library is distributed in the hope that it will be useful,
114.128 -+ but WITHOUT ANY WARRANTY; without even the implied warranty of
114.129 -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
114.130 -+ Lesser General Public License for more details.
114.131 -+
114.132 -+ You should have received a copy of the GNU Lesser General Public
114.133 -+ License along with the GNU C Library; if not, write to the Free
114.134 -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
114.135 -+ 02111-1307 USA. */
114.136 -+
114.137 -+#ifndef _IFADDRS_H
114.138 -+#define _IFADDRS_H 1
114.139 -+
114.140 -+#include <features.h>
114.141 -+#include <sys/socket.h>
114.142 -+#include <stdbool.h>
114.143 -+#include <stdint.h>
114.144 -+
114.145 -+__BEGIN_DECLS
114.146 -+
114.147 -+/* The `getifaddrs' function generates a linked list of these structures.
114.148 -+ Each element of the list describes one network interface. */
114.149 -+struct ifaddrs
114.150 -+{
114.151 -+ struct ifaddrs *ifa_next; /* Pointer to the next structure. */
114.152 -+
114.153 -+ char *ifa_name; /* Name of this network interface. */
114.154 -+ unsigned int ifa_flags; /* Flags as from SIOCGIFFLAGS ioctl. */
114.155 -+
114.156 -+ struct sockaddr *ifa_addr; /* Network address of this interface. */
114.157 -+ struct sockaddr *ifa_netmask; /* Netmask of this interface. */
114.158 -+ union
114.159 -+ {
114.160 -+ /* At most one of the following two is valid. If the IFF_BROADCAST
114.161 -+ bit is set in `ifa_flags', then `ifa_broadaddr' is valid. If the
114.162 -+ IFF_POINTOPOINT bit is set, then `ifa_dstaddr' is valid.
114.163 -+ It is never the case that both these bits are set at once. */
114.164 -+ struct sockaddr *ifu_broadaddr; /* Broadcast address of this interface. */
114.165 -+ struct sockaddr *ifu_dstaddr; /* Point-to-point destination address. */
114.166 -+ } ifa_ifu;
114.167 -+ /* These very same macros are defined by <net/if.h> for `struct ifaddr'.
114.168 -+ So if they are defined already, the existing definitions will be fine. */
114.169 -+# ifndef ifa_broadaddr
114.170 -+# define ifa_broadaddr ifa_ifu.ifu_broadaddr
114.171 -+# endif
114.172 -+# ifndef ifa_dstaddr
114.173 -+# define ifa_dstaddr ifa_ifu.ifu_dstaddr
114.174 -+# endif
114.175 -+
114.176 -+ void *ifa_data; /* Address-specific data (may be unused). */
114.177 -+};
114.178 -+
114.179 -+
114.180 -+/* Create a linked list of `struct ifaddrs' structures, one for each
114.181 -+ network interface on the host machine. If successful, store the
114.182 -+ list in *IFAP and return 0. On errors, return -1 and set `errno'.
114.183 -+
114.184 -+ The storage returned in *IFAP is allocated dynamically and can
114.185 -+ only be properly freed by passing it to `freeifaddrs'. */
114.186 -+extern int getifaddrs (struct ifaddrs **__ifap) __THROW;
114.187 -+
114.188 -+/* Reclaim the storage allocated by a previous `getifaddrs' call. */
114.189 -+extern void freeifaddrs (struct ifaddrs *__ifa) __THROW;
114.190 -+
114.191 -+__END_DECLS
114.192 -+
114.193 -+#endif /* ifaddrs.h */
115.1 --- a/patches/uClibc/20080801/200-mips-typeof.patch Wed Oct 21 18:08:31 2009 +0200
115.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
115.3 @@ -1,112 +0,0 @@
115.4 -Index: uClibc/libc/sysdeps/linux/mips/bits/atomic.h
115.5 -===================================================================
115.6 ---- uClibc/libc/sysdeps/linux/mips/bits/atomic.h (revision 23002)
115.7 -+++ uClibc/libc/sysdeps/linux/mips/bits/atomic.h (working copy)
115.8 -@@ -110,22 +110,22 @@
115.9 - /* For all "bool" routines, we return FALSE if exchange succesful. */
115.10 -
115.11 - #define __arch_compare_and_exchange_bool_8_int(mem, new, old, rel, acq) \
115.12 --({ typeof (*mem) __prev; int __cmp; \
115.13 -+({ __typeof (*mem) __prev; int __cmp; \
115.14 - __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
115.15 - !__cmp; })
115.16 -
115.17 - #define __arch_compare_and_exchange_bool_16_int(mem, new, old, rel, acq) \
115.18 --({ typeof (*mem) __prev; int __cmp; \
115.19 -+({ __typeof (*mem) __prev; int __cmp; \
115.20 - __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
115.21 - !__cmp; })
115.22 -
115.23 - #define __arch_compare_and_exchange_bool_32_int(mem, new, old, rel, acq) \
115.24 --({ typeof (*mem) __prev; int __cmp; \
115.25 -+({ __typeof (*mem) __prev; int __cmp; \
115.26 - __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
115.27 - !__cmp; })
115.28 -
115.29 - #define __arch_compare_and_exchange_bool_64_int(mem, new, old, rel, acq) \
115.30 --({ typeof (*mem) __prev; int __cmp; \
115.31 -+({ __typeof (*mem) __prev; int __cmp; \
115.32 - __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
115.33 - !__cmp; })
115.34 -
115.35 -@@ -133,24 +133,24 @@
115.36 - successful or not. */
115.37 -
115.38 - #define __arch_compare_and_exchange_val_8_int(mem, new, old, rel, acq) \
115.39 --({ typeof (*mem) __prev; int __cmp; \
115.40 -+({ __typeof (*mem) __prev; int __cmp; \
115.41 - __arch_compare_and_exchange_xxx_8_int(mem, new, old, rel, acq); \
115.42 -- (typeof (*mem))__prev; })
115.43 -+ (__typeof (*mem))__prev; })
115.44 -
115.45 - #define __arch_compare_and_exchange_val_16_int(mem, new, old, rel, acq) \
115.46 --({ typeof (*mem) __prev; int __cmp; \
115.47 -+({ __typeof (*mem) __prev; int __cmp; \
115.48 - __arch_compare_and_exchange_xxx_16_int(mem, new, old, rel, acq); \
115.49 -- (typeof (*mem))__prev; })
115.50 -+ (__typeof (*mem))__prev; })
115.51 -
115.52 - #define __arch_compare_and_exchange_val_32_int(mem, new, old, rel, acq) \
115.53 --({ typeof (*mem) __prev; int __cmp; \
115.54 -+({ __typeof (*mem) __prev; int __cmp; \
115.55 - __arch_compare_and_exchange_xxx_32_int(mem, new, old, rel, acq); \
115.56 -- (typeof (*mem))__prev; })
115.57 -+ (__typeof (*mem))__prev; })
115.58 -
115.59 - #define __arch_compare_and_exchange_val_64_int(mem, new, old, rel, acq) \
115.60 --({ typeof (*mem) __prev; int __cmp; \
115.61 -+({ __typeof (*mem) __prev; int __cmp; \
115.62 - __arch_compare_and_exchange_xxx_64_int(mem, new, old, rel, acq); \
115.63 -- (typeof (*mem))__prev; })
115.64 -+ (__typeof (*mem))__prev; })
115.65 -
115.66 - /* Compare and exchange with "acquire" semantics, ie barrier after. */
115.67 -
115.68 -@@ -183,7 +183,7 @@
115.69 - (abort (), 0)
115.70 -
115.71 - #define __arch_exchange_xxx_32_int(mem, newval, rel, acq) \
115.72 --({ typeof (*mem) __prev; int __cmp; \
115.73 -+({ __typeof (*mem) __prev; int __cmp; \
115.74 - __asm__ __volatile__ ("\n" \
115.75 - ".set push\n\t" \
115.76 - MIPS_PUSH_MIPS2 \
115.77 -@@ -207,7 +207,7 @@
115.78 - (abort (), 0)
115.79 - #else
115.80 - #define __arch_exchange_xxx_64_int(mem, newval, rel, acq) \
115.81 --({ typeof (*mem) __prev; int __cmp; \
115.82 -+({ __typeof (*mem) __prev; int __cmp; \
115.83 - __asm__ __volatile__ ("\n" \
115.84 - ".set push\n\t" \
115.85 - MIPS_PUSH_MIPS2 \
115.86 -@@ -236,13 +236,13 @@
115.87 - /* Atomically add value and return the previous (unincremented) value. */
115.88 -
115.89 - #define __arch_exchange_and_add_8_int(mem, newval, rel, acq) \
115.90 -- (abort (), (typeof(*mem)) 0)
115.91 -+ (abort (), (__typeof(*mem)) 0)
115.92 -
115.93 - #define __arch_exchange_and_add_16_int(mem, newval, rel, acq) \
115.94 -- (abort (), (typeof(*mem)) 0)
115.95 -+ (abort (), (__typeof(*mem)) 0)
115.96 -
115.97 - #define __arch_exchange_and_add_32_int(mem, value, rel, acq) \
115.98 --({ typeof (*mem) __prev; int __cmp; \
115.99 -+({ __typeof (*mem) __prev; int __cmp; \
115.100 - __asm__ __volatile__ ("\n" \
115.101 - ".set push\n\t" \
115.102 - MIPS_PUSH_MIPS2 \
115.103 -@@ -263,10 +263,10 @@
115.104 - #if _MIPS_SIM == _ABIO32
115.105 - /* We can't do an atomic 64-bit operation in O32. */
115.106 - #define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
115.107 -- (abort (), (typeof(*mem)) 0)
115.108 -+ (abort (), (__typeof(*mem)) 0)
115.109 - #else
115.110 - #define __arch_exchange_and_add_64_int(mem, value, rel, acq) \
115.111 --({ typeof (*mem) __prev; int __cmp; \
115.112 -+({ __typeof (*mem) __prev; int __cmp; \
115.113 - __asm__ __volatile__ ( \
115.114 - ".set push\n\t" \
115.115 - MIPS_PUSH_MIPS2 \
116.1 --- a/patches/uClibc/20080801/300-fix-asm.patch Wed Oct 21 18:08:31 2009 +0200
116.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
116.3 @@ -1,175 +0,0 @@
116.4 -Index: uClibc/ldso/ldso/sparc/dl-sysdep.h
116.5 -===================================================================
116.6 ---- uClibc/ldso/ldso/sparc/dl-sysdep.h (revision 23055)
116.7 -+++ uClibc/ldso/ldso/sparc/dl-sysdep.h (working copy)
116.8 -@@ -141,7 +141,7 @@
116.9 - static __inline__ Elf32_Addr
116.10 - elf_machine_load_address (void)
116.11 - {
116.12 -- register Elf32_Addr *pc __asm__ ("%o7"), *got __asm ("%l7");
116.13 -+ register Elf32_Addr *pc __asm__ ("%o7"), *got __asm__ ("%l7");
116.14 -
116.15 - __asm__ ("sethi %%hi(_GLOBAL_OFFSET_TABLE_-4), %1\n\t"
116.16 - "call 1f\n\t"
116.17 -Index: uClibc/libc/sysdeps/linux/i386/bits/mathinline.h
116.18 -===================================================================
116.19 ---- uClibc/libc/sysdeps/linux/i386/bits/mathinline.h (revision 23055)
116.20 -+++ uClibc/libc/sysdeps/linux/i386/bits/mathinline.h (working copy)
116.21 -@@ -299,12 +299,12 @@
116.22 - __extension__ long long int __p = (long long int) __x; \
116.23 - if (__x == (long double) __p) \
116.24 - { \
116.25 -- __asm __volatile__ \
116.26 -+ __asm__ __volatile__ \
116.27 - ("fscale" \
116.28 - : "=t" (__value) : "0" (1.0), "u" (__x)); \
116.29 - return __value; \
116.30 - } \
116.31 -- __asm __volatile__ \
116.32 -+ __asm__ __volatile__ \
116.33 - ("fld %%st(0)\n\t" \
116.34 - "frndint # int(x)\n\t" \
116.35 - "fxch\n\t" \
116.36 -@@ -312,7 +312,7 @@
116.37 - "f2xm1 # 2^(fract(x)) - 1\n\t" \
116.38 - : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
116.39 - __value += 1.0; \
116.40 -- __asm __volatile__ \
116.41 -+ __asm__ __volatile__ \
116.42 - ("fscale" \
116.43 - : "=t" (__value) : "0" (__value), "u" (__exponent)); \
116.44 - return __value)
116.45 -@@ -321,7 +321,7 @@
116.46 - # define __sincos_code \
116.47 - register long double __cosr; \
116.48 - register long double __sinr; \
116.49 -- __asm __volatile__ \
116.50 -+ __asm__ __volatile__ \
116.51 - ("fsincos\n\t" \
116.52 - "fnstsw %%ax\n\t" \
116.53 - "testl $0x400, %%eax\n\t" \
116.54 -@@ -373,7 +373,7 @@
116.55 - register long double __value; \
116.56 - register long double __exponent; \
116.57 - register long double __temp; \
116.58 -- __asm __volatile__ \
116.59 -+ __asm__ __volatile__ \
116.60 - ("fldl2e # e^x - 1 = 2^(x * log2(e)) - 1\n\t" \
116.61 - "fmul %%st(1) # x * log2(e)\n\t" \
116.62 - "fst %%st(1)\n\t" \
116.63 -@@ -383,7 +383,7 @@
116.64 - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \
116.65 - "fscale # 2^(x * log2(e)) - 2^(int(x * log2(e)))\n\t" \
116.66 - : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
116.67 -- __asm __volatile__ \
116.68 -+ __asm__ __volatile__ \
116.69 - ("fscale # 2^int(x * log2(e))\n\t" \
116.70 - : "=t" (__temp) : "0" (1.0), "u" (__exponent)); \
116.71 - __temp -= 1.0; \
116.72 -@@ -398,7 +398,7 @@
116.73 - # define __exp_code \
116.74 - register long double __value; \
116.75 - register long double __exponent; \
116.76 -- __asm __volatile__ \
116.77 -+ __asm__ __volatile__ \
116.78 - ("fldl2e # e^x = 2^(x * log2(e))\n\t" \
116.79 - "fmul %%st(1) # x * log2(e)\n\t" \
116.80 - "fst %%st(1)\n\t" \
116.81 -@@ -408,7 +408,7 @@
116.82 - "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \
116.83 - : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
116.84 - __value += 1.0; \
116.85 -- __asm __volatile__ \
116.86 -+ __asm__ __volatile__ \
116.87 - ("fscale" \
116.88 - : "=t" (__value) : "0" (__value), "u" (__exponent)); \
116.89 - return __value
116.90 -@@ -421,7 +421,7 @@
116.91 - __inline_mathcodeNP (tan, __x, \
116.92 - register long double __value; \
116.93 - register long double __value2 __attribute__ ((__unused__)); \
116.94 -- __asm __volatile__ \
116.95 -+ __asm__ __volatile__ \
116.96 - ("fptan" \
116.97 - : "=t" (__value2), "=u" (__value) : "0" (__x)); \
116.98 - return __value)
116.99 -@@ -435,7 +435,7 @@
116.100 - #else
116.101 - # define __atan2_code \
116.102 - register long double __value; \
116.103 -- __asm __volatile__ \
116.104 -+ __asm__ __volatile__ \
116.105 - ("fpatan" \
116.106 - : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
116.107 - return __value
116.108 -@@ -449,7 +449,7 @@
116.109 - #if defined __FAST_MATH__ && !__GNUC_PREREQ (3, 5)
116.110 - __inline_mathcodeNP2 (fmod, __x, __y, \
116.111 - register long double __value; \
116.112 -- __asm __volatile__ \
116.113 -+ __asm__ __volatile__ \
116.114 - ("1: fprem\n\t" \
116.115 - "fnstsw %%ax\n\t" \
116.116 - "sahf\n\t" \
116.117 -@@ -552,7 +552,7 @@
116.118 - #ifdef __FAST_MATH__
116.119 - # define __ldexp_code \
116.120 - register long double __value; \
116.121 -- __asm __volatile__ \
116.122 -+ __asm__ __volatile__ \
116.123 - ("fscale" \
116.124 - : "=t" (__value) : "0" (__x), "u" ((long double) __y)); \
116.125 - return __value
116.126 -@@ -581,7 +581,7 @@
116.127 - if (__fabsl (__x) >= 1.0 - 0.5 * __M_SQRT2) \
116.128 - __value = logl (1.0 + __x); \
116.129 - else \
116.130 -- __asm __volatile__ \
116.131 -+ __asm__ __volatile__ \
116.132 - ("fldln2\n\t" \
116.133 - "fxch\n\t" \
116.134 - "fyl2xp1" \
116.135 -@@ -611,7 +611,7 @@
116.136 - __inline_mathcodeNP(logb, __x, \
116.137 - register long double __value; \
116.138 - register long double __junk; \
116.139 -- __asm __volatile__ \
116.140 -+ __asm__ __volatile__ \
116.141 - ("fxtract\n\t" \
116.142 - : "=t" (__junk), "=u" (__value) : "0" (__x)); \
116.143 - return __value)
116.144 -@@ -699,7 +699,7 @@
116.145 - __inline_mathcodeNP2 (drem, __x, __y, \
116.146 - register double __value; \
116.147 - register int __clobbered; \
116.148 -- __asm __volatile__ \
116.149 -+ __asm__ __volatile__ \
116.150 - ("1: fprem1\n\t" \
116.151 - "fstsw %%ax\n\t" \
116.152 - "sahf\n\t" \
116.153 -Index: uClibc/libc/sysdeps/linux/x86_64/sigaction.c
116.154 -===================================================================
116.155 ---- uClibc/libc/sysdeps/linux/x86_64/sigaction.c (revision 23055)
116.156 -+++ uClibc/libc/sysdeps/linux/x86_64/sigaction.c (working copy)
116.157 -@@ -135,7 +135,7 @@
116.158 -
116.159 - #define RESTORE(name, syscall) RESTORE2 (name, syscall)
116.160 - # define RESTORE2(name, syscall) \
116.161 --asm \
116.162 -+__asm__ \
116.163 - ( \
116.164 - ".text\n" \
116.165 - "__" #name ":\n" \
116.166 -Index: uClibc/libc/sysdeps/linux/mips/sigaction.c
116.167 -===================================================================
116.168 ---- uClibc/libc/sysdeps/linux/mips/sigaction.c (revision 23055)
116.169 -+++ uClibc/libc/sysdeps/linux/mips/sigaction.c (working copy)
116.170 -@@ -140,7 +140,7 @@
116.171 -
116.172 - #define RESTORE(name, syscall) RESTORE2 (name, syscall)
116.173 - #define RESTORE2(name, syscall) \
116.174 --asm \
116.175 -+__asm__ \
116.176 - ( \
116.177 - ".align 4\n" \
116.178 - "__" #name ":\n" \