Renamed all patches file names so that locales are now irrelevant to sort the files.
Removed the locale check as it is now irrelevant.
Removed the experimental binutils 2.17.50.0.xx: 2.18 is here now.
1.1 --- a/config/binutils.in Sat Sep 22 17:25:42 2007 +0000
1.2 +++ b/config/binutils.in Sun Sep 23 17:08:09 2007 +0000
1.3 @@ -27,26 +27,6 @@
1.4 bool
1.5 prompt "2.17"
1.6
1.7 -config BINUTILS_V_2_17_50_0_10
1.8 - bool
1.9 - prompt "2.17.50.0.10 (EXPERIMENTAL)"
1.10 - depends on EXPERIMENTAL
1.11 -
1.12 -config BINUTILS_V_2_17_50_0_15
1.13 - bool
1.14 - prompt "2.17.50.0.15 (EXPERIMENTAL)"
1.15 - depends on EXPERIMENTAL
1.16 -
1.17 -config BINUTILS_V_2_17_50_0_17
1.18 - bool
1.19 - prompt "2.17.50.0.17 (EXPERIMENTAL)"
1.20 - depends on EXPERIMENTAL
1.21 -
1.22 -config BINUTILS_V_2_17_50_0_18
1.23 - bool
1.24 - prompt "2.17.50.0.18 (EXPERIMENTAL)"
1.25 - depends on EXPERIMENTAL
1.26 -
1.27 config BINUTILS_V_2_18
1.28 bool
1.29 prompt "2.18"
1.30 @@ -61,10 +41,6 @@
1.31 default "2.15" if BINUTILS_V_2_15
1.32 default "2.16.1" if BINUTILS_V_2_16_1
1.33 default "2.17" if BINUTILS_V_2_17
1.34 - default "2.17.50.0.10" if BINUTILS_V_2_17_50_0_10
1.35 - default "2.17.50.0.14" if BINUTILS_V_2_17_50_0_14
1.36 - default "2.17.50.0.17" if BINUTILS_V_2_17_50_0_17
1.37 - default "2.17.50.0.18" if BINUTILS_V_2_17_50_0_18
1.38 default "2.18" if BINUTILS_V_2_18
1.39 # CT_INSERT_VERSION_STRING_ABOVE
1.40 # Don't remove above line!
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/binutils/2.14/100-binutils-sh-relocs.patch Sun Sep 23 17:08:09 2007 +0000
2.3 @@ -0,0 +1,38 @@
2.4 +Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
2.5 +To: dank@kegel.com
2.6 +Cc: kkojima@rr.iij4u.or.jp
2.7 +Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
2.8 + with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
2.9 +In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
2.10 + <3F28A15A.5010400@kegel.com>
2.11 +References: <3F28A15A.5010400@kegel.com>
2.12 +Date: Thu, 31 Jul 2003 21:47:38 +0900
2.13 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
2.14 +
2.15 +Dan Kegel <dank@kegel.com> wrote:
2.16 +>> I'll give binutils-2.14.90.0.5 a shot, then.
2.17 +>
2.18 +> No joy - same problem. Guess I'll take this up on binutils and/or libc-alpha.
2.19 +
2.20 +Please try the patch below, though it's a diff against the current
2.21 +binutils CVS.
2.22 +
2.23 +Regards,
2.24 + kaz
2.25 +--
2.26 +diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
2.27 +--- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
2.28 ++++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
2.29 +@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
2.30 + sreloc, 2))
2.31 + return FALSE;
2.32 + }
2.33 ++#if 0
2.34 + if (sec->flags & SEC_READONLY)
2.35 + info->flags |= DF_TEXTREL;
2.36 ++#endif
2.37 + elf_section_data (sec)->sreloc = sreloc;
2.38 + }
2.39 +
2.40 +
2.41 +
3.1 --- a/patches/binutils/2.14/binutils-sh-relocs.patch Sat Sep 22 17:25:42 2007 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,38 +0,0 @@
3.4 -Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
3.5 -To: dank@kegel.com
3.6 -Cc: kkojima@rr.iij4u.or.jp
3.7 -Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
3.8 - with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
3.9 -In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
3.10 - <3F28A15A.5010400@kegel.com>
3.11 -References: <3F28A15A.5010400@kegel.com>
3.12 -Date: Thu, 31 Jul 2003 21:47:38 +0900
3.13 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
3.14 -
3.15 -Dan Kegel <dank@kegel.com> wrote:
3.16 ->> I'll give binutils-2.14.90.0.5 a shot, then.
3.17 ->
3.18 -> No joy - same problem. Guess I'll take this up on binutils and/or libc-alpha.
3.19 -
3.20 -Please try the patch below, though it's a diff against the current
3.21 -binutils CVS.
3.22 -
3.23 -Regards,
3.24 - kaz
3.25 ---
3.26 -diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
3.27 ---- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
3.28 -+++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
3.29 -@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
3.30 - sreloc, 2))
3.31 - return FALSE;
3.32 - }
3.33 -+#if 0
3.34 - if (sec->flags & SEC_READONLY)
3.35 - info->flags |= DF_TEXTREL;
3.36 -+#endif
3.37 - elf_section_data (sec)->sreloc = sreloc;
3.38 - }
3.39 -
3.40 -
3.41 -
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/binutils/2.15/700-bfd-hash-tweak.patch Sun Sep 23 17:08:09 2007 +0000
4.3 @@ -0,0 +1,24 @@
4.4 +Signed-off-by: dank@kegel.com
4.5 +
4.6 +Raising the size of the hash table is a noticable win when linking
4.7 +at least one large app.
4.8 +
4.9 +There was a patch,
4.10 +http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
4.11 +to do this dynamically. No idea why that didn't make it in.
4.12 +So this tiny change to raise the default size is just
4.13 +a stopgap for now.
4.14 +
4.15 +
4.16 +--- binutils-2.15/bfd/hash.c.old 2003-12-01 01:33:01.000000000 -0500
4.17 ++++ binutils-2.15/bfd/hash.c 2006-03-01 16:26:26.701991000 -0500
4.18 +@@ -295,7 +295,7 @@
4.19 + */
4.20 +
4.21 + /* The default number of entries to use when creating a hash table. */
4.22 +-#define DEFAULT_SIZE (4051)
4.23 ++#define DEFAULT_SIZE (32749)
4.24 +
4.25 + /* Create a new hash table, given a number of entries. */
4.26 +
4.27 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/binutils/2.15/710-binutils-2.15-allow-gcc-4.0.patch Sun Sep 23 17:08:09 2007 +0000
5.3 @@ -0,0 +1,75 @@
5.4 +Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
5.5 +
5.6 +Fixes:
5.7 +In file included from ./targ-cpu.h:1,
5.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,
5.9 + from ./obj-format.h:1,
5.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,
5.11 + from ./targ-env.h:1,
5.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,
5.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:
5.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
5.15 +make[3]: *** [app.o] Error 1
5.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'
5.17 +
5.18 +when building binutils-2.15 with gcc-4.0
5.19 +
5.20 +
5.21 +diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
5.22 +--- binutils-2.15.old/gas/as.h 2003-11-22 18:14:21.000000000 -0800
5.23 ++++ binutils-2.15/gas/as.h 2006-02-14 22:05:35.000000000 -0800
5.24 +@@ -605,7 +605,26 @@
5.25 + struct expressionS;
5.26 + struct fix;
5.27 + typedef struct symbol symbolS;
5.28 +-struct relax_type;
5.29 ++
5.30 ++/* JF moved this here from as.h under the theory that nobody except MACHINE.c
5.31 ++ and write.c care about it anyway. */
5.32 ++/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
5.33 ++ incomplete element types in arrays, if relax_type isn't defined
5.34 ++ here. So I moved the definition back from tc.h to here. */
5.35 ++struct relax_type
5.36 ++{
5.37 ++ /* Forward reach. Signed number. > 0. */
5.38 ++ long rlx_forward;
5.39 ++ /* Backward reach. Signed number. < 0. */
5.40 ++ long rlx_backward;
5.41 ++
5.42 ++ /* Bytes length of this address. */
5.43 ++ unsigned char rlx_length;
5.44 ++
5.45 ++ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
5.46 ++ relax_substateT rlx_more;
5.47 ++};
5.48 ++
5.49 + typedef struct frag fragS;
5.50 +
5.51 + #ifdef BFD_ASSEMBLER
5.52 +diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
5.53 +--- binutils-2.15.old/gas/tc.h 2003-12-03 15:39:38.000000000 -0800
5.54 ++++ binutils-2.15/gas/tc.h 2006-02-14 22:03:35.000000000 -0800
5.55 +@@ -24,23 +24,6 @@
5.56 +
5.57 + extern const pseudo_typeS md_pseudo_table[];
5.58 +
5.59 +-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
5.60 +- and write.c care about it anyway. */
5.61 +-
5.62 +-struct relax_type
5.63 +-{
5.64 +- /* Forward reach. Signed number. > 0. */
5.65 +- long rlx_forward;
5.66 +- /* Backward reach. Signed number. < 0. */
5.67 +- long rlx_backward;
5.68 +-
5.69 +- /* Bytes length of this address. */
5.70 +- unsigned char rlx_length;
5.71 +-
5.72 +- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
5.73 +- relax_substateT rlx_more;
5.74 +-};
5.75 +-
5.76 + typedef struct relax_type relax_typeS;
5.77 +
5.78 + extern const int md_reloc_size; /* Size of a relocation record */
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/binutils/2.15/720-binutils-2.15-psignal.patch Sun Sep 23 17:08:09 2007 +0000
6.3 @@ -0,0 +1,40 @@
6.4 +Make psignal prototype in libiberty match that in glibc.
6.5 +
6.6 +Fixes:
6.7 +
6.8 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
6.9 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
6.10 +/usr/include/signal.h:131: prototype declaration
6.11 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
6.12 +/usr/include/signal.h:131: prototype declaration
6.13 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
6.14 +mprotect... make[1]: *** [strsignal.o] Error 1
6.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'
6.16 +make: *** [all-libiberty] Error 2
6.17 +
6.18 +when building on red hat 7.1
6.19 +though it's a bit of a mystery why libiberty's psignal is being compiled at
6.20 +all, since red hat 7.1's glibc supports psignal (hence the error message)
6.21 +
6.22 +--- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
6.23 ++++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
6.24 +@@ -544,7 +544,7 @@
6.25 +
6.26 + /*
6.27 +
6.28 +-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
6.29 ++@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
6.30 +
6.31 + Print @var{message} to the standard error, followed by a colon,
6.32 + followed by the description of the signal specified by @var{signo},
6.33 +@@ -557,9 +557,7 @@
6.34 + #ifndef HAVE_PSIGNAL
6.35 +
6.36 + void
6.37 +-psignal (signo, message)
6.38 +- unsigned signo;
6.39 +- char *message;
6.40 ++psignal (int signo, const char *message)
6.41 + {
6.42 + if (signal_names == NULL)
6.43 + {
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/patches/binutils/2.15/730-binutils-2.15-solaris-qsort.patch Sun Sep 23 17:08:09 2007 +0000
7.3 @@ -0,0 +1,22 @@
7.4 +See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
7.5 +
7.6 +--- src/bfd/elflink.c.org 2004-07-05 09:11:42.920597000 -0400
7.7 ++++ src/bfd/elflink.c 2004-07-05 09:12:59.240847000 -0400
7.8 +@@ -2700,7 +2700,7 @@
7.9 + return vdiff > 0 ? 1 : -1;
7.10 + else
7.11 + {
7.12 +- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
7.13 ++ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
7.14 + if (sdiff != 0)
7.15 + return sdiff > 0 ? 1 : -1;
7.16 + }
7.17 +@@ -3954,7 +3954,7 @@
7.18 + i = idx + 1;
7.19 + else
7.20 + {
7.21 +- long sdiff = slook - h->root.u.def.section;
7.22 ++ long sdiff = slook->id - h->root.u.def.section->id;
7.23 + if (sdiff < 0)
7.24 + j = idx;
7.25 + else if (sdiff > 0)
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/patches/binutils/2.15/740-binutils-2.15-vmx.patch Sun Sep 23 17:08:09 2007 +0000
8.3 @@ -0,0 +1,45 @@
8.4 +Grabbed with
8.5 +wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ppc-opc.c.diff?r1=1.70&r2=1.71&cvsroot=src'
8.6 +See
8.7 +http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
8.8 +and
8.9 +http://sources.redhat.com/ml/binutils-cvs/2004-05/msg00111.html
8.10 +
8.11 +This fixes problems like
8.12 +{standard input}: Assembler messages:
8.13 +{standard input}:1: Error: Unrecognized opcode: `dssall'
8.14 +which show up in binutils-2.15 when building the Linux kernel,
8.15 +or possibly failed compilations when building setjmp/longjmp in glibc.
8.16 +
8.17 +An alternative fix would be to pass -many to the assembler.
8.18 +A patch to do that for glibc is at
8.19 +wget 'http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-05&msgid=40B36E8C.9030609%40us.ibm.com'
8.20 +Yet another, better, fix would be for gcc to generate assembly
8.21 +that told the assembler which processor type to use.
8.22 +Presumably the Linux kernel sources would need a fix, too.
8.23 +Probably better to just fix binutils to accept sources that it used to.
8.24 +
8.25 +
8.26 +===================================================================
8.27 +RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
8.28 +retrieving revision 1.70
8.29 +retrieving revision 1.71
8.30 +diff -u -r1.70 -r1.71
8.31 +--- src/opcodes/ppc-opc.c 2004/05/05 13:43:36 1.70
8.32 ++++ src/opcodes/ppc-opc.c 2004/05/19 05:11:48 1.71
8.33 +@@ -1004,8 +1004,13 @@
8.34 +
8.35 + /* If only one bit of the FXM field is set, we can use the new form
8.36 + of the instruction, which is faster. Unlike the Power4 branch hint
8.37 +- encoding, this is not backward compatible. */
8.38 +- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
8.39 ++ encoding, this is not backward compatible. Do not generate the
8.40 ++ new form unless -mpower4 has been given, or -many and the two
8.41 ++ operand form of mfcr was used. */
8.42 ++ else if ((value & -value) == value
8.43 ++ && ((dialect & PPC_OPCODE_POWER4) != 0
8.44 ++ || ((dialect & PPC_OPCODE_ANY) != 0
8.45 ++ && (insn & (0x3ff << 1)) == 19 << 1)))
8.46 + insn |= 1 << 20;
8.47 +
8.48 + /* Any other value on mfcr is an error. */
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/patches/binutils/2.15/750-binutils-arm-undef-imm.patch Sun Sep 23 17:08:09 2007 +0000
9.3 @@ -0,0 +1,51 @@
9.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
9.5 +See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
9.6 +"[CRITICAL PATCH] 2.6: fix silent build error]"
9.7 +
9.8 +Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
9.9 +Branch: MAIN
9.10 +CVS Tags: binutils_latest_snapshot, HEAD
9.11 +Changes since 1.168: +14 -1 lines
9.12 +
9.13 +(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
9.14 +from undefined symbols.
9.15 +Always consider this fixup to have been processed as a reloc cannot be
9.16 +generated for it.
9.17 +
9.18 +
9.19 +===================================================================
9.20 +RCS file: /cvs/src/src/gas/config/tc-arm.c,v
9.21 +retrieving revision 1.168
9.22 +retrieving revision 1.169
9.23 +diff -u -r1.168 -r1.169
9.24 +--- src/gas/config/tc-arm.c 2004/04/30 10:51:12 1.168
9.25 ++++ src/gas/config/tc-arm.c 2004/07/02 11:12:29 1.169
9.26 +@@ -12186,6 +12186,20 @@
9.27 + switch (fixP->fx_r_type)
9.28 + {
9.29 + case BFD_RELOC_ARM_IMMEDIATE:
9.30 ++ /* We claim that this fixup has been processed here,
9.31 ++ even if in fact we generate an error because we do
9.32 ++ not have a reloc for it, so tc_gen_reloc will reject it. */
9.33 ++ fixP->fx_done = 1;
9.34 ++
9.35 ++ if (fixP->fx_addsy
9.36 ++ && ! S_IS_DEFINED (fixP->fx_addsy))
9.37 ++ {
9.38 ++ as_bad_where (fixP->fx_file, fixP->fx_line,
9.39 ++ _("undefined symbol %s used as an immediate value"),
9.40 ++ S_GET_NAME (fixP->fx_addsy));
9.41 ++ break;
9.42 ++ }
9.43 ++
9.44 + newimm = validate_immediate (value);
9.45 + temp = md_chars_to_number (buf, INSN_SIZE);
9.46 +
9.47 +@@ -12202,7 +12216,6 @@
9.48 +
9.49 + newimm |= (temp & 0xfffff000);
9.50 + md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
9.51 +- fixP->fx_done = 1;
9.52 + break;
9.53 +
9.54 + case BFD_RELOC_ARM_ADRL_IMMEDIATE:
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/patches/binutils/2.15/760-binutils-skip-comments.patch Sun Sep 23 17:08:09 2007 +0000
10.3 @@ -0,0 +1,101 @@
10.4 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
10.5 +Fixes
10.6 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
10.7 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
10.8 +
10.9 +Paths adjusted to match crosstool's patcher.
10.10 +
10.11 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
10.12 +From: Andreas Schwab <schwab at suse dot de>
10.13 +To: Nathan Sidwell <nathan at codesourcery dot com>
10.14 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
10.15 +Date: Fri, 23 Apr 2004 22:27:19 +0200
10.16 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
10.17 +
10.18 +Nathan Sidwell <nathan@codesourcery.com> writes:
10.19 +
10.20 +> Index: read.c
10.21 +> ===================================================================
10.22 +> RCS file: /cvs/src/src/gas/read.c,v
10.23 +> retrieving revision 1.76
10.24 +> diff -c -3 -p -r1.76 read.c
10.25 +> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
10.26 +> --- read.c 18 Mar 2004 09:56:05 -0000
10.27 +> *************** read_a_source_file (char *name)
10.28 +> *** 1053,1059 ****
10.29 +> #endif
10.30 +> input_line_pointer--;
10.31 +> /* Report unknown char as ignored. */
10.32 +> ! ignore_rest_of_line ();
10.33 +> }
10.34 +>
10.35 +> #ifdef md_after_pass_hook
10.36 +> --- 1053,1059 ----
10.37 +> #endif
10.38 +> input_line_pointer--;
10.39 +> /* Report unknown char as ignored. */
10.40 +> ! demand_empty_rest_of_line ();
10.41 +> }
10.42 +>
10.43 +> #ifdef md_after_pass_hook
10.44 +
10.45 +This means that the unknown character is no longer ignored, despite the
10.46 +comment. As a side effect a line starting with a line comment character
10.47 +not followed by APP in NO_APP mode now triggers an error instead of just a
10.48 +warning, breaking builds of glibc on m68k-linux. Earlier in
10.49 +read_a_source_file where #APP is handled there is another comment that
10.50 +claims that unknown comments are ignored, when in fact they aren't (only
10.51 +the initial line comment character is skipped).
10.52 +
10.53 +Note that the presence of #APP will mess up the line counters, but
10.54 +that appears to be difficult to fix.
10.55 +
10.56 +Andreas.
10.57 +
10.58 +2004-04-23 Andreas Schwab <schwab@suse.de>
10.59 +
10.60 + * read.c (read_a_source_file): Ignore unknown text after line
10.61 + comment character. Fix misleading comment.
10.62 +
10.63 +--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
10.64 ++++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
10.65 +@@ -1,6 +1,6 @@
10.66 + /* read.c - read a source file -
10.67 + Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
10.68 +- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
10.69 ++ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
10.70 +
10.71 + This file is part of GAS, the GNU Assembler.
10.72 +
10.73 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
10.74 + unsigned int new_length;
10.75 + char *tmp_buf = 0;
10.76 +
10.77 +- bump_line_counters ();
10.78 + s = input_line_pointer;
10.79 + if (strncmp (s, "APP\n", 4))
10.80 +- continue; /* We ignore it */
10.81 ++ {
10.82 ++ /* We ignore it */
10.83 ++ ignore_rest_of_line ();
10.84 ++ continue;
10.85 ++ }
10.86 ++ bump_line_counters ();
10.87 + s += 4;
10.88 +
10.89 + sb_new (&sbuf);
10.90 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
10.91 + continue;
10.92 + #endif
10.93 + input_line_pointer--;
10.94 +- /* Report unknown char as ignored. */
10.95 ++ /* Report unknown char as error. */
10.96 + demand_empty_rest_of_line ();
10.97 + }
10.98 +
10.99 +
10.100 +--
10.101 +Andreas Schwab, SuSE Labs, schwab@suse.de
10.102 +SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
10.103 +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
10.104 +"And now for something completely different."
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/patches/binutils/2.15/770-cross-gprof.patch Sun Sep 23 17:08:09 2007 +0000
11.3 @@ -0,0 +1,22 @@
11.4 +--- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
11.5 ++++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
11.6 +@@ -999,7 +999,7 @@
11.7 +
11.8 + # Some tools are only suitable for building in a "native" situation.
11.9 + # Remove these if host!=target.
11.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"
11.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"
11.12 +
11.13 + # Similarly, some are only suitable for cross toolchains.
11.14 + # Remove these if host=target.
11.15 +--- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
11.16 ++++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
11.17 +@@ -236,7 +236,7 @@
11.18 +
11.19 + # Some tools are only suitable for building in a "native" situation.
11.20 + # Remove these if host!=target.
11.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"
11.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"
11.23 +
11.24 + # Similarly, some are only suitable for cross toolchains.
11.25 + # Remove these if host=target.
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/patches/binutils/2.15/780-gccpr15247-fix.patch Sun Sep 23 17:08:09 2007 +0000
12.3 @@ -0,0 +1,192 @@
12.4 +See
12.5 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
12.6 +
12.7 +Fixes spurious error
12.8 +/tmp/ccvNi4ou.s: Assembler messages:
12.9 +/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
12.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
12.11 +
12.12 +when compiling glibc's dosincos.c with gcc-3.4.0
12.13 +
12.14 +===================================================================
12.15 +RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
12.16 +retrieving revision 1.9
12.17 +retrieving revision 1.10
12.18 +diff -u -r1.9 -r1.10
12.19 +--- src/opcodes/sparc-opc.c 2004/01/18 23:46:32 1.9
12.20 ++++ src/opcodes/sparc-opc.c 2004/04/20 10:23:51 1.10
12.21 +@@ -1273,110 +1273,72 @@
12.22 + #define FM_DF 2 /* v9 */
12.23 + #define FM_QF 3 /* v9 */
12.24 +
12.25 +-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
12.26 +-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags, v9 }, \
12.27 +-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags, v9 }
12.28 +-
12.29 +-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
12.30 +-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
12.31 +-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
12.32 +-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
12.33 +-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
12.34 ++#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
12.35 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags, v9 }, \
12.36 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags, v9 }
12.37 ++
12.38 ++#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
12.39 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
12.40 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
12.41 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
12.42 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
12.43 +
12.44 + /* FIXME: use fmovicc/fmovfcc? */ /* v9 */
12.45 +-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
12.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 }, \
12.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 }, \
12.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 }, \
12.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 }, \
12.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 }, \
12.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 }
12.52 +-
12.53 +-/* v9 */ fmovcc ("fmovda", FM_DF, CONDA, FCONDA, 0),
12.54 +-/* v9 */ fmovcc ("fmovqa", FM_QF, CONDA, FCONDA, 0),
12.55 +-/* v9 */ fmovcc ("fmovsa", FM_SF, CONDA, FCONDA, 0),
12.56 +-/* v9 */ fmovicc ("fmovdcc", FM_DF, CONDCC, 0),
12.57 +-/* v9 */ fmovicc ("fmovqcc", FM_QF, CONDCC, 0),
12.58 +-/* v9 */ fmovicc ("fmovscc", FM_SF, CONDCC, 0),
12.59 +-/* v9 */ fmovicc ("fmovdcs", FM_DF, CONDCS, 0),
12.60 +-/* v9 */ fmovicc ("fmovqcs", FM_QF, CONDCS, 0),
12.61 +-/* v9 */ fmovicc ("fmovscs", FM_SF, CONDCS, 0),
12.62 +-/* v9 */ fmovcc ("fmovde", FM_DF, CONDE, FCONDE, 0),
12.63 +-/* v9 */ fmovcc ("fmovqe", FM_QF, CONDE, FCONDE, 0),
12.64 +-/* v9 */ fmovcc ("fmovse", FM_SF, CONDE, FCONDE, 0),
12.65 +-/* v9 */ fmovcc ("fmovdg", FM_DF, CONDG, FCONDG, 0),
12.66 +-/* v9 */ fmovcc ("fmovqg", FM_QF, CONDG, FCONDG, 0),
12.67 +-/* v9 */ fmovcc ("fmovsg", FM_SF, CONDG, FCONDG, 0),
12.68 +-/* v9 */ fmovcc ("fmovdge", FM_DF, CONDGE, FCONDGE, 0),
12.69 +-/* v9 */ fmovcc ("fmovqge", FM_QF, CONDGE, FCONDGE, 0),
12.70 +-/* v9 */ fmovcc ("fmovsge", FM_SF, CONDGE, FCONDGE, 0),
12.71 +-/* v9 */ fmovicc ("fmovdgeu", FM_DF, CONDGEU, F_ALIAS),
12.72 +-/* v9 */ fmovicc ("fmovqgeu", FM_QF, CONDGEU, F_ALIAS),
12.73 +-/* v9 */ fmovicc ("fmovsgeu", FM_SF, CONDGEU, F_ALIAS),
12.74 +-/* v9 */ fmovicc ("fmovdgu", FM_DF, CONDGU, 0),
12.75 +-/* v9 */ fmovicc ("fmovqgu", FM_QF, CONDGU, 0),
12.76 +-/* v9 */ fmovicc ("fmovsgu", FM_SF, CONDGU, 0),
12.77 +-/* v9 */ fmovcc ("fmovdl", FM_DF, CONDL, FCONDL, 0),
12.78 +-/* v9 */ fmovcc ("fmovql", FM_QF, CONDL, FCONDL, 0),
12.79 +-/* v9 */ fmovcc ("fmovsl", FM_SF, CONDL, FCONDL, 0),
12.80 +-/* v9 */ fmovcc ("fmovdle", FM_DF, CONDLE, FCONDLE, 0),
12.81 +-/* v9 */ fmovcc ("fmovqle", FM_QF, CONDLE, FCONDLE, 0),
12.82 +-/* v9 */ fmovcc ("fmovsle", FM_SF, CONDLE, FCONDLE, 0),
12.83 +-/* v9 */ fmovicc ("fmovdleu", FM_DF, CONDLEU, 0),
12.84 +-/* v9 */ fmovicc ("fmovqleu", FM_QF, CONDLEU, 0),
12.85 +-/* v9 */ fmovicc ("fmovsleu", FM_SF, CONDLEU, 0),
12.86 +-/* v9 */ fmovfcc ("fmovdlg", FM_DF, FCONDLG, 0),
12.87 +-/* v9 */ fmovfcc ("fmovqlg", FM_QF, FCONDLG, 0),
12.88 +-/* v9 */ fmovfcc ("fmovslg", FM_SF, FCONDLG, 0),
12.89 +-/* v9 */ fmovicc ("fmovdlu", FM_DF, CONDLU, F_ALIAS),
12.90 +-/* v9 */ fmovicc ("fmovqlu", FM_QF, CONDLU, F_ALIAS),
12.91 +-/* v9 */ fmovicc ("fmovslu", FM_SF, CONDLU, F_ALIAS),
12.92 +-/* v9 */ fmovcc ("fmovdn", FM_DF, CONDN, FCONDN, 0),
12.93 +-/* v9 */ fmovcc ("fmovqn", FM_QF, CONDN, FCONDN, 0),
12.94 +-/* v9 */ fmovcc ("fmovsn", FM_SF, CONDN, FCONDN, 0),
12.95 +-/* v9 */ fmovcc ("fmovdne", FM_DF, CONDNE, FCONDNE, 0),
12.96 +-/* v9 */ fmovcc ("fmovqne", FM_QF, CONDNE, FCONDNE, 0),
12.97 +-/* v9 */ fmovcc ("fmovsne", FM_SF, CONDNE, FCONDNE, 0),
12.98 +-/* v9 */ fmovicc ("fmovdneg", FM_DF, CONDNEG, 0),
12.99 +-/* v9 */ fmovicc ("fmovqneg", FM_QF, CONDNEG, 0),
12.100 +-/* v9 */ fmovicc ("fmovsneg", FM_SF, CONDNEG, 0),
12.101 +-/* v9 */ fmovcc ("fmovdnz", FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
12.102 +-/* v9 */ fmovcc ("fmovqnz", FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
12.103 +-/* v9 */ fmovcc ("fmovsnz", FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
12.104 +-/* v9 */ fmovfcc ("fmovdo", FM_DF, FCONDO, 0),
12.105 +-/* v9 */ fmovfcc ("fmovqo", FM_QF, FCONDO, 0),
12.106 +-/* v9 */ fmovfcc ("fmovso", FM_SF, FCONDO, 0),
12.107 +-/* v9 */ fmovicc ("fmovdpos", FM_DF, CONDPOS, 0),
12.108 +-/* v9 */ fmovicc ("fmovqpos", FM_QF, CONDPOS, 0),
12.109 +-/* v9 */ fmovicc ("fmovspos", FM_SF, CONDPOS, 0),
12.110 +-/* v9 */ fmovfcc ("fmovdu", FM_DF, FCONDU, 0),
12.111 +-/* v9 */ fmovfcc ("fmovqu", FM_QF, FCONDU, 0),
12.112 +-/* v9 */ fmovfcc ("fmovsu", FM_SF, FCONDU, 0),
12.113 +-/* v9 */ fmovfcc ("fmovdue", FM_DF, FCONDUE, 0),
12.114 +-/* v9 */ fmovfcc ("fmovque", FM_QF, FCONDUE, 0),
12.115 +-/* v9 */ fmovfcc ("fmovsue", FM_SF, FCONDUE, 0),
12.116 +-/* v9 */ fmovfcc ("fmovdug", FM_DF, FCONDUG, 0),
12.117 +-/* v9 */ fmovfcc ("fmovqug", FM_QF, FCONDUG, 0),
12.118 +-/* v9 */ fmovfcc ("fmovsug", FM_SF, FCONDUG, 0),
12.119 +-/* v9 */ fmovfcc ("fmovduge", FM_DF, FCONDUGE, 0),
12.120 +-/* v9 */ fmovfcc ("fmovquge", FM_QF, FCONDUGE, 0),
12.121 +-/* v9 */ fmovfcc ("fmovsuge", FM_SF, FCONDUGE, 0),
12.122 +-/* v9 */ fmovfcc ("fmovdul", FM_DF, FCONDUL, 0),
12.123 +-/* v9 */ fmovfcc ("fmovqul", FM_QF, FCONDUL, 0),
12.124 +-/* v9 */ fmovfcc ("fmovsul", FM_SF, FCONDUL, 0),
12.125 +-/* v9 */ fmovfcc ("fmovdule", FM_DF, FCONDULE, 0),
12.126 +-/* v9 */ fmovfcc ("fmovqule", FM_QF, FCONDULE, 0),
12.127 +-/* v9 */ fmovfcc ("fmovsule", FM_SF, FCONDULE, 0),
12.128 +-/* v9 */ fmovicc ("fmovdvc", FM_DF, CONDVC, 0),
12.129 +-/* v9 */ fmovicc ("fmovqvc", FM_QF, CONDVC, 0),
12.130 +-/* v9 */ fmovicc ("fmovsvc", FM_SF, CONDVC, 0),
12.131 +-/* v9 */ fmovicc ("fmovdvs", FM_DF, CONDVS, 0),
12.132 +-/* v9 */ fmovicc ("fmovqvs", FM_QF, CONDVS, 0),
12.133 +-/* v9 */ fmovicc ("fmovsvs", FM_SF, CONDVS, 0),
12.134 +-/* v9 */ fmovcc ("fmovdz", FM_DF, CONDZ, FCONDZ, F_ALIAS),
12.135 +-/* v9 */ fmovcc ("fmovqz", FM_QF, CONDZ, FCONDZ, F_ALIAS),
12.136 +-/* v9 */ fmovcc ("fmovsz", FM_SF, CONDZ, FCONDZ, F_ALIAS),
12.137 +-
12.138 ++#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
12.139 ++{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags | F_FLOAT, v9 }, \
12.140 ++{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
12.141 ++{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags | F_FLOAT, v9 }, \
12.142 ++{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
12.143 ++{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
12.144 ++{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
12.145 ++
12.146 ++#define fmovicc(suffix, cond, flags) /* v9 */ \
12.147 ++fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags), \
12.148 ++fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags), \
12.149 ++fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
12.150 ++
12.151 ++#define fmovfcc(suffix, fcond, flags) /* v9 */ \
12.152 ++fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags), \
12.153 ++fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags), \
12.154 ++fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
12.155 ++
12.156 ++#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
12.157 ++fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags), \
12.158 ++fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags), \
12.159 ++fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
12.160 ++
12.161 ++/* v9 */ fmovcc ("a", CONDA, FCONDA, 0),
12.162 ++/* v9 */ fmovicc ("cc", CONDCC, 0),
12.163 ++/* v9 */ fmovicc ("cs", CONDCS, 0),
12.164 ++/* v9 */ fmovcc ("e", CONDE, FCONDE, 0),
12.165 ++/* v9 */ fmovcc ("g", CONDG, FCONDG, 0),
12.166 ++/* v9 */ fmovcc ("ge", CONDGE, FCONDGE, 0),
12.167 ++/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
12.168 ++/* v9 */ fmovicc ("gu", CONDGU, 0),
12.169 ++/* v9 */ fmovcc ("l", CONDL, FCONDL, 0),
12.170 ++/* v9 */ fmovcc ("le", CONDLE, FCONDLE, 0),
12.171 ++/* v9 */ fmovicc ("leu", CONDLEU, 0),
12.172 ++/* v9 */ fmovfcc ("lg", FCONDLG, 0),
12.173 ++/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
12.174 ++/* v9 */ fmovcc ("n", CONDN, FCONDN, 0),
12.175 ++/* v9 */ fmovcc ("ne", CONDNE, FCONDNE, 0),
12.176 ++/* v9 */ fmovicc ("neg", CONDNEG, 0),
12.177 ++/* v9 */ fmovcc ("nz", CONDNZ, FCONDNZ, F_ALIAS),
12.178 ++/* v9 */ fmovfcc ("o", FCONDO, 0),
12.179 ++/* v9 */ fmovicc ("pos", CONDPOS, 0),
12.180 ++/* v9 */ fmovfcc ("u", FCONDU, 0),
12.181 ++/* v9 */ fmovfcc ("ue", FCONDUE, 0),
12.182 ++/* v9 */ fmovfcc ("ug", FCONDUG, 0),
12.183 ++/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
12.184 ++/* v9 */ fmovfcc ("ul", FCONDUL, 0),
12.185 ++/* v9 */ fmovfcc ("ule", FCONDULE, 0),
12.186 ++/* v9 */ fmovicc ("vc", CONDVC, 0),
12.187 ++/* v9 */ fmovicc ("vs", CONDVS, 0),
12.188 ++/* v9 */ fmovcc ("z", CONDZ, FCONDZ, F_ALIAS),
12.189 ++
12.190 ++#undef fmoviccx /* v9 */
12.191 ++#undef fmovfccx /* v9 */
12.192 ++#undef fmovccx /* v9 */
12.193 + #undef fmovicc /* v9 */
12.194 + #undef fmovfcc /* v9 */
12.195 + #undef fmovcc /* v9 */
13.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
13.2 +++ b/patches/binutils/2.15/790-ld-2.15-callahan.patch Sun Sep 23 17:08:09 2007 +0000
13.3 @@ -0,0 +1,677 @@
13.4 +Signed-off-by: dank@kegel.com
13.5 +Fixes ld speed issue.
13.6 +See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
13.7 +See thread "Re: optimizations for 3x speedup in ld",
13.8 +http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
13.9 +
13.10 +Wildcard section matching enhancement, backported from the binutils CVS tree.
13.11 +Here's the CVS log comment from the original change to ldlang.c:
13.12 +
13.13 +revision 1.177
13.14 +date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
13.15 +2005-04-06 Jakub Jelinek <jakub@redhat.com>
13.16 +
13.17 + * ldlang.c: Formatting.
13.18 + (walk_wild_consider_section): Remember return value from wildcardp.
13.19 + (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
13.20 + (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
13.21 +
13.22 +2005-04-06 Robert O'Callahan <rocallahan@novell.com>
13.23 +
13.24 + * ld.h (lean_section_userdata_type): Remove.
13.25 + (fat_section_userdata_type): Remove file field.
13.26 + (SECTION_USERDATA_SIZE): Remove.
13.27 + * ldlang.c (init_os): Eliminate initialization of unused
13.28 + lean_section_userdata_type.
13.29 +
13.30 + * ldlang.h (callback_t, walk_wild_section_handler_t): New
13.31 + typedefs.
13.32 + (struct lang_wild_statement_struct): Add walk_wild_section_handler
13.33 + and handler_data fields.
13.34 + * ldlang.c (callback_t): Removed.
13.35 + (walk_wild_consider_section, walk_wild_section_general,
13.36 + section_iterator_callback, find_section, is_simple_wild,
13.37 + match_simple_wild, walk_wild_section_specs1_wild0,
13.38 + walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
13.39 + walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
13.40 + wild_spec_can_overlap, analyze_walk_wild_section_handler): New
13.41 + functions.
13.42 + (lang_add_wild): Call analyze_walk_wild_section_handler.
13.43 + (walk_wild_section): Renamed to walk_wild_section_general and
13.44 + created a wrapper function.
13.45 + (section_iterator_callback_data): New typedef.
13.46 +
13.47 +Note that bfd_get_section_by_name_if didn't exist in 2.15, so it was backported
13.48 +as well.
13.49 +
13.50 +--- binutils-2.15/bfd/bfd-in2.h.old 2004-05-17 15:35:56.000000000 -0400
13.51 ++++ binutils-2.15/bfd/bfd-in2.h 2006-02-09 11:54:45.989940000 -0500
13.52 +@@ -1425,6 +1425,10 @@
13.53 +
13.54 + asection *bfd_get_section_by_name (bfd *abfd, const char *name);
13.55 +
13.56 ++asection *bfd_get_section_by_name_if (bfd *abfd, const char *name,
13.57 ++ bfd_boolean (*operation) (bfd *, asection *, void *),
13.58 ++ void *user_storage);
13.59 ++
13.60 + char *bfd_get_unique_section_name
13.61 + (bfd *abfd, const char *templat, int *count);
13.62 +
13.63 +--- binutils-2.15/bfd/section.c.old 2003-12-01 01:33:01.000000000 -0500
13.64 ++++ binutils-2.15/bfd/section.c 2006-01-23 14:16:54.768993000 -0500
13.65 +@@ -801,6 +801,57 @@
13.66 +
13.67 + /*
13.68 + FUNCTION
13.69 ++ bfd_get_section_by_name_if
13.70 ++
13.71 ++SYNOPSIS
13.72 ++ asection *bfd_get_section_by_name_if
13.73 ++ (bfd *abfd,
13.74 ++ const char *name,
13.75 ++ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
13.76 ++ void *obj);
13.77 ++
13.78 ++DESCRIPTION
13.79 ++ Call the provided function @var{func} for each section
13.80 ++ attached to the BFD @var{abfd} whose name matches @var{name},
13.81 ++ passing @var{obj} as an argument. The function will be called
13.82 ++ as if by
13.83 ++
13.84 ++| func (abfd, the_section, obj);
13.85 ++
13.86 ++ It returns the first section for which @var{func} returns true,
13.87 ++ otherwise <<NULL>>.
13.88 ++
13.89 ++*/
13.90 ++
13.91 ++asection *
13.92 ++bfd_get_section_by_name_if (bfd *abfd, const char *name,
13.93 ++ bfd_boolean (*operation) (bfd *,
13.94 ++ asection *,
13.95 ++ void *),
13.96 ++ void *user_storage)
13.97 ++{
13.98 ++ struct section_hash_entry *sh;
13.99 ++ unsigned long hash;
13.100 ++
13.101 ++ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
13.102 ++ if (sh == NULL)
13.103 ++ return NULL;
13.104 ++
13.105 ++ hash = sh->root.hash;
13.106 ++ do
13.107 ++ {
13.108 ++ if ((*operation) (abfd, &sh->section, user_storage))
13.109 ++ return &sh->section;
13.110 ++ sh = (struct section_hash_entry *) sh->root.next;
13.111 ++ }
13.112 ++ while (sh != NULL && sh->root.hash == hash
13.113 ++ && strcmp (sh->root.string, name) == 0);
13.114 ++
13.115 ++ return NULL;
13.116 ++}
13.117 ++
13.118 ++/*
13.119 ++FUNCTION
13.120 + bfd_get_unique_section_name
13.121 +
13.122 + SYNOPSIS
13.123 +--- binutils-2.15/ld/ldlang.c.old 2004-05-17 15:36:16.000000000 -0400
13.124 ++++ binutils-2.15/ld/ldlang.c 2006-01-23 13:40:12.745499000 -0500
13.125 +@@ -81,9 +81,6 @@
13.126 + static void lang_record_phdrs (void);
13.127 + static void lang_do_version_exports_section (void);
13.128 +
13.129 +-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
13.130 +- asection *, lang_input_statement_type *, void *);
13.131 +-
13.132 + /* Exported variables. */
13.133 + lang_output_section_statement_type *abs_output_section;
13.134 + lang_statement_list_type lang_output_section_statement;
13.135 +@@ -138,21 +135,71 @@
13.136 +
13.137 + /* Generic traversal routines for finding matching sections. */
13.138 +
13.139 ++/* Try processing a section against a wildcard. This just calls
13.140 ++ the callback unless the filename exclusion list is present
13.141 ++ and excludes the file. It's hardly ever present so this
13.142 ++ function is very fast. */
13.143 ++
13.144 ++static void
13.145 ++walk_wild_consider_section (lang_wild_statement_type *ptr,
13.146 ++ lang_input_statement_type *file,
13.147 ++ asection *s,
13.148 ++ struct wildcard_list *sec,
13.149 ++ callback_t callback,
13.150 ++ void *data)
13.151 ++{
13.152 ++ bfd_boolean skip = FALSE;
13.153 ++ struct name_list *list_tmp;
13.154 ++
13.155 ++ /* Don't process sections from files which were
13.156 ++ excluded. */
13.157 ++ for (list_tmp = sec->spec.exclude_name_list;
13.158 ++ list_tmp;
13.159 ++ list_tmp = list_tmp->next)
13.160 ++ {
13.161 ++ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
13.162 ++ if (is_wildcard)
13.163 ++ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
13.164 ++ else
13.165 ++ skip = strcmp (list_tmp->name, file->filename) == 0;
13.166 ++
13.167 ++ /* If this file is part of an archive, and the archive is
13.168 ++ excluded, exclude this file. */
13.169 ++ if (! skip && file->the_bfd != NULL
13.170 ++ && file->the_bfd->my_archive != NULL
13.171 ++ && file->the_bfd->my_archive->filename != NULL)
13.172 ++ {
13.173 ++ if (is_wildcard)
13.174 ++ skip = fnmatch (list_tmp->name,
13.175 ++ file->the_bfd->my_archive->filename,
13.176 ++ 0) == 0;
13.177 ++ else
13.178 ++ skip = strcmp (list_tmp->name,
13.179 ++ file->the_bfd->my_archive->filename) == 0;
13.180 ++ }
13.181 ++
13.182 ++ if (skip)
13.183 ++ break;
13.184 ++ }
13.185 ++
13.186 ++ if (!skip)
13.187 ++ (*callback) (ptr, sec, s, file, data);
13.188 ++}
13.189 ++
13.190 ++/* Lowest common denominator routine that can handle everything correctly,
13.191 ++ but slowly. */
13.192 ++
13.193 + static void
13.194 +-walk_wild_section (lang_wild_statement_type *ptr,
13.195 +- lang_input_statement_type *file,
13.196 +- callback_t callback,
13.197 +- void *data)
13.198 ++walk_wild_section_general (lang_wild_statement_type *ptr,
13.199 ++ lang_input_statement_type *file,
13.200 ++ callback_t callback,
13.201 ++ void *data)
13.202 + {
13.203 + asection *s;
13.204 +-
13.205 +- if (file->just_syms_flag)
13.206 +- return;
13.207 ++ struct wildcard_list *sec;
13.208 +
13.209 + for (s = file->the_bfd->sections; s != NULL; s = s->next)
13.210 + {
13.211 +- struct wildcard_list *sec;
13.212 +-
13.213 + sec = ptr->section_list;
13.214 + if (sec == NULL)
13.215 + (*callback) (ptr, sec, s, file, data);
13.216 +@@ -160,39 +207,8 @@
13.217 + while (sec != NULL)
13.218 + {
13.219 + bfd_boolean skip = FALSE;
13.220 +- struct name_list *list_tmp;
13.221 +-
13.222 +- /* Don't process sections from files which were
13.223 +- excluded. */
13.224 +- for (list_tmp = sec->spec.exclude_name_list;
13.225 +- list_tmp;
13.226 +- list_tmp = list_tmp->next)
13.227 +- {
13.228 +- if (wildcardp (list_tmp->name))
13.229 +- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
13.230 +- else
13.231 +- skip = strcmp (list_tmp->name, file->filename) == 0;
13.232 +-
13.233 +- /* If this file is part of an archive, and the archive is
13.234 +- excluded, exclude this file. */
13.235 +- if (! skip && file->the_bfd != NULL
13.236 +- && file->the_bfd->my_archive != NULL
13.237 +- && file->the_bfd->my_archive->filename != NULL)
13.238 +- {
13.239 +- if (wildcardp (list_tmp->name))
13.240 +- skip = fnmatch (list_tmp->name,
13.241 +- file->the_bfd->my_archive->filename,
13.242 +- 0) == 0;
13.243 +- else
13.244 +- skip = strcmp (list_tmp->name,
13.245 +- file->the_bfd->my_archive->filename) == 0;
13.246 +- }
13.247 +-
13.248 +- if (skip)
13.249 +- break;
13.250 +- }
13.251 +
13.252 +- if (!skip && sec->spec.name != NULL)
13.253 ++ if (sec->spec.name != NULL)
13.254 + {
13.255 + const char *sname = bfd_get_section_name (file->the_bfd, s);
13.256 +
13.257 +@@ -203,13 +219,381 @@
13.258 + }
13.259 +
13.260 + if (!skip)
13.261 +- (*callback) (ptr, sec, s, file, data);
13.262 ++ walk_wild_consider_section (ptr, file, s, sec, callback, data);
13.263 +
13.264 + sec = sec->next;
13.265 + }
13.266 + }
13.267 + }
13.268 +
13.269 ++/* Routines to find a single section given its name. If there's more
13.270 ++ than one section with that name, we report that. */
13.271 ++
13.272 ++typedef struct
13.273 ++{
13.274 ++ asection *found_section;
13.275 ++ bfd_boolean multiple_sections_found;
13.276 ++} section_iterator_callback_data;
13.277 ++
13.278 ++static bfd_boolean
13.279 ++section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
13.280 ++{
13.281 ++ section_iterator_callback_data *d = data;
13.282 ++
13.283 ++ if (d->found_section != NULL)
13.284 ++ {
13.285 ++ d->multiple_sections_found = TRUE;
13.286 ++ return TRUE;
13.287 ++ }
13.288 ++
13.289 ++ d->found_section = s;
13.290 ++ return FALSE;
13.291 ++}
13.292 ++
13.293 ++static asection *
13.294 ++find_section (lang_input_statement_type *file,
13.295 ++ struct wildcard_list *sec,
13.296 ++ bfd_boolean *multiple_sections_found)
13.297 ++{
13.298 ++ section_iterator_callback_data cb_data = { NULL, FALSE };
13.299 ++
13.300 ++ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
13.301 ++ section_iterator_callback, &cb_data);
13.302 ++ *multiple_sections_found = cb_data.multiple_sections_found;
13.303 ++ return cb_data.found_section;
13.304 ++}
13.305 ++
13.306 ++/* Code for handling simple wildcards without going through fnmatch,
13.307 ++ which can be expensive because of charset translations etc. */
13.308 ++
13.309 ++/* A simple wild is a literal string followed by a single '*',
13.310 ++ where the literal part is at least 4 characters long. */
13.311 ++
13.312 ++static bfd_boolean
13.313 ++is_simple_wild (const char *name)
13.314 ++{
13.315 ++ size_t len = strcspn (name, "*?[");
13.316 ++ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
13.317 ++}
13.318 ++
13.319 ++static bfd_boolean
13.320 ++match_simple_wild (const char *pattern, const char *name)
13.321 ++{
13.322 ++ /* The first four characters of the pattern are guaranteed valid
13.323 ++ non-wildcard characters. So we can go faster. */
13.324 ++ if (pattern[0] != name[0] || pattern[1] != name[1]
13.325 ++ || pattern[2] != name[2] || pattern[3] != name[3])
13.326 ++ return FALSE;
13.327 ++
13.328 ++ pattern += 4;
13.329 ++ name += 4;
13.330 ++ while (*pattern != '*')
13.331 ++ if (*name++ != *pattern++)
13.332 ++ return FALSE;
13.333 ++
13.334 ++ return TRUE;
13.335 ++}
13.336 ++
13.337 ++/* Specialized, optimized routines for handling different kinds of
13.338 ++ wildcards */
13.339 ++
13.340 ++static void
13.341 ++walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
13.342 ++ lang_input_statement_type *file,
13.343 ++ callback_t callback,
13.344 ++ void *data)
13.345 ++{
13.346 ++ /* We can just do a hash lookup for the section with the right name.
13.347 ++ But if that lookup discovers more than one section with the name
13.348 ++ (should be rare), we fall back to the general algorithm because
13.349 ++ we would otherwise have to sort the sections to make sure they
13.350 ++ get processed in the bfd's order. */
13.351 ++ bfd_boolean multiple_sections_found;
13.352 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
13.353 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
13.354 ++
13.355 ++ if (multiple_sections_found)
13.356 ++ walk_wild_section_general (ptr, file, callback, data);
13.357 ++ else if (s0)
13.358 ++ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
13.359 ++}
13.360 ++
13.361 ++static void
13.362 ++walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
13.363 ++ lang_input_statement_type *file,
13.364 ++ callback_t callback,
13.365 ++ void *data)
13.366 ++{
13.367 ++ asection *s;
13.368 ++ struct wildcard_list *wildsec0 = ptr->handler_data[0];
13.369 ++
13.370 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
13.371 ++ {
13.372 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
13.373 ++ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
13.374 ++
13.375 ++ if (!skip)
13.376 ++ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
13.377 ++ }
13.378 ++}
13.379 ++
13.380 ++static void
13.381 ++walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
13.382 ++ lang_input_statement_type *file,
13.383 ++ callback_t callback,
13.384 ++ void *data)
13.385 ++{
13.386 ++ asection *s;
13.387 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
13.388 ++ struct wildcard_list *wildsec1 = ptr->handler_data[1];
13.389 ++ bfd_boolean multiple_sections_found;
13.390 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
13.391 ++
13.392 ++ if (multiple_sections_found)
13.393 ++ {
13.394 ++ walk_wild_section_general (ptr, file, callback, data);
13.395 ++ return;
13.396 ++ }
13.397 ++
13.398 ++ /* Note that if the section was not found, s0 is NULL and
13.399 ++ we'll simply never succeed the s == s0 test below. */
13.400 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
13.401 ++ {
13.402 ++ /* Recall that in this code path, a section cannot satisfy more
13.403 ++ than one spec, so if s == s0 then it cannot match
13.404 ++ wildspec1. */
13.405 ++ if (s == s0)
13.406 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
13.407 ++ else
13.408 ++ {
13.409 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
13.410 ++ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
13.411 ++
13.412 ++ if (!skip)
13.413 ++ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
13.414 ++ data);
13.415 ++ }
13.416 ++ }
13.417 ++}
13.418 ++
13.419 ++static void
13.420 ++walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
13.421 ++ lang_input_statement_type *file,
13.422 ++ callback_t callback,
13.423 ++ void *data)
13.424 ++{
13.425 ++ asection *s;
13.426 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
13.427 ++ struct wildcard_list *wildsec1 = ptr->handler_data[1];
13.428 ++ struct wildcard_list *wildsec2 = ptr->handler_data[2];
13.429 ++ bfd_boolean multiple_sections_found;
13.430 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
13.431 ++
13.432 ++ if (multiple_sections_found)
13.433 ++ {
13.434 ++ walk_wild_section_general (ptr, file, callback, data);
13.435 ++ return;
13.436 ++ }
13.437 ++
13.438 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
13.439 ++ {
13.440 ++ if (s == s0)
13.441 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
13.442 ++ else
13.443 ++ {
13.444 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
13.445 ++ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
13.446 ++
13.447 ++ if (!skip)
13.448 ++ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
13.449 ++ else
13.450 ++ {
13.451 ++ skip = !match_simple_wild (wildsec2->spec.name, sname);
13.452 ++ if (!skip)
13.453 ++ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
13.454 ++ data);
13.455 ++ }
13.456 ++ }
13.457 ++ }
13.458 ++}
13.459 ++
13.460 ++static void
13.461 ++walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
13.462 ++ lang_input_statement_type *file,
13.463 ++ callback_t callback,
13.464 ++ void *data)
13.465 ++{
13.466 ++ asection *s;
13.467 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
13.468 ++ struct wildcard_list *sec1 = ptr->handler_data[1];
13.469 ++ struct wildcard_list *wildsec2 = ptr->handler_data[2];
13.470 ++ struct wildcard_list *wildsec3 = ptr->handler_data[3];
13.471 ++ bfd_boolean multiple_sections_found;
13.472 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
13.473 ++
13.474 ++ if (multiple_sections_found)
13.475 ++ {
13.476 ++ walk_wild_section_general (ptr, file, callback, data);
13.477 ++ return;
13.478 ++ }
13.479 ++
13.480 ++ s1 = find_section (file, sec1, &multiple_sections_found);
13.481 ++ if (multiple_sections_found)
13.482 ++ {
13.483 ++ walk_wild_section_general (ptr, file, callback, data);
13.484 ++ return;
13.485 ++ }
13.486 ++
13.487 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
13.488 ++ {
13.489 ++ if (s == s0)
13.490 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
13.491 ++ else
13.492 ++ if (s == s1)
13.493 ++ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
13.494 ++ else
13.495 ++ {
13.496 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
13.497 ++ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
13.498 ++ sname);
13.499 ++
13.500 ++ if (!skip)
13.501 ++ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
13.502 ++ data);
13.503 ++ else
13.504 ++ {
13.505 ++ skip = !match_simple_wild (wildsec3->spec.name, sname);
13.506 ++ if (!skip)
13.507 ++ walk_wild_consider_section (ptr, file, s, wildsec3,
13.508 ++ callback, data);
13.509 ++ }
13.510 ++ }
13.511 ++ }
13.512 ++}
13.513 ++
13.514 ++static void
13.515 ++walk_wild_section (lang_wild_statement_type *ptr,
13.516 ++ lang_input_statement_type *file,
13.517 ++ callback_t callback,
13.518 ++ void *data)
13.519 ++{
13.520 ++ if (file->just_syms_flag)
13.521 ++ return;
13.522 ++
13.523 ++ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
13.524 ++}
13.525 ++
13.526 ++/* Returns TRUE when name1 is a wildcard spec that might match
13.527 ++ something name2 can match. We're conservative: we return FALSE
13.528 ++ only if the prefixes of name1 and name2 are different up to the
13.529 ++ first wildcard character. */
13.530 ++
13.531 ++static bfd_boolean
13.532 ++wild_spec_can_overlap (const char *name1, const char *name2)
13.533 ++{
13.534 ++ size_t prefix1_len = strcspn (name1, "?*[");
13.535 ++ size_t prefix2_len = strcspn (name2, "?*[");
13.536 ++ size_t min_prefix_len;
13.537 ++
13.538 ++ /* Note that if there is no wildcard character, then we treat the
13.539 ++ terminating 0 as part of the prefix. Thus ".text" won't match
13.540 ++ ".text." or ".text.*", for example. */
13.541 ++ if (name1[prefix1_len] == '\0')
13.542 ++ prefix1_len++;
13.543 ++ if (name2[prefix2_len] == '\0')
13.544 ++ prefix2_len++;
13.545 ++
13.546 ++ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
13.547 ++
13.548 ++ return memcmp (name1, name2, min_prefix_len) == 0;
13.549 ++}
13.550 ++
13.551 ++/* Select specialized code to handle various kinds of wildcard
13.552 ++ statements. */
13.553 ++
13.554 ++static void
13.555 ++analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
13.556 ++{
13.557 ++ int sec_count = 0;
13.558 ++ int wild_name_count = 0;
13.559 ++ struct wildcard_list *sec;
13.560 ++ int signature;
13.561 ++ int data_counter;
13.562 ++
13.563 ++ ptr->walk_wild_section_handler = walk_wild_section_general;
13.564 ++
13.565 ++ /* Count how many wildcard_specs there are, and how many of those
13.566 ++ actually use wildcards in the name. Also, bail out if any of the
13.567 ++ wildcard names are NULL. (Can this actually happen?
13.568 ++ walk_wild_section used to test for it.) And bail out if any
13.569 ++ of the wildcards are more complex than a simple string
13.570 ++ ending in a single '*'. */
13.571 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
13.572 ++ {
13.573 ++ ++sec_count;
13.574 ++ if (sec->spec.name == NULL)
13.575 ++ return;
13.576 ++ if (wildcardp (sec->spec.name))
13.577 ++ {
13.578 ++ ++wild_name_count;
13.579 ++ if (!is_simple_wild (sec->spec.name))
13.580 ++ return;
13.581 ++ }
13.582 ++ }
13.583 ++
13.584 ++ /* The zero-spec case would be easy to optimize but it doesn't
13.585 ++ happen in practice. Likewise, more than 4 specs doesn't
13.586 ++ happen in practice. */
13.587 ++ if (sec_count == 0 || sec_count > 4)
13.588 ++ return;
13.589 ++
13.590 ++ /* Check that no two specs can match the same section. */
13.591 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
13.592 ++ {
13.593 ++ struct wildcard_list *sec2;
13.594 ++ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
13.595 ++ {
13.596 ++ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
13.597 ++ return;
13.598 ++ }
13.599 ++ }
13.600 ++
13.601 ++ signature = (sec_count << 8) + wild_name_count;
13.602 ++ switch (signature)
13.603 ++ {
13.604 ++ case 0x0100:
13.605 ++ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
13.606 ++ break;
13.607 ++ case 0x0101:
13.608 ++ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
13.609 ++ break;
13.610 ++ case 0x0201:
13.611 ++ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
13.612 ++ break;
13.613 ++ case 0x0302:
13.614 ++ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
13.615 ++ break;
13.616 ++ case 0x0402:
13.617 ++ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
13.618 ++ break;
13.619 ++ default:
13.620 ++ return;
13.621 ++ }
13.622 ++
13.623 ++ /* Now fill the data array with pointers to the specs, first the
13.624 ++ specs with non-wildcard names, then the specs with wildcard
13.625 ++ names. It's OK to process the specs in different order from the
13.626 ++ given order, because we've already determined that no section
13.627 ++ will match more than one spec. */
13.628 ++ data_counter = 0;
13.629 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
13.630 ++ if (!wildcardp (sec->spec.name))
13.631 ++ ptr->handler_data[data_counter++] = sec;
13.632 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
13.633 ++ if (wildcardp (sec->spec.name))
13.634 ++ ptr->handler_data[data_counter++] = sec;
13.635 ++}
13.636 ++
13.637 + /* Handle a wild statement for a single file F. */
13.638 +
13.639 + static void
13.640 +@@ -4353,6 +4737,7 @@
13.641 + new->section_list = section_list;
13.642 + new->keep_sections = keep_sections;
13.643 + lang_list_init (&new->children);
13.644 ++ analyze_walk_wild_section_handler (new);
13.645 + }
13.646 +
13.647 + void
13.648 +--- binutils-2.15/ld/ldlang.h.old 2004-05-17 15:36:16.000000000 -0400
13.649 ++++ binutils-2.15/ld/ldlang.h 2006-01-23 13:32:33.653292000 -0500
13.650 +@@ -295,7 +295,17 @@
13.651 + union lang_statement_union *file;
13.652 + } lang_afile_asection_pair_statement_type;
13.653 +
13.654 +-typedef struct lang_wild_statement_struct
13.655 ++typedef struct lang_wild_statement_struct lang_wild_statement_type;
13.656 ++
13.657 ++typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
13.658 ++ asection *, lang_input_statement_type *, void *);
13.659 ++
13.660 ++typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
13.661 ++ lang_input_statement_type *,
13.662 ++ callback_t callback,
13.663 ++ void *data);
13.664 ++
13.665 ++struct lang_wild_statement_struct
13.666 + {
13.667 + lang_statement_header_type header;
13.668 + const char *filename;
13.669 +@@ -303,7 +313,10 @@
13.670 + struct wildcard_list *section_list;
13.671 + bfd_boolean keep_sections;
13.672 + lang_statement_list_type children;
13.673 +-} lang_wild_statement_type;
13.674 ++
13.675 ++ walk_wild_section_handler_t walk_wild_section_handler;
13.676 ++ struct wildcard_list *handler_data[4];
13.677 ++};
13.678 +
13.679 + typedef struct lang_address_statement_struct
13.680 + {
14.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
14.2 +++ b/patches/binutils/2.15/800-ld-2.15-stabs-tweak.patch Sun Sep 23 17:08:09 2007 +0000
14.3 @@ -0,0 +1,33 @@
14.4 +Signed-off-by: dank@kegel.com
14.5 +
14.6 +See http://sourceware.org/ml/binutils/2005-12/msg00270.html
14.7 +http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
14.8 +
14.9 +STABS hash table size change, backported from the binutils CVS tree. Here's
14.10 +the CVS log comment for the original change:
14.11 +
14.12 +revision 1.25
14.13 +date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
14.14 +(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
14.15 +bfd_hash_table_init_n(...,251) so that the size of the hash table can be
14.16 +controlled by the user.
14.17 +
14.18 +Note that tunable hash table size changes were added after 2.15. The effect
14.19 +of this change is to make bfd use its default hash table size for the stabs
14.20 +hash as well.
14.21 +
14.22 +
14.23 +--- binutils-2.15/bfd/stabs.c.old 2004-05-17 15:36:04.000000000 -0400
14.24 ++++ binutils-2.15/bfd/stabs.c 2006-02-09 15:21:56.567014000 -0500
14.25 +@@ -241,9 +241,8 @@
14.26 + goto error_return;
14.27 + /* Make sure the first byte is zero. */
14.28 + (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
14.29 +- if (! bfd_hash_table_init_n (&sinfo->includes.root,
14.30 +- stab_link_includes_newfunc,
14.31 +- 251))
14.32 ++ if (! bfd_hash_table_init (&sinfo->includes.root,
14.33 ++ stab_link_includes_newfunc))
14.34 + goto error_return;
14.35 + sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
14.36 + sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
15.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
15.2 +++ b/patches/binutils/2.15/810-s390-invalid-insn-format.patch Sun Sep 23 17:08:09 2007 +0000
15.3 @@ -0,0 +1,42 @@
15.4 +Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
15.5 +From: "Michael Geiger" <mcgege@gmx.de>
15.6 +To: <dank@kegel.com>
15.7 +Subject: Patch for cross compiling s/390 kernel on linux host
15.8 +Date: Tue, 31 Aug 2004 15:45:41 +0200
15.9 +
15.10 +Dear Dan,
15.11 +
15.12 +I had big problems compiling a kernel for s/390 on my linux host - I tried
15.13 +different chains from crosstool-0.28-rc34 and finally succeded with
15.14 +gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
15.15 +(attached).
15.16 +All compilations of the different kernel versions I tried stopped with
15.17 +"Invalid .insn format" somewhere. I checked the recent cvs version of
15.18 +binutils and applied the latest diff to gas/config/tc-s390.c and that solved
15.19 +it.
15.20 +
15.21 +Greetings
15.22 +
15.23 +Michael Geiger
15.24 +
15.25 +
15.26 +diff -u -r1.39 -r1.40
15.27 +--- src/gas/config/tc-s390.c 2004/05/06 11:01:48 1.39
15.28 ++++ src/gas/config/tc-s390.c 2004/06/15 12:38:08 1.40
15.29 +@@ -1596,13 +1596,13 @@
15.30 + if (exp.X_op == O_constant)
15.31 + {
15.32 + if ( ( opformat->oplen == 6
15.33 +- && exp.X_add_number >= 0
15.34 ++ && (addressT) exp.X_add_number >= 0
15.35 + && (addressT) exp.X_add_number < (1ULL << 48))
15.36 + || ( opformat->oplen == 4
15.37 +- && exp.X_add_number >= 0
15.38 ++ && (addressT) exp.X_add_number >= 0
15.39 + && (addressT) exp.X_add_number < (1ULL << 32))
15.40 + || ( opformat->oplen == 2
15.41 +- && exp.X_add_number >= 0
15.42 ++ && (addressT) exp.X_add_number >= 0
15.43 + && (addressT) exp.X_add_number < (1ULL << 16)))
15.44 + md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
15.45 + else
16.1 --- a/patches/binutils/2.15/bfd-hash-tweak.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-2.15-allow-gcc-4.0.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-2.15-psignal.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-2.15-solaris-qsort.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-2.15-vmx.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-arm-undef-imm.patch Sat Sep 22 17:25:42 2007 +0000
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/binutils-skip-comments.patch Sat Sep 22 17:25:42 2007 +0000
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/cross-gprof.patch Sat Sep 22 17:25:42 2007 +0000
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/gccpr15247-fix.patch Sat Sep 22 17:25:42 2007 +0000
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/ld-2.15-callahan.patch Sat Sep 22 17:25:42 2007 +0000
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/ld-2.15-stabs-tweak.patch Sat Sep 22 17:25:42 2007 +0000
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/s390-invalid-insn-format.patch Sat Sep 22 17:25:42 2007 +0000
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 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
28.2 +++ b/patches/binutils/2.16.1/100-bfd-hash-tweak.patch Sun Sep 23 17:08:09 2007 +0000
28.3 @@ -0,0 +1,23 @@
28.4 +Signed-off-by: dank@kegel.com
28.5 +
28.6 +Raising the size of the hash table is a noticable win when linking
28.7 +at least one large app.
28.8 +
28.9 +There was a patch,
28.10 +http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
28.11 +to do this dynamically. No idea why that didn't make it in.
28.12 +So this tiny change to raise the default size is just
28.13 +a stopgap for now.
28.14 +
28.15 +
28.16 +--- binutils-2.16.1/bfd/hash.c.old 2006-03-02 23:01:39.000000000 -0800
28.17 ++++ binutils-2.16.1/bfd/hash.c 2006-03-02 23:01:58.000000000 -0800
28.18 +@@ -300,7 +300,7 @@
28.19 + */
28.20 +
28.21 + /* The default number of entries to use when creating a hash table. */
28.22 +-#define DEFAULT_SIZE 4051
28.23 ++#define DEFAULT_SIZE 32749
28.24 + static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
28.25 +
28.26 + /* Create a new hash table, given a number of entries. */
29.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
29.2 +++ b/patches/binutils/2.16.1/110-binutils-2.15-psignal.patch Sun Sep 23 17:08:09 2007 +0000
29.3 @@ -0,0 +1,40 @@
29.4 +Make psignal prototype in libiberty match that in glibc.
29.5 +
29.6 +Fixes:
29.7 +
29.8 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
29.9 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
29.10 +/usr/include/signal.h:131: prototype declaration
29.11 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
29.12 +/usr/include/signal.h:131: prototype declaration
29.13 +gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
29.14 +mprotect... make[1]: *** [strsignal.o] Error 1
29.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'
29.16 +make: *** [all-libiberty] Error 2
29.17 +
29.18 +when building on red hat 7.1
29.19 +though it's a bit of a mystery why libiberty's psignal is being compiled at
29.20 +all, since red hat 7.1's glibc supports psignal (hence the error message)
29.21 +
29.22 +--- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
29.23 ++++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
29.24 +@@ -544,7 +544,7 @@
29.25 +
29.26 + /*
29.27 +
29.28 +-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
29.29 ++@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
29.30 +
29.31 + Print @var{message} to the standard error, followed by a colon,
29.32 + followed by the description of the signal specified by @var{signo},
29.33 +@@ -557,9 +557,7 @@
29.34 + #ifndef HAVE_PSIGNAL
29.35 +
29.36 + void
29.37 +-psignal (signo, message)
29.38 +- unsigned signo;
29.39 +- char *message;
29.40 ++psignal (int signo, const char *message)
29.41 + {
29.42 + if (signal_names == NULL)
29.43 + {
30.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
30.2 +++ b/patches/binutils/2.16.1/120-binutils-skip-comments.patch Sun Sep 23 17:08:09 2007 +0000
30.3 @@ -0,0 +1,95 @@
30.4 +[removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank]
30.5 +
30.6 +Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
30.7 +Fixes
30.8 +localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
30.9 +when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
30.10 +
30.11 +Paths adjusted to match crosstool's patcher.
30.12 +
30.13 +Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
30.14 +From: Andreas Schwab <schwab at suse dot de>
30.15 +To: Nathan Sidwell <nathan at codesourcery dot com>
30.16 +Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
30.17 +Date: Fri, 23 Apr 2004 22:27:19 +0200
30.18 +Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
30.19 +
30.20 +Nathan Sidwell <nathan@codesourcery.com> writes:
30.21 +
30.22 +> Index: read.c
30.23 +> ===================================================================
30.24 +> RCS file: /cvs/src/src/gas/read.c,v
30.25 +> retrieving revision 1.76
30.26 +> diff -c -3 -p -r1.76 read.c
30.27 +> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
30.28 +> --- read.c 18 Mar 2004 09:56:05 -0000
30.29 +> *************** read_a_source_file (char *name)
30.30 +> *** 1053,1059 ****
30.31 +> #endif
30.32 +> input_line_pointer--;
30.33 +> /* Report unknown char as ignored. */
30.34 +> ! ignore_rest_of_line ();
30.35 +> }
30.36 +>
30.37 +> #ifdef md_after_pass_hook
30.38 +> --- 1053,1059 ----
30.39 +> #endif
30.40 +> input_line_pointer--;
30.41 +> /* Report unknown char as ignored. */
30.42 +> ! demand_empty_rest_of_line ();
30.43 +> }
30.44 +>
30.45 +> #ifdef md_after_pass_hook
30.46 +
30.47 +This means that the unknown character is no longer ignored, despite the
30.48 +comment. As a side effect a line starting with a line comment character
30.49 +not followed by APP in NO_APP mode now triggers an error instead of just a
30.50 +warning, breaking builds of glibc on m68k-linux. Earlier in
30.51 +read_a_source_file where #APP is handled there is another comment that
30.52 +claims that unknown comments are ignored, when in fact they aren't (only
30.53 +the initial line comment character is skipped).
30.54 +
30.55 +Note that the presence of #APP will mess up the line counters, but
30.56 +that appears to be difficult to fix.
30.57 +
30.58 +Andreas.
30.59 +
30.60 +2004-04-23 Andreas Schwab <schwab@suse.de>
30.61 +
30.62 + * read.c (read_a_source_file): Ignore unknown text after line
30.63 + comment character. Fix misleading comment.
30.64 +
30.65 +--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
30.66 ++++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
30.67 +@@ -950,10 +950,14 @@ read_a_source_file (char *name)
30.68 + unsigned int new_length;
30.69 + char *tmp_buf = 0;
30.70 +
30.71 +- bump_line_counters ();
30.72 + s = input_line_pointer;
30.73 + if (strncmp (s, "APP\n", 4))
30.74 +- continue; /* We ignore it */
30.75 ++ {
30.76 ++ /* We ignore it */
30.77 ++ ignore_rest_of_line ();
30.78 ++ continue;
30.79 ++ }
30.80 ++ bump_line_counters ();
30.81 + s += 4;
30.82 +
30.83 + sb_new (&sbuf);
30.84 +@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
30.85 + continue;
30.86 + #endif
30.87 + input_line_pointer--;
30.88 +- /* Report unknown char as ignored. */
30.89 ++ /* Report unknown char as error. */
30.90 + demand_empty_rest_of_line ();
30.91 + }
30.92 +
30.93 +
30.94 +--
30.95 +Andreas Schwab, SuSE Labs, schwab@suse.de
30.96 +SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
30.97 +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
30.98 +"And now for something completely different."
31.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
31.2 +++ b/patches/binutils/2.16.1/130-callahan.patch Sun Sep 23 17:08:09 2007 +0000
31.3 @@ -0,0 +1,693 @@
31.4 +Signed-off-by: dank@kegel.com
31.5 +Fixes ld speed issue.
31.6 +See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
31.7 +See thread "Re: optimizations for 3x speedup in ld",
31.8 +http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
31.9 +
31.10 +Wildcard section matching enhancement, backported from the binutils CVS tree.
31.11 +Here's the CVS log comment from the original change to ldlang.c:
31.12 +
31.13 +revision 1.177
31.14 +date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
31.15 +2005-04-06 Jakub Jelinek <jakub@redhat.com>
31.16 +
31.17 + * ldlang.c: Formatting.
31.18 + (walk_wild_consider_section): Remember return value from wildcardp.
31.19 + (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
31.20 + (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
31.21 +
31.22 +2005-04-06 Robert O'Callahan <rocallahan@novell.com>
31.23 +
31.24 + * ld.h (lean_section_userdata_type): Remove.
31.25 + (fat_section_userdata_type): Remove file field.
31.26 + (SECTION_USERDATA_SIZE): Remove.
31.27 + * ldlang.c (init_os): Eliminate initialization of unused
31.28 + lean_section_userdata_type.
31.29 +
31.30 + * ldlang.h (callback_t, walk_wild_section_handler_t): New
31.31 + typedefs.
31.32 + (struct lang_wild_statement_struct): Add walk_wild_section_handler
31.33 + and handler_data fields.
31.34 + * ldlang.c (callback_t): Removed.
31.35 + (walk_wild_consider_section, walk_wild_section_general,
31.36 + section_iterator_callback, find_section, is_simple_wild,
31.37 + match_simple_wild, walk_wild_section_specs1_wild0,
31.38 + walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
31.39 + walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
31.40 + wild_spec_can_overlap, analyze_walk_wild_section_handler): New
31.41 + functions.
31.42 + (lang_add_wild): Call analyze_walk_wild_section_handler.
31.43 + (walk_wild_section): Renamed to walk_wild_section_general and
31.44 + created a wrapper function.
31.45 + (section_iterator_callback_data): New typedef.
31.46 +
31.47 +
31.48 +Index: src/ld/ld.h
31.49 +===================================================================
31.50 +RCS file: /cvs/src/src/ld/ld.h,v
31.51 +retrieving revision 1.26
31.52 +retrieving revision 1.27
31.53 +diff -u -r1.26 -r1.27
31.54 +--- binutils/ld/ld.h.old 16 Mar 2005 21:52:42 -0000 1.26
31.55 ++++ binutils/ld/ld.h 6 Apr 2005 15:33:02 -0000 1.27
31.56 +@@ -1,6 +1,6 @@
31.57 + /* ld.h -- general linker header file
31.58 + Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
31.59 +- 2001, 2002, 2003, 2004
31.60 ++ 2001, 2002, 2003, 2004, 2005
31.61 + Free Software Foundation, Inc.
31.62 +
31.63 + This file is part of GLD, the Gnu Linker.
31.64 +@@ -89,28 +89,15 @@
31.65 + struct map_symbol_def *next;
31.66 + };
31.67 +
31.68 +-/* Extra information we hold on sections */
31.69 +-typedef struct lean_user_section_struct {
31.70 +- /* For output sections: pointer to the section where this data will go. */
31.71 +- struct lang_input_statement_struct *file;
31.72 +-} lean_section_userdata_type;
31.73 +-
31.74 + /* The initial part of fat_user_section_struct has to be idential with
31.75 + lean_user_section_struct. */
31.76 + typedef struct fat_user_section_struct {
31.77 +- /* For output sections: pointer to the section where this data will go. */
31.78 +- struct lang_input_statement_struct *file;
31.79 + /* For input sections, when writing a map file: head / tail of a linked
31.80 + list of hash table entries for symbols defined in this section. */
31.81 + struct map_symbol_def *map_symbol_def_head;
31.82 + struct map_symbol_def **map_symbol_def_tail;
31.83 + } fat_section_userdata_type;
31.84 +
31.85 +-#define SECTION_USERDATA_SIZE \
31.86 +- (command_line.reduce_memory_overheads \
31.87 +- ? sizeof (lean_section_userdata_type) \
31.88 +- : sizeof (fat_section_userdata_type))
31.89 +-
31.90 + #define get_userdata(x) ((x)->userdata)
31.91 +
31.92 + #define BYTE_SIZE (1)
31.93 +Index: src/ld/ldlang.c
31.94 +===================================================================
31.95 +RCS file: /cvs/src/src/ld/ldlang.c,v
31.96 +retrieving revision 1.176
31.97 +retrieving revision 1.177
31.98 +diff -u -r1.176 -r1.177
31.99 +--- binutils/ld/ldlang.c.old 18 Mar 2005 13:56:26 -0000 1.176
31.100 ++++ binutils/ld/ldlang.c 6 Apr 2005 15:33:02 -0000 1.177
31.101 +@@ -84,9 +84,6 @@
31.102 + static void lang_record_phdrs (void);
31.103 + static void lang_do_version_exports_section (void);
31.104 +
31.105 +-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
31.106 +- asection *, lang_input_statement_type *, void *);
31.107 +-
31.108 + /* Exported variables. */
31.109 + lang_output_section_statement_type *abs_output_section;
31.110 + lang_statement_list_type lang_output_section_statement;
31.111 +@@ -155,21 +152,71 @@
31.112 +
31.113 + /* Generic traversal routines for finding matching sections. */
31.114 +
31.115 ++/* Try processing a section against a wildcard. This just calls
31.116 ++ the callback unless the filename exclusion list is present
31.117 ++ and excludes the file. It's hardly ever present so this
31.118 ++ function is very fast. */
31.119 ++
31.120 ++static void
31.121 ++walk_wild_consider_section (lang_wild_statement_type *ptr,
31.122 ++ lang_input_statement_type *file,
31.123 ++ asection *s,
31.124 ++ struct wildcard_list *sec,
31.125 ++ callback_t callback,
31.126 ++ void *data)
31.127 ++{
31.128 ++ bfd_boolean skip = FALSE;
31.129 ++ struct name_list *list_tmp;
31.130 ++
31.131 ++ /* Don't process sections from files which were
31.132 ++ excluded. */
31.133 ++ for (list_tmp = sec->spec.exclude_name_list;
31.134 ++ list_tmp;
31.135 ++ list_tmp = list_tmp->next)
31.136 ++ {
31.137 ++ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
31.138 ++ if (is_wildcard)
31.139 ++ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
31.140 ++ else
31.141 ++ skip = strcmp (list_tmp->name, file->filename) == 0;
31.142 ++
31.143 ++ /* If this file is part of an archive, and the archive is
31.144 ++ excluded, exclude this file. */
31.145 ++ if (! skip && file->the_bfd != NULL
31.146 ++ && file->the_bfd->my_archive != NULL
31.147 ++ && file->the_bfd->my_archive->filename != NULL)
31.148 ++ {
31.149 ++ if (is_wildcard)
31.150 ++ skip = fnmatch (list_tmp->name,
31.151 ++ file->the_bfd->my_archive->filename,
31.152 ++ 0) == 0;
31.153 ++ else
31.154 ++ skip = strcmp (list_tmp->name,
31.155 ++ file->the_bfd->my_archive->filename) == 0;
31.156 ++ }
31.157 ++
31.158 ++ if (skip)
31.159 ++ break;
31.160 ++ }
31.161 ++
31.162 ++ if (!skip)
31.163 ++ (*callback) (ptr, sec, s, file, data);
31.164 ++}
31.165 ++
31.166 ++/* Lowest common denominator routine that can handle everything correctly,
31.167 ++ but slowly. */
31.168 ++
31.169 + static void
31.170 +-walk_wild_section (lang_wild_statement_type *ptr,
31.171 +- lang_input_statement_type *file,
31.172 +- callback_t callback,
31.173 +- void *data)
31.174 ++walk_wild_section_general (lang_wild_statement_type *ptr,
31.175 ++ lang_input_statement_type *file,
31.176 ++ callback_t callback,
31.177 ++ void *data)
31.178 + {
31.179 + asection *s;
31.180 +-
31.181 +- if (file->just_syms_flag)
31.182 +- return;
31.183 ++ struct wildcard_list *sec;
31.184 +
31.185 + for (s = file->the_bfd->sections; s != NULL; s = s->next)
31.186 + {
31.187 +- struct wildcard_list *sec;
31.188 +-
31.189 + sec = ptr->section_list;
31.190 + if (sec == NULL)
31.191 + (*callback) (ptr, sec, s, file, data);
31.192 +@@ -177,39 +224,8 @@
31.193 + while (sec != NULL)
31.194 + {
31.195 + bfd_boolean skip = FALSE;
31.196 +- struct name_list *list_tmp;
31.197 +
31.198 +- /* Don't process sections from files which were
31.199 +- excluded. */
31.200 +- for (list_tmp = sec->spec.exclude_name_list;
31.201 +- list_tmp;
31.202 +- list_tmp = list_tmp->next)
31.203 +- {
31.204 +- if (wildcardp (list_tmp->name))
31.205 +- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
31.206 +- else
31.207 +- skip = strcmp (list_tmp->name, file->filename) == 0;
31.208 +-
31.209 +- /* If this file is part of an archive, and the archive is
31.210 +- excluded, exclude this file. */
31.211 +- if (! skip && file->the_bfd != NULL
31.212 +- && file->the_bfd->my_archive != NULL
31.213 +- && file->the_bfd->my_archive->filename != NULL)
31.214 +- {
31.215 +- if (wildcardp (list_tmp->name))
31.216 +- skip = fnmatch (list_tmp->name,
31.217 +- file->the_bfd->my_archive->filename,
31.218 +- 0) == 0;
31.219 +- else
31.220 +- skip = strcmp (list_tmp->name,
31.221 +- file->the_bfd->my_archive->filename) == 0;
31.222 +- }
31.223 +-
31.224 +- if (skip)
31.225 +- break;
31.226 +- }
31.227 +-
31.228 +- if (!skip && sec->spec.name != NULL)
31.229 ++ if (sec->spec.name != NULL)
31.230 + {
31.231 + const char *sname = bfd_get_section_name (file->the_bfd, s);
31.232 +
31.233 +@@ -220,13 +236,381 @@
31.234 + }
31.235 +
31.236 + if (!skip)
31.237 +- (*callback) (ptr, sec, s, file, data);
31.238 ++ walk_wild_consider_section (ptr, file, s, sec, callback, data);
31.239 +
31.240 + sec = sec->next;
31.241 + }
31.242 + }
31.243 + }
31.244 +
31.245 ++/* Routines to find a single section given its name. If there's more
31.246 ++ than one section with that name, we report that. */
31.247 ++
31.248 ++typedef struct
31.249 ++{
31.250 ++ asection *found_section;
31.251 ++ bfd_boolean multiple_sections_found;
31.252 ++} section_iterator_callback_data;
31.253 ++
31.254 ++static bfd_boolean
31.255 ++section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
31.256 ++{
31.257 ++ section_iterator_callback_data *d = data;
31.258 ++
31.259 ++ if (d->found_section != NULL)
31.260 ++ {
31.261 ++ d->multiple_sections_found = TRUE;
31.262 ++ return TRUE;
31.263 ++ }
31.264 ++
31.265 ++ d->found_section = s;
31.266 ++ return FALSE;
31.267 ++}
31.268 ++
31.269 ++static asection *
31.270 ++find_section (lang_input_statement_type *file,
31.271 ++ struct wildcard_list *sec,
31.272 ++ bfd_boolean *multiple_sections_found)
31.273 ++{
31.274 ++ section_iterator_callback_data cb_data = { NULL, FALSE };
31.275 ++
31.276 ++ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
31.277 ++ section_iterator_callback, &cb_data);
31.278 ++ *multiple_sections_found = cb_data.multiple_sections_found;
31.279 ++ return cb_data.found_section;
31.280 ++}
31.281 ++
31.282 ++/* Code for handling simple wildcards without going through fnmatch,
31.283 ++ which can be expensive because of charset translations etc. */
31.284 ++
31.285 ++/* A simple wild is a literal string followed by a single '*',
31.286 ++ where the literal part is at least 4 characters long. */
31.287 ++
31.288 ++static bfd_boolean
31.289 ++is_simple_wild (const char *name)
31.290 ++{
31.291 ++ size_t len = strcspn (name, "*?[");
31.292 ++ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
31.293 ++}
31.294 ++
31.295 ++static bfd_boolean
31.296 ++match_simple_wild (const char *pattern, const char *name)
31.297 ++{
31.298 ++ /* The first four characters of the pattern are guaranteed valid
31.299 ++ non-wildcard characters. So we can go faster. */
31.300 ++ if (pattern[0] != name[0] || pattern[1] != name[1]
31.301 ++ || pattern[2] != name[2] || pattern[3] != name[3])
31.302 ++ return FALSE;
31.303 ++
31.304 ++ pattern += 4;
31.305 ++ name += 4;
31.306 ++ while (*pattern != '*')
31.307 ++ if (*name++ != *pattern++)
31.308 ++ return FALSE;
31.309 ++
31.310 ++ return TRUE;
31.311 ++}
31.312 ++
31.313 ++/* Specialized, optimized routines for handling different kinds of
31.314 ++ wildcards */
31.315 ++
31.316 ++static void
31.317 ++walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
31.318 ++ lang_input_statement_type *file,
31.319 ++ callback_t callback,
31.320 ++ void *data)
31.321 ++{
31.322 ++ /* We can just do a hash lookup for the section with the right name.
31.323 ++ But if that lookup discovers more than one section with the name
31.324 ++ (should be rare), we fall back to the general algorithm because
31.325 ++ we would otherwise have to sort the sections to make sure they
31.326 ++ get processed in the bfd's order. */
31.327 ++ bfd_boolean multiple_sections_found;
31.328 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
31.329 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
31.330 ++
31.331 ++ if (multiple_sections_found)
31.332 ++ walk_wild_section_general (ptr, file, callback, data);
31.333 ++ else if (s0)
31.334 ++ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
31.335 ++}
31.336 ++
31.337 ++static void
31.338 ++walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
31.339 ++ lang_input_statement_type *file,
31.340 ++ callback_t callback,
31.341 ++ void *data)
31.342 ++{
31.343 ++ asection *s;
31.344 ++ struct wildcard_list *wildsec0 = ptr->handler_data[0];
31.345 ++
31.346 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
31.347 ++ {
31.348 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
31.349 ++ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
31.350 ++
31.351 ++ if (!skip)
31.352 ++ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
31.353 ++ }
31.354 ++}
31.355 ++
31.356 ++static void
31.357 ++walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
31.358 ++ lang_input_statement_type *file,
31.359 ++ callback_t callback,
31.360 ++ void *data)
31.361 ++{
31.362 ++ asection *s;
31.363 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
31.364 ++ struct wildcard_list *wildsec1 = ptr->handler_data[1];
31.365 ++ bfd_boolean multiple_sections_found;
31.366 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
31.367 ++
31.368 ++ if (multiple_sections_found)
31.369 ++ {
31.370 ++ walk_wild_section_general (ptr, file, callback, data);
31.371 ++ return;
31.372 ++ }
31.373 ++
31.374 ++ /* Note that if the section was not found, s0 is NULL and
31.375 ++ we'll simply never succeed the s == s0 test below. */
31.376 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
31.377 ++ {
31.378 ++ /* Recall that in this code path, a section cannot satisfy more
31.379 ++ than one spec, so if s == s0 then it cannot match
31.380 ++ wildspec1. */
31.381 ++ if (s == s0)
31.382 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
31.383 ++ else
31.384 ++ {
31.385 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
31.386 ++ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
31.387 ++
31.388 ++ if (!skip)
31.389 ++ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
31.390 ++ data);
31.391 ++ }
31.392 ++ }
31.393 ++}
31.394 ++
31.395 ++static void
31.396 ++walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
31.397 ++ lang_input_statement_type *file,
31.398 ++ callback_t callback,
31.399 ++ void *data)
31.400 ++{
31.401 ++ asection *s;
31.402 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
31.403 ++ struct wildcard_list *wildsec1 = ptr->handler_data[1];
31.404 ++ struct wildcard_list *wildsec2 = ptr->handler_data[2];
31.405 ++ bfd_boolean multiple_sections_found;
31.406 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found);
31.407 ++
31.408 ++ if (multiple_sections_found)
31.409 ++ {
31.410 ++ walk_wild_section_general (ptr, file, callback, data);
31.411 ++ return;
31.412 ++ }
31.413 ++
31.414 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
31.415 ++ {
31.416 ++ if (s == s0)
31.417 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
31.418 ++ else
31.419 ++ {
31.420 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
31.421 ++ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
31.422 ++
31.423 ++ if (!skip)
31.424 ++ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
31.425 ++ else
31.426 ++ {
31.427 ++ skip = !match_simple_wild (wildsec2->spec.name, sname);
31.428 ++ if (!skip)
31.429 ++ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
31.430 ++ data);
31.431 ++ }
31.432 ++ }
31.433 ++ }
31.434 ++}
31.435 ++
31.436 ++static void
31.437 ++walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
31.438 ++ lang_input_statement_type *file,
31.439 ++ callback_t callback,
31.440 ++ void *data)
31.441 ++{
31.442 ++ asection *s;
31.443 ++ struct wildcard_list *sec0 = ptr->handler_data[0];
31.444 ++ struct wildcard_list *sec1 = ptr->handler_data[1];
31.445 ++ struct wildcard_list *wildsec2 = ptr->handler_data[2];
31.446 ++ struct wildcard_list *wildsec3 = ptr->handler_data[3];
31.447 ++ bfd_boolean multiple_sections_found;
31.448 ++ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
31.449 ++
31.450 ++ if (multiple_sections_found)
31.451 ++ {
31.452 ++ walk_wild_section_general (ptr, file, callback, data);
31.453 ++ return;
31.454 ++ }
31.455 ++
31.456 ++ s1 = find_section (file, sec1, &multiple_sections_found);
31.457 ++ if (multiple_sections_found)
31.458 ++ {
31.459 ++ walk_wild_section_general (ptr, file, callback, data);
31.460 ++ return;
31.461 ++ }
31.462 ++
31.463 ++ for (s = file->the_bfd->sections; s != NULL; s = s->next)
31.464 ++ {
31.465 ++ if (s == s0)
31.466 ++ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
31.467 ++ else
31.468 ++ if (s == s1)
31.469 ++ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
31.470 ++ else
31.471 ++ {
31.472 ++ const char *sname = bfd_get_section_name (file->the_bfd, s);
31.473 ++ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
31.474 ++ sname);
31.475 ++
31.476 ++ if (!skip)
31.477 ++ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
31.478 ++ data);
31.479 ++ else
31.480 ++ {
31.481 ++ skip = !match_simple_wild (wildsec3->spec.name, sname);
31.482 ++ if (!skip)
31.483 ++ walk_wild_consider_section (ptr, file, s, wildsec3,
31.484 ++ callback, data);
31.485 ++ }
31.486 ++ }
31.487 ++ }
31.488 ++}
31.489 ++
31.490 ++static void
31.491 ++walk_wild_section (lang_wild_statement_type *ptr,
31.492 ++ lang_input_statement_type *file,
31.493 ++ callback_t callback,
31.494 ++ void *data)
31.495 ++{
31.496 ++ if (file->just_syms_flag)
31.497 ++ return;
31.498 ++
31.499 ++ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
31.500 ++}
31.501 ++
31.502 ++/* Returns TRUE when name1 is a wildcard spec that might match
31.503 ++ something name2 can match. We're conservative: we return FALSE
31.504 ++ only if the prefixes of name1 and name2 are different up to the
31.505 ++ first wildcard character. */
31.506 ++
31.507 ++static bfd_boolean
31.508 ++wild_spec_can_overlap (const char *name1, const char *name2)
31.509 ++{
31.510 ++ size_t prefix1_len = strcspn (name1, "?*[");
31.511 ++ size_t prefix2_len = strcspn (name2, "?*[");
31.512 ++ size_t min_prefix_len;
31.513 ++
31.514 ++ /* Note that if there is no wildcard character, then we treat the
31.515 ++ terminating 0 as part of the prefix. Thus ".text" won't match
31.516 ++ ".text." or ".text.*", for example. */
31.517 ++ if (name1[prefix1_len] == '\0')
31.518 ++ prefix1_len++;
31.519 ++ if (name2[prefix2_len] == '\0')
31.520 ++ prefix2_len++;
31.521 ++
31.522 ++ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
31.523 ++
31.524 ++ return memcmp (name1, name2, min_prefix_len) == 0;
31.525 ++}
31.526 ++
31.527 ++/* Select specialized code to handle various kinds of wildcard
31.528 ++ statements. */
31.529 ++
31.530 ++static void
31.531 ++analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
31.532 ++{
31.533 ++ int sec_count = 0;
31.534 ++ int wild_name_count = 0;
31.535 ++ struct wildcard_list *sec;
31.536 ++ int signature;
31.537 ++ int data_counter;
31.538 ++
31.539 ++ ptr->walk_wild_section_handler = walk_wild_section_general;
31.540 ++
31.541 ++ /* Count how many wildcard_specs there are, and how many of those
31.542 ++ actually use wildcards in the name. Also, bail out if any of the
31.543 ++ wildcard names are NULL. (Can this actually happen?
31.544 ++ walk_wild_section used to test for it.) And bail out if any
31.545 ++ of the wildcards are more complex than a simple string
31.546 ++ ending in a single '*'. */
31.547 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
31.548 ++ {
31.549 ++ ++sec_count;
31.550 ++ if (sec->spec.name == NULL)
31.551 ++ return;
31.552 ++ if (wildcardp (sec->spec.name))
31.553 ++ {
31.554 ++ ++wild_name_count;
31.555 ++ if (!is_simple_wild (sec->spec.name))
31.556 ++ return;
31.557 ++ }
31.558 ++ }
31.559 ++
31.560 ++ /* The zero-spec case would be easy to optimize but it doesn't
31.561 ++ happen in practice. Likewise, more than 4 specs doesn't
31.562 ++ happen in practice. */
31.563 ++ if (sec_count == 0 || sec_count > 4)
31.564 ++ return;
31.565 ++
31.566 ++ /* Check that no two specs can match the same section. */
31.567 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
31.568 ++ {
31.569 ++ struct wildcard_list *sec2;
31.570 ++ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
31.571 ++ {
31.572 ++ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
31.573 ++ return;
31.574 ++ }
31.575 ++ }
31.576 ++
31.577 ++ signature = (sec_count << 8) + wild_name_count;
31.578 ++ switch (signature)
31.579 ++ {
31.580 ++ case 0x0100:
31.581 ++ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
31.582 ++ break;
31.583 ++ case 0x0101:
31.584 ++ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
31.585 ++ break;
31.586 ++ case 0x0201:
31.587 ++ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
31.588 ++ break;
31.589 ++ case 0x0302:
31.590 ++ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
31.591 ++ break;
31.592 ++ case 0x0402:
31.593 ++ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
31.594 ++ break;
31.595 ++ default:
31.596 ++ return;
31.597 ++ }
31.598 ++
31.599 ++ /* Now fill the data array with pointers to the specs, first the
31.600 ++ specs with non-wildcard names, then the specs with wildcard
31.601 ++ names. It's OK to process the specs in different order from the
31.602 ++ given order, because we've already determined that no section
31.603 ++ will match more than one spec. */
31.604 ++ data_counter = 0;
31.605 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
31.606 ++ if (!wildcardp (sec->spec.name))
31.607 ++ ptr->handler_data[data_counter++] = sec;
31.608 ++ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
31.609 ++ if (wildcardp (sec->spec.name))
31.610 ++ ptr->handler_data[data_counter++] = sec;
31.611 ++}
31.612 ++
31.613 + /* Handle a wild statement for a single file F. */
31.614 +
31.615 + static void
31.616 +@@ -1175,17 +1559,12 @@
31.617 + static void
31.618 + init_os (lang_output_section_statement_type *s)
31.619 + {
31.620 +- lean_section_userdata_type *new;
31.621 +-
31.622 + if (s->bfd_section != NULL)
31.623 + return;
31.624 +
31.625 + if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
31.626 + einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
31.627 +
31.628 +- new = stat_alloc (SECTION_USERDATA_SIZE);
31.629 +- memset (new, 0, SECTION_USERDATA_SIZE);
31.630 +-
31.631 + s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
31.632 + if (s->bfd_section == NULL)
31.633 + s->bfd_section = bfd_make_section (output_bfd, s->name);
31.634 +@@ -1199,7 +1578,14 @@
31.635 + /* We initialize an output sections output offset to minus its own
31.636 + vma to allow us to output a section through itself. */
31.637 + s->bfd_section->output_offset = 0;
31.638 +- get_userdata (s->bfd_section) = new;
31.639 ++ if (!command_line.reduce_memory_overheads)
31.640 ++ {
31.641 ++ fat_section_userdata_type *new
31.642 ++ = stat_alloc (sizeof (fat_section_userdata_type));
31.643 ++ memset (new, 0, sizeof (fat_section_userdata_type));
31.644 ++ get_userdata (s->bfd_section) = new;
31.645 ++ }
31.646 ++
31.647 +
31.648 + /* If there is a base address, make sure that any sections it might
31.649 + mention are initialized. */
31.650 +@@ -4939,6 +5325,7 @@
31.651 + new->section_list = section_list;
31.652 + new->keep_sections = keep_sections;
31.653 + lang_list_init (&new->children);
31.654 ++ analyze_walk_wild_section_handler (new);
31.655 + }
31.656 +
31.657 + void
31.658 +Index: src/ld/ldlang.h
31.659 +===================================================================
31.660 +RCS file: /cvs/src/src/ld/ldlang.h,v
31.661 +retrieving revision 1.44
31.662 +retrieving revision 1.45
31.663 +diff -u -r1.44 -r1.45
31.664 +--- binutils/ld/ldlang.h.old 3 Mar 2005 11:51:58 -0000 1.44
31.665 ++++ binutils/ld/ldlang.h 6 Apr 2005 15:33:03 -0000 1.45
31.666 +@@ -298,7 +298,17 @@
31.667 + union lang_statement_union *file;
31.668 + } lang_afile_asection_pair_statement_type;
31.669 +
31.670 +-typedef struct lang_wild_statement_struct
31.671 ++typedef struct lang_wild_statement_struct lang_wild_statement_type;
31.672 ++
31.673 ++typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
31.674 ++ asection *, lang_input_statement_type *, void *);
31.675 ++
31.676 ++typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
31.677 ++ lang_input_statement_type *,
31.678 ++ callback_t callback,
31.679 ++ void *data);
31.680 ++
31.681 ++struct lang_wild_statement_struct
31.682 + {
31.683 + lang_statement_header_type header;
31.684 + const char *filename;
31.685 +@@ -306,7 +316,10 @@
31.686 + struct wildcard_list *section_list;
31.687 + bfd_boolean keep_sections;
31.688 + lang_statement_list_type children;
31.689 +-} lang_wild_statement_type;
31.690 ++
31.691 ++ walk_wild_section_handler_t walk_wild_section_handler;
31.692 ++ struct wildcard_list *handler_data[4];
31.693 ++};
31.694 +
31.695 + typedef struct lang_address_statement_struct
31.696 + {
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
32.2 +++ b/patches/binutils/2.16.1/140-cross-gprof.patch Sun Sep 23 17:08:09 2007 +0000
32.3 @@ -0,0 +1,22 @@
32.4 +--- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
32.5 ++++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
32.6 +@@ -999,7 +999,7 @@
32.7 +
32.8 + # Some tools are only suitable for building in a "native" situation.
32.9 + # Remove these if host!=target.
32.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"
32.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"
32.12 +
32.13 + # Similarly, some are only suitable for cross toolchains.
32.14 + # Remove these if host=target.
32.15 +--- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
32.16 ++++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
32.17 +@@ -236,7 +236,7 @@
32.18 +
32.19 + # Some tools are only suitable for building in a "native" situation.
32.20 + # Remove these if host!=target.
32.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"
32.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"
32.23 +
32.24 + # Similarly, some are only suitable for cross toolchains.
32.25 + # Remove these if host=target.
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
33.2 +++ b/patches/binutils/2.16.1/150-stabs-tweak.patch Sun Sep 23 17:08:09 2007 +0000
33.3 @@ -0,0 +1,28 @@
33.4 +Signed-off-by: dank@kegel.com
33.5 +
33.6 +See http://sourceware.org/ml/binutils/2005-12/msg00270.html
33.7 +http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
33.8 +
33.9 +STABS hash table size change, backported from the binutils CVS tree. Here's
33.10 +the CVS log comment for the original change:
33.11 +
33.12 +revision 1.25
33.13 +date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
33.14 +(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
33.15 +bfd_hash_table_init_n(...,251) so that the size of the hash table can be
33.16 +controlled by the user.
33.17 +
33.18 +--- binutils/bfd/stabs.c.old 4 May 2005 15:53:39 -0000 1.24
33.19 ++++ binutils/bfd/stabs.c 29 Dec 2005 10:29:23 -0000 1.25
33.20 +@@ -194,9 +194,8 @@
33.21 + goto error_return;
33.22 + /* Make sure the first byte is zero. */
33.23 + (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
33.24 +- if (! bfd_hash_table_init_n (&sinfo->includes,
33.25 +- stab_link_includes_newfunc,
33.26 +- 251))
33.27 ++ if (! bfd_hash_table_init (&sinfo->includes,
33.28 ++ stab_link_includes_newfunc))
33.29 + goto error_return;
33.30 + sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
33.31 + if (sinfo->stabstr == NULL)
34.1 --- a/patches/binutils/2.16.1/bfd-hash-tweak.patch Sat Sep 22 17:25:42 2007 +0000
34.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
34.3 @@ -1,23 +0,0 @@
34.4 -Signed-off-by: dank@kegel.com
34.5 -
34.6 -Raising the size of the hash table is a noticable win when linking
34.7 -at least one large app.
34.8 -
34.9 -There was a patch,
34.10 -http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
34.11 -to do this dynamically. No idea why that didn't make it in.
34.12 -So this tiny change to raise the default size is just
34.13 -a stopgap for now.
34.14 -
34.15 -
34.16 ---- binutils-2.16.1/bfd/hash.c.old 2006-03-02 23:01:39.000000000 -0800
34.17 -+++ binutils-2.16.1/bfd/hash.c 2006-03-02 23:01:58.000000000 -0800
34.18 -@@ -300,7 +300,7 @@
34.19 - */
34.20 -
34.21 - /* The default number of entries to use when creating a hash table. */
34.22 --#define DEFAULT_SIZE 4051
34.23 -+#define DEFAULT_SIZE 32749
34.24 - static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
34.25 -
34.26 - /* Create a new hash table, given a number of entries. */
35.1 --- a/patches/binutils/2.16.1/binutils-2.15-psignal.patch Sat Sep 22 17:25:42 2007 +0000
35.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
35.3 @@ -1,40 +0,0 @@
35.4 -Make psignal prototype in libiberty match that in glibc.
35.5 -
35.6 -Fixes:
35.7 -
35.8 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
35.9 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
35.10 -/usr/include/signal.h:131: prototype declaration
35.11 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
35.12 -/usr/include/signal.h:131: prototype declaration
35.13 -gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
35.14 -mprotect... make[1]: *** [strsignal.o] Error 1
35.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'
35.16 -make: *** [all-libiberty] Error 2
35.17 -
35.18 -when building on red hat 7.1
35.19 -though it's a bit of a mystery why libiberty's psignal is being compiled at
35.20 -all, since red hat 7.1's glibc supports psignal (hence the error message)
35.21 -
35.22 ---- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
35.23 -+++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
35.24 -@@ -544,7 +544,7 @@
35.25 -
35.26 - /*
35.27 -
35.28 --@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
35.29 -+@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
35.30 -
35.31 - Print @var{message} to the standard error, followed by a colon,
35.32 - followed by the description of the signal specified by @var{signo},
35.33 -@@ -557,9 +557,7 @@
35.34 - #ifndef HAVE_PSIGNAL
35.35 -
35.36 - void
35.37 --psignal (signo, message)
35.38 -- unsigned signo;
35.39 -- char *message;
35.40 -+psignal (int signo, const char *message)
35.41 - {
35.42 - if (signal_names == NULL)
35.43 - {
36.1 --- a/patches/binutils/2.16.1/binutils-skip-comments.patch Sat Sep 22 17:25:42 2007 +0000
36.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
36.3 @@ -1,95 +0,0 @@
36.4 -[removed first hunk so it would apply to 2.16.1 - copyright date already updated - dank]
36.5 -
36.6 -Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
36.7 -Fixes
36.8 -localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
36.9 -when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
36.10 -
36.11 -Paths adjusted to match crosstool's patcher.
36.12 -
36.13 -Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
36.14 -From: Andreas Schwab <schwab at suse dot de>
36.15 -To: Nathan Sidwell <nathan at codesourcery dot com>
36.16 -Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
36.17 -Date: Fri, 23 Apr 2004 22:27:19 +0200
36.18 -Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
36.19 -
36.20 -Nathan Sidwell <nathan@codesourcery.com> writes:
36.21 -
36.22 -> Index: read.c
36.23 -> ===================================================================
36.24 -> RCS file: /cvs/src/src/gas/read.c,v
36.25 -> retrieving revision 1.76
36.26 -> diff -c -3 -p -r1.76 read.c
36.27 -> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
36.28 -> --- read.c 18 Mar 2004 09:56:05 -0000
36.29 -> *************** read_a_source_file (char *name)
36.30 -> *** 1053,1059 ****
36.31 -> #endif
36.32 -> input_line_pointer--;
36.33 -> /* Report unknown char as ignored. */
36.34 -> ! ignore_rest_of_line ();
36.35 -> }
36.36 ->
36.37 -> #ifdef md_after_pass_hook
36.38 -> --- 1053,1059 ----
36.39 -> #endif
36.40 -> input_line_pointer--;
36.41 -> /* Report unknown char as ignored. */
36.42 -> ! demand_empty_rest_of_line ();
36.43 -> }
36.44 ->
36.45 -> #ifdef md_after_pass_hook
36.46 -
36.47 -This means that the unknown character is no longer ignored, despite the
36.48 -comment. As a side effect a line starting with a line comment character
36.49 -not followed by APP in NO_APP mode now triggers an error instead of just a
36.50 -warning, breaking builds of glibc on m68k-linux. Earlier in
36.51 -read_a_source_file where #APP is handled there is another comment that
36.52 -claims that unknown comments are ignored, when in fact they aren't (only
36.53 -the initial line comment character is skipped).
36.54 -
36.55 -Note that the presence of #APP will mess up the line counters, but
36.56 -that appears to be difficult to fix.
36.57 -
36.58 -Andreas.
36.59 -
36.60 -2004-04-23 Andreas Schwab <schwab@suse.de>
36.61 -
36.62 - * read.c (read_a_source_file): Ignore unknown text after line
36.63 - comment character. Fix misleading comment.
36.64 -
36.65 ---- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
36.66 -+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
36.67 -@@ -950,10 +950,14 @@ read_a_source_file (char *name)
36.68 - unsigned int new_length;
36.69 - char *tmp_buf = 0;
36.70 -
36.71 -- bump_line_counters ();
36.72 - s = input_line_pointer;
36.73 - if (strncmp (s, "APP\n", 4))
36.74 -- continue; /* We ignore it */
36.75 -+ {
36.76 -+ /* We ignore it */
36.77 -+ ignore_rest_of_line ();
36.78 -+ continue;
36.79 -+ }
36.80 -+ bump_line_counters ();
36.81 - s += 4;
36.82 -
36.83 - sb_new (&sbuf);
36.84 -@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
36.85 - continue;
36.86 - #endif
36.87 - input_line_pointer--;
36.88 -- /* Report unknown char as ignored. */
36.89 -+ /* Report unknown char as error. */
36.90 - demand_empty_rest_of_line ();
36.91 - }
36.92 -
36.93 -
36.94 ---
36.95 -Andreas Schwab, SuSE Labs, schwab@suse.de
36.96 -SuSE Linux AG, MaxfeldstraÃe 5, 90409 NÃrnberg, Germany
36.97 -Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
36.98 -"And now for something completely different."
37.1 --- a/patches/binutils/2.16.1/callahan.patch Sat Sep 22 17:25:42 2007 +0000
37.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
37.3 @@ -1,693 +0,0 @@
37.4 -Signed-off-by: dank@kegel.com
37.5 -Fixes ld speed issue.
37.6 -See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
37.7 -See thread "Re: optimizations for 3x speedup in ld",
37.8 -http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
37.9 -
37.10 -Wildcard section matching enhancement, backported from the binutils CVS tree.
37.11 -Here's the CVS log comment from the original change to ldlang.c:
37.12 -
37.13 -revision 1.177
37.14 -date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
37.15 -2005-04-06 Jakub Jelinek <jakub@redhat.com>
37.16 -
37.17 - * ldlang.c: Formatting.
37.18 - (walk_wild_consider_section): Remember return value from wildcardp.
37.19 - (is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
37.20 - (wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
37.21 -
37.22 -2005-04-06 Robert O'Callahan <rocallahan@novell.com>
37.23 -
37.24 - * ld.h (lean_section_userdata_type): Remove.
37.25 - (fat_section_userdata_type): Remove file field.
37.26 - (SECTION_USERDATA_SIZE): Remove.
37.27 - * ldlang.c (init_os): Eliminate initialization of unused
37.28 - lean_section_userdata_type.
37.29 -
37.30 - * ldlang.h (callback_t, walk_wild_section_handler_t): New
37.31 - typedefs.
37.32 - (struct lang_wild_statement_struct): Add walk_wild_section_handler
37.33 - and handler_data fields.
37.34 - * ldlang.c (callback_t): Removed.
37.35 - (walk_wild_consider_section, walk_wild_section_general,
37.36 - section_iterator_callback, find_section, is_simple_wild,
37.37 - match_simple_wild, walk_wild_section_specs1_wild0,
37.38 - walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
37.39 - walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
37.40 - wild_spec_can_overlap, analyze_walk_wild_section_handler): New
37.41 - functions.
37.42 - (lang_add_wild): Call analyze_walk_wild_section_handler.
37.43 - (walk_wild_section): Renamed to walk_wild_section_general and
37.44 - created a wrapper function.
37.45 - (section_iterator_callback_data): New typedef.
37.46 -
37.47 -
37.48 -Index: src/ld/ld.h
37.49 -===================================================================
37.50 -RCS file: /cvs/src/src/ld/ld.h,v
37.51 -retrieving revision 1.26
37.52 -retrieving revision 1.27
37.53 -diff -u -r1.26 -r1.27
37.54 ---- binutils/ld/ld.h.old 16 Mar 2005 21:52:42 -0000 1.26
37.55 -+++ binutils/ld/ld.h 6 Apr 2005 15:33:02 -0000 1.27
37.56 -@@ -1,6 +1,6 @@
37.57 - /* ld.h -- general linker header file
37.58 - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
37.59 -- 2001, 2002, 2003, 2004
37.60 -+ 2001, 2002, 2003, 2004, 2005
37.61 - Free Software Foundation, Inc.
37.62 -
37.63 - This file is part of GLD, the Gnu Linker.
37.64 -@@ -89,28 +89,15 @@
37.65 - struct map_symbol_def *next;
37.66 - };
37.67 -
37.68 --/* Extra information we hold on sections */
37.69 --typedef struct lean_user_section_struct {
37.70 -- /* For output sections: pointer to the section where this data will go. */
37.71 -- struct lang_input_statement_struct *file;
37.72 --} lean_section_userdata_type;
37.73 --
37.74 - /* The initial part of fat_user_section_struct has to be idential with
37.75 - lean_user_section_struct. */
37.76 - typedef struct fat_user_section_struct {
37.77 -- /* For output sections: pointer to the section where this data will go. */
37.78 -- struct lang_input_statement_struct *file;
37.79 - /* For input sections, when writing a map file: head / tail of a linked
37.80 - list of hash table entries for symbols defined in this section. */
37.81 - struct map_symbol_def *map_symbol_def_head;
37.82 - struct map_symbol_def **map_symbol_def_tail;
37.83 - } fat_section_userdata_type;
37.84 -
37.85 --#define SECTION_USERDATA_SIZE \
37.86 -- (command_line.reduce_memory_overheads \
37.87 -- ? sizeof (lean_section_userdata_type) \
37.88 -- : sizeof (fat_section_userdata_type))
37.89 --
37.90 - #define get_userdata(x) ((x)->userdata)
37.91 -
37.92 - #define BYTE_SIZE (1)
37.93 -Index: src/ld/ldlang.c
37.94 -===================================================================
37.95 -RCS file: /cvs/src/src/ld/ldlang.c,v
37.96 -retrieving revision 1.176
37.97 -retrieving revision 1.177
37.98 -diff -u -r1.176 -r1.177
37.99 ---- binutils/ld/ldlang.c.old 18 Mar 2005 13:56:26 -0000 1.176
37.100 -+++ binutils/ld/ldlang.c 6 Apr 2005 15:33:02 -0000 1.177
37.101 -@@ -84,9 +84,6 @@
37.102 - static void lang_record_phdrs (void);
37.103 - static void lang_do_version_exports_section (void);
37.104 -
37.105 --typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
37.106 -- asection *, lang_input_statement_type *, void *);
37.107 --
37.108 - /* Exported variables. */
37.109 - lang_output_section_statement_type *abs_output_section;
37.110 - lang_statement_list_type lang_output_section_statement;
37.111 -@@ -155,21 +152,71 @@
37.112 -
37.113 - /* Generic traversal routines for finding matching sections. */
37.114 -
37.115 -+/* Try processing a section against a wildcard. This just calls
37.116 -+ the callback unless the filename exclusion list is present
37.117 -+ and excludes the file. It's hardly ever present so this
37.118 -+ function is very fast. */
37.119 -+
37.120 -+static void
37.121 -+walk_wild_consider_section (lang_wild_statement_type *ptr,
37.122 -+ lang_input_statement_type *file,
37.123 -+ asection *s,
37.124 -+ struct wildcard_list *sec,
37.125 -+ callback_t callback,
37.126 -+ void *data)
37.127 -+{
37.128 -+ bfd_boolean skip = FALSE;
37.129 -+ struct name_list *list_tmp;
37.130 -+
37.131 -+ /* Don't process sections from files which were
37.132 -+ excluded. */
37.133 -+ for (list_tmp = sec->spec.exclude_name_list;
37.134 -+ list_tmp;
37.135 -+ list_tmp = list_tmp->next)
37.136 -+ {
37.137 -+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
37.138 -+ if (is_wildcard)
37.139 -+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
37.140 -+ else
37.141 -+ skip = strcmp (list_tmp->name, file->filename) == 0;
37.142 -+
37.143 -+ /* If this file is part of an archive, and the archive is
37.144 -+ excluded, exclude this file. */
37.145 -+ if (! skip && file->the_bfd != NULL
37.146 -+ && file->the_bfd->my_archive != NULL
37.147 -+ && file->the_bfd->my_archive->filename != NULL)
37.148 -+ {
37.149 -+ if (is_wildcard)
37.150 -+ skip = fnmatch (list_tmp->name,
37.151 -+ file->the_bfd->my_archive->filename,
37.152 -+ 0) == 0;
37.153 -+ else
37.154 -+ skip = strcmp (list_tmp->name,
37.155 -+ file->the_bfd->my_archive->filename) == 0;
37.156 -+ }
37.157 -+
37.158 -+ if (skip)
37.159 -+ break;
37.160 -+ }
37.161 -+
37.162 -+ if (!skip)
37.163 -+ (*callback) (ptr, sec, s, file, data);
37.164 -+}
37.165 -+
37.166 -+/* Lowest common denominator routine that can handle everything correctly,
37.167 -+ but slowly. */
37.168 -+
37.169 - static void
37.170 --walk_wild_section (lang_wild_statement_type *ptr,
37.171 -- lang_input_statement_type *file,
37.172 -- callback_t callback,
37.173 -- void *data)
37.174 -+walk_wild_section_general (lang_wild_statement_type *ptr,
37.175 -+ lang_input_statement_type *file,
37.176 -+ callback_t callback,
37.177 -+ void *data)
37.178 - {
37.179 - asection *s;
37.180 --
37.181 -- if (file->just_syms_flag)
37.182 -- return;
37.183 -+ struct wildcard_list *sec;
37.184 -
37.185 - for (s = file->the_bfd->sections; s != NULL; s = s->next)
37.186 - {
37.187 -- struct wildcard_list *sec;
37.188 --
37.189 - sec = ptr->section_list;
37.190 - if (sec == NULL)
37.191 - (*callback) (ptr, sec, s, file, data);
37.192 -@@ -177,39 +224,8 @@
37.193 - while (sec != NULL)
37.194 - {
37.195 - bfd_boolean skip = FALSE;
37.196 -- struct name_list *list_tmp;
37.197 -
37.198 -- /* Don't process sections from files which were
37.199 -- excluded. */
37.200 -- for (list_tmp = sec->spec.exclude_name_list;
37.201 -- list_tmp;
37.202 -- list_tmp = list_tmp->next)
37.203 -- {
37.204 -- if (wildcardp (list_tmp->name))
37.205 -- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
37.206 -- else
37.207 -- skip = strcmp (list_tmp->name, file->filename) == 0;
37.208 --
37.209 -- /* If this file is part of an archive, and the archive is
37.210 -- excluded, exclude this file. */
37.211 -- if (! skip && file->the_bfd != NULL
37.212 -- && file->the_bfd->my_archive != NULL
37.213 -- && file->the_bfd->my_archive->filename != NULL)
37.214 -- {
37.215 -- if (wildcardp (list_tmp->name))
37.216 -- skip = fnmatch (list_tmp->name,
37.217 -- file->the_bfd->my_archive->filename,
37.218 -- 0) == 0;
37.219 -- else
37.220 -- skip = strcmp (list_tmp->name,
37.221 -- file->the_bfd->my_archive->filename) == 0;
37.222 -- }
37.223 --
37.224 -- if (skip)
37.225 -- break;
37.226 -- }
37.227 --
37.228 -- if (!skip && sec->spec.name != NULL)
37.229 -+ if (sec->spec.name != NULL)
37.230 - {
37.231 - const char *sname = bfd_get_section_name (file->the_bfd, s);
37.232 -
37.233 -@@ -220,13 +236,381 @@
37.234 - }
37.235 -
37.236 - if (!skip)
37.237 -- (*callback) (ptr, sec, s, file, data);
37.238 -+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
37.239 -
37.240 - sec = sec->next;
37.241 - }
37.242 - }
37.243 - }
37.244 -
37.245 -+/* Routines to find a single section given its name. If there's more
37.246 -+ than one section with that name, we report that. */
37.247 -+
37.248 -+typedef struct
37.249 -+{
37.250 -+ asection *found_section;
37.251 -+ bfd_boolean multiple_sections_found;
37.252 -+} section_iterator_callback_data;
37.253 -+
37.254 -+static bfd_boolean
37.255 -+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
37.256 -+{
37.257 -+ section_iterator_callback_data *d = data;
37.258 -+
37.259 -+ if (d->found_section != NULL)
37.260 -+ {
37.261 -+ d->multiple_sections_found = TRUE;
37.262 -+ return TRUE;
37.263 -+ }
37.264 -+
37.265 -+ d->found_section = s;
37.266 -+ return FALSE;
37.267 -+}
37.268 -+
37.269 -+static asection *
37.270 -+find_section (lang_input_statement_type *file,
37.271 -+ struct wildcard_list *sec,
37.272 -+ bfd_boolean *multiple_sections_found)
37.273 -+{
37.274 -+ section_iterator_callback_data cb_data = { NULL, FALSE };
37.275 -+
37.276 -+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
37.277 -+ section_iterator_callback, &cb_data);
37.278 -+ *multiple_sections_found = cb_data.multiple_sections_found;
37.279 -+ return cb_data.found_section;
37.280 -+}
37.281 -+
37.282 -+/* Code for handling simple wildcards without going through fnmatch,
37.283 -+ which can be expensive because of charset translations etc. */
37.284 -+
37.285 -+/* A simple wild is a literal string followed by a single '*',
37.286 -+ where the literal part is at least 4 characters long. */
37.287 -+
37.288 -+static bfd_boolean
37.289 -+is_simple_wild (const char *name)
37.290 -+{
37.291 -+ size_t len = strcspn (name, "*?[");
37.292 -+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
37.293 -+}
37.294 -+
37.295 -+static bfd_boolean
37.296 -+match_simple_wild (const char *pattern, const char *name)
37.297 -+{
37.298 -+ /* The first four characters of the pattern are guaranteed valid
37.299 -+ non-wildcard characters. So we can go faster. */
37.300 -+ if (pattern[0] != name[0] || pattern[1] != name[1]
37.301 -+ || pattern[2] != name[2] || pattern[3] != name[3])
37.302 -+ return FALSE;
37.303 -+
37.304 -+ pattern += 4;
37.305 -+ name += 4;
37.306 -+ while (*pattern != '*')
37.307 -+ if (*name++ != *pattern++)
37.308 -+ return FALSE;
37.309 -+
37.310 -+ return TRUE;
37.311 -+}
37.312 -+
37.313 -+/* Specialized, optimized routines for handling different kinds of
37.314 -+ wildcards */
37.315 -+
37.316 -+static void
37.317 -+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
37.318 -+ lang_input_statement_type *file,
37.319 -+ callback_t callback,
37.320 -+ void *data)
37.321 -+{
37.322 -+ /* We can just do a hash lookup for the section with the right name.
37.323 -+ But if that lookup discovers more than one section with the name
37.324 -+ (should be rare), we fall back to the general algorithm because
37.325 -+ we would otherwise have to sort the sections to make sure they
37.326 -+ get processed in the bfd's order. */
37.327 -+ bfd_boolean multiple_sections_found;
37.328 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
37.329 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
37.330 -+
37.331 -+ if (multiple_sections_found)
37.332 -+ walk_wild_section_general (ptr, file, callback, data);
37.333 -+ else if (s0)
37.334 -+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
37.335 -+}
37.336 -+
37.337 -+static void
37.338 -+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
37.339 -+ lang_input_statement_type *file,
37.340 -+ callback_t callback,
37.341 -+ void *data)
37.342 -+{
37.343 -+ asection *s;
37.344 -+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
37.345 -+
37.346 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
37.347 -+ {
37.348 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
37.349 -+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
37.350 -+
37.351 -+ if (!skip)
37.352 -+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
37.353 -+ }
37.354 -+}
37.355 -+
37.356 -+static void
37.357 -+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
37.358 -+ lang_input_statement_type *file,
37.359 -+ callback_t callback,
37.360 -+ void *data)
37.361 -+{
37.362 -+ asection *s;
37.363 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
37.364 -+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
37.365 -+ bfd_boolean multiple_sections_found;
37.366 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
37.367 -+
37.368 -+ if (multiple_sections_found)
37.369 -+ {
37.370 -+ walk_wild_section_general (ptr, file, callback, data);
37.371 -+ return;
37.372 -+ }
37.373 -+
37.374 -+ /* Note that if the section was not found, s0 is NULL and
37.375 -+ we'll simply never succeed the s == s0 test below. */
37.376 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
37.377 -+ {
37.378 -+ /* Recall that in this code path, a section cannot satisfy more
37.379 -+ than one spec, so if s == s0 then it cannot match
37.380 -+ wildspec1. */
37.381 -+ if (s == s0)
37.382 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
37.383 -+ else
37.384 -+ {
37.385 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
37.386 -+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
37.387 -+
37.388 -+ if (!skip)
37.389 -+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
37.390 -+ data);
37.391 -+ }
37.392 -+ }
37.393 -+}
37.394 -+
37.395 -+static void
37.396 -+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
37.397 -+ lang_input_statement_type *file,
37.398 -+ callback_t callback,
37.399 -+ void *data)
37.400 -+{
37.401 -+ asection *s;
37.402 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
37.403 -+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
37.404 -+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
37.405 -+ bfd_boolean multiple_sections_found;
37.406 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
37.407 -+
37.408 -+ if (multiple_sections_found)
37.409 -+ {
37.410 -+ walk_wild_section_general (ptr, file, callback, data);
37.411 -+ return;
37.412 -+ }
37.413 -+
37.414 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
37.415 -+ {
37.416 -+ if (s == s0)
37.417 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
37.418 -+ else
37.419 -+ {
37.420 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
37.421 -+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
37.422 -+
37.423 -+ if (!skip)
37.424 -+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
37.425 -+ else
37.426 -+ {
37.427 -+ skip = !match_simple_wild (wildsec2->spec.name, sname);
37.428 -+ if (!skip)
37.429 -+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
37.430 -+ data);
37.431 -+ }
37.432 -+ }
37.433 -+ }
37.434 -+}
37.435 -+
37.436 -+static void
37.437 -+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
37.438 -+ lang_input_statement_type *file,
37.439 -+ callback_t callback,
37.440 -+ void *data)
37.441 -+{
37.442 -+ asection *s;
37.443 -+ struct wildcard_list *sec0 = ptr->handler_data[0];
37.444 -+ struct wildcard_list *sec1 = ptr->handler_data[1];
37.445 -+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
37.446 -+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
37.447 -+ bfd_boolean multiple_sections_found;
37.448 -+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
37.449 -+
37.450 -+ if (multiple_sections_found)
37.451 -+ {
37.452 -+ walk_wild_section_general (ptr, file, callback, data);
37.453 -+ return;
37.454 -+ }
37.455 -+
37.456 -+ s1 = find_section (file, sec1, &multiple_sections_found);
37.457 -+ if (multiple_sections_found)
37.458 -+ {
37.459 -+ walk_wild_section_general (ptr, file, callback, data);
37.460 -+ return;
37.461 -+ }
37.462 -+
37.463 -+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
37.464 -+ {
37.465 -+ if (s == s0)
37.466 -+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
37.467 -+ else
37.468 -+ if (s == s1)
37.469 -+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
37.470 -+ else
37.471 -+ {
37.472 -+ const char *sname = bfd_get_section_name (file->the_bfd, s);
37.473 -+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
37.474 -+ sname);
37.475 -+
37.476 -+ if (!skip)
37.477 -+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
37.478 -+ data);
37.479 -+ else
37.480 -+ {
37.481 -+ skip = !match_simple_wild (wildsec3->spec.name, sname);
37.482 -+ if (!skip)
37.483 -+ walk_wild_consider_section (ptr, file, s, wildsec3,
37.484 -+ callback, data);
37.485 -+ }
37.486 -+ }
37.487 -+ }
37.488 -+}
37.489 -+
37.490 -+static void
37.491 -+walk_wild_section (lang_wild_statement_type *ptr,
37.492 -+ lang_input_statement_type *file,
37.493 -+ callback_t callback,
37.494 -+ void *data)
37.495 -+{
37.496 -+ if (file->just_syms_flag)
37.497 -+ return;
37.498 -+
37.499 -+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
37.500 -+}
37.501 -+
37.502 -+/* Returns TRUE when name1 is a wildcard spec that might match
37.503 -+ something name2 can match. We're conservative: we return FALSE
37.504 -+ only if the prefixes of name1 and name2 are different up to the
37.505 -+ first wildcard character. */
37.506 -+
37.507 -+static bfd_boolean
37.508 -+wild_spec_can_overlap (const char *name1, const char *name2)
37.509 -+{
37.510 -+ size_t prefix1_len = strcspn (name1, "?*[");
37.511 -+ size_t prefix2_len = strcspn (name2, "?*[");
37.512 -+ size_t min_prefix_len;
37.513 -+
37.514 -+ /* Note that if there is no wildcard character, then we treat the
37.515 -+ terminating 0 as part of the prefix. Thus ".text" won't match
37.516 -+ ".text." or ".text.*", for example. */
37.517 -+ if (name1[prefix1_len] == '\0')
37.518 -+ prefix1_len++;
37.519 -+ if (name2[prefix2_len] == '\0')
37.520 -+ prefix2_len++;
37.521 -+
37.522 -+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
37.523 -+
37.524 -+ return memcmp (name1, name2, min_prefix_len) == 0;
37.525 -+}
37.526 -+
37.527 -+/* Select specialized code to handle various kinds of wildcard
37.528 -+ statements. */
37.529 -+
37.530 -+static void
37.531 -+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
37.532 -+{
37.533 -+ int sec_count = 0;
37.534 -+ int wild_name_count = 0;
37.535 -+ struct wildcard_list *sec;
37.536 -+ int signature;
37.537 -+ int data_counter;
37.538 -+
37.539 -+ ptr->walk_wild_section_handler = walk_wild_section_general;
37.540 -+
37.541 -+ /* Count how many wildcard_specs there are, and how many of those
37.542 -+ actually use wildcards in the name. Also, bail out if any of the
37.543 -+ wildcard names are NULL. (Can this actually happen?
37.544 -+ walk_wild_section used to test for it.) And bail out if any
37.545 -+ of the wildcards are more complex than a simple string
37.546 -+ ending in a single '*'. */
37.547 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
37.548 -+ {
37.549 -+ ++sec_count;
37.550 -+ if (sec->spec.name == NULL)
37.551 -+ return;
37.552 -+ if (wildcardp (sec->spec.name))
37.553 -+ {
37.554 -+ ++wild_name_count;
37.555 -+ if (!is_simple_wild (sec->spec.name))
37.556 -+ return;
37.557 -+ }
37.558 -+ }
37.559 -+
37.560 -+ /* The zero-spec case would be easy to optimize but it doesn't
37.561 -+ happen in practice. Likewise, more than 4 specs doesn't
37.562 -+ happen in practice. */
37.563 -+ if (sec_count == 0 || sec_count > 4)
37.564 -+ return;
37.565 -+
37.566 -+ /* Check that no two specs can match the same section. */
37.567 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
37.568 -+ {
37.569 -+ struct wildcard_list *sec2;
37.570 -+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
37.571 -+ {
37.572 -+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
37.573 -+ return;
37.574 -+ }
37.575 -+ }
37.576 -+
37.577 -+ signature = (sec_count << 8) + wild_name_count;
37.578 -+ switch (signature)
37.579 -+ {
37.580 -+ case 0x0100:
37.581 -+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
37.582 -+ break;
37.583 -+ case 0x0101:
37.584 -+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
37.585 -+ break;
37.586 -+ case 0x0201:
37.587 -+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
37.588 -+ break;
37.589 -+ case 0x0302:
37.590 -+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
37.591 -+ break;
37.592 -+ case 0x0402:
37.593 -+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
37.594 -+ break;
37.595 -+ default:
37.596 -+ return;
37.597 -+ }
37.598 -+
37.599 -+ /* Now fill the data array with pointers to the specs, first the
37.600 -+ specs with non-wildcard names, then the specs with wildcard
37.601 -+ names. It's OK to process the specs in different order from the
37.602 -+ given order, because we've already determined that no section
37.603 -+ will match more than one spec. */
37.604 -+ data_counter = 0;
37.605 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
37.606 -+ if (!wildcardp (sec->spec.name))
37.607 -+ ptr->handler_data[data_counter++] = sec;
37.608 -+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
37.609 -+ if (wildcardp (sec->spec.name))
37.610 -+ ptr->handler_data[data_counter++] = sec;
37.611 -+}
37.612 -+
37.613 - /* Handle a wild statement for a single file F. */
37.614 -
37.615 - static void
37.616 -@@ -1175,17 +1559,12 @@
37.617 - static void
37.618 - init_os (lang_output_section_statement_type *s)
37.619 - {
37.620 -- lean_section_userdata_type *new;
37.621 --
37.622 - if (s->bfd_section != NULL)
37.623 - return;
37.624 -
37.625 - if (strcmp (s->name, DISCARD_SECTION_NAME) == 0)
37.626 - einfo (_("%P%F: Illegal use of `%s' section\n"), DISCARD_SECTION_NAME);
37.627 -
37.628 -- new = stat_alloc (SECTION_USERDATA_SIZE);
37.629 -- memset (new, 0, SECTION_USERDATA_SIZE);
37.630 --
37.631 - s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
37.632 - if (s->bfd_section == NULL)
37.633 - s->bfd_section = bfd_make_section (output_bfd, s->name);
37.634 -@@ -1199,7 +1578,14 @@
37.635 - /* We initialize an output sections output offset to minus its own
37.636 - vma to allow us to output a section through itself. */
37.637 - s->bfd_section->output_offset = 0;
37.638 -- get_userdata (s->bfd_section) = new;
37.639 -+ if (!command_line.reduce_memory_overheads)
37.640 -+ {
37.641 -+ fat_section_userdata_type *new
37.642 -+ = stat_alloc (sizeof (fat_section_userdata_type));
37.643 -+ memset (new, 0, sizeof (fat_section_userdata_type));
37.644 -+ get_userdata (s->bfd_section) = new;
37.645 -+ }
37.646 -+
37.647 -
37.648 - /* If there is a base address, make sure that any sections it might
37.649 - mention are initialized. */
37.650 -@@ -4939,6 +5325,7 @@
37.651 - new->section_list = section_list;
37.652 - new->keep_sections = keep_sections;
37.653 - lang_list_init (&new->children);
37.654 -+ analyze_walk_wild_section_handler (new);
37.655 - }
37.656 -
37.657 - void
37.658 -Index: src/ld/ldlang.h
37.659 -===================================================================
37.660 -RCS file: /cvs/src/src/ld/ldlang.h,v
37.661 -retrieving revision 1.44
37.662 -retrieving revision 1.45
37.663 -diff -u -r1.44 -r1.45
37.664 ---- binutils/ld/ldlang.h.old 3 Mar 2005 11:51:58 -0000 1.44
37.665 -+++ binutils/ld/ldlang.h 6 Apr 2005 15:33:03 -0000 1.45
37.666 -@@ -298,7 +298,17 @@
37.667 - union lang_statement_union *file;
37.668 - } lang_afile_asection_pair_statement_type;
37.669 -
37.670 --typedef struct lang_wild_statement_struct
37.671 -+typedef struct lang_wild_statement_struct lang_wild_statement_type;
37.672 -+
37.673 -+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
37.674 -+ asection *, lang_input_statement_type *, void *);
37.675 -+
37.676 -+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
37.677 -+ lang_input_statement_type *,
37.678 -+ callback_t callback,
37.679 -+ void *data);
37.680 -+
37.681 -+struct lang_wild_statement_struct
37.682 - {
37.683 - lang_statement_header_type header;
37.684 - const char *filename;
37.685 -@@ -306,7 +316,10 @@
37.686 - struct wildcard_list *section_list;
37.687 - bfd_boolean keep_sections;
37.688 - lang_statement_list_type children;
37.689 --} lang_wild_statement_type;
37.690 -+
37.691 -+ walk_wild_section_handler_t walk_wild_section_handler;
37.692 -+ struct wildcard_list *handler_data[4];
37.693 -+};
37.694 -
37.695 - typedef struct lang_address_statement_struct
37.696 - {
38.1 --- a/patches/binutils/2.16.1/cross-gprof.patch Sat Sep 22 17:25:42 2007 +0000
38.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
38.3 @@ -1,22 +0,0 @@
38.4 ---- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
38.5 -+++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
38.6 -@@ -999,7 +999,7 @@
38.7 -
38.8 - # Some tools are only suitable for building in a "native" situation.
38.9 - # Remove these if host!=target.
38.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"
38.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"
38.12 -
38.13 - # Similarly, some are only suitable for cross toolchains.
38.14 - # Remove these if host=target.
38.15 ---- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
38.16 -+++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
38.17 -@@ -236,7 +236,7 @@
38.18 -
38.19 - # Some tools are only suitable for building in a "native" situation.
38.20 - # Remove these if host!=target.
38.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"
38.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"
38.23 -
38.24 - # Similarly, some are only suitable for cross toolchains.
38.25 - # Remove these if host=target.
39.1 --- a/patches/binutils/2.16.1/stabs-tweak.patch Sat Sep 22 17:25:42 2007 +0000
39.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
39.3 @@ -1,28 +0,0 @@
39.4 -Signed-off-by: dank@kegel.com
39.5 -
39.6 -See http://sourceware.org/ml/binutils/2005-12/msg00270.html
39.7 -http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
39.8 -
39.9 -STABS hash table size change, backported from the binutils CVS tree. Here's
39.10 -the CVS log comment for the original change:
39.11 -
39.12 -revision 1.25
39.13 -date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
39.14 -(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
39.15 -bfd_hash_table_init_n(...,251) so that the size of the hash table can be
39.16 -controlled by the user.
39.17 -
39.18 ---- binutils/bfd/stabs.c.old 4 May 2005 15:53:39 -0000 1.24
39.19 -+++ binutils/bfd/stabs.c 29 Dec 2005 10:29:23 -0000 1.25
39.20 -@@ -194,9 +194,8 @@
39.21 - goto error_return;
39.22 - /* Make sure the first byte is zero. */
39.23 - (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
39.24 -- if (! bfd_hash_table_init_n (&sinfo->includes,
39.25 -- stab_link_includes_newfunc,
39.26 -- 251))
39.27 -+ if (! bfd_hash_table_init (&sinfo->includes,
39.28 -+ stab_link_includes_newfunc))
39.29 - goto error_return;
39.30 - sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
39.31 - if (sinfo->stabstr == NULL)
40.1 --- a/patches/binutils/2.17.50.0.10/100-uclibc-conf.patch Sat Sep 22 17:25:42 2007 +0000
40.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
40.3 @@ -1,139 +0,0 @@
40.4 ---- binutils-2.16.91.0.7/bfd/configure
40.5 -+++ binutils-2.16.91.0.7/bfd/configure
40.6 -@@ -3576,7 +3576,7 @@
40.7 - ;;
40.8 -
40.9 - # This must be Linux ELF.
40.10 --linux-gnu*)
40.11 -+linux-gnu*|linux-uclibc*)
40.12 - lt_cv_deplibs_check_method=pass_all
40.13 - ;;
40.14 -
40.15 ---- binutils-2.16.91.0.7/binutils/configure
40.16 -+++ binutils-2.16.91.0.7/binutils/configure
40.17 -@@ -3411,7 +3411,7 @@
40.18 - ;;
40.19 -
40.20 - # This must be Linux ELF.
40.21 --linux-gnu*)
40.22 -+linux-gnu*|linux-uclibc*)
40.23 - lt_cv_deplibs_check_method=pass_all
40.24 - ;;
40.25 -
40.26 ---- binutils-2.16.91.0.7/configure
40.27 -+++ binutils-2.16.91.0.7/configure
40.28 -@@ -1270,7 +1270,7 @@
40.29 - am33_2.0-*-linux*)
40.30 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
40.31 - ;;
40.32 -- sh-*-linux*)
40.33 -+ sh*-*-linux*)
40.34 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
40.35 - ;;
40.36 - sh*-*-pe|mips*-*-pe|*arm-wince-pe)
40.37 -@@ -1578,7 +1578,7 @@
40.38 - romp-*-*)
40.39 - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
40.40 - ;;
40.41 -- sh-*-* | sh64-*-*)
40.42 -+ sh*-*-* | sh64-*-*)
40.43 - case "${host}" in
40.44 - i[3456789]86-*-vsta) ;; # don't add gprof back in
40.45 - i[3456789]86-*-go32*) ;; # don't add gprof back in
40.46 ---- binutils-2.16.91.0.7/configure.in
40.47 -+++ binutils-2.16.91.0.7/configure.in
40.48 -@@ -468,7 +468,7 @@
40.49 - am33_2.0-*-linux*)
40.50 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
40.51 - ;;
40.52 -- sh-*-linux*)
40.53 -+ sh*-*-linux*)
40.54 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
40.55 - ;;
40.56 - sh*-*-pe|mips*-*-pe|*arm-wince-pe)
40.57 -@@ -776,7 +776,7 @@
40.58 - romp-*-*)
40.59 - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
40.60 - ;;
40.61 -- sh-*-* | sh64-*-*)
40.62 -+ sh*-*-* | sh64-*-*)
40.63 - case "${host}" in
40.64 - i[[3456789]]86-*-vsta) ;; # don't add gprof back in
40.65 - i[[3456789]]86-*-go32*) ;; # don't add gprof back in
40.66 ---- binutils-2.16.91.0.7/gas/configure
40.67 -+++ binutils-2.16.91.0.7/gas/configure
40.68 -@@ -3411,7 +3411,7 @@
40.69 - ;;
40.70 -
40.71 - # This must be Linux ELF.
40.72 --linux-gnu*)
40.73 -+linux-gnu*|linux-uclibc*)
40.74 - lt_cv_deplibs_check_method=pass_all
40.75 - ;;
40.76 -
40.77 ---- binutils-2.16.91.0.7/gprof/configure
40.78 -+++ binutils-2.16.91.0.7/gprof/configure
40.79 -@@ -3419,6 +3419,11 @@
40.80 - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
40.81 - ;;
40.82 -
40.83 -+linux-uclibc*)
40.84 -+ lt_cv_deplibs_check_method=pass_all
40.85 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
40.86 -+ ;;
40.87 -+
40.88 - netbsd* | knetbsd*-gnu)
40.89 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
40.90 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
40.91 ---- binutils-2.16.91.0.7/ld/configure
40.92 -+++ binutils-2.16.91.0.7/ld/configure
40.93 -@@ -3413,7 +3413,7 @@
40.94 - ;;
40.95 -
40.96 - # This must be Linux ELF.
40.97 --linux-gnu*)
40.98 -+linux-gnu*|linux-uclibc*)
40.99 - lt_cv_deplibs_check_method=pass_all
40.100 - ;;
40.101 -
40.102 ---- binutils-2.16.91.0.7/libtool.m4
40.103 -+++ binutils-2.16.91.0.7/libtool.m4
40.104 -@@ -739,7 +739,7 @@
40.105 - ;;
40.106 -
40.107 - # This must be Linux ELF.
40.108 --linux-gnu*)
40.109 -+linux-gnu*|linux-uclibc*)
40.110 - lt_cv_deplibs_check_method=pass_all
40.111 - ;;
40.112 -
40.113 ---- binutils-2.16.91.0.7/ltconfig
40.114 -+++ binutils-2.16.91.0.7/ltconfig
40.115 -@@ -602,6 +602,7 @@
40.116 -
40.117 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
40.118 - case $host_os in
40.119 -+linux-uclibc*) ;;
40.120 - linux-gnu*) ;;
40.121 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
40.122 - esac
40.123 -@@ -1247,7 +1248,7 @@
40.124 - ;;
40.125 -
40.126 - # This must be Linux ELF.
40.127 --linux-gnu*)
40.128 -+linux-gnu*|linux-uclibc*)
40.129 - version_type=linux
40.130 - need_lib_prefix=no
40.131 - need_version=no
40.132 ---- binutils-2.16.91.0.7/opcodes/configure
40.133 -+++ binutils-2.16.91.0.7/opcodes/configure
40.134 -@@ -3579,7 +3579,7 @@
40.135 - ;;
40.136 -
40.137 - # This must be Linux ELF.
40.138 --linux-gnu*)
40.139 -+linux-gnu*|linux-uclibc*)
40.140 - lt_cv_deplibs_check_method=pass_all
40.141 - ;;
40.142 -
41.1 --- a/patches/binutils/2.17.50.0.10/110-arm-eabi-conf.patch Sat Sep 22 17:25:42 2007 +0000
41.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
41.3 @@ -1,24 +0,0 @@
41.4 -diff -urN binutils-2.16.91.0.7.orig/configure binutils-2.16.91.0.7/configure
41.5 ---- binutils-2.16.91.0.7.orig/configure 2006-05-31 14:54:24.000000000 +0300
41.6 -+++ binutils-2.16.91.0.7/configure 2006-05-31 14:55:53.000000000 +0300
41.7 -@@ -1299,7 +1299,7 @@
41.8 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
41.9 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
41.10 - ;;
41.11 -- arm*-*-linux-gnueabi)
41.12 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
41.13 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
41.14 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
41.15 - ;;
41.16 -diff -urN binutils-2.16.91.0.7.orig/configure.in binutils-2.16.91.0.7/configure.in
41.17 ---- binutils-2.16.91.0.7.orig/configure.in 2006-05-31 14:54:24.000000000 +0300
41.18 -+++ binutils-2.16.91.0.7/configure.in 2006-05-31 14:55:53.000000000 +0300
41.19 -@@ -497,7 +497,7 @@
41.20 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
41.21 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
41.22 - ;;
41.23 -- arm*-*-linux-gnueabi)
41.24 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
41.25 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
41.26 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
41.27 - ;;
42.1 --- a/patches/binutils/2.17.50.0.10/300-001_ld_makefile_patch.patch Sat Sep 22 17:25:42 2007 +0000
42.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
42.3 @@ -1,50 +0,0 @@
42.4 -#!/bin/sh -e
42.5 -## 001_ld_makefile_patch.dpatch
42.6 -##
42.7 -## All lines beginning with `## DP:' are a description of the patch.
42.8 -## DP: Description: correct where ld scripts are installed
42.9 -## DP: Author: Chris Chimelis <chris@debian.org>
42.10 -## DP: Upstream status: N/A
42.11 -## DP: Date: ??
42.12 -
42.13 -if [ $# -ne 1 ]; then
42.14 - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
42.15 - exit 1
42.16 -fi
42.17 -
42.18 -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
42.19 -patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
42.20 -
42.21 -case "$1" in
42.22 - -patch) patch $patch_opts -p1 < $0;;
42.23 - -unpatch) patch $patch_opts -p1 -R < $0;;
42.24 - *)
42.25 - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
42.26 - exit 1;;
42.27 -esac
42.28 -
42.29 -exit 0
42.30 -
42.31 -@DPATCH@
42.32 ---- binutils-2.16.91.0.1/ld/Makefile.am
42.33 -+++ binutils-2.16.91.0.1/ld/Makefile.am
42.34 -@@ -20,7 +20,7 @@
42.35 - # We put the scripts in the directory $(scriptdir)/ldscripts.
42.36 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
42.37 - # directives need to be different for native and cross linkers.
42.38 --scriptdir = $(tooldir)/lib
42.39 -+scriptdir = $(libdir)
42.40 -
42.41 - EMUL = @EMUL@
42.42 - EMULATION_OFILES = @EMULATION_OFILES@
42.43 ---- binutils-2.16.91.0.1/ld/Makefile.in
42.44 -+++ binutils-2.16.91.0.1/ld/Makefile.in
42.45 -@@ -268,7 +268,7 @@
42.46 - # We put the scripts in the directory $(scriptdir)/ldscripts.
42.47 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
42.48 - # directives need to be different for native and cross linkers.
42.49 --scriptdir = $(tooldir)/lib
42.50 -+scriptdir = $(libdir)
42.51 - BASEDIR = $(srcdir)/..
42.52 - BFDDIR = $(BASEDIR)/bfd
42.53 - INCDIR = $(BASEDIR)/include
43.1 --- a/patches/binutils/2.17.50.0.10/300-012_check_ldrunpath_length.patch Sat Sep 22 17:25:42 2007 +0000
43.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43.3 @@ -1,47 +0,0 @@
43.4 -#!/bin/sh -e
43.5 -## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
43.6 -##
43.7 -## All lines beginning with `## DP:' are a description of the patch.
43.8 -## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
43.9 -## DP: cases where -rpath isn't specified. (#151024)
43.10 -
43.11 -if [ $# -ne 1 ]; then
43.12 - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
43.13 - exit 1
43.14 -fi
43.15 -
43.16 -[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
43.17 -patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
43.18 -
43.19 -case "$1" in
43.20 - -patch) patch $patch_opts -p1 < $0;;
43.21 - -unpatch) patch $patch_opts -p1 -R < $0;;
43.22 - *)
43.23 - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
43.24 - exit 1;;
43.25 -esac
43.26 -
43.27 -exit 0
43.28 -
43.29 -@DPATCH@
43.30 -diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
43.31 ---- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
43.32 -+++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
43.33 -@@ -692,6 +692,8 @@
43.34 - && command_line.rpath == NULL)
43.35 - {
43.36 - lib_path = (const char *) getenv ("LD_RUN_PATH");
43.37 -+ if ((lib_path) && (strlen (lib_path) == 0))
43.38 -+ lib_path = NULL;
43.39 - if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
43.40 - force))
43.41 - break;
43.42 -@@ -871,6 +873,8 @@
43.43 - rpath = command_line.rpath;
43.44 - if (rpath == NULL)
43.45 - rpath = (const char *) getenv ("LD_RUN_PATH");
43.46 -+ if ((rpath) && (strlen (rpath) == 0))
43.47 -+ rpath = NULL;
43.48 - if (! (bfd_elf_size_dynamic_sections
43.49 - (output_bfd, command_line.soname, rpath,
43.50 - command_line.filter_shlib,
44.1 --- a/patches/binutils/2.17.50.0.14/100-uclibc-conf.patch Sat Sep 22 17:25:42 2007 +0000
44.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
44.3 @@ -1,149 +0,0 @@
44.4 -diff -dur binutils-2.17.50.0.14.orig/bfd/configure binutils-2.17.50.0.14/bfd/configure
44.5 ---- binutils-2.17.50.0.14.orig/bfd/configure 2007-03-23 16:41:48.000000000 +0100
44.6 -+++ binutils-2.17.50.0.14/bfd/configure 2007-04-10 17:35:41.000000000 +0200
44.7 -@@ -3577,7 +3577,7 @@
44.8 - ;;
44.9 -
44.10 - # This must be Linux ELF.
44.11 --linux-gnu*)
44.12 -+linux-gnu*|linux-uclibc*)
44.13 - lt_cv_deplibs_check_method=pass_all
44.14 - ;;
44.15 -
44.16 -diff -dur binutils-2.17.50.0.14.orig/binutils/configure binutils-2.17.50.0.14/binutils/configure
44.17 ---- binutils-2.17.50.0.14.orig/binutils/configure 2007-03-16 16:48:29.000000000 +0100
44.18 -+++ binutils-2.17.50.0.14/binutils/configure 2007-04-10 17:35:41.000000000 +0200
44.19 -@@ -3410,7 +3410,7 @@
44.20 - ;;
44.21 -
44.22 - # This must be Linux ELF.
44.23 --linux-gnu*)
44.24 -+linux-gnu*|linux-uclibc*)
44.25 - lt_cv_deplibs_check_method=pass_all
44.26 - ;;
44.27 -
44.28 -diff -dur binutils-2.17.50.0.14.orig/configure binutils-2.17.50.0.14/configure
44.29 ---- binutils-2.17.50.0.14.orig/configure 2007-03-23 16:41:48.000000000 +0100
44.30 -+++ binutils-2.17.50.0.14/configure 2007-04-10 17:35:41.000000000 +0200
44.31 -@@ -2195,7 +2195,7 @@
44.32 - am33_2.0-*-linux*)
44.33 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
44.34 - ;;
44.35 -- sh-*-linux*)
44.36 -+ sh*-*-linux*)
44.37 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
44.38 - ;;
44.39 - sh*-*-pe|mips*-*-pe|*arm-wince-pe)
44.40 -@@ -2490,7 +2490,7 @@
44.41 - romp-*-*)
44.42 - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
44.43 - ;;
44.44 -- sh-*-* | sh64-*-*)
44.45 -+ sh*-*-* | sh64-*-*)
44.46 - case "${host}" in
44.47 - i[3456789]86-*-vsta) ;; # don't add gprof back in
44.48 - i[3456789]86-*-go32*) ;; # don't add gprof back in
44.49 -diff -dur binutils-2.17.50.0.14.orig/configure.ac binutils-2.17.50.0.14/configure.ac
44.50 ---- binutils-2.17.50.0.14.orig/configure.ac 2007-03-23 16:41:48.000000000 +0100
44.51 -+++ binutils-2.17.50.0.14/configure.ac 2007-04-10 17:35:41.000000000 +0200
44.52 -@@ -484,7 +484,7 @@
44.53 - am33_2.0-*-linux*)
44.54 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
44.55 - ;;
44.56 -- sh-*-linux*)
44.57 -+ sh*-*-linux*)
44.58 - noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
44.59 - ;;
44.60 - sh*-*-pe|mips*-*-pe|*arm-wince-pe)
44.61 -@@ -779,7 +779,7 @@
44.62 - romp-*-*)
44.63 - noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
44.64 - ;;
44.65 -- sh-*-* | sh64-*-*)
44.66 -+ sh*-*-* | sh64-*-*)
44.67 - case "${host}" in
44.68 - i[[3456789]]86-*-vsta) ;; # don't add gprof back in
44.69 - i[[3456789]]86-*-go32*) ;; # don't add gprof back in
44.70 -diff -dur binutils-2.17.50.0.14.orig/gas/configure binutils-2.17.50.0.14/gas/configure
44.71 ---- binutils-2.17.50.0.14.orig/gas/configure 2007-03-16 16:48:29.000000000 +0100
44.72 -+++ binutils-2.17.50.0.14/gas/configure 2007-04-10 17:35:41.000000000 +0200
44.73 -@@ -3410,7 +3410,7 @@
44.74 - ;;
44.75 -
44.76 - # This must be Linux ELF.
44.77 --linux-gnu*)
44.78 -+linux-gnu*|linux-uclibc*)
44.79 - lt_cv_deplibs_check_method=pass_all
44.80 - ;;
44.81 -
44.82 -diff -dur binutils-2.17.50.0.14.orig/gprof/configure binutils-2.17.50.0.14/gprof/configure
44.83 ---- binutils-2.17.50.0.14.orig/gprof/configure 2007-01-03 20:49:13.000000000 +0100
44.84 -+++ binutils-2.17.50.0.14/gprof/configure 2007-04-10 17:35:41.000000000 +0200
44.85 -@@ -3413,6 +3413,11 @@
44.86 - lt_cv_deplibs_check_method=pass_all
44.87 - ;;
44.88 -
44.89 -+linux-uclibc*)
44.90 -+ lt_cv_deplibs_check_method=pass_all
44.91 -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
44.92 -+ ;;
44.93 -+
44.94 - netbsd* | knetbsd*-gnu)
44.95 - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
44.96 - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
44.97 -diff -dur binutils-2.17.50.0.14.orig/ld/configure binutils-2.17.50.0.14/ld/configure
44.98 ---- binutils-2.17.50.0.14.orig/ld/configure 2007-03-16 16:48:30.000000000 +0100
44.99 -+++ binutils-2.17.50.0.14/ld/configure 2007-04-10 17:35:41.000000000 +0200
44.100 -@@ -3412,7 +3412,7 @@
44.101 - ;;
44.102 -
44.103 - # This must be Linux ELF.
44.104 --linux-gnu*)
44.105 -+linux-gnu*|linux-uclibc*)
44.106 - lt_cv_deplibs_check_method=pass_all
44.107 - ;;
44.108 -
44.109 -diff -dur binutils-2.17.50.0.14.orig/libtool.m4 binutils-2.17.50.0.14/libtool.m4
44.110 ---- binutils-2.17.50.0.14.orig/libtool.m4 2006-02-14 00:10:15.000000000 +0100
44.111 -+++ binutils-2.17.50.0.14/libtool.m4 2007-04-10 17:35:41.000000000 +0200
44.112 -@@ -739,7 +739,7 @@
44.113 - ;;
44.114 -
44.115 - # This must be Linux ELF.
44.116 --linux-gnu*)
44.117 -+linux-gnu*|linux-uclibc*)
44.118 - lt_cv_deplibs_check_method=pass_all
44.119 - ;;
44.120 -
44.121 -diff -dur binutils-2.17.50.0.14.orig/ltconfig binutils-2.17.50.0.14/ltconfig
44.122 ---- binutils-2.17.50.0.14.orig/ltconfig 2006-07-15 20:23:48.000000000 +0200
44.123 -+++ binutils-2.17.50.0.14/ltconfig 2007-04-10 17:35:41.000000000 +0200
44.124 -@@ -602,6 +602,7 @@
44.125 -
44.126 - # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
44.127 - case $host_os in
44.128 -+linux-uclibc*) ;;
44.129 - linux-gnu*) ;;
44.130 - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
44.131 - esac
44.132 -@@ -1247,7 +1248,7 @@
44.133 - ;;
44.134 -
44.135 - # This must be Linux ELF.
44.136 --linux-gnu*)
44.137 -+linux-gnu*|linux-uclibc*)
44.138 - version_type=linux
44.139 - need_lib_prefix=no
44.140 - need_version=no
44.141 -diff -dur binutils-2.17.50.0.14.orig/opcodes/configure binutils-2.17.50.0.14/opcodes/configure
44.142 ---- binutils-2.17.50.0.14.orig/opcodes/configure 2007-03-16 16:48:30.000000000 +0100
44.143 -+++ binutils-2.17.50.0.14/opcodes/configure 2007-04-10 17:35:41.000000000 +0200
44.144 -@@ -3578,7 +3578,7 @@
44.145 - ;;
44.146 -
44.147 - # This must be Linux ELF.
44.148 --linux-gnu*)
44.149 -+linux-gnu*|linux-uclibc*)
44.150 - lt_cv_deplibs_check_method=pass_all
44.151 - ;;
44.152 -
45.1 --- a/patches/binutils/2.17.50.0.14/110-arm-eabi-conf.patch Sat Sep 22 17:25:42 2007 +0000
45.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
45.3 @@ -1,24 +0,0 @@
45.4 -diff -dur binutils-2.17.50.0.14.orig/configure binutils-2.17.50.0.14/configure
45.5 ---- binutils-2.17.50.0.14.orig/configure 2007-04-10 17:38:23.000000000 +0200
45.6 -+++ binutils-2.17.50.0.14/configure 2007-04-10 17:38:43.000000000 +0200
45.7 -@@ -2224,7 +2224,7 @@
45.8 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
45.9 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
45.10 - ;;
45.11 -- arm*-*-linux-gnueabi)
45.12 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
45.13 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
45.14 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
45.15 - ;;
45.16 -diff -dur binutils-2.17.50.0.14.orig/configure.ac binutils-2.17.50.0.14/configure.ac
45.17 ---- binutils-2.17.50.0.14.orig/configure.ac 2007-04-10 17:38:23.000000000 +0200
45.18 -+++ binutils-2.17.50.0.14/configure.ac 2007-04-10 17:38:43.000000000 +0200
45.19 -@@ -513,7 +513,7 @@
45.20 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
45.21 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
45.22 - ;;
45.23 -- arm*-*-linux-gnueabi)
45.24 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
45.25 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
45.26 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
45.27 - ;;
46.1 --- a/patches/binutils/2.17.50.0.14/300-001_ld_makefile_patch.patch Sat Sep 22 17:25:42 2007 +0000
46.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
46.3 @@ -1,24 +0,0 @@
46.4 -diff -dur binutils-2.17.50.0.14.orig/ld/Makefile.am binutils-2.17.50.0.14/ld/Makefile.am
46.5 ---- binutils-2.17.50.0.14.orig/ld/Makefile.am 2007-03-16 16:48:30.000000000 +0100
46.6 -+++ binutils-2.17.50.0.14/ld/Makefile.am 2007-04-10 17:40:16.000000000 +0200
46.7 -@@ -17,7 +17,7 @@
46.8 - # We put the scripts in the directory $(scriptdir)/ldscripts.
46.9 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
46.10 - # directives need to be different for native and cross linkers.
46.11 --scriptdir = $(tooldir)/lib
46.12 -+scriptdir = $(libdir)
46.13 -
46.14 - EMUL = @EMUL@
46.15 - EMULATION_OFILES = @EMULATION_OFILES@
46.16 -diff -dur binutils-2.17.50.0.14.orig/ld/Makefile.in binutils-2.17.50.0.14/ld/Makefile.in
46.17 ---- binutils-2.17.50.0.14.orig/ld/Makefile.in 2007-03-16 16:48:30.000000000 +0100
46.18 -+++ binutils-2.17.50.0.14/ld/Makefile.in 2007-04-10 17:40:16.000000000 +0200
46.19 -@@ -274,7 +274,7 @@
46.20 - # We put the scripts in the directory $(scriptdir)/ldscripts.
46.21 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
46.22 - # directives need to be different for native and cross linkers.
46.23 --scriptdir = $(tooldir)/lib
46.24 -+scriptdir = $(libdir)
46.25 - BASEDIR = $(srcdir)/..
46.26 - BFDDIR = $(BASEDIR)/bfd
46.27 - INCDIR = $(BASEDIR)/include
47.1 --- a/patches/binutils/2.17.50.0.14/300-012_check_ldrunpath_length.patch Sat Sep 22 17:25:42 2007 +0000
47.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
47.3 @@ -1,21 +0,0 @@
47.4 -diff -dur binutils-2.17.50.0.14.orig/ld/emultempl/elf32.em binutils-2.17.50.0.14/ld/emultempl/elf32.em
47.5 ---- binutils-2.17.50.0.14.orig/ld/emultempl/elf32.em 2007-03-23 16:42:51.000000000 +0100
47.6 -+++ binutils-2.17.50.0.14/ld/emultempl/elf32.em 2007-04-10 17:41:24.000000000 +0200
47.7 -@@ -1007,6 +1007,8 @@
47.8 - && command_line.rpath == NULL)
47.9 - {
47.10 - lib_path = (const char *) getenv ("LD_RUN_PATH");
47.11 -+ if ((lib_path) && (strlen (lib_path) == 0))
47.12 -+ lib_path = NULL;
47.13 - if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
47.14 - force))
47.15 - break;
47.16 -@@ -1191,6 +1193,8 @@
47.17 - rpath = command_line.rpath;
47.18 - if (rpath == NULL)
47.19 - rpath = (const char *) getenv ("LD_RUN_PATH");
47.20 -+ if ((rpath) && (strlen (rpath) == 0))
47.21 -+ rpath = NULL;
47.22 - if (! (bfd_elf_size_dynamic_sections
47.23 - (output_bfd, command_line.soname, rpath,
47.24 - command_line.filter_shlib,
48.1 --- a/patches/binutils/2.17.50.0.17/110-arm-eabi-conf.patch Sat Sep 22 17:25:42 2007 +0000
48.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
48.3 @@ -1,24 +0,0 @@
48.4 -diff -u binutils-2.17.50.0.17.oorig/configure binutils-2.17.50.0.17/configure
48.5 ---- binutils-2.17.50.0.17.oorig/configure 2007-06-18 19:29:28.000000000 +0200
48.6 -+++ binutils-2.17.50.0.17/configure 2007-06-25 09:58:36.000000000 +0200
48.7 -@@ -2224,7 +2224,7 @@
48.8 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
48.9 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
48.10 - ;;
48.11 -- arm*-*-linux-gnueabi)
48.12 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
48.13 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
48.14 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
48.15 - ;;
48.16 -diff -u binutils-2.17.50.0.17.oorig/configure.ac binutils-2.17.50.0.17/configure.ac
48.17 ---- binutils-2.17.50.0.17.oorig/configure.ac 2007-06-18 19:29:28.000000000 +0200
48.18 -+++ binutils-2.17.50.0.17/configure.ac 2007-06-25 09:58:36.000000000 +0200
48.19 -@@ -513,7 +513,7 @@
48.20 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
48.21 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
48.22 - ;;
48.23 -- arm*-*-linux-gnueabi)
48.24 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
48.25 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
48.26 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
48.27 - ;;
49.1 --- a/patches/binutils/2.17.50.0.17/300-001_ld_makefile_patch.patch Sat Sep 22 17:25:42 2007 +0000
49.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
49.3 @@ -1,24 +0,0 @@
49.4 -diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
49.5 ---- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200
49.6 -+++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200
49.7 -@@ -18,7 +18,7 @@
49.8 - # We put the scripts in the directory $(scriptdir)/ldscripts.
49.9 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
49.10 - # directives need to be different for native and cross linkers.
49.11 --scriptdir = $(tooldir)/lib
49.12 -+scriptdir = $(libdir)
49.13 -
49.14 - EMUL = @EMUL@
49.15 - EMULATION_OFILES = @EMULATION_OFILES@
49.16 -diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
49.17 ---- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200
49.18 -+++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200
49.19 -@@ -287,7 +287,7 @@
49.20 - # We put the scripts in the directory $(scriptdir)/ldscripts.
49.21 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
49.22 - # directives need to be different for native and cross linkers.
49.23 --scriptdir = $(tooldir)/lib
49.24 -+scriptdir = $(libdir)
49.25 - BASEDIR = $(srcdir)/..
49.26 - BFDDIR = $(BASEDIR)/bfd
49.27 - INCDIR = $(BASEDIR)/include
50.1 --- a/patches/binutils/2.17.50.0.17/300-012_check_ldrunpath_length.patch Sat Sep 22 17:25:42 2007 +0000
50.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
50.3 @@ -1,21 +0,0 @@
50.4 -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em
50.5 ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200
50.6 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200
50.7 -@@ -1007,6 +1007,8 @@
50.8 - && command_line.rpath == NULL)
50.9 - {
50.10 - lib_path = (const char *) getenv ("LD_RUN_PATH");
50.11 -+ if ((lib_path) && (strlen (lib_path) == 0))
50.12 -+ lib_path = NULL;
50.13 - if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
50.14 - force))
50.15 - break;
50.16 -@@ -1191,6 +1193,8 @@
50.17 - rpath = command_line.rpath;
50.18 - if (rpath == NULL)
50.19 - rpath = (const char *) getenv ("LD_RUN_PATH");
50.20 -+ if ((rpath) && (strlen (rpath) == 0))
50.21 -+ rpath = NULL;
50.22 - if (! (bfd_elf_size_dynamic_sections
50.23 - (output_bfd, command_line.soname, rpath,
50.24 - command_line.filter_shlib,
51.1 --- a/patches/binutils/2.17.50.0.18/110-arm-eabi-conf.patch Sat Sep 22 17:25:42 2007 +0000
51.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
51.3 @@ -1,24 +0,0 @@
51.4 -diff -u binutils-2.17.50.0.17.oorig/configure binutils-2.17.50.0.17/configure
51.5 ---- binutils-2.17.50.0.17.oorig/configure 2007-06-18 19:29:28.000000000 +0200
51.6 -+++ binutils-2.17.50.0.17/configure 2007-06-25 09:58:36.000000000 +0200
51.7 -@@ -2224,7 +2224,7 @@
51.8 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
51.9 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
51.10 - ;;
51.11 -- arm*-*-linux-gnueabi)
51.12 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
51.13 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
51.14 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
51.15 - ;;
51.16 -diff -u binutils-2.17.50.0.17.oorig/configure.ac binutils-2.17.50.0.17/configure.ac
51.17 ---- binutils-2.17.50.0.17.oorig/configure.ac 2007-06-18 19:29:28.000000000 +0200
51.18 -+++ binutils-2.17.50.0.17/configure.ac 2007-06-25 09:58:36.000000000 +0200
51.19 -@@ -513,7 +513,7 @@
51.20 - arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
51.21 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
51.22 - ;;
51.23 -- arm*-*-linux-gnueabi)
51.24 -+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
51.25 - noconfigdirs="$noconfigdirs target-libffi target-qthreads"
51.26 - noconfigdirs="$noconfigdirs target-libjava target-libobjc"
51.27 - ;;
52.1 --- a/patches/binutils/2.17.50.0.18/300-001_ld_makefile_patch.patch Sat Sep 22 17:25:42 2007 +0000
52.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
52.3 @@ -1,24 +0,0 @@
52.4 -diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am
52.5 ---- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200
52.6 -+++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200
52.7 -@@ -18,7 +18,7 @@
52.8 - # We put the scripts in the directory $(scriptdir)/ldscripts.
52.9 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
52.10 - # directives need to be different for native and cross linkers.
52.11 --scriptdir = $(tooldir)/lib
52.12 -+scriptdir = $(libdir)
52.13 -
52.14 - EMUL = @EMUL@
52.15 - EMULATION_OFILES = @EMULATION_OFILES@
52.16 -diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in
52.17 ---- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200
52.18 -+++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200
52.19 -@@ -287,7 +287,7 @@
52.20 - # We put the scripts in the directory $(scriptdir)/ldscripts.
52.21 - # We can't put the scripts in $(datadir) because the SEARCH_DIR
52.22 - # directives need to be different for native and cross linkers.
52.23 --scriptdir = $(tooldir)/lib
52.24 -+scriptdir = $(libdir)
52.25 - BASEDIR = $(srcdir)/..
52.26 - BFDDIR = $(BASEDIR)/bfd
52.27 - INCDIR = $(BASEDIR)/include
53.1 --- a/patches/binutils/2.17.50.0.18/300-012_check_ldrunpath_length.patch Sat Sep 22 17:25:42 2007 +0000
53.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
53.3 @@ -1,21 +0,0 @@
53.4 -diff -u binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em binutils-2.17.50.0.17/ld/emultempl/elf32.em
53.5 ---- binutils-2.17.50.0.17.oorig/ld/emultempl/elf32.em 2007-06-18 19:31:40.000000000 +0200
53.6 -+++ binutils-2.17.50.0.17/ld/emultempl/elf32.em 2007-06-25 10:01:25.000000000 +0200
53.7 -@@ -1007,6 +1007,8 @@
53.8 - && command_line.rpath == NULL)
53.9 - {
53.10 - lib_path = (const char *) getenv ("LD_RUN_PATH");
53.11 -+ if ((lib_path) && (strlen (lib_path) == 0))
53.12 -+ lib_path = NULL;
53.13 - if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
53.14 - force))
53.15 - break;
53.16 -@@ -1191,6 +1193,8 @@
53.17 - rpath = command_line.rpath;
53.18 - if (rpath == NULL)
53.19 - rpath = (const char *) getenv ("LD_RUN_PATH");
53.20 -+ if ((rpath) && (strlen (rpath) == 0))
53.21 -+ rpath = NULL;
53.22 - if (! (bfd_elf_size_dynamic_sections
53.23 - (output_bfd, command_line.soname, rpath,
53.24 - command_line.filter_shlib,
54.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
54.2 +++ b/patches/cygwin/1.5.15-1/100-cygwin-1.5.15-1-crossbuild.patch Sun Sep 23 17:08:09 2007 +0000
54.3 @@ -0,0 +1,40 @@
54.4 +Message-ID: <4269173F.7020705@zee2.com>
54.5 +Date: Fri, 22 Apr 2005 16:24:47 +0100
54.6 +From: Steve Papacharalambous <stevep@zee2.com>
54.7 +To: "Robert P. J. Day" <rpjday@mindspring.com>
54.8 +CC: crossgcc list <crossgcc@sources.redhat.com>
54.9 +Subject: Re: cygwin source directory has moved
54.10 +In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
54.11 +
54.12 +Hi Robert,
54.13 +
54.14 +I've attached two patches:
54.15 +
54.16 +1/ For crosstool-0.31 which changes the CYGWIN_URL to one which has the
54.17 +cygwin source archives. The version of cygwin that is used to build the
54.18 +cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
54.19 +most of the mirror sites don't seem to have the original archive used.
54.20 +[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
54.21 +
54.22 +
54.23 +2/ The later cygwin source archive fails to cross build with the error:
54.24 +/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
54.25 +cannot find -luser32
54.26 +
54.27 +unless the second patch is applied,
54.28 +
54.29 +
54.30 +diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
54.31 +--- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in 2005-02-28 22:51:02.000000000 +0000
54.32 ++++ cygwin-1.5.15-1/winsup/mingw/Makefile.in 2005-04-22 15:29:18.000000000 +0100
54.33 +@@ -71,7 +71,7 @@
54.34 + mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
54.35 +
54.36 + CC := @CC@
54.37 +-override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
54.38 ++override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
54.39 + # FIXME: Which is it, CC or CC_FOR_TARGET?
54.40 + CC_FOR_TARGET = $(CC)
54.41 + AS_FOR_TARGET = $(AS)
54.42 +
54.43 +
55.1 --- a/patches/cygwin/1.5.15-1/cygwin-1.5.15-1-crossbuild.patch Sat Sep 22 17:25:42 2007 +0000
55.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
55.3 @@ -1,40 +0,0 @@
55.4 -Message-ID: <4269173F.7020705@zee2.com>
55.5 -Date: Fri, 22 Apr 2005 16:24:47 +0100
55.6 -From: Steve Papacharalambous <stevep@zee2.com>
55.7 -To: "Robert P. J. Day" <rpjday@mindspring.com>
55.8 -CC: crossgcc list <crossgcc@sources.redhat.com>
55.9 -Subject: Re: cygwin source directory has moved
55.10 -In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
55.11 -
55.12 -Hi Robert,
55.13 -
55.14 -I've attached two patches:
55.15 -
55.16 -1/ For crosstool-0.31 which changes the CYGWIN_URL to one which has the
55.17 -cygwin source archives. The version of cygwin that is used to build the
55.18 -cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
55.19 -most of the mirror sites don't seem to have the original archive used.
55.20 -[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
55.21 -
55.22 -
55.23 -2/ The later cygwin source archive fails to cross build with the error:
55.24 -/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
55.25 -cannot find -luser32
55.26 -
55.27 -unless the second patch is applied,
55.28 -
55.29 -
55.30 -diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
55.31 ---- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in 2005-02-28 22:51:02.000000000 +0000
55.32 -+++ cygwin-1.5.15-1/winsup/mingw/Makefile.in 2005-04-22 15:29:18.000000000 +0100
55.33 -@@ -71,7 +71,7 @@
55.34 - mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
55.35 -
55.36 - CC := @CC@
55.37 --override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
55.38 -+override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\) *[^ ]*\( \|$$\)% %g'}}
55.39 - # FIXME: Which is it, CC or CC_FOR_TARGET?
55.40 - CC_FOR_TARGET = $(CC)
55.41 - AS_FOR_TARGET = $(AS)
55.42 -
55.43 -
56.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
56.2 +++ b/patches/gcc/2.95.3/100-arm-linux.patch Sun Sep 23 17:08:09 2007 +0000
56.3 @@ -0,0 +1,647 @@
56.4 +--------- snip -------
56.5 +Downloaded from ftp://ftp.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/gcc-2.95.3.diff.bz2
56.6 +Not sure what it fixes, but this appears to be The Patch used with gcc-2.95.3 on arm.
56.7 +--------- snip -------
56.8 +
56.9 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.c gcc-2.95.3/gcc/config/arm/arm.c
56.10 +--- gcc-2.95.3-orig/gcc/config/arm/arm.c Thu Jan 25 15:03:24 2001
56.11 ++++ gcc-2.95.3/gcc/config/arm/arm.c Fri Jul 20 19:39:11 2001
56.12 +@@ -1529,27 +1529,34 @@
56.13 + return gen_rtx_PLUS (Pmode, base, offset);
56.14 + }
56.15 + else if (GET_CODE (orig) == LABEL_REF)
56.16 +- current_function_uses_pic_offset_table = 1;
56.17 +-
56.18 +- return orig;
56.19 +-}
56.20 ++ {
56.21 ++ current_function_uses_pic_offset_table = 1;
56.22 +
56.23 +-static rtx pic_rtx;
56.24 ++ if (NEED_PLT_GOT)
56.25 ++ {
56.26 ++ rtx pic_ref, address = gen_reg_rtx (Pmode);
56.27 ++
56.28 ++ emit_insn (gen_pic_load_addr (address, orig));
56.29 ++ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
56.30 ++ address);
56.31 ++ emit_move_insn (address, pic_ref);
56.32 ++ return address;
56.33 ++ }
56.34 ++ }
56.35 +
56.36 +-int
56.37 +-is_pic(x)
56.38 +- rtx x;
56.39 +-{
56.40 +- if (x == pic_rtx)
56.41 +- return 1;
56.42 +- return 0;
56.43 ++ return orig;
56.44 + }
56.45 +
56.46 ++/* Generate code to load the PIC register. PROLOGUE is true if
56.47 ++ called from arm_expand_prologue (in which case we want the
56.48 ++ generated insns at the start of the function); false if called
56.49 ++ by an exception receiver that needs the PIC register reloaded
56.50 ++ (in which case the insns are just dumped at the current location). */
56.51 + void
56.52 +-arm_finalize_pic ()
56.53 ++arm_finalize_pic (int prologue)
56.54 + {
56.55 + #ifndef AOF_ASSEMBLER
56.56 +- rtx l1, pic_tmp, pic_tmp2, seq;
56.57 ++ rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx;
56.58 + rtx global_offset_table;
56.59 +
56.60 + if (current_function_uses_pic_offset_table == 0)
56.61 +@@ -1578,7 +1585,10 @@
56.62 +
56.63 + seq = gen_sequence ();
56.64 + end_sequence ();
56.65 +- emit_insn_after (seq, get_insns ());
56.66 ++ if (prologue)
56.67 ++ emit_insn_after (seq, get_insns ());
56.68 ++ else
56.69 ++ emit_insn (seq);
56.70 +
56.71 + /* Need to emit this whether or not we obey regdecls,
56.72 + since setjmp/longjmp can cause life info to screw up. */
56.73 +@@ -5327,7 +5337,13 @@
56.74 + if (frame_pointer_needed)
56.75 + live_regs += 4;
56.76 +
56.77 +- if (live_regs)
56.78 ++ if (live_regs == 1 && regs_ever_live[LR_REGNUM]
56.79 ++ && ! lr_save_eliminated && ! really_return)
56.80 ++ {
56.81 ++ output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4"
56.82 ++ : "ldr%?%d0\t%|lr, [%|sp], #4", &operand);
56.83 ++ }
56.84 ++ else if (live_regs)
56.85 + {
56.86 + if (lr_save_eliminated || ! regs_ever_live[14])
56.87 + live_regs++;
56.88 +@@ -5446,7 +5462,7 @@
56.89 + rtx x;
56.90 +
56.91 + length = strlen (name);
56.92 +- alignlength = (length + 1) + 3 & ~3;
56.93 ++ alignlength = ((length + 1) + 3) & ~3;
56.94 +
56.95 + ASM_OUTPUT_ASCII (stream, name, length + 1);
56.96 + ASM_OUTPUT_ALIGN (stream, 2);
56.97 +@@ -5838,6 +5854,9 @@
56.98 + int store_arg_regs = 0;
56.99 + int volatile_func = (optimize > 0
56.100 + && TREE_THIS_VOLATILE (current_function_decl));
56.101 ++ rtx ip_rtx;
56.102 ++ int fp_offset = 0;
56.103 ++ rtx insn;
56.104 +
56.105 + /* Naked functions don't have prologues. */
56.106 + if (arm_naked_function_p (current_function_decl))
56.107 +@@ -5859,11 +5878,59 @@
56.108 + live_regs_mask |= 0x4000;
56.109 + }
56.110 +
56.111 ++ ip_rtx = gen_rtx_REG (SImode, IP_REGNUM);
56.112 ++
56.113 + if (frame_pointer_needed)
56.114 + {
56.115 ++ if (current_function_needs_context)
56.116 ++ {
56.117 ++ /* The Static chain register is the same as the IP register
56.118 ++ used as a scratch register during stack frame creation.
56.119 ++ To get around this need to find somewhere to store IP
56.120 ++ whilst the frame is being created. We try the following
56.121 ++ places in order:
56.122 ++
56.123 ++ 1. An unused argument register.
56.124 ++ 2. A slot on the stack above the frame. (This only
56.125 ++ works if the function is not a varargs function).
56.126 ++
56.127 ++ If neither of these places is available, we abort (for now). */
56.128 ++ if (regs_ever_live[3] == 0)
56.129 ++ {
56.130 ++ insn = gen_rtx_REG (SImode, 3);
56.131 ++ insn = gen_rtx_SET (SImode, insn, ip_rtx);
56.132 ++ insn = emit_insn (insn);
56.133 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.134 ++ }
56.135 ++ else if (current_function_pretend_args_size == 0)
56.136 ++ {
56.137 ++ insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx);
56.138 ++ insn = gen_rtx_MEM (SImode, insn);
56.139 ++ insn = gen_rtx_SET (VOIDmode, insn, ip_rtx);
56.140 ++ insn = emit_insn (insn);
56.141 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.142 ++ fp_offset = 4;
56.143 ++ }
56.144 ++ else
56.145 ++ /* FIXME - the way to handle this situation is to allow
56.146 ++ the pretend args to be dumped onto the stack, then
56.147 ++ reuse r3 to save IP. This would involve moving the
56.148 ++ copying os SP into IP until after the pretend args
56.149 ++ have been dumped, but this is not too hard. */
56.150 ++ error ("Unable to find a temporary location for static chanin register");
56.151 ++ }
56.152 ++
56.153 + live_regs_mask |= 0xD800;
56.154 +- emit_insn (gen_movsi (gen_rtx_REG (SImode, 12),
56.155 +- stack_pointer_rtx));
56.156 ++ if (fp_offset)
56.157 ++ {
56.158 ++ insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset));
56.159 ++ insn = gen_rtx_SET (SImode, ip_rtx, insn);
56.160 ++ }
56.161 ++ else
56.162 ++ insn = gen_movsi (ip_rtx, stack_pointer_rtx);
56.163 ++
56.164 ++ insn = emit_insn (insn);
56.165 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.166 + }
56.167 +
56.168 + if (current_function_pretend_args_size)
56.169 +@@ -5927,9 +5994,31 @@
56.170 + }
56.171 +
56.172 + if (frame_pointer_needed)
56.173 +- emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12),
56.174 +- (GEN_INT
56.175 +- (-(4 + current_function_pretend_args_size)))));
56.176 ++ {
56.177 ++ insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset));
56.178 ++ insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn));
56.179 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.180 ++
56.181 ++ if (current_function_needs_context)
56.182 ++ {
56.183 ++ /* Recover the static chain register. */
56.184 ++ if (regs_ever_live [3] == 0)
56.185 ++ {
56.186 ++ insn = gen_rtx_REG (SImode, 3);
56.187 ++ insn = gen_rtx_SET (SImode, ip_rtx, insn);
56.188 ++ insn = emit_insn (insn);
56.189 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.190 ++ }
56.191 ++ else /* if (current_function_pretend_args_size == 0) */
56.192 ++ {
56.193 ++ insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
56.194 ++ insn = gen_rtx_MEM (SImode, insn);
56.195 ++ insn = gen_rtx_SET (SImode, ip_rtx, insn);
56.196 ++ insn = emit_insn (insn);
56.197 ++ RTX_FRAME_RELATED_P (insn) = 1;
56.198 ++ }
56.199 ++ }
56.200 ++ }
56.201 +
56.202 + if (amount != const0_rtx)
56.203 + {
56.204 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.h gcc-2.95.3/gcc/config/arm/arm.h
56.205 +--- gcc-2.95.3-orig/gcc/config/arm/arm.h Thu Jan 25 15:03:26 2001
56.206 ++++ gcc-2.95.3/gcc/config/arm/arm.h Fri Jul 20 19:39:11 2001
56.207 +@@ -601,14 +601,20 @@
56.208 + (TREE_CODE (EXP) == STRING_CST \
56.209 + && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
56.210 +
56.211 ++#ifndef STRUCTURE_SIZE_BOUNDARY
56.212 + /* Every structures size must be a multiple of 32 bits. */
56.213 + /* This is for compatibility with ARMCC. ARM SDT Reference Manual
56.214 + (ARM DUI 0020D) page 2-20 says "Structures are aligned on word
56.215 + boundaries". */
56.216 +-#ifndef STRUCTURE_SIZE_BOUNDARY
56.217 +-#define STRUCTURE_SIZE_BOUNDARY 32
56.218 ++/* Setting this to 32 produces more efficient code, but the value set in previous
56.219 ++ versions of this toolchain was 8, which produces more compact structures. The
56.220 ++ command line option -mstructure_size_boundary=<n> can be used to change this
56.221 ++ value. */
56.222 ++#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
56.223 + #endif
56.224 +
56.225 ++extern int arm_structure_size_boundary;
56.226 ++
56.227 + /* Used when parsing command line option -mstructure_size_boundary. */
56.228 + extern const char * structure_size_string;
56.229 +
56.230 +@@ -768,6 +774,9 @@
56.231 + /* Specify the registers used for certain standard purposes.
56.232 + The values of these macros are register numbers. */
56.233 +
56.234 ++/* Register which holds return address from a subroutine call. */
56.235 ++#define LR_REGNUM 14
56.236 ++
56.237 + /* Define this if the program counter is overloaded on a register. */
56.238 + #define PC_REGNUM 15
56.239 +
56.240 +@@ -777,6 +786,9 @@
56.241 + /* Base register for access to local variables of the function. */
56.242 + #define FRAME_POINTER_REGNUM 25
56.243 +
56.244 ++/* Scratch register - used in all kinds of places, eg trampolines. */
56.245 ++#define IP_REGNUM 12
56.246 ++
56.247 + /* Define this to be where the real frame pointer is if it is not possible to
56.248 + work out the offset between the frame pointer and the automatic variables
56.249 + until after register allocation has taken place. FRAME_POINTER_REGNUM
56.250 +@@ -798,7 +810,7 @@
56.251 + /* The native (Norcroft) Pascal compiler for the ARM passes the static chain
56.252 + as an invisible last argument (possible since varargs don't exist in
56.253 + Pascal), so the following is not true. */
56.254 +-#define STATIC_CHAIN_REGNUM 8
56.255 ++#define STATIC_CHAIN_REGNUM 12
56.256 +
56.257 + /* Register in which address to store a structure value
56.258 + is passed to a function. */
56.259 +@@ -1248,7 +1260,12 @@
56.260 + { \
56.261 + int volatile_func = arm_volatile_func (); \
56.262 + if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
56.263 +- (OFFSET) = 0; \
56.264 ++ { \
56.265 ++ if (! current_function_needs_context || ! frame_pointer_needed) \
56.266 ++ (OFFSET) = 0; \
56.267 ++ else \
56.268 ++ (OFFSET) = 4; \
56.269 ++ } \
56.270 + else if ((FROM) == FRAME_POINTER_REGNUM \
56.271 + && (TO) == STACK_POINTER_REGNUM) \
56.272 + (OFFSET) = (current_function_outgoing_args_size \
56.273 +@@ -1379,8 +1396,10 @@
56.274 +
56.275 + On the ARM, allow any integer (invalid ones are removed later by insn
56.276 + patterns), nice doubles and symbol_refs which refer to the function's
56.277 +- constant pool XXX. */
56.278 +-#define LEGITIMATE_CONSTANT_P(X) (! label_mentioned_p (X))
56.279 ++ constant pool XXX.
56.280 ++
56.281 ++ When generating PIC code, allow anything. */
56.282 ++#define LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X))
56.283 +
56.284 + /* Symbols in the text segment can be accessed without indirecting via the
56.285 + constant pool; it may take an extra binary operation, but this is still
56.286 +@@ -1496,9 +1515,8 @@
56.287 + && INTVAL (op) <= 31) \
56.288 + goto LABEL; \
56.289 + } \
56.290 +- /* NASTY: Since this limits the addressing of unsigned byte loads */ \
56.291 + range = ((MODE) == HImode || (MODE) == QImode) \
56.292 +- ? (arm_arch4 ? 256 : 4095) : 4096; \
56.293 ++ ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096; \
56.294 + if (code == CONST_INT && INTVAL (INDEX) < range \
56.295 + && INTVAL (INDEX) > -range) \
56.296 + goto LABEL; \
56.297 +@@ -1812,14 +1830,15 @@
56.298 + data addresses in memory. */
56.299 + #define PIC_OFFSET_TABLE_REGNUM arm_pic_register
56.300 +
56.301 +-#define FINALIZE_PIC arm_finalize_pic ()
56.302 ++#define FINALIZE_PIC arm_finalize_pic (1)
56.303 +
56.304 +-/* We can't directly access anything that contains a symbol,
56.305 ++/* We can't directly access anything that contains a symbol or label,
56.306 + nor can we indirect via the constant pool. */
56.307 + #define LEGITIMATE_PIC_OPERAND_P(X) \
56.308 +- (! symbol_mentioned_p (X) \
56.309 ++ (! symbol_mentioned_p (X) && ! label_mentioned_p (X) \
56.310 + && (! CONSTANT_POOL_ADDRESS_P (X) \
56.311 +- || ! symbol_mentioned_p (get_pool_constant (X))))
56.312 ++ || (! symbol_mentioned_p (get_pool_constant (X))) \
56.313 ++ && (! label_mentioned_p (get_pool_constant (X)))))
56.314 +
56.315 + /* We need to know when we are making a constant pool; this determines
56.316 + whether data needs to be in the GOT or can be referenced via a GOT
56.317 +@@ -2046,17 +2065,9 @@
56.318 + else output_addr_const(STREAM, X); \
56.319 + }
56.320 +
56.321 +-/* Handles PIC addr specially */
56.322 + #define OUTPUT_INT_ADDR_CONST(STREAM,X) \
56.323 + { \
56.324 +- if (flag_pic && GET_CODE(X) == CONST && is_pic(X)) \
56.325 +- { \
56.326 +- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0)); \
56.327 +- fputs(" - (", STREAM); \
56.328 +- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \
56.329 +- fputs(")", STREAM); \
56.330 +- } \
56.331 +- else output_addr_const(STREAM, X); \
56.332 ++ output_addr_const(STREAM, X); \
56.333 + \
56.334 + /* Mark symbols as position independent. We only do this in the \
56.335 + .text segment, not in the .data segment. */ \
56.336 +@@ -2170,8 +2181,7 @@
56.337 + int arm_return_in_memory PROTO ((Tree));
56.338 + int legitimate_pic_operand_p PROTO ((Rtx));
56.339 + Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));
56.340 +-int is_pic PROTO ((Rtx));
56.341 +-void arm_finalize_pic PROTO ((void));
56.342 ++void arm_finalize_pic PROTO ((int));
56.343 + int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode));
56.344 + int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int));
56.345 + int const_double_rtx_ok_for_fpu PROTO ((Rtx));
56.346 +diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md
56.347 +--- gcc-2.95.3-orig/gcc/config/arm/arm.md Thu Jan 25 15:03:27 2001
56.348 ++++ gcc-2.95.3/gcc/config/arm/arm.md Fri Jul 20 19:39:11 2001
56.349 +@@ -2629,7 +2629,8 @@
56.350 + : preserve_subexpressions_p ()));
56.351 + DONE;
56.352 + }
56.353 +- if (CONSTANT_P (operands[1]) && flag_pic)
56.354 ++ if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
56.355 ++ || label_mentioned_p (operands[1])) && flag_pic)
56.356 + operands[1] = legitimize_pic_address (operands[1], SImode,
56.357 + ((reload_in_progress
56.358 + || reload_completed)
56.359 +@@ -2721,6 +2722,15 @@
56.360 + return \"add%?\\t%0, %|pc, %0\";
56.361 + ")
56.362 +
56.363 ++(define_expand "builtin_setjmp_receiver"
56.364 ++ [(label_ref (match_operand 0 "" ""))]
56.365 ++ "flag_pic"
56.366 ++ "
56.367 ++{
56.368 ++ arm_finalize_pic (0);
56.369 ++ DONE;
56.370 ++}")
56.371 ++
56.372 + ;; If copying one reg to another we can set the condition codes according to
56.373 + ;; its value. Such a move is common after a return from subroutine and the
56.374 + ;; result is being tested against zero.
56.375 +@@ -6184,15 +6194,20 @@
56.376 + abort ();
56.377 + return \"\";
56.378 + }
56.379 +- strcpy (pattern, \"stmfd\\t%m0!, {%1\");
56.380 +- for (i = 1; i < XVECLEN (operands[2], 0); i++)
56.381 ++ if (XVECLEN (operands[2], 0) > 1)
56.382 + {
56.383 +- strcat (pattern, \", %|\");
56.384 +- strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
56.385 ++ strcpy (pattern, \"stmfd\\t%m0!, {%1\");
56.386 ++ for (i = 1; i < XVECLEN (operands[2], 0); i++)
56.387 ++ {
56.388 ++ strcat (pattern, \", %|\");
56.389 ++ strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
56.390 + 0))]);
56.391 ++ }
56.392 ++ strcat (pattern, \"}\");
56.393 ++ output_asm_insn (pattern, operands);
56.394 + }
56.395 +- strcat (pattern, \"}\");
56.396 +- output_asm_insn (pattern, operands);
56.397 ++ else
56.398 ++ output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
56.399 + return \"\";
56.400 + }"
56.401 + [(set_attr "type" "store4")])
56.402 +diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h
56.403 +--- gcc-2.95.3-orig/gcc/config/arm/elf.h Mon May 31 10:21:53 1999
56.404 ++++ gcc-2.95.3/gcc/config/arm/elf.h Fri Jul 20 19:39:11 2001
56.405 +@@ -167,15 +167,6 @@
56.406 + #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
56.407 + #endif
56.408 +
56.409 +-/* Setting this to 32 produces more efficient code, but the value set in previous
56.410 +- versions of this toolchain was 8, which produces more compact structures. The
56.411 +- command line option -mstructure_size_boundary=<n> can be used to change this
56.412 +- value. */
56.413 +-#undef STRUCTURE_SIZE_BOUNDARY
56.414 +-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
56.415 +-
56.416 +-extern int arm_structure_size_boundary;
56.417 +-
56.418 + /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
56.419 + is a valid machine specific attribute for DECL.
56.420 + The attributes in ATTRIBUTES have previously been assigned to DECL. */
56.421 +diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h
56.422 +--- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h Mon Feb 22 17:47:57 1999
56.423 ++++ gcc-2.95.3/gcc/config/arm/linux-gas.h Fri Jul 20 19:39:11 2001
56.424 +@@ -1,6 +1,6 @@
56.425 + /* Definitions of target machine for GNU compiler.
56.426 + ARM Linux-based GNU systems version.
56.427 +- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
56.428 ++ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
56.429 + Contributed by Russell King <rmk92@ecs.soton.ac.uk>.
56.430 +
56.431 + This file is part of GNU CC.
56.432 +@@ -79,5 +79,7 @@
56.433 + register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
56.434 + register unsigned long _end __asm ("a2") = (unsigned long) (END); \
56.435 + register unsigned long _flg __asm ("a3") = 0; \
56.436 +- __asm __volatile ("swi 0x9f0002"); \
56.437 ++ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
56.438 ++ : "=r" (_beg) \
56.439 ++ : "0" (_beg), "r" (_end), "r" (_flg)); \
56.440 + }
56.441 +diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux
56.442 +--- gcc-2.95.3-orig/gcc/config/arm/t-linux Fri Mar 26 16:30:20 1999
56.443 ++++ gcc-2.95.3/gcc/config/arm/t-linux Fri Jul 20 20:46:19 2001
56.444 +@@ -1,6 +1,6 @@
56.445 + # Just for these, we omit the frame pointer since it makes such a big
56.446 + # difference. It is then pointless adding debugging.
56.447 +-TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
56.448 ++TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
56.449 + LIBGCC2_DEBUG_CFLAGS = -g0
56.450 +
56.451 + # Don't build enquire
56.452 +diff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c
56.453 +--- gcc-2.95.3-orig/gcc/final.c Mon Mar 12 13:07:59 2001
56.454 ++++ gcc-2.95.3/gcc/final.c Fri Jul 20 19:39:11 2001
56.455 +@@ -3652,8 +3652,9 @@
56.456 +
56.457 + output_addr_const (file, XEXP (x, 0));
56.458 + fprintf (file, "-");
56.459 +- if (GET_CODE (XEXP (x, 1)) == CONST_INT
56.460 +- && INTVAL (XEXP (x, 1)) < 0)
56.461 ++ if ((GET_CODE (XEXP (x, 1)) == CONST_INT
56.462 ++ && INTVAL (XEXP (x, 1)) < 0)
56.463 ++ || GET_CODE (XEXP (x, 1)) != CONST_INT)
56.464 + {
56.465 + fprintf (file, ASM_OPEN_PAREN);
56.466 + output_addr_const (file, XEXP (x, 1));
56.467 +diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c
56.468 +--- gcc-2.95.3-orig/gcc/function.c Thu Jan 25 15:03:15 2001
56.469 ++++ gcc-2.95.3/gcc/function.c Fri Jul 20 19:39:10 2001
56.470 +@@ -3053,6 +3053,105 @@
56.471 + extracted by usage MEM with narrower mode. */
56.472 + static rtx purge_addressof_replacements;
56.473 +
56.474 ++/* Return 1 if X and Y are identical-looking rtx's.
56.475 ++ This is the Lisp function EQUAL for rtx arguments. */
56.476 ++
56.477 ++int
56.478 ++rtx_equal_for_addressof_p (x, y)
56.479 ++ rtx x, y;
56.480 ++{
56.481 ++ register int i;
56.482 ++ register int j;
56.483 ++ register enum rtx_code code;
56.484 ++ register char *fmt;
56.485 ++
56.486 ++ if (x == y)
56.487 ++ return 1;
56.488 ++ if (x == 0 || y == 0)
56.489 ++ return 0;
56.490 ++
56.491 ++ code = GET_CODE (x);
56.492 ++ /* Rtx's of different codes cannot be equal. */
56.493 ++ if (code != GET_CODE (y))
56.494 ++ return 0;
56.495 ++
56.496 ++ /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
56.497 ++ (REG:SI x) and (REG:HI x) are NOT equivalent.
56.498 ++ But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */
56.499 ++
56.500 ++ if (code != MEM && (GET_MODE (x) != GET_MODE (y)))
56.501 ++ return 0;
56.502 ++
56.503 ++ /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */
56.504 ++
56.505 ++ if (code == REG)
56.506 ++ return REGNO (x) == REGNO (y);
56.507 ++ else if (code == LABEL_REF)
56.508 ++ return XEXP (x, 0) == XEXP (y, 0);
56.509 ++ else if (code == SYMBOL_REF)
56.510 ++ return XSTR (x, 0) == XSTR (y, 0);
56.511 ++ else if (code == SCRATCH || code == CONST_DOUBLE)
56.512 ++ return 0;
56.513 ++
56.514 ++ /* Compare the elements. If any pair of corresponding elements
56.515 ++ fail to match, return 0 for the whole things. */
56.516 ++
56.517 ++ fmt = GET_RTX_FORMAT (code);
56.518 ++ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
56.519 ++ {
56.520 ++ switch (fmt[i])
56.521 ++ {
56.522 ++ case 'w':
56.523 ++ if (XWINT (x, i) != XWINT (y, i))
56.524 ++ return 0;
56.525 ++ break;
56.526 ++
56.527 ++ case 'n':
56.528 ++ case 'i':
56.529 ++ if (XINT (x, i) != XINT (y, i))
56.530 ++ return 0;
56.531 ++ break;
56.532 ++
56.533 ++ case 'V':
56.534 ++ case 'E':
56.535 ++ /* Two vectors must have the same length. */
56.536 ++ if (XVECLEN (x, i) != XVECLEN (y, i))
56.537 ++ return 0;
56.538 ++
56.539 ++ /* And the corresponding elements must match. */
56.540 ++ for (j = 0; j < XVECLEN (x, i); j++)
56.541 ++ if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
56.542 ++ return 0;
56.543 ++ break;
56.544 ++
56.545 ++ case 'e':
56.546 ++ if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
56.547 ++ return 0;
56.548 ++ break;
56.549 ++
56.550 ++ case 'S':
56.551 ++ case 's':
56.552 ++ if (strcmp (XSTR (x, i), XSTR (y, i)))
56.553 ++ return 0;
56.554 ++ break;
56.555 ++
56.556 ++ case 'u':
56.557 ++ /* These are just backpointers, so they don't matter. */
56.558 ++ break;
56.559 ++
56.560 ++ case '0':
56.561 ++ break;
56.562 ++
56.563 ++ /* It is believed that rtx's at this level will never
56.564 ++ contain anything but integers and other rtx's,
56.565 ++ except for within LABEL_REFs and SYMBOL_REFs. */
56.566 ++ default:
56.567 ++ abort ();
56.568 ++ }
56.569 ++ }
56.570 ++ return 1;
56.571 ++}
56.572 ++
56.573 + /* Helper function for purge_addressof. See if the rtx expression at *LOC
56.574 + in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into
56.575 + the stack. */
56.576 +@@ -3133,7 +3232,7 @@
56.577 + for (tem = purge_bitfield_addressof_replacements;
56.578 + tem != NULL_RTX;
56.579 + tem = XEXP (XEXP (tem, 1), 1))
56.580 +- if (rtx_equal_p (x, XEXP (tem, 0)))
56.581 ++ if (rtx_equal_for_addressof_p (x, XEXP (tem, 0)))
56.582 + {
56.583 + *loc = XEXP (XEXP (tem, 1), 0);
56.584 + return;
56.585 +@@ -3143,7 +3242,7 @@
56.586 + for (tem = purge_addressof_replacements;
56.587 + tem != NULL_RTX;
56.588 + tem = XEXP (XEXP (tem, 1), 1))
56.589 +- if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))
56.590 ++ if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0)))
56.591 + {
56.592 + rtx z = XEXP (XEXP (tem, 1), 0);
56.593 +
56.594 +diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c
56.595 +--- gcc-2.95.3-orig/gcc/jump.c Thu Oct 21 08:24:03 1999
56.596 ++++ gcc-2.95.3/gcc/jump.c Fri Jul 20 19:39:10 2001
56.597 +@@ -115,7 +115,7 @@
56.598 + static rtx delete_unreferenced_labels PROTO((rtx));
56.599 + static void delete_noop_moves PROTO((rtx));
56.600 + static int calculate_can_reach_end PROTO((rtx, int, int));
56.601 +-static int duplicate_loop_exit_test PROTO((rtx));
56.602 ++static int duplicate_loop_exit_test PROTO((rtx, int));
56.603 + static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *));
56.604 + static void do_cross_jump PROTO((rtx, rtx, rtx));
56.605 + static int jump_back_p PROTO((rtx, rtx));
56.606 +@@ -338,7 +338,7 @@
56.607 + && simplejump_p (temp1))
56.608 + {
56.609 + temp = PREV_INSN (insn);
56.610 +- if (duplicate_loop_exit_test (insn))
56.611 ++ if (duplicate_loop_exit_test (insn, after_regscan))
56.612 + {
56.613 + changed = 1;
56.614 + next = NEXT_INSN (temp);
56.615 +@@ -2548,8 +2548,9 @@
56.616 + values of regno_first_uid and regno_last_uid. */
56.617 +
56.618 + static int
56.619 +-duplicate_loop_exit_test (loop_start)
56.620 ++duplicate_loop_exit_test (loop_start, after_regscan)
56.621 + rtx loop_start;
56.622 ++ int after_regscan;
56.623 + {
56.624 + rtx insn, set, reg, p, link;
56.625 + rtx copy = 0, first_copy = 0;
56.626 +@@ -2662,6 +2663,9 @@
56.627 + reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg));
56.628 + }
56.629 + }
56.630 ++
56.631 ++ if (after_regscan)
56.632 ++ reg_scan_update (exitcode, lastexit, max_reg);
56.633 +
56.634 + /* Now copy each insn. */
56.635 + for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
56.636 +diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c
56.637 +--- gcc-2.95.3-orig/gcc/varasm.c Mon Feb 19 15:02:02 2001
56.638 ++++ gcc-2.95.3/gcc/varasm.c Fri Jul 20 19:39:11 2001
56.639 +@@ -3286,7 +3286,10 @@
56.640 + value->un.addr.offset = - INTVAL (XEXP (x, 1));
56.641 + }
56.642 + else
56.643 +- abort ();
56.644 ++ {
56.645 ++ value->un.addr.base = x;
56.646 ++ value->un.addr.offset = 0;
56.647 ++ }
56.648 + break;
56.649 +
56.650 + default:
57.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
57.2 +++ b/patches/gcc/2.95.3/110-backport-config.gcc-1.4.patch Sun Sep 23 17:08:09 2007 +0000
57.3 @@ -0,0 +1,35 @@
57.4 +# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.3&r2=1.4
57.5 +# Should fix error
57.6 +# Configuration powerpc-host_apple-darwin7.3.0 not supported
57.7 +# when configuring gcc-2.95 on Mac OS X for i686 target
57.8 +# Also create xm-darwin.h, seems to be required, else we get the error
57.9 +# In file included from .../gcc-2.95.3/gcc/gencheck.c:21:
57.10 +# hconfig.h:11:30: rs6000/xm-darwin.h: No such file or directory
57.11 +# make[1]: *** [gencheck.o] Error 1
57.12 +
57.13 +
57.14 +--- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
57.15 ++++ gcc-2.95.3/gcc/configure 2004-03-24 17:14:38.000000000 -0800
57.16 +@@ -5079,6 +5079,10 @@
57.17 + tmake_file=rs6000/t-beos
57.18 + xmake_file=rs6000/x-beos
57.19 + ;;
57.20 ++ powerpc-*-darwin*)
57.21 ++ xm_file="rs6000/xm-rs6000.h rs6000/xm-darwin.h"
57.22 ++ xmake_file=rs6000/x-darwin
57.23 ++ ;;
57.24 + powerpc-*-sysv* | powerpc-*-elf*)
57.25 + tm_file=rs6000/sysv4.h
57.26 + xm_file="xm-siglist.h rs6000/xm-sysv4.h"
57.27 +--- /dev/null 2003-01-30 02:24:37.000000000 -0800
57.28 ++++ gcc-3.0.4/gcc/config/rs6000/xm-darwin.h 2000-11-20 19:02:09.000000000 -0800
57.29 +@@ -0,0 +1,9 @@
57.30 ++/* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor. */
57.31 ++
57.32 ++#undef USG
57.33 ++
57.34 ++/* Override the usual setting, since Apple's GCC has lame bugs and
57.35 ++ can't handle the initializers. Someday the bugs will be fixed and
57.36 ++ we can get rid of this silliness. */
57.37 ++
57.38 ++#define HAVE_DESIGNATED_INITIALIZERS 0
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
58.2 +++ b/patches/gcc/2.95.3/120-backport-config.gcc-1.92.patch Sun Sep 23 17:08:09 2007 +0000
58.3 @@ -0,0 +1,39 @@
58.4 +# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.91&r2=1.92
58.5 +# Should fix error
58.6 +# Configuration x86_64-host_unknown-linux-gnu not supported
58.7 +# when configuring gcc-2.95 on x86_64 build for i686 target
58.8 +# It's a bit silly, since tm_file refers to files that don't exist,
58.9 +# but as long as x86_64 is just the build machine, that doesn't matter.
58.10 +
58.11 +--- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
58.12 ++++ gcc-2.95.3/gcc/configure 2004-03-24 12:19:30.000000000 -0800
58.13 +@@ -2929,6 +2929,9 @@
58.14 + i[34567]86-*-*)
58.15 + cpu_type=i386
58.16 + ;;
58.17 ++ x86_64-*-*)
58.18 ++ cpu_type=i386
58.19 ++ ;;
58.20 + hppa*-*-*)
58.21 + cpu_type=pa
58.22 + ;;
58.23 +@@ -3643,6 +3646,19 @@
58.24 + thread_file='posix'
58.25 + fi
58.26 + ;;
58.27 ++ x86_64-*-linux*)
58.28 ++ xmake_file=x-linux
58.29 ++ tm_file="i386/biarch64.h i386/i386.h i386/att.h linux.h i386/x86-64.h \
58.30 ++ i386/linux64.h"
58.31 ++ tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
58.32 ++ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
58.33 ++ gnu_ld=yes
58.34 ++ float_format=i386
58.35 ++ if test x$enable_threads = xyes; then
58.36 ++ thread_file='posix'
58.37 ++ fi
58.38 ++ ;;
58.39 ++
58.40 + i[34567]86-*-gnu*)
58.41 + float_format=i386
58.42 + ;;
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
59.2 +++ b/patches/gcc/2.95.3/130-config.sub.patch Sun Sep 23 17:08:09 2007 +0000
59.3 @@ -0,0 +1,1257 @@
59.4 +# Backport from gcc-3.3.3
59.5 +# Fixes errors like
59.6 +# Invalid configuration `x86_64-host_unknown-linux-gnu': machine `x86_64-host_unknown' not recognized
59.7 +# Unrecognized host system name x86_64-host_unknown-linux-gnu.
59.8 +# when configuring on chip types or operating systems like x86_64 or Darwin
59.9 +# which are newer than gcc-2.95
59.10 +
59.11 +--- gcc-2.95.3/config.sub.old 1999-08-04 01:09:26.000000000 -0700
59.12 ++++ gcc-2.95.3/config.sub 2004-03-24 11:28:24.000000000 -0800
59.13 +@@ -1,6 +1,10 @@
59.14 + #! /bin/sh
59.15 +-# Configuration validation subroutine script, version 1.1.
59.16 +-# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
59.17 ++# Configuration validation subroutine script.
59.18 ++# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
59.19 ++# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
59.20 ++
59.21 ++timestamp='2003-01-28'
59.22 ++
59.23 + # This file is (in principle) common to ALL GNU software.
59.24 + # The presence of a machine in this file suggests that SOME GNU software
59.25 + # can handle that machine. It does not imply ALL GNU software can.
59.26 +@@ -25,6 +29,9 @@
59.27 + # configuration script generated by Autoconf, you may include it under
59.28 + # the same distribution terms that you use for the rest of that program.
59.29 +
59.30 ++# Please send patches to <config-patches@gnu.org>. Submit a context
59.31 ++# diff and a properly formatted ChangeLog entry.
59.32 ++#
59.33 + # Configuration subroutine to validate and canonicalize a configuration type.
59.34 + # Supply the specified configuration type as an argument.
59.35 + # If it is invalid, we print an error message on stderr and exit with code 1.
59.36 +@@ -45,30 +52,73 @@
59.37 + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
59.38 + # It is wrong to echo any other type of specification.
59.39 +
59.40 +-if [ x$1 = x ]
59.41 +-then
59.42 +- echo Configuration name missing. 1>&2
59.43 +- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
59.44 +- echo "or $0 ALIAS" 1>&2
59.45 +- echo where ALIAS is a recognized configuration type. 1>&2
59.46 +- exit 1
59.47 +-fi
59.48 ++me=`echo "$0" | sed -e 's,.*/,,'`
59.49 +
59.50 +-# First pass through any local machine types.
59.51 +-case $1 in
59.52 +- *local*)
59.53 +- echo $1
59.54 +- exit 0
59.55 +- ;;
59.56 +- *)
59.57 +- ;;
59.58 ++usage="\
59.59 ++Usage: $0 [OPTION] CPU-MFR-OPSYS
59.60 ++ $0 [OPTION] ALIAS
59.61 ++
59.62 ++Canonicalize a configuration name.
59.63 ++
59.64 ++Operation modes:
59.65 ++ -h, --help print this help, then exit
59.66 ++ -t, --time-stamp print date of last modification, then exit
59.67 ++ -v, --version print version number, then exit
59.68 ++
59.69 ++Report bugs and patches to <config-patches@gnu.org>."
59.70 ++
59.71 ++version="\
59.72 ++GNU config.sub ($timestamp)
59.73 ++
59.74 ++Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
59.75 ++Free Software Foundation, Inc.
59.76 ++
59.77 ++This is free software; see the source for copying conditions. There is NO
59.78 ++warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
59.79 ++
59.80 ++help="
59.81 ++Try \`$me --help' for more information."
59.82 ++
59.83 ++# Parse command line
59.84 ++while test $# -gt 0 ; do
59.85 ++ case $1 in
59.86 ++ --time-stamp | --time* | -t )
59.87 ++ echo "$timestamp" ; exit 0 ;;
59.88 ++ --version | -v )
59.89 ++ echo "$version" ; exit 0 ;;
59.90 ++ --help | --h* | -h )
59.91 ++ echo "$usage"; exit 0 ;;
59.92 ++ -- ) # Stop option processing
59.93 ++ shift; break ;;
59.94 ++ - ) # Use stdin as input.
59.95 ++ break ;;
59.96 ++ -* )
59.97 ++ echo "$me: invalid option $1$help"
59.98 ++ exit 1 ;;
59.99 ++
59.100 ++ *local*)
59.101 ++ # First pass through any local machine types.
59.102 ++ echo $1
59.103 ++ exit 0;;
59.104 ++
59.105 ++ * )
59.106 ++ break ;;
59.107 ++ esac
59.108 ++done
59.109 ++
59.110 ++case $# in
59.111 ++ 0) echo "$me: missing argument$help" >&2
59.112 ++ exit 1;;
59.113 ++ 1) ;;
59.114 ++ *) echo "$me: too many arguments$help" >&2
59.115 ++ exit 1;;
59.116 + esac
59.117 +
59.118 + # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
59.119 + # Here we must recognize all the valid KERNEL-OS combinations.
59.120 + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
59.121 + case $maybe_os in
59.122 +- linux-gnu*)
59.123 ++ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
59.124 + os=-$maybe_os
59.125 + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
59.126 + ;;
59.127 +@@ -94,20 +144,28 @@
59.128 + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
59.129 + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
59.130 + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
59.131 +- -apple)
59.132 ++ -apple | -axis)
59.133 + os=
59.134 + basic_machine=$1
59.135 + ;;
59.136 +- -sim | -cisco | -oki | -wec | -winbond ) # EGCS LOCAL
59.137 ++ -sim | -cisco | -oki | -wec | -winbond)
59.138 + os=
59.139 + basic_machine=$1
59.140 + ;;
59.141 +- -scout) # EGCS LOCAL
59.142 ++ -scout)
59.143 + ;;
59.144 +- -wrs) # EGCS LOCAL
59.145 ++ -wrs)
59.146 + os=-vxworks
59.147 + basic_machine=$1
59.148 + ;;
59.149 ++ -chorusos*)
59.150 ++ os=-chorusos
59.151 ++ basic_machine=$1
59.152 ++ ;;
59.153 ++ -chorusrdb)
59.154 ++ os=-chorusrdb
59.155 ++ basic_machine=$1
59.156 ++ ;;
59.157 + -hiux*)
59.158 + os=-hiuxwe2
59.159 + ;;
59.160 +@@ -156,49 +214,72 @@
59.161 + -psos*)
59.162 + os=-psos
59.163 + ;;
59.164 ++ -mint | -mint[0-9]*)
59.165 ++ basic_machine=m68k-atari
59.166 ++ os=-mint
59.167 ++ ;;
59.168 + esac
59.169 +
59.170 + # Decode aliases for certain CPU-COMPANY combinations.
59.171 + case $basic_machine in
59.172 + # Recognize the basic CPU types without company name.
59.173 + # Some are omitted here because they have special meanings below.
59.174 +- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
59.175 +- | arme[lb] | pyramid | mn10200 | mn10300 \
59.176 +- | tron | a29k | 580 | i960 | h8300 \
59.177 +- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
59.178 +- | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
59.179 +- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
59.180 +- | 1750a | dsp16xx | pdp11 \
59.181 +- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
59.182 +- | mipstx39 | mipstx39el \
59.183 +- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
59.184 +- basic_machine=$basic_machine-unknown
59.185 +- ;;
59.186 +- m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
59.187 +- | h8500 | w65) # EGCS LOCAL
59.188 +- ;;
59.189 +- thumb)
59.190 +- basic_machine=$basic_machine-unknown
59.191 +- ;;
59.192 +- mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
59.193 ++ 1750a | 580 \
59.194 ++ | a29k \
59.195 ++ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
59.196 ++ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
59.197 ++ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
59.198 ++ | clipper \
59.199 ++ | d10v | d30v | dlx | dsp16xx \
59.200 ++ | fr30 | frv \
59.201 ++ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
59.202 ++ | i370 | i860 | i960 | ia64 \
59.203 ++ | ip2k \
59.204 ++ | m32r | m68000 | m68k | m88k | mcore \
59.205 ++ | mips | mipsbe | mipseb | mipsel | mipsle \
59.206 ++ | mips16 \
59.207 ++ | mips64 | mips64el \
59.208 ++ | mips64vr | mips64vrel \
59.209 ++ | mips64orion | mips64orionel \
59.210 ++ | mips64vr4100 | mips64vr4100el \
59.211 ++ | mips64vr4300 | mips64vr4300el \
59.212 ++ | mips64vr5000 | mips64vr5000el \
59.213 ++ | mipsisa32 | mipsisa32el \
59.214 ++ | mipsisa32r2 | mipsisa32r2el \
59.215 ++ | mipsisa64 | mipsisa64el \
59.216 ++ | mipsisa64sb1 | mipsisa64sb1el \
59.217 ++ | mipsisa64sr71k | mipsisa64sr71kel \
59.218 ++ | mipstx39 | mipstx39el \
59.219 ++ | mn10200 | mn10300 \
59.220 ++ | msp430 \
59.221 ++ | ns16k | ns32k \
59.222 ++ | openrisc | or32 \
59.223 ++ | pdp10 | pdp11 | pj | pjl \
59.224 ++ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
59.225 ++ | pyramid \
59.226 ++ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
59.227 ++ | sh64 | sh64le \
59.228 ++ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
59.229 ++ | strongarm \
59.230 ++ | tahoe | thumb | tic80 | tron \
59.231 ++ | v850 | v850e \
59.232 ++ | we32k \
59.233 ++ | x86 | xscale | xstormy16 | xtensa \
59.234 ++ | z8k)
59.235 + basic_machine=$basic_machine-unknown
59.236 + ;;
59.237 +- mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
59.238 +- basic_machine=$basic_machine-unknown
59.239 +- ;;
59.240 +- mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
59.241 +- basic_machine=$basic_machine-unknown
59.242 +- ;;
59.243 +- mips16)
59.244 ++ m6811 | m68hc11 | m6812 | m68hc12)
59.245 ++ # Motorola 68HC11/12.
59.246 + basic_machine=$basic_machine-unknown
59.247 ++ os=-none
59.248 + ;;
59.249 +- d10v)
59.250 +- basic_machine=$basic_machine-unknown
59.251 ++ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
59.252 + ;;
59.253 ++
59.254 + # We use `pc' rather than `unknown'
59.255 + # because (1) that's what they normally are, and
59.256 + # (2) the word "unknown" tends to confuse beginning users.
59.257 +- i[34567]86)
59.258 ++ i*86 | x86_64)
59.259 + basic_machine=$basic_machine-pc
59.260 + ;;
59.261 + # Object if more than one company name word.
59.262 +@@ -207,44 +288,62 @@
59.263 + exit 1
59.264 + ;;
59.265 + # Recognize the basic CPU types with company name.
59.266 +- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
59.267 +- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
59.268 +- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
59.269 +- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
59.270 +- | xmp-* | ymp-* \
59.271 +- | hppa-* | hppa1.0-* | hppa1.1-* \
59.272 +- | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
59.273 +- | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
59.274 +- | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
59.275 +- | xps100-* | clipper-* | orion-* \
59.276 +- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
59.277 +- | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
59.278 +- | mips64el-* | mips64orion-* | mips64orionel-* \
59.279 +- | mipstx39-* | mipstx39el-* \
59.280 +- | f301-* | arm*-*)
59.281 +- ;;
59.282 +- m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
59.283 +- ;;
59.284 +- thumb-*) # EGCS LOCAL angela/thumb
59.285 +- ;;
59.286 +- v850-*) # EGCS LOCAL
59.287 +- ;;
59.288 +- d30v-*) # EGCS LOCAL
59.289 +- ;;
59.290 +- mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
59.291 +- ;;
59.292 +- mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
59.293 +- ;;
59.294 +- mips16-*) # EGCS LOCAL krk/mips16
59.295 +- ;;
59.296 +- tic30-*) # EGCS LOCAL ian/tic30
59.297 +- ;;
59.298 +- c30-*) # EGCS LOCAL ian/tic30
59.299 +- basic_machine=tic30-unknown
59.300 ++ 580-* \
59.301 ++ | a29k-* \
59.302 ++ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
59.303 ++ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
59.304 ++ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
59.305 ++ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
59.306 ++ | avr-* \
59.307 ++ | bs2000-* \
59.308 ++ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
59.309 ++ | clipper-* | cydra-* \
59.310 ++ | d10v-* | d30v-* | dlx-* \
59.311 ++ | elxsi-* \
59.312 ++ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
59.313 ++ | h8300-* | h8500-* \
59.314 ++ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
59.315 ++ | i*86-* | i860-* | i960-* | ia64-* \
59.316 ++ | ip2k-* \
59.317 ++ | m32r-* \
59.318 ++ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
59.319 ++ | m88110-* | m88k-* | mcore-* \
59.320 ++ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
59.321 ++ | mips16-* \
59.322 ++ | mips64-* | mips64el-* \
59.323 ++ | mips64vr-* | mips64vrel-* \
59.324 ++ | mips64orion-* | mips64orionel-* \
59.325 ++ | mips64vr4100-* | mips64vr4100el-* \
59.326 ++ | mips64vr4300-* | mips64vr4300el-* \
59.327 ++ | mips64vr5000-* | mips64vr5000el-* \
59.328 ++ | mipsisa32-* | mipsisa32el-* \
59.329 ++ | mipsisa32r2-* | mipsisa32r2el-* \
59.330 ++ | mipsisa64-* | mipsisa64el-* \
59.331 ++ | mipsisa64sb1-* | mipsisa64sb1el-* \
59.332 ++ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
59.333 ++ | mipstx39-* | mipstx39el-* \
59.334 ++ | msp430-* \
59.335 ++ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
59.336 ++ | orion-* \
59.337 ++ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
59.338 ++ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
59.339 ++ | pyramid-* \
59.340 ++ | romp-* | rs6000-* \
59.341 ++ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
59.342 ++ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
59.343 ++ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
59.344 ++ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
59.345 ++ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
59.346 ++ | v850-* | v850e-* | vax-* \
59.347 ++ | we32k-* \
59.348 ++ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
59.349 ++ | xtensa-* \
59.350 ++ | ymp-* \
59.351 ++ | z8k-*)
59.352 + ;;
59.353 + # Recognize the various machine names and aliases which stand
59.354 + # for a CPU type and a company and sometimes even an OS.
59.355 +- 386bsd) # EGCS LOCAL
59.356 ++ 386bsd)
59.357 + basic_machine=i386-unknown
59.358 + os=-bsd
59.359 + ;;
59.360 +@@ -254,11 +353,11 @@
59.361 + 3b*)
59.362 + basic_machine=we32k-att
59.363 + ;;
59.364 +- a29khif) # EGCS LOCAL
59.365 ++ a29khif)
59.366 + basic_machine=a29k-amd
59.367 + os=-udi
59.368 + ;;
59.369 +- adobe68k) # EGCS LOCAL
59.370 ++ adobe68k)
59.371 + basic_machine=m68010-adobe
59.372 + os=-scout
59.373 + ;;
59.374 +@@ -277,21 +376,21 @@
59.375 + os=-sysv
59.376 + ;;
59.377 + amiga | amiga-*)
59.378 +- basic_machine=m68k-cbm
59.379 ++ basic_machine=m68k-unknown
59.380 + ;;
59.381 + amigaos | amigados)
59.382 +- basic_machine=m68k-cbm
59.383 ++ basic_machine=m68k-unknown
59.384 + os=-amigaos
59.385 + ;;
59.386 + amigaunix | amix)
59.387 +- basic_machine=m68k-cbm
59.388 ++ basic_machine=m68k-unknown
59.389 + os=-sysv4
59.390 + ;;
59.391 + apollo68)
59.392 + basic_machine=m68k-apollo
59.393 + os=-sysv
59.394 + ;;
59.395 +- apollo68bsd) # EGCS LOCAL
59.396 ++ apollo68bsd)
59.397 + basic_machine=m68k-apollo
59.398 + os=-bsd
59.399 + ;;
59.400 +@@ -303,6 +402,10 @@
59.401 + basic_machine=ns32k-sequent
59.402 + os=-dynix
59.403 + ;;
59.404 ++ c90)
59.405 ++ basic_machine=c90-cray
59.406 ++ os=-unicos
59.407 ++ ;;
59.408 + convex-c1)
59.409 + basic_machine=c1-convex
59.410 + os=-bsd
59.411 +@@ -323,27 +426,30 @@
59.412 + basic_machine=c38-convex
59.413 + os=-bsd
59.414 + ;;
59.415 +- cray | ymp)
59.416 +- basic_machine=ymp-cray
59.417 +- os=-unicos
59.418 +- ;;
59.419 +- cray2)
59.420 +- basic_machine=cray2-cray
59.421 +- os=-unicos
59.422 +- ;;
59.423 +- [ctj]90-cray)
59.424 +- basic_machine=c90-cray
59.425 ++ cray | j90)
59.426 ++ basic_machine=j90-cray
59.427 + os=-unicos
59.428 + ;;
59.429 + crds | unos)
59.430 + basic_machine=m68k-crds
59.431 + ;;
59.432 ++ cris | cris-* | etrax*)
59.433 ++ basic_machine=cris-axis
59.434 ++ ;;
59.435 + da30 | da30-*)
59.436 + basic_machine=m68k-da30
59.437 + ;;
59.438 + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
59.439 + basic_machine=mips-dec
59.440 + ;;
59.441 ++ decsystem10* | dec10*)
59.442 ++ basic_machine=pdp10-dec
59.443 ++ os=-tops10
59.444 ++ ;;
59.445 ++ decsystem20* | dec20*)
59.446 ++ basic_machine=pdp10-dec
59.447 ++ os=-tops20
59.448 ++ ;;
59.449 + delta | 3300 | motorola-3300 | motorola-delta \
59.450 + | 3300-motorola | delta-motorola)
59.451 + basic_machine=m68k-motorola
59.452 +@@ -371,7 +477,7 @@
59.453 + encore | umax | mmax)
59.454 + basic_machine=ns32k-encore
59.455 + ;;
59.456 +- es1800 | OSE68k | ose68k | ose | OSE) # EGCS LOCAL
59.457 ++ es1800 | OSE68k | ose68k | ose | OSE)
59.458 + basic_machine=m68k-ericsson
59.459 + os=-ose
59.460 + ;;
59.461 +@@ -385,6 +491,10 @@
59.462 + basic_machine=tron-gmicro
59.463 + os=-sysv
59.464 + ;;
59.465 ++ go32)
59.466 ++ basic_machine=i386-pc
59.467 ++ os=-go32
59.468 ++ ;;
59.469 + h3050r* | hiux*)
59.470 + basic_machine=hppa1.1-hitachi
59.471 + os=-hiuxwe2
59.472 +@@ -393,11 +503,11 @@
59.473 + basic_machine=h8300-hitachi
59.474 + os=-hms
59.475 + ;;
59.476 +- h8300xray) # EGCS LOCAL
59.477 ++ h8300xray)
59.478 + basic_machine=h8300-hitachi
59.479 + os=-xray
59.480 + ;;
59.481 +- h8500hms) # EGCS LOCAL
59.482 ++ h8500hms)
59.483 + basic_machine=h8500-hitachi
59.484 + os=-hms
59.485 + ;;
59.486 +@@ -416,22 +526,6 @@
59.487 + basic_machine=m68k-hp
59.488 + os=-hpux
59.489 + ;;
59.490 +- w89k-*) # EGCS LOCAL
59.491 +- basic_machine=hppa1.1-winbond
59.492 +- os=-proelf
59.493 +- ;;
59.494 +- op50n-*) # EGCS LOCAL
59.495 +- basic_machine=hppa1.1-oki
59.496 +- os=-proelf
59.497 +- ;;
59.498 +- op60c-*) # EGCS LOCAL
59.499 +- basic_machine=hppa1.1-oki
59.500 +- os=-proelf
59.501 +- ;;
59.502 +- hppro) # EGCS LOCAL
59.503 +- basic_machine=hppa1.1-hp
59.504 +- os=-proelf
59.505 +- ;;
59.506 + hp3k9[0-9][0-9] | hp9[0-9][0-9])
59.507 + basic_machine=hppa1.0-hp
59.508 + ;;
59.509 +@@ -441,22 +535,21 @@
59.510 + hp9k3[2-9][0-9])
59.511 + basic_machine=m68k-hp
59.512 + ;;
59.513 +- hp9k6[0-9][0-9] | hp6[0-9][0-9] )
59.514 ++ hp9k6[0-9][0-9] | hp6[0-9][0-9])
59.515 + basic_machine=hppa1.0-hp
59.516 + ;;
59.517 +- hp9k7[0-79][0-9] | hp7[0-79][0-9] )
59.518 ++ hp9k7[0-79][0-9] | hp7[0-79][0-9])
59.519 + basic_machine=hppa1.1-hp
59.520 + ;;
59.521 +- hp9k78[0-9] | hp78[0-9] )
59.522 ++ hp9k78[0-9] | hp78[0-9])
59.523 + # FIXME: really hppa2.0-hp
59.524 + basic_machine=hppa1.1-hp
59.525 + ;;
59.526 +- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
59.527 +- hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
59.528 ++ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
59.529 + # FIXME: really hppa2.0-hp
59.530 + basic_machine=hppa1.1-hp
59.531 + ;;
59.532 +- hp9k8[0-9][13679] | hp8[0-9][13679] )
59.533 ++ hp9k8[0-9][13679] | hp8[0-9][13679])
59.534 + basic_machine=hppa1.1-hp
59.535 + ;;
59.536 + hp9k8[0-9][0-9] | hp8[0-9][0-9])
59.537 +@@ -465,47 +558,42 @@
59.538 + hppa-next)
59.539 + os=-nextstep3
59.540 + ;;
59.541 +- hppaosf) # EGCS LOCAL
59.542 ++ hppaosf)
59.543 + basic_machine=hppa1.1-hp
59.544 + os=-osf
59.545 + ;;
59.546 ++ hppro)
59.547 ++ basic_machine=hppa1.1-hp
59.548 ++ os=-proelf
59.549 ++ ;;
59.550 + i370-ibm* | ibm*)
59.551 + basic_machine=i370-ibm
59.552 +- os=-mvs
59.553 + ;;
59.554 + # I'm not sure what "Sysv32" means. Should this be sysv3.2?
59.555 +- i[34567]86v32)
59.556 ++ i*86v32)
59.557 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
59.558 + os=-sysv32
59.559 + ;;
59.560 +- i[34567]86v4*)
59.561 ++ i*86v4*)
59.562 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
59.563 + os=-sysv4
59.564 + ;;
59.565 +- i[34567]86v)
59.566 ++ i*86v)
59.567 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
59.568 + os=-sysv
59.569 + ;;
59.570 +- i[34567]86sol2)
59.571 ++ i*86sol2)
59.572 + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
59.573 + os=-solaris2
59.574 + ;;
59.575 +- i386mach) # EGCS LOCAL
59.576 ++ i386mach)
59.577 + basic_machine=i386-mach
59.578 + os=-mach
59.579 + ;;
59.580 +- i386-vsta | vsta) # EGCS LOCAL
59.581 ++ i386-vsta | vsta)
59.582 + basic_machine=i386-unknown
59.583 + os=-vsta
59.584 + ;;
59.585 +- i386-go32 | go32) # EGCS LOCAL
59.586 +- basic_machine=i386-unknown
59.587 +- os=-go32
59.588 +- ;;
59.589 +- i386-mingw32 | mingw32)
59.590 +- basic_machine=i386-unknown
59.591 +- os=-mingw32
59.592 +- ;;
59.593 + iris | iris4d)
59.594 + basic_machine=mips-sgi
59.595 + case $os in
59.596 +@@ -531,16 +619,16 @@
59.597 + basic_machine=ns32k-utek
59.598 + os=-sysv
59.599 + ;;
59.600 ++ mingw32)
59.601 ++ basic_machine=i386-pc
59.602 ++ os=-mingw32
59.603 ++ ;;
59.604 + miniframe)
59.605 + basic_machine=m68000-convergent
59.606 + ;;
59.607 +- mipsel*-linux*)
59.608 +- basic_machine=mipsel-unknown
59.609 +- os=-linux-gnu
59.610 +- ;;
59.611 +- mips*-linux*)
59.612 +- basic_machine=mips-unknown
59.613 +- os=-linux-gnu
59.614 ++ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
59.615 ++ basic_machine=m68k-atari
59.616 ++ os=-mint
59.617 + ;;
59.618 + mips3*-*)
59.619 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
59.620 +@@ -548,24 +636,36 @@
59.621 + mips3*)
59.622 + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
59.623 + ;;
59.624 +- monitor) # EGCS LOCAL
59.625 ++ mmix*)
59.626 ++ basic_machine=mmix-knuth
59.627 ++ os=-mmixware
59.628 ++ ;;
59.629 ++ monitor)
59.630 + basic_machine=m68k-rom68k
59.631 + os=-coff
59.632 + ;;
59.633 +- msdos) # EGCS LOCAL
59.634 +- basic_machine=i386-unknown
59.635 ++ morphos)
59.636 ++ basic_machine=powerpc-unknown
59.637 ++ os=-morphos
59.638 ++ ;;
59.639 ++ msdos)
59.640 ++ basic_machine=i386-pc
59.641 + os=-msdos
59.642 + ;;
59.643 ++ mvs)
59.644 ++ basic_machine=i370-ibm
59.645 ++ os=-mvs
59.646 ++ ;;
59.647 + ncr3000)
59.648 + basic_machine=i486-ncr
59.649 + os=-sysv4
59.650 + ;;
59.651 + netbsd386)
59.652 +- basic_machine=i386-unknown # EGCS LOCAL
59.653 ++ basic_machine=i386-unknown
59.654 + os=-netbsd
59.655 + ;;
59.656 + netwinder)
59.657 +- basic_machine=armv4l-corel
59.658 ++ basic_machine=armv4l-rebel
59.659 + os=-linux
59.660 + ;;
59.661 + news | news700 | news800 | news900)
59.662 +@@ -580,7 +680,7 @@
59.663 + basic_machine=mips-sony
59.664 + os=-newsos
59.665 + ;;
59.666 +- necv70) # EGCS LOCAL
59.667 ++ necv70)
59.668 + basic_machine=v70-nec
59.669 + os=-sysv
59.670 + ;;
59.671 +@@ -609,18 +709,37 @@
59.672 + basic_machine=i960-intel
59.673 + os=-nindy
59.674 + ;;
59.675 +- mon960) # EGCS LOCAL
59.676 ++ mon960)
59.677 + basic_machine=i960-intel
59.678 + os=-mon960
59.679 + ;;
59.680 ++ nonstopux)
59.681 ++ basic_machine=mips-compaq
59.682 ++ os=-nonstopux
59.683 ++ ;;
59.684 + np1)
59.685 + basic_machine=np1-gould
59.686 + ;;
59.687 +- OSE68000 | ose68000) # EGCS LOCAL
59.688 ++ nv1)
59.689 ++ basic_machine=nv1-cray
59.690 ++ os=-unicosmp
59.691 ++ ;;
59.692 ++ nsr-tandem)
59.693 ++ basic_machine=nsr-tandem
59.694 ++ ;;
59.695 ++ op50n-* | op60c-*)
59.696 ++ basic_machine=hppa1.1-oki
59.697 ++ os=-proelf
59.698 ++ ;;
59.699 ++ or32 | or32-*)
59.700 ++ basic_machine=or32-unknown
59.701 ++ os=-coff
59.702 ++ ;;
59.703 ++ OSE68000 | ose68000)
59.704 + basic_machine=m68000-ericsson
59.705 + os=-ose
59.706 + ;;
59.707 +- os68k) # EGCS LOCAL
59.708 ++ os68k)
59.709 + basic_machine=m68k-none
59.710 + os=-os68k
59.711 + ;;
59.712 +@@ -638,46 +757,60 @@
59.713 + pbb)
59.714 + basic_machine=m68k-tti
59.715 + ;;
59.716 +- pc532 | pc532-*)
59.717 ++ pc532 | pc532-*)
59.718 + basic_machine=ns32k-pc532
59.719 + ;;
59.720 +- pentium | p5 | k5 | k6 | nexen)
59.721 ++ pentium | p5 | k5 | k6 | nexgen | viac3)
59.722 + basic_machine=i586-pc
59.723 + ;;
59.724 +- pentiumpro | p6 | 6x86)
59.725 ++ pentiumpro | p6 | 6x86 | athlon | athlon_*)
59.726 + basic_machine=i686-pc
59.727 + ;;
59.728 + pentiumii | pentium2)
59.729 +- basic_machine=i786-pc
59.730 ++ basic_machine=i686-pc
59.731 + ;;
59.732 +- pentium-* | p5-* | k5-* | k6-* | nexen-*)
59.733 ++ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
59.734 + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
59.735 + ;;
59.736 +- pentiumpro-* | p6-* | 6x86-*)
59.737 ++ pentiumpro-* | p6-* | 6x86-* | athlon-*)
59.738 + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
59.739 + ;;
59.740 + pentiumii-* | pentium2-*)
59.741 +- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
59.742 ++ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
59.743 + ;;
59.744 + pn)
59.745 + basic_machine=pn-gould
59.746 + ;;
59.747 +- power) basic_machine=rs6000-ibm
59.748 ++ power) basic_machine=power-ibm
59.749 + ;;
59.750 + ppc) basic_machine=powerpc-unknown
59.751 +- ;;
59.752 ++ ;;
59.753 + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
59.754 + ;;
59.755 + ppcle | powerpclittle | ppc-le | powerpc-little)
59.756 + basic_machine=powerpcle-unknown
59.757 +- ;;
59.758 ++ ;;
59.759 + ppcle-* | powerpclittle-*)
59.760 + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
59.761 + ;;
59.762 ++ ppc64) basic_machine=powerpc64-unknown
59.763 ++ ;;
59.764 ++ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
59.765 ++ ;;
59.766 ++ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
59.767 ++ basic_machine=powerpc64le-unknown
59.768 ++ ;;
59.769 ++ ppc64le-* | powerpc64little-*)
59.770 ++ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
59.771 ++ ;;
59.772 + ps2)
59.773 + basic_machine=i386-ibm
59.774 + ;;
59.775 +- rom68k) # EGCS LOCAL
59.776 ++ pw32)
59.777 ++ basic_machine=i586-unknown
59.778 ++ os=-pw32
59.779 ++ ;;
59.780 ++ rom68k)
59.781 + basic_machine=m68k-rom68k
59.782 + os=-coff
59.783 + ;;
59.784 +@@ -687,10 +820,22 @@
59.785 + rtpc | rtpc-*)
59.786 + basic_machine=romp-ibm
59.787 + ;;
59.788 +- sa29200) # EGCS LOCAL
59.789 ++ s390 | s390-*)
59.790 ++ basic_machine=s390-ibm
59.791 ++ ;;
59.792 ++ s390x | s390x-*)
59.793 ++ basic_machine=s390x-ibm
59.794 ++ ;;
59.795 ++ sa29200)
59.796 + basic_machine=a29k-amd
59.797 + os=-udi
59.798 + ;;
59.799 ++ sb1)
59.800 ++ basic_machine=mipsisa64sb1-unknown
59.801 ++ ;;
59.802 ++ sb1el)
59.803 ++ basic_machine=mipsisa64sb1el-unknown
59.804 ++ ;;
59.805 + sequent)
59.806 + basic_machine=i386-sequent
59.807 + ;;
59.808 +@@ -698,7 +843,7 @@
59.809 + basic_machine=sh-hitachi
59.810 + os=-hms
59.811 + ;;
59.812 +- sparclite-wrs) # EGCS LOCAL
59.813 ++ sparclite-wrs | simso-wrs)
59.814 + basic_machine=sparclite-wrs
59.815 + os=-vxworks
59.816 + ;;
59.817 +@@ -709,10 +854,10 @@
59.818 + spur)
59.819 + basic_machine=spur-unknown
59.820 + ;;
59.821 +- st2000) # EGCS LOCAL
59.822 ++ st2000)
59.823 + basic_machine=m68k-tandem
59.824 + ;;
59.825 +- stratus) # EGCS LOCAL
59.826 ++ stratus)
59.827 + basic_machine=i860-stratus
59.828 + os=-sysv4
59.829 + ;;
59.830 +@@ -756,16 +901,40 @@
59.831 + sun386 | sun386i | roadrunner)
59.832 + basic_machine=i386-sun
59.833 + ;;
59.834 ++ sv1)
59.835 ++ basic_machine=sv1-cray
59.836 ++ os=-unicos
59.837 ++ ;;
59.838 + symmetry)
59.839 + basic_machine=i386-sequent
59.840 + os=-dynix
59.841 + ;;
59.842 ++ t3e)
59.843 ++ basic_machine=alphaev5-cray
59.844 ++ os=-unicos
59.845 ++ ;;
59.846 ++ t90)
59.847 ++ basic_machine=t90-cray
59.848 ++ os=-unicos
59.849 ++ ;;
59.850 ++ tic4x | c4x*)
59.851 ++ basic_machine=tic4x-unknown
59.852 ++ os=-coff
59.853 ++ ;;
59.854 ++ tic54x | c54x*)
59.855 ++ basic_machine=tic54x-unknown
59.856 ++ os=-coff
59.857 ++ ;;
59.858 + tx39)
59.859 + basic_machine=mipstx39-unknown
59.860 + ;;
59.861 + tx39el)
59.862 + basic_machine=mipstx39el-unknown
59.863 + ;;
59.864 ++ toad1)
59.865 ++ basic_machine=pdp10-xkl
59.866 ++ os=-tops20
59.867 ++ ;;
59.868 + tower | tower-32)
59.869 + basic_machine=m68k-ncr
59.870 + ;;
59.871 +@@ -777,7 +946,7 @@
59.872 + basic_machine=a29k-nyu
59.873 + os=-sym1
59.874 + ;;
59.875 +- v810 | necv810) # EGCS LOCAL
59.876 ++ v810 | necv810)
59.877 + basic_machine=v810-nec
59.878 + os=-none
59.879 + ;;
59.880 +@@ -790,8 +959,8 @@
59.881 + os=-vms
59.882 + ;;
59.883 + vpp*|vx|vx-*)
59.884 +- basic_machine=f301-fujitsu
59.885 +- ;;
59.886 ++ basic_machine=f301-fujitsu
59.887 ++ ;;
59.888 + vxworks960)
59.889 + basic_machine=i960-wrs
59.890 + os=-vxworks
59.891 +@@ -804,18 +973,22 @@
59.892 + basic_machine=a29k-wrs
59.893 + os=-vxworks
59.894 + ;;
59.895 +- w65*) # EGCS LOCAL
59.896 +- basic_machine=w65-wdc
59.897 +- os=-none
59.898 ++ w65*)
59.899 ++ basic_machine=w65-wdc
59.900 ++ os=-none
59.901 + ;;
59.902 +- xmp)
59.903 +- basic_machine=xmp-cray
59.904 +- os=-unicos
59.905 ++ w89k-*)
59.906 ++ basic_machine=hppa1.1-winbond
59.907 ++ os=-proelf
59.908 + ;;
59.909 +- xps | xps100)
59.910 ++ xps | xps100)
59.911 + basic_machine=xps100-honeywell
59.912 + ;;
59.913 +- z8k-*-coff) # EGCS LOCAL
59.914 ++ ymp)
59.915 ++ basic_machine=ymp-cray
59.916 ++ os=-unicos
59.917 ++ ;;
59.918 ++ z8k-*-coff)
59.919 + basic_machine=z8k-unknown
59.920 + os=-sim
59.921 + ;;
59.922 +@@ -826,22 +999,15 @@
59.923 +
59.924 + # Here we handle the default manufacturer of certain CPU types. It is in
59.925 + # some cases the only manufacturer, in others, it is the most popular.
59.926 +- w89k) # EGCS LOCAL
59.927 ++ w89k)
59.928 + basic_machine=hppa1.1-winbond
59.929 + ;;
59.930 +- op50n) # EGCS LOCAL
59.931 ++ op50n)
59.932 + basic_machine=hppa1.1-oki
59.933 + ;;
59.934 +- op60c) # EGCS LOCAL
59.935 ++ op60c)
59.936 + basic_machine=hppa1.1-oki
59.937 + ;;
59.938 +- mips)
59.939 +- if [ x$os = x-linux-gnu ]; then
59.940 +- basic_machine=mips-unknown
59.941 +- else
59.942 +- basic_machine=mips-mips
59.943 +- fi
59.944 +- ;;
59.945 + romp)
59.946 + basic_machine=romp-ibm
59.947 + ;;
59.948 +@@ -851,16 +1017,26 @@
59.949 + vax)
59.950 + basic_machine=vax-dec
59.951 + ;;
59.952 ++ pdp10)
59.953 ++ # there are many clones, so DEC is not a safe bet
59.954 ++ basic_machine=pdp10-unknown
59.955 ++ ;;
59.956 + pdp11)
59.957 + basic_machine=pdp11-dec
59.958 + ;;
59.959 + we32k)
59.960 + basic_machine=we32k-att
59.961 + ;;
59.962 +- sparc | sparcv9)
59.963 ++ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
59.964 ++ basic_machine=sh-unknown
59.965 ++ ;;
59.966 ++ sh64)
59.967 ++ basic_machine=sh64-unknown
59.968 ++ ;;
59.969 ++ sparc | sparcv9 | sparcv9b)
59.970 + basic_machine=sparc-sun
59.971 + ;;
59.972 +- cydra)
59.973 ++ cydra)
59.974 + basic_machine=cydra-cydrome
59.975 + ;;
59.976 + orion)
59.977 +@@ -869,16 +1045,15 @@
59.978 + orion105)
59.979 + basic_machine=clipper-highlevel
59.980 + ;;
59.981 +- mac | mpw | mac-mpw) # EGCS LOCAL
59.982 ++ mac | mpw | mac-mpw)
59.983 + basic_machine=m68k-apple
59.984 + ;;
59.985 +- pmac | pmac-mpw) # EGCS LOCAL
59.986 ++ pmac | pmac-mpw)
59.987 + basic_machine=powerpc-apple
59.988 + ;;
59.989 +- c4x*)
59.990 +- basic_machine=c4x-none
59.991 +- os=-coff
59.992 +- ;;
59.993 ++ *-unknown)
59.994 ++ # Make sure to match an already-canonicalized machine name.
59.995 ++ ;;
59.996 + *)
59.997 + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
59.998 + exit 1
59.999 +@@ -935,20 +1110,38 @@
59.1000 + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
59.1001 + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
59.1002 + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
59.1003 ++ | -chorusos* | -chorusrdb* \
59.1004 + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
59.1005 + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
59.1006 +- | -interix* | -uwin* )
59.1007 ++ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
59.1008 ++ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
59.1009 ++ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
59.1010 ++ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
59.1011 ++ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
59.1012 ++ | -powermax* | -dnix* | -microbsd*)
59.1013 + # Remember, each alternative MUST END IN *, to match a version number.
59.1014 + ;;
59.1015 +- # EGCS LOCAL
59.1016 ++ -qnx*)
59.1017 ++ case $basic_machine in
59.1018 ++ x86-* | i*86-*)
59.1019 ++ ;;
59.1020 ++ *)
59.1021 ++ os=-nto$os
59.1022 ++ ;;
59.1023 ++ esac
59.1024 ++ ;;
59.1025 ++ -nto-qnx*)
59.1026 ++ ;;
59.1027 ++ -nto*)
59.1028 ++ os=`echo $os | sed -e 's|nto|nto-qnx|'`
59.1029 ++ ;;
59.1030 + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
59.1031 +- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
59.1032 +- | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
59.1033 ++ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
59.1034 ++ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
59.1035 + ;;
59.1036 + -mac*)
59.1037 + os=`echo $os | sed -e 's|mac|macos|'`
59.1038 + ;;
59.1039 +- # END EGCS LOCAL
59.1040 + -linux*)
59.1041 + os=`echo $os | sed -e 's|linux|linux-gnu|'`
59.1042 + ;;
59.1043 +@@ -958,6 +1151,12 @@
59.1044 + -sunos6*)
59.1045 + os=`echo $os | sed -e 's|sunos6|solaris3|'`
59.1046 + ;;
59.1047 ++ -opened*)
59.1048 ++ os=-openedition
59.1049 ++ ;;
59.1050 ++ -wince*)
59.1051 ++ os=-wince
59.1052 ++ ;;
59.1053 + -osfrose*)
59.1054 + os=-osfrose
59.1055 + ;;
59.1056 +@@ -973,14 +1172,23 @@
59.1057 + -acis*)
59.1058 + os=-aos
59.1059 + ;;
59.1060 +- -386bsd) # EGCS LOCAL
59.1061 ++ -atheos*)
59.1062 ++ os=-atheos
59.1063 ++ ;;
59.1064 ++ -386bsd)
59.1065 + os=-bsd
59.1066 + ;;
59.1067 + -ctix* | -uts*)
59.1068 + os=-sysv
59.1069 + ;;
59.1070 ++ -nova*)
59.1071 ++ os=-rtmk-nova
59.1072 ++ ;;
59.1073 + -ns2 )
59.1074 +- os=-nextstep2
59.1075 ++ os=-nextstep2
59.1076 ++ ;;
59.1077 ++ -nsk*)
59.1078 ++ os=-nsk
59.1079 + ;;
59.1080 + # Preserve the version number of sinix5.
59.1081 + -sinix5.*)
59.1082 +@@ -1007,15 +1215,21 @@
59.1083 + # This must come after -sysvr4.
59.1084 + -sysv*)
59.1085 + ;;
59.1086 +- -ose*) # EGCS LOCAL
59.1087 ++ -ose*)
59.1088 + os=-ose
59.1089 + ;;
59.1090 +- -es1800*) # EGCS LOCAL
59.1091 ++ -es1800*)
59.1092 + os=-ose
59.1093 + ;;
59.1094 + -xenix)
59.1095 + os=-xenix
59.1096 + ;;
59.1097 ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
59.1098 ++ os=-mint
59.1099 ++ ;;
59.1100 ++ -aros*)
59.1101 ++ os=-aros
59.1102 ++ ;;
59.1103 + -none)
59.1104 + ;;
59.1105 + *)
59.1106 +@@ -1041,13 +1255,17 @@
59.1107 + *-acorn)
59.1108 + os=-riscix1.2
59.1109 + ;;
59.1110 +- arm*-corel)
59.1111 ++ arm*-rebel)
59.1112 + os=-linux
59.1113 + ;;
59.1114 + arm*-semi)
59.1115 + os=-aout
59.1116 + ;;
59.1117 +- pdp11-*)
59.1118 ++ # This must come before the *-dec entry.
59.1119 ++ pdp10-*)
59.1120 ++ os=-tops20
59.1121 ++ ;;
59.1122 ++ pdp11-*)
59.1123 + os=-none
59.1124 + ;;
59.1125 + *-dec | vax-*)
59.1126 +@@ -1065,15 +1283,18 @@
59.1127 + # default.
59.1128 + # os=-sunos4
59.1129 + ;;
59.1130 +- m68*-cisco) # EGCS LOCAL
59.1131 ++ m68*-cisco)
59.1132 + os=-aout
59.1133 + ;;
59.1134 +- mips*-cisco) # EGCS LOCAL
59.1135 ++ mips*-cisco)
59.1136 + os=-elf
59.1137 + ;;
59.1138 +- mips*-*) # EGCS LOCAL
59.1139 +- os=-elf
59.1140 +- ;;
59.1141 ++ mips*-*)
59.1142 ++ os=-elf
59.1143 ++ ;;
59.1144 ++ or32-*)
59.1145 ++ os=-coff
59.1146 ++ ;;
59.1147 + *-tti) # must be before sparc entry or we get the wrong os.
59.1148 + os=-sysv3
59.1149 + ;;
59.1150 +@@ -1086,13 +1307,13 @@
59.1151 + *-ibm)
59.1152 + os=-aix
59.1153 + ;;
59.1154 +- *-wec) # EGCS LOCAL
59.1155 ++ *-wec)
59.1156 + os=-proelf
59.1157 + ;;
59.1158 +- *-winbond) # EGCS LOCAL
59.1159 ++ *-winbond)
59.1160 + os=-proelf
59.1161 + ;;
59.1162 +- *-oki) # EGCS LOCAL
59.1163 ++ *-oki)
59.1164 + os=-proelf
59.1165 + ;;
59.1166 + *-hp)
59.1167 +@@ -1137,36 +1358,39 @@
59.1168 + *-next)
59.1169 + os=-nextstep3
59.1170 + ;;
59.1171 +- *-gould)
59.1172 ++ *-gould)
59.1173 + os=-sysv
59.1174 + ;;
59.1175 +- *-highlevel)
59.1176 ++ *-highlevel)
59.1177 + os=-bsd
59.1178 + ;;
59.1179 + *-encore)
59.1180 + os=-bsd
59.1181 + ;;
59.1182 +- *-sgi)
59.1183 ++ *-sgi)
59.1184 + os=-irix
59.1185 + ;;
59.1186 +- *-siemens)
59.1187 ++ *-siemens)
59.1188 + os=-sysv4
59.1189 + ;;
59.1190 + *-masscomp)
59.1191 + os=-rtu
59.1192 + ;;
59.1193 +- f301-fujitsu)
59.1194 ++ f30[01]-fujitsu | f700-fujitsu)
59.1195 + os=-uxpv
59.1196 + ;;
59.1197 +- *-rom68k) # EGCS LOCAL
59.1198 ++ *-rom68k)
59.1199 + os=-coff
59.1200 + ;;
59.1201 +- *-*bug) # EGCS LOCAL
59.1202 ++ *-*bug)
59.1203 + os=-coff
59.1204 + ;;
59.1205 +- *-apple) # EGCS LOCAL
59.1206 ++ *-apple)
59.1207 + os=-macos
59.1208 + ;;
59.1209 ++ *-atari*)
59.1210 ++ os=-mint
59.1211 ++ ;;
59.1212 + *)
59.1213 + os=-none
59.1214 + ;;
59.1215 +@@ -1212,27 +1436,41 @@
59.1216 + -genix*)
59.1217 + vendor=ns
59.1218 + ;;
59.1219 +- -mvs*)
59.1220 ++ -mvs* | -opened*)
59.1221 + vendor=ibm
59.1222 + ;;
59.1223 + -ptx*)
59.1224 + vendor=sequent
59.1225 + ;;
59.1226 +- -vxsim* | -vxworks*)
59.1227 ++ -vxsim* | -vxworks* | -windiss*)
59.1228 + vendor=wrs
59.1229 + ;;
59.1230 + -aux*)
59.1231 + vendor=apple
59.1232 + ;;
59.1233 +- -hms*) # EGCS LOCAL
59.1234 ++ -hms*)
59.1235 + vendor=hitachi
59.1236 + ;;
59.1237 +- -mpw* | -macos*) # EGCS LOCAL
59.1238 ++ -mpw* | -macos*)
59.1239 + vendor=apple
59.1240 + ;;
59.1241 ++ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
59.1242 ++ vendor=atari
59.1243 ++ ;;
59.1244 ++ -vos*)
59.1245 ++ vendor=stratus
59.1246 ++ ;;
59.1247 + esac
59.1248 + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
59.1249 + ;;
59.1250 + esac
59.1251 +
59.1252 + echo $basic_machine$os
59.1253 ++exit 0
59.1254 ++
59.1255 ++# Local variables:
59.1256 ++# eval: (add-hook 'write-file-hooks 'time-stamp)
59.1257 ++# time-stamp-start: "timestamp='"
59.1258 ++# time-stamp-format: "%:y-%02m-%02d"
59.1259 ++# time-stamp-end: "'"
59.1260 ++# End:
60.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
60.2 +++ b/patches/gcc/2.95.3/140-deque-leak-fix.patch Sun Sep 23 17:08:09 2007 +0000
60.3 @@ -0,0 +1,31 @@
60.4 +[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
60.5 +
60.6 +Date: Fri, 16 Nov 2001 16:06:22 -0500
60.7 +From: Phil Edwards <pedwards at disaster dot jaj dot com>
60.8 +To: gcc-patches at gcc dot gnu dot org
60.9 +Subject: [libstdc++ trunk & 3.0] Fix deque memory leak
60.10 +Message-ID: <20011116160622.A23094@disaster.jaj.com>
60.11 +
60.12 +
60.13 +As discussed on the libstdc++ mailing list. Tested on i686/linux.
60.14 +
60.15 +
60.16 +
60.17 +2001-11-16 Paolo Carlini <pcarlini@unitus.it>
60.18 +
60.19 + * include/bits/stl_deque.h (deque::erase()): Fix memory leak.
60.20 +
60.21 +
60.22 +[rediffed against 2.95.3 -- dank]
60.23 +
60.24 +--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old 2001-01-01 09:48:22.000000000 -0800
60.25 ++++ gcc-2.95.3/libstdc++/stl/stl_deque.h 2006-02-18 15:24:17.000000000 -0800
60.26 +@@ -1052,7 +1052,7 @@
60.27 + copy_backward(_M_start, __first, __last);
60.28 + iterator __new_start = _M_start + __n;
60.29 + destroy(_M_start, __new_start);
60.30 +- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
60.31 ++ _M_destroy_nodes(_M_start._M_node, __new_start._M_node); /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
60.32 + _M_start = __new_start;
60.33 + }
60.34 + else {
61.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
61.2 +++ b/patches/gcc/2.95.3/150-gcc-2.95.3-cygwin-020611.patch Sun Sep 23 17:08:09 2007 +0000
61.3 @@ -0,0 +1,33 @@
61.4 +[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
61.5 + on the end of every executable, even if they're linux executable.
61.6 + This is highly annoying, and causes glibc build failures that look like this:
61.7 + mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
61.8 + make[2]: *** [.../bin/makedb] Error 1
61.9 + make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
61.10 +
61.11 + The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
61.12 + but that doesn't apply cleanly to gcc-2.95.3.
61.13 +
61.14 + So, I'm using
61.15 + http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
61.16 + This is the only patch in crosstool that *isn't* suitable for the mainline.
61.17 + I can live with this patch simply because crosstool does not build
61.18 + compilers that target cygwin or VAX/VMS.
61.19 + If that ever changes, I might need to try applying the real patch.
61.20 +]
61.21 +
61.22 +
61.23 +
61.24 +#
61.25 +# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
61.26 +#
61.27 +--- gcc-2.95.3/gcc/config/i386/xm-cygwin.h 1999-04-22 16:40:56.000000000 +0200
61.28 ++++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h 2002-06-11 08:23:18.000000000 +0200
61.29 +@@ -19,7 +19,6 @@
61.30 + the Free Software Foundation, 59 Temple Place - Suite 330,
61.31 + Boston, MA 02111-1307, USA. */
61.32 +
61.33 +-#define EXECUTABLE_SUFFIX ".exe"
61.34 + #define NO_SYS_SIGLIST 1
61.35 +
61.36 + /* We support both "/" and "\" since everybody tests both but we
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
62.2 +++ b/patches/gcc/2.95.3/160-gcc-2.95.3-trap-posix.patch Sun Sep 23 17:08:09 2007 +0000
62.3 @@ -0,0 +1,44 @@
62.4 +#
62.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
62.6 +#
62.7 +# Error:
62.8 +#
62.9 +# creating libintl.h
62.10 +# Configuring etc...
62.11 +# loading cache ../config.cache
62.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
62.13 +# creating ./config.status
62.14 +# creating Makefile
62.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
62.16 +#
62.17 +# Description:
62.18 +#
62.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
62.20 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
62.21 +#
62.22 +# Status:
62.23 +#
62.24 +# fixed in gcc >= 3.3.5
62.25 +# backport of gcc-3.3.5 fix
62.26 +#
62.27 +diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
62.28 +--- gcc-2.95.3-orig/configure 1999-04-02 16:17:40.000000000 +0200
62.29 ++++ gcc-2.95.3/configure 2005-04-20 18:25:45.030488235 +0200
62.30 +@@ -687,7 +687,7 @@
62.31 + if test -f skip-this-dir; then
62.32 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
62.33 + # and reset the trap handler.
62.34 +- trap 0
62.35 ++ trap '' 0
62.36 + rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
62.37 + # Execute the final clean-up actions
62.38 + ${config_shell} skip-this-dir
62.39 +@@ -1599,7 +1599,7 @@
62.40 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
62.41 + # and reset the trap handler.
62.42 + rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
62.43 +-trap 0
62.44 ++trap '' 0
62.45 +
62.46 + exit 0
62.47 +
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
63.2 +++ b/patches/gcc/2.95.3/170-gcc-pr3106.patch Sun Sep 23 17:08:09 2007 +0000
63.3 @@ -0,0 +1,28 @@
63.4 +See http://gcc.gnu.org/PR3106
63.5 +Backported from gcc-3.0.x
63.6 +
63.7 +Fixes error
63.8 + .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
63.9 + /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
63.10 + make[1]: *** [strerror.o] Error 1
63.11 + make: *** [all-libiberty] Error 2
63.12 +on Mac OS X.
63.13 +
63.14 +--- gcc-2.95.3/libiberty/strerror.c.old 2004-03-24 16:23:19.000000000 -0800
63.15 ++++ gcc-2.95.3/libiberty/strerror.c 2004-03-24 16:23:48.000000000 -0800
63.16 +@@ -13,6 +13,7 @@
63.17 + incompatible with our later declaration, perhaps by using const
63.18 + attributes. So we hide the declaration in errno.h (if any) using a
63.19 + macro. */
63.20 ++#define sys_nerr sys_nerr__
63.21 + #define sys_errlist sys_errlist__
63.22 + #endif
63.23 +
63.24 +@@ -20,6 +21,7 @@
63.25 + #include <errno.h>
63.26 +
63.27 + #ifdef HAVE_SYS_ERRLIST
63.28 ++#undef sys_nerr
63.29 + #undef sys_errlist
63.30 + #endif
63.31 +
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
64.2 +++ b/patches/gcc/2.95.3/180-threads_snafu.patch Sun Sep 23 17:08:09 2007 +0000
64.3 @@ -0,0 +1,28 @@
64.4 +This fixes the error
64.5 +
64.6 +In file included from gthr-default.h:1,
64.7 + from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr.h:98,
64.8 + from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/libgcc2.c:3034:
64.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
64.10 +make[3]: *** [libgcc2.a] Error 1
64.11 +make[3]: Leaving directory `/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-gcc-core/gcc'
64.12 +
64.13 +in what I think is a nicer way than the patch used by the arm team,
64.14 +i.e. "perl -pi -e 's/^(TARGET_LIBGCC2_CFLAGS.*)/$1 -Dinhibit_libc -D__gthr_posix_h/' gcc/config/arm/t-linux"
64.15 +which seems a bit of a kludge.
64.16 +
64.17 +--- gcc-2.95.3/gcc/configure.old Fri Mar 16 06:13:48 2001
64.18 ++++ gcc-2.95.3/gcc/configure Sun Jun 8 13:02:20 2003
64.19 +@@ -853,9 +853,9 @@
64.20 + # Check whether --enable-threads or --disable-threads was given.
64.21 + if test "${enable_threads+set}" = set; then
64.22 + enableval="$enable_threads"
64.23 +- if test x$enable_threads = xno; then
64.24 +- enable_threads=''
64.25 +-fi
64.26 ++ #if test x$enable_threads = xno; then
64.27 ++ #enable_threads=''
64.28 ++ #fi
64.29 + else
64.30 + enable_threads=''
64.31 + fi
65.1 --- a/patches/gcc/2.95.3/arm-linux.patch Sat Sep 22 17:25:42 2007 +0000
65.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
65.3 @@ -1,647 +0,0 @@
65.4 ---------- snip -------
65.5 -Downloaded from ftp://ftp.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/gcc-2.95.3.diff.bz2
65.6 -Not sure what it fixes, but this appears to be The Patch used with gcc-2.95.3 on arm.
65.7 ---------- snip -------
65.8 -
65.9 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.c gcc-2.95.3/gcc/config/arm/arm.c
65.10 ---- gcc-2.95.3-orig/gcc/config/arm/arm.c Thu Jan 25 15:03:24 2001
65.11 -+++ gcc-2.95.3/gcc/config/arm/arm.c Fri Jul 20 19:39:11 2001
65.12 -@@ -1529,27 +1529,34 @@
65.13 - return gen_rtx_PLUS (Pmode, base, offset);
65.14 - }
65.15 - else if (GET_CODE (orig) == LABEL_REF)
65.16 -- current_function_uses_pic_offset_table = 1;
65.17 --
65.18 -- return orig;
65.19 --}
65.20 -+ {
65.21 -+ current_function_uses_pic_offset_table = 1;
65.22 -
65.23 --static rtx pic_rtx;
65.24 -+ if (NEED_PLT_GOT)
65.25 -+ {
65.26 -+ rtx pic_ref, address = gen_reg_rtx (Pmode);
65.27 -+
65.28 -+ emit_insn (gen_pic_load_addr (address, orig));
65.29 -+ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
65.30 -+ address);
65.31 -+ emit_move_insn (address, pic_ref);
65.32 -+ return address;
65.33 -+ }
65.34 -+ }
65.35 -
65.36 --int
65.37 --is_pic(x)
65.38 -- rtx x;
65.39 --{
65.40 -- if (x == pic_rtx)
65.41 -- return 1;
65.42 -- return 0;
65.43 -+ return orig;
65.44 - }
65.45 -
65.46 -+/* Generate code to load the PIC register. PROLOGUE is true if
65.47 -+ called from arm_expand_prologue (in which case we want the
65.48 -+ generated insns at the start of the function); false if called
65.49 -+ by an exception receiver that needs the PIC register reloaded
65.50 -+ (in which case the insns are just dumped at the current location). */
65.51 - void
65.52 --arm_finalize_pic ()
65.53 -+arm_finalize_pic (int prologue)
65.54 - {
65.55 - #ifndef AOF_ASSEMBLER
65.56 -- rtx l1, pic_tmp, pic_tmp2, seq;
65.57 -+ rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx;
65.58 - rtx global_offset_table;
65.59 -
65.60 - if (current_function_uses_pic_offset_table == 0)
65.61 -@@ -1578,7 +1585,10 @@
65.62 -
65.63 - seq = gen_sequence ();
65.64 - end_sequence ();
65.65 -- emit_insn_after (seq, get_insns ());
65.66 -+ if (prologue)
65.67 -+ emit_insn_after (seq, get_insns ());
65.68 -+ else
65.69 -+ emit_insn (seq);
65.70 -
65.71 - /* Need to emit this whether or not we obey regdecls,
65.72 - since setjmp/longjmp can cause life info to screw up. */
65.73 -@@ -5327,7 +5337,13 @@
65.74 - if (frame_pointer_needed)
65.75 - live_regs += 4;
65.76 -
65.77 -- if (live_regs)
65.78 -+ if (live_regs == 1 && regs_ever_live[LR_REGNUM]
65.79 -+ && ! lr_save_eliminated && ! really_return)
65.80 -+ {
65.81 -+ output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4"
65.82 -+ : "ldr%?%d0\t%|lr, [%|sp], #4", &operand);
65.83 -+ }
65.84 -+ else if (live_regs)
65.85 - {
65.86 - if (lr_save_eliminated || ! regs_ever_live[14])
65.87 - live_regs++;
65.88 -@@ -5446,7 +5462,7 @@
65.89 - rtx x;
65.90 -
65.91 - length = strlen (name);
65.92 -- alignlength = (length + 1) + 3 & ~3;
65.93 -+ alignlength = ((length + 1) + 3) & ~3;
65.94 -
65.95 - ASM_OUTPUT_ASCII (stream, name, length + 1);
65.96 - ASM_OUTPUT_ALIGN (stream, 2);
65.97 -@@ -5838,6 +5854,9 @@
65.98 - int store_arg_regs = 0;
65.99 - int volatile_func = (optimize > 0
65.100 - && TREE_THIS_VOLATILE (current_function_decl));
65.101 -+ rtx ip_rtx;
65.102 -+ int fp_offset = 0;
65.103 -+ rtx insn;
65.104 -
65.105 - /* Naked functions don't have prologues. */
65.106 - if (arm_naked_function_p (current_function_decl))
65.107 -@@ -5859,11 +5878,59 @@
65.108 - live_regs_mask |= 0x4000;
65.109 - }
65.110 -
65.111 -+ ip_rtx = gen_rtx_REG (SImode, IP_REGNUM);
65.112 -+
65.113 - if (frame_pointer_needed)
65.114 - {
65.115 -+ if (current_function_needs_context)
65.116 -+ {
65.117 -+ /* The Static chain register is the same as the IP register
65.118 -+ used as a scratch register during stack frame creation.
65.119 -+ To get around this need to find somewhere to store IP
65.120 -+ whilst the frame is being created. We try the following
65.121 -+ places in order:
65.122 -+
65.123 -+ 1. An unused argument register.
65.124 -+ 2. A slot on the stack above the frame. (This only
65.125 -+ works if the function is not a varargs function).
65.126 -+
65.127 -+ If neither of these places is available, we abort (for now). */
65.128 -+ if (regs_ever_live[3] == 0)
65.129 -+ {
65.130 -+ insn = gen_rtx_REG (SImode, 3);
65.131 -+ insn = gen_rtx_SET (SImode, insn, ip_rtx);
65.132 -+ insn = emit_insn (insn);
65.133 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.134 -+ }
65.135 -+ else if (current_function_pretend_args_size == 0)
65.136 -+ {
65.137 -+ insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx);
65.138 -+ insn = gen_rtx_MEM (SImode, insn);
65.139 -+ insn = gen_rtx_SET (VOIDmode, insn, ip_rtx);
65.140 -+ insn = emit_insn (insn);
65.141 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.142 -+ fp_offset = 4;
65.143 -+ }
65.144 -+ else
65.145 -+ /* FIXME - the way to handle this situation is to allow
65.146 -+ the pretend args to be dumped onto the stack, then
65.147 -+ reuse r3 to save IP. This would involve moving the
65.148 -+ copying os SP into IP until after the pretend args
65.149 -+ have been dumped, but this is not too hard. */
65.150 -+ error ("Unable to find a temporary location for static chanin register");
65.151 -+ }
65.152 -+
65.153 - live_regs_mask |= 0xD800;
65.154 -- emit_insn (gen_movsi (gen_rtx_REG (SImode, 12),
65.155 -- stack_pointer_rtx));
65.156 -+ if (fp_offset)
65.157 -+ {
65.158 -+ insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset));
65.159 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
65.160 -+ }
65.161 -+ else
65.162 -+ insn = gen_movsi (ip_rtx, stack_pointer_rtx);
65.163 -+
65.164 -+ insn = emit_insn (insn);
65.165 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.166 - }
65.167 -
65.168 - if (current_function_pretend_args_size)
65.169 -@@ -5927,9 +5994,31 @@
65.170 - }
65.171 -
65.172 - if (frame_pointer_needed)
65.173 -- emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12),
65.174 -- (GEN_INT
65.175 -- (-(4 + current_function_pretend_args_size)))));
65.176 -+ {
65.177 -+ insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset));
65.178 -+ insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn));
65.179 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.180 -+
65.181 -+ if (current_function_needs_context)
65.182 -+ {
65.183 -+ /* Recover the static chain register. */
65.184 -+ if (regs_ever_live [3] == 0)
65.185 -+ {
65.186 -+ insn = gen_rtx_REG (SImode, 3);
65.187 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
65.188 -+ insn = emit_insn (insn);
65.189 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.190 -+ }
65.191 -+ else /* if (current_function_pretend_args_size == 0) */
65.192 -+ {
65.193 -+ insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
65.194 -+ insn = gen_rtx_MEM (SImode, insn);
65.195 -+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
65.196 -+ insn = emit_insn (insn);
65.197 -+ RTX_FRAME_RELATED_P (insn) = 1;
65.198 -+ }
65.199 -+ }
65.200 -+ }
65.201 -
65.202 - if (amount != const0_rtx)
65.203 - {
65.204 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.h gcc-2.95.3/gcc/config/arm/arm.h
65.205 ---- gcc-2.95.3-orig/gcc/config/arm/arm.h Thu Jan 25 15:03:26 2001
65.206 -+++ gcc-2.95.3/gcc/config/arm/arm.h Fri Jul 20 19:39:11 2001
65.207 -@@ -601,14 +601,20 @@
65.208 - (TREE_CODE (EXP) == STRING_CST \
65.209 - && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
65.210 -
65.211 -+#ifndef STRUCTURE_SIZE_BOUNDARY
65.212 - /* Every structures size must be a multiple of 32 bits. */
65.213 - /* This is for compatibility with ARMCC. ARM SDT Reference Manual
65.214 - (ARM DUI 0020D) page 2-20 says "Structures are aligned on word
65.215 - boundaries". */
65.216 --#ifndef STRUCTURE_SIZE_BOUNDARY
65.217 --#define STRUCTURE_SIZE_BOUNDARY 32
65.218 -+/* Setting this to 32 produces more efficient code, but the value set in previous
65.219 -+ versions of this toolchain was 8, which produces more compact structures. The
65.220 -+ command line option -mstructure_size_boundary=<n> can be used to change this
65.221 -+ value. */
65.222 -+#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
65.223 - #endif
65.224 -
65.225 -+extern int arm_structure_size_boundary;
65.226 -+
65.227 - /* Used when parsing command line option -mstructure_size_boundary. */
65.228 - extern const char * structure_size_string;
65.229 -
65.230 -@@ -768,6 +774,9 @@
65.231 - /* Specify the registers used for certain standard purposes.
65.232 - The values of these macros are register numbers. */
65.233 -
65.234 -+/* Register which holds return address from a subroutine call. */
65.235 -+#define LR_REGNUM 14
65.236 -+
65.237 - /* Define this if the program counter is overloaded on a register. */
65.238 - #define PC_REGNUM 15
65.239 -
65.240 -@@ -777,6 +786,9 @@
65.241 - /* Base register for access to local variables of the function. */
65.242 - #define FRAME_POINTER_REGNUM 25
65.243 -
65.244 -+/* Scratch register - used in all kinds of places, eg trampolines. */
65.245 -+#define IP_REGNUM 12
65.246 -+
65.247 - /* Define this to be where the real frame pointer is if it is not possible to
65.248 - work out the offset between the frame pointer and the automatic variables
65.249 - until after register allocation has taken place. FRAME_POINTER_REGNUM
65.250 -@@ -798,7 +810,7 @@
65.251 - /* The native (Norcroft) Pascal compiler for the ARM passes the static chain
65.252 - as an invisible last argument (possible since varargs don't exist in
65.253 - Pascal), so the following is not true. */
65.254 --#define STATIC_CHAIN_REGNUM 8
65.255 -+#define STATIC_CHAIN_REGNUM 12
65.256 -
65.257 - /* Register in which address to store a structure value
65.258 - is passed to a function. */
65.259 -@@ -1248,7 +1260,12 @@
65.260 - { \
65.261 - int volatile_func = arm_volatile_func (); \
65.262 - if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
65.263 -- (OFFSET) = 0; \
65.264 -+ { \
65.265 -+ if (! current_function_needs_context || ! frame_pointer_needed) \
65.266 -+ (OFFSET) = 0; \
65.267 -+ else \
65.268 -+ (OFFSET) = 4; \
65.269 -+ } \
65.270 - else if ((FROM) == FRAME_POINTER_REGNUM \
65.271 - && (TO) == STACK_POINTER_REGNUM) \
65.272 - (OFFSET) = (current_function_outgoing_args_size \
65.273 -@@ -1379,8 +1396,10 @@
65.274 -
65.275 - On the ARM, allow any integer (invalid ones are removed later by insn
65.276 - patterns), nice doubles and symbol_refs which refer to the function's
65.277 -- constant pool XXX. */
65.278 --#define LEGITIMATE_CONSTANT_P(X) (! label_mentioned_p (X))
65.279 -+ constant pool XXX.
65.280 -+
65.281 -+ When generating PIC code, allow anything. */
65.282 -+#define LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X))
65.283 -
65.284 - /* Symbols in the text segment can be accessed without indirecting via the
65.285 - constant pool; it may take an extra binary operation, but this is still
65.286 -@@ -1496,9 +1515,8 @@
65.287 - && INTVAL (op) <= 31) \
65.288 - goto LABEL; \
65.289 - } \
65.290 -- /* NASTY: Since this limits the addressing of unsigned byte loads */ \
65.291 - range = ((MODE) == HImode || (MODE) == QImode) \
65.292 -- ? (arm_arch4 ? 256 : 4095) : 4096; \
65.293 -+ ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096; \
65.294 - if (code == CONST_INT && INTVAL (INDEX) < range \
65.295 - && INTVAL (INDEX) > -range) \
65.296 - goto LABEL; \
65.297 -@@ -1812,14 +1830,15 @@
65.298 - data addresses in memory. */
65.299 - #define PIC_OFFSET_TABLE_REGNUM arm_pic_register
65.300 -
65.301 --#define FINALIZE_PIC arm_finalize_pic ()
65.302 -+#define FINALIZE_PIC arm_finalize_pic (1)
65.303 -
65.304 --/* We can't directly access anything that contains a symbol,
65.305 -+/* We can't directly access anything that contains a symbol or label,
65.306 - nor can we indirect via the constant pool. */
65.307 - #define LEGITIMATE_PIC_OPERAND_P(X) \
65.308 -- (! symbol_mentioned_p (X) \
65.309 -+ (! symbol_mentioned_p (X) && ! label_mentioned_p (X) \
65.310 - && (! CONSTANT_POOL_ADDRESS_P (X) \
65.311 -- || ! symbol_mentioned_p (get_pool_constant (X))))
65.312 -+ || (! symbol_mentioned_p (get_pool_constant (X))) \
65.313 -+ && (! label_mentioned_p (get_pool_constant (X)))))
65.314 -
65.315 - /* We need to know when we are making a constant pool; this determines
65.316 - whether data needs to be in the GOT or can be referenced via a GOT
65.317 -@@ -2046,17 +2065,9 @@
65.318 - else output_addr_const(STREAM, X); \
65.319 - }
65.320 -
65.321 --/* Handles PIC addr specially */
65.322 - #define OUTPUT_INT_ADDR_CONST(STREAM,X) \
65.323 - { \
65.324 -- if (flag_pic && GET_CODE(X) == CONST && is_pic(X)) \
65.325 -- { \
65.326 -- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0)); \
65.327 -- fputs(" - (", STREAM); \
65.328 -- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \
65.329 -- fputs(")", STREAM); \
65.330 -- } \
65.331 -- else output_addr_const(STREAM, X); \
65.332 -+ output_addr_const(STREAM, X); \
65.333 - \
65.334 - /* Mark symbols as position independent. We only do this in the \
65.335 - .text segment, not in the .data segment. */ \
65.336 -@@ -2170,8 +2181,7 @@
65.337 - int arm_return_in_memory PROTO ((Tree));
65.338 - int legitimate_pic_operand_p PROTO ((Rtx));
65.339 - Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));
65.340 --int is_pic PROTO ((Rtx));
65.341 --void arm_finalize_pic PROTO ((void));
65.342 -+void arm_finalize_pic PROTO ((int));
65.343 - int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode));
65.344 - int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int));
65.345 - int const_double_rtx_ok_for_fpu PROTO ((Rtx));
65.346 -diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md
65.347 ---- gcc-2.95.3-orig/gcc/config/arm/arm.md Thu Jan 25 15:03:27 2001
65.348 -+++ gcc-2.95.3/gcc/config/arm/arm.md Fri Jul 20 19:39:11 2001
65.349 -@@ -2629,7 +2629,8 @@
65.350 - : preserve_subexpressions_p ()));
65.351 - DONE;
65.352 - }
65.353 -- if (CONSTANT_P (operands[1]) && flag_pic)
65.354 -+ if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
65.355 -+ || label_mentioned_p (operands[1])) && flag_pic)
65.356 - operands[1] = legitimize_pic_address (operands[1], SImode,
65.357 - ((reload_in_progress
65.358 - || reload_completed)
65.359 -@@ -2721,6 +2722,15 @@
65.360 - return \"add%?\\t%0, %|pc, %0\";
65.361 - ")
65.362 -
65.363 -+(define_expand "builtin_setjmp_receiver"
65.364 -+ [(label_ref (match_operand 0 "" ""))]
65.365 -+ "flag_pic"
65.366 -+ "
65.367 -+{
65.368 -+ arm_finalize_pic (0);
65.369 -+ DONE;
65.370 -+}")
65.371 -+
65.372 - ;; If copying one reg to another we can set the condition codes according to
65.373 - ;; its value. Such a move is common after a return from subroutine and the
65.374 - ;; result is being tested against zero.
65.375 -@@ -6184,15 +6194,20 @@
65.376 - abort ();
65.377 - return \"\";
65.378 - }
65.379 -- strcpy (pattern, \"stmfd\\t%m0!, {%1\");
65.380 -- for (i = 1; i < XVECLEN (operands[2], 0); i++)
65.381 -+ if (XVECLEN (operands[2], 0) > 1)
65.382 - {
65.383 -- strcat (pattern, \", %|\");
65.384 -- strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
65.385 -+ strcpy (pattern, \"stmfd\\t%m0!, {%1\");
65.386 -+ for (i = 1; i < XVECLEN (operands[2], 0); i++)
65.387 -+ {
65.388 -+ strcat (pattern, \", %|\");
65.389 -+ strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
65.390 - 0))]);
65.391 -+ }
65.392 -+ strcat (pattern, \"}\");
65.393 -+ output_asm_insn (pattern, operands);
65.394 - }
65.395 -- strcat (pattern, \"}\");
65.396 -- output_asm_insn (pattern, operands);
65.397 -+ else
65.398 -+ output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
65.399 - return \"\";
65.400 - }"
65.401 - [(set_attr "type" "store4")])
65.402 -diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h
65.403 ---- gcc-2.95.3-orig/gcc/config/arm/elf.h Mon May 31 10:21:53 1999
65.404 -+++ gcc-2.95.3/gcc/config/arm/elf.h Fri Jul 20 19:39:11 2001
65.405 -@@ -167,15 +167,6 @@
65.406 - #define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
65.407 - #endif
65.408 -
65.409 --/* Setting this to 32 produces more efficient code, but the value set in previous
65.410 -- versions of this toolchain was 8, which produces more compact structures. The
65.411 -- command line option -mstructure_size_boundary=<n> can be used to change this
65.412 -- value. */
65.413 --#undef STRUCTURE_SIZE_BOUNDARY
65.414 --#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
65.415 --
65.416 --extern int arm_structure_size_boundary;
65.417 --
65.418 - /* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
65.419 - is a valid machine specific attribute for DECL.
65.420 - The attributes in ATTRIBUTES have previously been assigned to DECL. */
65.421 -diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h
65.422 ---- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h Mon Feb 22 17:47:57 1999
65.423 -+++ gcc-2.95.3/gcc/config/arm/linux-gas.h Fri Jul 20 19:39:11 2001
65.424 -@@ -1,6 +1,6 @@
65.425 - /* Definitions of target machine for GNU compiler.
65.426 - ARM Linux-based GNU systems version.
65.427 -- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
65.428 -+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
65.429 - Contributed by Russell King <rmk92@ecs.soton.ac.uk>.
65.430 -
65.431 - This file is part of GNU CC.
65.432 -@@ -79,5 +79,7 @@
65.433 - register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
65.434 - register unsigned long _end __asm ("a2") = (unsigned long) (END); \
65.435 - register unsigned long _flg __asm ("a3") = 0; \
65.436 -- __asm __volatile ("swi 0x9f0002"); \
65.437 -+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
65.438 -+ : "=r" (_beg) \
65.439 -+ : "0" (_beg), "r" (_end), "r" (_flg)); \
65.440 - }
65.441 -diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux
65.442 ---- gcc-2.95.3-orig/gcc/config/arm/t-linux Fri Mar 26 16:30:20 1999
65.443 -+++ gcc-2.95.3/gcc/config/arm/t-linux Fri Jul 20 20:46:19 2001
65.444 -@@ -1,6 +1,6 @@
65.445 - # Just for these, we omit the frame pointer since it makes such a big
65.446 - # difference. It is then pointless adding debugging.
65.447 --TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
65.448 -+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
65.449 - LIBGCC2_DEBUG_CFLAGS = -g0
65.450 -
65.451 - # Don't build enquire
65.452 -diff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c
65.453 ---- gcc-2.95.3-orig/gcc/final.c Mon Mar 12 13:07:59 2001
65.454 -+++ gcc-2.95.3/gcc/final.c Fri Jul 20 19:39:11 2001
65.455 -@@ -3652,8 +3652,9 @@
65.456 -
65.457 - output_addr_const (file, XEXP (x, 0));
65.458 - fprintf (file, "-");
65.459 -- if (GET_CODE (XEXP (x, 1)) == CONST_INT
65.460 -- && INTVAL (XEXP (x, 1)) < 0)
65.461 -+ if ((GET_CODE (XEXP (x, 1)) == CONST_INT
65.462 -+ && INTVAL (XEXP (x, 1)) < 0)
65.463 -+ || GET_CODE (XEXP (x, 1)) != CONST_INT)
65.464 - {
65.465 - fprintf (file, ASM_OPEN_PAREN);
65.466 - output_addr_const (file, XEXP (x, 1));
65.467 -diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c
65.468 ---- gcc-2.95.3-orig/gcc/function.c Thu Jan 25 15:03:15 2001
65.469 -+++ gcc-2.95.3/gcc/function.c Fri Jul 20 19:39:10 2001
65.470 -@@ -3053,6 +3053,105 @@
65.471 - extracted by usage MEM with narrower mode. */
65.472 - static rtx purge_addressof_replacements;
65.473 -
65.474 -+/* Return 1 if X and Y are identical-looking rtx's.
65.475 -+ This is the Lisp function EQUAL for rtx arguments. */
65.476 -+
65.477 -+int
65.478 -+rtx_equal_for_addressof_p (x, y)
65.479 -+ rtx x, y;
65.480 -+{
65.481 -+ register int i;
65.482 -+ register int j;
65.483 -+ register enum rtx_code code;
65.484 -+ register char *fmt;
65.485 -+
65.486 -+ if (x == y)
65.487 -+ return 1;
65.488 -+ if (x == 0 || y == 0)
65.489 -+ return 0;
65.490 -+
65.491 -+ code = GET_CODE (x);
65.492 -+ /* Rtx's of different codes cannot be equal. */
65.493 -+ if (code != GET_CODE (y))
65.494 -+ return 0;
65.495 -+
65.496 -+ /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
65.497 -+ (REG:SI x) and (REG:HI x) are NOT equivalent.
65.498 -+ But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */
65.499 -+
65.500 -+ if (code != MEM && (GET_MODE (x) != GET_MODE (y)))
65.501 -+ return 0;
65.502 -+
65.503 -+ /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */
65.504 -+
65.505 -+ if (code == REG)
65.506 -+ return REGNO (x) == REGNO (y);
65.507 -+ else if (code == LABEL_REF)
65.508 -+ return XEXP (x, 0) == XEXP (y, 0);
65.509 -+ else if (code == SYMBOL_REF)
65.510 -+ return XSTR (x, 0) == XSTR (y, 0);
65.511 -+ else if (code == SCRATCH || code == CONST_DOUBLE)
65.512 -+ return 0;
65.513 -+
65.514 -+ /* Compare the elements. If any pair of corresponding elements
65.515 -+ fail to match, return 0 for the whole things. */
65.516 -+
65.517 -+ fmt = GET_RTX_FORMAT (code);
65.518 -+ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
65.519 -+ {
65.520 -+ switch (fmt[i])
65.521 -+ {
65.522 -+ case 'w':
65.523 -+ if (XWINT (x, i) != XWINT (y, i))
65.524 -+ return 0;
65.525 -+ break;
65.526 -+
65.527 -+ case 'n':
65.528 -+ case 'i':
65.529 -+ if (XINT (x, i) != XINT (y, i))
65.530 -+ return 0;
65.531 -+ break;
65.532 -+
65.533 -+ case 'V':
65.534 -+ case 'E':
65.535 -+ /* Two vectors must have the same length. */
65.536 -+ if (XVECLEN (x, i) != XVECLEN (y, i))
65.537 -+ return 0;
65.538 -+
65.539 -+ /* And the corresponding elements must match. */
65.540 -+ for (j = 0; j < XVECLEN (x, i); j++)
65.541 -+ if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
65.542 -+ return 0;
65.543 -+ break;
65.544 -+
65.545 -+ case 'e':
65.546 -+ if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
65.547 -+ return 0;
65.548 -+ break;
65.549 -+
65.550 -+ case 'S':
65.551 -+ case 's':
65.552 -+ if (strcmp (XSTR (x, i), XSTR (y, i)))
65.553 -+ return 0;
65.554 -+ break;
65.555 -+
65.556 -+ case 'u':
65.557 -+ /* These are just backpointers, so they don't matter. */
65.558 -+ break;
65.559 -+
65.560 -+ case '0':
65.561 -+ break;
65.562 -+
65.563 -+ /* It is believed that rtx's at this level will never
65.564 -+ contain anything but integers and other rtx's,
65.565 -+ except for within LABEL_REFs and SYMBOL_REFs. */
65.566 -+ default:
65.567 -+ abort ();
65.568 -+ }
65.569 -+ }
65.570 -+ return 1;
65.571 -+}
65.572 -+
65.573 - /* Helper function for purge_addressof. See if the rtx expression at *LOC
65.574 - in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into
65.575 - the stack. */
65.576 -@@ -3133,7 +3232,7 @@
65.577 - for (tem = purge_bitfield_addressof_replacements;
65.578 - tem != NULL_RTX;
65.579 - tem = XEXP (XEXP (tem, 1), 1))
65.580 -- if (rtx_equal_p (x, XEXP (tem, 0)))
65.581 -+ if (rtx_equal_for_addressof_p (x, XEXP (tem, 0)))
65.582 - {
65.583 - *loc = XEXP (XEXP (tem, 1), 0);
65.584 - return;
65.585 -@@ -3143,7 +3242,7 @@
65.586 - for (tem = purge_addressof_replacements;
65.587 - tem != NULL_RTX;
65.588 - tem = XEXP (XEXP (tem, 1), 1))
65.589 -- if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))
65.590 -+ if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0)))
65.591 - {
65.592 - rtx z = XEXP (XEXP (tem, 1), 0);
65.593 -
65.594 -diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c
65.595 ---- gcc-2.95.3-orig/gcc/jump.c Thu Oct 21 08:24:03 1999
65.596 -+++ gcc-2.95.3/gcc/jump.c Fri Jul 20 19:39:10 2001
65.597 -@@ -115,7 +115,7 @@
65.598 - static rtx delete_unreferenced_labels PROTO((rtx));
65.599 - static void delete_noop_moves PROTO((rtx));
65.600 - static int calculate_can_reach_end PROTO((rtx, int, int));
65.601 --static int duplicate_loop_exit_test PROTO((rtx));
65.602 -+static int duplicate_loop_exit_test PROTO((rtx, int));
65.603 - static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *));
65.604 - static void do_cross_jump PROTO((rtx, rtx, rtx));
65.605 - static int jump_back_p PROTO((rtx, rtx));
65.606 -@@ -338,7 +338,7 @@
65.607 - && simplejump_p (temp1))
65.608 - {
65.609 - temp = PREV_INSN (insn);
65.610 -- if (duplicate_loop_exit_test (insn))
65.611 -+ if (duplicate_loop_exit_test (insn, after_regscan))
65.612 - {
65.613 - changed = 1;
65.614 - next = NEXT_INSN (temp);
65.615 -@@ -2548,8 +2548,9 @@
65.616 - values of regno_first_uid and regno_last_uid. */
65.617 -
65.618 - static int
65.619 --duplicate_loop_exit_test (loop_start)
65.620 -+duplicate_loop_exit_test (loop_start, after_regscan)
65.621 - rtx loop_start;
65.622 -+ int after_regscan;
65.623 - {
65.624 - rtx insn, set, reg, p, link;
65.625 - rtx copy = 0, first_copy = 0;
65.626 -@@ -2662,6 +2663,9 @@
65.627 - reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg));
65.628 - }
65.629 - }
65.630 -+
65.631 -+ if (after_regscan)
65.632 -+ reg_scan_update (exitcode, lastexit, max_reg);
65.633 -
65.634 - /* Now copy each insn. */
65.635 - for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
65.636 -diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c
65.637 ---- gcc-2.95.3-orig/gcc/varasm.c Mon Feb 19 15:02:02 2001
65.638 -+++ gcc-2.95.3/gcc/varasm.c Fri Jul 20 19:39:11 2001
65.639 -@@ -3286,7 +3286,10 @@
65.640 - value->un.addr.offset = - INTVAL (XEXP (x, 1));
65.641 - }
65.642 - else
65.643 -- abort ();
65.644 -+ {
65.645 -+ value->un.addr.base = x;
65.646 -+ value->un.addr.offset = 0;
65.647 -+ }
65.648 - break;
65.649 -
65.650 - default:
66.1 --- a/patches/gcc/2.95.3/backport-config.gcc-1.4.patch Sat Sep 22 17:25:42 2007 +0000
66.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
66.3 @@ -1,35 +0,0 @@
66.4 -# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.3&r2=1.4
66.5 -# Should fix error
66.6 -# Configuration powerpc-host_apple-darwin7.3.0 not supported
66.7 -# when configuring gcc-2.95 on Mac OS X for i686 target
66.8 -# Also create xm-darwin.h, seems to be required, else we get the error
66.9 -# In file included from .../gcc-2.95.3/gcc/gencheck.c:21:
66.10 -# hconfig.h:11:30: rs6000/xm-darwin.h: No such file or directory
66.11 -# make[1]: *** [gencheck.o] Error 1
66.12 -
66.13 -
66.14 ---- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
66.15 -+++ gcc-2.95.3/gcc/configure 2004-03-24 17:14:38.000000000 -0800
66.16 -@@ -5079,6 +5079,10 @@
66.17 - tmake_file=rs6000/t-beos
66.18 - xmake_file=rs6000/x-beos
66.19 - ;;
66.20 -+ powerpc-*-darwin*)
66.21 -+ xm_file="rs6000/xm-rs6000.h rs6000/xm-darwin.h"
66.22 -+ xmake_file=rs6000/x-darwin
66.23 -+ ;;
66.24 - powerpc-*-sysv* | powerpc-*-elf*)
66.25 - tm_file=rs6000/sysv4.h
66.26 - xm_file="xm-siglist.h rs6000/xm-sysv4.h"
66.27 ---- /dev/null 2003-01-30 02:24:37.000000000 -0800
66.28 -+++ gcc-3.0.4/gcc/config/rs6000/xm-darwin.h 2000-11-20 19:02:09.000000000 -0800
66.29 -@@ -0,0 +1,9 @@
66.30 -+/* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor. */
66.31 -+
66.32 -+#undef USG
66.33 -+
66.34 -+/* Override the usual setting, since Apple's GCC has lame bugs and
66.35 -+ can't handle the initializers. Someday the bugs will be fixed and
66.36 -+ we can get rid of this silliness. */
66.37 -+
66.38 -+#define HAVE_DESIGNATED_INITIALIZERS 0
67.1 --- a/patches/gcc/2.95.3/backport-config.gcc-1.92.patch Sat Sep 22 17:25:42 2007 +0000
67.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
67.3 @@ -1,39 +0,0 @@
67.4 -# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.91&r2=1.92
67.5 -# Should fix error
67.6 -# Configuration x86_64-host_unknown-linux-gnu not supported
67.7 -# when configuring gcc-2.95 on x86_64 build for i686 target
67.8 -# It's a bit silly, since tm_file refers to files that don't exist,
67.9 -# but as long as x86_64 is just the build machine, that doesn't matter.
67.10 -
67.11 ---- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
67.12 -+++ gcc-2.95.3/gcc/configure 2004-03-24 12:19:30.000000000 -0800
67.13 -@@ -2929,6 +2929,9 @@
67.14 - i[34567]86-*-*)
67.15 - cpu_type=i386
67.16 - ;;
67.17 -+ x86_64-*-*)
67.18 -+ cpu_type=i386
67.19 -+ ;;
67.20 - hppa*-*-*)
67.21 - cpu_type=pa
67.22 - ;;
67.23 -@@ -3643,6 +3646,19 @@
67.24 - thread_file='posix'
67.25 - fi
67.26 - ;;
67.27 -+ x86_64-*-linux*)
67.28 -+ xmake_file=x-linux
67.29 -+ tm_file="i386/biarch64.h i386/i386.h i386/att.h linux.h i386/x86-64.h \
67.30 -+ i386/linux64.h"
67.31 -+ tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
67.32 -+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
67.33 -+ gnu_ld=yes
67.34 -+ float_format=i386
67.35 -+ if test x$enable_threads = xyes; then
67.36 -+ thread_file='posix'
67.37 -+ fi
67.38 -+ ;;
67.39 -+
67.40 - i[34567]86-*-gnu*)
67.41 - float_format=i386
67.42 - ;;
68.1 --- a/patches/gcc/2.95.3/config.sub.patch Sat Sep 22 17:25:42 2007 +0000
68.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
68.3 @@ -1,1257 +0,0 @@
68.4 -# Backport from gcc-3.3.3
68.5 -# Fixes errors like
68.6 -# Invalid configuration `x86_64-host_unknown-linux-gnu': machine `x86_64-host_unknown' not recognized
68.7 -# Unrecognized host system name x86_64-host_unknown-linux-gnu.
68.8 -# when configuring on chip types or operating systems like x86_64 or Darwin
68.9 -# which are newer than gcc-2.95
68.10 -
68.11 ---- gcc-2.95.3/config.sub.old 1999-08-04 01:09:26.000000000 -0700
68.12 -+++ gcc-2.95.3/config.sub 2004-03-24 11:28:24.000000000 -0800
68.13 -@@ -1,6 +1,10 @@
68.14 - #! /bin/sh
68.15 --# Configuration validation subroutine script, version 1.1.
68.16 --# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
68.17 -+# Configuration validation subroutine script.
68.18 -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
68.19 -+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
68.20 -+
68.21 -+timestamp='2003-01-28'
68.22 -+
68.23 - # This file is (in principle) common to ALL GNU software.
68.24 - # The presence of a machine in this file suggests that SOME GNU software
68.25 - # can handle that machine. It does not imply ALL GNU software can.
68.26 -@@ -25,6 +29,9 @@
68.27 - # configuration script generated by Autoconf, you may include it under
68.28 - # the same distribution terms that you use for the rest of that program.
68.29 -
68.30 -+# Please send patches to <config-patches@gnu.org>. Submit a context
68.31 -+# diff and a properly formatted ChangeLog entry.
68.32 -+#
68.33 - # Configuration subroutine to validate and canonicalize a configuration type.
68.34 - # Supply the specified configuration type as an argument.
68.35 - # If it is invalid, we print an error message on stderr and exit with code 1.
68.36 -@@ -45,30 +52,73 @@
68.37 - # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
68.38 - # It is wrong to echo any other type of specification.
68.39 -
68.40 --if [ x$1 = x ]
68.41 --then
68.42 -- echo Configuration name missing. 1>&2
68.43 -- echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
68.44 -- echo "or $0 ALIAS" 1>&2
68.45 -- echo where ALIAS is a recognized configuration type. 1>&2
68.46 -- exit 1
68.47 --fi
68.48 -+me=`echo "$0" | sed -e 's,.*/,,'`
68.49 -
68.50 --# First pass through any local machine types.
68.51 --case $1 in
68.52 -- *local*)
68.53 -- echo $1
68.54 -- exit 0
68.55 -- ;;
68.56 -- *)
68.57 -- ;;
68.58 -+usage="\
68.59 -+Usage: $0 [OPTION] CPU-MFR-OPSYS
68.60 -+ $0 [OPTION] ALIAS
68.61 -+
68.62 -+Canonicalize a configuration name.
68.63 -+
68.64 -+Operation modes:
68.65 -+ -h, --help print this help, then exit
68.66 -+ -t, --time-stamp print date of last modification, then exit
68.67 -+ -v, --version print version number, then exit
68.68 -+
68.69 -+Report bugs and patches to <config-patches@gnu.org>."
68.70 -+
68.71 -+version="\
68.72 -+GNU config.sub ($timestamp)
68.73 -+
68.74 -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
68.75 -+Free Software Foundation, Inc.
68.76 -+
68.77 -+This is free software; see the source for copying conditions. There is NO
68.78 -+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
68.79 -+
68.80 -+help="
68.81 -+Try \`$me --help' for more information."
68.82 -+
68.83 -+# Parse command line
68.84 -+while test $# -gt 0 ; do
68.85 -+ case $1 in
68.86 -+ --time-stamp | --time* | -t )
68.87 -+ echo "$timestamp" ; exit 0 ;;
68.88 -+ --version | -v )
68.89 -+ echo "$version" ; exit 0 ;;
68.90 -+ --help | --h* | -h )
68.91 -+ echo "$usage"; exit 0 ;;
68.92 -+ -- ) # Stop option processing
68.93 -+ shift; break ;;
68.94 -+ - ) # Use stdin as input.
68.95 -+ break ;;
68.96 -+ -* )
68.97 -+ echo "$me: invalid option $1$help"
68.98 -+ exit 1 ;;
68.99 -+
68.100 -+ *local*)
68.101 -+ # First pass through any local machine types.
68.102 -+ echo $1
68.103 -+ exit 0;;
68.104 -+
68.105 -+ * )
68.106 -+ break ;;
68.107 -+ esac
68.108 -+done
68.109 -+
68.110 -+case $# in
68.111 -+ 0) echo "$me: missing argument$help" >&2
68.112 -+ exit 1;;
68.113 -+ 1) ;;
68.114 -+ *) echo "$me: too many arguments$help" >&2
68.115 -+ exit 1;;
68.116 - esac
68.117 -
68.118 - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
68.119 - # Here we must recognize all the valid KERNEL-OS combinations.
68.120 - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
68.121 - case $maybe_os in
68.122 -- linux-gnu*)
68.123 -+ nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
68.124 - os=-$maybe_os
68.125 - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
68.126 - ;;
68.127 -@@ -94,20 +144,28 @@
68.128 - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
68.129 - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
68.130 - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
68.131 -- -apple)
68.132 -+ -apple | -axis)
68.133 - os=
68.134 - basic_machine=$1
68.135 - ;;
68.136 -- -sim | -cisco | -oki | -wec | -winbond ) # EGCS LOCAL
68.137 -+ -sim | -cisco | -oki | -wec | -winbond)
68.138 - os=
68.139 - basic_machine=$1
68.140 - ;;
68.141 -- -scout) # EGCS LOCAL
68.142 -+ -scout)
68.143 - ;;
68.144 -- -wrs) # EGCS LOCAL
68.145 -+ -wrs)
68.146 - os=-vxworks
68.147 - basic_machine=$1
68.148 - ;;
68.149 -+ -chorusos*)
68.150 -+ os=-chorusos
68.151 -+ basic_machine=$1
68.152 -+ ;;
68.153 -+ -chorusrdb)
68.154 -+ os=-chorusrdb
68.155 -+ basic_machine=$1
68.156 -+ ;;
68.157 - -hiux*)
68.158 - os=-hiuxwe2
68.159 - ;;
68.160 -@@ -156,49 +214,72 @@
68.161 - -psos*)
68.162 - os=-psos
68.163 - ;;
68.164 -+ -mint | -mint[0-9]*)
68.165 -+ basic_machine=m68k-atari
68.166 -+ os=-mint
68.167 -+ ;;
68.168 - esac
68.169 -
68.170 - # Decode aliases for certain CPU-COMPANY combinations.
68.171 - case $basic_machine in
68.172 - # Recognize the basic CPU types without company name.
68.173 - # Some are omitted here because they have special meanings below.
68.174 -- tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
68.175 -- | arme[lb] | pyramid | mn10200 | mn10300 \
68.176 -- | tron | a29k | 580 | i960 | h8300 \
68.177 -- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
68.178 -- | alpha | alphaev5 | alphaev56 | alphapca56 | alphaev6 \
68.179 -- | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
68.180 -- | 1750a | dsp16xx | pdp11 \
68.181 -- | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
68.182 -- | mipstx39 | mipstx39el \
68.183 -- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x)
68.184 -- basic_machine=$basic_machine-unknown
68.185 -- ;;
68.186 -- m88110 | m680[012346]0 | m683?2 | m68360 | m5200 | z8k | v70 \
68.187 -- | h8500 | w65) # EGCS LOCAL
68.188 -- ;;
68.189 -- thumb)
68.190 -- basic_machine=$basic_machine-unknown
68.191 -- ;;
68.192 -- mips64vr4300 | mips64vr4300el) # EGCS LOCAL jsmith/vr4300
68.193 -+ 1750a | 580 \
68.194 -+ | a29k \
68.195 -+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
68.196 -+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
68.197 -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
68.198 -+ | clipper \
68.199 -+ | d10v | d30v | dlx | dsp16xx \
68.200 -+ | fr30 | frv \
68.201 -+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
68.202 -+ | i370 | i860 | i960 | ia64 \
68.203 -+ | ip2k \
68.204 -+ | m32r | m68000 | m68k | m88k | mcore \
68.205 -+ | mips | mipsbe | mipseb | mipsel | mipsle \
68.206 -+ | mips16 \
68.207 -+ | mips64 | mips64el \
68.208 -+ | mips64vr | mips64vrel \
68.209 -+ | mips64orion | mips64orionel \
68.210 -+ | mips64vr4100 | mips64vr4100el \
68.211 -+ | mips64vr4300 | mips64vr4300el \
68.212 -+ | mips64vr5000 | mips64vr5000el \
68.213 -+ | mipsisa32 | mipsisa32el \
68.214 -+ | mipsisa32r2 | mipsisa32r2el \
68.215 -+ | mipsisa64 | mipsisa64el \
68.216 -+ | mipsisa64sb1 | mipsisa64sb1el \
68.217 -+ | mipsisa64sr71k | mipsisa64sr71kel \
68.218 -+ | mipstx39 | mipstx39el \
68.219 -+ | mn10200 | mn10300 \
68.220 -+ | msp430 \
68.221 -+ | ns16k | ns32k \
68.222 -+ | openrisc | or32 \
68.223 -+ | pdp10 | pdp11 | pj | pjl \
68.224 -+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
68.225 -+ | pyramid \
68.226 -+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
68.227 -+ | sh64 | sh64le \
68.228 -+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
68.229 -+ | strongarm \
68.230 -+ | tahoe | thumb | tic80 | tron \
68.231 -+ | v850 | v850e \
68.232 -+ | we32k \
68.233 -+ | x86 | xscale | xstormy16 | xtensa \
68.234 -+ | z8k)
68.235 - basic_machine=$basic_machine-unknown
68.236 - ;;
68.237 -- mips64vr4100 | mips64vr4100el) # EGCS LOCAL jsmith/vr4100
68.238 -- basic_machine=$basic_machine-unknown
68.239 -- ;;
68.240 -- mips64vr5000 | mips64vr5000el) # EGCS LOCAL ian/vr5000
68.241 -- basic_machine=$basic_machine-unknown
68.242 -- ;;
68.243 -- mips16)
68.244 -+ m6811 | m68hc11 | m6812 | m68hc12)
68.245 -+ # Motorola 68HC11/12.
68.246 - basic_machine=$basic_machine-unknown
68.247 -+ os=-none
68.248 - ;;
68.249 -- d10v)
68.250 -- basic_machine=$basic_machine-unknown
68.251 -+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
68.252 - ;;
68.253 -+
68.254 - # We use `pc' rather than `unknown'
68.255 - # because (1) that's what they normally are, and
68.256 - # (2) the word "unknown" tends to confuse beginning users.
68.257 -- i[34567]86)
68.258 -+ i*86 | x86_64)
68.259 - basic_machine=$basic_machine-pc
68.260 - ;;
68.261 - # Object if more than one company name word.
68.262 -@@ -207,44 +288,62 @@
68.263 - exit 1
68.264 - ;;
68.265 - # Recognize the basic CPU types with company name.
68.266 -- vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \
68.267 -- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
68.268 -- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
68.269 -- | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
68.270 -- | xmp-* | ymp-* \
68.271 -- | hppa-* | hppa1.0-* | hppa1.1-* \
68.272 -- | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
68.273 -- | alpha-* | alphaev5-* | alphaev56-* | alphapca56-* \
68.274 -- | alphaev6-* | we32k-* | cydra-* | ns16k-* | pn-* | np1-* \
68.275 -- | xps100-* | clipper-* | orion-* \
68.276 -- | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
68.277 -- | sparc64-* | sparcv9-* | sparc86x-* | mips64-* | mipsel-* \
68.278 -- | mips64el-* | mips64orion-* | mips64orionel-* \
68.279 -- | mipstx39-* | mipstx39el-* \
68.280 -- | f301-* | arm*-*)
68.281 -- ;;
68.282 -- m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | h8500-* | d10v-*) # EGCS LOCAL
68.283 -- ;;
68.284 -- thumb-*) # EGCS LOCAL angela/thumb
68.285 -- ;;
68.286 -- v850-*) # EGCS LOCAL
68.287 -- ;;
68.288 -- d30v-*) # EGCS LOCAL
68.289 -- ;;
68.290 -- mips64vr4300-* | mips64vr4300el-*) # EGCS LOCAL jsmith/vr4300
68.291 -- ;;
68.292 -- mips64vr4100-* | mips64vr4100el-*) # EGCS LOCAL jsmith/vr4100
68.293 -- ;;
68.294 -- mips16-*) # EGCS LOCAL krk/mips16
68.295 -- ;;
68.296 -- tic30-*) # EGCS LOCAL ian/tic30
68.297 -- ;;
68.298 -- c30-*) # EGCS LOCAL ian/tic30
68.299 -- basic_machine=tic30-unknown
68.300 -+ 580-* \
68.301 -+ | a29k-* \
68.302 -+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
68.303 -+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
68.304 -+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
68.305 -+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
68.306 -+ | avr-* \
68.307 -+ | bs2000-* \
68.308 -+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
68.309 -+ | clipper-* | cydra-* \
68.310 -+ | d10v-* | d30v-* | dlx-* \
68.311 -+ | elxsi-* \
68.312 -+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
68.313 -+ | h8300-* | h8500-* \
68.314 -+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
68.315 -+ | i*86-* | i860-* | i960-* | ia64-* \
68.316 -+ | ip2k-* \
68.317 -+ | m32r-* \
68.318 -+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
68.319 -+ | m88110-* | m88k-* | mcore-* \
68.320 -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
68.321 -+ | mips16-* \
68.322 -+ | mips64-* | mips64el-* \
68.323 -+ | mips64vr-* | mips64vrel-* \
68.324 -+ | mips64orion-* | mips64orionel-* \
68.325 -+ | mips64vr4100-* | mips64vr4100el-* \
68.326 -+ | mips64vr4300-* | mips64vr4300el-* \
68.327 -+ | mips64vr5000-* | mips64vr5000el-* \
68.328 -+ | mipsisa32-* | mipsisa32el-* \
68.329 -+ | mipsisa32r2-* | mipsisa32r2el-* \
68.330 -+ | mipsisa64-* | mipsisa64el-* \
68.331 -+ | mipsisa64sb1-* | mipsisa64sb1el-* \
68.332 -+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
68.333 -+ | mipstx39-* | mipstx39el-* \
68.334 -+ | msp430-* \
68.335 -+ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
68.336 -+ | orion-* \
68.337 -+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
68.338 -+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
68.339 -+ | pyramid-* \
68.340 -+ | romp-* | rs6000-* \
68.341 -+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
68.342 -+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
68.343 -+ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
68.344 -+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
68.345 -+ | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
68.346 -+ | v850-* | v850e-* | vax-* \
68.347 -+ | we32k-* \
68.348 -+ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
68.349 -+ | xtensa-* \
68.350 -+ | ymp-* \
68.351 -+ | z8k-*)
68.352 - ;;
68.353 - # Recognize the various machine names and aliases which stand
68.354 - # for a CPU type and a company and sometimes even an OS.
68.355 -- 386bsd) # EGCS LOCAL
68.356 -+ 386bsd)
68.357 - basic_machine=i386-unknown
68.358 - os=-bsd
68.359 - ;;
68.360 -@@ -254,11 +353,11 @@
68.361 - 3b*)
68.362 - basic_machine=we32k-att
68.363 - ;;
68.364 -- a29khif) # EGCS LOCAL
68.365 -+ a29khif)
68.366 - basic_machine=a29k-amd
68.367 - os=-udi
68.368 - ;;
68.369 -- adobe68k) # EGCS LOCAL
68.370 -+ adobe68k)
68.371 - basic_machine=m68010-adobe
68.372 - os=-scout
68.373 - ;;
68.374 -@@ -277,21 +376,21 @@
68.375 - os=-sysv
68.376 - ;;
68.377 - amiga | amiga-*)
68.378 -- basic_machine=m68k-cbm
68.379 -+ basic_machine=m68k-unknown
68.380 - ;;
68.381 - amigaos | amigados)
68.382 -- basic_machine=m68k-cbm
68.383 -+ basic_machine=m68k-unknown
68.384 - os=-amigaos
68.385 - ;;
68.386 - amigaunix | amix)
68.387 -- basic_machine=m68k-cbm
68.388 -+ basic_machine=m68k-unknown
68.389 - os=-sysv4
68.390 - ;;
68.391 - apollo68)
68.392 - basic_machine=m68k-apollo
68.393 - os=-sysv
68.394 - ;;
68.395 -- apollo68bsd) # EGCS LOCAL
68.396 -+ apollo68bsd)
68.397 - basic_machine=m68k-apollo
68.398 - os=-bsd
68.399 - ;;
68.400 -@@ -303,6 +402,10 @@
68.401 - basic_machine=ns32k-sequent
68.402 - os=-dynix
68.403 - ;;
68.404 -+ c90)
68.405 -+ basic_machine=c90-cray
68.406 -+ os=-unicos
68.407 -+ ;;
68.408 - convex-c1)
68.409 - basic_machine=c1-convex
68.410 - os=-bsd
68.411 -@@ -323,27 +426,30 @@
68.412 - basic_machine=c38-convex
68.413 - os=-bsd
68.414 - ;;
68.415 -- cray | ymp)
68.416 -- basic_machine=ymp-cray
68.417 -- os=-unicos
68.418 -- ;;
68.419 -- cray2)
68.420 -- basic_machine=cray2-cray
68.421 -- os=-unicos
68.422 -- ;;
68.423 -- [ctj]90-cray)
68.424 -- basic_machine=c90-cray
68.425 -+ cray | j90)
68.426 -+ basic_machine=j90-cray
68.427 - os=-unicos
68.428 - ;;
68.429 - crds | unos)
68.430 - basic_machine=m68k-crds
68.431 - ;;
68.432 -+ cris | cris-* | etrax*)
68.433 -+ basic_machine=cris-axis
68.434 -+ ;;
68.435 - da30 | da30-*)
68.436 - basic_machine=m68k-da30
68.437 - ;;
68.438 - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
68.439 - basic_machine=mips-dec
68.440 - ;;
68.441 -+ decsystem10* | dec10*)
68.442 -+ basic_machine=pdp10-dec
68.443 -+ os=-tops10
68.444 -+ ;;
68.445 -+ decsystem20* | dec20*)
68.446 -+ basic_machine=pdp10-dec
68.447 -+ os=-tops20
68.448 -+ ;;
68.449 - delta | 3300 | motorola-3300 | motorola-delta \
68.450 - | 3300-motorola | delta-motorola)
68.451 - basic_machine=m68k-motorola
68.452 -@@ -371,7 +477,7 @@
68.453 - encore | umax | mmax)
68.454 - basic_machine=ns32k-encore
68.455 - ;;
68.456 -- es1800 | OSE68k | ose68k | ose | OSE) # EGCS LOCAL
68.457 -+ es1800 | OSE68k | ose68k | ose | OSE)
68.458 - basic_machine=m68k-ericsson
68.459 - os=-ose
68.460 - ;;
68.461 -@@ -385,6 +491,10 @@
68.462 - basic_machine=tron-gmicro
68.463 - os=-sysv
68.464 - ;;
68.465 -+ go32)
68.466 -+ basic_machine=i386-pc
68.467 -+ os=-go32
68.468 -+ ;;
68.469 - h3050r* | hiux*)
68.470 - basic_machine=hppa1.1-hitachi
68.471 - os=-hiuxwe2
68.472 -@@ -393,11 +503,11 @@
68.473 - basic_machine=h8300-hitachi
68.474 - os=-hms
68.475 - ;;
68.476 -- h8300xray) # EGCS LOCAL
68.477 -+ h8300xray)
68.478 - basic_machine=h8300-hitachi
68.479 - os=-xray
68.480 - ;;
68.481 -- h8500hms) # EGCS LOCAL
68.482 -+ h8500hms)
68.483 - basic_machine=h8500-hitachi
68.484 - os=-hms
68.485 - ;;
68.486 -@@ -416,22 +526,6 @@
68.487 - basic_machine=m68k-hp
68.488 - os=-hpux
68.489 - ;;
68.490 -- w89k-*) # EGCS LOCAL
68.491 -- basic_machine=hppa1.1-winbond
68.492 -- os=-proelf
68.493 -- ;;
68.494 -- op50n-*) # EGCS LOCAL
68.495 -- basic_machine=hppa1.1-oki
68.496 -- os=-proelf
68.497 -- ;;
68.498 -- op60c-*) # EGCS LOCAL
68.499 -- basic_machine=hppa1.1-oki
68.500 -- os=-proelf
68.501 -- ;;
68.502 -- hppro) # EGCS LOCAL
68.503 -- basic_machine=hppa1.1-hp
68.504 -- os=-proelf
68.505 -- ;;
68.506 - hp3k9[0-9][0-9] | hp9[0-9][0-9])
68.507 - basic_machine=hppa1.0-hp
68.508 - ;;
68.509 -@@ -441,22 +535,21 @@
68.510 - hp9k3[2-9][0-9])
68.511 - basic_machine=m68k-hp
68.512 - ;;
68.513 -- hp9k6[0-9][0-9] | hp6[0-9][0-9] )
68.514 -+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
68.515 - basic_machine=hppa1.0-hp
68.516 - ;;
68.517 -- hp9k7[0-79][0-9] | hp7[0-79][0-9] )
68.518 -+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
68.519 - basic_machine=hppa1.1-hp
68.520 - ;;
68.521 -- hp9k78[0-9] | hp78[0-9] )
68.522 -+ hp9k78[0-9] | hp78[0-9])
68.523 - # FIXME: really hppa2.0-hp
68.524 - basic_machine=hppa1.1-hp
68.525 - ;;
68.526 -- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | \
68.527 -- hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893 )
68.528 -+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
68.529 - # FIXME: really hppa2.0-hp
68.530 - basic_machine=hppa1.1-hp
68.531 - ;;
68.532 -- hp9k8[0-9][13679] | hp8[0-9][13679] )
68.533 -+ hp9k8[0-9][13679] | hp8[0-9][13679])
68.534 - basic_machine=hppa1.1-hp
68.535 - ;;
68.536 - hp9k8[0-9][0-9] | hp8[0-9][0-9])
68.537 -@@ -465,47 +558,42 @@
68.538 - hppa-next)
68.539 - os=-nextstep3
68.540 - ;;
68.541 -- hppaosf) # EGCS LOCAL
68.542 -+ hppaosf)
68.543 - basic_machine=hppa1.1-hp
68.544 - os=-osf
68.545 - ;;
68.546 -+ hppro)
68.547 -+ basic_machine=hppa1.1-hp
68.548 -+ os=-proelf
68.549 -+ ;;
68.550 - i370-ibm* | ibm*)
68.551 - basic_machine=i370-ibm
68.552 -- os=-mvs
68.553 - ;;
68.554 - # I'm not sure what "Sysv32" means. Should this be sysv3.2?
68.555 -- i[34567]86v32)
68.556 -+ i*86v32)
68.557 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68.558 - os=-sysv32
68.559 - ;;
68.560 -- i[34567]86v4*)
68.561 -+ i*86v4*)
68.562 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68.563 - os=-sysv4
68.564 - ;;
68.565 -- i[34567]86v)
68.566 -+ i*86v)
68.567 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68.568 - os=-sysv
68.569 - ;;
68.570 -- i[34567]86sol2)
68.571 -+ i*86sol2)
68.572 - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
68.573 - os=-solaris2
68.574 - ;;
68.575 -- i386mach) # EGCS LOCAL
68.576 -+ i386mach)
68.577 - basic_machine=i386-mach
68.578 - os=-mach
68.579 - ;;
68.580 -- i386-vsta | vsta) # EGCS LOCAL
68.581 -+ i386-vsta | vsta)
68.582 - basic_machine=i386-unknown
68.583 - os=-vsta
68.584 - ;;
68.585 -- i386-go32 | go32) # EGCS LOCAL
68.586 -- basic_machine=i386-unknown
68.587 -- os=-go32
68.588 -- ;;
68.589 -- i386-mingw32 | mingw32)
68.590 -- basic_machine=i386-unknown
68.591 -- os=-mingw32
68.592 -- ;;
68.593 - iris | iris4d)
68.594 - basic_machine=mips-sgi
68.595 - case $os in
68.596 -@@ -531,16 +619,16 @@
68.597 - basic_machine=ns32k-utek
68.598 - os=-sysv
68.599 - ;;
68.600 -+ mingw32)
68.601 -+ basic_machine=i386-pc
68.602 -+ os=-mingw32
68.603 -+ ;;
68.604 - miniframe)
68.605 - basic_machine=m68000-convergent
68.606 - ;;
68.607 -- mipsel*-linux*)
68.608 -- basic_machine=mipsel-unknown
68.609 -- os=-linux-gnu
68.610 -- ;;
68.611 -- mips*-linux*)
68.612 -- basic_machine=mips-unknown
68.613 -- os=-linux-gnu
68.614 -+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
68.615 -+ basic_machine=m68k-atari
68.616 -+ os=-mint
68.617 - ;;
68.618 - mips3*-*)
68.619 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
68.620 -@@ -548,24 +636,36 @@
68.621 - mips3*)
68.622 - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
68.623 - ;;
68.624 -- monitor) # EGCS LOCAL
68.625 -+ mmix*)
68.626 -+ basic_machine=mmix-knuth
68.627 -+ os=-mmixware
68.628 -+ ;;
68.629 -+ monitor)
68.630 - basic_machine=m68k-rom68k
68.631 - os=-coff
68.632 - ;;
68.633 -- msdos) # EGCS LOCAL
68.634 -- basic_machine=i386-unknown
68.635 -+ morphos)
68.636 -+ basic_machine=powerpc-unknown
68.637 -+ os=-morphos
68.638 -+ ;;
68.639 -+ msdos)
68.640 -+ basic_machine=i386-pc
68.641 - os=-msdos
68.642 - ;;
68.643 -+ mvs)
68.644 -+ basic_machine=i370-ibm
68.645 -+ os=-mvs
68.646 -+ ;;
68.647 - ncr3000)
68.648 - basic_machine=i486-ncr
68.649 - os=-sysv4
68.650 - ;;
68.651 - netbsd386)
68.652 -- basic_machine=i386-unknown # EGCS LOCAL
68.653 -+ basic_machine=i386-unknown
68.654 - os=-netbsd
68.655 - ;;
68.656 - netwinder)
68.657 -- basic_machine=armv4l-corel
68.658 -+ basic_machine=armv4l-rebel
68.659 - os=-linux
68.660 - ;;
68.661 - news | news700 | news800 | news900)
68.662 -@@ -580,7 +680,7 @@
68.663 - basic_machine=mips-sony
68.664 - os=-newsos
68.665 - ;;
68.666 -- necv70) # EGCS LOCAL
68.667 -+ necv70)
68.668 - basic_machine=v70-nec
68.669 - os=-sysv
68.670 - ;;
68.671 -@@ -609,18 +709,37 @@
68.672 - basic_machine=i960-intel
68.673 - os=-nindy
68.674 - ;;
68.675 -- mon960) # EGCS LOCAL
68.676 -+ mon960)
68.677 - basic_machine=i960-intel
68.678 - os=-mon960
68.679 - ;;
68.680 -+ nonstopux)
68.681 -+ basic_machine=mips-compaq
68.682 -+ os=-nonstopux
68.683 -+ ;;
68.684 - np1)
68.685 - basic_machine=np1-gould
68.686 - ;;
68.687 -- OSE68000 | ose68000) # EGCS LOCAL
68.688 -+ nv1)
68.689 -+ basic_machine=nv1-cray
68.690 -+ os=-unicosmp
68.691 -+ ;;
68.692 -+ nsr-tandem)
68.693 -+ basic_machine=nsr-tandem
68.694 -+ ;;
68.695 -+ op50n-* | op60c-*)
68.696 -+ basic_machine=hppa1.1-oki
68.697 -+ os=-proelf
68.698 -+ ;;
68.699 -+ or32 | or32-*)
68.700 -+ basic_machine=or32-unknown
68.701 -+ os=-coff
68.702 -+ ;;
68.703 -+ OSE68000 | ose68000)
68.704 - basic_machine=m68000-ericsson
68.705 - os=-ose
68.706 - ;;
68.707 -- os68k) # EGCS LOCAL
68.708 -+ os68k)
68.709 - basic_machine=m68k-none
68.710 - os=-os68k
68.711 - ;;
68.712 -@@ -638,46 +757,60 @@
68.713 - pbb)
68.714 - basic_machine=m68k-tti
68.715 - ;;
68.716 -- pc532 | pc532-*)
68.717 -+ pc532 | pc532-*)
68.718 - basic_machine=ns32k-pc532
68.719 - ;;
68.720 -- pentium | p5 | k5 | k6 | nexen)
68.721 -+ pentium | p5 | k5 | k6 | nexgen | viac3)
68.722 - basic_machine=i586-pc
68.723 - ;;
68.724 -- pentiumpro | p6 | 6x86)
68.725 -+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
68.726 - basic_machine=i686-pc
68.727 - ;;
68.728 - pentiumii | pentium2)
68.729 -- basic_machine=i786-pc
68.730 -+ basic_machine=i686-pc
68.731 - ;;
68.732 -- pentium-* | p5-* | k5-* | k6-* | nexen-*)
68.733 -+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
68.734 - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
68.735 - ;;
68.736 -- pentiumpro-* | p6-* | 6x86-*)
68.737 -+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
68.738 - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
68.739 - ;;
68.740 - pentiumii-* | pentium2-*)
68.741 -- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
68.742 -+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
68.743 - ;;
68.744 - pn)
68.745 - basic_machine=pn-gould
68.746 - ;;
68.747 -- power) basic_machine=rs6000-ibm
68.748 -+ power) basic_machine=power-ibm
68.749 - ;;
68.750 - ppc) basic_machine=powerpc-unknown
68.751 -- ;;
68.752 -+ ;;
68.753 - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
68.754 - ;;
68.755 - ppcle | powerpclittle | ppc-le | powerpc-little)
68.756 - basic_machine=powerpcle-unknown
68.757 -- ;;
68.758 -+ ;;
68.759 - ppcle-* | powerpclittle-*)
68.760 - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
68.761 - ;;
68.762 -+ ppc64) basic_machine=powerpc64-unknown
68.763 -+ ;;
68.764 -+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
68.765 -+ ;;
68.766 -+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
68.767 -+ basic_machine=powerpc64le-unknown
68.768 -+ ;;
68.769 -+ ppc64le-* | powerpc64little-*)
68.770 -+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
68.771 -+ ;;
68.772 - ps2)
68.773 - basic_machine=i386-ibm
68.774 - ;;
68.775 -- rom68k) # EGCS LOCAL
68.776 -+ pw32)
68.777 -+ basic_machine=i586-unknown
68.778 -+ os=-pw32
68.779 -+ ;;
68.780 -+ rom68k)
68.781 - basic_machine=m68k-rom68k
68.782 - os=-coff
68.783 - ;;
68.784 -@@ -687,10 +820,22 @@
68.785 - rtpc | rtpc-*)
68.786 - basic_machine=romp-ibm
68.787 - ;;
68.788 -- sa29200) # EGCS LOCAL
68.789 -+ s390 | s390-*)
68.790 -+ basic_machine=s390-ibm
68.791 -+ ;;
68.792 -+ s390x | s390x-*)
68.793 -+ basic_machine=s390x-ibm
68.794 -+ ;;
68.795 -+ sa29200)
68.796 - basic_machine=a29k-amd
68.797 - os=-udi
68.798 - ;;
68.799 -+ sb1)
68.800 -+ basic_machine=mipsisa64sb1-unknown
68.801 -+ ;;
68.802 -+ sb1el)
68.803 -+ basic_machine=mipsisa64sb1el-unknown
68.804 -+ ;;
68.805 - sequent)
68.806 - basic_machine=i386-sequent
68.807 - ;;
68.808 -@@ -698,7 +843,7 @@
68.809 - basic_machine=sh-hitachi
68.810 - os=-hms
68.811 - ;;
68.812 -- sparclite-wrs) # EGCS LOCAL
68.813 -+ sparclite-wrs | simso-wrs)
68.814 - basic_machine=sparclite-wrs
68.815 - os=-vxworks
68.816 - ;;
68.817 -@@ -709,10 +854,10 @@
68.818 - spur)
68.819 - basic_machine=spur-unknown
68.820 - ;;
68.821 -- st2000) # EGCS LOCAL
68.822 -+ st2000)
68.823 - basic_machine=m68k-tandem
68.824 - ;;
68.825 -- stratus) # EGCS LOCAL
68.826 -+ stratus)
68.827 - basic_machine=i860-stratus
68.828 - os=-sysv4
68.829 - ;;
68.830 -@@ -756,16 +901,40 @@
68.831 - sun386 | sun386i | roadrunner)
68.832 - basic_machine=i386-sun
68.833 - ;;
68.834 -+ sv1)
68.835 -+ basic_machine=sv1-cray
68.836 -+ os=-unicos
68.837 -+ ;;
68.838 - symmetry)
68.839 - basic_machine=i386-sequent
68.840 - os=-dynix
68.841 - ;;
68.842 -+ t3e)
68.843 -+ basic_machine=alphaev5-cray
68.844 -+ os=-unicos
68.845 -+ ;;
68.846 -+ t90)
68.847 -+ basic_machine=t90-cray
68.848 -+ os=-unicos
68.849 -+ ;;
68.850 -+ tic4x | c4x*)
68.851 -+ basic_machine=tic4x-unknown
68.852 -+ os=-coff
68.853 -+ ;;
68.854 -+ tic54x | c54x*)
68.855 -+ basic_machine=tic54x-unknown
68.856 -+ os=-coff
68.857 -+ ;;
68.858 - tx39)
68.859 - basic_machine=mipstx39-unknown
68.860 - ;;
68.861 - tx39el)
68.862 - basic_machine=mipstx39el-unknown
68.863 - ;;
68.864 -+ toad1)
68.865 -+ basic_machine=pdp10-xkl
68.866 -+ os=-tops20
68.867 -+ ;;
68.868 - tower | tower-32)
68.869 - basic_machine=m68k-ncr
68.870 - ;;
68.871 -@@ -777,7 +946,7 @@
68.872 - basic_machine=a29k-nyu
68.873 - os=-sym1
68.874 - ;;
68.875 -- v810 | necv810) # EGCS LOCAL
68.876 -+ v810 | necv810)
68.877 - basic_machine=v810-nec
68.878 - os=-none
68.879 - ;;
68.880 -@@ -790,8 +959,8 @@
68.881 - os=-vms
68.882 - ;;
68.883 - vpp*|vx|vx-*)
68.884 -- basic_machine=f301-fujitsu
68.885 -- ;;
68.886 -+ basic_machine=f301-fujitsu
68.887 -+ ;;
68.888 - vxworks960)
68.889 - basic_machine=i960-wrs
68.890 - os=-vxworks
68.891 -@@ -804,18 +973,22 @@
68.892 - basic_machine=a29k-wrs
68.893 - os=-vxworks
68.894 - ;;
68.895 -- w65*) # EGCS LOCAL
68.896 -- basic_machine=w65-wdc
68.897 -- os=-none
68.898 -+ w65*)
68.899 -+ basic_machine=w65-wdc
68.900 -+ os=-none
68.901 - ;;
68.902 -- xmp)
68.903 -- basic_machine=xmp-cray
68.904 -- os=-unicos
68.905 -+ w89k-*)
68.906 -+ basic_machine=hppa1.1-winbond
68.907 -+ os=-proelf
68.908 - ;;
68.909 -- xps | xps100)
68.910 -+ xps | xps100)
68.911 - basic_machine=xps100-honeywell
68.912 - ;;
68.913 -- z8k-*-coff) # EGCS LOCAL
68.914 -+ ymp)
68.915 -+ basic_machine=ymp-cray
68.916 -+ os=-unicos
68.917 -+ ;;
68.918 -+ z8k-*-coff)
68.919 - basic_machine=z8k-unknown
68.920 - os=-sim
68.921 - ;;
68.922 -@@ -826,22 +999,15 @@
68.923 -
68.924 - # Here we handle the default manufacturer of certain CPU types. It is in
68.925 - # some cases the only manufacturer, in others, it is the most popular.
68.926 -- w89k) # EGCS LOCAL
68.927 -+ w89k)
68.928 - basic_machine=hppa1.1-winbond
68.929 - ;;
68.930 -- op50n) # EGCS LOCAL
68.931 -+ op50n)
68.932 - basic_machine=hppa1.1-oki
68.933 - ;;
68.934 -- op60c) # EGCS LOCAL
68.935 -+ op60c)
68.936 - basic_machine=hppa1.1-oki
68.937 - ;;
68.938 -- mips)
68.939 -- if [ x$os = x-linux-gnu ]; then
68.940 -- basic_machine=mips-unknown
68.941 -- else
68.942 -- basic_machine=mips-mips
68.943 -- fi
68.944 -- ;;
68.945 - romp)
68.946 - basic_machine=romp-ibm
68.947 - ;;
68.948 -@@ -851,16 +1017,26 @@
68.949 - vax)
68.950 - basic_machine=vax-dec
68.951 - ;;
68.952 -+ pdp10)
68.953 -+ # there are many clones, so DEC is not a safe bet
68.954 -+ basic_machine=pdp10-unknown
68.955 -+ ;;
68.956 - pdp11)
68.957 - basic_machine=pdp11-dec
68.958 - ;;
68.959 - we32k)
68.960 - basic_machine=we32k-att
68.961 - ;;
68.962 -- sparc | sparcv9)
68.963 -+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
68.964 -+ basic_machine=sh-unknown
68.965 -+ ;;
68.966 -+ sh64)
68.967 -+ basic_machine=sh64-unknown
68.968 -+ ;;
68.969 -+ sparc | sparcv9 | sparcv9b)
68.970 - basic_machine=sparc-sun
68.971 - ;;
68.972 -- cydra)
68.973 -+ cydra)
68.974 - basic_machine=cydra-cydrome
68.975 - ;;
68.976 - orion)
68.977 -@@ -869,16 +1045,15 @@
68.978 - orion105)
68.979 - basic_machine=clipper-highlevel
68.980 - ;;
68.981 -- mac | mpw | mac-mpw) # EGCS LOCAL
68.982 -+ mac | mpw | mac-mpw)
68.983 - basic_machine=m68k-apple
68.984 - ;;
68.985 -- pmac | pmac-mpw) # EGCS LOCAL
68.986 -+ pmac | pmac-mpw)
68.987 - basic_machine=powerpc-apple
68.988 - ;;
68.989 -- c4x*)
68.990 -- basic_machine=c4x-none
68.991 -- os=-coff
68.992 -- ;;
68.993 -+ *-unknown)
68.994 -+ # Make sure to match an already-canonicalized machine name.
68.995 -+ ;;
68.996 - *)
68.997 - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
68.998 - exit 1
68.999 -@@ -935,20 +1110,38 @@
68.1000 - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
68.1001 - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
68.1002 - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
68.1003 -+ | -chorusos* | -chorusrdb* \
68.1004 - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
68.1005 - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
68.1006 -- | -interix* | -uwin* )
68.1007 -+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
68.1008 -+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
68.1009 -+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
68.1010 -+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
68.1011 -+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
68.1012 -+ | -powermax* | -dnix* | -microbsd*)
68.1013 - # Remember, each alternative MUST END IN *, to match a version number.
68.1014 - ;;
68.1015 -- # EGCS LOCAL
68.1016 -+ -qnx*)
68.1017 -+ case $basic_machine in
68.1018 -+ x86-* | i*86-*)
68.1019 -+ ;;
68.1020 -+ *)
68.1021 -+ os=-nto$os
68.1022 -+ ;;
68.1023 -+ esac
68.1024 -+ ;;
68.1025 -+ -nto-qnx*)
68.1026 -+ ;;
68.1027 -+ -nto*)
68.1028 -+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
68.1029 -+ ;;
68.1030 - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
68.1031 -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
68.1032 -- | -macos* | -mpw* | -magic* | -mon960* | -lnews* )
68.1033 -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
68.1034 -+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
68.1035 - ;;
68.1036 - -mac*)
68.1037 - os=`echo $os | sed -e 's|mac|macos|'`
68.1038 - ;;
68.1039 -- # END EGCS LOCAL
68.1040 - -linux*)
68.1041 - os=`echo $os | sed -e 's|linux|linux-gnu|'`
68.1042 - ;;
68.1043 -@@ -958,6 +1151,12 @@
68.1044 - -sunos6*)
68.1045 - os=`echo $os | sed -e 's|sunos6|solaris3|'`
68.1046 - ;;
68.1047 -+ -opened*)
68.1048 -+ os=-openedition
68.1049 -+ ;;
68.1050 -+ -wince*)
68.1051 -+ os=-wince
68.1052 -+ ;;
68.1053 - -osfrose*)
68.1054 - os=-osfrose
68.1055 - ;;
68.1056 -@@ -973,14 +1172,23 @@
68.1057 - -acis*)
68.1058 - os=-aos
68.1059 - ;;
68.1060 -- -386bsd) # EGCS LOCAL
68.1061 -+ -atheos*)
68.1062 -+ os=-atheos
68.1063 -+ ;;
68.1064 -+ -386bsd)
68.1065 - os=-bsd
68.1066 - ;;
68.1067 - -ctix* | -uts*)
68.1068 - os=-sysv
68.1069 - ;;
68.1070 -+ -nova*)
68.1071 -+ os=-rtmk-nova
68.1072 -+ ;;
68.1073 - -ns2 )
68.1074 -- os=-nextstep2
68.1075 -+ os=-nextstep2
68.1076 -+ ;;
68.1077 -+ -nsk*)
68.1078 -+ os=-nsk
68.1079 - ;;
68.1080 - # Preserve the version number of sinix5.
68.1081 - -sinix5.*)
68.1082 -@@ -1007,15 +1215,21 @@
68.1083 - # This must come after -sysvr4.
68.1084 - -sysv*)
68.1085 - ;;
68.1086 -- -ose*) # EGCS LOCAL
68.1087 -+ -ose*)
68.1088 - os=-ose
68.1089 - ;;
68.1090 -- -es1800*) # EGCS LOCAL
68.1091 -+ -es1800*)
68.1092 - os=-ose
68.1093 - ;;
68.1094 - -xenix)
68.1095 - os=-xenix
68.1096 - ;;
68.1097 -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
68.1098 -+ os=-mint
68.1099 -+ ;;
68.1100 -+ -aros*)
68.1101 -+ os=-aros
68.1102 -+ ;;
68.1103 - -none)
68.1104 - ;;
68.1105 - *)
68.1106 -@@ -1041,13 +1255,17 @@
68.1107 - *-acorn)
68.1108 - os=-riscix1.2
68.1109 - ;;
68.1110 -- arm*-corel)
68.1111 -+ arm*-rebel)
68.1112 - os=-linux
68.1113 - ;;
68.1114 - arm*-semi)
68.1115 - os=-aout
68.1116 - ;;
68.1117 -- pdp11-*)
68.1118 -+ # This must come before the *-dec entry.
68.1119 -+ pdp10-*)
68.1120 -+ os=-tops20
68.1121 -+ ;;
68.1122 -+ pdp11-*)
68.1123 - os=-none
68.1124 - ;;
68.1125 - *-dec | vax-*)
68.1126 -@@ -1065,15 +1283,18 @@
68.1127 - # default.
68.1128 - # os=-sunos4
68.1129 - ;;
68.1130 -- m68*-cisco) # EGCS LOCAL
68.1131 -+ m68*-cisco)
68.1132 - os=-aout
68.1133 - ;;
68.1134 -- mips*-cisco) # EGCS LOCAL
68.1135 -+ mips*-cisco)
68.1136 - os=-elf
68.1137 - ;;
68.1138 -- mips*-*) # EGCS LOCAL
68.1139 -- os=-elf
68.1140 -- ;;
68.1141 -+ mips*-*)
68.1142 -+ os=-elf
68.1143 -+ ;;
68.1144 -+ or32-*)
68.1145 -+ os=-coff
68.1146 -+ ;;
68.1147 - *-tti) # must be before sparc entry or we get the wrong os.
68.1148 - os=-sysv3
68.1149 - ;;
68.1150 -@@ -1086,13 +1307,13 @@
68.1151 - *-ibm)
68.1152 - os=-aix
68.1153 - ;;
68.1154 -- *-wec) # EGCS LOCAL
68.1155 -+ *-wec)
68.1156 - os=-proelf
68.1157 - ;;
68.1158 -- *-winbond) # EGCS LOCAL
68.1159 -+ *-winbond)
68.1160 - os=-proelf
68.1161 - ;;
68.1162 -- *-oki) # EGCS LOCAL
68.1163 -+ *-oki)
68.1164 - os=-proelf
68.1165 - ;;
68.1166 - *-hp)
68.1167 -@@ -1137,36 +1358,39 @@
68.1168 - *-next)
68.1169 - os=-nextstep3
68.1170 - ;;
68.1171 -- *-gould)
68.1172 -+ *-gould)
68.1173 - os=-sysv
68.1174 - ;;
68.1175 -- *-highlevel)
68.1176 -+ *-highlevel)
68.1177 - os=-bsd
68.1178 - ;;
68.1179 - *-encore)
68.1180 - os=-bsd
68.1181 - ;;
68.1182 -- *-sgi)
68.1183 -+ *-sgi)
68.1184 - os=-irix
68.1185 - ;;
68.1186 -- *-siemens)
68.1187 -+ *-siemens)
68.1188 - os=-sysv4
68.1189 - ;;
68.1190 - *-masscomp)
68.1191 - os=-rtu
68.1192 - ;;
68.1193 -- f301-fujitsu)
68.1194 -+ f30[01]-fujitsu | f700-fujitsu)
68.1195 - os=-uxpv
68.1196 - ;;
68.1197 -- *-rom68k) # EGCS LOCAL
68.1198 -+ *-rom68k)
68.1199 - os=-coff
68.1200 - ;;
68.1201 -- *-*bug) # EGCS LOCAL
68.1202 -+ *-*bug)
68.1203 - os=-coff
68.1204 - ;;
68.1205 -- *-apple) # EGCS LOCAL
68.1206 -+ *-apple)
68.1207 - os=-macos
68.1208 - ;;
68.1209 -+ *-atari*)
68.1210 -+ os=-mint
68.1211 -+ ;;
68.1212 - *)
68.1213 - os=-none
68.1214 - ;;
68.1215 -@@ -1212,27 +1436,41 @@
68.1216 - -genix*)
68.1217 - vendor=ns
68.1218 - ;;
68.1219 -- -mvs*)
68.1220 -+ -mvs* | -opened*)
68.1221 - vendor=ibm
68.1222 - ;;
68.1223 - -ptx*)
68.1224 - vendor=sequent
68.1225 - ;;
68.1226 -- -vxsim* | -vxworks*)
68.1227 -+ -vxsim* | -vxworks* | -windiss*)
68.1228 - vendor=wrs
68.1229 - ;;
68.1230 - -aux*)
68.1231 - vendor=apple
68.1232 - ;;
68.1233 -- -hms*) # EGCS LOCAL
68.1234 -+ -hms*)
68.1235 - vendor=hitachi
68.1236 - ;;
68.1237 -- -mpw* | -macos*) # EGCS LOCAL
68.1238 -+ -mpw* | -macos*)
68.1239 - vendor=apple
68.1240 - ;;
68.1241 -+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
68.1242 -+ vendor=atari
68.1243 -+ ;;
68.1244 -+ -vos*)
68.1245 -+ vendor=stratus
68.1246 -+ ;;
68.1247 - esac
68.1248 - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
68.1249 - ;;
68.1250 - esac
68.1251 -
68.1252 - echo $basic_machine$os
68.1253 -+exit 0
68.1254 -+
68.1255 -+# Local variables:
68.1256 -+# eval: (add-hook 'write-file-hooks 'time-stamp)
68.1257 -+# time-stamp-start: "timestamp='"
68.1258 -+# time-stamp-format: "%:y-%02m-%02d"
68.1259 -+# time-stamp-end: "'"
68.1260 -+# End:
69.1 --- a/patches/gcc/2.95.3/deque-leak-fix.patch Sat Sep 22 17:25:42 2007 +0000
69.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
69.3 @@ -1,31 +0,0 @@
69.4 -[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
69.5 -
69.6 -Date: Fri, 16 Nov 2001 16:06:22 -0500
69.7 -From: Phil Edwards <pedwards at disaster dot jaj dot com>
69.8 -To: gcc-patches at gcc dot gnu dot org
69.9 -Subject: [libstdc++ trunk & 3.0] Fix deque memory leak
69.10 -Message-ID: <20011116160622.A23094@disaster.jaj.com>
69.11 -
69.12 -
69.13 -As discussed on the libstdc++ mailing list. Tested on i686/linux.
69.14 -
69.15 -
69.16 -
69.17 -2001-11-16 Paolo Carlini <pcarlini@unitus.it>
69.18 -
69.19 - * include/bits/stl_deque.h (deque::erase()): Fix memory leak.
69.20 -
69.21 -
69.22 -[rediffed against 2.95.3 -- dank]
69.23 -
69.24 ---- gcc-2.95.3/libstdc++/stl/stl_deque.h.old 2001-01-01 09:48:22.000000000 -0800
69.25 -+++ gcc-2.95.3/libstdc++/stl/stl_deque.h 2006-02-18 15:24:17.000000000 -0800
69.26 -@@ -1052,7 +1052,7 @@
69.27 - copy_backward(_M_start, __first, __last);
69.28 - iterator __new_start = _M_start + __n;
69.29 - destroy(_M_start, __new_start);
69.30 -- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
69.31 -+ _M_destroy_nodes(_M_start._M_node, __new_start._M_node); /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
69.32 - _M_start = __new_start;
69.33 - }
69.34 - else {
70.1 --- a/patches/gcc/2.95.3/gcc-2.95.3-cygwin-020611.patch Sat Sep 22 17:25:42 2007 +0000
70.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
70.3 @@ -1,33 +0,0 @@
70.4 -[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
70.5 - on the end of every executable, even if they're linux executable.
70.6 - This is highly annoying, and causes glibc build failures that look like this:
70.7 - mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
70.8 - make[2]: *** [.../bin/makedb] Error 1
70.9 - make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
70.10 -
70.11 - The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
70.12 - but that doesn't apply cleanly to gcc-2.95.3.
70.13 -
70.14 - So, I'm using
70.15 - http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
70.16 - This is the only patch in crosstool that *isn't* suitable for the mainline.
70.17 - I can live with this patch simply because crosstool does not build
70.18 - compilers that target cygwin or VAX/VMS.
70.19 - If that ever changes, I might need to try applying the real patch.
70.20 -]
70.21 -
70.22 -
70.23 -
70.24 -#
70.25 -# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
70.26 -#
70.27 ---- gcc-2.95.3/gcc/config/i386/xm-cygwin.h 1999-04-22 16:40:56.000000000 +0200
70.28 -+++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h 2002-06-11 08:23:18.000000000 +0200
70.29 -@@ -19,7 +19,6 @@
70.30 - the Free Software Foundation, 59 Temple Place - Suite 330,
70.31 - Boston, MA 02111-1307, USA. */
70.32 -
70.33 --#define EXECUTABLE_SUFFIX ".exe"
70.34 - #define NO_SYS_SIGLIST 1
70.35 -
70.36 - /* We support both "/" and "\" since everybody tests both but we
71.1 --- a/patches/gcc/2.95.3/gcc-2.95.3-trap-posix.patch Sat Sep 22 17:25:42 2007 +0000
71.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
71.3 @@ -1,44 +0,0 @@
71.4 -#
71.5 -# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
71.6 -#
71.7 -# Error:
71.8 -#
71.9 -# creating libintl.h
71.10 -# Configuring etc...
71.11 -# loading cache ../config.cache
71.12 -# checking for a BSD compatible install... (cached) /usr/bin/install -c
71.13 -# creating ./config.status
71.14 -# creating Makefile
71.15 -# trap: usage: trap [-lp] [[arg] signal_spec ...]
71.16 -#
71.17 -# Description:
71.18 -#
71.19 -# non-posix conform usage of trap causes bash >= 3.0 to fail
71.20 -# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
71.21 -#
71.22 -# Status:
71.23 -#
71.24 -# fixed in gcc >= 3.3.5
71.25 -# backport of gcc-3.3.5 fix
71.26 -#
71.27 -diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
71.28 ---- gcc-2.95.3-orig/configure 1999-04-02 16:17:40.000000000 +0200
71.29 -+++ gcc-2.95.3/configure 2005-04-20 18:25:45.030488235 +0200
71.30 -@@ -687,7 +687,7 @@
71.31 - if test -f skip-this-dir; then
71.32 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
71.33 - # and reset the trap handler.
71.34 -- trap 0
71.35 -+ trap '' 0
71.36 - rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
71.37 - # Execute the final clean-up actions
71.38 - ${config_shell} skip-this-dir
71.39 -@@ -1599,7 +1599,7 @@
71.40 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
71.41 - # and reset the trap handler.
71.42 - rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
71.43 --trap 0
71.44 -+trap '' 0
71.45 -
71.46 - exit 0
71.47 -
72.1 --- a/patches/gcc/2.95.3/gcc-pr3106.patch Sat Sep 22 17:25:42 2007 +0000
72.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
72.3 @@ -1,28 +0,0 @@
72.4 -See http://gcc.gnu.org/PR3106
72.5 -Backported from gcc-3.0.x
72.6 -
72.7 -Fixes error
72.8 - .../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
72.9 - /usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
72.10 - make[1]: *** [strerror.o] Error 1
72.11 - make: *** [all-libiberty] Error 2
72.12 -on Mac OS X.
72.13 -
72.14 ---- gcc-2.95.3/libiberty/strerror.c.old 2004-03-24 16:23:19.000000000 -0800
72.15 -+++ gcc-2.95.3/libiberty/strerror.c 2004-03-24 16:23:48.000000000 -0800
72.16 -@@ -13,6 +13,7 @@
72.17 - incompatible with our later declaration, perhaps by using const
72.18 - attributes. So we hide the declaration in errno.h (if any) using a
72.19 - macro. */
72.20 -+#define sys_nerr sys_nerr__
72.21 - #define sys_errlist sys_errlist__
72.22 - #endif
72.23 -
72.24 -@@ -20,6 +21,7 @@
72.25 - #include <errno.h>
72.26 -
72.27 - #ifdef HAVE_SYS_ERRLIST
72.28 -+#undef sys_nerr
72.29 - #undef sys_errlist
72.30 - #endif
72.31 -
73.1 --- a/patches/gcc/2.95.3/threads_snafu.patch Sat Sep 22 17:25:42 2007 +0000
73.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
73.3 @@ -1,28 +0,0 @@
73.4 -This fixes the error
73.5 -
73.6 -In file included from gthr-default.h:1,
73.7 - from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr.h:98,
73.8 - from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/libgcc2.c:3034:
73.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
73.10 -make[3]: *** [libgcc2.a] Error 1
73.11 -make[3]: Leaving directory `/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-gcc-core/gcc'
73.12 -
73.13 -in what I think is a nicer way than the patch used by the arm team,
73.14 -i.e. "perl -pi -e 's/^(TARGET_LIBGCC2_CFLAGS.*)/$1 -Dinhibit_libc -D__gthr_posix_h/' gcc/config/arm/t-linux"
73.15 -which seems a bit of a kludge.
73.16 -
73.17 ---- gcc-2.95.3/gcc/configure.old Fri Mar 16 06:13:48 2001
73.18 -+++ gcc-2.95.3/gcc/configure Sun Jun 8 13:02:20 2003
73.19 -@@ -853,9 +853,9 @@
73.20 - # Check whether --enable-threads or --disable-threads was given.
73.21 - if test "${enable_threads+set}" = set; then
73.22 - enableval="$enable_threads"
73.23 -- if test x$enable_threads = xno; then
73.24 -- enable_threads=''
73.25 --fi
73.26 -+ #if test x$enable_threads = xno; then
73.27 -+ #enable_threads=''
73.28 -+ #fi
73.29 - else
73.30 - enable_threads=''
73.31 - fi
74.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
74.2 +++ b/patches/gcc/3.2.3/100-config.sub.patch Sun Sep 23 17:08:09 2007 +0000
74.3 @@ -0,0 +1,72 @@
74.4 +When configuring a s390->s390 or cris->cris crosscompiler
74.5 +(ok, I haven't hit this yet, but one of these days I'll get me an account
74.6 +on an s390, and then I'll need this patch :-), you'll get the
74.7 +following error:
74.8 +
74.9 ++ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
74.10 +--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
74.11 +--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
74.12 +--enable-languages=c
74.13 +--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
74.14 +unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
74.15 +--disable-shared
74.16 +...
74.17 +*** --with-headers is only supported when cross compiling
74.18 +
74.19 +This error pops up only when you're using Daniel Jacobowitz's technique
74.20 +of slightly changing the target and host tuples to make them different
74.21 +enough to force gcc's build system to not try to pull in system libraries
74.22 +or headers. This technique is needed e.g. to build an x86 -> x86
74.23 +cross-compiler.
74.24 +(The LFS developers ran into the same bug that prompted me to use
74.25 +this technique; they point people who run into it to
74.26 +http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
74.27 +way of avoiding this problem. I think the tuple tweak is the way to go, though.)
74.28 +
74.29 +config-patches@gnu.org rejected this patch, on the grounds that there
74.30 +is only one vendor of each of those two architectures, so the
74.31 +canonicalization is by definition correct. When I pointed out the
74.32 +difficulty this causes for people building s390 -> s390 or
74.33 +cris -> cris compilers that are incompatible with the system
74.34 +libraries and thus must be built like cross-compilers, he grumped and said
74.35 +"autoconf should let you specify a cross-compiler in some other way than
74.36 +comparing tuple strings".
74.37 +
74.38 +
74.39 +
74.40 +--- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003
74.41 ++++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003
74.42 +@@ -433,9 +433,12 @@
74.43 + crds | unos)
74.44 + basic_machine=m68k-crds
74.45 + ;;
74.46 +- cris | cris-* | etrax*)
74.47 ++ cris | etrax*)
74.48 + basic_machine=cris-axis
74.49 + ;;
74.50 ++ cris-*)
74.51 ++ basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
74.52 ++ ;;
74.53 + da30 | da30-*)
74.54 + basic_machine=m68k-da30
74.55 + ;;
74.56 +@@ -820,11 +823,17 @@
74.57 + rtpc | rtpc-*)
74.58 + basic_machine=romp-ibm
74.59 + ;;
74.60 +- s390 | s390-*)
74.61 ++ s390)
74.62 + basic_machine=s390-ibm
74.63 + ;;
74.64 +- s390x | s390x-*)
74.65 ++ s390-*)
74.66 ++ basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
74.67 ++ ;;
74.68 ++ s390x)
74.69 + basic_machine=s390x-ibm
74.70 ++ ;;
74.71 ++ s390x-*)
74.72 ++ basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
74.73 + ;;
74.74 + sa29200)
74.75 + basic_machine=a29k-amd
75.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
75.2 +++ b/patches/gcc/3.2.3/110-gcc-20020722-ppc405erratum77.patch Sun Sep 23 17:08:09 2007 +0000
75.3 @@ -0,0 +1,105 @@
75.4 +# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
75.5 +# Fixed in gcc-3.3
75.6 +
75.7 +diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
75.8 +--- gcc-20020722.orig/gcc/config/rs6000/rs6000.h Thu Jul 25 09:32:21 2002
75.9 ++++ gcc-20020722/gcc/config/rs6000/rs6000.h Thu Jul 25 09:34:45 2002
75.10 +@@ -66,7 +66,7 @@
75.11 + %{mcpu=rsc1: -D_ARCH_PWR} \
75.12 + %{mcpu=401: -D_ARCH_PPC} \
75.13 + %{mcpu=403: -D_ARCH_PPC} \
75.14 +-%{mcpu=405: -D_ARCH_PPC} \
75.15 ++%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
75.16 + %{mcpu=505: -D_ARCH_PPC} \
75.17 + %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
75.18 + %{mcpu=602: -D_ARCH_PPC} \
75.19 +diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
75.20 +--- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h Thu Jul 25 09:32:30 2002
75.21 ++++ gcc-20020722/libjava/sysdep/powerpc/locks.h Thu Jul 25 11:39:13 2002
75.22 +@@ -11,6 +11,17 @@
75.23 + #ifndef __SYSDEP_LOCKS_H__
75.24 + #define __SYSDEP_LOCKS_H__
75.25 +
75.26 ++#ifdef __PPC405__
75.27 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN. References:
75.28 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
75.29 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
75.30 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
75.31 ++// FIXME: using dbct instead of sync would be faster
75.32 ++#define __LIBGCJ_PPC405_ERR77_SYNC "sync \n\t"
75.33 ++#else
75.34 ++#define __LIBGCJ_PPC405_ERR77_SYNC
75.35 ++#endif
75.36 ++
75.37 + typedef size_t obj_addr_t; /* Integer type big enough for object */
75.38 + /* address. */
75.39 +
75.40 +@@ -25,6 +36,7 @@
75.41 + "0: lwarx %0,0,%1 ;"
75.42 + " xor. %0,%3,%0;"
75.43 + " bne 1f;"
75.44 ++ __LIBGCJ_PPC405_ERR77_SYNC
75.45 + " stwcx. %2,0,%1;"
75.46 + " bne- 0b;"
75.47 + "1: "
75.48 +@@ -58,6 +70,7 @@
75.49 + "0: lwarx %0,0,%1 ;"
75.50 + " xor. %0,%3,%0;"
75.51 + " bne 1f;"
75.52 ++ __LIBGCJ_PPC405_ERR77_SYNC
75.53 + " stwcx. %2,0,%1;"
75.54 + " bne- 0b;"
75.55 + "1: "
75.56 +diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
75.57 +--- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:32:31 2002
75.58 ++++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:34:45 2002
75.59 +@@ -32,6 +32,17 @@
75.60 +
75.61 + typedef int _Atomic_word;
75.62 +
75.63 ++#ifdef __PPC405__
75.64 ++// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank. References:
75.65 ++// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
75.66 ++// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
75.67 ++// http://www.kegel.com/xgcc3/ppc405erratum77.html
75.68 ++// FIXME: using dbct instead of sync would be faster
75.69 ++#define __LIBSTDCPP_PPC405_ERR77_SYNC "sync \n\t"
75.70 ++#else
75.71 ++#define __LIBSTDCPP_PPC405_ERR77_SYNC
75.72 ++#endif
75.73 ++
75.74 + static inline _Atomic_word
75.75 + __attribute__ ((__unused__))
75.76 + __exchange_and_add (volatile _Atomic_word* __mem, int __val)
75.77 +@@ -42,6 +53,7 @@
75.78 + "0:\t"
75.79 + "lwarx %0,0,%2 \n\t"
75.80 + "add%I3 %1,%0,%3 \n\t"
75.81 ++ __LIBSTDCPP_PPC405_ERR77_SYNC
75.82 + "stwcx. %1,0,%2 \n\t"
75.83 + "bne- 0b \n\t"
75.84 + "/* End exchange & add */"
75.85 +@@ -61,6 +73,7 @@
75.86 + "0:\t"
75.87 + "lwarx %0,0,%1 \n\t"
75.88 + "add%I2 %0,%0,%2 \n\t"
75.89 ++ __LIBSTDCPP_PPC405_ERR77_SYNC
75.90 + "stwcx. %0,0,%1 \n\t"
75.91 + "bne- 0b \n\t"
75.92 + "/* End atomic add */"
75.93 +@@ -78,6 +91,7 @@
75.94 + "/* Inline always swap */\n"
75.95 + "0:\t"
75.96 + "lwarx %0,0,%1 \n\t"
75.97 ++ __LIBSTDCPP_PPC405_ERR77_SYNC
75.98 + "stwcx. %2,0,%1 \n\t"
75.99 + "bne- 0b \n\t"
75.100 + "/* End always swap */"
75.101 +@@ -98,6 +112,7 @@
75.102 + "lwarx %0,0,%1 \n\t"
75.103 + "cmpwi %0,0 \n\t"
75.104 + "bne- 1f \n\t"
75.105 ++ __LIBSTDCPP_PPC405_ERR77_SYNC
75.106 + "stwcx. %2,0,%1 \n\t"
75.107 + "bne- 0b \n"
75.108 + "1:\n\t"
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
76.2 +++ b/patches/gcc/3.2.3/120-gcc-20030210-sh-linux-1.patch Sun Sep 23 17:08:09 2007 +0000
76.3 @@ -0,0 +1,1761 @@
76.4 +diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
76.5 +--- gcc-20030210.orig/boehm-gc/configure Fri Jan 31 19:17:00 2003
76.6 ++++ gcc-20030210/boehm-gc/configure Sat Feb 22 01:40:14 2003
76.7 +@@ -1922,7 +1922,7 @@
76.8 + # This must be Linux ELF.
76.9 + linux-gnu*)
76.10 + case $host_cpu in
76.11 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
76.12 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
76.13 + lt_cv_deplibs_check_method=pass_all ;;
76.14 + *)
76.15 + # glibc up to 2.1.1 does not perform some relocations on ARM
76.16 +diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
76.17 +--- gcc-20030210.orig/config-ml.in Fri Jan 31 19:16:59 2003
76.18 ++++ gcc-20030210/config-ml.in Sat Feb 22 01:40:14 2003
76.19 +@@ -545,6 +545,7 @@
76.20 + if [ -d ../$${dir}/$${lib} ]; then \
76.21 + flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
76.22 + if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
76.23 ++ DESTDIR="$(DESTDIR)" \
76.24 + CFLAGS="$(CFLAGS) $${flags}" \
76.25 + prefix="$(prefix)" \
76.26 + exec_prefix="$(exec_prefix)" \
76.27 +diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
76.28 +--- gcc-20030210.orig/debian/edit-specs.in Thu Jan 1 09:00:00 1970
76.29 ++++ gcc-20030210/debian/edit-specs.in Sat Feb 22 01:40:14 2003
76.30 +@@ -0,0 +1,45 @@
76.31 ++/^*asm:$/ {
76.32 ++n
76.33 ++c\
76.34 ++@AS_ENDIAN_FLAG@ %{mrelax:-relax}
76.35 ++}
76.36 ++/^*cpp:$/ {
76.37 ++n
76.38 ++c\
76.39 ++%(cpp_default_cpu_spec) %(subtarget_cpp_spec) %(subtarget_cpp_ptr_spec) %(subtarget_cpp_endian_spec)
76.40 ++}
76.41 ++/^*cc1:$/ {
76.42 ++n
76.43 ++c\
76.44 ++-musermode @CC1_CPU_ENDIAN_FLAGS@ %{profile:-p}
76.45 ++}
76.46 ++/^*link:$/ {
76.47 ++n
76.48 ++c\
76.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}
76.50 ++}
76.51 ++/^*multilib:$/ {
76.52 ++n
76.53 ++c\
76.54 ++. ;
76.55 ++}
76.56 ++/^*multilib_matches:$/ {
76.57 ++n
76.58 ++c\
76.59 ++
76.60 ++}
76.61 ++/^*multilib_options:$/ {
76.62 ++n
76.63 ++c\
76.64 ++
76.65 ++}
76.66 ++/^*subtarget_cpp_endian_spec:$/ {
76.67 ++n
76.68 ++c\
76.69 ++@CPP_ENDIAN_DEF@
76.70 ++}
76.71 ++/^*cpp_default_cpu_spec:$/ {
76.72 ++n
76.73 ++c\
76.74 ++@CPP_CPU_DEFS@
76.75 ++}
76.76 +diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
76.77 +--- gcc-20030210.orig/debian/install-CPU-linux Thu Jan 1 09:00:00 1970
76.78 ++++ gcc-20030210/debian/install-CPU-linux Sat Feb 22 01:40:14 2003
76.79 +@@ -0,0 +1,111 @@
76.80 ++#! /bin/sh
76.81 ++
76.82 ++VERSION=$1; shift
76.83 ++CPU=$1
76.84 ++
76.85 ++# literally (binary-ly) same
76.86 ++PROGS_C="cpp gcc"
76.87 ++PROGS_ADDITIONAL="c++ g++ g77 gcj"
76.88 ++
76.89 ++DRIVERS_C="cc1 cpp0 tradcpp0"
76.90 ++DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
76.91 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
76.92 ++ PROGS="$PROGS_C $PROGS_ADDITIONAL"
76.93 ++ DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
76.94 ++ INITIAL=""
76.95 ++else
76.96 ++ PROGS=$PROGS_C
76.97 ++ DRIVERS=$DRIVERS_C
76.98 ++ INITIAL="-initial"
76.99 ++fi
76.100 ++
76.101 ++OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
76.102 ++LIBS_C="libgcc.a"
76.103 ++LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
76.104 ++LIBS_2="libobjc.a libstdc++.a libsupc++.a"
76.105 ++INCLUDE="include"
76.106 ++
76.107 ++cd debian/gcc-sh-linux-others${INITIAL} || exit 1
76.108 ++
76.109 ++# Make directories.
76.110 ++mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
76.111 ++ usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
76.112 ++ usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
76.113 ++ usr/${CPU}-linux usr/${CPU}-linux/lib
76.114 ++
76.115 ++# Make symbolic links for include dir.
76.116 ++(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
76.117 ++
76.118 ++# Make symbolic links for executables.
76.119 ++(cd usr/bin;
76.120 ++ for p in ${PROGS}; do
76.121 ++ ln -s shCPU-linux-GCC ${CPU}-linux-$p
76.122 ++ done)
76.123 ++
76.124 ++case "${CPU}" in
76.125 ++ sh3)
76.126 ++ MULTILIBDIR=
76.127 ++ AS_ENDIAN_FLAG="-little"
76.128 ++ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
76.129 ++ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
76.130 ++ CC1_CPU_ENDIAN_FLAGS="-ml -m3"
76.131 ++ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
76.132 ++ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
76.133 ++ ;;
76.134 ++ sh3eb)
76.135 ++ MULTILIBDIR=/mb
76.136 ++ AS_ENDIAN_FLAG="-big"
76.137 ++ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
76.138 ++ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
76.139 ++ CC1_CPU_ENDIAN_FLAGS="-mb -m3"
76.140 ++ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
76.141 ++ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
76.142 ++ ;;
76.143 ++ sh4)
76.144 ++ MULTILIBDIR=/m4
76.145 ++ AS_ENDIAN_FLAG="-little"
76.146 ++ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
76.147 ++ CPP_CPU_DEFS="-D__SH4__"
76.148 ++ CC1_CPU_ENDIAN_FLAGS="-ml -m4"
76.149 ++ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
76.150 ++ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
76.151 ++ ;;
76.152 ++ sh4eb)
76.153 ++ MULTILIBDIR=/mb/m4
76.154 ++ AS_ENDIAN_FLAG="-big"
76.155 ++ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
76.156 ++ CPP_CPU_DEFS="-D__SH4__"
76.157 ++ CC1_CPU_ENDIAN_FLAGS="-mb -m4"
76.158 ++ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
76.159 ++ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
76.160 ++ ;;
76.161 ++esac
76.162 ++
76.163 ++# Make symbolic links for GCC drivers, objects, libraries, and include dir.
76.164 ++(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
76.165 ++ for f in ${DRIVERS} ${INCLUDE}; do
76.166 ++ ln -s ../../sh-linux/${VERSION}/$f $f;
76.167 ++ done
76.168 ++ for f in ${OBJS} ${LIBS_C}; do
76.169 ++ ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
76.170 ++ done)
76.171 ++
76.172 ++if [ -z "$STEP1_COMPILER_BUILD" ]; then
76.173 ++ for f in ${LIBS_1} ${LIBS_2}; do
76.174 ++ mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
76.175 ++ done
76.176 ++fi
76.177 ++
76.178 ++sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
76.179 ++ -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
76.180 ++ -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
76.181 ++ -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
76.182 ++ -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
76.183 ++ -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
76.184 ++ ../edit-specs.in >../edit-specs-${CPU}.sed
76.185 ++
76.186 ++sed -f ../edit-specs-${CPU}.sed \
76.187 ++ ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
76.188 ++ > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
76.189 ++
76.190 ++exit 0
76.191 +diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
76.192 +--- gcc-20030210.orig/debian/multilib-symlink Thu Jan 1 09:00:00 1970
76.193 ++++ gcc-20030210/debian/multilib-symlink Sat Feb 22 01:40:14 2003
76.194 +@@ -0,0 +1,10 @@
76.195 ++#! /bin/sh
76.196 ++
76.197 ++cd /usr/sh-linux/lib
76.198 ++ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
76.199 ++cd m4
76.200 ++ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
76.201 ++cd ../mb
76.202 ++ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
76.203 ++cd m4
76.204 ++ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
76.205 +diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
76.206 +--- gcc-20030210.orig/debian/shCPU-linux-GCC Thu Jan 1 09:00:00 1970
76.207 ++++ gcc-20030210/debian/shCPU-linux-GCC Sat Feb 22 01:40:14 2003
76.208 +@@ -0,0 +1,59 @@
76.209 ++#! /bin/bash
76.210 ++
76.211 ++BASENAME=${0##*/}
76.212 ++PROG=${BASENAME##*-}
76.213 ++CPU=${BASENAME%%-*}
76.214 ++
76.215 ++if [ "$PROG" = gcc ]; then
76.216 ++ if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
76.217 ++ shift 2
76.218 ++ exec /usr/bin/gcc "$@"
76.219 ++ elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
76.220 ++ echo ".;"
76.221 ++ exit 0
76.222 ++ elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
76.223 ++ echo "."
76.224 ++ exit 0
76.225 ++ elif [ "$1" = "-dumpspecs" ]; then
76.226 ++ cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
76.227 ++ exit 0
76.228 ++ fi
76.229 ++fi
76.230 ++
76.231 ++case "${CPU}" in
76.232 ++ sh3)
76.233 ++ ARCH=m3
76.234 ++ DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
76.235 ++ ENDIAN=ml
76.236 ++ ;;
76.237 ++ sh3eb)
76.238 ++ ARCH=m3
76.239 ++ DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
76.240 ++ ENDIAN=mb
76.241 ++ ;;
76.242 ++ sh4)
76.243 ++ ARCH=m4
76.244 ++ DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
76.245 ++ ENDIAN=ml
76.246 ++ ;;
76.247 ++ sh4eb)
76.248 ++ ARCH=m4
76.249 ++ DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
76.250 ++ ENDIAN=mb
76.251 ++ ;;
76.252 ++esac
76.253 ++
76.254 ++# Prepend the appropriate options
76.255 ++# If user specifies some options, it will be overridden
76.256 ++
76.257 ++case "${PROG}" in
76.258 ++ cpp)
76.259 ++ exec sh-linux-${PROG} $DEFINES "$@"
76.260 ++ ;;
76.261 ++ c++|g++|g77|gcc|gcj)
76.262 ++ exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
76.263 ++ ;;
76.264 ++esac
76.265 ++
76.266 ++echo "Something wrong..."
76.267 ++exit 1
76.268 +diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
76.269 +--- gcc-20030210.orig/gcc/config/sh/elf.h Fri Feb 22 01:42:28 2002
76.270 ++++ gcc-20030210/gcc/config/sh/elf.h Sat Feb 22 01:40:14 2003
76.271 +@@ -170,3 +170,7 @@
76.272 + #undef ENDFILE_SPEC
76.273 + #define ENDFILE_SPEC \
76.274 + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
76.275 ++
76.276 ++/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
76.277 ++ redundant .align will be generated. */
76.278 ++#undef ASM_OUTPUT_CASE_LABEL
76.279 +diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
76.280 +--- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm Fri Feb 22 01:42:28 2002
76.281 ++++ gcc-20030210/gcc/config/sh/lib1funcs.asm Sat Feb 22 01:40:14 2003
76.282 +@@ -39,8 +39,13 @@
76.283 +
76.284 + #ifdef __ELF__
76.285 + #define LOCAL(X) .L_##X
76.286 ++#define FUNC(X) .type X,@function; .hidden X
76.287 ++#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
76.288 ++#define ENDFUNC(X) _ENDFUNC(X)
76.289 + #else
76.290 + #define LOCAL(X) L_##X
76.291 ++#define FUNC(X)
76.292 ++#define ENDFUNC(X)
76.293 + #endif
76.294 +
76.295 + #ifdef __linux__
76.296 +@@ -91,6 +96,40 @@
76.297 + .global GLOBAL(ashiftrt_r4_31)
76.298 + .global GLOBAL(ashiftrt_r4_32)
76.299 +
76.300 ++ FUNC(GLOBAL(ashiftrt_r4_0))
76.301 ++ FUNC(GLOBAL(ashiftrt_r4_1))
76.302 ++ FUNC(GLOBAL(ashiftrt_r4_2))
76.303 ++ FUNC(GLOBAL(ashiftrt_r4_3))
76.304 ++ FUNC(GLOBAL(ashiftrt_r4_4))
76.305 ++ FUNC(GLOBAL(ashiftrt_r4_5))
76.306 ++ FUNC(GLOBAL(ashiftrt_r4_6))
76.307 ++ FUNC(GLOBAL(ashiftrt_r4_7))
76.308 ++ FUNC(GLOBAL(ashiftrt_r4_8))
76.309 ++ FUNC(GLOBAL(ashiftrt_r4_9))
76.310 ++ FUNC(GLOBAL(ashiftrt_r4_10))
76.311 ++ FUNC(GLOBAL(ashiftrt_r4_11))
76.312 ++ FUNC(GLOBAL(ashiftrt_r4_12))
76.313 ++ FUNC(GLOBAL(ashiftrt_r4_13))
76.314 ++ FUNC(GLOBAL(ashiftrt_r4_14))
76.315 ++ FUNC(GLOBAL(ashiftrt_r4_15))
76.316 ++ FUNC(GLOBAL(ashiftrt_r4_16))
76.317 ++ FUNC(GLOBAL(ashiftrt_r4_17))
76.318 ++ FUNC(GLOBAL(ashiftrt_r4_18))
76.319 ++ FUNC(GLOBAL(ashiftrt_r4_19))
76.320 ++ FUNC(GLOBAL(ashiftrt_r4_20))
76.321 ++ FUNC(GLOBAL(ashiftrt_r4_21))
76.322 ++ FUNC(GLOBAL(ashiftrt_r4_22))
76.323 ++ FUNC(GLOBAL(ashiftrt_r4_23))
76.324 ++ FUNC(GLOBAL(ashiftrt_r4_24))
76.325 ++ FUNC(GLOBAL(ashiftrt_r4_25))
76.326 ++ FUNC(GLOBAL(ashiftrt_r4_26))
76.327 ++ FUNC(GLOBAL(ashiftrt_r4_27))
76.328 ++ FUNC(GLOBAL(ashiftrt_r4_28))
76.329 ++ FUNC(GLOBAL(ashiftrt_r4_29))
76.330 ++ FUNC(GLOBAL(ashiftrt_r4_30))
76.331 ++ FUNC(GLOBAL(ashiftrt_r4_31))
76.332 ++ FUNC(GLOBAL(ashiftrt_r4_32))
76.333 ++
76.334 + .align 1
76.335 + GLOBAL(ashiftrt_r4_32):
76.336 + GLOBAL(ashiftrt_r4_31):
76.337 +@@ -170,6 +209,41 @@
76.338 + GLOBAL(ashiftrt_r4_0):
76.339 + rts
76.340 + nop
76.341 ++
76.342 ++ ENDFUNC(GLOBAL(ashiftrt_r4_0))
76.343 ++ ENDFUNC(GLOBAL(ashiftrt_r4_1))
76.344 ++ ENDFUNC(GLOBAL(ashiftrt_r4_2))
76.345 ++ ENDFUNC(GLOBAL(ashiftrt_r4_3))
76.346 ++ ENDFUNC(GLOBAL(ashiftrt_r4_4))
76.347 ++ ENDFUNC(GLOBAL(ashiftrt_r4_5))
76.348 ++ ENDFUNC(GLOBAL(ashiftrt_r4_6))
76.349 ++ ENDFUNC(GLOBAL(ashiftrt_r4_7))
76.350 ++ ENDFUNC(GLOBAL(ashiftrt_r4_8))
76.351 ++ ENDFUNC(GLOBAL(ashiftrt_r4_9))
76.352 ++ ENDFUNC(GLOBAL(ashiftrt_r4_10))
76.353 ++ ENDFUNC(GLOBAL(ashiftrt_r4_11))
76.354 ++ ENDFUNC(GLOBAL(ashiftrt_r4_12))
76.355 ++ ENDFUNC(GLOBAL(ashiftrt_r4_13))
76.356 ++ ENDFUNC(GLOBAL(ashiftrt_r4_14))
76.357 ++ ENDFUNC(GLOBAL(ashiftrt_r4_15))
76.358 ++ ENDFUNC(GLOBAL(ashiftrt_r4_16))
76.359 ++ ENDFUNC(GLOBAL(ashiftrt_r4_17))
76.360 ++ ENDFUNC(GLOBAL(ashiftrt_r4_18))
76.361 ++ ENDFUNC(GLOBAL(ashiftrt_r4_19))
76.362 ++ ENDFUNC(GLOBAL(ashiftrt_r4_20))
76.363 ++ ENDFUNC(GLOBAL(ashiftrt_r4_21))
76.364 ++ ENDFUNC(GLOBAL(ashiftrt_r4_22))
76.365 ++ ENDFUNC(GLOBAL(ashiftrt_r4_23))
76.366 ++ ENDFUNC(GLOBAL(ashiftrt_r4_24))
76.367 ++ ENDFUNC(GLOBAL(ashiftrt_r4_25))
76.368 ++ ENDFUNC(GLOBAL(ashiftrt_r4_26))
76.369 ++ ENDFUNC(GLOBAL(ashiftrt_r4_27))
76.370 ++ ENDFUNC(GLOBAL(ashiftrt_r4_28))
76.371 ++ ENDFUNC(GLOBAL(ashiftrt_r4_29))
76.372 ++ ENDFUNC(GLOBAL(ashiftrt_r4_30))
76.373 ++ ENDFUNC(GLOBAL(ashiftrt_r4_31))
76.374 ++ ENDFUNC(GLOBAL(ashiftrt_r4_32))
76.375 ++
76.376 + #endif
76.377 +
76.378 + #ifdef L_ashiftrt_n
76.379 +@@ -192,6 +266,7 @@
76.380 + !
76.381 +
76.382 + .global GLOBAL(ashrsi3)
76.383 ++ FUNC(GLOBAL(ashrsi3))
76.384 + .align 2
76.385 + GLOBAL(ashrsi3):
76.386 + mov #31,r0
76.387 +@@ -319,6 +394,8 @@
76.388 + rts
76.389 + nop
76.390 +
76.391 ++ ENDFUNC(GLOBAL(ashrsi3))
76.392 ++
76.393 + #endif
76.394 +
76.395 + #ifdef L_ashiftlt
76.396 +@@ -340,6 +417,7 @@
76.397 + ! (none)
76.398 + !
76.399 + .global GLOBAL(ashlsi3)
76.400 ++ FUNC(GLOBAL(ashlsi3))
76.401 + .align 2
76.402 + GLOBAL(ashlsi3):
76.403 + mov #31,r0
76.404 +@@ -476,6 +554,8 @@
76.405 + rts
76.406 + nop
76.407 +
76.408 ++ ENDFUNC(GLOBAL(ashlsi3))
76.409 ++
76.410 + #endif
76.411 +
76.412 + #ifdef L_lshiftrt
76.413 +@@ -497,6 +577,7 @@
76.414 + ! (none)
76.415 + !
76.416 + .global GLOBAL(lshrsi3)
76.417 ++ FUNC(GLOBAL(lshrsi3))
76.418 + .align 2
76.419 + GLOBAL(lshrsi3):
76.420 + mov #31,r0
76.421 +@@ -633,6 +714,8 @@
76.422 + rts
76.423 + nop
76.424 +
76.425 ++ ENDFUNC(GLOBAL(lshrsi3))
76.426 ++
76.427 + #endif
76.428 +
76.429 + #ifdef L_movstr
76.430 +@@ -649,76 +732,113 @@
76.431 + add #64,r4
76.432 + .align 4
76.433 + .global GLOBAL(movstrSI64)
76.434 ++ FUNC(GLOBAL(movstrSI64))
76.435 + GLOBAL(movstrSI64):
76.436 + mov.l @(60,r5),r0
76.437 + mov.l r0,@(60,r4)
76.438 + .global GLOBAL(movstrSI60)
76.439 ++ FUNC(GLOBAL(movstrSI60))
76.440 + GLOBAL(movstrSI60):
76.441 + mov.l @(56,r5),r0
76.442 + mov.l r0,@(56,r4)
76.443 + .global GLOBAL(movstrSI56)
76.444 ++ FUNC(GLOBAL(movstrSI56))
76.445 + GLOBAL(movstrSI56):
76.446 + mov.l @(52,r5),r0
76.447 + mov.l r0,@(52,r4)
76.448 + .global GLOBAL(movstrSI52)
76.449 ++ FUNC(GLOBAL(movstrSI52))
76.450 + GLOBAL(movstrSI52):
76.451 + mov.l @(48,r5),r0
76.452 + mov.l r0,@(48,r4)
76.453 + .global GLOBAL(movstrSI48)
76.454 ++ FUNC(GLOBAL(movstrSI48))
76.455 + GLOBAL(movstrSI48):
76.456 + mov.l @(44,r5),r0
76.457 + mov.l r0,@(44,r4)
76.458 + .global GLOBAL(movstrSI44)
76.459 ++ FUNC(GLOBAL(movstrSI44))
76.460 + GLOBAL(movstrSI44):
76.461 + mov.l @(40,r5),r0
76.462 + mov.l r0,@(40,r4)
76.463 + .global GLOBAL(movstrSI40)
76.464 ++ FUNC(GLOBAL(movstrSI40))
76.465 + GLOBAL(movstrSI40):
76.466 + mov.l @(36,r5),r0
76.467 + mov.l r0,@(36,r4)
76.468 + .global GLOBAL(movstrSI36)
76.469 ++ FUNC(GLOBAL(movstrSI36))
76.470 + GLOBAL(movstrSI36):
76.471 + mov.l @(32,r5),r0
76.472 + mov.l r0,@(32,r4)
76.473 + .global GLOBAL(movstrSI32)
76.474 ++ FUNC(GLOBAL(movstrSI32))
76.475 + GLOBAL(movstrSI32):
76.476 + mov.l @(28,r5),r0
76.477 + mov.l r0,@(28,r4)
76.478 + .global GLOBAL(movstrSI28)
76.479 ++ FUNC(GLOBAL(movstrSI28))
76.480 + GLOBAL(movstrSI28):
76.481 + mov.l @(24,r5),r0
76.482 + mov.l r0,@(24,r4)
76.483 + .global GLOBAL(movstrSI24)
76.484 ++ FUNC(GLOBAL(movstrSI24))
76.485 + GLOBAL(movstrSI24):
76.486 + mov.l @(20,r5),r0
76.487 + mov.l r0,@(20,r4)
76.488 + .global GLOBAL(movstrSI20)
76.489 ++ FUNC(GLOBAL(movstrSI20))
76.490 + GLOBAL(movstrSI20):
76.491 + mov.l @(16,r5),r0
76.492 + mov.l r0,@(16,r4)
76.493 + .global GLOBAL(movstrSI16)
76.494 ++ FUNC(GLOBAL(movstrSI16))
76.495 + GLOBAL(movstrSI16):
76.496 + mov.l @(12,r5),r0
76.497 + mov.l r0,@(12,r4)
76.498 + .global GLOBAL(movstrSI12)
76.499 ++ FUNC(GLOBAL(movstrSI12))
76.500 + GLOBAL(movstrSI12):
76.501 + mov.l @(8,r5),r0
76.502 + mov.l r0,@(8,r4)
76.503 + .global GLOBAL(movstrSI8)
76.504 ++ FUNC(GLOBAL(movstrSI8))
76.505 + GLOBAL(movstrSI8):
76.506 + mov.l @(4,r5),r0
76.507 + mov.l r0,@(4,r4)
76.508 + .global GLOBAL(movstrSI4)
76.509 ++ FUNC(GLOBAL(movstrSI4))
76.510 + GLOBAL(movstrSI4):
76.511 + mov.l @(0,r5),r0
76.512 + mov.l r0,@(0,r4)
76.513 ++ .global GLOBAL(movstrSI0)
76.514 ++ FUNC(GLOBAL(movstrSI0))
76.515 + GLOBAL(movstrSI0):
76.516 + rts
76.517 + nop
76.518 +
76.519 ++ ENDFUNC(GLOBAL(movstrSI64))
76.520 ++ ENDFUNC(GLOBAL(movstrSI60))
76.521 ++ ENDFUNC(GLOBAL(movstrSI56))
76.522 ++ ENDFUNC(GLOBAL(movstrSI52))
76.523 ++ ENDFUNC(GLOBAL(movstrSI48))
76.524 ++ ENDFUNC(GLOBAL(movstrSI44))
76.525 ++ ENDFUNC(GLOBAL(movstrSI40))
76.526 ++ ENDFUNC(GLOBAL(movstrSI36))
76.527 ++ ENDFUNC(GLOBAL(movstrSI32))
76.528 ++ ENDFUNC(GLOBAL(movstrSI28))
76.529 ++ ENDFUNC(GLOBAL(movstrSI24))
76.530 ++ ENDFUNC(GLOBAL(movstrSI20))
76.531 ++ ENDFUNC(GLOBAL(movstrSI16))
76.532 ++ ENDFUNC(GLOBAL(movstrSI12))
76.533 ++ ENDFUNC(GLOBAL(movstrSI8))
76.534 ++ ENDFUNC(GLOBAL(movstrSI4))
76.535 ++ ENDFUNC(GLOBAL(movstrSI0))
76.536 ++
76.537 + .align 4
76.538 +
76.539 + .global GLOBAL(movstr)
76.540 ++ FUNC(GLOBAL(movstr))
76.541 + GLOBAL(movstr):
76.542 + mov.l @(60,r5),r0
76.543 + mov.l r0,@(60,r4)
76.544 +@@ -775,6 +895,8 @@
76.545 + add #64,r5
76.546 + bra GLOBAL(movstr)
76.547 + add #64,r4
76.548 ++
76.549 ++ FUNC(GLOBAL(movstr))
76.550 + #endif
76.551 +
76.552 + #ifdef L_movstr_i4
76.553 +@@ -783,6 +905,10 @@
76.554 + .global GLOBAL(movstr_i4_odd)
76.555 + .global GLOBAL(movstrSI12_i4)
76.556 +
76.557 ++ FUNC(GLOBAL(movstr_i4_even))
76.558 ++ FUNC(GLOBAL(movstr_i4_odd))
76.559 ++ FUNC(GLOBAL(movstrSI12_i4))
76.560 ++
76.561 + .p2align 5
76.562 + L_movstr_2mod4_end:
76.563 + mov.l r0,@(16,r4)
76.564 +@@ -791,6 +917,11 @@
76.565 +
76.566 + .p2align 2
76.567 +
76.568 ++GLOBAL(movstr_i4_even):
76.569 ++ mov.l @r5+,r0
76.570 ++ bra L_movstr_start_even
76.571 ++ mov.l @r5+,r1
76.572 ++
76.573 + GLOBAL(movstr_i4_odd):
76.574 + mov.l @r5+,r1
76.575 + add #-4,r4
76.576 +@@ -817,10 +948,8 @@
76.577 + rts
76.578 + mov.l r3,@(12,r4)
76.579 +
76.580 +-GLOBAL(movstr_i4_even):
76.581 +- mov.l @r5+,r0
76.582 +- bra L_movstr_start_even
76.583 +- mov.l @r5+,r1
76.584 ++ ENDFUNC(GLOBAL(movstr_i4_even))
76.585 ++ ENDFUNC(GLOBAL(movstr_i4_odd))
76.586 +
76.587 + .p2align 4
76.588 + GLOBAL(movstrSI12_i4):
76.589 +@@ -831,12 +960,16 @@
76.590 + mov.l r1,@(4,r4)
76.591 + rts
76.592 + mov.l r2,@(8,r4)
76.593 ++
76.594 ++ ENDFUNC(GLOBAL(movstrSI12_i4))
76.595 ++
76.596 + #endif
76.597 +
76.598 + #ifdef L_mulsi3
76.599 +
76.600 +
76.601 + .global GLOBAL(mulsi3)
76.602 ++ FUNC(GLOBAL(mulsi3))
76.603 +
76.604 + ! r4 = aabb
76.605 + ! r5 = ccdd
76.606 +@@ -869,7 +1002,7 @@
76.607 + rts
76.608 + add r2,r0
76.609 +
76.610 +-
76.611 ++ FUNC(GLOBAL(mulsi3))
76.612 + #endif
76.613 + #endif /* ! __SH5__ */
76.614 + #ifdef L_sdivsi3_i4
76.615 +@@ -879,6 +1012,7 @@
76.616 + !! args in r4 and r5, result in fpul, clobber dr0, dr2
76.617 +
76.618 + .global GLOBAL(sdivsi3_i4)
76.619 ++ FUNC(GLOBAL(sdivsi3_i4))
76.620 + GLOBAL(sdivsi3_i4):
76.621 + lds r4,fpul
76.622 + float fpul,dr0
76.623 +@@ -888,6 +1022,8 @@
76.624 + rts
76.625 + ftrc dr0,fpul
76.626 +
76.627 ++ ENDFUNC(GLOBAL(sdivsi3_i4))
76.628 ++
76.629 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
76.630 + !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
76.631 +
76.632 +@@ -896,6 +1032,7 @@
76.633 + .mode SHcompact
76.634 + #endif
76.635 + .global GLOBAL(sdivsi3_i4)
76.636 ++ FUNC(GLOBAL(sdivsi3_i4))
76.637 + GLOBAL(sdivsi3_i4):
76.638 + sts.l fpscr,@-r15
76.639 + mov #8,r2
76.640 +@@ -910,6 +1047,8 @@
76.641 + rts
76.642 + lds.l @r15+,fpscr
76.643 +
76.644 ++ ENDFUNC(GLOBAL(sdivsi3_i4))
76.645 ++
76.646 + #endif /* ! __SH5__ || __SH5__ == 32 */
76.647 + #endif /* ! __SH4__ */
76.648 + #endif
76.649 +@@ -924,9 +1063,10 @@
76.650 + !!
76.651 + !!
76.652 +
76.653 +-!! args in r4 and r5, result in r0 clobber r1,r2,r3
76.654 ++!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
76.655 +
76.656 + .global GLOBAL(sdivsi3)
76.657 ++ FUNC(GLOBAL(sdivsi3))
76.658 + #if __SHMEDIA__
76.659 + #if __SH5__ == 32
76.660 + .section .text..SHmedia32,"ax"
76.661 +@@ -1076,6 +1216,7 @@
76.662 + div0: rts
76.663 + mov #0,r0
76.664 +
76.665 ++ ENDFUNC(GLOBAL(sdivsi3))
76.666 + #endif /* ! __SHMEDIA__ */
76.667 + #endif /* ! __SH4__ */
76.668 + #endif
76.669 +@@ -1084,9 +1225,11 @@
76.670 + .title "SH DIVIDE"
76.671 + !! 4 byte integer Divide code for the Hitachi SH
76.672 + #ifdef __SH4__
76.673 +-!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
76.674 ++!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
76.675 ++!! and t bit
76.676 +
76.677 + .global GLOBAL(udivsi3_i4)
76.678 ++ FUNC(GLOBAL(udivsi3_i4))
76.679 + GLOBAL(udivsi3_i4):
76.680 + mov #1,r1
76.681 + cmp/hi r1,r5
76.682 +@@ -1127,6 +1270,8 @@
76.683 + L1:
76.684 + .double 2147483648
76.685 +
76.686 ++ ENDFUNC(GLOBAL(udivsi3_i4))
76.687 ++
76.688 + #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
76.689 + !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
76.690 +
76.691 +@@ -1135,6 +1280,7 @@
76.692 + .mode SHcompact
76.693 + #endif
76.694 + .global GLOBAL(udivsi3_i4)
76.695 ++ FUNC(GLOBAL(udivsi3_i4))
76.696 + GLOBAL(udivsi3_i4):
76.697 + mov #1,r1
76.698 + cmp/hi r1,r5
76.699 +@@ -1183,6 +1329,8 @@
76.700 + #endif
76.701 + .double 2147483648
76.702 +
76.703 ++ ENDFUNC(GLOBAL(udivsi3_i4))
76.704 ++
76.705 + #endif /* ! __SH5__ || __SH5__ == 32 */
76.706 + #endif /* ! __SH4__ */
76.707 + #endif
76.708 +@@ -1199,6 +1347,7 @@
76.709 +
76.710 + !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
76.711 + .global GLOBAL(udivsi3)
76.712 ++ FUNC(GLOBAL(udivsi3))
76.713 +
76.714 + #if __SHMEDIA__
76.715 + #if __SH5__ == 32
76.716 +@@ -1299,6 +1448,8 @@
76.717 + ret: rts
76.718 + mov r4,r0
76.719 +
76.720 ++ ENDFUNC(GLOBAL(udivsi3))
76.721 ++
76.722 + #endif /* ! __SHMEDIA__ */
76.723 + #endif /* __SH4__ */
76.724 + #endif
76.725 +@@ -1308,6 +1459,7 @@
76.726 + .mode SHcompact
76.727 + #endif
76.728 + .global GLOBAL(set_fpscr)
76.729 ++ FUNC(GLOBAL(set_fpscr))
76.730 + GLOBAL(set_fpscr):
76.731 + lds r4,fpscr
76.732 + mov.l LOCAL(set_fpscr_L1),r1
76.733 +@@ -1340,11 +1492,16 @@
76.734 + .align 2
76.735 + LOCAL(set_fpscr_L1):
76.736 + .long GLOBAL(fpscr_values)
76.737 ++
76.738 ++ ENDFUNC(GLOBAL(set_fpscr))
76.739 ++
76.740 ++#ifndef NO_FPSCR_VALUES
76.741 + #ifdef __ELF__
76.742 + .comm GLOBAL(fpscr_values),8,4
76.743 + #else
76.744 + .comm GLOBAL(fpscr_values),8
76.745 + #endif /* ELF */
76.746 ++#endif /* NO_FPSCR_VALUES */
76.747 + #endif /* SH3E / SH4 */
76.748 + #endif /* L_set_fpscr */
76.749 + #ifdef L_ic_invalidate
76.750 +@@ -1360,6 +1517,7 @@
76.751 + blink tr0, r63
76.752 + #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
76.753 + .global GLOBAL(ic_invalidate)
76.754 ++ FUNC(GLOBAL(ic_invalidate))
76.755 + GLOBAL(ic_invalidate):
76.756 + ocbwb @r4
76.757 + mova 0f,r0
76.758 +@@ -1382,6 +1540,9 @@
76.759 + nop
76.760 + .endr
76.761 + .endr
76.762 ++
76.763 ++ ENDFUNC(GLOBAL(ic_invalidate))
76.764 ++
76.765 + #endif /* SH4 */
76.766 + #endif /* L_ic_invalidate */
76.767 +
76.768 +diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
76.769 +--- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver Thu Jan 1 09:00:00 1970
76.770 ++++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver Sat Feb 22 01:40:14 2003
76.771 +@@ -0,0 +1,21 @@
76.772 ++# In order to work around the very problems that force us to now generally
76.773 ++# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
76.774 ++# By now choosing the same version tags for these specific routines, we
76.775 ++# maintain enough binary compatibility to allow future versions of glibc
76.776 ++# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
76.777 ++
76.778 ++# Note that we cannot use the default libgcc-glibc.ver file on sh,
76.779 ++# because GLIBC_2.0 does not exist on this architecture, as the first
76.780 ++# ever glibc release on the platform was GLIBC_2.2.
76.781 ++
76.782 ++%inherit GCC_3.0 GLIBC_2.2
76.783 ++GLIBC_2.2 {
76.784 ++ __register_frame
76.785 ++ __register_frame_table
76.786 ++ __deregister_frame
76.787 ++ __register_frame_info
76.788 ++ __deregister_frame_info
76.789 ++ __frame_state_for
76.790 ++ __register_frame_info_table
76.791 ++}
76.792 ++
76.793 +diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
76.794 +--- gcc-20030210.orig/gcc/config/sh/linux.h Tue Apr 16 05:27:42 2002
76.795 ++++ gcc-20030210/gcc/config/sh/linux.h Sat Feb 22 01:40:14 2003
76.796 +@@ -19,6 +19,10 @@
76.797 + the Free Software Foundation, 59 Temple Place - Suite 330,
76.798 + Boston, MA 02111-1307, USA. */
76.799 +
76.800 ++/* We're not SYSVR4, not having /usr/ccs */
76.801 ++#undef MD_EXEC_PREFIX
76.802 ++#undef MD_STARTFILE_PREFIX
76.803 ++
76.804 + /* Run-time Target Specification. */
76.805 + #undef TARGET_VERSION
76.806 + #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr);
76.807 +@@ -39,6 +43,28 @@
76.808 + #undef WCHAR_TYPE_SIZE
76.809 + #define WCHAR_TYPE_SIZE BITS_PER_WORD
76.810 +
76.811 ++/* This was defined in linux.h. Define it here also. */
76.812 ++#undef DEFAULT_VTABLE_THUNKS
76.813 ++#define DEFAULT_VTABLE_THUNKS 1
76.814 ++
76.815 ++/* Likewise. */
76.816 ++#define HANDLE_PRAGMA_PACK_PUSH_POP
76.817 ++
76.818 ++/* Pick up the return address upon entry to a procedure. Used for
76.819 ++ dwarf2 unwind information. This also enables the table driven
76.820 ++ mechanism. */
76.821 ++
76.822 ++#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, PR_REG)
76.823 ++#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PR_REG)
76.824 ++
76.825 ++#undef CPP_SPEC
76.826 ++#define CPP_SPEC "\
76.827 ++ %{m4:-D__SH4__} \
76.828 ++ %{!m4:%(cpp_default_cpu_spec)} \
76.829 ++ %(subtarget_cpp_spec) \
76.830 ++ %(subtarget_cpp_ptr_spec) \
76.831 ++ %(subtarget_cpp_endian_spec) "
76.832 ++
76.833 + #undef SUBTARGET_CPP_SPEC
76.834 + #define SUBTARGET_CPP_SPEC "\
76.835 + %{fPIC:-D__PIC__ -D__pic__} \
76.836 +@@ -55,36 +81,45 @@
76.837 + #undef CPP_DEFAULT_CPU_SPEC
76.838 + #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
76.839 +
76.840 +-
76.841 + #undef CPP_PREDEFINES
76.842 + #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
76.843 +
76.844 ++/* The GNU C++ standard library requires that these macros be defined. */
76.845 ++#undef CPLUSPLUS_CPP_SPEC
76.846 ++#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
76.847 ++
76.848 + #undef ASM_SPEC
76.849 +-#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
76.850 ++#define ASM_SPEC "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
76.851 +
76.852 + #undef CC1_SPEC
76.853 + #define CC1_SPEC \
76.854 +- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
76.855 +-
76.856 +-#undef CC1PLUS_SPEC
76.857 +-#define CC1PLUS_SPEC \
76.858 +- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
76.859 ++ "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
76.860 +
76.861 ++/* XXX: It's wrong if prefix != /usr */
76.862 + #undef LINK_SPEC
76.863 + #define LINK_SPEC \
76.864 +- "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
76.865 ++ "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
76.866 + %{shared:-shared} \
76.867 + %{!static: \
76.868 + %{rdynamic:-export-dynamic} \
76.869 + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
76.870 +- %{!rpath:-rpath /lib}} \
76.871 ++ %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
76.872 ++ %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
76.873 ++ %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
76.874 ++ %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
76.875 + %{static:-static}"
76.876 +
76.877 + #undef LIB_SPEC
76.878 ++#undef LIB_SPEC
76.879 + #define LIB_SPEC \
76.880 + "%{shared: -lc} \
76.881 +- %{!shared: %{pthread:-lthread} \
76.882 +- %{profile:-lc_p} %{!profile: -lc}}"
76.883 ++ %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
76.884 ++ %{profile:-lc_p} %{!profile: -lc}}"
76.885 ++
76.886 ++#if defined(HAVE_LD_EH_FRAME_HDR)
76.887 ++#undef LINK_EH_SPEC
76.888 ++#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
76.889 ++#endif
76.890 +
76.891 + #undef STARTFILE_SPEC
76.892 + #define STARTFILE_SPEC \
76.893 +@@ -92,4 +127,40 @@
76.894 + %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
76.895 + %{!p:%{profile:gcrt1.o%s} \
76.896 + %{!profile:crt1.o%s}}}} \
76.897 +- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
76.898 ++ crti.o%s %{static:crtbeginT.o%s}\
76.899 ++ %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
76.900 ++
76.901 ++#undef FUNCTION_PROFILER
76.902 ++#define FUNCTION_PROFILER(STREAM,LABELNO) \
76.903 ++do \
76.904 ++{ \
76.905 ++ if (flag_pic) \
76.906 ++ { \
76.907 ++ fprintf (STREAM, " mov.l 3f,r1\n"); \
76.908 ++ fprintf (STREAM, " mova 3f,r0\n"); \
76.909 ++ fprintf (STREAM, " add r1,r0\n"); \
76.910 ++ fprintf (STREAM, " mov.l 1f,r1\n"); \
76.911 ++ fprintf (STREAM, " mov.l @(r0,r1),r1\n"); \
76.912 ++ } \
76.913 ++ else \
76.914 ++ { \
76.915 ++ fprintf (STREAM, " mov.l 1f,r1\n"); \
76.916 ++ } \
76.917 ++ fprintf (STREAM, " sts.l pr,@-r15\n"); \
76.918 ++ fprintf (STREAM, " mova 2f,r0\n"); \
76.919 ++ fprintf (STREAM, " jmp @r1\n"); \
76.920 ++ fprintf (STREAM, " lds r0,pr\n"); \
76.921 ++ fprintf (STREAM, " .align 2\n"); \
76.922 ++ if (flag_pic) \
76.923 ++ { \
76.924 ++ fprintf (STREAM, "1: .long mcount@GOT\n"); \
76.925 ++ fprintf (STREAM, "3: .long _GLOBAL_OFFSET_TABLE_\n"); \
76.926 ++ } \
76.927 ++ else \
76.928 ++ { \
76.929 ++ fprintf (STREAM, "1: .long mcount\n"); \
76.930 ++ } \
76.931 ++ fprintf (STREAM, "2: lds.l @r15+,pr\n"); \
76.932 ++} while (0)
76.933 ++
76.934 ++#define NO_SHARED_LIBGCC_MULTILIB
76.935 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
76.936 +--- gcc-20030210.orig/gcc/config/sh/sh-protos.h Fri Feb 22 01:42:28 2002
76.937 ++++ gcc-20030210/gcc/config/sh/sh-protos.h Sat Feb 22 01:40:14 2003
76.938 +@@ -74,6 +74,7 @@
76.939 + extern int shl_sext_length PARAMS ((rtx));
76.940 + extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
76.941 + extern rtx gen_datalabel_ref PARAMS ((rtx));
76.942 ++extern int shl_casesi_worker_length PARAMS ((rtx));
76.943 + extern int regs_used PARAMS ((rtx, int));
76.944 + extern void fixup_addr_diff_vecs PARAMS ((rtx));
76.945 + extern int get_dest_uid PARAMS ((rtx, int));
76.946 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
76.947 +--- gcc-20030210.orig/gcc/config/sh/sh.c Fri Feb 22 01:42:28 2002
76.948 ++++ gcc-20030210/gcc/config/sh/sh.c Sat Feb 22 01:40:14 2003
76.949 +@@ -2143,6 +2143,48 @@
76.950 + return sym;
76.951 + }
76.952 +
76.953 ++
76.954 ++/* Function to be used in the length attribute of the casesi_worker
76.955 ++ instruction. Returns number of instructions, which is half of the
76.956 ++ length of bytes. */
76.957 ++
76.958 ++int
76.959 ++shl_casesi_worker_length (insn)
76.960 ++ rtx insn;
76.961 ++{
76.962 ++ rtx set_src, label;
76.963 ++ rtx diff_vec;
76.964 ++
76.965 ++ set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
76.966 ++ if (!(GET_CODE (set_src) == UNSPEC
76.967 ++ && XINT (set_src, 1) == UNSPEC_CASESI))
76.968 ++ abort ();
76.969 ++
76.970 ++ label = XVECEXP (set_src, 0, 2);
76.971 ++ if (GET_CODE (label) != LABEL_REF)
76.972 ++ abort ();
76.973 ++
76.974 ++ diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
76.975 ++
76.976 ++ if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
76.977 ++ abort ();
76.978 ++
76.979 ++ switch (GET_MODE (diff_vec))
76.980 ++ {
76.981 ++ case SImode:
76.982 ++ return 2;
76.983 ++ case HImode:
76.984 ++ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
76.985 ++ return 3;
76.986 ++ return 2;
76.987 ++ case QImode:
76.988 ++ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
76.989 ++ return 2;
76.990 ++ return 1;
76.991 ++ default:
76.992 ++ abort ();
76.993 ++ }
76.994 ++}
76.995 +
76.996 + /* The SH cannot load a large constant into a register, constants have to
76.997 + come from a pc relative load. The reference of a pc relative load
76.998 +@@ -3190,7 +3232,7 @@
76.999 + vec_lab = XEXP (XEXP (pat, 0), 0);
76.1000 +
76.1001 + /* Search the matching casesi_jump_2. */
76.1002 +- for (prev = vec_lab; ; prev = PREV_INSN (prev))
76.1003 ++ for (prev = vec_lab; prev; prev = PREV_INSN (prev))
76.1004 + {
76.1005 + if (GET_CODE (prev) != JUMP_INSN)
76.1006 + continue;
76.1007 +@@ -3205,6 +3247,13 @@
76.1008 + break;
76.1009 + }
76.1010 +
76.1011 ++ if (prev == NULL)
76.1012 ++ { /* Switch statement has been optimized out. */
76.1013 ++ delete_insn (PREV_INSN (insn));
76.1014 ++ delete_insn (insn);
76.1015 ++ continue;
76.1016 ++ }
76.1017 ++
76.1018 + /* Emit the reference label of the braf where it belongs, right after
76.1019 + the casesi_jump_2 (i.e. braf). */
76.1020 + braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
76.1021 +@@ -3223,7 +3272,7 @@
76.1022 + rtx barrier_or_label;
76.1023 + {
76.1024 + rtx next = next_real_insn (barrier_or_label), pat, prev;
76.1025 +- int slot, credit, jump_to_next;
76.1026 ++ int slot, credit, jump_to_next = 0;
76.1027 +
76.1028 + if (! next)
76.1029 + return 0;
76.1030 +@@ -4507,7 +4556,8 @@
76.1031 + if (current_function_varargs || current_function_stdarg)
76.1032 + {
76.1033 + /* This is not used by the SH3E calling convention */
76.1034 +- if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
76.1035 ++ if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
76.1036 ++ || TARGET_NO_IMPLICIT_FP)
76.1037 + {
76.1038 + /* Push arg regs as if they'd been provided by caller in stack. */
76.1039 + for (i = 0; i < NPARM_REGS(SImode); i++)
76.1040 +@@ -5149,7 +5199,8 @@
76.1041 + tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
76.1042 + tree record;
76.1043 +
76.1044 +- if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
76.1045 ++ if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
76.1046 ++ || TARGET_NO_IMPLICIT_FP)
76.1047 + return ptr_type_node;
76.1048 +
76.1049 + record = make_node (RECORD_TYPE);
76.1050 +@@ -5211,7 +5262,8 @@
76.1051 + return;
76.1052 + }
76.1053 +
76.1054 +- if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
76.1055 ++ if ((! TARGET_SH3E && ! TARGET_SH4)
76.1056 ++ || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
76.1057 + {
76.1058 + std_expand_builtin_va_start (stdarg_p, valist, nextarg);
76.1059 + return;
76.1060 +@@ -5289,7 +5341,8 @@
76.1061 + rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
76.1062 + pptr_type_node = build_pointer_type (ptr_type_node);
76.1063 +
76.1064 +- if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
76.1065 ++ if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
76.1066 ++ && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
76.1067 + {
76.1068 + tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
76.1069 + tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
76.1070 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
76.1071 +--- gcc-20030210.orig/gcc/config/sh/sh.h Fri Feb 22 01:42:28 2002
76.1072 ++++ gcc-20030210/gcc/config/sh/sh.h Sat Feb 22 01:40:14 2003
76.1073 +@@ -147,10 +147,10 @@
76.1074 + #define HARD_SH4_BIT (1<<5)
76.1075 + #define FPU_SINGLE_BIT (1<<7)
76.1076 + #define SH4_BIT (1<<12)
76.1077 ++#define NO_IMPLICIT_FP_BIT (1<<3)
76.1078 + #define FMOVD_BIT (1<<4)
76.1079 + #define SH5_BIT (1<<0)
76.1080 + #define SPACE_BIT (1<<13)
76.1081 +-#define BIGTABLE_BIT (1<<14)
76.1082 + #define RELAX_BIT (1<<15)
76.1083 + #define USERMODE_BIT (1<<16)
76.1084 + #define HITACHI_BIT (1<<22)
76.1085 +@@ -205,6 +205,9 @@
76.1086 + /* Nonzero if we should generate code for a SH5 CPU (either ISA). */
76.1087 + #define TARGET_SH5 (target_flags & SH5_BIT)
76.1088 +
76.1089 ++/* Nonzero if we should not use FPU implicitly. */
76.1090 ++#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
76.1091 ++
76.1092 + /* Nonzero if we should generate code using the SHcompact instruction
76.1093 + set and 32-bit ABI. */
76.1094 + #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
76.1095 +@@ -225,6 +228,7 @@
76.1096 +
76.1097 + /* Nonzero if we should generate code using SHmedia FPU instructions. */
76.1098 + #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
76.1099 ++
76.1100 + /* Nonzero if we should generate fmovd. */
76.1101 + #define TARGET_FMOVD (target_flags & FMOVD_BIT)
76.1102 +
76.1103 +@@ -234,9 +238,6 @@
76.1104 + /* Nonzero if we should generate smaller code rather than faster code. */
76.1105 + #define TARGET_SMALLCODE (target_flags & SPACE_BIT)
76.1106 +
76.1107 +-/* Nonzero to use long jump tables. */
76.1108 +-#define TARGET_BIGTABLE (target_flags & BIGTABLE_BIT)
76.1109 +-
76.1110 + /* Nonzero to generate pseudo-ops needed by the assembler and linker
76.1111 + to do function call relaxing. */
76.1112 + #define TARGET_RELAX (target_flags & RELAX_BIT)
76.1113 +@@ -297,7 +298,6 @@
76.1114 + {"5-compact-nofpu", TARGET_NONE, "" }, \
76.1115 + {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
76.1116 + {"b", -LITTLE_ENDIAN_BIT, "" }, \
76.1117 +- {"bigtable", BIGTABLE_BIT, "" }, \
76.1118 + {"dalign", DALIGN_BIT, "" }, \
76.1119 + {"fmovd", FMOVD_BIT, "" }, \
76.1120 + {"hitachi", HITACHI_BIT, "" }, \
76.1121 +@@ -306,6 +306,7 @@
76.1122 + {"isize", ISIZE_BIT, "" }, \
76.1123 + {"l", LITTLE_ENDIAN_BIT, "" }, \
76.1124 + {"no-ieee", -IEEE_BIT, "" }, \
76.1125 ++ {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" }, \
76.1126 + {"padstruct", PADSTRUCT_BIT, "" }, \
76.1127 + {"prefergot", PREFERGOT_BIT, "" }, \
76.1128 + {"relax", RELAX_BIT, "" }, \
76.1129 +@@ -2493,16 +2494,22 @@
76.1130 + goto LABEL; \
76.1131 + }
76.1132 +
76.1133 ++extern int optimize; /* needed for gen_casesi. */
76.1134 ++extern int optimize_size;
76.1135 ++
76.1136 + /* Specify the machine mode that this machine uses
76.1137 + for the index in the tablejump instruction. */
76.1138 +-#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
76.1139 ++#define CASE_VECTOR_MODE SImode
76.1140 +
76.1141 + #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
76.1142 + ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
76.1143 + ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
76.1144 + : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
76.1145 + ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
76.1146 +- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
76.1147 ++ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
76.1148 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
76.1149 ++ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
76.1150 ++ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
76.1151 + : SImode)
76.1152 +
76.1153 + /* Define as C expression which evaluates to nonzero if the tablejump
76.1154 +@@ -3038,10 +3045,7 @@
76.1155 + /* Output an absolute table element. */
76.1156 +
76.1157 + #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \
76.1158 +- if (TARGET_BIGTABLE) \
76.1159 +- asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \
76.1160 +- else \
76.1161 +- asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \
76.1162 ++ asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
76.1163 +
76.1164 + /* Output various types of constants. */
76.1165 +
76.1166 +@@ -3167,8 +3171,6 @@
76.1167 + #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
76.1168 + extern enum processor_type sh_cpu;
76.1169 +
76.1170 +-extern int optimize; /* needed for gen_casesi. */
76.1171 +-
76.1172 + enum mdep_reorg_phase_e
76.1173 + {
76.1174 + SH_BEFORE_MDEP_REORG,
76.1175 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
76.1176 +--- gcc-20030210.orig/gcc/config/sh/sh.md Sat Nov 23 04:58:06 2002
76.1177 ++++ gcc-20030210/gcc/config/sh/sh.md Sat Feb 22 01:40:14 2003
76.1178 +@@ -1242,7 +1242,7 @@
76.1179 + (clobber (reg:SI PR_REG))
76.1180 + (clobber (reg:SI R4_REG))
76.1181 + (use (match_operand:SI 1 "arith_reg_operand" "r"))]
76.1182 +- "TARGET_SH1 && ! TARGET_SH4"
76.1183 ++ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
76.1184 + "jsr @%1%#"
76.1185 + [(set_attr "type" "sfunc")
76.1186 + (set_attr "needs_delay_slot" "yes")])
76.1187 +@@ -1336,7 +1336,7 @@
76.1188 +
76.1189 + operands[3] = gen_reg_rtx (Pmode);
76.1190 + /* Emit the move of the address to a pseudo outside of the libcall. */
76.1191 +- if (TARGET_HARD_SH4 && TARGET_SH3E)
76.1192 ++ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
76.1193 + {
76.1194 + emit_move_insn (operands[3],
76.1195 + gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
76.1196 +@@ -1391,7 +1391,7 @@
76.1197 + (clobber (reg:SI R2_REG))
76.1198 + (clobber (reg:SI R3_REG))
76.1199 + (use (match_operand:SI 1 "arith_reg_operand" "r"))]
76.1200 +- "TARGET_SH1 && ! TARGET_SH4"
76.1201 ++ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
76.1202 + "jsr @%1%#"
76.1203 + [(set_attr "type" "sfunc")
76.1204 + (set_attr "needs_delay_slot" "yes")])
76.1205 +@@ -1476,7 +1476,7 @@
76.1206 +
76.1207 + operands[3] = gen_reg_rtx (Pmode);
76.1208 + /* Emit the move of the address to a pseudo outside of the libcall. */
76.1209 +- if (TARGET_HARD_SH4 && TARGET_SH3E)
76.1210 ++ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
76.1211 + {
76.1212 + emit_move_insn (operands[3],
76.1213 + gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
76.1214 +@@ -6446,6 +6446,8 @@
76.1215 + case SImode:
76.1216 + return \"shll2 %1\;mov.l @(r0,%1),%0\";
76.1217 + case HImode:
76.1218 ++ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
76.1219 ++ return \"add %1,%1\;mov.w @(r0,%1),%0\;extu.w %0,%0\";
76.1220 + return \"add %1,%1\;mov.w @(r0,%1),%0\";
76.1221 + case QImode:
76.1222 + if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
76.1223 +@@ -6455,7 +6457,15 @@
76.1224 + abort ();
76.1225 + }
76.1226 + }"
76.1227 +- [(set_attr "length" "4")])
76.1228 ++ [(set (attr "length")
76.1229 ++ (cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
76.1230 ++ (const_string "2")
76.1231 ++ (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
76.1232 ++ (const_string "4")
76.1233 ++ ;; Put "match_dup" here so that insn_variable_length_p return 1.
76.1234 ++ (ne (match_dup 2) (match_dup 2))
76.1235 ++ (const_string "4")]
76.1236 ++ (const_string "6")))])
76.1237 +
76.1238 + (define_insn "casesi_shift_media"
76.1239 + [(set (match_operand 0 "arith_reg_operand" "=r")
76.1240 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
76.1241 +--- gcc-20030210.orig/gcc/config/sh/sh3-linux.h Thu Jan 1 09:00:00 1970
76.1242 ++++ gcc-20030210/gcc/config/sh/sh3-linux.h Sat Feb 22 01:40:14 2003
76.1243 +@@ -0,0 +1,29 @@
76.1244 ++#undef TARGET_VERSION
76.1245 ++#define TARGET_VERSION fputs (" (SH3 GNU/Linux with ELF)", stderr);
76.1246 ++
76.1247 ++#undef CPP_SPEC
76.1248 ++#define CPP_SPEC \
76.1249 ++ "-D__LITTLE_ENDIAN__ \
76.1250 ++ -D__SH3__ -D__sh3__ \
76.1251 ++ -D__SIZE_TYPE__=unsigned\\ int \
76.1252 ++ -D__PTRDIFF_TYPE__=int \
76.1253 ++ %{fPIC:-D__PIC__ -D__pic__} \
76.1254 ++ %{fpic:-D__PIC__ -D__pic__} \
76.1255 ++ %{posix:-D_POSIX_SOURCE} \
76.1256 ++ %{pthread:-D_REENTRANT -D_PTHREADS}"
76.1257 ++
76.1258 ++#undef ASM_SPEC
76.1259 ++#define ASM_SPEC "%{mrelax:-relax}"
76.1260 ++
76.1261 ++#undef CC1_SPEC
76.1262 ++#define CC1_SPEC \
76.1263 ++ "-musermode -ml -m3 %{profile:-p}"
76.1264 ++
76.1265 ++#undef LINK_SPEC
76.1266 ++#define LINK_SPEC \
76.1267 ++ "%{mrelax:-relax} \
76.1268 ++ %{shared:-shared} \
76.1269 ++ %{!static: \
76.1270 ++ %{rdynamic:-export-dynamic} \
76.1271 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
76.1272 ++ %{static:-static}"
76.1273 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
76.1274 +--- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h Thu Jan 1 09:00:00 1970
76.1275 ++++ gcc-20030210/gcc/config/sh/sh3eb-linux.h Sat Feb 22 01:40:14 2003
76.1276 +@@ -0,0 +1,29 @@
76.1277 ++#undef TARGET_VERSION
76.1278 ++#define TARGET_VERSION fputs (" (SH3EB GNU/Linux with ELF)", stderr);
76.1279 ++
76.1280 ++#undef CPP_SPEC
76.1281 ++#define CPP_SPEC \
76.1282 ++ "-D__BIG_ENDIAN__ \
76.1283 ++ -D__SH3__ -D__sh3__ \
76.1284 ++ -D__SIZE_TYPE__=unsigned\\ int \
76.1285 ++ -D__PTRDIFF_TYPE__=int \
76.1286 ++ %{fPIC:-D__PIC__ -D__pic__} \
76.1287 ++ %{fpic:-D__PIC__ -D__pic__} \
76.1288 ++ %{posix:-D_POSIX_SOURCE} \
76.1289 ++ %{pthread:-D_REENTRANT -D_PTHREADS}"
76.1290 ++
76.1291 ++#undef ASM_SPEC
76.1292 ++#define ASM_SPEC "%{mrelax:-relax}"
76.1293 ++
76.1294 ++#undef CC1_SPEC
76.1295 ++#define CC1_SPEC \
76.1296 ++ "-musermode -mb -m3 %{profile:-p}"
76.1297 ++
76.1298 ++#undef LINK_SPEC
76.1299 ++#define LINK_SPEC \
76.1300 ++ "%{mrelax:-relax} \
76.1301 ++ %{shared:-shared} \
76.1302 ++ %{!static: \
76.1303 ++ %{rdynamic:-export-dynamic} \
76.1304 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
76.1305 ++ %{static:-static}"
76.1306 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
76.1307 +--- gcc-20030210.orig/gcc/config/sh/sh4-linux.h Thu Jan 1 09:00:00 1970
76.1308 ++++ gcc-20030210/gcc/config/sh/sh4-linux.h Sat Feb 22 01:40:14 2003
76.1309 +@@ -0,0 +1,29 @@
76.1310 ++#undef TARGET_VERSION
76.1311 ++#define TARGET_VERSION fputs (" (SH4 GNU/Linux with ELF)", stderr);
76.1312 ++
76.1313 ++#undef CPP_SPEC
76.1314 ++#define CPP_SPEC \
76.1315 ++ "-D__LITTLE_ENDIAN__ \
76.1316 ++ -D__SH4__ \
76.1317 ++ -D__SIZE_TYPE__=unsigned\\ int \
76.1318 ++ -D__PTRDIFF_TYPE__=int \
76.1319 ++ %{fPIC:-D__PIC__ -D__pic__} \
76.1320 ++ %{fpic:-D__PIC__ -D__pic__} \
76.1321 ++ %{posix:-D_POSIX_SOURCE} \
76.1322 ++ %{pthread:-D_REENTRANT -D_PTHREADS}"
76.1323 ++
76.1324 ++#undef ASM_SPEC
76.1325 ++#define ASM_SPEC "%{mrelax:-relax}"
76.1326 ++
76.1327 ++#undef CC1_SPEC
76.1328 ++#define CC1_SPEC \
76.1329 ++ "-musermode -ml -m4 %{profile:-p}"
76.1330 ++
76.1331 ++#undef LINK_SPEC
76.1332 ++#define LINK_SPEC \
76.1333 ++ "%{mrelax:-relax} \
76.1334 ++ %{shared:-shared} \
76.1335 ++ %{!static: \
76.1336 ++ %{rdynamic:-export-dynamic} \
76.1337 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
76.1338 ++ %{static:-static}"
76.1339 +diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
76.1340 +--- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h Thu Jan 1 09:00:00 1970
76.1341 ++++ gcc-20030210/gcc/config/sh/sh4eb-linux.h Sat Feb 22 01:40:14 2003
76.1342 +@@ -0,0 +1,29 @@
76.1343 ++#undef TARGET_VERSION
76.1344 ++#define TARGET_VERSION fputs (" (SH4EB GNU/Linux with ELF)", stderr);
76.1345 ++
76.1346 ++#undef CPP_SPEC
76.1347 ++#define CPP_SPEC \
76.1348 ++ "-D__BIG_ENDIAN__ \
76.1349 ++ -D__SH4__ \
76.1350 ++ -D__SIZE_TYPE__=unsigned\\ int \
76.1351 ++ -D__PTRDIFF_TYPE__=int \
76.1352 ++ %{fPIC:-D__PIC__ -D__pic__} \
76.1353 ++ %{fpic:-D__PIC__ -D__pic__} \
76.1354 ++ %{posix:-D_POSIX_SOURCE} \
76.1355 ++ %{pthread:-D_REENTRANT -D_PTHREADS}"
76.1356 ++
76.1357 ++#undef ASM_SPEC
76.1358 ++#define ASM_SPEC "%{mrelax:-relax}"
76.1359 ++
76.1360 ++#undef CC1_SPEC
76.1361 ++#define CC1_SPEC \
76.1362 ++ "-musermode -mb -m4 %{profile:-p}"
76.1363 ++
76.1364 ++#undef LINK_SPEC
76.1365 ++#define LINK_SPEC \
76.1366 ++ "%{mrelax:-relax} \
76.1367 ++ %{shared:-shared} \
76.1368 ++ %{!static: \
76.1369 ++ %{rdynamic:-export-dynamic} \
76.1370 ++ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
76.1371 ++ %{static:-static}"
76.1372 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
76.1373 +--- gcc-20030210.orig/gcc/config/sh/t-linux Thu May 17 12:16:12 2001
76.1374 ++++ gcc-20030210/gcc/config/sh/t-linux Sat Feb 22 01:40:14 2003
76.1375 +@@ -1,10 +1,20 @@
76.1376 +-TARGET_LIBGCC2_CFLAGS = -fpic
76.1377 ++TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
76.1378 ++LIBGCC1 = libgcc1-asm.a
76.1379 ++CROSS_LIBGCC1 = libgcc1-asm.a
76.1380 ++LIBGCC1_TEST = libgcc1-test
76.1381 + LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
76.1382 + _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
76.1383 + _ic_invalidate
76.1384 ++LIB2ADDEH = $(srcdir)/unwind-sjlj.c
76.1385 ++LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
76.1386 +
76.1387 +-MULTILIB_OPTIONS= mb m3e/m4
76.1388 ++MULTILIB_OPTIONS= mb m4
76.1389 + MULTILIB_DIRNAMES=
76.1390 + MULTILIB_MATCHES =
76.1391 +
76.1392 +-EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
76.1393 ++EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
76.1394 ++
76.1395 ++# Override t-slibgcc-elf-ver to export some libgcc symbols with
76.1396 ++# the symbol versions that glibc used and SH specific.
76.1397 ++SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
76.1398 ++ $(srcdir)/config/sh/libgcc-glibc.ver
76.1399 +diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
76.1400 +--- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti Thu Jan 1 09:00:00 1970
76.1401 ++++ gcc-20030210/gcc/config/sh/t-linux-nomulti Sat Feb 22 01:40:14 2003
76.1402 +@@ -0,0 +1,9 @@
76.1403 ++LIBGCC = libgcc.a
76.1404 ++EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
76.1405 ++
76.1406 ++INSTALL_LIBGCC = install-libgcc
76.1407 ++
76.1408 ++MULTILIB_OPTIONS=
76.1409 ++MULTILIB_DIRNAMES=
76.1410 ++MULTILIB_MATCHES =
76.1411 ++EXTRA_MULTILIB_PARTS=
76.1412 +diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
76.1413 +--- gcc-20030210.orig/gcc/config.gcc Fri Jan 31 19:17:13 2003
76.1414 ++++ gcc-20030210/gcc/config.gcc Sat Feb 22 01:40:14 2003
76.1415 +@@ -337,9 +337,9 @@
76.1416 + sparc*-*-*)
76.1417 + cpu_type=sparc
76.1418 + ;;
76.1419 +-sh64-*-*)
76.1420 +- cpu_type=sh
76.1421 +- ;;
76.1422 ++sh*-*-*)
76.1423 ++ cpu_type=sh
76.1424 ++ ;;
76.1425 + esac
76.1426 +
76.1427 + tm_file=${cpu_type}/${cpu_type}.h
76.1428 +@@ -3018,9 +3018,31 @@
76.1429 + thread_file='rtems'
76.1430 + fi
76.1431 + ;;
76.1432 +-sh-*-linux*)
76.1433 ++sh*-*-linux*)
76.1434 + tm_file="${tm_file} sh/elf.h sh/linux.h"
76.1435 +- tmake_file="sh/t-sh sh/t-elf sh/t-linux"
76.1436 ++ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
76.1437 ++ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
76.1438 ++ case $machine in
76.1439 ++ sh3eb-*)
76.1440 ++ tm_file="${tm_file} sh/sh3eb-linux.h"
76.1441 ++ tmake_file="${tmake_file} sh/t-linux-nomulti"
76.1442 ++ ;;
76.1443 ++ sh4eb-*)
76.1444 ++ tm_file="${tm_file} sh/sh4eb-linux.h"
76.1445 ++ tmake_file="${tmake_file} sh/t-linux-nomulti"
76.1446 ++ ;;
76.1447 ++ sh3-*)
76.1448 ++ tm_file="${tm_file} sh/sh3-linux.h"
76.1449 ++ tmake_file="${tmake_file} sh/t-linux-nomulti"
76.1450 ++ ;;
76.1451 ++ sh4-*)
76.1452 ++ tm_file="${tm_file} sh/sh4-linux.h"
76.1453 ++ tmake_file="${tmake_file} sh/t-linux-nomulti"
76.1454 ++ ;;
76.1455 ++ *)
76.1456 ++ ;;
76.1457 ++ esac
76.1458 ++ xmake_file=x-linux
76.1459 + gas=yes gnu_ld=yes
76.1460 + float_format=sh
76.1461 + ;;
76.1462 +diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
76.1463 +--- gcc-20030210.orig/gcc/dwarf2out.c Mon Feb 10 19:36:25 2003
76.1464 ++++ gcc-20030210/gcc/dwarf2out.c Sat Feb 22 01:40:14 2003
76.1465 +@@ -10224,7 +10224,9 @@
76.1466 + /* We can have a normal definition following an inline one in the
76.1467 + case of redefinition of GNU C extern inlines.
76.1468 + It seems reasonable to use AT_specification in this case. */
76.1469 +- && !get_AT_unsigned (old_die, DW_AT_inline))
76.1470 ++ && !get_AT_unsigned (old_die, DW_AT_inline)
76.1471 ++ /* Skip the nested function. */
76.1472 ++ && !decl_function_context (decl))
76.1473 + {
76.1474 + /* ??? This can happen if there is a bug in the program, for
76.1475 + instance, if it has duplicate function definitions. Ideally,
76.1476 +diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
76.1477 +--- gcc-20030210.orig/gcc/final.c Fri Jan 31 19:17:20 2003
76.1478 ++++ gcc-20030210/gcc/final.c Sat Feb 22 01:40:14 2003
76.1479 +@@ -1128,7 +1128,7 @@
76.1480 + }
76.1481 + }
76.1482 +
76.1483 +- INSN_ADDRESSES (uid) = insn_current_address;
76.1484 ++ INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
76.1485 +
76.1486 + if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
76.1487 + || GET_CODE (insn) == CODE_LABEL)
76.1488 +diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
76.1489 +--- gcc-20030210.orig/gcc/mkmap-symver.awk Fri Jan 31 19:17:26 2003
76.1490 ++++ gcc-20030210/gcc/mkmap-symver.awk Sat Feb 22 01:40:14 2003
76.1491 +@@ -89,7 +89,11 @@
76.1492 + output(inherit[lib]);
76.1493 +
76.1494 + printf("%s {\n", lib);
76.1495 +- printf(" global:\n");
76.1496 ++ for (sym in ver)
76.1497 ++ if ((ver[sym] == lib) && (sym in def))
76.1498 ++ count++;
76.1499 ++ if (count > 0)
76.1500 ++ printf(" global:\n");
76.1501 + for (sym in ver)
76.1502 + if ((ver[sym] == lib) && (sym in def))
76.1503 + {
76.1504 +diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
76.1505 +--- gcc-20030210.orig/gcc/reload1.c Fri Jan 31 19:17:29 2003
76.1506 ++++ gcc-20030210/gcc/reload1.c Sat Feb 22 01:40:14 2003
76.1507 +@@ -6103,6 +6103,7 @@
76.1508 + for (j = 0; j < n_reloads; j++)
76.1509 + if (rld[j].in != 0
76.1510 + && rld[j].when_needed != RELOAD_OTHER
76.1511 ++ && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
76.1512 + && reg_overlap_mentioned_for_reload_p (rld[j].in,
76.1513 + rld[i].in))
76.1514 + rld[j].when_needed
76.1515 +diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
76.1516 +--- gcc-20030210.orig/gcc/reorg.c Fri Jan 31 19:17:30 2003
76.1517 ++++ gcc-20030210/gcc/reorg.c Sat Feb 22 01:40:14 2003
76.1518 +@@ -3265,6 +3265,14 @@
76.1519 + || condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
76.1520 + continue;
76.1521 +
76.1522 ++#ifdef MD_CAN_REDIRECT_BRANCH
76.1523 ++ /* On some targets, branches with delay slots can have a limited
76.1524 ++ displacement. Give the back end a chance to tell us we can't do
76.1525 ++ this. */
76.1526 ++ if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
76.1527 ++ continue;
76.1528 ++#endif
76.1529 ++
76.1530 + target_label = JUMP_LABEL (delay_insn);
76.1531 +
76.1532 + if (target_label)
76.1533 +diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
76.1534 +--- gcc-20030210.orig/gcc/tree-inline.c Fri Jan 31 19:17:33 2003
76.1535 ++++ gcc-20030210/gcc/tree-inline.c Sat Feb 22 01:40:14 2003
76.1536 +@@ -836,11 +836,17 @@
76.1537 +
76.1538 + /* Don't try to inline functions that are not well-suited to
76.1539 + inlining. */
76.1540 +- if (!inlinable_function_p (fn, id))
76.1541 +- return NULL_TREE;
76.1542 ++ if (! inlinable_function_p (fn, id)
76.1543 ++ || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
76.1544 ++ {
76.1545 ++ if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
76.1546 ++ {
76.1547 ++ warning_with_decl (fn, "inlining failed in call to `%s'");
76.1548 ++ warning ("called from here");
76.1549 ++ }
76.1550 +
76.1551 +- if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
76.1552 +- return NULL_TREE;
76.1553 ++ return NULL_TREE;
76.1554 ++ }
76.1555 +
76.1556 + /* Set the current filename and line number to the function we are
76.1557 + inlining so that when we create new _STMT nodes here they get
76.1558 +diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
76.1559 +--- gcc-20030210.orig/libjava/Makefile.in Tue Jan 28 10:44:37 2003
76.1560 ++++ gcc-20030210/libjava/Makefile.in Sat Feb 22 01:40:14 2003
76.1561 +@@ -1637,6 +1637,7 @@
76.1562 + "AS=$(AS)" \
76.1563 + "CC=$(CC)" \
76.1564 + "CXX=$(CXX)" \
76.1565 ++ "GCJ=$(GCJ)" \
76.1566 + "LD=$(LD)" \
76.1567 + "LIBCFLAGS=$(LIBCFLAGS)" \
76.1568 + "NM=$(NM)" \
76.1569 +diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
76.1570 +--- gcc-20030210.orig/libjava/configure Tue Jan 28 10:44:37 2003
76.1571 ++++ gcc-20030210/libjava/configure Sat Feb 22 01:42:11 2003
76.1572 +@@ -2031,7 +2031,7 @@
76.1573 + # This must be Linux ELF.
76.1574 + linux-gnu*)
76.1575 + case $host_cpu in
76.1576 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
76.1577 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
76.1578 + lt_cv_deplibs_check_method=pass_all ;;
76.1579 + *)
76.1580 + # glibc up to 2.1.1 does not perform some relocations on ARM
76.1581 +diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
76.1582 +--- gcc-20030210.orig/libjava/java/net/natInetAddress.cc Tue Mar 5 05:02:19 2002
76.1583 ++++ gcc-20030210/libjava/java/net/natInetAddress.cc Sat Feb 22 01:40:14 2003
76.1584 +@@ -56,7 +56,7 @@
76.1585 + #endif
76.1586 +
76.1587 + #ifndef HAVE_GETHOSTNAME_DECL
76.1588 +-extern "C" int gethostname (char *name, int namelen);
76.1589 ++extern "C" int gethostname (char *name, unsigned int namelen);
76.1590 + #endif
76.1591 +
76.1592 + #ifdef DISABLE_JAVA_NET
76.1593 +diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
76.1594 +--- gcc-20030210.orig/libjava/libltdl/aclocal.m4 Sun Sep 10 17:04:40 2000
76.1595 ++++ gcc-20030210/libjava/libltdl/aclocal.m4 Sat Feb 22 01:40:14 2003
76.1596 +@@ -573,7 +573,7 @@
76.1597 + # This must be Linux ELF.
76.1598 + linux-gnu*)
76.1599 + case "$host_cpu" in
76.1600 +- alpha* | i*86 | powerpc* | sparc* | ia64* )
76.1601 ++ alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
76.1602 + lt_cv_deplibs_check_method=pass_all ;;
76.1603 + *)
76.1604 + # glibc up to 2.1.1 does not perform some relocations on ARM
76.1605 +diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
76.1606 +--- gcc-20030210.orig/libjava/sysdep/sh/locks.h Thu Jan 1 09:00:00 1970
76.1607 ++++ gcc-20030210/libjava/sysdep/sh/locks.h Sat Feb 22 01:40:14 2003
76.1608 +@@ -0,0 +1,72 @@
76.1609 ++// locks.h - Thread synchronization primitives. SuperH implementation.
76.1610 ++
76.1611 ++/* Copyright (C) 2002 Free Software Foundation
76.1612 ++
76.1613 ++ This file is part of libgcj.
76.1614 ++
76.1615 ++This software is copyrighted work licensed under the terms of the
76.1616 ++Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
76.1617 ++details. */
76.1618 ++
76.1619 ++#ifndef __SYSDEP_LOCKS_H__
76.1620 ++#define __SYSDEP_LOCKS_H__
76.1621 ++
76.1622 ++typedef size_t obj_addr_t; /* Integer type big enough for object */
76.1623 ++ /* address. */
76.1624 ++
76.1625 ++static unsigned char __cas_lock = 0;
76.1626 ++
76.1627 ++inline static void
76.1628 ++__cas_start_atomic (void)
76.1629 ++{
76.1630 ++ unsigned int val;
76.1631 ++
76.1632 ++ do
76.1633 ++ __asm__ __volatile__ ("tas.b @%1; movt %0"
76.1634 ++ : "=r" (val)
76.1635 ++ : "r" (&__cas_lock)
76.1636 ++ : "memory");
76.1637 ++ while (val == 0);
76.1638 ++}
76.1639 ++
76.1640 ++inline static void
76.1641 ++__cas_end_atomic (void)
76.1642 ++{
76.1643 ++ __asm__ __volatile__ (" " : : : "memory");
76.1644 ++ __cas_lock = 0;
76.1645 ++}
76.1646 ++
76.1647 ++inline static bool
76.1648 ++compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
76.1649 ++ obj_addr_t new_val)
76.1650 ++{
76.1651 ++ bool ret;
76.1652 ++
76.1653 ++ __cas_start_atomic ();
76.1654 ++ if (*addr != old)
76.1655 ++ ret = false;
76.1656 ++ else
76.1657 ++ {
76.1658 ++ *addr = new_val;
76.1659 ++ ret = true;
76.1660 ++ }
76.1661 ++ __cas_end_atomic ();
76.1662 ++
76.1663 ++ return ret;
76.1664 ++}
76.1665 ++
76.1666 ++inline static void
76.1667 ++release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
76.1668 ++{
76.1669 ++ __asm__ __volatile__ (" " : : : "memory");
76.1670 ++ *(addr) = new_val;
76.1671 ++}
76.1672 ++
76.1673 ++inline static bool
76.1674 ++compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
76.1675 ++ obj_addr_t new_val)
76.1676 ++{
76.1677 ++ return compare_and_swap (addr, old, new_val);
76.1678 ++}
76.1679 ++
76.1680 ++#endif /* ! __SYSDEP_LOCKS_H__ */
76.1681 +diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
76.1682 +--- gcc-20030210.orig/libstdc++-v3/acinclude.m4 Tue Jan 28 02:30:41 2003
76.1683 ++++ gcc-20030210/libstdc++-v3/acinclude.m4 Sat Feb 22 01:40:14 2003
76.1684 +@@ -1828,9 +1828,10 @@
76.1685 + GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
76.1686 +
76.1687 + # Passed down for canadian crosses.
76.1688 +- if test x"$CANADIAN" = xyes; then
76.1689 +- TOPLEVEL_INCLUDES='-I$(includedir)'
76.1690 +- fi
76.1691 ++ #if test x"$CANADIAN" = xyes; then
76.1692 ++ # TOPLEVEL_INCLUDES='-I$(includedir)'
76.1693 ++ #fi
76.1694 ++ TOPLEVEL_INCLUDES=''
76.1695 +
76.1696 + LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
76.1697 +
76.1698 +diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
76.1699 +--- gcc-20030210.orig/libstdc++-v3/aclocal.m4 Mon Feb 10 19:36:47 2003
76.1700 ++++ gcc-20030210/libstdc++-v3/aclocal.m4 Sat Feb 22 01:40:14 2003
76.1701 +@@ -1840,9 +1840,10 @@
76.1702 + GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
76.1703 +
76.1704 + # Passed down for canadian crosses.
76.1705 +- if test x"$CANADIAN" = xyes; then
76.1706 +- TOPLEVEL_INCLUDES='-I$(includedir)'
76.1707 +- fi
76.1708 ++ #if test x"$CANADIAN" = xyes; then
76.1709 ++ # TOPLEVEL_INCLUDES='-I$(includedir)'
76.1710 ++ #fi
76.1711 ++ TOPLEVEL_INCLUDES=''
76.1712 +
76.1713 + LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
76.1714 +
76.1715 +diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
76.1716 +--- gcc-20030210.orig/libstdc++-v3/configure Mon Feb 10 19:37:17 2003
76.1717 ++++ gcc-20030210/libstdc++-v3/configure Sat Feb 22 01:40:14 2003
76.1718 +@@ -1982,7 +1982,7 @@
76.1719 + # This must be Linux ELF.
76.1720 + linux-gnu*)
76.1721 + case $host_cpu in
76.1722 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
76.1723 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
76.1724 + lt_cv_deplibs_check_method=pass_all ;;
76.1725 + *)
76.1726 + # glibc up to 2.1.1 does not perform some relocations on ARM
76.1727 +@@ -22340,9 +22340,10 @@
76.1728 + GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
76.1729 +
76.1730 + # Passed down for canadian crosses.
76.1731 +- if test x"$CANADIAN" = xyes; then
76.1732 +- TOPLEVEL_INCLUDES='-I$(includedir)'
76.1733 +- fi
76.1734 ++ #if test x"$CANADIAN" = xyes; then
76.1735 ++ # TOPLEVEL_INCLUDES='-I$(includedir)'
76.1736 ++ #fi
76.1737 ++ TOPLEVEL_INCLUDES=''
76.1738 +
76.1739 + LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
76.1740 +
76.1741 +diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
76.1742 +--- gcc-20030210.orig/libtool.m4 Fri Jan 31 19:16:59 2003
76.1743 ++++ gcc-20030210/libtool.m4 Sat Feb 22 01:40:14 2003
76.1744 +@@ -597,7 +597,7 @@
76.1745 + # This must be Linux ELF.
76.1746 + linux-gnu*)
76.1747 + case $host_cpu in
76.1748 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
76.1749 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
76.1750 + lt_cv_deplibs_check_method=pass_all ;;
76.1751 + *)
76.1752 + # glibc up to 2.1.1 does not perform some relocations on ARM
76.1753 +diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
76.1754 +--- gcc-20030210.orig/zlib/configure Tue Jan 28 10:44:15 2003
76.1755 ++++ gcc-20030210/zlib/configure Sat Feb 22 01:40:14 2003
76.1756 +@@ -1571,7 +1571,7 @@
76.1757 + # This must be Linux ELF.
76.1758 + linux-gnu*)
76.1759 + case $host_cpu in
76.1760 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
76.1761 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
76.1762 + lt_cv_deplibs_check_method=pass_all ;;
76.1763 + *)
76.1764 + # glibc up to 2.1.1 does not perform some relocations on ARM
77.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
77.2 +++ b/patches/gcc/3.2.3/130-gcc-3.2.3-g++.exp.patch Sun Sep 23 17:08:09 2007 +0000
77.3 @@ -0,0 +1,98 @@
77.4 +g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
77.5 +
77.6 +The first hunk fixes the error
77.7 +
77.8 +/testsuite_flags: /testsuite_flags: No such file or directory
77.9 + while executing
77.10 +"exec sh ${odir_v3}/testsuite_flags --build-includes"
77.11 + (procedure "g++_include_flags" line 21)
77.12 + invoked from within
77.13 +"g++_include_flags [get_multilibs] "
77.14 + (procedure "g++_init" line 63)
77.15 + invoked from within
77.16 +"${tool}_init $test_file_name"
77.17 + (procedure "runtest" line 19)
77.18 + invoked from within
77.19 +"runtest $test_name"
77.20 + ("foreach" body line 42)
77.21 + invoked from within
77.22 +...
77.23 +make[1]: [check-g++] Error 1 (ignored)
77.24 +
77.25 +The fix isn't especially pretty, but it worked for me, and can't hurt the
77.26 +more common native compiler case. Maybe someone who knows the code better
77.27 +can come up with a better fix.
77.28 +
77.29 +The second hunk fixes the error
77.30 +
77.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
77.32 +
77.33 +when trying to compile g++ testcases (!); setting up
77.34 +the shared library environment when running crosstests of g++
77.35 +should either be done by a special board file, or by
77.36 +setting up a remote chroot environment (see http://kegel.com/crosstool),
77.37 +not by blithely setting LD_LIBRARY_PATH on the local system.
77.38 +
77.39 +--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old Fri Jul 11 15:42:47 2003
77.40 ++++ gcc-3.2.3/gcc/testsuite/lib/g++.exp Sat Jul 12 12:57:07 2003
77.41 +@@ -72,6 +72,8 @@
77.42 + #
77.43 + proc g++_include_flags { paths } {
77.44 + global srcdir
77.45 ++ global objdir
77.46 ++ global target_triplet
77.47 + global HAVE_LIBSTDCXX_V3
77.48 + global TESTING_IN_BUILD_TREE
77.49 +
77.50 +@@ -90,6 +92,20 @@
77.51 +
77.52 + if { ${HAVE_LIBSTDCXX_V3} } {
77.53 + set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
77.54 ++ if { $odir_v3 == "" } {
77.55 ++ verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
77.56 ++ # first assume no multilibs
77.57 ++ set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
77.58 ++ }
77.59 ++ if { $odir_v3 == "" } {
77.60 ++ verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
77.61 ++ # assume multilib only one level deep
77.62 ++ set multisub [file tail $gccpath]
77.63 ++ set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
77.64 ++ }
77.65 ++ if { $odir_v3 == "" } {
77.66 ++ error "Can't find libstdc++-v3"
77.67 ++ }
77.68 + append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
77.69 + } else {
77.70 + set odir_v2 [lookfor_file ${gccpath} libstdc++]
77.71 +@@ -192,16 +192,20 @@
77.72 + }
77.73 + }
77.74 +
77.75 +- # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
77.76 +- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
77.77 +- # (for the 64-bit ABI). The right way to do this would be to modify
77.78 +- # unix.exp -- but that's not an option since it's part of DejaGNU
77.79 +- # proper, so we do it here. We really only need to do
77.80 +- # this on IRIX, but it shouldn't hurt to do it anywhere else.
77.81 +- setenv LD_LIBRARY_PATH $ld_library_path
77.82 +- setenv SHLIB_PATH $ld_library_path
77.83 +- setenv LD_LIBRARYN32_PATH $ld_library_path
77.84 +- setenv LD_LIBRARY64_PATH $ld_library_path
77.85 ++ if {![is_remote target]} {
77.86 ++ # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
77.87 ++ # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
77.88 ++ # (for the 64-bit ABI). The right way to do this would be to modify
77.89 ++ # unix.exp -- but that's not an option since it's part of DejaGNU
77.90 ++ # proper, so we do it here. We really only need to do
77.91 ++ # this on IRIX, but it shouldn't hurt to do it anywhere else.
77.92 ++
77.93 ++ # Doing this causes us to be unable to run cross-compilers.
77.94 ++ setenv LD_LIBRARY_PATH $ld_library_path
77.95 ++ setenv SHLIB_PATH $ld_library_path
77.96 ++ setenv LD_LIBRARYN32_PATH $ld_library_path
77.97 ++ setenv LD_LIBRARY64_PATH $ld_library_path
77.98 ++ }
77.99 +
77.100 + return "$flags"
77.101 + }
78.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
78.2 +++ b/patches/gcc/3.2.3/140-gcc-3.2.3-libffi-1.patch Sun Sep 23 17:08:09 2007 +0000
78.3 @@ -0,0 +1,6864 @@
78.4 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.am gcc/libffi/Makefile.am
78.5 +--- gcc-3.2.2.orig/libffi/Makefile.am Tue Jan 28 10:43:56 2003
78.6 ++++ gcc/libffi/Makefile.am Tue Jan 28 10:48:33 2003
78.7 +@@ -8,14 +8,17 @@
78.8 + src/mips/n32.s src/mips/o32.S src/mips/o32.s \
78.9 + src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
78.10 + src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
78.11 ++ src/x86/ffi64.c src/x86/unix64.S \
78.12 + src/alpha/ffi.c src/alpha/osf.S \
78.13 + src/m68k/ffi.c src/m68k/sysv.S \
78.14 + src/powerpc/ffi.c src/powerpc/sysv.S \
78.15 + src/powerpc/ppc_closure.S src/powerpc/asm.h \
78.16 + src/powerpc/ffi_darwin.c \
78.17 + src/powerpc/darwin.S src/powerpc/aix.S \
78.18 +- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
78.19 +- src/arm/ffi.c src/arm/sysv.S
78.20 ++ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
78.21 ++ src/arm/ffi.c src/arm/sysv.S \
78.22 ++ src/s390/ffi.c src/s390/sysv.S \
78.23 ++ src/sh/ffi.c src/sh/sysv.S
78.24 +
78.25 + VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
78.26 +
78.27 +@@ -83,6 +86,7 @@
78.28 + ffitest_LDFLAGS = -shared-libgcc
78.29 +
78.30 + TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
78.31 ++TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
78.32 + TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
78.33 + TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
78.34 + TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
78.35 +@@ -91,9 +95,12 @@
78.36 + TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
78.37 + TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
78.38 + TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
78.39 +-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
78.40 ++TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
78.41 + TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
78.42 + TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
78.43 ++TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
78.44 ++TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
78.45 ++TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
78.46 +
78.47 + ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
78.48 + ## Work around automake deficiency
78.49 +@@ -103,6 +110,10 @@
78.50 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
78.51 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
78.52 + endif
78.53 ++if MIPS_LINUX
78.54 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
78.55 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
78.56 ++endif
78.57 + if MIPS_SGI
78.58 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
78.59 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
78.60 +@@ -147,6 +158,18 @@
78.61 + libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
78.62 + libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
78.63 + endif
78.64 ++if S390
78.65 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
78.66 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
78.67 ++endif
78.68 ++if X86_64
78.69 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
78.70 ++libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
78.71 ++endif
78.72 ++if SH
78.73 ++libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
78.74 ++libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
78.75 ++endif
78.76 +
78.77 + AM_CFLAGS = -fexceptions
78.78 +
78.79 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.in gcc/libffi/Makefile.in
78.80 +--- gcc-3.2.2.orig/libffi/Makefile.in Wed Jan 29 07:59:05 2003
78.81 ++++ gcc/libffi/Makefile.in Wed Jan 29 07:58:58 2003
78.82 +@@ -91,14 +91,17 @@
78.83 + src/mips/n32.s src/mips/o32.S src/mips/o32.s \
78.84 + src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
78.85 + src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
78.86 ++ src/x86/ffi64.c src/x86/unix64.S \
78.87 + src/alpha/ffi.c src/alpha/osf.S \
78.88 + src/m68k/ffi.c src/m68k/sysv.S \
78.89 + src/powerpc/ffi.c src/powerpc/sysv.S \
78.90 + src/powerpc/ppc_closure.S src/powerpc/asm.h \
78.91 + src/powerpc/ffi_darwin.c \
78.92 + src/powerpc/darwin.S src/powerpc/aix.S \
78.93 +- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
78.94 +- src/arm/ffi.c src/arm/sysv.S
78.95 ++ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
78.96 ++ src/arm/ffi.c src/arm/sysv.S \
78.97 ++ src/s390/ffi.c src/s390/sysv.S \
78.98 ++ src/sh/ffi.c src/sh/sysv.S
78.99 +
78.100 +
78.101 + VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
78.102 +@@ -162,6 +165,7 @@
78.103 + ffitest_LDFLAGS = -shared-libgcc
78.104 +
78.105 + TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
78.106 ++TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
78.107 + TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
78.108 + TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
78.109 + TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
78.110 +@@ -170,14 +174,18 @@
78.111 + TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
78.112 + TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
78.113 + TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
78.114 +-TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
78.115 ++TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
78.116 + TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
78.117 + TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
78.118 ++TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
78.119 ++TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
78.120 ++TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
78.121 +
78.122 + libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
78.123 + src/raw_api.c src/java_raw_api.c
78.124 +
78.125 + @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
78.126 ++@MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
78.127 + @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
78.128 + @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
78.129 + @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
78.130 +@@ -189,7 +197,11 @@
78.131 + @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
78.132 + @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
78.133 + @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
78.134 ++@S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
78.135 ++@X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
78.136 ++@SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
78.137 + @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
78.138 ++@MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
78.139 + @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
78.140 + @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
78.141 + @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
78.142 +@@ -201,6 +213,9 @@
78.143 + @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
78.144 + @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
78.145 + @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
78.146 ++@S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
78.147 ++@X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
78.148 ++@SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
78.149 +
78.150 + AM_CFLAGS = -fexceptions
78.151 +
78.152 +@@ -208,7 +223,7 @@
78.153 +
78.154 + INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
78.155 + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
78.156 +-mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
78.157 ++mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs
78.158 + CONFIG_HEADER = fficonfig.h
78.159 + CONFIG_CLEAN_FILES =
78.160 + LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
78.161 +@@ -220,10 +235,6 @@
78.162 + LIBS = @LIBS@
78.163 + libffi_convenience_la_LDFLAGS =
78.164 + libffi_convenience_la_LIBADD =
78.165 +-@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.166 +-@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.167 +-@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
78.168 +-@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
78.169 + @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.170 + @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.171 + @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
78.172 +@@ -234,12 +245,29 @@
78.173 + @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.174 + @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
78.175 + @MIPS_GCC_TRUE@src/mips/n32.lo
78.176 +-@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.177 +-@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.178 +-@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
78.179 ++@S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.180 ++@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.181 ++@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
78.182 + @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.183 + @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.184 + @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
78.185 ++@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.186 ++@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.187 ++@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
78.188 ++@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.189 ++@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.190 ++@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
78.191 ++@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
78.192 ++@MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.193 ++@MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.194 ++@MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo
78.195 ++@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.196 ++@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.197 ++@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
78.198 ++@X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.199 ++@X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.200 ++@X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \
78.201 ++@X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo
78.202 + @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.203 + @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.204 + @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
78.205 +@@ -247,62 +275,75 @@
78.206 + @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.207 + @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.208 + @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
78.209 +-@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
78.210 +-@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.211 +-@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.212 +-@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
78.213 +-@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.214 +-@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.215 +-@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
78.216 ++@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo
78.217 ++@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.218 ++@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.219 ++@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
78.220 ++@MIPS_SGI_TRUE@src/mips/n32.lo
78.221 + @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.222 + @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.223 + @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
78.224 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
78.225 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
78.226 +-@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
78.227 +-@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
78.228 +-@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
78.229 +-@MIPS_SGI_TRUE@src/mips/n32.lo
78.230 ++@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.231 ++@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.232 ++@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
78.233 ++@SH_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.234 ++@SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.235 ++@SH_TRUE@src/sh/sysv.lo src/sh/ffi.lo
78.236 + libffi_la_LIBADD =
78.237 ++@SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
78.238 ++@SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \
78.239 ++@SH_TRUE@src/sh/ffi.lo
78.240 ++@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.241 ++@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.242 ++@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
78.243 ++@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
78.244 ++@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
78.245 ++@X86_TRUE@src/x86/sysv.lo
78.246 + @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.247 + @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.248 + @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
78.249 + @POWERPC_TRUE@src/powerpc/ppc_closure.lo
78.250 +-@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.251 +-@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.252 +-@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
78.253 +-@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.254 +-@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.255 +-@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
78.256 +-@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.257 +-@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.258 +-@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
78.259 +-@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.260 +-@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.261 +-@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
78.262 +-@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.263 +-@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.264 +-@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
78.265 ++@MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.266 ++@MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.267 ++@MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo
78.268 + @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.269 + @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.270 + @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
78.271 + @POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.272 + @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.273 + @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
78.274 +-@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
78.275 +-@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
78.276 +-@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
78.277 +-@X86_TRUE@src/x86/sysv.lo
78.278 ++@POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo
78.279 ++@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.280 ++@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.281 ++@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
78.282 + @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
78.283 + @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
78.284 + @ARM_TRUE@src/arm/ffi.lo
78.285 ++@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.286 ++@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.287 ++@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
78.288 ++@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.289 ++@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.290 ++@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
78.291 ++@S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.292 ++@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.293 ++@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
78.294 ++@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.295 ++@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.296 ++@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
78.297 ++@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.298 ++@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.299 ++@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
78.300 ++@X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.301 ++@X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.302 ++@X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \
78.303 ++@X86_64_TRUE@src/x86/sysv.lo
78.304 + @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.305 + @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.306 + @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
78.307 + @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
78.308 +-@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
78.309 +-@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
78.310 +-@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
78.311 + noinst_PROGRAMS = ffitest$(EXEEXT)
78.312 + PROGRAMS = $(noinst_PROGRAMS)
78.313 +
78.314 +@@ -578,8 +616,8 @@
78.315 + -chmod 777 $(distdir)
78.316 + $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \
78.317 + $(distdir)/src/m68k $(distdir)/src/mips \
78.318 +- $(distdir)/src/powerpc $(distdir)/src/sparc \
78.319 +- $(distdir)/src/x86
78.320 ++ $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \
78.321 ++ $(distdir)/src/sparc $(distdir)/src/x86
78.322 + @for file in $(DISTFILES); do \
78.323 + if test -f $$file; then d=.; else d=$(srcdir); fi; \
78.324 + if test -d $$d/$$file; then \
78.325 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/acinclude.m4 gcc/libffi/acinclude.m4
78.326 +--- gcc-3.2.2.orig/libffi/acinclude.m4 Sun Sep 10 16:43:14 2000
78.327 ++++ gcc/libffi/acinclude.m4 Tue Dec 17 03:22:47 2002
78.328 +@@ -4,5 +4,8 @@
78.329 + dnl to add a definition of LIBTOOL to Makefile.in.
78.330 + ifelse(yes,no,[
78.331 + AC_DEFUN([AC_PROG_LIBTOOL],)
78.332 ++AC_DEFUN([AM_PROG_LIBTOOL],)
78.333 + AC_SUBST(LIBTOOL)
78.334 + ])
78.335 ++
78.336 ++sinclude(../config/accross.m4)
78.337 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/aclocal.m4 gcc/libffi/aclocal.m4
78.338 +--- gcc-3.2.2.orig/libffi/aclocal.m4 Fri Feb 1 07:25:31 2002
78.339 ++++ gcc/libffi/aclocal.m4 Tue Dec 17 03:22:47 2002
78.340 +@@ -1,6 +1,6 @@
78.341 +-dnl aclocal.m4 generated automatically by aclocal 1.4
78.342 ++dnl aclocal.m4 generated automatically by aclocal 1.4-p5
78.343 +
78.344 +-dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
78.345 ++dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
78.346 + dnl This file is free software; the Free Software Foundation
78.347 + dnl gives unlimited permission to copy and/or distribute it,
78.348 + dnl with or without modifications, as long as this notice is preserved.
78.349 +@@ -16,108 +16,15 @@
78.350 + dnl to add a definition of LIBTOOL to Makefile.in.
78.351 + ifelse(yes,no,[
78.352 + AC_DEFUN([AC_PROG_LIBTOOL],)
78.353 ++AC_DEFUN([AM_PROG_LIBTOOL],)
78.354 + AC_SUBST(LIBTOOL)
78.355 + ])
78.356 +
78.357 +-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
78.358 +-[changequote(<<, >>)dnl
78.359 +-dnl The name to #define.
78.360 +-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
78.361 +-dnl The cache variable name.
78.362 +-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
78.363 +-changequote([, ])dnl
78.364 +-AC_MSG_CHECKING(size of $1)
78.365 +-AC_CACHE_VAL(AC_CV_NAME,
78.366 +-[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
78.367 +- AC_TRY_COMPILE([#include "confdefs.h"
78.368 +-#include <sys/types.h>
78.369 +-$2
78.370 +-], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
78.371 +- if test x$AC_CV_NAME != x ; then break; fi
78.372 +-done
78.373 +-])
78.374 +-if test x$AC_CV_NAME = x ; then
78.375 +- AC_MSG_ERROR([cannot determine a size for $1])
78.376 +-fi
78.377 +-AC_MSG_RESULT($AC_CV_NAME)
78.378 +-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
78.379 +-undefine([AC_TYPE_NAME])dnl
78.380 +-undefine([AC_CV_NAME])dnl
78.381 +-])
78.382 +-
78.383 +-AC_DEFUN([AC_C_BIGENDIAN_CROSS],
78.384 +-[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
78.385 +-[ac_cv_c_bigendian=unknown
78.386 +-# See if sys/param.h defines the BYTE_ORDER macro.
78.387 +-AC_TRY_COMPILE([#include <sys/types.h>
78.388 +-#include <sys/param.h>], [
78.389 +-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
78.390 +- bogus endian macros
78.391 +-#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
78.392 +-AC_TRY_COMPILE([#include <sys/types.h>
78.393 +-#include <sys/param.h>], [
78.394 +-#if BYTE_ORDER != BIG_ENDIAN
78.395 +- not big endian
78.396 +-#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
78.397 +-if test $ac_cv_c_bigendian = unknown; then
78.398 +-AC_TRY_RUN([main () {
78.399 +- /* Are we little or big endian? From Harbison&Steele. */
78.400 +- union
78.401 +- {
78.402 +- long l;
78.403 +- char c[sizeof (long)];
78.404 +- } u;
78.405 +- u.l = 1;
78.406 +- exit (u.c[sizeof (long) - 1] == 1);
78.407 +-}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
78.408 +-[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
78.409 +-fi])
78.410 +-if test $ac_cv_c_bigendian = unknown; then
78.411 +-AC_MSG_CHECKING(to probe for byte ordering)
78.412 +-[
78.413 +-cat >conftest.c <<EOF
78.414 +-short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
78.415 +-short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
78.416 +-void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
78.417 +-short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
78.418 +-short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
78.419 +-void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
78.420 +-int main() { _ascii (); _ebcdic (); return 0; }
78.421 +-EOF
78.422 +-] if test -f conftest.c ; then
78.423 +- if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
78.424 +- if test `grep -l BIGenDianSyS conftest.o` ; then
78.425 +- echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
78.426 +- ac_cv_c_bigendian=yes
78.427 +- fi
78.428 +- if test `grep -l LiTTleEnDian conftest.o` ; then
78.429 +- echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
78.430 +- if test $ac_cv_c_bigendian = yes ; then
78.431 +- ac_cv_c_bigendian=unknown;
78.432 +- else
78.433 +- ac_cv_c_bigendian=no
78.434 +- fi
78.435 +- fi
78.436 +- echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
78.437 +- fi
78.438 +- fi
78.439 +-AC_MSG_RESULT($ac_cv_c_bigendian)
78.440 +-fi
78.441 +-if test $ac_cv_c_bigendian = yes; then
78.442 +- AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
78.443 +- BYTEORDER=4321
78.444 +-else
78.445 +- BYTEORDER=1234
78.446 +-fi
78.447 +-AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
78.448 +-if test $ac_cv_c_bigendian = unknown; then
78.449 +- AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
78.450 +-fi
78.451 +-])
78.452 ++sinclude(../config/accross.m4)
78.453 +
78.454 + # Like AC_CONFIG_HEADER, but automatically create stamp file.
78.455 +
78.456 +-AC_DEFUN(AM_CONFIG_HEADER,
78.457 ++AC_DEFUN([AM_CONFIG_HEADER],
78.458 + [AC_PREREQ([2.12])
78.459 + AC_CONFIG_HEADER([$1])
78.460 + dnl When config.status generates a header, we must update the stamp-h file.
78.461 +@@ -147,7 +54,7 @@
78.462 + dnl Usage:
78.463 + dnl AM_INIT_AUTOMAKE(package,version, [no-define])
78.464 +
78.465 +-AC_DEFUN(AM_INIT_AUTOMAKE,
78.466 ++AC_DEFUN([AM_INIT_AUTOMAKE],
78.467 + [AC_REQUIRE([AC_PROG_INSTALL])
78.468 + PACKAGE=[$1]
78.469 + AC_SUBST(PACKAGE)
78.470 +@@ -175,7 +82,7 @@
78.471 + # Check to make sure that the build environment is sane.
78.472 + #
78.473 +
78.474 +-AC_DEFUN(AM_SANITY_CHECK,
78.475 ++AC_DEFUN([AM_SANITY_CHECK],
78.476 + [AC_MSG_CHECKING([whether build environment is sane])
78.477 + # Just in case
78.478 + sleep 1
78.479 +@@ -216,7 +123,7 @@
78.480 +
78.481 + dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
78.482 + dnl The program must properly implement --version.
78.483 +-AC_DEFUN(AM_MISSING_PROG,
78.484 ++AC_DEFUN([AM_MISSING_PROG],
78.485 + [AC_MSG_CHECKING(for working $2)
78.486 + # Run test in a subshell; some versions of sh will print an error if
78.487 + # an executable is not found, even if stderr is redirected.
78.488 +@@ -235,7 +142,7 @@
78.489 +
78.490 + # serial 1
78.491 +
78.492 +-AC_DEFUN(AM_MAINTAINER_MODE,
78.493 ++AC_DEFUN([AM_MAINTAINER_MODE],
78.494 + [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
78.495 + dnl maintainer-mode is disabled by default
78.496 + AC_ARG_ENABLE(maintainer-mode,
78.497 +@@ -252,7 +159,7 @@
78.498 +
78.499 + # Define a conditional.
78.500 +
78.501 +-AC_DEFUN(AM_CONDITIONAL,
78.502 ++AC_DEFUN([AM_CONDITIONAL],
78.503 + [AC_SUBST($1_TRUE)
78.504 + AC_SUBST($1_FALSE)
78.505 + if $2; then
78.506 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure gcc/libffi/configure
78.507 +--- gcc-3.2.2.orig/libffi/configure Wed Jan 29 07:59:05 2003
78.508 ++++ gcc/libffi/configure Sat Feb 1 20:16:19 2003
78.509 +@@ -633,17 +633,16 @@
78.510 +
78.511 + if test "${srcdir}" = "."; then
78.512 + if test "${with_target_subdir}" != "."; then
78.513 +- libffi_basedir="${srcdir}/${with_multisrctop}.."
78.514 ++ libffi_basedir="${with_multisrctop}../"
78.515 + else
78.516 +- libffi_basedir="${srcdir}/${with_multisrctop}"
78.517 ++ libffi_basedir="${with_multisrctop}"
78.518 + fi
78.519 + else
78.520 +- libffi_basedir="${srcdir}"
78.521 ++ libffi_basedir=
78.522 + fi
78.523 +
78.524 +-
78.525 + ac_aux_dir=
78.526 +-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
78.527 ++for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
78.528 + if test -f $ac_dir/install-sh; then
78.529 + ac_aux_dir=$ac_dir
78.530 + ac_install_sh="$ac_aux_dir/install-sh -c"
78.531 +@@ -655,13 +654,14 @@
78.532 + fi
78.533 + done
78.534 + if test -z "$ac_aux_dir"; then
78.535 +- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
78.536 ++ { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
78.537 + fi
78.538 + ac_config_guess=$ac_aux_dir/config.guess
78.539 + ac_config_sub=$ac_aux_dir/config.sub
78.540 + ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
78.541 +
78.542 +
78.543 ++
78.544 + # Make sure we can run config.sub.
78.545 + if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
78.546 + else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
78.547 +@@ -1238,9 +1238,18 @@
78.548 + ;;
78.549 +
78.550 + hpux10.20*|hpux11*)
78.551 +- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
78.552 +- lt_cv_file_magic_cmd=/usr/bin/file
78.553 +- lt_cv_file_magic_test_file=/usr/lib/libc.sl
78.554 ++ case $host_cpu in
78.555 ++ hppa*)
78.556 ++ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
78.557 ++ lt_cv_file_magic_cmd=/usr/bin/file
78.558 ++ lt_cv_file_magic_test_file=/usr/lib/libc.sl
78.559 ++ ;;
78.560 ++ ia64*)
78.561 ++ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
78.562 ++ lt_cv_file_magic_cmd=/usr/bin/file
78.563 ++ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
78.564 ++ ;;
78.565 ++ esac
78.566 + ;;
78.567 +
78.568 + irix5* | irix6*)
78.569 +@@ -1267,7 +1276,7 @@
78.570 + # This must be Linux ELF.
78.571 + linux-gnu*)
78.572 + case $host_cpu in
78.573 +- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
78.574 ++ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
78.575 + lt_cv_deplibs_check_method=pass_all ;;
78.576 + *)
78.577 + # glibc up to 2.1.1 does not perform some relocations on ARM
78.578 +@@ -1330,13 +1339,13 @@
78.579 + deplibs_check_method=$lt_cv_deplibs_check_method
78.580 +
78.581 + echo $ac_n "checking for object suffix""... $ac_c" 1>&6
78.582 +-echo "configure:1334: checking for object suffix" >&5
78.583 ++echo "configure:1343: checking for object suffix" >&5
78.584 + if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
78.585 + echo $ac_n "(cached) $ac_c" 1>&6
78.586 + else
78.587 + rm -f conftest*
78.588 + echo 'int i = 1;' > conftest.$ac_ext
78.589 +-if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.590 ++if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.591 + for ac_file in conftest.*; do
78.592 + case $ac_file in
78.593 + *.c) ;;
78.594 +@@ -1356,7 +1365,7 @@
78.595 +
78.596 +
78.597 + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
78.598 +-echo "configure:1360: checking for executable suffix" >&5
78.599 ++echo "configure:1369: checking for executable suffix" >&5
78.600 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
78.601 + echo $ac_n "(cached) $ac_c" 1>&6
78.602 + else
78.603 +@@ -1366,7 +1375,7 @@
78.604 + rm -f conftest*
78.605 + echo 'int main () { return 0; }' > conftest.$ac_ext
78.606 + ac_cv_exeext=
78.607 +- if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
78.608 ++ if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
78.609 + for file in conftest.*; do
78.610 + case $file in
78.611 + *.c | *.o | *.obj) ;;
78.612 +@@ -1399,7 +1408,7 @@
78.613 + file_magic*)
78.614 + if test "$file_magic_cmd" = '$MAGIC_CMD'; then
78.615 + echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
78.616 +-echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
78.617 ++echo "configure:1412: checking for ${ac_tool_prefix}file" >&5
78.618 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
78.619 + echo $ac_n "(cached) $ac_c" 1>&6
78.620 + else
78.621 +@@ -1461,7 +1470,7 @@
78.622 + if test -z "$lt_cv_path_MAGIC_CMD"; then
78.623 + if test -n "$ac_tool_prefix"; then
78.624 + echo $ac_n "checking for file""... $ac_c" 1>&6
78.625 +-echo "configure:1465: checking for file" >&5
78.626 ++echo "configure:1474: checking for file" >&5
78.627 + if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
78.628 + echo $ac_n "(cached) $ac_c" 1>&6
78.629 + else
78.630 +@@ -1532,7 +1541,7 @@
78.631 + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
78.632 + set dummy ${ac_tool_prefix}ranlib; ac_word=$2
78.633 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.634 +-echo "configure:1536: checking for $ac_word" >&5
78.635 ++echo "configure:1545: checking for $ac_word" >&5
78.636 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
78.637 + echo $ac_n "(cached) $ac_c" 1>&6
78.638 + else
78.639 +@@ -1564,7 +1573,7 @@
78.640 + # Extract the first word of "ranlib", so it can be a program name with args.
78.641 + set dummy ranlib; ac_word=$2
78.642 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.643 +-echo "configure:1568: checking for $ac_word" >&5
78.644 ++echo "configure:1577: checking for $ac_word" >&5
78.645 + if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
78.646 + echo $ac_n "(cached) $ac_c" 1>&6
78.647 + else
78.648 +@@ -1599,7 +1608,7 @@
78.649 + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
78.650 + set dummy ${ac_tool_prefix}strip; ac_word=$2
78.651 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.652 +-echo "configure:1603: checking for $ac_word" >&5
78.653 ++echo "configure:1612: checking for $ac_word" >&5
78.654 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
78.655 + echo $ac_n "(cached) $ac_c" 1>&6
78.656 + else
78.657 +@@ -1631,7 +1640,7 @@
78.658 + # Extract the first word of "strip", so it can be a program name with args.
78.659 + set dummy strip; ac_word=$2
78.660 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.661 +-echo "configure:1635: checking for $ac_word" >&5
78.662 ++echo "configure:1644: checking for $ac_word" >&5
78.663 + if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
78.664 + echo $ac_n "(cached) $ac_c" 1>&6
78.665 + else
78.666 +@@ -1698,8 +1707,8 @@
78.667 + case $host in
78.668 + *-*-irix6*)
78.669 + # Find out which ABI we are using.
78.670 +- echo '#line 1702 "configure"' > conftest.$ac_ext
78.671 +- if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.672 ++ echo '#line 1711 "configure"' > conftest.$ac_ext
78.673 ++ if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.674 + case `/usr/bin/file conftest.$ac_objext` in
78.675 + *32-bit*)
78.676 + LD="${LD-ld} -32"
78.677 +@@ -1715,12 +1724,70 @@
78.678 + rm -rf conftest*
78.679 + ;;
78.680 +
78.681 ++ia64-*-hpux*)
78.682 ++ # Find out which ABI we are using.
78.683 ++ echo 'int i;' > conftest.$ac_ext
78.684 ++ if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.685 ++ case "`/usr/bin/file conftest.o`" in
78.686 ++ *ELF-32*)
78.687 ++ HPUX_IA64_MODE="32"
78.688 ++ ;;
78.689 ++ *ELF-64*)
78.690 ++ HPUX_IA64_MODE="64"
78.691 ++ ;;
78.692 ++ esac
78.693 ++ fi
78.694 ++ rm -rf conftest*
78.695 ++ ;;
78.696 ++
78.697 ++x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
78.698 ++ # Find out which ABI we are using.
78.699 ++ echo 'int i;' > conftest.$ac_ext
78.700 ++ if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.701 ++ case "`/usr/bin/file conftest.o`" in
78.702 ++ *32-bit*)
78.703 ++ case $host in
78.704 ++ x86_64-*linux*)
78.705 ++ LD="${LD-ld} -m elf_i386"
78.706 ++ ;;
78.707 ++ ppc64-*linux*)
78.708 ++ LD="${LD-ld} -m elf32ppclinux"
78.709 ++ ;;
78.710 ++ s390x-*linux*)
78.711 ++ LD="${LD-ld} -m elf_s390"
78.712 ++ ;;
78.713 ++ sparc64-*linux*)
78.714 ++ LD="${LD-ld} -m elf32_sparc"
78.715 ++ ;;
78.716 ++ esac
78.717 ++ ;;
78.718 ++ *64-bit*)
78.719 ++ case $host in
78.720 ++ x86_64-*linux*)
78.721 ++ LD="${LD-ld} -m elf_x86_64"
78.722 ++ ;;
78.723 ++ ppc*-*linux*|powerpc*-*linux*)
78.724 ++ LD="${LD-ld} -m elf64ppc"
78.725 ++ ;;
78.726 ++ s390*-*linux*)
78.727 ++ LD="${LD-ld} -m elf64_s390"
78.728 ++ ;;
78.729 ++ sparc*-*linux*)
78.730 ++ LD="${LD-ld} -m elf64_sparc"
78.731 ++ ;;
78.732 ++ esac
78.733 ++ ;;
78.734 ++ esac
78.735 ++ fi
78.736 ++ rm -rf conftest*
78.737 ++ ;;
78.738 ++
78.739 + *-*-sco3.2v5*)
78.740 + # On SCO OpenServer 5, we need -belf to get full-featured binaries.
78.741 + SAVE_CFLAGS="$CFLAGS"
78.742 + CFLAGS="$CFLAGS -belf"
78.743 + echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
78.744 +-echo "configure:1724: checking whether the C compiler needs -belf" >&5
78.745 ++echo "configure:1791: checking whether the C compiler needs -belf" >&5
78.746 + if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
78.747 + echo $ac_n "(cached) $ac_c" 1>&6
78.748 + else
78.749 +@@ -1733,14 +1800,14 @@
78.750 + cross_compiling=$ac_cv_prog_cc_cross
78.751 +
78.752 + cat > conftest.$ac_ext <<EOF
78.753 +-#line 1737 "configure"
78.754 ++#line 1804 "configure"
78.755 + #include "confdefs.h"
78.756 +
78.757 + int main() {
78.758 +
78.759 + ; return 0; }
78.760 + EOF
78.761 +-if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.762 ++if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.763 + rm -rf conftest*
78.764 + lt_cv_cc_needs_belf=yes
78.765 + else
78.766 +@@ -1868,7 +1935,7 @@
78.767 + # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
78.768 + # ./install, which can be erroneously created by make from ./install.sh.
78.769 + echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
78.770 +-echo "configure:1872: checking for a BSD compatible install" >&5
78.771 ++echo "configure:1939: checking for a BSD compatible install" >&5
78.772 + if test -z "$INSTALL"; then
78.773 + if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
78.774 + echo $ac_n "(cached) $ac_c" 1>&6
78.775 +@@ -1921,7 +1988,7 @@
78.776 + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
78.777 +
78.778 + echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
78.779 +-echo "configure:1925: checking whether build environment is sane" >&5
78.780 ++echo "configure:1992: checking whether build environment is sane" >&5
78.781 + # Just in case
78.782 + sleep 1
78.783 + echo timestamp > conftestfile
78.784 +@@ -1978,7 +2045,7 @@
78.785 + test "$program_transform_name" = "" && program_transform_name="s,x,x,"
78.786 +
78.787 + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
78.788 +-echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
78.789 ++echo "configure:2049: checking whether ${MAKE-make} sets \${MAKE}" >&5
78.790 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
78.791 + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
78.792 + echo $ac_n "(cached) $ac_c" 1>&6
78.793 +@@ -2017,7 +2084,7 @@
78.794 +
78.795 + missing_dir=`cd $ac_aux_dir && pwd`
78.796 + echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
78.797 +-echo "configure:2021: checking for working aclocal" >&5
78.798 ++echo "configure:2088: checking for working aclocal" >&5
78.799 + # Run test in a subshell; some versions of sh will print an error if
78.800 + # an executable is not found, even if stderr is redirected.
78.801 + # Redirect stdin to placate older versions of autoconf. Sigh.
78.802 +@@ -2030,7 +2097,7 @@
78.803 + fi
78.804 +
78.805 + echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
78.806 +-echo "configure:2034: checking for working autoconf" >&5
78.807 ++echo "configure:2101: checking for working autoconf" >&5
78.808 + # Run test in a subshell; some versions of sh will print an error if
78.809 + # an executable is not found, even if stderr is redirected.
78.810 + # Redirect stdin to placate older versions of autoconf. Sigh.
78.811 +@@ -2043,7 +2110,7 @@
78.812 + fi
78.813 +
78.814 + echo $ac_n "checking for working automake""... $ac_c" 1>&6
78.815 +-echo "configure:2047: checking for working automake" >&5
78.816 ++echo "configure:2114: checking for working automake" >&5
78.817 + # Run test in a subshell; some versions of sh will print an error if
78.818 + # an executable is not found, even if stderr is redirected.
78.819 + # Redirect stdin to placate older versions of autoconf. Sigh.
78.820 +@@ -2056,7 +2123,7 @@
78.821 + fi
78.822 +
78.823 + echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
78.824 +-echo "configure:2060: checking for working autoheader" >&5
78.825 ++echo "configure:2127: checking for working autoheader" >&5
78.826 + # Run test in a subshell; some versions of sh will print an error if
78.827 + # an executable is not found, even if stderr is redirected.
78.828 + # Redirect stdin to placate older versions of autoconf. Sigh.
78.829 +@@ -2069,7 +2136,7 @@
78.830 + fi
78.831 +
78.832 + echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
78.833 +-echo "configure:2073: checking for working makeinfo" >&5
78.834 ++echo "configure:2140: checking for working makeinfo" >&5
78.835 + # Run test in a subshell; some versions of sh will print an error if
78.836 + # an executable is not found, even if stderr is redirected.
78.837 + # Redirect stdin to placate older versions of autoconf. Sigh.
78.838 +@@ -2086,7 +2153,7 @@
78.839 +
78.840 +
78.841 + echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
78.842 +-echo "configure:2090: checking for executable suffix" >&5
78.843 ++echo "configure:2157: checking for executable suffix" >&5
78.844 + if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
78.845 + echo $ac_n "(cached) $ac_c" 1>&6
78.846 + else
78.847 +@@ -2096,7 +2163,7 @@
78.848 + rm -f conftest*
78.849 + echo 'int main () { return 0; }' > conftest.$ac_ext
78.850 + ac_cv_exeext=
78.851 +- if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
78.852 ++ if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
78.853 + for file in conftest.*; do
78.854 + case $file in
78.855 + *.c | *.o | *.obj) ;;
78.856 +@@ -2117,7 +2184,7 @@
78.857 + ac_exeext=$EXEEXT
78.858 +
78.859 + echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
78.860 +-echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
78.861 ++echo "configure:2188: checking whether to enable maintainer-specific portions of Makefiles" >&5
78.862 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
78.863 + if test "${enable_maintainer_mode+set}" = set; then
78.864 + enableval="$enable_maintainer_mode"
78.865 +@@ -2143,7 +2210,7 @@
78.866 + # Extract the first word of "gcc", so it can be a program name with args.
78.867 + set dummy gcc; ac_word=$2
78.868 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.869 +-echo "configure:2147: checking for $ac_word" >&5
78.870 ++echo "configure:2214: checking for $ac_word" >&5
78.871 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
78.872 + echo $ac_n "(cached) $ac_c" 1>&6
78.873 + else
78.874 +@@ -2173,7 +2240,7 @@
78.875 + # Extract the first word of "cc", so it can be a program name with args.
78.876 + set dummy cc; ac_word=$2
78.877 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.878 +-echo "configure:2177: checking for $ac_word" >&5
78.879 ++echo "configure:2244: checking for $ac_word" >&5
78.880 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
78.881 + echo $ac_n "(cached) $ac_c" 1>&6
78.882 + else
78.883 +@@ -2224,7 +2291,7 @@
78.884 + # Extract the first word of "cl", so it can be a program name with args.
78.885 + set dummy cl; ac_word=$2
78.886 + echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
78.887 +-echo "configure:2228: checking for $ac_word" >&5
78.888 ++echo "configure:2295: checking for $ac_word" >&5
78.889 + if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
78.890 + echo $ac_n "(cached) $ac_c" 1>&6
78.891 + else
78.892 +@@ -2256,7 +2323,7 @@
78.893 + fi
78.894 +
78.895 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
78.896 +-echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
78.897 ++echo "configure:2327: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
78.898 +
78.899 + ac_ext=c
78.900 + # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
78.901 +@@ -2267,12 +2334,12 @@
78.902 +
78.903 + cat > conftest.$ac_ext << EOF
78.904 +
78.905 +-#line 2271 "configure"
78.906 ++#line 2338 "configure"
78.907 + #include "confdefs.h"
78.908 +
78.909 + main(){return(0);}
78.910 + EOF
78.911 +-if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.912 ++if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.913 + ac_cv_prog_cc_works=yes
78.914 + # If we can't run a trivial program, we are probably using a cross compiler.
78.915 + if (./conftest; exit) 2>/dev/null; then
78.916 +@@ -2298,12 +2365,12 @@
78.917 + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
78.918 + fi
78.919 + echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
78.920 +-echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
78.921 ++echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
78.922 + echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
78.923 + cross_compiling=$ac_cv_prog_cc_cross
78.924 +
78.925 + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
78.926 +-echo "configure:2307: checking whether we are using GNU C" >&5
78.927 ++echo "configure:2374: checking whether we are using GNU C" >&5
78.928 + if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
78.929 + echo $ac_n "(cached) $ac_c" 1>&6
78.930 + else
78.931 +@@ -2312,7 +2379,7 @@
78.932 + yes;
78.933 + #endif
78.934 + EOF
78.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
78.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
78.937 + ac_cv_prog_gcc=yes
78.938 + else
78.939 + ac_cv_prog_gcc=no
78.940 +@@ -2331,7 +2398,7 @@
78.941 + ac_save_CFLAGS="$CFLAGS"
78.942 + CFLAGS=
78.943 + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
78.944 +-echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
78.945 ++echo "configure:2402: checking whether ${CC-cc} accepts -g" >&5
78.946 + if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
78.947 + echo $ac_n "(cached) $ac_c" 1>&6
78.948 + else
78.949 +@@ -2381,17 +2448,23 @@
78.950 + i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
78.951 + sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
78.952 + sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
78.953 +-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
78.954 +-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
78.955 +-alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
78.956 ++sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
78.957 ++sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
78.958 ++alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
78.959 + ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
78.960 + m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
78.961 ++mips64*-*);;
78.962 ++mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
78.963 + powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
78.964 + powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
78.965 + powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
78.966 + powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
78.967 + rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
78.968 + arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
78.969 ++s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
78.970 ++s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
78.971 ++x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
78.972 ++sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
78.973 + esac
78.974 +
78.975 + if test $TARGETDIR = unknown; then
78.976 +@@ -2418,6 +2491,15 @@
78.977 + fi
78.978 +
78.979 +
78.980 ++if test x$TARGET = xMIPS_LINUX; then
78.981 ++ MIPS_LINUX_TRUE=
78.982 ++ MIPS_LINUX_FALSE='#'
78.983 ++else
78.984 ++ MIPS_LINUX_TRUE='#'
78.985 ++ MIPS_LINUX_FALSE=
78.986 ++fi
78.987 ++
78.988 ++
78.989 + if test x$TARGET = xSPARC; then
78.990 + SPARC_TRUE=
78.991 + SPARC_FALSE='#'
78.992 +@@ -2507,8 +2589,39 @@
78.993 + ARM_FALSE=
78.994 + fi
78.995 +
78.996 ++
78.997 ++if test x$TARGET = xS390; then
78.998 ++ S390_TRUE=
78.999 ++ S390_FALSE='#'
78.1000 ++else
78.1001 ++ S390_TRUE='#'
78.1002 ++ S390_FALSE=
78.1003 ++fi
78.1004 ++
78.1005 ++
78.1006 ++if test x$TARGET = xX86_64; then
78.1007 ++ X86_64_TRUE=
78.1008 ++ X86_64_FALSE='#'
78.1009 ++else
78.1010 ++ X86_64_TRUE='#'
78.1011 ++ X86_64_FALSE=
78.1012 ++fi
78.1013 ++
78.1014 ++
78.1015 ++if test x$TARGET = xSH; then
78.1016 ++ SH_TRUE=
78.1017 ++ SH_FALSE='#'
78.1018 ++else
78.1019 ++ SH_TRUE='#'
78.1020 ++ SH_FALSE=
78.1021 ++fi
78.1022 ++
78.1023 ++if test x$TARGET = xMIPS_LINUX; then
78.1024 ++ TARGET=MIPS
78.1025 ++fi
78.1026 ++
78.1027 + echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
78.1028 +-echo "configure:2512: checking how to run the C preprocessor" >&5
78.1029 ++echo "configure:2625: checking how to run the C preprocessor" >&5
78.1030 + # On Suns, sometimes $CPP names a directory.
78.1031 + if test -n "$CPP" && test -d "$CPP"; then
78.1032 + CPP=
78.1033 +@@ -2523,13 +2636,13 @@
78.1034 + # On the NeXT, cc -E runs the code through the compiler's parser,
78.1035 + # not just through cpp.
78.1036 + cat > conftest.$ac_ext <<EOF
78.1037 +-#line 2527 "configure"
78.1038 ++#line 2640 "configure"
78.1039 + #include "confdefs.h"
78.1040 + #include <assert.h>
78.1041 + Syntax Error
78.1042 + EOF
78.1043 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
78.1044 +-{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1045 ++{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1046 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
78.1047 + if test -z "$ac_err"; then
78.1048 + :
78.1049 +@@ -2540,13 +2653,13 @@
78.1050 + rm -rf conftest*
78.1051 + CPP="${CC-cc} -E -traditional-cpp"
78.1052 + cat > conftest.$ac_ext <<EOF
78.1053 +-#line 2544 "configure"
78.1054 ++#line 2657 "configure"
78.1055 + #include "confdefs.h"
78.1056 + #include <assert.h>
78.1057 + Syntax Error
78.1058 + EOF
78.1059 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
78.1060 +-{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1061 ++{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1062 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
78.1063 + if test -z "$ac_err"; then
78.1064 + :
78.1065 +@@ -2557,13 +2670,13 @@
78.1066 + rm -rf conftest*
78.1067 + CPP="${CC-cc} -nologo -E"
78.1068 + cat > conftest.$ac_ext <<EOF
78.1069 +-#line 2561 "configure"
78.1070 ++#line 2674 "configure"
78.1071 + #include "confdefs.h"
78.1072 + #include <assert.h>
78.1073 + Syntax Error
78.1074 + EOF
78.1075 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
78.1076 +-{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1077 ++{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1078 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
78.1079 + if test -z "$ac_err"; then
78.1080 + :
78.1081 +@@ -2588,12 +2701,12 @@
78.1082 + echo "$ac_t""$CPP" 1>&6
78.1083 +
78.1084 + echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
78.1085 +-echo "configure:2592: checking for ANSI C header files" >&5
78.1086 ++echo "configure:2705: checking for ANSI C header files" >&5
78.1087 + if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
78.1088 + echo $ac_n "(cached) $ac_c" 1>&6
78.1089 + else
78.1090 + cat > conftest.$ac_ext <<EOF
78.1091 +-#line 2597 "configure"
78.1092 ++#line 2710 "configure"
78.1093 + #include "confdefs.h"
78.1094 + #include <stdlib.h>
78.1095 + #include <stdarg.h>
78.1096 +@@ -2601,7 +2714,7 @@
78.1097 + #include <float.h>
78.1098 + EOF
78.1099 + ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
78.1100 +-{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1101 ++{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
78.1102 + ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
78.1103 + if test -z "$ac_err"; then
78.1104 + rm -rf conftest*
78.1105 +@@ -2618,7 +2731,7 @@
78.1106 + if test $ac_cv_header_stdc = yes; then
78.1107 + # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
78.1108 + cat > conftest.$ac_ext <<EOF
78.1109 +-#line 2622 "configure"
78.1110 ++#line 2735 "configure"
78.1111 + #include "confdefs.h"
78.1112 + #include <string.h>
78.1113 + EOF
78.1114 +@@ -2636,7 +2749,7 @@
78.1115 + if test $ac_cv_header_stdc = yes; then
78.1116 + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
78.1117 + cat > conftest.$ac_ext <<EOF
78.1118 +-#line 2640 "configure"
78.1119 ++#line 2753 "configure"
78.1120 + #include "confdefs.h"
78.1121 + #include <stdlib.h>
78.1122 + EOF
78.1123 +@@ -2657,7 +2770,7 @@
78.1124 + :
78.1125 + else
78.1126 + cat > conftest.$ac_ext <<EOF
78.1127 +-#line 2661 "configure"
78.1128 ++#line 2774 "configure"
78.1129 + #include "confdefs.h"
78.1130 + #include <ctype.h>
78.1131 + #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
78.1132 +@@ -2668,7 +2781,7 @@
78.1133 + exit (0); }
78.1134 +
78.1135 + EOF
78.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
78.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
78.1138 + then
78.1139 + :
78.1140 + else
78.1141 +@@ -2694,12 +2807,12 @@
78.1142 + for ac_func in memcpy
78.1143 + do
78.1144 + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
78.1145 +-echo "configure:2698: checking for $ac_func" >&5
78.1146 ++echo "configure:2811: checking for $ac_func" >&5
78.1147 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
78.1148 + echo $ac_n "(cached) $ac_c" 1>&6
78.1149 + else
78.1150 + cat > conftest.$ac_ext <<EOF
78.1151 +-#line 2703 "configure"
78.1152 ++#line 2816 "configure"
78.1153 + #include "confdefs.h"
78.1154 + /* System header to define __stub macros and hopefully few prototypes,
78.1155 + which can conflict with char $ac_func(); below. */
78.1156 +@@ -2722,7 +2835,7 @@
78.1157 +
78.1158 + ; return 0; }
78.1159 + EOF
78.1160 +-if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1161 ++if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1162 + rm -rf conftest*
78.1163 + eval "ac_cv_func_$ac_func=yes"
78.1164 + else
78.1165 +@@ -2749,19 +2862,19 @@
78.1166 + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
78.1167 + # for constant arguments. Useless!
78.1168 + echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
78.1169 +-echo "configure:2753: checking for working alloca.h" >&5
78.1170 ++echo "configure:2866: checking for working alloca.h" >&5
78.1171 + if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
78.1172 + echo $ac_n "(cached) $ac_c" 1>&6
78.1173 + else
78.1174 + cat > conftest.$ac_ext <<EOF
78.1175 +-#line 2758 "configure"
78.1176 ++#line 2871 "configure"
78.1177 + #include "confdefs.h"
78.1178 + #include <alloca.h>
78.1179 + int main() {
78.1180 + char *p = alloca(2 * sizeof(int));
78.1181 + ; return 0; }
78.1182 + EOF
78.1183 +-if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1184 ++if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1185 + rm -rf conftest*
78.1186 + ac_cv_header_alloca_h=yes
78.1187 + else
78.1188 +@@ -2782,12 +2895,12 @@
78.1189 + fi
78.1190 +
78.1191 + echo $ac_n "checking for alloca""... $ac_c" 1>&6
78.1192 +-echo "configure:2786: checking for alloca" >&5
78.1193 ++echo "configure:2899: checking for alloca" >&5
78.1194 + if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
78.1195 + echo $ac_n "(cached) $ac_c" 1>&6
78.1196 + else
78.1197 + cat > conftest.$ac_ext <<EOF
78.1198 +-#line 2791 "configure"
78.1199 ++#line 2904 "configure"
78.1200 + #include "confdefs.h"
78.1201 +
78.1202 + #ifdef __GNUC__
78.1203 +@@ -2815,7 +2928,7 @@
78.1204 + char *p = (char *) alloca(1);
78.1205 + ; return 0; }
78.1206 + EOF
78.1207 +-if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1208 ++if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1209 + rm -rf conftest*
78.1210 + ac_cv_func_alloca_works=yes
78.1211 + else
78.1212 +@@ -2847,12 +2960,12 @@
78.1213 +
78.1214 +
78.1215 + echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
78.1216 +-echo "configure:2851: checking whether alloca needs Cray hooks" >&5
78.1217 ++echo "configure:2964: checking whether alloca needs Cray hooks" >&5
78.1218 + if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
78.1219 + echo $ac_n "(cached) $ac_c" 1>&6
78.1220 + else
78.1221 + cat > conftest.$ac_ext <<EOF
78.1222 +-#line 2856 "configure"
78.1223 ++#line 2969 "configure"
78.1224 + #include "confdefs.h"
78.1225 + #if defined(CRAY) && ! defined(CRAY2)
78.1226 + webecray
78.1227 +@@ -2877,12 +2990,12 @@
78.1228 + if test $ac_cv_os_cray = yes; then
78.1229 + for ac_func in _getb67 GETB67 getb67; do
78.1230 + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
78.1231 +-echo "configure:2881: checking for $ac_func" >&5
78.1232 ++echo "configure:2994: checking for $ac_func" >&5
78.1233 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
78.1234 + echo $ac_n "(cached) $ac_c" 1>&6
78.1235 + else
78.1236 + cat > conftest.$ac_ext <<EOF
78.1237 +-#line 2886 "configure"
78.1238 ++#line 2999 "configure"
78.1239 + #include "confdefs.h"
78.1240 + /* System header to define __stub macros and hopefully few prototypes,
78.1241 + which can conflict with char $ac_func(); below. */
78.1242 +@@ -2905,7 +3018,7 @@
78.1243 +
78.1244 + ; return 0; }
78.1245 + EOF
78.1246 +-if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1247 ++if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1248 + rm -rf conftest*
78.1249 + eval "ac_cv_func_$ac_func=yes"
78.1250 + else
78.1251 +@@ -2932,7 +3045,7 @@
78.1252 + fi
78.1253 +
78.1254 + echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
78.1255 +-echo "configure:2936: checking stack direction for C alloca" >&5
78.1256 ++echo "configure:3049: checking stack direction for C alloca" >&5
78.1257 + if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
78.1258 + echo $ac_n "(cached) $ac_c" 1>&6
78.1259 + else
78.1260 +@@ -2940,7 +3053,7 @@
78.1261 + ac_cv_c_stack_direction=0
78.1262 + else
78.1263 + cat > conftest.$ac_ext <<EOF
78.1264 +-#line 2944 "configure"
78.1265 ++#line 3057 "configure"
78.1266 + #include "confdefs.h"
78.1267 + find_stack_direction ()
78.1268 + {
78.1269 +@@ -2959,7 +3072,7 @@
78.1270 + exit (find_stack_direction() < 0);
78.1271 + }
78.1272 + EOF
78.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
78.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
78.1275 + then
78.1276 + ac_cv_c_stack_direction=1
78.1277 + else
78.1278 +@@ -2982,13 +3095,13 @@
78.1279 +
78.1280 +
78.1281 + echo $ac_n "checking size of short""... $ac_c" 1>&6
78.1282 +-echo "configure:2986: checking size of short" >&5
78.1283 ++echo "configure:3099: checking size of short" >&5
78.1284 + if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
78.1285 + echo $ac_n "(cached) $ac_c" 1>&6
78.1286 + else
78.1287 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1288 + cat > conftest.$ac_ext <<EOF
78.1289 +-#line 2992 "configure"
78.1290 ++#line 3105 "configure"
78.1291 + #include "confdefs.h"
78.1292 + #include "confdefs.h"
78.1293 + #include <sys/types.h>
78.1294 +@@ -2998,7 +3111,7 @@
78.1295 + switch (0) case 0: case (sizeof (short) == $ac_size):;
78.1296 + ; return 0; }
78.1297 + EOF
78.1298 +-if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1299 ++if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1300 + rm -rf conftest*
78.1301 + ac_cv_sizeof_short=$ac_size
78.1302 + else
78.1303 +@@ -3021,13 +3134,13 @@
78.1304 +
78.1305 +
78.1306 + echo $ac_n "checking size of int""... $ac_c" 1>&6
78.1307 +-echo "configure:3025: checking size of int" >&5
78.1308 ++echo "configure:3138: checking size of int" >&5
78.1309 + if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
78.1310 + echo $ac_n "(cached) $ac_c" 1>&6
78.1311 + else
78.1312 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1313 + cat > conftest.$ac_ext <<EOF
78.1314 +-#line 3031 "configure"
78.1315 ++#line 3144 "configure"
78.1316 + #include "confdefs.h"
78.1317 + #include "confdefs.h"
78.1318 + #include <sys/types.h>
78.1319 +@@ -3037,7 +3150,7 @@
78.1320 + switch (0) case 0: case (sizeof (int) == $ac_size):;
78.1321 + ; return 0; }
78.1322 + EOF
78.1323 +-if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1324 ++if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1325 + rm -rf conftest*
78.1326 + ac_cv_sizeof_int=$ac_size
78.1327 + else
78.1328 +@@ -3060,13 +3173,13 @@
78.1329 +
78.1330 +
78.1331 + echo $ac_n "checking size of long""... $ac_c" 1>&6
78.1332 +-echo "configure:3064: checking size of long" >&5
78.1333 ++echo "configure:3177: checking size of long" >&5
78.1334 + if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
78.1335 + echo $ac_n "(cached) $ac_c" 1>&6
78.1336 + else
78.1337 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1338 + cat > conftest.$ac_ext <<EOF
78.1339 +-#line 3070 "configure"
78.1340 ++#line 3183 "configure"
78.1341 + #include "confdefs.h"
78.1342 + #include "confdefs.h"
78.1343 + #include <sys/types.h>
78.1344 +@@ -3076,7 +3189,7 @@
78.1345 + switch (0) case 0: case (sizeof (long) == $ac_size):;
78.1346 + ; return 0; }
78.1347 + EOF
78.1348 +-if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1349 ++if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1350 + rm -rf conftest*
78.1351 + ac_cv_sizeof_long=$ac_size
78.1352 + else
78.1353 +@@ -3099,13 +3212,13 @@
78.1354 +
78.1355 +
78.1356 + echo $ac_n "checking size of long long""... $ac_c" 1>&6
78.1357 +-echo "configure:3103: checking size of long long" >&5
78.1358 ++echo "configure:3216: checking size of long long" >&5
78.1359 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
78.1360 + echo $ac_n "(cached) $ac_c" 1>&6
78.1361 + else
78.1362 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1363 + cat > conftest.$ac_ext <<EOF
78.1364 +-#line 3109 "configure"
78.1365 ++#line 3222 "configure"
78.1366 + #include "confdefs.h"
78.1367 + #include "confdefs.h"
78.1368 + #include <sys/types.h>
78.1369 +@@ -3115,7 +3228,7 @@
78.1370 + switch (0) case 0: case (sizeof (long long) == $ac_size):;
78.1371 + ; return 0; }
78.1372 + EOF
78.1373 +-if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1374 ++if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1375 + rm -rf conftest*
78.1376 + ac_cv_sizeof_long_long=$ac_size
78.1377 + else
78.1378 +@@ -3138,13 +3251,13 @@
78.1379 +
78.1380 +
78.1381 + echo $ac_n "checking size of float""... $ac_c" 1>&6
78.1382 +-echo "configure:3142: checking size of float" >&5
78.1383 ++echo "configure:3255: checking size of float" >&5
78.1384 + if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
78.1385 + echo $ac_n "(cached) $ac_c" 1>&6
78.1386 + else
78.1387 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1388 + cat > conftest.$ac_ext <<EOF
78.1389 +-#line 3148 "configure"
78.1390 ++#line 3261 "configure"
78.1391 + #include "confdefs.h"
78.1392 + #include "confdefs.h"
78.1393 + #include <sys/types.h>
78.1394 +@@ -3154,7 +3267,7 @@
78.1395 + switch (0) case 0: case (sizeof (float) == $ac_size):;
78.1396 + ; return 0; }
78.1397 + EOF
78.1398 +-if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1399 ++if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1400 + rm -rf conftest*
78.1401 + ac_cv_sizeof_float=$ac_size
78.1402 + else
78.1403 +@@ -3177,13 +3290,13 @@
78.1404 +
78.1405 +
78.1406 + echo $ac_n "checking size of double""... $ac_c" 1>&6
78.1407 +-echo "configure:3181: checking size of double" >&5
78.1408 ++echo "configure:3294: checking size of double" >&5
78.1409 + if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
78.1410 + echo $ac_n "(cached) $ac_c" 1>&6
78.1411 + else
78.1412 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1413 + cat > conftest.$ac_ext <<EOF
78.1414 +-#line 3187 "configure"
78.1415 ++#line 3300 "configure"
78.1416 + #include "confdefs.h"
78.1417 + #include "confdefs.h"
78.1418 + #include <sys/types.h>
78.1419 +@@ -3193,7 +3306,7 @@
78.1420 + switch (0) case 0: case (sizeof (double) == $ac_size):;
78.1421 + ; return 0; }
78.1422 + EOF
78.1423 +-if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1424 ++if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1425 + rm -rf conftest*
78.1426 + ac_cv_sizeof_double=$ac_size
78.1427 + else
78.1428 +@@ -3216,13 +3329,13 @@
78.1429 +
78.1430 +
78.1431 + echo $ac_n "checking size of long double""... $ac_c" 1>&6
78.1432 +-echo "configure:3220: checking size of long double" >&5
78.1433 ++echo "configure:3333: checking size of long double" >&5
78.1434 + if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
78.1435 + echo $ac_n "(cached) $ac_c" 1>&6
78.1436 + else
78.1437 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1438 + cat > conftest.$ac_ext <<EOF
78.1439 +-#line 3226 "configure"
78.1440 ++#line 3339 "configure"
78.1441 + #include "confdefs.h"
78.1442 + #include "confdefs.h"
78.1443 + #include <sys/types.h>
78.1444 +@@ -3232,7 +3345,7 @@
78.1445 + switch (0) case 0: case (sizeof (long double) == $ac_size):;
78.1446 + ; return 0; }
78.1447 + EOF
78.1448 +-if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1449 ++if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1450 + rm -rf conftest*
78.1451 + ac_cv_sizeof_long_double=$ac_size
78.1452 + else
78.1453 +@@ -3256,13 +3369,13 @@
78.1454 +
78.1455 +
78.1456 + echo $ac_n "checking size of void *""... $ac_c" 1>&6
78.1457 +-echo "configure:3260: checking size of void *" >&5
78.1458 ++echo "configure:3373: checking size of void *" >&5
78.1459 + if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
78.1460 + echo $ac_n "(cached) $ac_c" 1>&6
78.1461 + else
78.1462 + for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
78.1463 + cat > conftest.$ac_ext <<EOF
78.1464 +-#line 3266 "configure"
78.1465 ++#line 3379 "configure"
78.1466 + #include "confdefs.h"
78.1467 + #include "confdefs.h"
78.1468 + #include <sys/types.h>
78.1469 +@@ -3272,7 +3385,7 @@
78.1470 + switch (0) case 0: case (sizeof (void *) == $ac_size):;
78.1471 + ; return 0; }
78.1472 + EOF
78.1473 +-if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1474 ++if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1475 + rm -rf conftest*
78.1476 + ac_cv_sizeof_void_p=$ac_size
78.1477 + else
78.1478 +@@ -3295,14 +3408,14 @@
78.1479 +
78.1480 +
78.1481 + echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
78.1482 +-echo "configure:3299: checking whether byte ordering is bigendian" >&5
78.1483 ++echo "configure:3412: checking whether byte ordering is bigendian" >&5
78.1484 + if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
78.1485 + echo $ac_n "(cached) $ac_c" 1>&6
78.1486 + else
78.1487 + ac_cv_c_bigendian=unknown
78.1488 + # See if sys/param.h defines the BYTE_ORDER macro.
78.1489 + cat > conftest.$ac_ext <<EOF
78.1490 +-#line 3306 "configure"
78.1491 ++#line 3419 "configure"
78.1492 + #include "confdefs.h"
78.1493 + #include <sys/types.h>
78.1494 + #include <sys/param.h>
78.1495 +@@ -3313,11 +3426,11 @@
78.1496 + #endif
78.1497 + ; return 0; }
78.1498 + EOF
78.1499 +-if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1500 ++if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1501 + rm -rf conftest*
78.1502 + # It does; now see whether it defined to BIG_ENDIAN or not.
78.1503 + cat > conftest.$ac_ext <<EOF
78.1504 +-#line 3321 "configure"
78.1505 ++#line 3434 "configure"
78.1506 + #include "confdefs.h"
78.1507 + #include <sys/types.h>
78.1508 + #include <sys/param.h>
78.1509 +@@ -3328,7 +3441,7 @@
78.1510 + #endif
78.1511 + ; return 0; }
78.1512 + EOF
78.1513 +-if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1514 ++if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
78.1515 + rm -rf conftest*
78.1516 + ac_cv_c_bigendian=yes
78.1517 + else
78.1518 +@@ -3348,7 +3461,7 @@
78.1519 + echo $ac_n "cross-compiling... " 2>&6
78.1520 + else
78.1521 + cat > conftest.$ac_ext <<EOF
78.1522 +-#line 3352 "configure"
78.1523 ++#line 3465 "configure"
78.1524 + #include "confdefs.h"
78.1525 + main () {
78.1526 + /* Are we little or big endian? From Harbison&Steele. */
78.1527 +@@ -3361,7 +3474,7 @@
78.1528 + exit (u.c[sizeof (long) - 1] == 1);
78.1529 + }
78.1530 + EOF
78.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
78.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
78.1533 + then
78.1534 + ac_cv_c_bigendian=no
78.1535 + else
78.1536 +@@ -3379,7 +3492,7 @@
78.1537 + echo "$ac_t""$ac_cv_c_bigendian" 1>&6
78.1538 + if test $ac_cv_c_bigendian = unknown; then
78.1539 + echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
78.1540 +-echo "configure:3383: checking to probe for byte ordering" >&5
78.1541 ++echo "configure:3496: checking to probe for byte ordering" >&5
78.1542 +
78.1543 + cat >conftest.c <<EOF
78.1544 + short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
78.1545 +@@ -3414,6 +3527,10 @@
78.1546 + #define WORDS_BIGENDIAN 1
78.1547 + EOF
78.1548 +
78.1549 ++ cat >> confdefs.h <<\EOF
78.1550 ++#define HOST_WORDS_BIG_ENDIAN 1
78.1551 ++EOF
78.1552 ++
78.1553 + BYTEORDER=4321
78.1554 + else
78.1555 + BYTEORDER=1234
78.1556 +@@ -3429,7 +3546,7 @@
78.1557 +
78.1558 + if test x$TARGET = xSPARC; then
78.1559 + echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
78.1560 +-echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
78.1561 ++echo "configure:3550: checking assembler and linker support unaligned pc related relocs" >&5
78.1562 + if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
78.1563 + echo $ac_n "(cached) $ac_c" 1>&6
78.1564 + else
78.1565 +@@ -3439,14 +3556,14 @@
78.1566 + CFLAGS="$CFLAGS -fpic"
78.1567 + LDFLAGS="$LDFLAGS -shared"
78.1568 + cat > conftest.$ac_ext <<EOF
78.1569 +-#line 3443 "configure"
78.1570 ++#line 3560 "configure"
78.1571 + #include "confdefs.h"
78.1572 + asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
78.1573 + int main() {
78.1574 +
78.1575 + ; return 0; }
78.1576 + EOF
78.1577 +-if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1578 ++if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
78.1579 + rm -rf conftest*
78.1580 + libffi_cv_as_sparc_ua_pcrel=yes
78.1581 + else
78.1582 +@@ -3709,6 +3826,8 @@
78.1583 + s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
78.1584 + s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
78.1585 + s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
78.1586 ++s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
78.1587 ++s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
78.1588 + s%@SPARC_TRUE@%$SPARC_TRUE%g
78.1589 + s%@SPARC_FALSE@%$SPARC_FALSE%g
78.1590 + s%@X86_TRUE@%$X86_TRUE%g
78.1591 +@@ -3729,6 +3848,12 @@
78.1592 + s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
78.1593 + s%@ARM_TRUE@%$ARM_TRUE%g
78.1594 + s%@ARM_FALSE@%$ARM_FALSE%g
78.1595 ++s%@S390_TRUE@%$S390_TRUE%g
78.1596 ++s%@S390_FALSE@%$S390_FALSE%g
78.1597 ++s%@X86_64_TRUE@%$X86_64_TRUE%g
78.1598 ++s%@X86_64_FALSE@%$X86_64_FALSE%g
78.1599 ++s%@SH_TRUE@%$SH_TRUE%g
78.1600 ++s%@SH_FALSE@%$SH_FALSE%g
78.1601 + s%@CPP@%$CPP%g
78.1602 + s%@ALLOCA@%$ALLOCA%g
78.1603 + s%@TARGET@%$TARGET%g
78.1604 +@@ -3969,7 +4094,7 @@
78.1605 +
78.1606 + if test -n "$CONFIG_FILES"; then
78.1607 + LD="${ORIGINAL_LD_FOR_MULTILIBS}"
78.1608 +- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
78.1609 ++ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
78.1610 + fi
78.1611 +
78.1612 + exit 0
78.1613 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure.in gcc/libffi/configure.in
78.1614 +--- gcc-3.2.2.orig/libffi/configure.in Tue Jan 28 10:43:56 2003
78.1615 ++++ gcc/libffi/configure.in Sat Feb 1 20:16:19 2003
78.1616 +@@ -22,14 +22,15 @@
78.1617 +
78.1618 + if test "${srcdir}" = "."; then
78.1619 + if test "${with_target_subdir}" != "."; then
78.1620 +- libffi_basedir="${srcdir}/${with_multisrctop}.."
78.1621 ++ libffi_basedir="${with_multisrctop}../"
78.1622 + else
78.1623 +- libffi_basedir="${srcdir}/${with_multisrctop}"
78.1624 ++ libffi_basedir="${with_multisrctop}"
78.1625 + fi
78.1626 + else
78.1627 +- libffi_basedir="${srcdir}"
78.1628 ++ libffi_basedir=
78.1629 + fi
78.1630 + AC_SUBST(libffi_basedir)
78.1631 ++AC_CONFIG_AUX_DIR(${libffi_basedir}..)
78.1632 +
78.1633 + AC_CANONICAL_HOST
78.1634 +
78.1635 +@@ -56,17 +57,23 @@
78.1636 + i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
78.1637 + sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
78.1638 + sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
78.1639 +-sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
78.1640 +-sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
78.1641 +-alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
78.1642 ++sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
78.1643 ++sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
78.1644 ++alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
78.1645 + ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
78.1646 + m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
78.1647 ++mips64*-*);;
78.1648 ++mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
78.1649 + powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
78.1650 + powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
78.1651 + powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
78.1652 + powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
78.1653 + rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
78.1654 + arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
78.1655 ++s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
78.1656 ++s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
78.1657 ++x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
78.1658 ++sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
78.1659 + esac
78.1660 +
78.1661 + if test $TARGETDIR = unknown; then
78.1662 +@@ -75,6 +82,7 @@
78.1663 +
78.1664 + AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
78.1665 + AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
78.1666 ++AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
78.1667 + AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
78.1668 + AM_CONDITIONAL(X86, test x$TARGET = xX86)
78.1669 + AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
78.1670 +@@ -85,6 +93,13 @@
78.1671 + AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
78.1672 + AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
78.1673 + AM_CONDITIONAL(ARM, test x$TARGET = xARM)
78.1674 ++AM_CONDITIONAL(S390, test x$TARGET = xS390)
78.1675 ++AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
78.1676 ++AM_CONDITIONAL(SH, test x$TARGET = xSH)
78.1677 ++
78.1678 ++if test x$TARGET = xMIPS_LINUX; then
78.1679 ++ TARGET=MIPS
78.1680 ++fi
78.1681 +
78.1682 + AC_HEADER_STDC
78.1683 + AC_CHECK_FUNCS(memcpy)
78.1684 +@@ -171,7 +186,7 @@
78.1685 + [
78.1686 + if test -n "$CONFIG_FILES"; then
78.1687 + LD="${ORIGINAL_LD_FOR_MULTILIBS}"
78.1688 +- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
78.1689 ++ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
78.1690 + fi
78.1691 + ],
78.1692 + srcdir=${srcdir}
78.1693 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/Makefile.in gcc/libffi/include/Makefile.in
78.1694 +--- gcc-3.2.2.orig/libffi/include/Makefile.in Tue Oct 9 14:32:16 2001
78.1695 ++++ gcc/libffi/include/Makefile.in Mon Apr 29 13:14:44 2002
78.1696 +@@ -99,7 +99,7 @@
78.1697 +
78.1698 + DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
78.1699 +
78.1700 +-TAR = gnutar
78.1701 ++TAR = gtar
78.1702 + GZIP_ENV = --best
78.1703 + all: all-redirect
78.1704 + .SUFFIXES:
78.1705 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/ffi.h.in gcc/libffi/include/ffi.h.in
78.1706 +--- gcc-3.2.2.orig/libffi/include/ffi.h.in Wed Mar 13 07:35:56 2002
78.1707 ++++ gcc/libffi/include/ffi.h.in Wed Jan 29 00:54:28 2003
78.1708 +@@ -1,5 +1,5 @@
78.1709 + /* -----------------------------------------------------------------*-C-*-
78.1710 +- libffi @VERSION@ - Copyright (c) 1996-2002 Cygnus Solutions
78.1711 ++ libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions
78.1712 +
78.1713 + Permission is hereby granted, free of charge, to any person obtaining
78.1714 + a copy of this software and associated documentation files (the
78.1715 +@@ -164,6 +164,12 @@
78.1716 + #endif
78.1717 + #endif
78.1718 +
78.1719 ++#ifdef S390
78.1720 ++#if defined (__s390x__)
78.1721 ++#define S390X
78.1722 ++#endif
78.1723 ++#endif
78.1724 ++
78.1725 + #ifndef LIBFFI_ASM
78.1726 +
78.1727 + /* ---- Generic type definitions ----------------------------------------- */
78.1728 +@@ -189,16 +195,23 @@
78.1729 + #endif
78.1730 + #endif
78.1731 +
78.1732 +- /* ---- Intel x86 ---------------- */
78.1733 +-#ifdef X86
78.1734 ++ /* ---- Intel x86 Win32 ---------- */
78.1735 ++#ifdef X86_WIN32
78.1736 + FFI_SYSV,
78.1737 ++ FFI_STDCALL,
78.1738 ++ /* TODO: Add fastcall support for the sake of completeness */
78.1739 + FFI_DEFAULT_ABI = FFI_SYSV,
78.1740 + #endif
78.1741 +
78.1742 +- /* ---- Intel x86 Win32 ---------- */
78.1743 +-#ifdef X86_WIN32
78.1744 ++ /* ---- Intel x86 and AMD x86-64 - */
78.1745 ++#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
78.1746 + FFI_SYSV,
78.1747 ++ FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
78.1748 ++#ifdef __i386__
78.1749 + FFI_DEFAULT_ABI = FFI_SYSV,
78.1750 ++#else
78.1751 ++ FFI_DEFAULT_ABI = FFI_UNIX64,
78.1752 ++#endif
78.1753 + #endif
78.1754 +
78.1755 + /* ---- Intel ia64 ---------------- */
78.1756 +@@ -251,6 +264,18 @@
78.1757 + FFI_DEFAULT_ABI = FFI_SYSV,
78.1758 + #endif
78.1759 +
78.1760 ++ /* ---- S390 --------------------- */
78.1761 ++#ifdef S390
78.1762 ++ FFI_SYSV,
78.1763 ++ FFI_DEFAULT_ABI = FFI_SYSV,
78.1764 ++#endif
78.1765 ++
78.1766 ++ /* ---- SuperH ------------------- */
78.1767 ++#ifdef SH
78.1768 ++ FFI_SYSV,
78.1769 ++ FFI_DEFAULT_ABI = FFI_SYSV,
78.1770 ++#endif
78.1771 ++
78.1772 + /* Leave this for debugging purposes */
78.1773 + FFI_LAST_ABI
78.1774 +
78.1775 +@@ -264,7 +289,7 @@
78.1776 + /*@null@*/ struct _ffi_type **elements;
78.1777 + } ffi_type;
78.1778 +
78.1779 +-/* These are defined in ffi.c */
78.1780 ++/* These are defined in types.c */
78.1781 + extern ffi_type ffi_type_void;
78.1782 + extern ffi_type ffi_type_uint8;
78.1783 + extern ffi_type ffi_type_sint8;
78.1784 +@@ -373,13 +398,7 @@
78.1785 +
78.1786 + /* ---- Definitions for closures ----------------------------------------- */
78.1787 +
78.1788 +-#ifdef X86
78.1789 +-
78.1790 +-#define FFI_CLOSURES 1 /* x86 supports closures */
78.1791 +-#define FFI_TRAMPOLINE_SIZE 10
78.1792 +-#define FFI_NATIVE_RAW_API 1 /* and has native raw api support */
78.1793 +-
78.1794 +-#elif defined(X86_WIN32)
78.1795 ++#ifdef __i386__
78.1796 +
78.1797 + #define FFI_CLOSURES 1 /* x86 supports closures */
78.1798 + #define FFI_TRAMPOLINE_SIZE 10
78.1799 +@@ -424,6 +443,40 @@
78.1800 + #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */
78.1801 + #define FFI_NATIVE_RAW_API 0
78.1802 +
78.1803 ++#elif defined(SPARC64)
78.1804 ++
78.1805 ++#define FFI_CLOSURES 1
78.1806 ++#define FFI_TRAMPOLINE_SIZE 24
78.1807 ++#define FFI_NATIVE_RAW_API 0
78.1808 ++
78.1809 ++#elif defined(SPARC)
78.1810 ++
78.1811 ++#define FFI_CLOSURES 1
78.1812 ++#define FFI_TRAMPOLINE_SIZE 16
78.1813 ++#define FFI_NATIVE_RAW_API 0
78.1814 ++
78.1815 ++#elif defined(S390)
78.1816 ++
78.1817 ++#define FFI_CLOSURES 1
78.1818 ++#ifdef S390X
78.1819 ++#define FFI_TRAMPOLINE_SIZE 32
78.1820 ++#else
78.1821 ++#define FFI_TRAMPOLINE_SIZE 16
78.1822 ++#endif
78.1823 ++#define FFI_NATIVE_RAW_API 0
78.1824 ++
78.1825 ++#elif defined(SH)
78.1826 ++
78.1827 ++#define FFI_CLOSURES 1
78.1828 ++#define FFI_TRAMPOLINE_SIZE 16
78.1829 ++#define FFI_NATIVE_RAW_API 0
78.1830 ++
78.1831 ++#elif defined(__x86_64__)
78.1832 ++
78.1833 ++#define FFI_CLOSURES 1
78.1834 ++#define FFI_TRAMPOLINE_SIZE 24
78.1835 ++#define FFI_NATIVE_RAW_API 0
78.1836 ++
78.1837 + #else
78.1838 +
78.1839 + #define FFI_CLOSURES 0
78.1840 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/ffi.c gcc/libffi/src/arm/ffi.c
78.1841 +--- gcc-3.2.2.orig/libffi/src/arm/ffi.c Sat Mar 3 07:21:23 2001
78.1842 ++++ gcc/libffi/src/arm/ffi.c Fri Jul 19 08:08:30 2002
78.1843 +@@ -36,13 +36,10 @@
78.1844 + /*@=exportheader@*/
78.1845 + {
78.1846 + register unsigned int i;
78.1847 +- register int tmp;
78.1848 +- register unsigned int avn;
78.1849 + register void **p_argv;
78.1850 + register char *argp;
78.1851 + register ffi_type **p_arg;
78.1852 +
78.1853 +- tmp = 0;
78.1854 + argp = stack;
78.1855 +
78.1856 + if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
78.1857 +@@ -50,11 +47,10 @@
78.1858 + argp += 4;
78.1859 + }
78.1860 +
78.1861 +- avn = ecif->cif->nargs;
78.1862 + p_argv = ecif->avalue;
78.1863 +
78.1864 + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
78.1865 +- (i != 0) && (avn != 0);
78.1866 ++ (i != 0);
78.1867 + i--, p_arg++)
78.1868 + {
78.1869 + size_t z;
78.1870 +@@ -64,9 +60,6 @@
78.1871 + argp = (char *) ALIGN(argp, (*p_arg)->alignment);
78.1872 + }
78.1873 +
78.1874 +- if (avn != 0)
78.1875 +- {
78.1876 +- avn--;
78.1877 + z = (*p_arg)->size;
78.1878 + if (z < sizeof(int))
78.1879 + {
78.1880 +@@ -107,7 +100,6 @@
78.1881 + }
78.1882 + p_argv++;
78.1883 + argp += z;
78.1884 +- }
78.1885 + }
78.1886 +
78.1887 + return;
78.1888 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/sysv.S gcc/libffi/src/arm/sysv.S
78.1889 +--- gcc-3.2.2.orig/libffi/src/arm/sysv.S Sat Mar 3 07:21:23 2001
78.1890 ++++ gcc/libffi/src/arm/sysv.S Mon Sep 30 03:08:58 2002
78.1891 +@@ -28,8 +28,15 @@
78.1892 + #ifdef HAVE_MACHINE_ASM_H
78.1893 + #include <machine/asm.h>
78.1894 + #else
78.1895 +-/* XXX these lose for some platforms, I'm sure. */
78.1896 ++#ifdef __USER_LABEL_PREFIX__
78.1897 ++#define CONCAT1(a, b) CONCAT2(a, b)
78.1898 ++#define CONCAT2(a, b) a ## b
78.1899 ++
78.1900 ++/* Use the right prefix for global labels. */
78.1901 ++#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
78.1902 ++#else
78.1903 + #define CNAME(x) x
78.1904 ++#endif
78.1905 + #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
78.1906 + #endif
78.1907 +
78.1908 +@@ -96,12 +103,20 @@
78.1909 +
78.1910 + # return FLOAT
78.1911 + cmp a4, #FFI_TYPE_FLOAT
78.1912 ++#ifdef __SOFTFP__
78.1913 ++ streq a1, [a3]
78.1914 ++#else
78.1915 + stfeqs f0, [a3]
78.1916 ++#endif
78.1917 + beq epilogue
78.1918 +
78.1919 + # return DOUBLE or LONGDOUBLE
78.1920 + cmp a4, #FFI_TYPE_DOUBLE
78.1921 ++#ifdef __SOFTFP__
78.1922 ++ stmeqia a3, {a1, a2}
78.1923 ++#else
78.1924 + stfeqd f0, [a3]
78.1925 ++#endif
78.1926 +
78.1927 + epilogue:
78.1928 + ldmfd sp!, {a1-a4, fp, pc}
78.1929 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/java_raw_api.c gcc/libffi/src/java_raw_api.c
78.1930 +--- gcc-3.2.2.orig/libffi/src/java_raw_api.c Tue Apr 9 07:31:14 2002
78.1931 ++++ gcc/libffi/src/java_raw_api.c Tue Oct 8 23:55:02 2002
78.1932 +@@ -81,21 +81,14 @@
78.1933 + {
78.1934 + case FFI_TYPE_UINT8:
78.1935 + case FFI_TYPE_SINT8:
78.1936 +- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);
78.1937 ++ *args = (void*) ((char*)(raw++) + 3);
78.1938 + break;
78.1939 +
78.1940 + case FFI_TYPE_UINT16:
78.1941 + case FFI_TYPE_SINT16:
78.1942 +- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2);
78.1943 ++ *args = (void*) ((char*)(raw++) + 2);
78.1944 + break;
78.1945 +
78.1946 +-#if SIZEOF_ARG >= 4
78.1947 +- case FFI_TYPE_UINT32:
78.1948 +- case FFI_TYPE_SINT32:
78.1949 +- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4);
78.1950 +- break;
78.1951 +-#endif
78.1952 +-
78.1953 + #if SIZEOF_ARG == 8
78.1954 + case FFI_TYPE_UINT64:
78.1955 + case FFI_TYPE_SINT64:
78.1956 +@@ -157,31 +150,54 @@
78.1957 + switch ((*tp)->type)
78.1958 + {
78.1959 + case FFI_TYPE_UINT8:
78.1960 ++#if WORDS_BIGENDIAN
78.1961 ++ *(UINT32*)(raw++) = *(UINT8*) (*args);
78.1962 ++#else
78.1963 + (raw++)->uint = *(UINT8*) (*args);
78.1964 ++#endif
78.1965 + break;
78.1966 +
78.1967 + case FFI_TYPE_SINT8:
78.1968 ++#if WORDS_BIGENDIAN
78.1969 ++ *(SINT32*)(raw++) = *(SINT8*) (*args);
78.1970 ++#else
78.1971 + (raw++)->sint = *(SINT8*) (*args);
78.1972 ++#endif
78.1973 + break;
78.1974 +
78.1975 + case FFI_TYPE_UINT16:
78.1976 ++#if WORDS_BIGENDIAN
78.1977 ++ *(UINT32*)(raw++) = *(UINT16*) (*args);
78.1978 ++#else
78.1979 + (raw++)->uint = *(UINT16*) (*args);
78.1980 ++#endif
78.1981 + break;
78.1982 +
78.1983 + case FFI_TYPE_SINT16:
78.1984 ++#if WORDS_BIGENDIAN
78.1985 ++ *(SINT32*)(raw++) = *(SINT16*) (*args);
78.1986 ++#else
78.1987 + (raw++)->sint = *(SINT16*) (*args);
78.1988 ++#endif
78.1989 + break;
78.1990 +
78.1991 +-#if SIZEOF_ARG >= 4
78.1992 + case FFI_TYPE_UINT32:
78.1993 ++#if WORDS_BIGENDIAN
78.1994 ++ *(UINT32*)(raw++) = *(UINT32*) (*args);
78.1995 ++#else
78.1996 + (raw++)->uint = *(UINT32*) (*args);
78.1997 ++#endif
78.1998 + break;
78.1999 +
78.2000 + case FFI_TYPE_SINT32:
78.2001 ++#if WORDS_BIGENDIAN
78.2002 ++ *(SINT32*)(raw++) = *(SINT32*) (*args);
78.2003 ++#else
78.2004 + (raw++)->sint = *(SINT32*) (*args);
78.2005 +- break;
78.2006 + #endif
78.2007 +- case FFI_TYPE_FLOAT:
78.2008 ++ break;
78.2009 ++
78.2010 ++ case FFI_TYPE_FLOAT:
78.2011 + (raw++)->flt = *(FLOAT32*) (*args);
78.2012 + break;
78.2013 +
78.2014 +@@ -211,6 +227,55 @@
78.2015 +
78.2016 + #if !FFI_NATIVE_RAW_API
78.2017 +
78.2018 ++static void
78.2019 ++ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
78.2020 ++{
78.2021 ++#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
78.2022 ++ switch (cif->rtype->type)
78.2023 ++ {
78.2024 ++ case FFI_TYPE_UINT8:
78.2025 ++ case FFI_TYPE_UINT16:
78.2026 ++ case FFI_TYPE_UINT32:
78.2027 ++ *(UINT64 *)rvalue <<= 32;
78.2028 ++ break;
78.2029 ++
78.2030 ++ case FFI_TYPE_SINT8:
78.2031 ++ case FFI_TYPE_SINT16:
78.2032 ++ case FFI_TYPE_SINT32:
78.2033 ++ case FFI_TYPE_INT:
78.2034 ++ *(SINT64 *)rvalue <<= 32;
78.2035 ++ break;
78.2036 ++
78.2037 ++ default:
78.2038 ++ break;
78.2039 ++ }
78.2040 ++#endif
78.2041 ++}
78.2042 ++
78.2043 ++static void
78.2044 ++ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
78.2045 ++{
78.2046 ++#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
78.2047 ++ switch (cif->rtype->type)
78.2048 ++ {
78.2049 ++ case FFI_TYPE_UINT8:
78.2050 ++ case FFI_TYPE_UINT16:
78.2051 ++ case FFI_TYPE_UINT32:
78.2052 ++ *(UINT64 *)rvalue >>= 32;
78.2053 ++ break;
78.2054 ++
78.2055 ++ case FFI_TYPE_SINT8:
78.2056 ++ case FFI_TYPE_SINT16:
78.2057 ++ case FFI_TYPE_SINT32:
78.2058 ++ case FFI_TYPE_INT:
78.2059 ++ *(SINT64 *)rvalue >>= 32;
78.2060 ++ break;
78.2061 ++
78.2062 ++ default:
78.2063 ++ break;
78.2064 ++ }
78.2065 ++#endif
78.2066 ++}
78.2067 +
78.2068 + /* This is a generic definition of ffi_raw_call, to be used if the
78.2069 + * native system does not provide a machine-specific implementation.
78.2070 +@@ -227,6 +292,7 @@
78.2071 + void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
78.2072 + ffi_java_raw_to_ptrarray (cif, raw, avalue);
78.2073 + ffi_call (cif, fn, rvalue, avalue);
78.2074 ++ ffi_java_rvalue_to_raw (cif, rvalue);
78.2075 + }
78.2076 +
78.2077 + #if FFI_CLOSURES /* base system provides closures */
78.2078 +@@ -240,6 +306,7 @@
78.2079 +
78.2080 + ffi_java_ptrarray_to_raw (cif, avalue, raw);
78.2081 + (*cl->fun) (cif, rvalue, raw, cl->user_data);
78.2082 ++ ffi_java_raw_to_rvalue (cif, rvalue);
78.2083 + }
78.2084 +
78.2085 + /* Again, here is the generic version of ffi_prep_raw_closure, which
78.2086 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/m68k/ffi.c gcc/libffi/src/m68k/ffi.c
78.2087 +--- gcc-3.2.2.orig/libffi/src/m68k/ffi.c Sun Aug 8 22:27:19 1999
78.2088 ++++ gcc/libffi/src/m68k/ffi.c Fri Jul 19 08:08:30 2002
78.2089 +@@ -16,14 +16,11 @@
78.2090 + ffi_prep_args (void *stack, extended_cif *ecif)
78.2091 + {
78.2092 + unsigned int i;
78.2093 +- int tmp;
78.2094 +- unsigned int avn;
78.2095 + void **p_argv;
78.2096 + char *argp;
78.2097 + ffi_type **p_arg;
78.2098 + void *struct_value_ptr;
78.2099 +
78.2100 +- tmp = 0;
78.2101 + argp = stack;
78.2102 +
78.2103 + if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
78.2104 +@@ -32,11 +29,10 @@
78.2105 + else
78.2106 + struct_value_ptr = NULL;
78.2107 +
78.2108 +- avn = ecif->cif->nargs;
78.2109 + p_argv = ecif->avalue;
78.2110 +
78.2111 + for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
78.2112 +- i != 0 && avn != 0;
78.2113 ++ i != 0;
78.2114 + i--, p_arg++)
78.2115 + {
78.2116 + size_t z;
78.2117 +@@ -45,9 +41,6 @@
78.2118 + if (((*p_arg)->alignment - 1) & (unsigned) argp)
78.2119 + argp = (char *) ALIGN (argp, (*p_arg)->alignment);
78.2120 +
78.2121 +- if (avn != 0)
78.2122 +- {
78.2123 +- avn--;
78.2124 + z = (*p_arg)->size;
78.2125 + if (z < sizeof (int))
78.2126 + {
78.2127 +@@ -82,7 +75,6 @@
78.2128 + memcpy (argp, *p_argv, z);
78.2129 + p_argv++;
78.2130 + argp += z;
78.2131 +- }
78.2132 + }
78.2133 +
78.2134 + return struct_value_ptr;
78.2135 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/mips/ffi.c gcc/libffi/src/mips/ffi.c
78.2136 +--- gcc-3.2.2.orig/libffi/src/mips/ffi.c Sat Mar 3 07:21:23 2001
78.2137 ++++ gcc/libffi/src/mips/ffi.c Fri Jul 19 08:08:31 2002
78.2138 +@@ -23,6 +23,7 @@
78.2139 + OTHER DEALINGS IN THE SOFTWARE.
78.2140 + ----------------------------------------------------------------------- */
78.2141 +
78.2142 ++#include <sgidefs.h>
78.2143 + #include <ffi.h>
78.2144 + #include <ffi_common.h>
78.2145 +
78.2146 +@@ -50,7 +51,6 @@
78.2147 + int flags)
78.2148 + {
78.2149 + register int i;
78.2150 +- register int avn;
78.2151 + register void **p_argv;
78.2152 + register char *argp;
78.2153 + register ffi_type **p_arg;
78.2154 +@@ -80,12 +80,9 @@
78.2155 + FIX_ARGP;
78.2156 + }
78.2157 +
78.2158 +- avn = ecif->cif->nargs;
78.2159 + p_argv = ecif->avalue;
78.2160 +
78.2161 +- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
78.2162 +- i && avn;
78.2163 +- i--, p_arg++)
78.2164 ++ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
78.2165 + {
78.2166 + size_t z;
78.2167 +
78.2168 +@@ -101,9 +98,6 @@
78.2169 + #define OFFSET sizeof(int)
78.2170 + #endif
78.2171 +
78.2172 +- if (avn)
78.2173 +- {
78.2174 +- avn--;
78.2175 + z = (*p_arg)->size;
78.2176 + if (z < sizeof(SLOT_TYPE_UNSIGNED))
78.2177 + {
78.2178 +@@ -179,7 +173,6 @@
78.2179 + p_argv++;
78.2180 + argp += z;
78.2181 + FIX_ARGP;
78.2182 +- }
78.2183 + }
78.2184 +
78.2185 + return;
78.2186 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/powerpc/darwin.S gcc/libffi/src/powerpc/darwin.S
78.2187 +--- gcc-3.2.2.orig/libffi/src/powerpc/darwin.S Sat Jan 19 01:22:34 2002
78.2188 ++++ gcc/libffi/src/powerpc/darwin.S Thu Jan 23 03:21:55 2003
78.2189 +@@ -3,8 +3,6 @@
78.2190 +
78.2191 + PowerPC Assembly glue.
78.2192 +
78.2193 +- $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $
78.2194 +-
78.2195 + Permission is hereby granted, free of charge, to any person obtaining
78.2196 + a copy of this software and associated documentation files (the
78.2197 + ``Software''), to deal in the Software without restriction, including
78.2198 +@@ -39,30 +37,34 @@
78.2199 + .text
78.2200 + .align 2
78.2201 + _ffi_call_DARWIN:
78.2202 +- mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
78.2203 ++LFB0:
78.2204 ++ mr r12,r8 /* We only need r12 until the call,
78.2205 ++ so it doesn't have to be saved... */
78.2206 ++LFB1:
78.2207 + /* Save the old stack pointer as AP. */
78.2208 + mr r8,r1
78.2209 +-
78.2210 ++LCFI0:
78.2211 + /* Allocate the stack space we need. */
78.2212 + stwux r1,r1,r4
78.2213 +
78.2214 + /* Save registers we use. */
78.2215 + mflr r9
78.2216 +
78.2217 +- stw r28,-16(r8)
78.2218 ++ stw r28,-16(r8)
78.2219 + stw r29,-12(r8)
78.2220 + stw r30, -8(r8)
78.2221 + stw r31, -4(r8)
78.2222 +-
78.2223 +- stw r9, 8(r8)
78.2224 ++
78.2225 ++ stw r9, 8(r8)
78.2226 + stw r2, 20(r1)
78.2227 ++LCFI1:
78.2228 +
78.2229 + /* Save arguments over call... */
78.2230 +- mr r31,r5 /* flags, */
78.2231 +- mr r30,r6 /* rvalue, */
78.2232 +- mr r29,r7 /* function address, */
78.2233 +- mr r28,r8 /* our AP. */
78.2234 +-
78.2235 ++ mr r31,r5 /* flags, */
78.2236 ++ mr r30,r6 /* rvalue, */
78.2237 ++ mr r29,r7 /* function address, */
78.2238 ++ mr r28,r8 /* our AP. */
78.2239 ++LCFI2:
78.2240 + /* Call ffi_prep_args. */
78.2241 + mr r4,r1
78.2242 + li r9,0
78.2243 +@@ -145,7 +147,8 @@
78.2244 + L(float_return_value):
78.2245 + stfs f1,0(r30)
78.2246 + b L(done_return_value)
78.2247 +-//END(_ffi_call_DARWIN)
78.2248 ++LFE1:
78.2249 ++/* END(_ffi_call_DARWIN) */
78.2250 +
78.2251 + /* Provide a null definition of _ffi_call_AIX. */
78.2252 + .text
78.2253 +@@ -155,5 +158,61 @@
78.2254 + .align 2
78.2255 + _ffi_call_AIX:
78.2256 + blr
78.2257 +-//END(_ffi_call_AIX)
78.2258 ++/* END(_ffi_call_AIX) */
78.2259 +
78.2260 ++.data
78.2261 ++.section __TEXT,__eh_frame
78.2262 ++Lframe1:
78.2263 ++ .set L$set$0,LECIE1-LSCIE1
78.2264 ++ .long L$set$0 ; Length of Common Information Entry
78.2265 ++LSCIE1:
78.2266 ++ .long 0x0 ; CIE Identifier Tag
78.2267 ++ .byte 0x1 ; CIE Version
78.2268 ++ .ascii "zR\0" ; CIE Augmentation
78.2269 ++ .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor
78.2270 ++ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor
78.2271 ++ .byte 0x41 ; CIE RA Column
78.2272 ++ .byte 0x1 ; uleb128 0x1; Augmentation size
78.2273 ++ .byte 0x10 ; FDE Encoding (pcrel)
78.2274 ++ .byte 0xc ; DW_CFA_def_cfa
78.2275 ++ .byte 0x1 ; uleb128 0x1
78.2276 ++ .byte 0x0 ; uleb128 0x0
78.2277 ++ .align 2
78.2278 ++LECIE1:
78.2279 ++LSFDE1:
78.2280 ++ .set L$set$1,LEFDE1-LASFDE1
78.2281 ++ .long L$set$1 ; FDE Length
78.2282 ++LASFDE1:
78.2283 ++ .set L$set$2,LASFDE1-Lframe1
78.2284 ++ .long L$set$2 ; FDE CIE offset
78.2285 ++ .long LFB0-. ; FDE initial location
78.2286 ++ .set L$set$3,LFE1-LFB0
78.2287 ++ .long L$set$3 ; FDE address range
78.2288 ++ .byte 0x0 ; uleb128 0x0; Augmentation size
78.2289 ++ .byte 0x4 ; DW_CFA_advance_loc4
78.2290 ++ .set L$set$4,LCFI0-LFB1
78.2291 ++ .long L$set$4
78.2292 ++ .byte 0xd ; DW_CFA_def_cfa_register
78.2293 ++ .byte 0x08 ; uleb128 0x08
78.2294 ++ .byte 0x4 ; DW_CFA_advance_loc4
78.2295 ++ .set L$set$5,LCFI1-LCFI0
78.2296 ++ .long L$set$5
78.2297 ++ .byte 0x11 ; DW_CFA_offset_extended_sf
78.2298 ++ .byte 0x41 ; uleb128 0x41
78.2299 ++ .byte 0x7e ; sleb128 -2
78.2300 ++ .byte 0x9f ; DW_CFA_offset, column 0x1f
78.2301 ++ .byte 0x1 ; uleb128 0x1
78.2302 ++ .byte 0x9e ; DW_CFA_offset, column 0x1e
78.2303 ++ .byte 0x2 ; uleb128 0x2
78.2304 ++ .byte 0x9d ; DW_CFA_offset, column 0x1d
78.2305 ++ .byte 0x3 ; uleb128 0x3
78.2306 ++ .byte 0x9c ; DW_CFA_offset, column 0x1c
78.2307 ++ .byte 0x4 ; uleb128 0x4
78.2308 ++ .byte 0x4 ; DW_CFA_advance_loc4
78.2309 ++ .set L$set$6,LCFI2-LCFI1
78.2310 ++ .long L$set$6
78.2311 ++ .byte 0xd ; DW_CFA_def_cfa_register
78.2312 ++ .byte 0x1c ; uleb128 0x1c
78.2313 ++ .align 2
78.2314 ++LEFDE1:
78.2315 ++
78.2316 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/prep_cif.c gcc/libffi/src/prep_cif.c
78.2317 +--- gcc-3.2.2.orig/libffi/src/prep_cif.c Sat Mar 3 07:21:22 2001
78.2318 ++++ gcc/libffi/src/prep_cif.c Mon Sep 30 20:59:42 2002
78.2319 +@@ -103,7 +103,8 @@
78.2320 + /* Perform a sanity check on the return type */
78.2321 + FFI_ASSERT(ffi_type_test(cif->rtype));
78.2322 +
78.2323 +-#ifndef M68K
78.2324 ++ /* x86-64 and s390 stack space allocation is handled in prep_machdep. */
78.2325 ++#if !defined M68K && !defined __x86_64__ && !defined S390
78.2326 + /* Make space for the return structure pointer */
78.2327 + if (cif->rtype->type == FFI_TYPE_STRUCT
78.2328 + #ifdef SPARC
78.2329 +@@ -122,6 +123,7 @@
78.2330 + if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
78.2331 + return FFI_BAD_TYPEDEF;
78.2332 +
78.2333 ++#if !defined __x86_64__ && !defined S390
78.2334 + #ifdef SPARC
78.2335 + if (((*ptr)->type == FFI_TYPE_STRUCT
78.2336 + && ((*ptr)->size > 16 || cif->abi != FFI_V9))
78.2337 +@@ -137,6 +139,7 @@
78.2338 +
78.2339 + bytes += STACK_ARG_SIZE((*ptr)->size);
78.2340 + }
78.2341 ++#endif
78.2342 + }
78.2343 +
78.2344 + cif->bytes = bytes;
78.2345 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/ffi.c gcc/libffi/src/s390/ffi.c
78.2346 +--- gcc-3.2.2.orig/libffi/src/s390/ffi.c Thu Jan 1 09:00:00 1970
78.2347 ++++ gcc/libffi/src/s390/ffi.c Thu Feb 6 08:58:57 2003
78.2348 +@@ -0,0 +1,753 @@
78.2349 ++/* -----------------------------------------------------------------------
78.2350 ++ ffi.c - Copyright (c) 2000 Software AG
78.2351 ++
78.2352 ++ S390 Foreign Function Interface
78.2353 ++
78.2354 ++ Permission is hereby granted, free of charge, to any person obtaining
78.2355 ++ a copy of this software and associated documentation files (the
78.2356 ++ ``Software''), to deal in the Software without restriction, including
78.2357 ++ without limitation the rights to use, copy, modify, merge, publish,
78.2358 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.2359 ++ permit persons to whom the Software is furnished to do so, subject to
78.2360 ++ the following conditions:
78.2361 ++
78.2362 ++ The above copyright notice and this permission notice shall be included
78.2363 ++ in all copies or substantial portions of the Software.
78.2364 ++
78.2365 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.2366 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.2367 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.2368 ++ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.2369 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.2370 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.2371 ++ OTHER DEALINGS IN THE SOFTWARE.
78.2372 ++ ----------------------------------------------------------------------- */
78.2373 ++/*====================================================================*/
78.2374 ++/* Includes */
78.2375 ++/* -------- */
78.2376 ++/*====================================================================*/
78.2377 ++
78.2378 ++#include <ffi.h>
78.2379 ++#include <ffi_common.h>
78.2380 ++
78.2381 ++#include <stdlib.h>
78.2382 ++#include <stdio.h>
78.2383 ++
78.2384 ++/*====================== End of Includes =============================*/
78.2385 ++
78.2386 ++/*====================================================================*/
78.2387 ++/* Defines */
78.2388 ++/* ------- */
78.2389 ++/*====================================================================*/
78.2390 ++
78.2391 ++/* Maximum number of GPRs available for argument passing. */
78.2392 ++#define MAX_GPRARGS 5
78.2393 ++
78.2394 ++/* Maximum number of FPRs available for argument passing. */
78.2395 ++#ifdef __s390x__
78.2396 ++#define MAX_FPRARGS 4
78.2397 ++#else
78.2398 ++#define MAX_FPRARGS 2
78.2399 ++#endif
78.2400 ++
78.2401 ++/* Round to multiple of 16. */
78.2402 ++#define ROUND_SIZE(size) (((size) + 15) & ~15)
78.2403 ++
78.2404 ++/* If these values change, sysv.S must be adapted! */
78.2405 ++#define FFI390_RET_VOID 0
78.2406 ++#define FFI390_RET_STRUCT 1
78.2407 ++#define FFI390_RET_FLOAT 2
78.2408 ++#define FFI390_RET_DOUBLE 3
78.2409 ++#define FFI390_RET_INT32 4
78.2410 ++#define FFI390_RET_INT64 5
78.2411 ++
78.2412 ++/*===================== End of Defines ===============================*/
78.2413 ++
78.2414 ++/*====================================================================*/
78.2415 ++/* Prototypes */
78.2416 ++/* ---------- */
78.2417 ++/*====================================================================*/
78.2418 ++
78.2419 ++static void ffi_prep_args (unsigned char *, extended_cif *);
78.2420 ++static int ffi_check_float_struct (ffi_type *);
78.2421 ++void
78.2422 ++#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
78.2423 ++__attribute__ ((visibility ("hidden")))
78.2424 ++#endif
78.2425 ++ffi_closure_helper_SYSV (ffi_closure *, unsigned long *,
78.2426 ++ unsigned long long *, unsigned long *);
78.2427 ++
78.2428 ++/*====================== End of Prototypes ===========================*/
78.2429 ++
78.2430 ++/*====================================================================*/
78.2431 ++/* Externals */
78.2432 ++/* --------- */
78.2433 ++/*====================================================================*/
78.2434 ++
78.2435 ++extern void ffi_call_SYSV(unsigned,
78.2436 ++ extended_cif *,
78.2437 ++ void (*)(unsigned char *, extended_cif *),
78.2438 ++ unsigned,
78.2439 ++ void *,
78.2440 ++ void (*fn)());
78.2441 ++
78.2442 ++extern void ffi_closure_SYSV(void);
78.2443 ++
78.2444 ++/*====================== End of Externals ============================*/
78.2445 ++
78.2446 ++/*====================================================================*/
78.2447 ++/* */
78.2448 ++/* Name - ffi_check_struct_type. */
78.2449 ++/* */
78.2450 ++/* Function - Determine if a structure can be passed within a */
78.2451 ++/* general purpose or floating point register. */
78.2452 ++/* */
78.2453 ++/*====================================================================*/
78.2454 ++
78.2455 ++static int
78.2456 ++ffi_check_struct_type (ffi_type *arg)
78.2457 ++{
78.2458 ++ size_t size = arg->size;
78.2459 ++
78.2460 ++ /* If the struct has just one element, look at that element
78.2461 ++ to find out whether to consider the struct as floating point. */
78.2462 ++ while (arg->type == FFI_TYPE_STRUCT
78.2463 ++ && arg->elements[0] && !arg->elements[1])
78.2464 ++ arg = arg->elements[0];
78.2465 ++
78.2466 ++ /* Structs of size 1, 2, 4, and 8 are passed in registers,
78.2467 ++ just like the corresponding int/float types. */
78.2468 ++ switch (size)
78.2469 ++ {
78.2470 ++ case 1:
78.2471 ++ return FFI_TYPE_UINT8;
78.2472 ++
78.2473 ++ case 2:
78.2474 ++ return FFI_TYPE_UINT16;
78.2475 ++
78.2476 ++ case 4:
78.2477 ++ if (arg->type == FFI_TYPE_FLOAT)
78.2478 ++ return FFI_TYPE_FLOAT;
78.2479 ++ else
78.2480 ++ return FFI_TYPE_UINT32;
78.2481 ++
78.2482 ++ case 8:
78.2483 ++ if (arg->type == FFI_TYPE_DOUBLE)
78.2484 ++ return FFI_TYPE_DOUBLE;
78.2485 ++ else
78.2486 ++ return FFI_TYPE_UINT64;
78.2487 ++
78.2488 ++ default:
78.2489 ++ break;
78.2490 ++ }
78.2491 ++
78.2492 ++ /* Other structs are passed via a pointer to the data. */
78.2493 ++ return FFI_TYPE_POINTER;
78.2494 ++}
78.2495 ++
78.2496 ++/*======================== End of Routine ============================*/
78.2497 ++
78.2498 ++/*====================================================================*/
78.2499 ++/* */
78.2500 ++/* Name - ffi_prep_args. */
78.2501 ++/* */
78.2502 ++/* Function - Prepare parameters for call to function. */
78.2503 ++/* */
78.2504 ++/* ffi_prep_args is called by the assembly routine once stack space */
78.2505 ++/* has been allocated for the function's arguments. */
78.2506 ++/* */
78.2507 ++/*====================================================================*/
78.2508 ++
78.2509 ++static void
78.2510 ++ffi_prep_args (unsigned char *stack, extended_cif *ecif)
78.2511 ++{
78.2512 ++ /* The stack space will be filled with those areas:
78.2513 ++
78.2514 ++ FPR argument register save area (highest addresses)
78.2515 ++ GPR argument register save area
78.2516 ++ temporary struct copies
78.2517 ++ overflow argument area (lowest addresses)
78.2518 ++
78.2519 ++ We set up the following pointers:
78.2520 ++
78.2521 ++ p_fpr: bottom of the FPR area (growing upwards)
78.2522 ++ p_gpr: bottom of the GPR area (growing upwards)
78.2523 ++ p_ov: bottom of the overflow area (growing upwards)
78.2524 ++ p_struct: top of the struct copy area (growing downwards)
78.2525 ++
78.2526 ++ All areas are kept aligned to twice the word size. */
78.2527 ++
78.2528 ++ int gpr_off = ecif->cif->bytes;
78.2529 ++ int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long));
78.2530 ++
78.2531 ++ unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off);
78.2532 ++ unsigned long *p_gpr = (unsigned long *)(stack + gpr_off);
78.2533 ++ unsigned char *p_struct = (unsigned char *)p_gpr;
78.2534 ++ unsigned long *p_ov = (unsigned long *)stack;
78.2535 ++
78.2536 ++ int n_fpr = 0;
78.2537 ++ int n_gpr = 0;
78.2538 ++ int n_ov = 0;
78.2539 ++
78.2540 ++ ffi_type **ptr;
78.2541 ++ void **p_argv = ecif->avalue;
78.2542 ++ int i;
78.2543 ++
78.2544 ++ /* If we returning a structure then we set the first parameter register
78.2545 ++ to the address of where we are returning this structure. */
78.2546 ++
78.2547 ++ if (ecif->cif->flags == FFI390_RET_STRUCT)
78.2548 ++ p_gpr[n_gpr++] = (unsigned long) ecif->rvalue;
78.2549 ++
78.2550 ++ /* Now for the arguments. */
78.2551 ++
78.2552 ++ for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs;
78.2553 ++ i > 0;
78.2554 ++ i--, ptr++, p_argv++)
78.2555 ++ {
78.2556 ++ void *arg = *p_argv;
78.2557 ++ int type = (*ptr)->type;
78.2558 ++
78.2559 ++ /* Check how a structure type is passed. */
78.2560 ++ if (type == FFI_TYPE_STRUCT)
78.2561 ++ {
78.2562 ++ type = ffi_check_struct_type (*ptr);
78.2563 ++
78.2564 ++ /* If we pass the struct via pointer, copy the data. */
78.2565 ++ if (type == FFI_TYPE_POINTER)
78.2566 ++ {
78.2567 ++ p_struct -= ROUND_SIZE ((*ptr)->size);
78.2568 ++ memcpy (p_struct, (char *)arg, (*ptr)->size);
78.2569 ++ arg = &p_struct;
78.2570 ++ }
78.2571 ++ }
78.2572 ++
78.2573 ++ /* Pointers are passed like UINTs of the same size. */
78.2574 ++ if (type == FFI_TYPE_POINTER)
78.2575 ++#ifdef __s390x__
78.2576 ++ type = FFI_TYPE_UINT64;
78.2577 ++#else
78.2578 ++ type = FFI_TYPE_UINT32;
78.2579 ++#endif
78.2580 ++
78.2581 ++ /* Now handle all primitive int/float data types. */
78.2582 ++ switch (type)
78.2583 ++ {
78.2584 ++ case FFI_TYPE_DOUBLE:
78.2585 ++ if (n_fpr < MAX_FPRARGS)
78.2586 ++ p_fpr[n_fpr++] = *(unsigned long long *) arg;
78.2587 ++ else
78.2588 ++#ifdef __s390x__
78.2589 ++ p_ov[n_ov++] = *(unsigned long *) arg;
78.2590 ++#else
78.2591 ++ p_ov[n_ov++] = ((unsigned long *) arg)[0],
78.2592 ++ p_ov[n_ov++] = ((unsigned long *) arg)[1];
78.2593 ++#endif
78.2594 ++ break;
78.2595 ++
78.2596 ++ case FFI_TYPE_FLOAT:
78.2597 ++ if (n_fpr < MAX_FPRARGS)
78.2598 ++ p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32;
78.2599 ++ else
78.2600 ++ p_ov[n_ov++] = *(unsigned int *) arg;
78.2601 ++ break;
78.2602 ++
78.2603 ++ case FFI_TYPE_UINT64:
78.2604 ++ case FFI_TYPE_SINT64:
78.2605 ++#ifdef __s390x__
78.2606 ++ if (n_gpr < MAX_GPRARGS)
78.2607 ++ p_gpr[n_gpr++] = *(unsigned long *) arg;
78.2608 ++ else
78.2609 ++ p_ov[n_ov++] = *(unsigned long *) arg;
78.2610 ++#else
78.2611 ++ if (n_gpr == MAX_GPRARGS-1)
78.2612 ++ n_gpr = MAX_GPRARGS;
78.2613 ++ if (n_gpr < MAX_GPRARGS)
78.2614 ++ p_gpr[n_gpr++] = ((unsigned long *) arg)[0],
78.2615 ++ p_gpr[n_gpr++] = ((unsigned long *) arg)[1];
78.2616 ++ else
78.2617 ++ p_ov[n_ov++] = ((unsigned long *) arg)[0],
78.2618 ++ p_ov[n_ov++] = ((unsigned long *) arg)[1];
78.2619 ++#endif
78.2620 ++ break;
78.2621 ++
78.2622 ++ case FFI_TYPE_UINT32:
78.2623 ++ if (n_gpr < MAX_GPRARGS)
78.2624 ++ p_gpr[n_gpr++] = *(unsigned int *) arg;
78.2625 ++ else
78.2626 ++ p_ov[n_ov++] = *(unsigned int *) arg;
78.2627 ++ break;
78.2628 ++
78.2629 ++ case FFI_TYPE_INT:
78.2630 ++ case FFI_TYPE_SINT32:
78.2631 ++ if (n_gpr < MAX_GPRARGS)
78.2632 ++ p_gpr[n_gpr++] = *(signed int *) arg;
78.2633 ++ else
78.2634 ++ p_ov[n_ov++] = *(signed int *) arg;
78.2635 ++ break;
78.2636 ++
78.2637 ++ case FFI_TYPE_UINT16:
78.2638 ++ if (n_gpr < MAX_GPRARGS)
78.2639 ++ p_gpr[n_gpr++] = *(unsigned short *) arg;
78.2640 ++ else
78.2641 ++ p_ov[n_ov++] = *(unsigned short *) arg;
78.2642 ++ break;
78.2643 ++
78.2644 ++ case FFI_TYPE_SINT16:
78.2645 ++ if (n_gpr < MAX_GPRARGS)
78.2646 ++ p_gpr[n_gpr++] = *(signed short *) arg;
78.2647 ++ else
78.2648 ++ p_ov[n_ov++] = *(signed short *) arg;
78.2649 ++ break;
78.2650 ++
78.2651 ++ case FFI_TYPE_UINT8:
78.2652 ++ if (n_gpr < MAX_GPRARGS)
78.2653 ++ p_gpr[n_gpr++] = *(unsigned char *) arg;
78.2654 ++ else
78.2655 ++ p_ov[n_ov++] = *(unsigned char *) arg;
78.2656 ++ break;
78.2657 ++
78.2658 ++ case FFI_TYPE_SINT8:
78.2659 ++ if (n_gpr < MAX_GPRARGS)
78.2660 ++ p_gpr[n_gpr++] = *(signed char *) arg;
78.2661 ++ else
78.2662 ++ p_ov[n_ov++] = *(signed char *) arg;
78.2663 ++ break;
78.2664 ++
78.2665 ++ default:
78.2666 ++ FFI_ASSERT (0);
78.2667 ++ break;
78.2668 ++ }
78.2669 ++ }
78.2670 ++}
78.2671 ++
78.2672 ++/*======================== End of Routine ============================*/
78.2673 ++
78.2674 ++/*====================================================================*/
78.2675 ++/* */
78.2676 ++/* Name - ffi_prep_cif_machdep. */
78.2677 ++/* */
78.2678 ++/* Function - Perform machine dependent CIF processing. */
78.2679 ++/* */
78.2680 ++/*====================================================================*/
78.2681 ++
78.2682 ++ffi_status
78.2683 ++ffi_prep_cif_machdep(ffi_cif *cif)
78.2684 ++{
78.2685 ++ size_t struct_size = 0;
78.2686 ++ int n_gpr = 0;
78.2687 ++ int n_fpr = 0;
78.2688 ++ int n_ov = 0;
78.2689 ++
78.2690 ++ ffi_type **ptr;
78.2691 ++ int i;
78.2692 ++
78.2693 ++ /* Determine return value handling. */
78.2694 ++
78.2695 ++ switch (cif->rtype->type)
78.2696 ++ {
78.2697 ++ /* Void is easy. */
78.2698 ++ case FFI_TYPE_VOID:
78.2699 ++ cif->flags = FFI390_RET_VOID;
78.2700 ++ break;
78.2701 ++
78.2702 ++ /* Structures are returned via a hidden pointer. */
78.2703 ++ case FFI_TYPE_STRUCT:
78.2704 ++ cif->flags = FFI390_RET_STRUCT;
78.2705 ++ n_gpr++; /* We need one GPR to pass the pointer. */
78.2706 ++ break;
78.2707 ++
78.2708 ++ /* Floating point values are returned in fpr 0. */
78.2709 ++ case FFI_TYPE_FLOAT:
78.2710 ++ cif->flags = FFI390_RET_FLOAT;
78.2711 ++ break;
78.2712 ++
78.2713 ++ case FFI_TYPE_DOUBLE:
78.2714 ++ cif->flags = FFI390_RET_DOUBLE;
78.2715 ++ break;
78.2716 ++
78.2717 ++ /* Integer values are returned in gpr 2 (and gpr 3
78.2718 ++ for 64-bit values on 31-bit machines). */
78.2719 ++ case FFI_TYPE_UINT64:
78.2720 ++ case FFI_TYPE_SINT64:
78.2721 ++ cif->flags = FFI390_RET_INT64;
78.2722 ++ break;
78.2723 ++
78.2724 ++ case FFI_TYPE_POINTER:
78.2725 ++ case FFI_TYPE_INT:
78.2726 ++ case FFI_TYPE_UINT32:
78.2727 ++ case FFI_TYPE_SINT32:
78.2728 ++ case FFI_TYPE_UINT16:
78.2729 ++ case FFI_TYPE_SINT16:
78.2730 ++ case FFI_TYPE_UINT8:
78.2731 ++ case FFI_TYPE_SINT8:
78.2732 ++ /* These are to be extended to word size. */
78.2733 ++#ifdef __s390x__
78.2734 ++ cif->flags = FFI390_RET_INT64;
78.2735 ++#else
78.2736 ++ cif->flags = FFI390_RET_INT32;
78.2737 ++#endif
78.2738 ++ break;
78.2739 ++
78.2740 ++ default:
78.2741 ++ FFI_ASSERT (0);
78.2742 ++ break;
78.2743 ++ }
78.2744 ++
78.2745 ++ /* Now for the arguments. */
78.2746 ++
78.2747 ++ for (ptr = cif->arg_types, i = cif->nargs;
78.2748 ++ i > 0;
78.2749 ++ i--, ptr++)
78.2750 ++ {
78.2751 ++ int type = (*ptr)->type;
78.2752 ++
78.2753 ++ /* Check how a structure type is passed. */
78.2754 ++ if (type == FFI_TYPE_STRUCT)
78.2755 ++ {
78.2756 ++ type = ffi_check_struct_type (*ptr);
78.2757 ++
78.2758 ++ /* If we pass the struct via pointer, we must reserve space
78.2759 ++ to copy its data for proper call-by-value semantics. */
78.2760 ++ if (type == FFI_TYPE_POINTER)
78.2761 ++ struct_size += ROUND_SIZE ((*ptr)->size);
78.2762 ++ }
78.2763 ++
78.2764 ++ /* Now handle all primitive int/float data types. */
78.2765 ++ switch (type)
78.2766 ++ {
78.2767 ++ /* The first MAX_FPRARGS floating point arguments
78.2768 ++ go in FPRs, the rest overflow to the stack. */
78.2769 ++
78.2770 ++ case FFI_TYPE_DOUBLE:
78.2771 ++ if (n_fpr < MAX_FPRARGS)
78.2772 ++ n_fpr++;
78.2773 ++ else
78.2774 ++ n_ov += sizeof (double) / sizeof (long);
78.2775 ++ break;
78.2776 ++
78.2777 ++ case FFI_TYPE_FLOAT:
78.2778 ++ if (n_fpr < MAX_FPRARGS)
78.2779 ++ n_fpr++;
78.2780 ++ else
78.2781 ++ n_ov++;
78.2782 ++ break;
78.2783 ++
78.2784 ++ /* On 31-bit machines, 64-bit integers are passed in GPR pairs,
78.2785 ++ if one is still available, or else on the stack. If only one
78.2786 ++ register is free, skip the register (it won't be used for any
78.2787 ++ subsequent argument either). */
78.2788 ++
78.2789 ++#ifndef __s390x__
78.2790 ++ case FFI_TYPE_UINT64:
78.2791 ++ case FFI_TYPE_SINT64:
78.2792 ++ if (n_gpr == MAX_GPRARGS-1)
78.2793 ++ n_gpr = MAX_GPRARGS;
78.2794 ++ if (n_gpr < MAX_GPRARGS)
78.2795 ++ n_gpr += 2;
78.2796 ++ else
78.2797 ++ n_ov += 2;
78.2798 ++ break;
78.2799 ++#endif
78.2800 ++
78.2801 ++ /* Everything else is passed in GPRs (until MAX_GPRARGS
78.2802 ++ have been used) or overflows to the stack. */
78.2803 ++
78.2804 ++ default:
78.2805 ++ if (n_gpr < MAX_GPRARGS)
78.2806 ++ n_gpr++;
78.2807 ++ else
78.2808 ++ n_ov++;
78.2809 ++ break;
78.2810 ++ }
78.2811 ++ }
78.2812 ++
78.2813 ++ /* Total stack space as required for overflow arguments
78.2814 ++ and temporary structure copies. */
78.2815 ++
78.2816 ++ cif->bytes = ROUND_SIZE (n_ov * sizeof (long)) + struct_size;
78.2817 ++
78.2818 ++ return FFI_OK;
78.2819 ++}
78.2820 ++
78.2821 ++/*======================== End of Routine ============================*/
78.2822 ++
78.2823 ++/*====================================================================*/
78.2824 ++/* */
78.2825 ++/* Name - ffi_call. */
78.2826 ++/* */
78.2827 ++/* Function - Call the FFI routine. */
78.2828 ++/* */
78.2829 ++/*====================================================================*/
78.2830 ++
78.2831 ++void
78.2832 ++ffi_call(ffi_cif *cif,
78.2833 ++ void (*fn)(),
78.2834 ++ void *rvalue,
78.2835 ++ void **avalue)
78.2836 ++{
78.2837 ++ int ret_type = cif->flags;
78.2838 ++ extended_cif ecif;
78.2839 ++
78.2840 ++ ecif.cif = cif;
78.2841 ++ ecif.avalue = avalue;
78.2842 ++ ecif.rvalue = rvalue;
78.2843 ++
78.2844 ++ /* If we don't have a return value, we need to fake one. */
78.2845 ++ if (rvalue == NULL)
78.2846 ++ {
78.2847 ++ if (ret_type == FFI390_RET_STRUCT)
78.2848 ++ ecif.rvalue = alloca (cif->rtype->size);
78.2849 ++ else
78.2850 ++ ret_type = FFI390_RET_VOID;
78.2851 ++ }
78.2852 ++
78.2853 ++ switch (cif->abi)
78.2854 ++ {
78.2855 ++ case FFI_SYSV:
78.2856 ++ ffi_call_SYSV (cif->bytes, &ecif, ffi_prep_args,
78.2857 ++ ret_type, ecif.rvalue, fn);
78.2858 ++ break;
78.2859 ++
78.2860 ++ default:
78.2861 ++ FFI_ASSERT (0);
78.2862 ++ break;
78.2863 ++ }
78.2864 ++}
78.2865 ++
78.2866 ++/*======================== End of Routine ============================*/
78.2867 ++
78.2868 ++/*====================================================================*/
78.2869 ++/* */
78.2870 ++/* Name - ffi_closure_helper_SYSV. */
78.2871 ++/* */
78.2872 ++/* Function - Call a FFI closure target function. */
78.2873 ++/* */
78.2874 ++/*====================================================================*/
78.2875 ++
78.2876 ++void
78.2877 ++ffi_closure_helper_SYSV (ffi_closure *closure,
78.2878 ++ unsigned long *p_gpr,
78.2879 ++ unsigned long long *p_fpr,
78.2880 ++ unsigned long *p_ov)
78.2881 ++{
78.2882 ++ unsigned long long ret_buffer;
78.2883 ++
78.2884 ++ void *rvalue = &ret_buffer;
78.2885 ++ void **avalue;
78.2886 ++ void **p_arg;
78.2887 ++
78.2888 ++ int n_gpr = 0;
78.2889 ++ int n_fpr = 0;
78.2890 ++ int n_ov = 0;
78.2891 ++
78.2892 ++ ffi_type **ptr;
78.2893 ++ int i;
78.2894 ++
78.2895 ++ /* Allocate buffer for argument list pointers. */
78.2896 ++
78.2897 ++ p_arg = avalue = alloca (closure->cif->nargs * sizeof (void *));
78.2898 ++
78.2899 ++ /* If we returning a structure, pass the structure address
78.2900 ++ directly to the target function. Otherwise, have the target
78.2901 ++ function store the return value to the GPR save area. */
78.2902 ++
78.2903 ++ if (closure->cif->flags == FFI390_RET_STRUCT)
78.2904 ++ rvalue = (void *) p_gpr[n_gpr++];
78.2905 ++
78.2906 ++ /* Now for the arguments. */
78.2907 ++
78.2908 ++ for (ptr = closure->cif->arg_types, i = closure->cif->nargs;
78.2909 ++ i > 0;
78.2910 ++ i--, p_arg++, ptr++)
78.2911 ++ {
78.2912 ++ int deref_struct_pointer = 0;
78.2913 ++ int type = (*ptr)->type;
78.2914 ++
78.2915 ++ /* Check how a structure type is passed. */
78.2916 ++ if (type == FFI_TYPE_STRUCT)
78.2917 ++ {
78.2918 ++ type = ffi_check_struct_type (*ptr);
78.2919 ++
78.2920 ++ /* If we pass the struct via pointer, remember to
78.2921 ++ retrieve the pointer later. */
78.2922 ++ if (type == FFI_TYPE_POINTER)
78.2923 ++ deref_struct_pointer = 1;
78.2924 ++ }
78.2925 ++
78.2926 ++ /* Pointers are passed like UINTs of the same size. */
78.2927 ++ if (type == FFI_TYPE_POINTER)
78.2928 ++#ifdef __s390x__
78.2929 ++ type = FFI_TYPE_UINT64;
78.2930 ++#else
78.2931 ++ type = FFI_TYPE_UINT32;
78.2932 ++#endif
78.2933 ++
78.2934 ++ /* Now handle all primitive int/float data types. */
78.2935 ++ switch (type)
78.2936 ++ {
78.2937 ++ case FFI_TYPE_DOUBLE:
78.2938 ++ if (n_fpr < MAX_FPRARGS)
78.2939 ++ *p_arg = &p_fpr[n_fpr++];
78.2940 ++ else
78.2941 ++ *p_arg = &p_ov[n_ov],
78.2942 ++ n_ov += sizeof (double) / sizeof (long);
78.2943 ++ break;
78.2944 ++
78.2945 ++ case FFI_TYPE_FLOAT:
78.2946 ++ if (n_fpr < MAX_FPRARGS)
78.2947 ++ *p_arg = &p_fpr[n_fpr++];
78.2948 ++ else
78.2949 ++ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
78.2950 ++ break;
78.2951 ++
78.2952 ++ case FFI_TYPE_UINT64:
78.2953 ++ case FFI_TYPE_SINT64:
78.2954 ++#ifdef __s390x__
78.2955 ++ if (n_gpr < MAX_GPRARGS)
78.2956 ++ *p_arg = &p_gpr[n_gpr++];
78.2957 ++ else
78.2958 ++ *p_arg = &p_ov[n_ov++];
78.2959 ++#else
78.2960 ++ if (n_gpr == MAX_GPRARGS-1)
78.2961 ++ n_gpr = MAX_GPRARGS;
78.2962 ++ if (n_gpr < MAX_GPRARGS)
78.2963 ++ *p_arg = &p_gpr[n_gpr], n_gpr += 2;
78.2964 ++ else
78.2965 ++ *p_arg = &p_ov[n_ov], n_ov += 2;
78.2966 ++#endif
78.2967 ++ break;
78.2968 ++
78.2969 ++ case FFI_TYPE_INT:
78.2970 ++ case FFI_TYPE_UINT32:
78.2971 ++ case FFI_TYPE_SINT32:
78.2972 ++ if (n_gpr < MAX_GPRARGS)
78.2973 ++ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 4;
78.2974 ++ else
78.2975 ++ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
78.2976 ++ break;
78.2977 ++
78.2978 ++ case FFI_TYPE_UINT16:
78.2979 ++ case FFI_TYPE_SINT16:
78.2980 ++ if (n_gpr < MAX_GPRARGS)
78.2981 ++ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 2;
78.2982 ++ else
78.2983 ++ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 2;
78.2984 ++ break;
78.2985 ++
78.2986 ++ case FFI_TYPE_UINT8:
78.2987 ++ case FFI_TYPE_SINT8:
78.2988 ++ if (n_gpr < MAX_GPRARGS)
78.2989 ++ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 1;
78.2990 ++ else
78.2991 ++ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 1;
78.2992 ++ break;
78.2993 ++
78.2994 ++ default:
78.2995 ++ FFI_ASSERT (0);
78.2996 ++ break;
78.2997 ++ }
78.2998 ++
78.2999 ++ /* If this is a struct passed via pointer, we need to
78.3000 ++ actually retrieve that pointer. */
78.3001 ++ if (deref_struct_pointer)
78.3002 ++ *p_arg = *(void **)*p_arg;
78.3003 ++ }
78.3004 ++
78.3005 ++
78.3006 ++ /* Call the target function. */
78.3007 ++ (closure->fun) (closure->cif, rvalue, avalue, closure->user_data);
78.3008 ++
78.3009 ++ /* Convert the return value. */
78.3010 ++ switch (closure->cif->rtype->type)
78.3011 ++ {
78.3012 ++ /* Void is easy, and so is struct. */
78.3013 ++ case FFI_TYPE_VOID:
78.3014 ++ case FFI_TYPE_STRUCT:
78.3015 ++ break;
78.3016 ++
78.3017 ++ /* Floating point values are returned in fpr 0. */
78.3018 ++ case FFI_TYPE_FLOAT:
78.3019 ++ p_fpr[0] = (long long) *(unsigned int *) rvalue << 32;
78.3020 ++ break;
78.3021 ++
78.3022 ++ case FFI_TYPE_DOUBLE:
78.3023 ++ p_fpr[0] = *(unsigned long long *) rvalue;
78.3024 ++ break;
78.3025 ++
78.3026 ++ /* Integer values are returned in gpr 2 (and gpr 3
78.3027 ++ for 64-bit values on 31-bit machines). */
78.3028 ++ case FFI_TYPE_UINT64:
78.3029 ++ case FFI_TYPE_SINT64:
78.3030 ++#ifdef __s390x__
78.3031 ++ p_gpr[0] = *(unsigned long *) rvalue;
78.3032 ++#else
78.3033 ++ p_gpr[0] = ((unsigned long *) rvalue)[0],
78.3034 ++ p_gpr[1] = ((unsigned long *) rvalue)[1];
78.3035 ++#endif
78.3036 ++ break;
78.3037 ++
78.3038 ++ case FFI_TYPE_POINTER:
78.3039 ++ case FFI_TYPE_UINT32:
78.3040 ++ case FFI_TYPE_UINT16:
78.3041 ++ case FFI_TYPE_UINT8:
78.3042 ++ p_gpr[0] = *(unsigned long *) rvalue;
78.3043 ++ break;
78.3044 ++
78.3045 ++ case FFI_TYPE_INT:
78.3046 ++ case FFI_TYPE_SINT32:
78.3047 ++ case FFI_TYPE_SINT16:
78.3048 ++ case FFI_TYPE_SINT8:
78.3049 ++ p_gpr[0] = *(signed long *) rvalue;
78.3050 ++ break;
78.3051 ++
78.3052 ++ default:
78.3053 ++ FFI_ASSERT (0);
78.3054 ++ break;
78.3055 ++ }
78.3056 ++}
78.3057 ++
78.3058 ++/*======================== End of Routine ============================*/
78.3059 ++
78.3060 ++/*====================================================================*/
78.3061 ++/* */
78.3062 ++/* Name - ffi_prep_closure. */
78.3063 ++/* */
78.3064 ++/* Function - Prepare a FFI closure. */
78.3065 ++/* */
78.3066 ++/*====================================================================*/
78.3067 ++
78.3068 ++ffi_status
78.3069 ++ffi_prep_closure (ffi_closure *closure,
78.3070 ++ ffi_cif *cif,
78.3071 ++ void (*fun) (ffi_cif *, void *, void **, void *),
78.3072 ++ void *user_data)
78.3073 ++{
78.3074 ++ FFI_ASSERT (cif->abi == FFI_SYSV);
78.3075 ++
78.3076 ++#ifndef __s390x__
78.3077 ++ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
78.3078 ++ *(short *)&closure->tramp [2] = 0x9801; /* lm %r0,%r1,6(%r1) */
78.3079 ++ *(short *)&closure->tramp [4] = 0x1006;
78.3080 ++ *(short *)&closure->tramp [6] = 0x07f1; /* br %r1 */
78.3081 ++ *(long *)&closure->tramp [8] = (long)closure;
78.3082 ++ *(long *)&closure->tramp[12] = (long)&ffi_closure_SYSV;
78.3083 ++#else
78.3084 ++ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
78.3085 ++ *(short *)&closure->tramp [2] = 0xeb01; /* lmg %r0,%r1,14(%r1) */
78.3086 ++ *(short *)&closure->tramp [4] = 0x100e;
78.3087 ++ *(short *)&closure->tramp [6] = 0x0004;
78.3088 ++ *(short *)&closure->tramp [8] = 0x07f1; /* br %r1 */
78.3089 ++ *(long *)&closure->tramp[16] = (long)closure;
78.3090 ++ *(long *)&closure->tramp[24] = (long)&ffi_closure_SYSV;
78.3091 ++#endif
78.3092 ++
78.3093 ++ closure->cif = cif;
78.3094 ++ closure->user_data = user_data;
78.3095 ++ closure->fun = fun;
78.3096 ++
78.3097 ++ return FFI_OK;
78.3098 ++}
78.3099 ++
78.3100 ++/*======================== End of Routine ============================*/
78.3101 ++
78.3102 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/sysv.S gcc/libffi/src/s390/sysv.S
78.3103 +--- gcc-3.2.2.orig/libffi/src/s390/sysv.S Thu Jan 1 09:00:00 1970
78.3104 ++++ gcc/libffi/src/s390/sysv.S Thu Nov 28 01:44:35 2002
78.3105 +@@ -0,0 +1,425 @@
78.3106 ++/* -----------------------------------------------------------------------
78.3107 ++ sysv.S - Copyright (c) 2000 Software AG
78.3108 ++
78.3109 ++ S390 Foreign Function Interface
78.3110 ++
78.3111 ++ Permission is hereby granted, free of charge, to any person obtaining
78.3112 ++ a copy of this software and associated documentation files (the
78.3113 ++ ``Software''), to deal in the Software without restriction, including
78.3114 ++ without limitation the rights to use, copy, modify, merge, publish,
78.3115 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.3116 ++ permit persons to whom the Software is furnished to do so, subject to
78.3117 ++ the following conditions:
78.3118 ++
78.3119 ++ The above copyright notice and this permission notice shall be included
78.3120 ++ in all copies or substantial portions of the Software.
78.3121 ++
78.3122 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.3123 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.3124 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.3125 ++ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.3126 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.3127 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.3128 ++ OTHER DEALINGS IN THE SOFTWARE.
78.3129 ++ ----------------------------------------------------------------------- */
78.3130 ++
78.3131 ++#ifndef __s390x__
78.3132 ++
78.3133 ++.text
78.3134 ++
78.3135 ++ # r2: cif->bytes
78.3136 ++ # r3: &ecif
78.3137 ++ # r4: ffi_prep_args
78.3138 ++ # r5: ret_type
78.3139 ++ # r6: ecif.rvalue
78.3140 ++ # ov: fn
78.3141 ++
78.3142 ++ # This assumes we are using gas.
78.3143 ++ .globl ffi_call_SYSV
78.3144 ++ .type ffi_call_SYSV,%function
78.3145 ++ffi_call_SYSV:
78.3146 ++.LFB1:
78.3147 ++ stm %r6,%r15,24(%r15) # Save registers
78.3148 ++.LCFI0:
78.3149 ++ basr %r13,0 # Set up base register
78.3150 ++.Lbase:
78.3151 ++ lr %r11,%r15 # Set up frame pointer
78.3152 ++.LCFI1:
78.3153 ++ sr %r15,%r2
78.3154 ++ ahi %r15,-96-48 # Allocate stack
78.3155 ++ lr %r8,%r6 # Save ecif.rvalue
78.3156 ++ sr %r9,%r9
78.3157 ++ ic %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
78.3158 ++ l %r7,96(%r11) # Load function address
78.3159 ++ st %r11,0(%r15) # Set up back chain
78.3160 ++ ahi %r11,-48 # Register save area
78.3161 ++.LCFI2:
78.3162 ++
78.3163 ++ la %r2,96(%r15) # Save area
78.3164 ++ # r3 already holds &ecif
78.3165 ++ basr %r14,%r4 # Call ffi_prep_args
78.3166 ++
78.3167 ++ lm %r2,%r6,0(%r11) # Load arguments
78.3168 ++ ld %f0,32(%r11)
78.3169 ++ ld %f2,40(%r11)
78.3170 ++ la %r14,0(%r13,%r9) # Set return address
78.3171 ++ br %r7 # ... and call function
78.3172 ++
78.3173 ++.LretNone: # Return void
78.3174 ++ l %r4,48+56(%r11)
78.3175 ++ lm %r6,%r15,48+24(%r11)
78.3176 ++ br %r4
78.3177 ++
78.3178 ++.LretFloat:
78.3179 ++ l %r4,48+56(%r11)
78.3180 ++ ste %f0,0(%r8) # Return float
78.3181 ++ lm %r6,%r15,48+24(%r11)
78.3182 ++ br %r4
78.3183 ++
78.3184 ++.LretDouble:
78.3185 ++ l %r4,48+56(%r11)
78.3186 ++ std %f0,0(%r8) # Return double
78.3187 ++ lm %r6,%r15,48+24(%r11)
78.3188 ++ br %r4
78.3189 ++
78.3190 ++.LretInt32:
78.3191 ++ l %r4,48+56(%r11)
78.3192 ++ st %r2,0(%r8) # Return int
78.3193 ++ lm %r6,%r15,48+24(%r11)
78.3194 ++ br %r4
78.3195 ++
78.3196 ++.LretInt64:
78.3197 ++ l %r4,48+56(%r11)
78.3198 ++ stm %r2,%r3,0(%r8) # Return long long
78.3199 ++ lm %r6,%r15,48+24(%r11)
78.3200 ++ br %r4
78.3201 ++
78.3202 ++.Ltable:
78.3203 ++ .byte .LretNone-.Lbase # FFI390_RET_VOID
78.3204 ++ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
78.3205 ++ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
78.3206 ++ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
78.3207 ++ .byte .LretInt32-.Lbase # FFI390_RET_INT32
78.3208 ++ .byte .LretInt64-.Lbase # FFI390_RET_INT64
78.3209 ++
78.3210 ++.LFE1:
78.3211 ++.ffi_call_SYSV_end:
78.3212 ++ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
78.3213 ++
78.3214 ++
78.3215 ++ .globl ffi_closure_SYSV
78.3216 ++ .type ffi_closure_SYSV,%function
78.3217 ++ffi_closure_SYSV:
78.3218 ++.LFB2:
78.3219 ++ stm %r12,%r15,48(%r15) # Save registers
78.3220 ++.LCFI10:
78.3221 ++ basr %r13,0 # Set up base register
78.3222 ++.Lcbase:
78.3223 ++ stm %r2,%r6,8(%r15) # Save arguments
78.3224 ++ std %f0,64(%r15)
78.3225 ++ std %f2,72(%r15)
78.3226 ++ lr %r1,%r15 # Set up stack frame
78.3227 ++ ahi %r15,-96
78.3228 ++.LCFI11:
78.3229 ++ l %r12,.Lchelper-.Lcbase(%r13) # Get helper function
78.3230 ++ lr %r2,%r0 # Closure
78.3231 ++ la %r3,8(%r1) # GPRs
78.3232 ++ la %r4,64(%r1) # FPRs
78.3233 ++ la %r5,96(%r1) # Overflow
78.3234 ++ st %r1,0(%r15) # Set up back chain
78.3235 ++
78.3236 ++ bas %r14,0(%r12,%r13) # Call helper
78.3237 ++
78.3238 ++ l %r4,96+56(%r15)
78.3239 ++ ld %f0,96+64(%r15) # Load return registers
78.3240 ++ lm %r2,%r3,96+8(%r15)
78.3241 ++ lm %r12,%r15,96+48(%r15)
78.3242 ++ br %r4
78.3243 ++
78.3244 ++ .align 4
78.3245 ++.Lchelper:
78.3246 ++ .long ffi_closure_helper_SYSV-.Lcbase
78.3247 ++
78.3248 ++.LFE2:
78.3249 ++
78.3250 ++.ffi_closure_SYSV_end:
78.3251 ++ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
78.3252 ++
78.3253 ++
78.3254 ++ .section .eh_frame,"a",@progbits
78.3255 ++.Lframe1:
78.3256 ++ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
78.3257 ++.LSCIE1:
78.3258 ++ .4byte 0x0 # CIE Identifier Tag
78.3259 ++ .byte 0x1 # CIE Version
78.3260 ++ .ascii "zR\0" # CIE Augmentation
78.3261 ++ .uleb128 0x1 # CIE Code Alignment Factor
78.3262 ++ .sleb128 -4 # CIE Data Alignment Factor
78.3263 ++ .byte 0xe # CIE RA Column
78.3264 ++ .uleb128 0x1 # Augmentation size
78.3265 ++ .byte 0x1b # FDE Encoding (pcrel sdata4)
78.3266 ++ .byte 0xc # DW_CFA_def_cfa
78.3267 ++ .uleb128 0xf
78.3268 ++ .uleb128 0x60
78.3269 ++ .align 4
78.3270 ++.LECIE1:
78.3271 ++.LSFDE1:
78.3272 ++ .4byte .LEFDE1-.LASFDE1 # FDE Length
78.3273 ++.LASFDE1:
78.3274 ++ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
78.3275 ++ .4byte .LFB1-. # FDE initial location
78.3276 ++ .4byte .LFE1-.LFB1 # FDE address range
78.3277 ++ .uleb128 0x0 # Augmentation size
78.3278 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3279 ++ .4byte .LCFI0-.LFB1
78.3280 ++ .byte 0x8f # DW_CFA_offset, column 0xf
78.3281 ++ .uleb128 0x9
78.3282 ++ .byte 0x8e # DW_CFA_offset, column 0xe
78.3283 ++ .uleb128 0xa
78.3284 ++ .byte 0x8d # DW_CFA_offset, column 0xd
78.3285 ++ .uleb128 0xb
78.3286 ++ .byte 0x8c # DW_CFA_offset, column 0xc
78.3287 ++ .uleb128 0xc
78.3288 ++ .byte 0x8b # DW_CFA_offset, column 0xb
78.3289 ++ .uleb128 0xd
78.3290 ++ .byte 0x8a # DW_CFA_offset, column 0xa
78.3291 ++ .uleb128 0xe
78.3292 ++ .byte 0x89 # DW_CFA_offset, column 0x9
78.3293 ++ .uleb128 0xf
78.3294 ++ .byte 0x88 # DW_CFA_offset, column 0x8
78.3295 ++ .uleb128 0x10
78.3296 ++ .byte 0x87 # DW_CFA_offset, column 0x7
78.3297 ++ .uleb128 0x11
78.3298 ++ .byte 0x86 # DW_CFA_offset, column 0x6
78.3299 ++ .uleb128 0x12
78.3300 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3301 ++ .4byte .LCFI1-.LCFI0
78.3302 ++ .byte 0xd # DW_CFA_def_cfa_register
78.3303 ++ .uleb128 0xb
78.3304 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3305 ++ .4byte .LCFI2-.LCFI1
78.3306 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.3307 ++ .uleb128 0x90
78.3308 ++ .align 4
78.3309 ++.LEFDE1:
78.3310 ++.LSFDE2:
78.3311 ++ .4byte .LEFDE2-.LASFDE2 # FDE Length
78.3312 ++.LASFDE2:
78.3313 ++ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
78.3314 ++ .4byte .LFB2-. # FDE initial location
78.3315 ++ .4byte .LFE2-.LFB2 # FDE address range
78.3316 ++ .uleb128 0x0 # Augmentation size
78.3317 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3318 ++ .4byte .LCFI10-.LFB2
78.3319 ++ .byte 0x8f # DW_CFA_offset, column 0xf
78.3320 ++ .uleb128 0x9
78.3321 ++ .byte 0x8e # DW_CFA_offset, column 0xe
78.3322 ++ .uleb128 0xa
78.3323 ++ .byte 0x8d # DW_CFA_offset, column 0xd
78.3324 ++ .uleb128 0xb
78.3325 ++ .byte 0x8c # DW_CFA_offset, column 0xc
78.3326 ++ .uleb128 0xc
78.3327 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3328 ++ .4byte .LCFI11-.LCFI10
78.3329 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.3330 ++ .uleb128 0xc0
78.3331 ++ .align 4
78.3332 ++.LEFDE2:
78.3333 ++
78.3334 ++#else
78.3335 ++
78.3336 ++.text
78.3337 ++
78.3338 ++ # r2: cif->bytes
78.3339 ++ # r3: &ecif
78.3340 ++ # r4: ffi_prep_args
78.3341 ++ # r5: ret_type
78.3342 ++ # r6: ecif.rvalue
78.3343 ++ # ov: fn
78.3344 ++
78.3345 ++ # This assumes we are using gas.
78.3346 ++ .globl ffi_call_SYSV
78.3347 ++ .type ffi_call_SYSV,%function
78.3348 ++ffi_call_SYSV:
78.3349 ++.LFB1:
78.3350 ++ stmg %r6,%r15,48(%r15) # Save registers
78.3351 ++.LCFI0:
78.3352 ++ larl %r13,.Lbase # Set up base register
78.3353 ++ lgr %r11,%r15 # Set up frame pointer
78.3354 ++.LCFI1:
78.3355 ++ sgr %r15,%r2
78.3356 ++ aghi %r15,-160-80 # Allocate stack
78.3357 ++ lgr %r8,%r6 # Save ecif.rvalue
78.3358 ++ llgc %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
78.3359 ++ lg %r7,160(%r11) # Load function address
78.3360 ++ stg %r11,0(%r15) # Set up back chain
78.3361 ++ aghi %r11,-80 # Register save area
78.3362 ++.LCFI2:
78.3363 ++
78.3364 ++ la %r2,160(%r15) # Save area
78.3365 ++ # r3 already holds &ecif
78.3366 ++ basr %r14,%r4 # Call ffi_prep_args
78.3367 ++
78.3368 ++ lmg %r2,%r6,0(%r11) # Load arguments
78.3369 ++ ld %f0,48(%r11)
78.3370 ++ ld %f2,56(%r11)
78.3371 ++ ld %f4,64(%r11)
78.3372 ++ ld %f6,72(%r11)
78.3373 ++ la %r14,0(%r13,%r9) # Set return address
78.3374 ++ br %r7 # ... and call function
78.3375 ++
78.3376 ++.Lbase:
78.3377 ++.LretNone: # Return void
78.3378 ++ lg %r4,80+112(%r11)
78.3379 ++ lmg %r6,%r15,80+48(%r11)
78.3380 ++ br %r4
78.3381 ++
78.3382 ++.LretFloat:
78.3383 ++ lg %r4,80+112(%r11)
78.3384 ++ ste %f0,0(%r8) # Return float
78.3385 ++ lmg %r6,%r15,80+48(%r11)
78.3386 ++ br %r4
78.3387 ++
78.3388 ++.LretDouble:
78.3389 ++ lg %r4,80+112(%r11)
78.3390 ++ std %f0,0(%r8) # Return double
78.3391 ++ lmg %r6,%r15,80+48(%r11)
78.3392 ++ br %r4
78.3393 ++
78.3394 ++.LretInt32:
78.3395 ++ lg %r4,80+112(%r11)
78.3396 ++ st %r2,0(%r8) # Return int
78.3397 ++ lmg %r6,%r15,80+48(%r11)
78.3398 ++ br %r4
78.3399 ++
78.3400 ++.LretInt64:
78.3401 ++ lg %r4,80+112(%r11)
78.3402 ++ stg %r2,0(%r8) # Return long
78.3403 ++ lmg %r6,%r15,80+48(%r11)
78.3404 ++ br %r4
78.3405 ++
78.3406 ++.Ltable:
78.3407 ++ .byte .LretNone-.Lbase # FFI390_RET_VOID
78.3408 ++ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
78.3409 ++ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
78.3410 ++ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
78.3411 ++ .byte .LretInt32-.Lbase # FFI390_RET_INT32
78.3412 ++ .byte .LretInt64-.Lbase # FFI390_RET_INT64
78.3413 ++
78.3414 ++.LFE1:
78.3415 ++.ffi_call_SYSV_end:
78.3416 ++ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
78.3417 ++
78.3418 ++
78.3419 ++ .globl ffi_closure_SYSV
78.3420 ++ .type ffi_closure_SYSV,%function
78.3421 ++ffi_closure_SYSV:
78.3422 ++.LFB2:
78.3423 ++ stmg %r14,%r15,112(%r15) # Save registers
78.3424 ++.LCFI10:
78.3425 ++ stmg %r2,%r6,16(%r15) # Save arguments
78.3426 ++ std %f0,128(%r15)
78.3427 ++ std %f2,136(%r15)
78.3428 ++ std %f4,144(%r15)
78.3429 ++ std %f6,152(%r15)
78.3430 ++ lgr %r1,%r15 # Set up stack frame
78.3431 ++ aghi %r15,-160
78.3432 ++.LCFI11:
78.3433 ++ lgr %r2,%r0 # Closure
78.3434 ++ la %r3,16(%r1) # GPRs
78.3435 ++ la %r4,128(%r1) # FPRs
78.3436 ++ la %r5,160(%r1) # Overflow
78.3437 ++ stg %r1,0(%r15) # Set up back chain
78.3438 ++
78.3439 ++ brasl %r14,ffi_closure_helper_SYSV # Call helper
78.3440 ++
78.3441 ++ lg %r14,160+112(%r15)
78.3442 ++ ld %f0,160+128(%r15) # Load return registers
78.3443 ++ lg %r2,160+16(%r15)
78.3444 ++ la %r15,160(%r15)
78.3445 ++ br %r14
78.3446 ++.LFE2:
78.3447 ++
78.3448 ++.ffi_closure_SYSV_end:
78.3449 ++ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
78.3450 ++
78.3451 ++
78.3452 ++
78.3453 ++ .section .eh_frame,"a",@progbits
78.3454 ++.Lframe1:
78.3455 ++ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
78.3456 ++.LSCIE1:
78.3457 ++ .4byte 0x0 # CIE Identifier Tag
78.3458 ++ .byte 0x1 # CIE Version
78.3459 ++ .ascii "zR\0" # CIE Augmentation
78.3460 ++ .uleb128 0x1 # CIE Code Alignment Factor
78.3461 ++ .sleb128 -8 # CIE Data Alignment Factor
78.3462 ++ .byte 0xe # CIE RA Column
78.3463 ++ .uleb128 0x1 # Augmentation size
78.3464 ++ .byte 0x1b # FDE Encoding (pcrel sdata4)
78.3465 ++ .byte 0xc # DW_CFA_def_cfa
78.3466 ++ .uleb128 0xf
78.3467 ++ .uleb128 0xa0
78.3468 ++ .align 8
78.3469 ++.LECIE1:
78.3470 ++.LSFDE1:
78.3471 ++ .4byte .LEFDE1-.LASFDE1 # FDE Length
78.3472 ++.LASFDE1:
78.3473 ++ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
78.3474 ++ .4byte .LFB1-. # FDE initial location
78.3475 ++ .4byte .LFE1-.LFB1 # FDE address range
78.3476 ++ .uleb128 0x0 # Augmentation size
78.3477 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3478 ++ .4byte .LCFI0-.LFB1
78.3479 ++ .byte 0x8f # DW_CFA_offset, column 0xf
78.3480 ++ .uleb128 0x5
78.3481 ++ .byte 0x8e # DW_CFA_offset, column 0xe
78.3482 ++ .uleb128 0x6
78.3483 ++ .byte 0x8d # DW_CFA_offset, column 0xd
78.3484 ++ .uleb128 0x7
78.3485 ++ .byte 0x8c # DW_CFA_offset, column 0xc
78.3486 ++ .uleb128 0x8
78.3487 ++ .byte 0x8b # DW_CFA_offset, column 0xb
78.3488 ++ .uleb128 0x9
78.3489 ++ .byte 0x8a # DW_CFA_offset, column 0xa
78.3490 ++ .uleb128 0xa
78.3491 ++ .byte 0x89 # DW_CFA_offset, column 0x9
78.3492 ++ .uleb128 0xb
78.3493 ++ .byte 0x88 # DW_CFA_offset, column 0x8
78.3494 ++ .uleb128 0xc
78.3495 ++ .byte 0x87 # DW_CFA_offset, column 0x7
78.3496 ++ .uleb128 0xd
78.3497 ++ .byte 0x86 # DW_CFA_offset, column 0x6
78.3498 ++ .uleb128 0xe
78.3499 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3500 ++ .4byte .LCFI1-.LCFI0
78.3501 ++ .byte 0xd # DW_CFA_def_cfa_register
78.3502 ++ .uleb128 0xb
78.3503 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3504 ++ .4byte .LCFI2-.LCFI1
78.3505 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.3506 ++ .uleb128 0xf0
78.3507 ++ .align 8
78.3508 ++.LEFDE1:
78.3509 ++.LSFDE2:
78.3510 ++ .4byte .LEFDE2-.LASFDE2 # FDE Length
78.3511 ++.LASFDE2:
78.3512 ++ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
78.3513 ++ .4byte .LFB2-. # FDE initial location
78.3514 ++ .4byte .LFE2-.LFB2 # FDE address range
78.3515 ++ .uleb128 0x0 # Augmentation size
78.3516 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3517 ++ .4byte .LCFI10-.LFB2
78.3518 ++ .byte 0x8f # DW_CFA_offset, column 0xf
78.3519 ++ .uleb128 0x5
78.3520 ++ .byte 0x8e # DW_CFA_offset, column 0xe
78.3521 ++ .uleb128 0x6
78.3522 ++ .byte 0x4 # DW_CFA_advance_loc4
78.3523 ++ .4byte .LCFI11-.LCFI10
78.3524 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.3525 ++ .uleb128 0x140
78.3526 ++ .align 8
78.3527 ++.LEFDE2:
78.3528 ++
78.3529 ++#endif
78.3530 ++
78.3531 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/ffi.c gcc/libffi/src/sh/ffi.c
78.3532 +--- gcc-3.2.2.orig/libffi/src/sh/ffi.c Thu Jan 1 09:00:00 1970
78.3533 ++++ gcc/libffi/src/sh/ffi.c Fri Jul 19 10:08:43 2002
78.3534 +@@ -0,0 +1,722 @@
78.3535 ++/* -----------------------------------------------------------------------
78.3536 ++ ffi.c - Copyright (c) 2002 Kaz Kojima
78.3537 ++
78.3538 ++ SuperH Foreign Function Interface
78.3539 ++
78.3540 ++ Permission is hereby granted, free of charge, to any person obtaining
78.3541 ++ a copy of this software and associated documentation files (the
78.3542 ++ ``Software''), to deal in the Software without restriction, including
78.3543 ++ without limitation the rights to use, copy, modify, merge, publish,
78.3544 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.3545 ++ permit persons to whom the Software is furnished to do so, subject to
78.3546 ++ the following conditions:
78.3547 ++
78.3548 ++ The above copyright notice and this permission notice shall be included
78.3549 ++ in all copies or substantial portions of the Software.
78.3550 ++
78.3551 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.3552 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.3553 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.3554 ++ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.3555 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.3556 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.3557 ++ OTHER DEALINGS IN THE SOFTWARE.
78.3558 ++ ----------------------------------------------------------------------- */
78.3559 ++
78.3560 ++#include <ffi.h>
78.3561 ++#include <ffi_common.h>
78.3562 ++
78.3563 ++#include <stdlib.h>
78.3564 ++
78.3565 ++#define NGREGARG 4
78.3566 ++#if defined(__SH4__)
78.3567 ++#define NFREGARG 8
78.3568 ++#endif
78.3569 ++
78.3570 ++#if defined(__HITACHI__)
78.3571 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
78.3572 ++#else
78.3573 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
78.3574 ++#endif
78.3575 ++
78.3576 ++/* If the structure has essentialy an unique element, return its type. */
78.3577 ++static int
78.3578 ++simple_type (ffi_type *arg)
78.3579 ++{
78.3580 ++ if (arg->type != FFI_TYPE_STRUCT)
78.3581 ++ return arg->type;
78.3582 ++ else if (arg->elements[1])
78.3583 ++ return FFI_TYPE_STRUCT;
78.3584 ++
78.3585 ++ return simple_type (arg->elements[0]);
78.3586 ++}
78.3587 ++
78.3588 ++static int
78.3589 ++return_type (ffi_type *arg)
78.3590 ++{
78.3591 ++ unsigned short type;
78.3592 ++
78.3593 ++ if (arg->type != FFI_TYPE_STRUCT)
78.3594 ++ return arg->type;
78.3595 ++
78.3596 ++ type = simple_type (arg->elements[0]);
78.3597 ++ if (! arg->elements[1])
78.3598 ++ {
78.3599 ++ switch (type)
78.3600 ++ {
78.3601 ++ case FFI_TYPE_SINT8:
78.3602 ++ case FFI_TYPE_UINT8:
78.3603 ++ case FFI_TYPE_SINT16:
78.3604 ++ case FFI_TYPE_UINT16:
78.3605 ++ case FFI_TYPE_SINT32:
78.3606 ++ case FFI_TYPE_UINT32:
78.3607 ++ return FFI_TYPE_INT;
78.3608 ++
78.3609 ++ default:
78.3610 ++ return type;
78.3611 ++ }
78.3612 ++ }
78.3613 ++
78.3614 ++ /* gcc uses r0/r1 pair for some kind of structures. */
78.3615 ++ if (arg->size <= 2 * sizeof (int))
78.3616 ++ {
78.3617 ++ int i = 0;
78.3618 ++ ffi_type *e;
78.3619 ++
78.3620 ++ while ((e = arg->elements[i++]))
78.3621 ++ {
78.3622 ++ type = simple_type (e);
78.3623 ++ switch (type)
78.3624 ++ {
78.3625 ++ case FFI_TYPE_SINT32:
78.3626 ++ case FFI_TYPE_UINT32:
78.3627 ++ case FFI_TYPE_INT:
78.3628 ++ case FFI_TYPE_FLOAT:
78.3629 ++ return FFI_TYPE_UINT64;
78.3630 ++
78.3631 ++ default:
78.3632 ++ break;
78.3633 ++ }
78.3634 ++ }
78.3635 ++ }
78.3636 ++
78.3637 ++ return FFI_TYPE_STRUCT;
78.3638 ++}
78.3639 ++
78.3640 ++/* ffi_prep_args is called by the assembly routine once stack space
78.3641 ++ has been allocated for the function's arguments */
78.3642 ++
78.3643 ++/*@-exportheader@*/
78.3644 ++void ffi_prep_args(char *stack, extended_cif *ecif)
78.3645 ++/*@=exportheader@*/
78.3646 ++{
78.3647 ++ register unsigned int i;
78.3648 ++ register int tmp;
78.3649 ++ register unsigned int avn;
78.3650 ++ register void **p_argv;
78.3651 ++ register char *argp;
78.3652 ++ register ffi_type **p_arg;
78.3653 ++ int greg, ireg;
78.3654 ++#if defined(__SH4__)
78.3655 ++ int freg = 0;
78.3656 ++#endif
78.3657 ++
78.3658 ++ tmp = 0;
78.3659 ++ argp = stack;
78.3660 ++
78.3661 ++ if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT)
78.3662 ++ {
78.3663 ++ *(void **) argp = ecif->rvalue;
78.3664 ++ argp += 4;
78.3665 ++ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
78.3666 ++ }
78.3667 ++ else
78.3668 ++ ireg = 0;
78.3669 ++
78.3670 ++ /* Set arguments for registers. */
78.3671 ++ greg = ireg;
78.3672 ++ avn = ecif->cif->nargs;
78.3673 ++ p_argv = ecif->avalue;
78.3674 ++
78.3675 ++ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
78.3676 ++ {
78.3677 ++ size_t z;
78.3678 ++
78.3679 ++ z = (*p_arg)->size;
78.3680 ++ if (z < sizeof(int))
78.3681 ++ {
78.3682 ++ if (greg++ >= NGREGARG)
78.3683 ++ continue;
78.3684 ++
78.3685 ++ z = sizeof(int);
78.3686 ++ switch ((*p_arg)->type)
78.3687 ++ {
78.3688 ++ case FFI_TYPE_SINT8:
78.3689 ++ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
78.3690 ++ break;
78.3691 ++
78.3692 ++ case FFI_TYPE_UINT8:
78.3693 ++ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
78.3694 ++ break;
78.3695 ++
78.3696 ++ case FFI_TYPE_SINT16:
78.3697 ++ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
78.3698 ++ break;
78.3699 ++
78.3700 ++ case FFI_TYPE_UINT16:
78.3701 ++ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
78.3702 ++ break;
78.3703 ++
78.3704 ++ case FFI_TYPE_STRUCT:
78.3705 ++ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
78.3706 ++ break;
78.3707 ++
78.3708 ++ default:
78.3709 ++ FFI_ASSERT(0);
78.3710 ++ }
78.3711 ++ argp += z;
78.3712 ++ }
78.3713 ++ else if (z == sizeof(int))
78.3714 ++ {
78.3715 ++#if defined(__SH4__)
78.3716 ++ if ((*p_arg)->type == FFI_TYPE_FLOAT)
78.3717 ++ {
78.3718 ++ if (freg++ >= NFREGARG)
78.3719 ++ continue;
78.3720 ++ }
78.3721 ++ else
78.3722 ++#endif
78.3723 ++ {
78.3724 ++ if (greg++ >= NGREGARG)
78.3725 ++ continue;
78.3726 ++ }
78.3727 ++ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
78.3728 ++ argp += z;
78.3729 ++ }
78.3730 ++#if defined(__SH4__)
78.3731 ++ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
78.3732 ++ {
78.3733 ++ if (freg + 1 >= NFREGARG)
78.3734 ++ continue;
78.3735 ++ freg = (freg + 1) & ~1;
78.3736 ++ freg += 2;
78.3737 ++ memcpy (argp, *p_argv, z);
78.3738 ++ argp += z;
78.3739 ++ }
78.3740 ++#endif
78.3741 ++ else
78.3742 ++ {
78.3743 ++ int n = (z + sizeof (int) - 1) / sizeof (int);
78.3744 ++#if defined(__SH4__)
78.3745 ++ if (greg + n - 1 >= NGREGARG)
78.3746 ++ continue;
78.3747 ++ greg += n;
78.3748 ++#else
78.3749 ++ if (greg >= NGREGARG)
78.3750 ++ continue;
78.3751 ++ else if (greg + n - 1 >= NGREGARG)
78.3752 ++ greg = NGREGARG;
78.3753 ++ else
78.3754 ++ greg += n;
78.3755 ++#endif
78.3756 ++ memcpy (argp, *p_argv, z);
78.3757 ++ argp += z;
78.3758 ++ }
78.3759 ++ }
78.3760 ++
78.3761 ++ /* Set arguments on stack. */
78.3762 ++ greg = ireg;
78.3763 ++#if defined(__SH4__)
78.3764 ++ freg = 0;
78.3765 ++#endif
78.3766 ++ p_argv = ecif->avalue;
78.3767 ++
78.3768 ++ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
78.3769 ++ {
78.3770 ++ size_t z;
78.3771 ++
78.3772 ++ z = (*p_arg)->size;
78.3773 ++ if (z < sizeof(int))
78.3774 ++ {
78.3775 ++ if (greg++ < NGREGARG)
78.3776 ++ continue;
78.3777 ++
78.3778 ++ z = sizeof(int);
78.3779 ++ switch ((*p_arg)->type)
78.3780 ++ {
78.3781 ++ case FFI_TYPE_SINT8:
78.3782 ++ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
78.3783 ++ break;
78.3784 ++
78.3785 ++ case FFI_TYPE_UINT8:
78.3786 ++ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
78.3787 ++ break;
78.3788 ++
78.3789 ++ case FFI_TYPE_SINT16:
78.3790 ++ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
78.3791 ++ break;
78.3792 ++
78.3793 ++ case FFI_TYPE_UINT16:
78.3794 ++ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
78.3795 ++ break;
78.3796 ++
78.3797 ++ case FFI_TYPE_STRUCT:
78.3798 ++ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
78.3799 ++ break;
78.3800 ++
78.3801 ++ default:
78.3802 ++ FFI_ASSERT(0);
78.3803 ++ }
78.3804 ++ argp += z;
78.3805 ++ }
78.3806 ++ else if (z == sizeof(int))
78.3807 ++ {
78.3808 ++#if defined(__SH4__)
78.3809 ++ if ((*p_arg)->type == FFI_TYPE_FLOAT)
78.3810 ++ {
78.3811 ++ if (freg++ < NFREGARG)
78.3812 ++ continue;
78.3813 ++ }
78.3814 ++ else
78.3815 ++#endif
78.3816 ++ {
78.3817 ++ if (greg++ < NGREGARG)
78.3818 ++ continue;
78.3819 ++ }
78.3820 ++ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
78.3821 ++ argp += z;
78.3822 ++ }
78.3823 ++#if defined(__SH4__)
78.3824 ++ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
78.3825 ++ {
78.3826 ++ if (freg + 1 < NFREGARG)
78.3827 ++ {
78.3828 ++ freg = (freg + 1) & ~1;
78.3829 ++ freg += 2;
78.3830 ++ continue;
78.3831 ++ }
78.3832 ++ memcpy (argp, *p_argv, z);
78.3833 ++ argp += z;
78.3834 ++ }
78.3835 ++#endif
78.3836 ++ else
78.3837 ++ {
78.3838 ++ int n = (z + sizeof (int) - 1) / sizeof (int);
78.3839 ++ if (greg + n - 1 < NGREGARG)
78.3840 ++ {
78.3841 ++ greg += n;
78.3842 ++ continue;
78.3843 ++ }
78.3844 ++#if (! defined(__SH4__))
78.3845 ++ else if (greg < NGREGARG)
78.3846 ++ {
78.3847 ++ greg = NGREGARG;
78.3848 ++ continue;
78.3849 ++ }
78.3850 ++#endif
78.3851 ++ memcpy (argp, *p_argv, z);
78.3852 ++ argp += z;
78.3853 ++ }
78.3854 ++ }
78.3855 ++
78.3856 ++ return;
78.3857 ++}
78.3858 ++
78.3859 ++/* Perform machine dependent cif processing */
78.3860 ++ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
78.3861 ++{
78.3862 ++ int i, j;
78.3863 ++ int size, type;
78.3864 ++ int n, m;
78.3865 ++ int greg;
78.3866 ++#if defined(__SH4__)
78.3867 ++ int freg = 0;
78.3868 ++#endif
78.3869 ++
78.3870 ++ cif->flags = 0;
78.3871 ++
78.3872 ++ greg = ((return_type (cif->rtype) == FFI_TYPE_STRUCT) &&
78.3873 ++ STRUCT_VALUE_ADDRESS_WITH_ARG) ? 1 : 0;
78.3874 ++
78.3875 ++#if defined(__SH4__)
78.3876 ++ for (i = j = 0; i < cif->nargs && j < 12; i++)
78.3877 ++ {
78.3878 ++ type = (cif->arg_types)[i]->type;
78.3879 ++ switch (type)
78.3880 ++ {
78.3881 ++ case FFI_TYPE_FLOAT:
78.3882 ++ if (freg >= NFREGARG)
78.3883 ++ continue;
78.3884 ++ freg++;
78.3885 ++ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
78.3886 ++ j++;
78.3887 ++ break;
78.3888 ++
78.3889 ++ case FFI_TYPE_DOUBLE:
78.3890 ++ if ((freg + 1) >= NFREGARG)
78.3891 ++ continue;
78.3892 ++ freg = (freg + 1) & ~1;
78.3893 ++ freg += 2;
78.3894 ++ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
78.3895 ++ j++;
78.3896 ++ break;
78.3897 ++
78.3898 ++ default:
78.3899 ++ size = (cif->arg_types)[i]->size;
78.3900 ++ n = (size + sizeof (int) - 1) / sizeof (int);
78.3901 ++ if (greg + n - 1 >= NGREGARG)
78.3902 ++ continue;
78.3903 ++ greg += n;
78.3904 ++ for (m = 0; m < n; m++)
78.3905 ++ cif->flags += FFI_TYPE_INT << (2 * j++);
78.3906 ++ break;
78.3907 ++ }
78.3908 ++ }
78.3909 ++#else
78.3910 ++ for (i = j = 0; i < cif->nargs && j < 4; i++)
78.3911 ++ {
78.3912 ++ size = (cif->arg_types)[i]->size;
78.3913 ++ n = (size + sizeof (int) - 1) / sizeof (int);
78.3914 ++ if (greg >= NGREGARG)
78.3915 ++ continue;
78.3916 ++ else if (greg + n - 1 >= NGREGARG)
78.3917 ++ greg = NGREGARG;
78.3918 ++ else
78.3919 ++ greg += n;
78.3920 ++ for (m = 0; m < n; m++)
78.3921 ++ cif->flags += FFI_TYPE_INT << (2 * j++);
78.3922 ++ }
78.3923 ++#endif
78.3924 ++
78.3925 ++ /* Set the return type flag */
78.3926 ++ switch (cif->rtype->type)
78.3927 ++ {
78.3928 ++ case FFI_TYPE_STRUCT:
78.3929 ++ cif->flags += (unsigned) (return_type (cif->rtype)) << 24;
78.3930 ++ break;
78.3931 ++
78.3932 ++ case FFI_TYPE_VOID:
78.3933 ++ case FFI_TYPE_FLOAT:
78.3934 ++ case FFI_TYPE_DOUBLE:
78.3935 ++ case FFI_TYPE_SINT64:
78.3936 ++ case FFI_TYPE_UINT64:
78.3937 ++ cif->flags += (unsigned) cif->rtype->type << 24;
78.3938 ++ break;
78.3939 ++
78.3940 ++ default:
78.3941 ++ cif->flags += FFI_TYPE_INT << 24;
78.3942 ++ break;
78.3943 ++ }
78.3944 ++
78.3945 ++ return FFI_OK;
78.3946 ++}
78.3947 ++
78.3948 ++/*@-declundef@*/
78.3949 ++/*@-exportheader@*/
78.3950 ++extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
78.3951 ++ /*@out@*/ extended_cif *,
78.3952 ++ unsigned, unsigned,
78.3953 ++ /*@out@*/ unsigned *,
78.3954 ++ void (*fn)());
78.3955 ++/*@=declundef@*/
78.3956 ++/*@=exportheader@*/
78.3957 ++
78.3958 ++void ffi_call(/*@dependent@*/ ffi_cif *cif,
78.3959 ++ void (*fn)(),
78.3960 ++ /*@out@*/ void *rvalue,
78.3961 ++ /*@dependent@*/ void **avalue)
78.3962 ++{
78.3963 ++ extended_cif ecif;
78.3964 ++
78.3965 ++ ecif.cif = cif;
78.3966 ++ ecif.avalue = avalue;
78.3967 ++
78.3968 ++ /* If the return value is a struct and we don't have a return */
78.3969 ++ /* value address then we need to make one */
78.3970 ++
78.3971 ++ if ((rvalue == NULL) &&
78.3972 ++ (cif->rtype->type == FFI_TYPE_STRUCT))
78.3973 ++ {
78.3974 ++ /*@-sysunrecog@*/
78.3975 ++ ecif.rvalue = alloca(cif->rtype->size);
78.3976 ++ /*@=sysunrecog@*/
78.3977 ++ }
78.3978 ++ else
78.3979 ++ ecif.rvalue = rvalue;
78.3980 ++
78.3981 ++
78.3982 ++ switch (cif->abi)
78.3983 ++ {
78.3984 ++ case FFI_SYSV:
78.3985 ++ /*@-usedef@*/
78.3986 ++ ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
78.3987 ++ cif->flags, ecif.rvalue, fn);
78.3988 ++ /*@=usedef@*/
78.3989 ++ break;
78.3990 ++ default:
78.3991 ++ FFI_ASSERT(0);
78.3992 ++ break;
78.3993 ++ }
78.3994 ++}
78.3995 ++
78.3996 ++extern void ffi_closure_SYSV (void);
78.3997 ++#if defined(__SH4__)
78.3998 ++extern void __ic_invalidate (void *line);
78.3999 ++#endif
78.4000 ++
78.4001 ++ffi_status
78.4002 ++ffi_prep_closure (ffi_closure* closure,
78.4003 ++ ffi_cif* cif,
78.4004 ++ void (*fun)(ffi_cif*, void*, void**, void*),
78.4005 ++ void *user_data)
78.4006 ++{
78.4007 ++ unsigned int *tramp;
78.4008 ++
78.4009 ++ FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
78.4010 ++
78.4011 ++ tramp = (unsigned int *) &closure->tramp[0];
78.4012 ++#ifdef __LITTLE_ENDIAN__
78.4013 ++ tramp[0] = 0xd301d202;
78.4014 ++ tramp[1] = 0x0009422b;
78.4015 ++#else
78.4016 ++ tramp[0] = 0xd202d301;
78.4017 ++ tramp[1] = 0x422b0009;
78.4018 ++#endif
78.4019 ++ *(void **) &tramp[2] = (void *)closure; /* ctx */
78.4020 ++ *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */
78.4021 ++
78.4022 ++ closure->cif = cif;
78.4023 ++ closure->fun = fun;
78.4024 ++ closure->user_data = user_data;
78.4025 ++
78.4026 ++#if defined(__SH4__)
78.4027 ++ /* Flush the icache. */
78.4028 ++ __ic_invalidate(&closure->tramp[0]);
78.4029 ++#endif
78.4030 ++
78.4031 ++ return FFI_OK;
78.4032 ++}
78.4033 ++
78.4034 ++/* Basically the trampoline invokes ffi_closure_SYSV, and on
78.4035 ++ * entry, r3 holds the address of the closure.
78.4036 ++ * After storing the registers that could possibly contain
78.4037 ++ * parameters to be passed into the stack frame and setting
78.4038 ++ * up space for a return value, ffi_closure_SYSV invokes the
78.4039 ++ * following helper function to do most of the work.
78.4040 ++ */
78.4041 ++
78.4042 ++#ifdef __LITTLE_ENDIAN__
78.4043 ++#define OFS_INT8 0
78.4044 ++#define OFS_INT16 2
78.4045 ++#else
78.4046 ++#define OFS_INT8 3
78.4047 ++#define OFS_INT16 2
78.4048 ++#endif
78.4049 ++
78.4050 ++int
78.4051 ++ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
78.4052 ++ unsigned long *pgr, unsigned long *pfr,
78.4053 ++ unsigned long *pst)
78.4054 ++{
78.4055 ++ void **avalue;
78.4056 ++ ffi_type **p_arg;
78.4057 ++ int i, avn;
78.4058 ++ int ireg, greg = 0;
78.4059 ++#if defined(__SH4__)
78.4060 ++ int freg = 0;
78.4061 ++#endif
78.4062 ++ ffi_cif *cif;
78.4063 ++ double temp;
78.4064 ++
78.4065 ++ cif = closure->cif;
78.4066 ++ avalue = alloca(cif->nargs * sizeof(void *));
78.4067 ++
78.4068 ++ /* Copy the caller's structure return value address so that the closure
78.4069 ++ returns the data directly to the caller. */
78.4070 ++ if (cif->rtype->type == FFI_TYPE_STRUCT)
78.4071 ++ {
78.4072 ++ rvalue = *pgr++;
78.4073 ++ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
78.4074 ++ }
78.4075 ++ else
78.4076 ++ ireg = 0;
78.4077 ++
78.4078 ++ cif = closure->cif;
78.4079 ++ greg = ireg;
78.4080 ++ avn = cif->nargs;
78.4081 ++
78.4082 ++ /* Grab the addresses of the arguments from the stack frame. */
78.4083 ++ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
78.4084 ++ {
78.4085 ++ size_t z;
78.4086 ++
78.4087 ++ z = (*p_arg)->size;
78.4088 ++ if (z < sizeof(int))
78.4089 ++ {
78.4090 ++ if (greg++ >= NGREGARG)
78.4091 ++ continue;
78.4092 ++
78.4093 ++ z = sizeof(int);
78.4094 ++ switch ((*p_arg)->type)
78.4095 ++ {
78.4096 ++ case FFI_TYPE_SINT8:
78.4097 ++ case FFI_TYPE_UINT8:
78.4098 ++ avalue[i] = (((char *)pgr) + OFS_INT8);
78.4099 ++ break;
78.4100 ++
78.4101 ++ case FFI_TYPE_SINT16:
78.4102 ++ case FFI_TYPE_UINT16:
78.4103 ++ avalue[i] = (((char *)pgr) + OFS_INT16);
78.4104 ++ break;
78.4105 ++
78.4106 ++ case FFI_TYPE_STRUCT:
78.4107 ++ avalue[i] = pgr;
78.4108 ++ break;
78.4109 ++
78.4110 ++ default:
78.4111 ++ FFI_ASSERT(0);
78.4112 ++ }
78.4113 ++ pgr++;
78.4114 ++ }
78.4115 ++ else if (z == sizeof(int))
78.4116 ++ {
78.4117 ++#if defined(__SH4__)
78.4118 ++ if ((*p_arg)->type == FFI_TYPE_FLOAT)
78.4119 ++ {
78.4120 ++ if (freg++ >= NFREGARG)
78.4121 ++ continue;
78.4122 ++ avalue[i] = pfr;
78.4123 ++ pfr++;
78.4124 ++ }
78.4125 ++ else
78.4126 ++#endif
78.4127 ++ {
78.4128 ++ if (greg++ >= NGREGARG)
78.4129 ++ continue;
78.4130 ++ avalue[i] = pgr;
78.4131 ++ pgr++;
78.4132 ++ }
78.4133 ++ }
78.4134 ++#if defined(__SH4__)
78.4135 ++ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
78.4136 ++ {
78.4137 ++ if (freg + 1 >= NFREGARG)
78.4138 ++ continue;
78.4139 ++ freg = (freg + 1) & ~1;
78.4140 ++ freg += 2;
78.4141 ++ avalue[i] = pfr;
78.4142 ++ pfr += 2;
78.4143 ++ }
78.4144 ++#endif
78.4145 ++ else
78.4146 ++ {
78.4147 ++ int n = (z + sizeof (int) - 1) / sizeof (int);
78.4148 ++#if defined(__SH4__)
78.4149 ++ if (greg + n - 1 >= NGREGARG)
78.4150 ++ continue;
78.4151 ++ greg += n;
78.4152 ++#else
78.4153 ++ if (greg >= NGREGARG)
78.4154 ++ continue;
78.4155 ++ else if (greg + n - 1 >= NGREGARG)
78.4156 ++ greg = NGREGARG;
78.4157 ++ else
78.4158 ++ greg += n;
78.4159 ++#endif
78.4160 ++ avalue[i] = pgr;
78.4161 ++ pgr += n;
78.4162 ++ }
78.4163 ++ }
78.4164 ++
78.4165 ++ greg = ireg;
78.4166 ++#if defined(__SH4__)
78.4167 ++ freg = 0;
78.4168 ++#endif
78.4169 ++
78.4170 ++ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
78.4171 ++ {
78.4172 ++ size_t z;
78.4173 ++
78.4174 ++ z = (*p_arg)->size;
78.4175 ++ if (z < sizeof(int))
78.4176 ++ {
78.4177 ++ if (greg++ < NGREGARG)
78.4178 ++ continue;
78.4179 ++
78.4180 ++ z = sizeof(int);
78.4181 ++ switch ((*p_arg)->type)
78.4182 ++ {
78.4183 ++ case FFI_TYPE_SINT8:
78.4184 ++ case FFI_TYPE_UINT8:
78.4185 ++ avalue[i] = (((char *)pst) + OFS_INT8);
78.4186 ++ break;
78.4187 ++
78.4188 ++ case FFI_TYPE_SINT16:
78.4189 ++ case FFI_TYPE_UINT16:
78.4190 ++ avalue[i] = (((char *)pst) + OFS_INT16);
78.4191 ++ break;
78.4192 ++
78.4193 ++ case FFI_TYPE_STRUCT:
78.4194 ++ avalue[i] = pst;
78.4195 ++ break;
78.4196 ++
78.4197 ++ default:
78.4198 ++ FFI_ASSERT(0);
78.4199 ++ }
78.4200 ++ pst++;
78.4201 ++ }
78.4202 ++ else if (z == sizeof(int))
78.4203 ++ {
78.4204 ++#if defined(__SH4__)
78.4205 ++ if ((*p_arg)->type == FFI_TYPE_FLOAT)
78.4206 ++ {
78.4207 ++ if (freg++ < NFREGARG)
78.4208 ++ continue;
78.4209 ++ }
78.4210 ++ else
78.4211 ++#endif
78.4212 ++ {
78.4213 ++ if (greg++ < NGREGARG)
78.4214 ++ continue;
78.4215 ++ }
78.4216 ++ avalue[i] = pst;
78.4217 ++ pst++;
78.4218 ++ }
78.4219 ++#if defined(__SH4__)
78.4220 ++ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
78.4221 ++ {
78.4222 ++ if (freg + 1 < NFREGARG)
78.4223 ++ {
78.4224 ++ freg = (freg + 1) & ~1;
78.4225 ++ freg += 2;
78.4226 ++ continue;
78.4227 ++ }
78.4228 ++ avalue[i] = pst;
78.4229 ++ pst += 2;
78.4230 ++ }
78.4231 ++#endif
78.4232 ++ else
78.4233 ++ {
78.4234 ++ int n = (z + sizeof (int) - 1) / sizeof (int);
78.4235 ++ if (greg + n - 1 < NGREGARG)
78.4236 ++ {
78.4237 ++ greg += n;
78.4238 ++ continue;
78.4239 ++ }
78.4240 ++#if (! defined(__SH4__))
78.4241 ++ else if (greg < NGREGARG)
78.4242 ++ {
78.4243 ++ greg = NGREGARG;
78.4244 ++ continue;
78.4245 ++ }
78.4246 ++#endif
78.4247 ++ avalue[i] = pst;
78.4248 ++ pst += n;
78.4249 ++ }
78.4250 ++ }
78.4251 ++
78.4252 ++ (closure->fun) (cif, rvalue, avalue, closure->user_data);
78.4253 ++
78.4254 ++ /* Tell ffi_closure_osf how to perform return type promotions. */
78.4255 ++ return cif->rtype->type;
78.4256 ++}
78.4257 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/sysv.S gcc/libffi/src/sh/sysv.S
78.4258 +--- gcc-3.2.2.orig/libffi/src/sh/sysv.S Thu Jan 1 09:00:00 1970
78.4259 ++++ gcc/libffi/src/sh/sysv.S Tue Dec 17 03:22:48 2002
78.4260 +@@ -0,0 +1,773 @@
78.4261 ++/* -----------------------------------------------------------------------
78.4262 ++ sysv.S - Copyright (c) 2002 Kaz Kojima
78.4263 ++
78.4264 ++ SuperH Foreign Function Interface
78.4265 ++
78.4266 ++ Permission is hereby granted, free of charge, to any person obtaining
78.4267 ++ a copy of this software and associated documentation files (the
78.4268 ++ ``Software''), to deal in the Software without restriction, including
78.4269 ++ without limitation the rights to use, copy, modify, merge, publish,
78.4270 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.4271 ++ permit persons to whom the Software is furnished to do so, subject to
78.4272 ++ the following conditions:
78.4273 ++
78.4274 ++ The above copyright notice and this permission notice shall be included
78.4275 ++ in all copies or substantial portions of the Software.
78.4276 ++
78.4277 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.4278 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.4279 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.4280 ++ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.4281 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.4282 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.4283 ++ OTHER DEALINGS IN THE SOFTWARE.
78.4284 ++ ----------------------------------------------------------------------- */
78.4285 ++
78.4286 ++#define LIBFFI_ASM
78.4287 ++#include <ffi.h>
78.4288 ++#ifdef HAVE_MACHINE_ASM_H
78.4289 ++#include <machine/asm.h>
78.4290 ++#else
78.4291 ++/* XXX these lose for some platforms, I'm sure. */
78.4292 ++#define CNAME(x) x
78.4293 ++#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
78.4294 ++#endif
78.4295 ++
78.4296 ++#if defined(__HITACHI__)
78.4297 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
78.4298 ++#else
78.4299 ++#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
78.4300 ++#endif
78.4301 ++
78.4302 ++.text
78.4303 ++
78.4304 ++ # r4: ffi_prep_args
78.4305 ++ # r5: &ecif
78.4306 ++ # r6: bytes
78.4307 ++ # r7: flags
78.4308 ++ # sp+0: rvalue
78.4309 ++ # sp+4: fn
78.4310 ++
78.4311 ++ # This assumes we are using gas.
78.4312 ++ENTRY(ffi_call_SYSV)
78.4313 ++ # Save registers
78.4314 ++.LFB1:
78.4315 ++ mov.l r8,@-r15
78.4316 ++.LCFI0:
78.4317 ++ mov.l r9,@-r15
78.4318 ++.LCFI1:
78.4319 ++ mov.l r10,@-r15
78.4320 ++.LCFI2:
78.4321 ++ mov.l r12,@-r15
78.4322 ++.LCFI3:
78.4323 ++ mov.l r14,@-r15
78.4324 ++.LCFI4:
78.4325 ++ sts.l pr,@-r15
78.4326 ++.LCFI5:
78.4327 ++ mov r15,r14
78.4328 ++.LCFI6:
78.4329 ++#if defined(__SH4__)
78.4330 ++ mov r6,r8
78.4331 ++ mov r7,r9
78.4332 ++
78.4333 ++ sub r6,r15
78.4334 ++ add #-16,r15
78.4335 ++ mov #~7,r0
78.4336 ++ and r0,r15
78.4337 ++
78.4338 ++ mov r4,r0
78.4339 ++ jsr @r0
78.4340 ++ mov r15,r4
78.4341 ++
78.4342 ++ mov r9,r1
78.4343 ++ shlr8 r9
78.4344 ++ shlr8 r9
78.4345 ++ shlr8 r9
78.4346 ++
78.4347 ++ mov #FFI_TYPE_STRUCT,r2
78.4348 ++ cmp/eq r2,r9
78.4349 ++ bf 1f
78.4350 ++#if STRUCT_VALUE_ADDRESS_WITH_ARG
78.4351 ++ mov.l @r15+,r4
78.4352 ++ bra 2f
78.4353 ++ mov #5,r2
78.4354 ++#else
78.4355 ++ mov.l @r15+,r10
78.4356 ++#endif
78.4357 ++1:
78.4358 ++ mov #4,r2
78.4359 ++2:
78.4360 ++ mov #4,r3
78.4361 ++
78.4362 ++L_pass:
78.4363 ++ cmp/pl r8
78.4364 ++ bf L_call_it
78.4365 ++
78.4366 ++ mov r1,r0
78.4367 ++ and #3,r0
78.4368 ++
78.4369 ++L_pass_d:
78.4370 ++ cmp/eq #FFI_TYPE_DOUBLE,r0
78.4371 ++ bf L_pass_f
78.4372 ++
78.4373 ++ mov r3,r0
78.4374 ++ and #1,r0
78.4375 ++ tst r0,r0
78.4376 ++ bt 1f
78.4377 ++ add #1,r3
78.4378 ++1:
78.4379 ++ mov r15,r0
78.4380 ++ and #7,r0
78.4381 ++ tst r0,r0
78.4382 ++ bt 2f
78.4383 ++ add #4,r15
78.4384 ++2:
78.4385 ++ mov #12,r0
78.4386 ++ cmp/hs r0,r3
78.4387 ++ bt/s 3f
78.4388 ++ shlr2 r1
78.4389 ++ bsr L_pop_d
78.4390 ++ nop
78.4391 ++3:
78.4392 ++ add #2,r3
78.4393 ++ bra L_pass
78.4394 ++ add #-8,r8
78.4395 ++
78.4396 ++L_pop_d:
78.4397 ++ mov r3,r0
78.4398 ++ add r0,r0
78.4399 ++ add r3,r0
78.4400 ++ add #-12,r0
78.4401 ++ braf r0
78.4402 ++ nop
78.4403 ++#ifdef __LITTLE_ENDIAN__
78.4404 ++ fmov.s @r15+,fr5
78.4405 ++ rts
78.4406 ++ fmov.s @r15+,fr4
78.4407 ++ fmov.s @r15+,fr7
78.4408 ++ rts
78.4409 ++ fmov.s @r15+,fr6
78.4410 ++ fmov.s @r15+,fr9
78.4411 ++ rts
78.4412 ++ fmov.s @r15+,fr8
78.4413 ++ fmov.s @r15+,fr11
78.4414 ++ rts
78.4415 ++ fmov.s @r15+,fr10
78.4416 ++#else
78.4417 ++ fmov.s @r15+,fr4
78.4418 ++ rts
78.4419 ++ fmov.s @r15+,fr5
78.4420 ++ fmov.s @r15+,fr6
78.4421 ++ rts
78.4422 ++ fmov.s @r15+,fr7
78.4423 ++ fmov.s @r15+,fr8
78.4424 ++ rts
78.4425 ++ fmov.s @r15+,fr9
78.4426 ++ fmov.s @r15+,fr10
78.4427 ++ rts
78.4428 ++ fmov.s @r15+,fr11
78.4429 ++#endif
78.4430 ++
78.4431 ++L_pass_f:
78.4432 ++ cmp/eq #FFI_TYPE_FLOAT,r0
78.4433 ++ bf L_pass_i
78.4434 ++
78.4435 ++ mov #12,r0
78.4436 ++ cmp/hs r0,r3
78.4437 ++ bt/s 2f
78.4438 ++ shlr2 r1
78.4439 ++ bsr L_pop_f
78.4440 ++ nop
78.4441 ++2:
78.4442 ++ add #1,r3
78.4443 ++ bra L_pass
78.4444 ++ add #-4,r8
78.4445 ++
78.4446 ++L_pop_f:
78.4447 ++ mov r3,r0
78.4448 ++ shll2 r0
78.4449 ++ add #-16,r0
78.4450 ++ braf r0
78.4451 ++ nop
78.4452 ++#ifdef __LITTLE_ENDIAN__
78.4453 ++ rts
78.4454 ++ fmov.s @r15+,fr5
78.4455 ++ rts
78.4456 ++ fmov.s @r15+,fr4
78.4457 ++ rts
78.4458 ++ fmov.s @r15+,fr7
78.4459 ++ rts
78.4460 ++ fmov.s @r15+,fr6
78.4461 ++ rts
78.4462 ++ fmov.s @r15+,fr9
78.4463 ++ rts
78.4464 ++ fmov.s @r15+,fr8
78.4465 ++ rts
78.4466 ++ fmov.s @r15+,fr11
78.4467 ++ rts
78.4468 ++ fmov.s @r15+,fr10
78.4469 ++#else
78.4470 ++ rts
78.4471 ++ fmov.s @r15+,fr4
78.4472 ++ rts
78.4473 ++ fmov.s @r15+,fr5
78.4474 ++ rts
78.4475 ++ fmov.s @r15+,fr6
78.4476 ++ rts
78.4477 ++ fmov.s @r15+,fr7
78.4478 ++ rts
78.4479 ++ fmov.s @r15+,fr8
78.4480 ++ rts
78.4481 ++ fmov.s @r15+,fr9
78.4482 ++ rts
78.4483 ++ fmov.s @r15+,fr10
78.4484 ++ rts
78.4485 ++ fmov.s @r15+,fr11
78.4486 ++#endif
78.4487 ++
78.4488 ++L_pass_i:
78.4489 ++ cmp/eq #FFI_TYPE_INT,r0
78.4490 ++ bf L_call_it
78.4491 ++
78.4492 ++ mov #8,r0
78.4493 ++ cmp/hs r0,r2
78.4494 ++ bt/s 2f
78.4495 ++ shlr2 r1
78.4496 ++ bsr L_pop_i
78.4497 ++ nop
78.4498 ++2:
78.4499 ++ add #1,r2
78.4500 ++ bra L_pass
78.4501 ++ add #-4,r8
78.4502 ++
78.4503 ++L_pop_i:
78.4504 ++ mov r2,r0
78.4505 ++ shll2 r0
78.4506 ++ add #-16,r0
78.4507 ++ braf r0
78.4508 ++ nop
78.4509 ++ rts
78.4510 ++ mov.l @r15+,r4
78.4511 ++ rts
78.4512 ++ mov.l @r15+,r5
78.4513 ++ rts
78.4514 ++ mov.l @r15+,r6
78.4515 ++ rts
78.4516 ++ mov.l @r15+,r7
78.4517 ++
78.4518 ++L_call_it:
78.4519 ++ # call function
78.4520 ++#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
78.4521 ++ mov r10, r2
78.4522 ++#endif
78.4523 ++ mov.l @(28,r14),r1
78.4524 ++ jsr @r1
78.4525 ++ nop
78.4526 ++
78.4527 ++L_ret_d:
78.4528 ++ mov #FFI_TYPE_DOUBLE,r2
78.4529 ++ cmp/eq r2,r9
78.4530 ++ bf L_ret_ll
78.4531 ++
78.4532 ++ mov.l @(24,r14),r1
78.4533 ++#ifdef __LITTLE_ENDIAN__
78.4534 ++ fmov.s fr1,@r1
78.4535 ++ add #4,r1
78.4536 ++ bra L_epilogue
78.4537 ++ fmov.s fr0,@r1
78.4538 ++#else
78.4539 ++ fmov.s fr0,@r1
78.4540 ++ add #4,r1
78.4541 ++ bra L_epilogue
78.4542 ++ fmov.s fr1,@r1
78.4543 ++#endif
78.4544 ++
78.4545 ++L_ret_ll:
78.4546 ++ mov #FFI_TYPE_SINT64,r2
78.4547 ++ cmp/eq r2,r9
78.4548 ++ bt/s 1f
78.4549 ++ mov #FFI_TYPE_UINT64,r2
78.4550 ++ cmp/eq r2,r9
78.4551 ++ bf L_ret_f
78.4552 ++
78.4553 ++1:
78.4554 ++ mov.l @(24,r14),r2
78.4555 ++ mov.l r0,@r2
78.4556 ++ bra L_epilogue
78.4557 ++ mov.l r1,@(4,r2)
78.4558 ++
78.4559 ++L_ret_f:
78.4560 ++ mov #FFI_TYPE_FLOAT,r2
78.4561 ++ cmp/eq r2,r9
78.4562 ++ bf L_ret_i
78.4563 ++
78.4564 ++ mov.l @(24,r14),r1
78.4565 ++ bra L_epilogue
78.4566 ++ fmov.s fr0,@r1
78.4567 ++
78.4568 ++L_ret_i:
78.4569 ++ mov #FFI_TYPE_INT,r2
78.4570 ++ cmp/eq r2,r9
78.4571 ++ bf L_epilogue
78.4572 ++
78.4573 ++ mov.l @(24,r14),r1
78.4574 ++ bra L_epilogue
78.4575 ++ mov.l r0,@r1
78.4576 ++
78.4577 ++L_epilogue:
78.4578 ++ # Remove the space we pushed for the args
78.4579 ++ mov r14,r15
78.4580 ++
78.4581 ++ lds.l @r15+,pr
78.4582 ++ mov.l @r15+,r14
78.4583 ++ mov.l @r15+,r12
78.4584 ++ mov.l @r15+,r10
78.4585 ++ mov.l @r15+,r9
78.4586 ++ rts
78.4587 ++ mov.l @r15+,r8
78.4588 ++#else
78.4589 ++ mov r6,r8
78.4590 ++ mov r7,r9
78.4591 ++
78.4592 ++ sub r6,r15
78.4593 ++ add #-16,r15
78.4594 ++ mov #~7,r0
78.4595 ++ and r0,r15
78.4596 ++
78.4597 ++ mov r4,r0
78.4598 ++ jsr @r0
78.4599 ++ mov r15,r4
78.4600 ++
78.4601 ++ mov r9,r3
78.4602 ++ shlr8 r9
78.4603 ++ shlr8 r9
78.4604 ++ shlr8 r9
78.4605 ++
78.4606 ++ mov #FFI_TYPE_STRUCT,r2
78.4607 ++ cmp/eq r2,r9
78.4608 ++ bf 1f
78.4609 ++#if STRUCT_VALUE_ADDRESS_WITH_ARG
78.4610 ++ mov.l @r15+,r4
78.4611 ++ bra 2f
78.4612 ++ mov #5,r2
78.4613 ++#else
78.4614 ++ mov.l @r15+,r10
78.4615 ++#endif
78.4616 ++1:
78.4617 ++ mov #4,r2
78.4618 ++2:
78.4619 ++
78.4620 ++L_pass:
78.4621 ++ cmp/pl r8
78.4622 ++ bf L_call_it
78.4623 ++
78.4624 ++ mov r3,r0
78.4625 ++ and #3,r0
78.4626 ++
78.4627 ++L_pass_d:
78.4628 ++ cmp/eq #FFI_TYPE_DOUBLE,r0
78.4629 ++ bf L_pass_i
78.4630 ++
78.4631 ++ mov r15,r0
78.4632 ++ and #7,r0
78.4633 ++ tst r0,r0
78.4634 ++ bt 1f
78.4635 ++ add #4,r15
78.4636 ++1:
78.4637 ++ mov #8,r0
78.4638 ++ cmp/hs r0,r2
78.4639 ++ bt/s 2f
78.4640 ++ shlr2 r3
78.4641 ++ bsr L_pop_d
78.4642 ++ nop
78.4643 ++2:
78.4644 ++ add #2,r2
78.4645 ++ bra L_pass
78.4646 ++ add #-8,r8
78.4647 ++
78.4648 ++L_pop_d:
78.4649 ++ mov r2,r0
78.4650 ++ add r0,r0
78.4651 ++ add r2,r0
78.4652 ++ add #-12,r0
78.4653 ++ add r0,r0
78.4654 ++ braf r0
78.4655 ++ nop
78.4656 ++ mov.l @r15+,r4
78.4657 ++ rts
78.4658 ++ mov.l @r15+,r5
78.4659 ++ mov.l @r15+,r5
78.4660 ++ rts
78.4661 ++ mov.l @r15+,r6
78.4662 ++ mov.l @r15+,r6
78.4663 ++ rts
78.4664 ++ mov.l @r15+,r7
78.4665 ++ rts
78.4666 ++ mov.l @r15+,r7
78.4667 ++
78.4668 ++L_pass_i:
78.4669 ++ mov #8,r0
78.4670 ++ cmp/hs r0,r2
78.4671 ++ bt/s 2f
78.4672 ++ shlr2 r3
78.4673 ++ bsr L_pop_i
78.4674 ++ nop
78.4675 ++2:
78.4676 ++ add #1,r2
78.4677 ++ bra L_pass
78.4678 ++ add #-4,r8
78.4679 ++
78.4680 ++L_pop_i:
78.4681 ++ mov r2,r0
78.4682 ++ shll2 r0
78.4683 ++ add #-16,r0
78.4684 ++ braf r0
78.4685 ++ nop
78.4686 ++ rts
78.4687 ++ mov.l @r15+,r4
78.4688 ++ rts
78.4689 ++ mov.l @r15+,r5
78.4690 ++ rts
78.4691 ++ mov.l @r15+,r6
78.4692 ++ rts
78.4693 ++ mov.l @r15+,r7
78.4694 ++
78.4695 ++L_call_it:
78.4696 ++ # call function
78.4697 ++#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
78.4698 ++ mov r10, r2
78.4699 ++#endif
78.4700 ++ mov.l @(28,r14),r1
78.4701 ++ jsr @r1
78.4702 ++ nop
78.4703 ++
78.4704 ++L_ret_d:
78.4705 ++ mov #FFI_TYPE_DOUBLE,r2
78.4706 ++ cmp/eq r2,r9
78.4707 ++ bf L_ret_ll
78.4708 ++
78.4709 ++ mov.l @(24,r14),r2
78.4710 ++ mov.l r0,@r2
78.4711 ++ bra L_epilogue
78.4712 ++ mov.l r1,@(4,r2)
78.4713 ++
78.4714 ++L_ret_ll:
78.4715 ++ mov #FFI_TYPE_SINT64,r2
78.4716 ++ cmp/eq r2,r9
78.4717 ++ bt/s 1f
78.4718 ++ mov #FFI_TYPE_UINT64,r2
78.4719 ++ cmp/eq r2,r9
78.4720 ++ bf L_ret_i
78.4721 ++
78.4722 ++1:
78.4723 ++ mov.l @(24,r14),r2
78.4724 ++ mov.l r0,@r2
78.4725 ++ bra L_epilogue
78.4726 ++ mov.l r1,@(4,r2)
78.4727 ++
78.4728 ++L_ret_i:
78.4729 ++ mov #FFI_TYPE_FLOAT,r2
78.4730 ++ cmp/eq r2,r9
78.4731 ++ bt 1f
78.4732 ++ mov #FFI_TYPE_INT,r2
78.4733 ++ cmp/eq r2,r9
78.4734 ++ bf L_epilogue
78.4735 ++1:
78.4736 ++ mov.l @(24,r14),r1
78.4737 ++ bra L_epilogue
78.4738 ++ mov.l r0,@r1
78.4739 ++
78.4740 ++L_epilogue:
78.4741 ++ # Remove the space we pushed for the args
78.4742 ++ mov r14,r15
78.4743 ++
78.4744 ++ lds.l @r15+,pr
78.4745 ++ mov.l @r15+,r14
78.4746 ++ mov.l @r15+,r12
78.4747 ++ mov.l @r15+,r10
78.4748 ++ mov.l @r15+,r9
78.4749 ++ rts
78.4750 ++ mov.l @r15+,r8
78.4751 ++#endif
78.4752 ++.LFE1:
78.4753 ++.ffi_call_SYSV_end:
78.4754 ++ .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
78.4755 ++
78.4756 ++.globl ffi_closure_helper_SYSV
78.4757 ++
78.4758 ++ENTRY(ffi_closure_SYSV)
78.4759 ++.LFB2:
78.4760 ++ mov.l r14,@-r15
78.4761 ++.LCFI7:
78.4762 ++ sts.l pr,@-r15
78.4763 ++
78.4764 ++ /* Stack layout:
78.4765 ++ ...
78.4766 ++ 32 bytes (floating register parameters, SH-4 only)
78.4767 ++ 16 bytes (register parameters)
78.4768 ++ 4 bytes (result)
78.4769 ++ 4 bytes (5th arg)
78.4770 ++ <- new stack pointer
78.4771 ++ */
78.4772 ++.LCFI8:
78.4773 ++#if defined(__SH4__)
78.4774 ++ add #-56,r15
78.4775 ++#else
78.4776 ++ add #-24,r15
78.4777 ++#endif
78.4778 ++.LCFI9:
78.4779 ++ mov r15,r14
78.4780 ++.LCFIA:
78.4781 ++ mov r14,r1
78.4782 ++ add #24,r1
78.4783 ++ mov.l r7,@-r1
78.4784 ++ mov.l r6,@-r1
78.4785 ++ mov.l r5,@-r1
78.4786 ++ mov.l r4,@-r1
78.4787 ++ mov r1,r6
78.4788 ++
78.4789 ++#if defined(__SH4__)
78.4790 ++ mov r14,r1
78.4791 ++ add #56,r1
78.4792 ++#ifdef __LITTLE_ENDIAN__
78.4793 ++ fmov.s fr10,@-r1
78.4794 ++ fmov.s fr11,@-r1
78.4795 ++ fmov.s fr8,@-r1
78.4796 ++ fmov.s fr9,@-r1
78.4797 ++ fmov.s fr6,@-r1
78.4798 ++ fmov.s fr7,@-r1
78.4799 ++ fmov.s fr4,@-r1
78.4800 ++ fmov.s fr5,@-r1
78.4801 ++#else
78.4802 ++ fmov.s fr11,@-r1
78.4803 ++ fmov.s fr10,@-r1
78.4804 ++ fmov.s fr9,@-r1
78.4805 ++ fmov.s fr8,@-r1
78.4806 ++ fmov.s fr7,@-r1
78.4807 ++ fmov.s fr6,@-r1
78.4808 ++ fmov.s fr5,@-r1
78.4809 ++ fmov.s fr4,@-r1
78.4810 ++#endif
78.4811 ++ mov r1,r7
78.4812 ++#endif
78.4813 ++
78.4814 ++ mov r14,r1
78.4815 ++ add #4,r1
78.4816 ++ mov r1,r5
78.4817 ++
78.4818 ++ mov r14,r1
78.4819 ++#if defined(__SH4__)
78.4820 ++ add #64,r1
78.4821 ++#else
78.4822 ++ add #32,r1
78.4823 ++#endif
78.4824 ++ mov.l r1,@r14
78.4825 ++
78.4826 ++ mov.l L_helper,r0
78.4827 ++ jsr @r0
78.4828 ++ mov r3,r4
78.4829 ++
78.4830 ++ shll r0
78.4831 ++ mov r0,r1
78.4832 ++ mova L_table,r0
78.4833 ++ add r1,r0
78.4834 ++ mov.w @r0,r0
78.4835 ++ mov r14,r2
78.4836 ++ braf r0
78.4837 ++ add #4,r2
78.4838 ++0:
78.4839 ++ .align 2
78.4840 ++L_helper:
78.4841 ++ .long ffi_closure_helper_SYSV
78.4842 ++L_table:
78.4843 ++ .short L_case_v - 0b /* FFI_TYPE_VOID */
78.4844 ++ .short L_case_i - 0b /* FFI_TYPE_INT */
78.4845 ++#if defined(__SH4__)
78.4846 ++ .short L_case_f - 0b /* FFI_TYPE_FLOAT */
78.4847 ++ .short L_case_d - 0b /* FFI_TYPE_DOUBLE */
78.4848 ++ .short L_case_d - 0b /* FFI_TYPE_LONGDOUBLE */
78.4849 ++#else
78.4850 ++ .short L_case_i - 0b /* FFI_TYPE_FLOAT */
78.4851 ++ .short L_case_ll - 0b /* FFI_TYPE_DOUBLE */
78.4852 ++ .short L_case_ll - 0b /* FFI_TYPE_LONGDOUBLE */
78.4853 ++#endif
78.4854 ++ .short L_case_uq - 0b /* FFI_TYPE_UINT8 */
78.4855 ++ .short L_case_q - 0b /* FFI_TYPE_SINT8 */
78.4856 ++ .short L_case_uh - 0b /* FFI_TYPE_UINT16 */
78.4857 ++ .short L_case_h - 0b /* FFI_TYPE_SINT16 */
78.4858 ++ .short L_case_i - 0b /* FFI_TYPE_UINT32 */
78.4859 ++ .short L_case_i - 0b /* FFI_TYPE_SINT32 */
78.4860 ++ .short L_case_ll - 0b /* FFI_TYPE_UINT64 */
78.4861 ++ .short L_case_ll - 0b /* FFI_TYPE_SINT64 */
78.4862 ++ .short L_case_v - 0b /* FFI_TYPE_STRUCT */
78.4863 ++ .short L_case_i - 0b /* FFI_TYPE_POINTER */
78.4864 ++
78.4865 ++#if defined(__SH4__)
78.4866 ++L_case_d:
78.4867 ++#ifdef __LITTLE_ENDIAN__
78.4868 ++ fmov.s @r2+,fr1
78.4869 ++ bra L_case_v
78.4870 ++ fmov.s @r2,fr0
78.4871 ++#else
78.4872 ++ fmov.s @r2+,fr0
78.4873 ++ bra L_case_v
78.4874 ++ fmov.s @r2,fr1
78.4875 ++#endif
78.4876 ++
78.4877 ++L_case_f:
78.4878 ++ bra L_case_v
78.4879 ++ fmov.s @r2,fr0
78.4880 ++#endif
78.4881 ++
78.4882 ++L_case_ll:
78.4883 ++ mov.l @r2+,r0
78.4884 ++ bra L_case_v
78.4885 ++ mov.l @r2,r1
78.4886 ++
78.4887 ++L_case_i:
78.4888 ++ bra L_case_v
78.4889 ++ mov.l @r2,r0
78.4890 ++
78.4891 ++L_case_q:
78.4892 ++#ifdef __LITTLE_ENDIAN__
78.4893 ++#else
78.4894 ++ add #3,r2
78.4895 ++#endif
78.4896 ++ bra L_case_v
78.4897 ++ mov.b @r2,r0
78.4898 ++
78.4899 ++L_case_uq:
78.4900 ++#ifdef __LITTLE_ENDIAN__
78.4901 ++#else
78.4902 ++ add #3,r2
78.4903 ++#endif
78.4904 ++ mov.b @r2,r0
78.4905 ++ bra L_case_v
78.4906 ++ extu.b r0,r0
78.4907 ++
78.4908 ++L_case_h:
78.4909 ++#ifdef __LITTLE_ENDIAN__
78.4910 ++#else
78.4911 ++ add #2,r2
78.4912 ++#endif
78.4913 ++ bra L_case_v
78.4914 ++ mov.w @r2,r0
78.4915 ++
78.4916 ++L_case_uh:
78.4917 ++#ifdef __LITTLE_ENDIAN__
78.4918 ++#else
78.4919 ++ add #2,r2
78.4920 ++#endif
78.4921 ++ mov.w @r2,r0
78.4922 ++ extu.w r0,r0
78.4923 ++ /* fall through */
78.4924 ++
78.4925 ++L_case_v:
78.4926 ++#if defined(__SH4__)
78.4927 ++ add #56,r15
78.4928 ++#else
78.4929 ++ add #24,r15
78.4930 ++#endif
78.4931 ++ lds.l @r15+,pr
78.4932 ++ rts
78.4933 ++ mov.l @r15+,r14
78.4934 ++.LFE2:
78.4935 ++.ffi_closure_SYSV_end:
78.4936 ++ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
78.4937 ++
78.4938 ++ .section ".eh_frame","aw",@progbits
78.4939 ++__FRAME_BEGIN__:
78.4940 ++ .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */
78.4941 ++.LSCIE1:
78.4942 ++ .4byte 0x0 /* CIE Identifier Tag */
78.4943 ++ .byte 0x1 /* CIE Version */
78.4944 ++ .byte 0x0 /* CIE Augmentation */
78.4945 ++ .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */
78.4946 ++ .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */
78.4947 ++ .byte 0x11 /* CIE RA Column */
78.4948 ++ .byte 0xc /* DW_CFA_def_cfa */
78.4949 ++ .byte 0xf /* uleb128 0xf */
78.4950 ++ .byte 0x0 /* uleb128 0x0 */
78.4951 ++ .align 2
78.4952 ++.LECIE1:
78.4953 ++.LSFDE1:
78.4954 ++ .4byte .LEFDE1-.LASFDE1 /* FDE Length */
78.4955 ++.LASFDE1:
78.4956 ++ .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */
78.4957 ++ .4byte .LFB1 /* FDE initial location */
78.4958 ++ .4byte .LFE1-.LFB1 /* FDE address range */
78.4959 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4960 ++ .4byte .LCFI0-.LFB1
78.4961 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4962 ++ .byte 0x4 /* uleb128 0x4 */
78.4963 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4964 ++ .4byte .LCFI1-.LCFI0
78.4965 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4966 ++ .byte 0x8 /* uleb128 0x4 */
78.4967 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4968 ++ .4byte .LCFI2-.LCFI1
78.4969 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4970 ++ .byte 0xc /* uleb128 0x4 */
78.4971 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4972 ++ .4byte .LCFI3-.LCFI2
78.4973 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4974 ++ .byte 0x10 /* uleb128 0x4 */
78.4975 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4976 ++ .4byte .LCFI4-.LCFI3
78.4977 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4978 ++ .byte 0x14 /* uleb128 0x4 */
78.4979 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4980 ++ .4byte .LCFI5-.LCFI4
78.4981 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.4982 ++ .byte 0x18 /* uleb128 0x4 */
78.4983 ++ .byte 0x91 /* DW_CFA_offset, column 0x11 */
78.4984 ++ .byte 0x6 /* uleb128 0x6 */
78.4985 ++ .byte 0x8e /* DW_CFA_offset, column 0xe */
78.4986 ++ .byte 0x5 /* uleb128 0x5 */
78.4987 ++ .byte 0x8c /* DW_CFA_offset, column 0xc */
78.4988 ++ .byte 0x4 /* uleb128 0x4 */
78.4989 ++ .byte 0x8a /* DW_CFA_offset, column 0xa */
78.4990 ++ .byte 0x3 /* uleb128 0x3 */
78.4991 ++ .byte 0x89 /* DW_CFA_offset, column 0x9 */
78.4992 ++ .byte 0x2 /* uleb128 0x2 */
78.4993 ++ .byte 0x88 /* DW_CFA_offset, column 0x8 */
78.4994 ++ .byte 0x1 /* uleb128 0x1 */
78.4995 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.4996 ++ .4byte .LCFI6-.LCFI5
78.4997 ++ .byte 0xd /* DW_CFA_def_cfa_register */
78.4998 ++ .byte 0xe /* uleb128 0xe */
78.4999 ++ .align 2
78.5000 ++.LEFDE1:
78.5001 ++
78.5002 ++.LSFDE3:
78.5003 ++ .4byte .LEFDE3-.LASFDE3 /* FDE Length */
78.5004 ++.LASFDE3:
78.5005 ++ .4byte .LASFDE3-__FRAME_BEGIN__ /* FDE CIE offset */
78.5006 ++ .4byte .LFB2 /* FDE initial location */
78.5007 ++ .4byte .LFE2-.LFB2 /* FDE address range */
78.5008 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.5009 ++ .4byte .LCFI7-.LFB2
78.5010 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.5011 ++ .byte 0x4 /* uleb128 0x4 */
78.5012 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.5013 ++ .4byte .LCFI8-.LCFI7
78.5014 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.5015 ++ .byte 0x8 /* uleb128 0x8 */
78.5016 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.5017 ++ .4byte .LCFI9-.LCFI8
78.5018 ++ .byte 0xe /* DW_CFA_def_cfa_offset */
78.5019 ++#if defined(__SH4__)
78.5020 ++ .byte 8+56 /* uleb128 8+56 */
78.5021 ++#else
78.5022 ++ .byte 8+24 /* uleb128 8+24 */
78.5023 ++#endif
78.5024 ++ .byte 0x91 /* DW_CFA_offset, column 0x11 */
78.5025 ++ .byte 0x2
78.5026 ++ .byte 0x8e /* DW_CFA_offset, column 0xe */
78.5027 ++ .byte 0x1
78.5028 ++ .byte 0x4 /* DW_CFA_advance_loc4 */
78.5029 ++ .4byte .LCFIA-.LCFI9
78.5030 ++ .byte 0xd /* DW_CFA_def_cfa_register */
78.5031 ++ .byte 0xe /* uleb128 0xe */
78.5032 ++ .align 2
78.5033 ++.LEFDE3:
78.5034 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/ffi.c gcc/libffi/src/sparc/ffi.c
78.5035 +--- gcc-3.2.2.orig/libffi/src/sparc/ffi.c Sat Mar 3 07:21:23 2001
78.5036 ++++ gcc/libffi/src/sparc/ffi.c Sat Jan 4 08:08:56 2003
78.5037 +@@ -1,5 +1,5 @@
78.5038 + /* -----------------------------------------------------------------------
78.5039 +- ffi.c - Copyright (c) 1996 Cygnus Solutions
78.5040 ++ ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions
78.5041 +
78.5042 + Sparc Foreign Function Interface
78.5043 +
78.5044 +@@ -28,20 +28,22 @@
78.5045 +
78.5046 + #include <stdlib.h>
78.5047 +
78.5048 ++#ifdef SPARC64
78.5049 ++extern void ffi_closure_v9(void);
78.5050 ++#else
78.5051 ++extern void ffi_closure_v8(void);
78.5052 ++#endif
78.5053 ++
78.5054 + /* ffi_prep_args is called by the assembly routine once stack space
78.5055 + has been allocated for the function's arguments */
78.5056 +
78.5057 + void ffi_prep_args_v8(char *stack, extended_cif *ecif)
78.5058 + {
78.5059 + int i;
78.5060 +- int tmp;
78.5061 +- int avn;
78.5062 + void **p_argv;
78.5063 + char *argp;
78.5064 + ffi_type **p_arg;
78.5065 +
78.5066 +- tmp = 0;
78.5067 +-
78.5068 + /* Skip 16 words for the window save area */
78.5069 + argp = stack + 16*sizeof(int);
78.5070 +
78.5071 +@@ -66,18 +68,12 @@
78.5072 + ((int*)argp)[5] = 0;
78.5073 + #endif
78.5074 +
78.5075 +- avn = ecif->cif->nargs;
78.5076 + p_argv = ecif->avalue;
78.5077 +
78.5078 +- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
78.5079 +- i && avn;
78.5080 +- i--, p_arg++)
78.5081 ++ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
78.5082 + {
78.5083 + size_t z;
78.5084 +
78.5085 +- if (avn)
78.5086 +- {
78.5087 +- avn--;
78.5088 + if ((*p_arg)->type == FFI_TYPE_STRUCT
78.5089 + #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
78.5090 + || (*p_arg)->type == FFI_TYPE_LONGDOUBLE
78.5091 +@@ -122,7 +118,6 @@
78.5092 + }
78.5093 + p_argv++;
78.5094 + argp += z;
78.5095 +- }
78.5096 + }
78.5097 +
78.5098 + return;
78.5099 +@@ -420,3 +415,101 @@
78.5100 + }
78.5101 +
78.5102 + }
78.5103 ++
78.5104 ++ffi_status
78.5105 ++ffi_prep_closure (ffi_closure* closure,
78.5106 ++ ffi_cif* cif,
78.5107 ++ void (*fun)(ffi_cif*, void*, void**, void*),
78.5108 ++ void *user_data)
78.5109 ++{
78.5110 ++ unsigned int *tramp = (unsigned int *) &closure->tramp[0];
78.5111 ++ unsigned long fn;
78.5112 ++ unsigned long ctx = (unsigned long) closure;
78.5113 ++
78.5114 ++#ifdef SPARC64
78.5115 ++ /* Trampoline address is equal to the closure address. We take advantage
78.5116 ++ of that to reduce the trampoline size by 8 bytes. */
78.5117 ++ FFI_ASSERT (cif->abi == FFI_V9);
78.5118 ++ fn = (unsigned long) ffi_closure_v9;
78.5119 ++ tramp[0] = 0x83414000; /* rd %pc, %g1 */
78.5120 ++ tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */
78.5121 ++ tramp[2] = 0x81c14000; /* jmp %g5 */
78.5122 ++ tramp[3] = 0x01000000; /* nop */
78.5123 ++ *((unsigned long *) &tramp[4]) = fn;
78.5124 ++#else
78.5125 ++ FFI_ASSERT (cif->abi == FFI_V8);
78.5126 ++ fn = (unsigned long) ffi_closure_v8;
78.5127 ++ tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */
78.5128 ++ tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */
78.5129 ++ tramp[2] = 0x81c06000 | (fn & 0x3ff); /* jmp %g1+%lo(fn) */
78.5130 ++ tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or %g2, %lo(ctx) */
78.5131 ++#endif
78.5132 ++
78.5133 ++ closure->cif = cif;
78.5134 ++ closure->fun = fun;
78.5135 ++ closure->user_data = user_data;
78.5136 ++
78.5137 ++ /* Flush the Icache. FIXME: alignment isn't certain, assume 8 bytes */
78.5138 ++#ifdef SPARC64
78.5139 ++ asm volatile ("flush %0" : : "r" (closure) : "memory");
78.5140 ++ asm volatile ("flush %0" : : "r" (((char *) closure) + 8) : "memory");
78.5141 ++#else
78.5142 ++ asm volatile ("iflush %0" : : "r" (closure) : "memory");
78.5143 ++ asm volatile ("iflush %0" : : "r" (((char *) closure) + 8) : "memory");
78.5144 ++#endif
78.5145 ++
78.5146 ++ return FFI_OK;
78.5147 ++}
78.5148 ++
78.5149 ++int
78.5150 ++ffi_closure_sparc_inner(ffi_closure *closure,
78.5151 ++ void *rvalue, unsigned long *gpr, double *fpr)
78.5152 ++{
78.5153 ++ ffi_cif *cif;
78.5154 ++ void **avalue;
78.5155 ++ ffi_type **arg_types;
78.5156 ++ int i, avn, argn;
78.5157 ++
78.5158 ++ cif = closure->cif;
78.5159 ++ avalue = alloca(cif->nargs * sizeof(void *));
78.5160 ++
78.5161 ++ argn = 0;
78.5162 ++
78.5163 ++ /* Copy the caller's structure return address to that the closure
78.5164 ++ returns the data directly to the caller. */
78.5165 ++ if (cif->flags == FFI_TYPE_STRUCT)
78.5166 ++ {
78.5167 ++ rvalue = (void *) gpr[0];
78.5168 ++ argn = 1;
78.5169 ++ }
78.5170 ++
78.5171 ++ i = 0;
78.5172 ++ avn = cif->nargs;
78.5173 ++ arg_types = cif->arg_types;
78.5174 ++
78.5175 ++ /* Grab the addresses of the arguments from the stack frame. */
78.5176 ++ while (i < avn)
78.5177 ++ {
78.5178 ++ /* Assume big-endian. FIXME */
78.5179 ++ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
78.5180 ++
78.5181 ++#ifdef SPARC64
78.5182 ++ if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT
78.5183 ++ || arg_types[i]->type == FFI_TYPE_DOUBLE
78.5184 ++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
78.5185 ++ || arg_types[i]->type == FFI_TYPE_LONGDOUBLE
78.5186 ++#endif
78.5187 ++ ))
78.5188 ++ avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size;
78.5189 ++ else
78.5190 ++#endif
78.5191 ++ avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size;
78.5192 ++ i++;
78.5193 ++ }
78.5194 ++
78.5195 ++ /* Invoke the closure. */
78.5196 ++ (closure->fun) (cif, rvalue, avalue, closure->user_data);
78.5197 ++
78.5198 ++ /* Tell ffi_closure_sparc how to perform return type promotions. */
78.5199 ++ return cif->rtype->type;
78.5200 ++}
78.5201 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v8.S gcc/libffi/src/sparc/v8.S
78.5202 +--- gcc-3.2.2.orig/libffi/src/sparc/v8.S Mon Apr 29 05:12:04 2002
78.5203 ++++ gcc/libffi/src/sparc/v8.S Sat Jan 4 08:08:56 2003
78.5204 +@@ -1,5 +1,5 @@
78.5205 + /* -----------------------------------------------------------------------
78.5206 +- v8.S - Copyright (c) 1996, 1997 Cygnus Solutions
78.5207 ++ v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions
78.5208 +
78.5209 + Sparc Foreign Function Interface
78.5210 +
78.5211 +@@ -94,6 +94,72 @@
78.5212 + .ffi_call_V8_end:
78.5213 + .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
78.5214 +
78.5215 ++
78.5216 ++#define STACKFRAME 104 /* 16*4 register window +
78.5217 ++ 1*4 struct return +
78.5218 ++ 6*4 args backing store +
78.5219 ++ 3*4 locals */
78.5220 ++
78.5221 ++/* ffi_closure_v8(...)
78.5222 ++
78.5223 ++ Receives the closure argument in %g2. */
78.5224 ++
78.5225 ++ .text
78.5226 ++ .align 8
78.5227 ++ .globl ffi_closure_v8
78.5228 ++
78.5229 ++ffi_closure_v8:
78.5230 ++ .register %g2, #scratch
78.5231 ++.LLFB2:
78.5232 ++ save %sp, -STACKFRAME, %sp
78.5233 ++.LLCFI1:
78.5234 ++
78.5235 ++ ! Store all of the potential argument registers in va_list format.
78.5236 ++ st %i0, [%fp+68+0]
78.5237 ++ st %i1, [%fp+68+4]
78.5238 ++ st %i2, [%fp+68+8]
78.5239 ++ st %i3, [%fp+68+12]
78.5240 ++ st %i4, [%fp+68+16]
78.5241 ++ st %i5, [%fp+68+20]
78.5242 ++
78.5243 ++ ! Call ffi_closure_sparc_inner to do the bulk of the work.
78.5244 ++ mov %g2, %o0
78.5245 ++ add %fp, -8, %o1
78.5246 ++ add %fp, 68, %o2
78.5247 ++ call ffi_closure_sparc_inner
78.5248 ++ mov 0, %o3
78.5249 ++
78.5250 ++ ! Load up the return value in the proper type.
78.5251 ++ cmp %o0, FFI_TYPE_VOID
78.5252 ++ be done1
78.5253 ++
78.5254 ++ cmp %o0, FFI_TYPE_FLOAT
78.5255 ++ be,a done1
78.5256 ++ ld [%fp-8], %f0
78.5257 ++
78.5258 ++ cmp %o0, FFI_TYPE_DOUBLE
78.5259 ++ be,a done1
78.5260 ++ ldd [%fp-8], %f0
78.5261 ++
78.5262 ++ cmp %o0, FFI_TYPE_SINT64
78.5263 ++ be,a integer
78.5264 ++ ld [%fp-4], %i1
78.5265 ++
78.5266 ++ cmp %o0, FFI_TYPE_UINT64
78.5267 ++ be,a integer
78.5268 ++ ld [%fp-4], %i1
78.5269 ++
78.5270 ++integer:
78.5271 ++ ld [%fp-8], %i0
78.5272 ++
78.5273 ++done1:
78.5274 ++ ret
78.5275 ++ restore
78.5276 ++.LLFE2:
78.5277 ++
78.5278 ++.ffi_closure_v8_end:
78.5279 ++ .size ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8
78.5280 ++
78.5281 + #ifdef SPARC64
78.5282 + #define WS 8
78.5283 + #define nword xword
78.5284 +@@ -148,3 +214,26 @@
78.5285 + .byte 0x1f ! uleb128 0x1f
78.5286 + .align WS
78.5287 + .LLEFDE1:
78.5288 ++.LLSFDE2:
78.5289 ++ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
78.5290 ++.LLASFDE2:
78.5291 ++ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
78.5292 ++#ifdef HAVE_AS_SPARC_UA_PCREL
78.5293 ++ .uaword %r_disp32(.LLFB2)
78.5294 ++ .uaword .LLFE2-.LLFB2 ! FDE address range
78.5295 ++#else
78.5296 ++ .align WS
78.5297 ++ .nword .LLFB2
78.5298 ++ .uanword .LLFE2-.LLFB2 ! FDE address range
78.5299 ++#endif
78.5300 ++ .byte 0x0 ! uleb128 0x0; Augmentation size
78.5301 ++ .byte 0x4 ! DW_CFA_advance_loc4
78.5302 ++ .uaword .LLCFI1-.LLFB2
78.5303 ++ .byte 0xd ! DW_CFA_def_cfa_register
78.5304 ++ .byte 0x1e ! uleb128 0x1e
78.5305 ++ .byte 0x2d ! DW_CFA_GNU_window_save
78.5306 ++ .byte 0x9 ! DW_CFA_register
78.5307 ++ .byte 0xf ! uleb128 0xf
78.5308 ++ .byte 0x1f ! uleb128 0x1f
78.5309 ++ .align WS
78.5310 ++.LLEFDE2:
78.5311 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v9.S gcc/libffi/src/sparc/v9.S
78.5312 +--- gcc-3.2.2.orig/libffi/src/sparc/v9.S Mon Apr 29 05:12:04 2002
78.5313 ++++ gcc/libffi/src/sparc/v9.S Sat Jan 4 08:08:56 2003
78.5314 +@@ -1,5 +1,5 @@
78.5315 + /* -----------------------------------------------------------------------
78.5316 +- v9.S - Copyright (c) 2000 Cygnus Solutions
78.5317 ++ v9.S - Copyright (c) 2000, 2003 Cygnus Solutions
78.5318 +
78.5319 + Sparc 64bit Foreign Function Interface
78.5320 +
78.5321 +@@ -99,7 +99,7 @@
78.5322 + cmp %i3, FFI_TYPE_STRUCT
78.5323 + be,pn %icc, dostruct
78.5324 +
78.5325 +- cmp %i3, FFI_TYPE_LONGDOUBLE
78.5326 ++ cmp %i3, FFI_TYPE_LONGDOUBLE
78.5327 + bne,pt %icc, done
78.5328 + nop
78.5329 + std %f0, [%i4+0]
78.5330 +@@ -125,6 +125,88 @@
78.5331 + .ffi_call_V9_end:
78.5332 + .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
78.5333 +
78.5334 ++
78.5335 ++#define STACKFRAME 240 /* 16*8 register window +
78.5336 ++ 6*8 args backing store +
78.5337 ++ 8*8 locals */
78.5338 ++#define FP %fp+STACK_BIAS
78.5339 ++
78.5340 ++/* ffi_closure_v9(...)
78.5341 ++
78.5342 ++ Receives the closure argument in %g1. */
78.5343 ++
78.5344 ++ .text
78.5345 ++ .align 8
78.5346 ++ .globl ffi_closure_v9
78.5347 ++
78.5348 ++ffi_closure_v9:
78.5349 ++.LLFB2:
78.5350 ++ save %sp, -STACKFRAME, %sp
78.5351 ++.LLCFI1:
78.5352 ++
78.5353 ++ ! Store all of the potential argument registers in va_list format.
78.5354 ++ stx %i0, [FP+128+0]
78.5355 ++ stx %i1, [FP+128+8]
78.5356 ++ stx %i2, [FP+128+16]
78.5357 ++ stx %i3, [FP+128+24]
78.5358 ++ stx %i4, [FP+128+32]
78.5359 ++ stx %i5, [FP+128+40]
78.5360 ++
78.5361 ++ ! Store possible floating point argument registers too.
78.5362 ++ std %f0, [FP-48]
78.5363 ++ std %f2, [FP-40]
78.5364 ++ std %f4, [FP-32]
78.5365 ++ std %f6, [FP-24]
78.5366 ++ std %f8, [FP-16]
78.5367 ++ std %f10, [FP-8]
78.5368 ++
78.5369 ++ ! Call ffi_closure_sparc_inner to do the bulk of the work.
78.5370 ++ mov %g1, %o0
78.5371 ++ add %fp, STACK_BIAS-64, %o1
78.5372 ++ add %fp, STACK_BIAS+128, %o2
78.5373 ++ call ffi_closure_sparc_inner
78.5374 ++ add %fp, STACK_BIAS-48, %o3
78.5375 ++
78.5376 ++ ! Load up the return value in the proper type.
78.5377 ++ cmp %o0, FFI_TYPE_VOID
78.5378 ++ be,pn %icc, done1
78.5379 ++
78.5380 ++ cmp %o0, FFI_TYPE_FLOAT
78.5381 ++ be,a,pn %icc, done1
78.5382 ++ ld [FP-64], %f0
78.5383 ++
78.5384 ++ cmp %o0, FFI_TYPE_DOUBLE
78.5385 ++ be,a,pn %icc, done1
78.5386 ++ ldd [FP-64], %f0
78.5387 ++
78.5388 ++ cmp %o0, FFI_TYPE_LONGDOUBLE
78.5389 ++ be,a,pn %icc, longdouble1
78.5390 ++ ldd [FP-64], %f0
78.5391 ++
78.5392 ++ cmp %o0, FFI_TYPE_STRUCT
78.5393 ++ be,pn %icc, struct1
78.5394 ++
78.5395 ++ ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER
78.5396 ++ ldx [FP-64], %i0
78.5397 ++
78.5398 ++done1:
78.5399 ++ ret
78.5400 ++ restore
78.5401 ++
78.5402 ++struct1:
78.5403 ++ ldx [FP-56], %i2
78.5404 ++ ret
78.5405 ++ restore
78.5406 ++
78.5407 ++longdouble1:
78.5408 ++ ldd [FP-56], %f2
78.5409 ++ ret
78.5410 ++ restore
78.5411 ++.LLFE2:
78.5412 ++
78.5413 ++.ffi_closure_v9_end:
78.5414 ++ .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9
78.5415 ++
78.5416 + .section ".eh_frame",#alloc,#write
78.5417 + .LLframe1:
78.5418 + .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
78.5419 +@@ -169,5 +251,27 @@
78.5420 + .byte 0x1f ! uleb128 0x1f
78.5421 + .align 8
78.5422 + .LLEFDE1:
78.5423 +-
78.5424 ++.LLSFDE2:
78.5425 ++ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
78.5426 ++.LLASFDE2:
78.5427 ++ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
78.5428 ++#ifdef HAVE_AS_SPARC_UA_PCREL
78.5429 ++ .uaword %r_disp32(.LLFB2)
78.5430 ++ .uaword .LLFE2-.LLFB2 ! FDE address range
78.5431 ++#else
78.5432 ++ .align 8
78.5433 ++ .xword .LLFB2
78.5434 ++ .uaxword .LLFE2-.LLFB2 ! FDE address range
78.5435 ++#endif
78.5436 ++ .byte 0x0 ! uleb128 0x0; Augmentation size
78.5437 ++ .byte 0x4 ! DW_CFA_advance_loc4
78.5438 ++ .uaword .LLCFI1-.LLFB2
78.5439 ++ .byte 0xd ! DW_CFA_def_cfa_register
78.5440 ++ .byte 0x1e ! uleb128 0x1e
78.5441 ++ .byte 0x2d ! DW_CFA_GNU_window_save
78.5442 ++ .byte 0x9 ! DW_CFA_register
78.5443 ++ .byte 0xf ! uleb128 0xf
78.5444 ++ .byte 0x1f ! uleb128 0x1f
78.5445 ++ .align 8
78.5446 ++.LLEFDE2:
78.5447 + #endif
78.5448 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/types.c gcc/libffi/src/types.c
78.5449 +--- gcc-3.2.2.orig/libffi/src/types.c Tue Mar 27 11:39:16 2001
78.5450 ++++ gcc/libffi/src/types.c Wed Nov 27 07:24:05 2002
78.5451 +@@ -42,7 +42,8 @@
78.5452 + FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
78.5453 + FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
78.5454 +
78.5455 +-#if defined ALPHA || defined SPARC64
78.5456 ++#if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \
78.5457 ++ || defined IA64
78.5458 +
78.5459 + FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER);
78.5460 +
78.5461 +@@ -52,22 +53,12 @@
78.5462 +
78.5463 + #endif
78.5464 +
78.5465 +-#ifdef X86
78.5466 ++#if defined X86 || defined X86_WIN32 || defined ARM || defined M68K
78.5467 +
78.5468 + FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
78.5469 + FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
78.5470 +
78.5471 +-#elif defined X86_WIN32
78.5472 +-
78.5473 +-FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
78.5474 +-FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
78.5475 +-
78.5476 +-#elif defined ARM
78.5477 +-
78.5478 +-FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
78.5479 +-FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
78.5480 +-
78.5481 +-#elif defined M68K
78.5482 ++#elif defined SH
78.5483 +
78.5484 + FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
78.5485 + FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
78.5486 +@@ -80,12 +71,7 @@
78.5487 + #endif
78.5488 +
78.5489 +
78.5490 +-#ifdef X86
78.5491 +-
78.5492 +-FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
78.5493 +-FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
78.5494 +-
78.5495 +-#elif defined X86_WIN32
78.5496 ++#if defined X86 || defined X86_WIN32 || defined M68K
78.5497 +
78.5498 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
78.5499 + FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
78.5500 +@@ -95,25 +81,25 @@
78.5501 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
78.5502 + FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
78.5503 +
78.5504 +-#elif defined M68K
78.5505 ++#elif defined SH
78.5506 +
78.5507 + FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
78.5508 +-FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
78.5509 ++FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
78.5510 +
78.5511 + #elif defined SPARC
78.5512 +
78.5513 + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
78.5514 +-
78.5515 + #ifdef SPARC64
78.5516 +-
78.5517 + FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
78.5518 +-
78.5519 + #else
78.5520 +-
78.5521 + FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
78.5522 +-
78.5523 + #endif
78.5524 +
78.5525 ++#elif defined X86_64
78.5526 ++
78.5527 ++FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
78.5528 ++FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
78.5529 ++
78.5530 + #else
78.5531 +
78.5532 + FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
78.5533 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi.c gcc/libffi/src/x86/ffi.c
78.5534 +--- gcc-3.2.2.orig/libffi/src/x86/ffi.c Tue May 28 18:22:08 2002
78.5535 ++++ gcc/libffi/src/x86/ffi.c Fri Dec 6 10:16:45 2002
78.5536 +@@ -1,5 +1,8 @@
78.5537 + /* -----------------------------------------------------------------------
78.5538 +- ffi.c - Copyright (c) 1996, 1998, 1999 Cygnus Solutions
78.5539 ++ ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc.
78.5540 ++ Copyright (c) 2002 Ranjit Mathew
78.5541 ++ Copyright (c) 2002 Bo Thorsen
78.5542 ++ Copyright (c) 2002 Roger Sayle
78.5543 +
78.5544 + x86 Foreign Function Interface
78.5545 +
78.5546 +@@ -23,6 +26,8 @@
78.5547 + OTHER DEALINGS IN THE SOFTWARE.
78.5548 + ----------------------------------------------------------------------- */
78.5549 +
78.5550 ++#ifndef __x86_64__
78.5551 ++
78.5552 + #include <ffi.h>
78.5553 + #include <ffi_common.h>
78.5554 +
78.5555 +@@ -36,12 +41,10 @@
78.5556 + /*@=exportheader@*/
78.5557 + {
78.5558 + register unsigned int i;
78.5559 +- register int tmp;
78.5560 + register void **p_argv;
78.5561 + register char *argp;
78.5562 + register ffi_type **p_arg;
78.5563 +
78.5564 +- tmp = 0;
78.5565 + argp = stack;
78.5566 +
78.5567 + if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
78.5568 +@@ -148,6 +151,18 @@
78.5569 + /*@=declundef@*/
78.5570 + /*@=exportheader@*/
78.5571 +
78.5572 ++#ifdef X86_WIN32
78.5573 ++/*@-declundef@*/
78.5574 ++/*@-exportheader@*/
78.5575 ++extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
78.5576 ++ /*@out@*/ extended_cif *,
78.5577 ++ unsigned, unsigned,
78.5578 ++ /*@out@*/ unsigned *,
78.5579 ++ void (*fn)());
78.5580 ++/*@=declundef@*/
78.5581 ++/*@=exportheader@*/
78.5582 ++#endif /* X86_WIN32 */
78.5583 ++
78.5584 + void ffi_call(/*@dependent@*/ ffi_cif *cif,
78.5585 + void (*fn)(),
78.5586 + /*@out@*/ void *rvalue,
78.5587 +@@ -180,6 +195,14 @@
78.5588 + cif->flags, ecif.rvalue, fn);
78.5589 + /*@=usedef@*/
78.5590 + break;
78.5591 ++#ifdef X86_WIN32
78.5592 ++ case FFI_STDCALL:
78.5593 ++ /*@-usedef@*/
78.5594 ++ ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
78.5595 ++ cif->flags, ecif.rvalue, fn);
78.5596 ++ /*@=usedef@*/
78.5597 ++ break;
78.5598 ++#endif /* X86_WIN32 */
78.5599 + default:
78.5600 + FFI_ASSERT(0);
78.5601 + break;
78.5602 +@@ -266,12 +289,10 @@
78.5603 + /*@=exportheader@*/
78.5604 + {
78.5605 + register unsigned int i;
78.5606 +- register int tmp;
78.5607 + register void **p_argv;
78.5608 + register char *argp;
78.5609 + register ffi_type **p_arg;
78.5610 +
78.5611 +- tmp = 0;
78.5612 + argp = stack;
78.5613 +
78.5614 + if ( cif->rtype->type == FFI_TYPE_STRUCT ) {
78.5615 +@@ -281,13 +302,14 @@
78.5616 +
78.5617 + p_argv = avalue;
78.5618 +
78.5619 +- for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
78.5620 ++ for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
78.5621 + {
78.5622 + size_t z;
78.5623 +
78.5624 + /* Align if necessary */
78.5625 +- if (((*p_arg)->alignment - 1) & (unsigned) argp)
78.5626 ++ if (((*p_arg)->alignment - 1) & (unsigned) argp) {
78.5627 + argp = (char *) ALIGN(argp, (*p_arg)->alignment);
78.5628 ++ }
78.5629 +
78.5630 + z = (*p_arg)->size;
78.5631 +
78.5632 +@@ -298,7 +320,7 @@
78.5633 + p_argv++;
78.5634 + argp += z;
78.5635 + }
78.5636 +-
78.5637 ++
78.5638 + return;
78.5639 + }
78.5640 +
78.5641 +@@ -449,6 +471,15 @@
78.5642 + /*@out@*/ unsigned *,
78.5643 + void (*fn)());
78.5644 +
78.5645 ++#ifdef X86_WIN32
78.5646 ++extern void
78.5647 ++ffi_call_STDCALL(void (*)(char *, extended_cif *),
78.5648 ++ /*@out@*/ extended_cif *,
78.5649 ++ unsigned, unsigned,
78.5650 ++ /*@out@*/ unsigned *,
78.5651 ++ void (*fn)());
78.5652 ++#endif /* X86_WIN32 */
78.5653 ++
78.5654 + void
78.5655 + ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
78.5656 + void (*fn)(),
78.5657 +@@ -483,6 +514,14 @@
78.5658 + cif->flags, ecif.rvalue, fn);
78.5659 + /*@=usedef@*/
78.5660 + break;
78.5661 ++#ifdef X86_WIN32
78.5662 ++ case FFI_STDCALL:
78.5663 ++ /*@-usedef@*/
78.5664 ++ ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
78.5665 ++ cif->flags, ecif.rvalue, fn);
78.5666 ++ /*@=usedef@*/
78.5667 ++ break;
78.5668 ++#endif /* X86_WIN32 */
78.5669 + default:
78.5670 + FFI_ASSERT(0);
78.5671 + break;
78.5672 +@@ -490,3 +529,5 @@
78.5673 + }
78.5674 +
78.5675 + #endif
78.5676 ++
78.5677 ++#endif /* __x86_64__ */
78.5678 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi64.c gcc/libffi/src/x86/ffi64.c
78.5679 +--- gcc-3.2.2.orig/libffi/src/x86/ffi64.c Thu Jan 1 09:00:00 1970
78.5680 ++++ gcc/libffi/src/x86/ffi64.c Wed Jan 29 00:54:28 2003
78.5681 +@@ -0,0 +1,706 @@
78.5682 ++/* -----------------------------------------------------------------------
78.5683 ++ ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
78.5684 ++
78.5685 ++ x86-64 Foreign Function Interface
78.5686 ++
78.5687 ++ Permission is hereby granted, free of charge, to any person obtaining
78.5688 ++ a copy of this software and associated documentation files (the
78.5689 ++ ``Software''), to deal in the Software without restriction, including
78.5690 ++ without limitation the rights to use, copy, modify, merge, publish,
78.5691 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.5692 ++ permit persons to whom the Software is furnished to do so, subject to
78.5693 ++ the following conditions:
78.5694 ++
78.5695 ++ The above copyright notice and this permission notice shall be included
78.5696 ++ in all copies or substantial portions of the Software.
78.5697 ++
78.5698 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.5699 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.5700 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.5701 ++ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.5702 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.5703 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.5704 ++ OTHER DEALINGS IN THE SOFTWARE.
78.5705 ++ ----------------------------------------------------------------------- */
78.5706 ++
78.5707 ++#include <ffi.h>
78.5708 ++#include <ffi_common.h>
78.5709 ++
78.5710 ++#include <stdlib.h>
78.5711 ++#include <stdarg.h>
78.5712 ++
78.5713 ++/* ffi_prep_args is called by the assembly routine once stack space
78.5714 ++ has been allocated for the function's arguments */
78.5715 ++
78.5716 ++#ifdef __x86_64__
78.5717 ++
78.5718 ++#define MAX_GPR_REGS 6
78.5719 ++#define MAX_SSE_REGS 8
78.5720 ++typedef struct
78.5721 ++{
78.5722 ++ /* Registers for argument passing. */
78.5723 ++ long gpr[MAX_GPR_REGS];
78.5724 ++ __int128_t sse[MAX_SSE_REGS];
78.5725 ++
78.5726 ++ /* Stack space for arguments. */
78.5727 ++ char argspace[0];
78.5728 ++} stackLayout;
78.5729 ++
78.5730 ++/* All reference to register classes here is identical to the code in
78.5731 ++ gcc/config/i386/i386.c. Do *not* change one without the other. */
78.5732 ++
78.5733 ++/* Register class used for passing given 64bit part of the argument.
78.5734 ++ These represent classes as documented by the PS ABI, with the exception
78.5735 ++ of SSESF, SSEDF classes, that are basically SSE class, just gcc will
78.5736 ++ use SF or DFmode move instead of DImode to avoid reformating penalties.
78.5737 ++
78.5738 ++ Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
78.5739 ++ whenever possible (upper half does contain padding).
78.5740 ++ */
78.5741 ++enum x86_64_reg_class
78.5742 ++ {
78.5743 ++ X86_64_NO_CLASS,
78.5744 ++ X86_64_INTEGER_CLASS,
78.5745 ++ X86_64_INTEGERSI_CLASS,
78.5746 ++ X86_64_SSE_CLASS,
78.5747 ++ X86_64_SSESF_CLASS,
78.5748 ++ X86_64_SSEDF_CLASS,
78.5749 ++ X86_64_SSEUP_CLASS,
78.5750 ++ X86_64_X87_CLASS,
78.5751 ++ X86_64_X87UP_CLASS,
78.5752 ++ X86_64_MEMORY_CLASS
78.5753 ++ };
78.5754 ++
78.5755 ++#define MAX_CLASSES 4
78.5756 ++
78.5757 ++/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
78.5758 ++ of this code is to classify each 8bytes of incoming argument by the register
78.5759 ++ class and assign registers accordingly. */
78.5760 ++
78.5761 ++/* Return the union class of CLASS1 and CLASS2.
78.5762 ++ See the x86-64 PS ABI for details. */
78.5763 ++
78.5764 ++static enum x86_64_reg_class
78.5765 ++merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
78.5766 ++{
78.5767 ++ /* Rule #1: If both classes are equal, this is the resulting class. */
78.5768 ++ if (class1 == class2)
78.5769 ++ return class1;
78.5770 ++
78.5771 ++ /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
78.5772 ++ the other class. */
78.5773 ++ if (class1 == X86_64_NO_CLASS)
78.5774 ++ return class2;
78.5775 ++ if (class2 == X86_64_NO_CLASS)
78.5776 ++ return class1;
78.5777 ++
78.5778 ++ /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
78.5779 ++ if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
78.5780 ++ return X86_64_MEMORY_CLASS;
78.5781 ++
78.5782 ++ /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
78.5783 ++ if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
78.5784 ++ || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
78.5785 ++ return X86_64_INTEGERSI_CLASS;
78.5786 ++ if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
78.5787 ++ || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
78.5788 ++ return X86_64_INTEGER_CLASS;
78.5789 ++
78.5790 ++ /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
78.5791 ++ if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
78.5792 ++ || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
78.5793 ++ return X86_64_MEMORY_CLASS;
78.5794 ++
78.5795 ++ /* Rule #6: Otherwise class SSE is used. */
78.5796 ++ return X86_64_SSE_CLASS;
78.5797 ++}
78.5798 ++
78.5799 ++/* Classify the argument of type TYPE and mode MODE.
78.5800 ++ CLASSES will be filled by the register class used to pass each word
78.5801 ++ of the operand. The number of words is returned. In case the parameter
78.5802 ++ should be passed in memory, 0 is returned. As a special case for zero
78.5803 ++ sized containers, classes[0] will be NO_CLASS and 1 is returned.
78.5804 ++
78.5805 ++ See the x86-64 PS ABI for details.
78.5806 ++*/
78.5807 ++static int
78.5808 ++classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
78.5809 ++ int *byte_offset)
78.5810 ++{
78.5811 ++ /* First, align to the right place. */
78.5812 ++ *byte_offset = ALIGN(*byte_offset, type->alignment);
78.5813 ++
78.5814 ++ switch (type->type)
78.5815 ++ {
78.5816 ++ case FFI_TYPE_UINT8:
78.5817 ++ case FFI_TYPE_SINT8:
78.5818 ++ case FFI_TYPE_UINT16:
78.5819 ++ case FFI_TYPE_SINT16:
78.5820 ++ case FFI_TYPE_UINT32:
78.5821 ++ case FFI_TYPE_SINT32:
78.5822 ++ case FFI_TYPE_UINT64:
78.5823 ++ case FFI_TYPE_SINT64:
78.5824 ++ case FFI_TYPE_POINTER:
78.5825 ++ if (((*byte_offset) % 8 + type->size) <= 4)
78.5826 ++ classes[0] = X86_64_INTEGERSI_CLASS;
78.5827 ++ else
78.5828 ++ classes[0] = X86_64_INTEGER_CLASS;
78.5829 ++ return 1;
78.5830 ++ case FFI_TYPE_FLOAT:
78.5831 ++ if (((*byte_offset) % 8) == 0)
78.5832 ++ classes[0] = X86_64_SSESF_CLASS;
78.5833 ++ else
78.5834 ++ classes[0] = X86_64_SSE_CLASS;
78.5835 ++ return 1;
78.5836 ++ case FFI_TYPE_DOUBLE:
78.5837 ++ classes[0] = X86_64_SSEDF_CLASS;
78.5838 ++ return 1;
78.5839 ++ case FFI_TYPE_LONGDOUBLE:
78.5840 ++ classes[0] = X86_64_X87_CLASS;
78.5841 ++ classes[1] = X86_64_X87UP_CLASS;
78.5842 ++ return 2;
78.5843 ++ case FFI_TYPE_STRUCT:
78.5844 ++ {
78.5845 ++ const int UNITS_PER_WORD = 8;
78.5846 ++ int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
78.5847 ++ ffi_type **ptr;
78.5848 ++ int i;
78.5849 ++ enum x86_64_reg_class subclasses[MAX_CLASSES];
78.5850 ++
78.5851 ++ /* If the struct is larger than 16 bytes, pass it on the stack. */
78.5852 ++ if (type->size > 16)
78.5853 ++ return 0;
78.5854 ++
78.5855 ++ for (i = 0; i < words; i++)
78.5856 ++ classes[i] = X86_64_NO_CLASS;
78.5857 ++
78.5858 ++ /* Merge the fields of structure. */
78.5859 ++ for (ptr=type->elements; (*ptr)!=NULL; ptr++)
78.5860 ++ {
78.5861 ++ int num;
78.5862 ++
78.5863 ++ num = classify_argument (*ptr, subclasses, byte_offset);
78.5864 ++ if (num == 0)
78.5865 ++ return 0;
78.5866 ++ for (i = 0; i < num; i++)
78.5867 ++ {
78.5868 ++ int pos = *byte_offset / 8;
78.5869 ++ classes[i + pos] =
78.5870 ++ merge_classes (subclasses[i], classes[i + pos]);
78.5871 ++ }
78.5872 ++
78.5873 ++ if ((*ptr)->type != FFI_TYPE_STRUCT)
78.5874 ++ *byte_offset += (*ptr)->size;
78.5875 ++ }
78.5876 ++
78.5877 ++ /* Final merger cleanup. */
78.5878 ++ for (i = 0; i < words; i++)
78.5879 ++ {
78.5880 ++ /* If one class is MEMORY, everything should be passed in
78.5881 ++ memory. */
78.5882 ++ if (classes[i] == X86_64_MEMORY_CLASS)
78.5883 ++ return 0;
78.5884 ++
78.5885 ++ /* The X86_64_SSEUP_CLASS should be always preceded by
78.5886 ++ X86_64_SSE_CLASS. */
78.5887 ++ if (classes[i] == X86_64_SSEUP_CLASS
78.5888 ++ && (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
78.5889 ++ classes[i] = X86_64_SSE_CLASS;
78.5890 ++
78.5891 ++ /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
78.5892 ++ if (classes[i] == X86_64_X87UP_CLASS
78.5893 ++ && (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
78.5894 ++ classes[i] = X86_64_SSE_CLASS;
78.5895 ++ }
78.5896 ++ return words;
78.5897 ++ }
78.5898 ++
78.5899 ++ default:
78.5900 ++ FFI_ASSERT(0);
78.5901 ++ }
78.5902 ++ return 0; /* Never reached. */
78.5903 ++}
78.5904 ++
78.5905 ++/* Examine the argument and return set number of register required in each
78.5906 ++ class. Return 0 iff parameter should be passed in memory. */
78.5907 ++static int
78.5908 ++examine_argument (ffi_type *type, int in_return, int *int_nregs,int *sse_nregs)
78.5909 ++{
78.5910 ++ enum x86_64_reg_class class[MAX_CLASSES];
78.5911 ++ int offset = 0;
78.5912 ++ int n;
78.5913 ++
78.5914 ++ n = classify_argument (type, class, &offset);
78.5915 ++
78.5916 ++ if (n == 0)
78.5917 ++ return 0;
78.5918 ++
78.5919 ++ *int_nregs = 0;
78.5920 ++ *sse_nregs = 0;
78.5921 ++ for (n--; n>=0; n--)
78.5922 ++ switch (class[n])
78.5923 ++ {
78.5924 ++ case X86_64_INTEGER_CLASS:
78.5925 ++ case X86_64_INTEGERSI_CLASS:
78.5926 ++ (*int_nregs)++;
78.5927 ++ break;
78.5928 ++ case X86_64_SSE_CLASS:
78.5929 ++ case X86_64_SSESF_CLASS:
78.5930 ++ case X86_64_SSEDF_CLASS:
78.5931 ++ (*sse_nregs)++;
78.5932 ++ break;
78.5933 ++ case X86_64_NO_CLASS:
78.5934 ++ case X86_64_SSEUP_CLASS:
78.5935 ++ break;
78.5936 ++ case X86_64_X87_CLASS:
78.5937 ++ case X86_64_X87UP_CLASS:
78.5938 ++ if (!in_return)
78.5939 ++ return 0;
78.5940 ++ break;
78.5941 ++ default:
78.5942 ++ abort ();
78.5943 ++ }
78.5944 ++ return 1;
78.5945 ++}
78.5946 ++
78.5947 ++/* Functions to load floats and double to an SSE register placeholder. */
78.5948 ++extern void float2sse (float, __int128_t *);
78.5949 ++extern void double2sse (double, __int128_t *);
78.5950 ++extern void floatfloat2sse (void *, __int128_t *);
78.5951 ++
78.5952 ++/* Functions to put the floats and doubles back. */
78.5953 ++extern float sse2float (__int128_t *);
78.5954 ++extern double sse2double (__int128_t *);
78.5955 ++extern void sse2floatfloat(__int128_t *, void *);
78.5956 ++
78.5957 ++/*@-exportheader@*/
78.5958 ++void
78.5959 ++ffi_prep_args (stackLayout *stack, extended_cif *ecif)
78.5960 ++/*@=exportheader@*/
78.5961 ++{
78.5962 ++ int gprcount, ssecount, i, g, s;
78.5963 ++ void **p_argv;
78.5964 ++ void *argp = &stack->argspace;
78.5965 ++ ffi_type **p_arg;
78.5966 ++
78.5967 ++ /* First check if the return value should be passed in memory. If so,
78.5968 ++ pass the pointer as the first argument. */
78.5969 ++ gprcount = ssecount = 0;
78.5970 ++ if (ecif->cif->rtype->type != FFI_TYPE_VOID
78.5971 ++ && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
78.5972 ++ (void *)stack->gpr[gprcount++] = ecif->rvalue;
78.5973 ++
78.5974 ++ for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
78.5975 ++ i!=0; i--, p_arg++, p_argv++)
78.5976 ++ {
78.5977 ++ int in_register = 0;
78.5978 ++
78.5979 ++ switch ((*p_arg)->type)
78.5980 ++ {
78.5981 ++ case FFI_TYPE_SINT8:
78.5982 ++ case FFI_TYPE_SINT16:
78.5983 ++ case FFI_TYPE_SINT32:
78.5984 ++ case FFI_TYPE_SINT64:
78.5985 ++ case FFI_TYPE_UINT8:
78.5986 ++ case FFI_TYPE_UINT16:
78.5987 ++ case FFI_TYPE_UINT32:
78.5988 ++ case FFI_TYPE_UINT64:
78.5989 ++ case FFI_TYPE_POINTER:
78.5990 ++ if (gprcount < MAX_GPR_REGS)
78.5991 ++ {
78.5992 ++ stack->gpr[gprcount] = 0;
78.5993 ++ stack->gpr[gprcount++] = *(long long *)(*p_argv);
78.5994 ++ in_register = 1;
78.5995 ++ }
78.5996 ++ break;
78.5997 ++
78.5998 ++ case FFI_TYPE_FLOAT:
78.5999 ++ if (ssecount < MAX_SSE_REGS)
78.6000 ++ {
78.6001 ++ float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
78.6002 ++ in_register = 1;
78.6003 ++ }
78.6004 ++ break;
78.6005 ++
78.6006 ++ case FFI_TYPE_DOUBLE:
78.6007 ++ if (ssecount < MAX_SSE_REGS)
78.6008 ++ {
78.6009 ++ double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
78.6010 ++ in_register = 1;
78.6011 ++ }
78.6012 ++ break;
78.6013 ++ }
78.6014 ++
78.6015 ++ if (in_register)
78.6016 ++ continue;
78.6017 ++
78.6018 ++ /* Either all places in registers where filled, or this is a
78.6019 ++ type that potentially goes into a memory slot. */
78.6020 ++ if (examine_argument (*p_arg, 0, &g, &s) == 0
78.6021 ++ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
78.6022 ++ {
78.6023 ++ /* Pass this argument in memory. */
78.6024 ++ argp = (void *)ALIGN(argp, (*p_arg)->alignment);
78.6025 ++ memcpy (argp, *p_argv, (*p_arg)->size);
78.6026 ++ argp += (*p_arg)->size;
78.6027 ++ }
78.6028 ++ else
78.6029 ++ {
78.6030 ++ /* All easy cases are eliminated. Now fire the big guns. */
78.6031 ++
78.6032 ++ enum x86_64_reg_class classes[MAX_CLASSES];
78.6033 ++ int offset = 0, j, num;
78.6034 ++ void *a;
78.6035 ++
78.6036 ++ num = classify_argument (*p_arg, classes, &offset);
78.6037 ++ for (j=0, a=*p_argv; j<num; j++, a+=8)
78.6038 ++ {
78.6039 ++ switch (classes[j])
78.6040 ++ {
78.6041 ++ case X86_64_INTEGER_CLASS:
78.6042 ++ case X86_64_INTEGERSI_CLASS:
78.6043 ++ stack->gpr[gprcount++] = *(long long *)a;
78.6044 ++ break;
78.6045 ++ case X86_64_SSE_CLASS:
78.6046 ++ floatfloat2sse (a, &stack->sse[ssecount++]);
78.6047 ++ break;
78.6048 ++ case X86_64_SSESF_CLASS:
78.6049 ++ float2sse (*(float *)a, &stack->sse[ssecount++]);
78.6050 ++ break;
78.6051 ++ case X86_64_SSEDF_CLASS:
78.6052 ++ double2sse (*(double *)a, &stack->sse[ssecount++]);
78.6053 ++ break;
78.6054 ++ default:
78.6055 ++ abort();
78.6056 ++ }
78.6057 ++ }
78.6058 ++ }
78.6059 ++ }
78.6060 ++}
78.6061 ++
78.6062 ++/* Perform machine dependent cif processing. */
78.6063 ++ffi_status
78.6064 ++ffi_prep_cif_machdep (ffi_cif *cif)
78.6065 ++{
78.6066 ++ int gprcount, ssecount, i, g, s;
78.6067 ++
78.6068 ++ gprcount = ssecount = 0;
78.6069 ++
78.6070 ++ /* Reset the byte count. We handle this size estimation here. */
78.6071 ++ cif->bytes = 0;
78.6072 ++
78.6073 ++ /* If the return value should be passed in memory, pass the pointer
78.6074 ++ as the first argument. The actual memory isn't allocated here. */
78.6075 ++ if (cif->rtype->type != FFI_TYPE_VOID
78.6076 ++ && examine_argument (cif->rtype, 1, &g, &s) == 0)
78.6077 ++ gprcount = 1;
78.6078 ++
78.6079 ++ /* Go over all arguments and determine the way they should be passed.
78.6080 ++ If it's in a register and there is space for it, let that be so. If
78.6081 ++ not, add it's size to the stack byte count. */
78.6082 ++ for (i=0; i<cif->nargs; i++)
78.6083 ++ {
78.6084 ++ if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
78.6085 ++ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
78.6086 ++ {
78.6087 ++ /* This is passed in memory. First align to the basic type. */
78.6088 ++ cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
78.6089 ++
78.6090 ++ /* Stack arguments are *always* at least 8 byte aligned. */
78.6091 ++ cif->bytes = ALIGN(cif->bytes, 8);
78.6092 ++
78.6093 ++ /* Now add the size of this argument. */
78.6094 ++ cif->bytes += cif->arg_types[i]->size;
78.6095 ++ }
78.6096 ++ else
78.6097 ++ {
78.6098 ++ gprcount += g;
78.6099 ++ ssecount += s;
78.6100 ++ }
78.6101 ++ }
78.6102 ++
78.6103 ++ /* Set the flag for the closures return. */
78.6104 ++ switch (cif->rtype->type)
78.6105 ++ {
78.6106 ++ case FFI_TYPE_VOID:
78.6107 ++ case FFI_TYPE_STRUCT:
78.6108 ++ case FFI_TYPE_SINT64:
78.6109 ++ case FFI_TYPE_FLOAT:
78.6110 ++ case FFI_TYPE_DOUBLE:
78.6111 ++ case FFI_TYPE_LONGDOUBLE:
78.6112 ++ cif->flags = (unsigned) cif->rtype->type;
78.6113 ++ break;
78.6114 ++
78.6115 ++ case FFI_TYPE_UINT64:
78.6116 ++ cif->flags = FFI_TYPE_SINT64;
78.6117 ++ break;
78.6118 ++
78.6119 ++ default:
78.6120 ++ cif->flags = FFI_TYPE_INT;
78.6121 ++ break;
78.6122 ++ }
78.6123 ++
78.6124 ++ return FFI_OK;
78.6125 ++}
78.6126 ++
78.6127 ++typedef struct
78.6128 ++{
78.6129 ++ long gpr[2];
78.6130 ++ __int128_t sse[2];
78.6131 ++ long double st0;
78.6132 ++} return_value;
78.6133 ++
78.6134 ++void
78.6135 ++ffi_fill_return_value (return_value *rv, extended_cif *ecif)
78.6136 ++{
78.6137 ++ enum x86_64_reg_class classes[MAX_CLASSES];
78.6138 ++ int i = 0, num;
78.6139 ++ long *gpr = rv->gpr;
78.6140 ++ __int128_t *sse = rv->sse;
78.6141 ++ signed char sc;
78.6142 ++ signed short ss;
78.6143 ++
78.6144 ++ /* This is needed because of the way x86-64 handles signed short
78.6145 ++ integers. */
78.6146 ++ switch (ecif->cif->rtype->type)
78.6147 ++ {
78.6148 ++ case FFI_TYPE_SINT8:
78.6149 ++ sc = *(signed char *)gpr;
78.6150 ++ *(long long *)ecif->rvalue = (long long)sc;
78.6151 ++ return;
78.6152 ++ case FFI_TYPE_SINT16:
78.6153 ++ ss = *(signed short *)gpr;
78.6154 ++ *(long long *)ecif->rvalue = (long long)ss;
78.6155 ++ return;
78.6156 ++ default:
78.6157 ++ /* Just continue. */
78.6158 ++ ;
78.6159 ++ }
78.6160 ++
78.6161 ++ num = classify_argument (ecif->cif->rtype, classes, &i);
78.6162 ++
78.6163 ++ if (num == 0)
78.6164 ++ /* Return in memory. */
78.6165 ++ ecif->rvalue = (void *) rv->gpr[0];
78.6166 ++ else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
78.6167 ++ classes[1] == X86_64_X87UP_CLASS)
78.6168 ++ /* This is a long double (this is easiest to handle this way instead
78.6169 ++ of an eightbyte at a time as in the loop below. */
78.6170 ++ *((long double *)ecif->rvalue) = rv->st0;
78.6171 ++ else
78.6172 ++ {
78.6173 ++ void *a;
78.6174 ++
78.6175 ++ for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
78.6176 ++ {
78.6177 ++ switch (classes[i])
78.6178 ++ {
78.6179 ++ case X86_64_INTEGER_CLASS:
78.6180 ++ case X86_64_INTEGERSI_CLASS:
78.6181 ++ *(long long *)a = *gpr;
78.6182 ++ gpr++;
78.6183 ++ break;
78.6184 ++ case X86_64_SSE_CLASS:
78.6185 ++ sse2floatfloat (sse++, a);
78.6186 ++ break;
78.6187 ++ case X86_64_SSESF_CLASS:
78.6188 ++ *(float *)a = sse2float (sse++);
78.6189 ++ break;
78.6190 ++ case X86_64_SSEDF_CLASS:
78.6191 ++ *(double *)a = sse2double (sse++);
78.6192 ++ break;
78.6193 ++ default:
78.6194 ++ abort();
78.6195 ++ }
78.6196 ++ }
78.6197 ++ }
78.6198 ++}
78.6199 ++
78.6200 ++/*@-declundef@*/
78.6201 ++/*@-exportheader@*/
78.6202 ++extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
78.6203 ++ void (*) (return_value *, extended_cif *),
78.6204 ++ /*@out@*/ extended_cif *,
78.6205 ++ unsigned, /*@out@*/ unsigned *, void (*fn)());
78.6206 ++/*@=declundef@*/
78.6207 ++/*@=exportheader@*/
78.6208 ++
78.6209 ++void ffi_call(/*@dependent@*/ ffi_cif *cif,
78.6210 ++ void (*fn)(),
78.6211 ++ /*@out@*/ void *rvalue,
78.6212 ++ /*@dependent@*/ void **avalue)
78.6213 ++{
78.6214 ++ extended_cif ecif;
78.6215 ++ int dummy;
78.6216 ++
78.6217 ++ ecif.cif = cif;
78.6218 ++ ecif.avalue = avalue;
78.6219 ++
78.6220 ++ /* If the return value is a struct and we don't have a return */
78.6221 ++ /* value address then we need to make one */
78.6222 ++
78.6223 ++ if ((rvalue == NULL) &&
78.6224 ++ (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
78.6225 ++ {
78.6226 ++ /*@-sysunrecog@*/
78.6227 ++ ecif.rvalue = alloca(cif->rtype->size);
78.6228 ++ /*@=sysunrecog@*/
78.6229 ++ }
78.6230 ++ else
78.6231 ++ ecif.rvalue = rvalue;
78.6232 ++
78.6233 ++ /* Stack must always be 16byte aligned. Make it so. */
78.6234 ++ cif->bytes = ALIGN(cif->bytes, 16);
78.6235 ++
78.6236 ++ switch (cif->abi)
78.6237 ++ {
78.6238 ++ case FFI_SYSV:
78.6239 ++ /* Calling 32bit code from 64bit is not possible */
78.6240 ++ FFI_ASSERT(0);
78.6241 ++ break;
78.6242 ++
78.6243 ++ case FFI_UNIX64:
78.6244 ++ /*@-usedef@*/
78.6245 ++ ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
78.6246 ++ cif->bytes, ecif.rvalue, fn);
78.6247 ++ /*@=usedef@*/
78.6248 ++ break;
78.6249 ++
78.6250 ++ default:
78.6251 ++ FFI_ASSERT(0);
78.6252 ++ break;
78.6253 ++ }
78.6254 ++}
78.6255 ++
78.6256 ++extern void ffi_closure_UNIX64(void);
78.6257 ++
78.6258 ++ffi_status
78.6259 ++ffi_prep_closure (ffi_closure* closure,
78.6260 ++ ffi_cif* cif,
78.6261 ++ void (*fun)(ffi_cif*, void*, void**, void*),
78.6262 ++ void *user_data)
78.6263 ++{
78.6264 ++ volatile unsigned short *tramp;
78.6265 ++
78.6266 ++ /* FFI_ASSERT (cif->abi == FFI_OSF); */
78.6267 ++
78.6268 ++ tramp = (volatile unsigned short *) &closure->tramp[0];
78.6269 ++ tramp[0] = 0xbb49; /* mov <code>, %r11 */
78.6270 ++ tramp[5] = 0xba49; /* mov <data>, %r10 */
78.6271 ++ tramp[10] = 0xff49; /* jmp *%r11 */
78.6272 ++ tramp[11] = 0x00e3;
78.6273 ++ *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
78.6274 ++ *(void * volatile *) &tramp[6] = closure;
78.6275 ++
78.6276 ++ closure->cif = cif;
78.6277 ++ closure->fun = fun;
78.6278 ++ closure->user_data = user_data;
78.6279 ++
78.6280 ++ return FFI_OK;
78.6281 ++}
78.6282 ++
78.6283 ++int
78.6284 ++ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
78.6285 ++{
78.6286 ++ ffi_cif *cif;
78.6287 ++ void **avalue;
78.6288 ++ ffi_type **arg_types;
78.6289 ++ long i, avn, argn;
78.6290 ++
78.6291 ++ cif = closure->cif;
78.6292 ++ avalue = alloca(cif->nargs * sizeof(void *));
78.6293 ++
78.6294 ++ argn = 0;
78.6295 ++
78.6296 ++ i = 0;
78.6297 ++ avn = cif->nargs;
78.6298 ++ arg_types = cif->arg_types;
78.6299 ++
78.6300 ++ /* Grab the addresses of the arguments from the stack frame. */
78.6301 ++ while (i < avn)
78.6302 ++ {
78.6303 ++ switch (arg_types[i]->type)
78.6304 ++ {
78.6305 ++ case FFI_TYPE_SINT8:
78.6306 ++ case FFI_TYPE_UINT8:
78.6307 ++ case FFI_TYPE_SINT16:
78.6308 ++ case FFI_TYPE_UINT16:
78.6309 ++ case FFI_TYPE_SINT32:
78.6310 ++ case FFI_TYPE_UINT32:
78.6311 ++ case FFI_TYPE_SINT64:
78.6312 ++ case FFI_TYPE_UINT64:
78.6313 ++ case FFI_TYPE_POINTER:
78.6314 ++ {
78.6315 ++ if (l->gp_offset > 48-8)
78.6316 ++ {
78.6317 ++ avalue[i] = l->overflow_arg_area;
78.6318 ++ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
78.6319 ++ }
78.6320 ++ else
78.6321 ++ {
78.6322 ++ avalue[i] = (char *)l->reg_save_area + l->gp_offset;
78.6323 ++ l->gp_offset += 8;
78.6324 ++ }
78.6325 ++ }
78.6326 ++ break;
78.6327 ++
78.6328 ++ case FFI_TYPE_STRUCT:
78.6329 ++ /* FIXME */
78.6330 ++ FFI_ASSERT(0);
78.6331 ++ break;
78.6332 ++
78.6333 ++ case FFI_TYPE_DOUBLE:
78.6334 ++ {
78.6335 ++ if (l->fp_offset > 176-16)
78.6336 ++ {
78.6337 ++ avalue[i] = l->overflow_arg_area;
78.6338 ++ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
78.6339 ++ }
78.6340 ++ else
78.6341 ++ {
78.6342 ++ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
78.6343 ++ l->fp_offset += 16;
78.6344 ++ }
78.6345 ++ }
78.6346 ++#if DEBUG_FFI
78.6347 ++ fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
78.6348 ++#endif
78.6349 ++ break;
78.6350 ++
78.6351 ++ case FFI_TYPE_FLOAT:
78.6352 ++ {
78.6353 ++ if (l->fp_offset > 176-16)
78.6354 ++ {
78.6355 ++ avalue[i] = l->overflow_arg_area;
78.6356 ++ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
78.6357 ++ }
78.6358 ++ else
78.6359 ++ {
78.6360 ++ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
78.6361 ++ l->fp_offset += 16;
78.6362 ++ }
78.6363 ++ }
78.6364 ++#if DEBUG_FFI
78.6365 ++ fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
78.6366 ++#endif
78.6367 ++ break;
78.6368 ++
78.6369 ++ default:
78.6370 ++ FFI_ASSERT(0);
78.6371 ++ }
78.6372 ++
78.6373 ++ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
78.6374 ++ i++;
78.6375 ++ }
78.6376 ++
78.6377 ++ /* Invoke the closure. */
78.6378 ++ (closure->fun) (cif, rp, avalue, closure->user_data);
78.6379 ++
78.6380 ++ /* FIXME: Structs not supported. */
78.6381 ++ FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
78.6382 ++
78.6383 ++ /* Tell ffi_closure_UNIX64 how to perform return type promotions. */
78.6384 ++
78.6385 ++ return cif->rtype->type;
78.6386 ++}
78.6387 ++#endif /* ifndef __x86_64__ */
78.6388 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/sysv.S gcc/libffi/src/x86/sysv.S
78.6389 +--- gcc-3.2.2.orig/libffi/src/x86/sysv.S Tue Jul 17 02:10:53 2001
78.6390 ++++ gcc/libffi/src/x86/sysv.S Fri Jul 19 08:08:31 2002
78.6391 +@@ -1,5 +1,5 @@
78.6392 + /* -----------------------------------------------------------------------
78.6393 +- sysv.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
78.6394 ++ sysv.S - Copyright (c) 1996, 1998, 2001, 2002 Cygnus Solutions
78.6395 +
78.6396 + X86 Foreign Function Interface
78.6397 +
78.6398 +@@ -23,6 +23,8 @@
78.6399 + OTHER DEALINGS IN THE SOFTWARE.
78.6400 + ----------------------------------------------------------------------- */
78.6401 +
78.6402 ++#ifndef __x86_64__
78.6403 ++
78.6404 + #define LIBFFI_ASM
78.6405 + #include <ffi.h>
78.6406 +
78.6407 +@@ -163,3 +165,5 @@
78.6408 + .align 4
78.6409 + .LEFDE1:
78.6410 + .set .LLFDE1,.LEFDE1-.LSFDE1
78.6411 ++
78.6412 ++#endif /* ifndef __x86_64__ */
78.6413 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/unix64.S gcc/libffi/src/x86/unix64.S
78.6414 +--- gcc-3.2.2.orig/libffi/src/x86/unix64.S Thu Jan 1 09:00:00 1970
78.6415 ++++ gcc/libffi/src/x86/unix64.S Wed Jan 29 00:54:28 2003
78.6416 +@@ -0,0 +1,302 @@
78.6417 ++/* -----------------------------------------------------------------------
78.6418 ++ unix64.S - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
78.6419 ++
78.6420 ++ x86-64 Foreign Function Interface
78.6421 ++
78.6422 ++ Permission is hereby granted, free of charge, to any person obtaining
78.6423 ++ a copy of this software and associated documentation files (the
78.6424 ++ ``Software''), to deal in the Software without restriction, including
78.6425 ++ without limitation the rights to use, copy, modify, merge, publish,
78.6426 ++ distribute, sublicense, and/or sell copies of the Software, and to
78.6427 ++ permit persons to whom the Software is furnished to do so, subject to
78.6428 ++ the following conditions:
78.6429 ++
78.6430 ++ The above copyright notice and this permission notice shall be included
78.6431 ++ in all copies or substantial portions of the Software.
78.6432 ++
78.6433 ++ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
78.6434 ++ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
78.6435 ++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
78.6436 ++ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
78.6437 ++ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
78.6438 ++ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
78.6439 ++ OTHER DEALINGS IN THE SOFTWARE.
78.6440 ++ ----------------------------------------------------------------------- */
78.6441 ++
78.6442 ++#ifdef __x86_64__
78.6443 ++#define LIBFFI_ASM
78.6444 ++#include <ffi.h>
78.6445 ++
78.6446 ++ .section .rodata
78.6447 ++.LC0:
78.6448 ++ .string "asm in progress %lld\n"
78.6449 ++.LC1:
78.6450 ++ .string "asm in progress\n"
78.6451 ++.text
78.6452 ++ .align 2
78.6453 ++.globl ffi_call_UNIX64
78.6454 ++ .type ffi_call_UNIX64,@function
78.6455 ++
78.6456 ++ffi_call_UNIX64:
78.6457 ++.LFB1:
78.6458 ++ pushq %rbp
78.6459 ++.LCFI0:
78.6460 ++ movq %rsp, %rbp
78.6461 ++.LCFI1:
78.6462 ++ /* Save all arguments */
78.6463 ++ subq $48, %rsp
78.6464 ++.LCFI2:
78.6465 ++ movq %rdi, -8(%rbp) /* ffi_prep_args */
78.6466 ++ movq %rsi, -16(%rbp) /* ffi_fill_return_value */
78.6467 ++ movq %rdx, -24(%rbp) /* ecif */
78.6468 ++ movq %rcx, -32(%rbp) /* cif->bytes */
78.6469 ++ movq %r8, -40(%rbp) /* ecif.rvalue */
78.6470 ++ movq %r9, -48(%rbp) /* fn */
78.6471 ++
78.6472 ++ /* Make room for all of the new args and the register args */
78.6473 ++ addl $176, %ecx
78.6474 ++.LCFI3:
78.6475 ++ subq %rcx, %rsp
78.6476 ++.LCFI4:
78.6477 ++ /* Setup the call to ffi_prep_args. */
78.6478 ++ movq %rdi, %rax /* &ffi_prep_args */
78.6479 ++ movq %rsp, %rdi /* stackLayout */
78.6480 ++ movq %rdx, %rsi /* ecif */
78.6481 ++ call *%rax /* ffi_prep_args(stackLayout, ecif);*/
78.6482 ++
78.6483 ++ /* ffi_prep_args have put all the register contents into the */
78.6484 ++ /* stackLayout struct. Now put the register values in place. */
78.6485 ++ movq (%rsp), %rdi
78.6486 ++ movq 8(%rsp), %rsi
78.6487 ++ movq 16(%rsp), %rdx
78.6488 ++ movq 24(%rsp), %rcx
78.6489 ++ movq 32(%rsp), %r8
78.6490 ++ movq 40(%rsp), %r9
78.6491 ++ movaps 48(%rsp), %xmm0
78.6492 ++ movaps 64(%rsp), %xmm1
78.6493 ++ movaps 80(%rsp), %xmm2
78.6494 ++ movaps 96(%rsp), %xmm3
78.6495 ++ movaps 112(%rsp), %xmm4
78.6496 ++ movaps 128(%rsp), %xmm5
78.6497 ++ movaps 144(%rsp), %xmm6
78.6498 ++ movaps 160(%rsp), %xmm7
78.6499 ++
78.6500 ++ /* Remove space for stackLayout so stack arguments are placed
78.6501 ++ correctly for the call. */
78.6502 ++.LCFI5:
78.6503 ++ addq $176, %rsp
78.6504 ++.LCFI6:
78.6505 ++ /* Call the user function. */
78.6506 ++ call *-48(%rbp)
78.6507 ++
78.6508 ++ /* Make stack space for the return_value struct. */
78.6509 ++ subq $64, %rsp
78.6510 ++
78.6511 ++ /* Fill in all potential return values to this struct. */
78.6512 ++ movq %rax, (%rsp)
78.6513 ++ movq %rdx, 8(%rsp)
78.6514 ++ movaps %xmm0, 16(%rsp)
78.6515 ++ movaps %xmm1, 32(%rsp)
78.6516 ++ fstpt 48(%rsp)
78.6517 ++
78.6518 ++ /* Now call ffi_fill_return_value. */
78.6519 ++ movq %rsp, %rdi /* struct return_value */
78.6520 ++ movq -24(%rbp), %rsi /* ecif */
78.6521 ++ movq -16(%rbp), %rax /* &ffi_fill_return_value */
78.6522 ++ call *%rax /* call it */
78.6523 ++
78.6524 ++ /* And the work is done. */
78.6525 ++ leave
78.6526 ++ ret
78.6527 ++.LFE1:
78.6528 ++.ffi_call_UNIX64_end:
78.6529 ++ .size ffi_call_UNIX64,.ffi_call_UNIX64_end-ffi_call_UNIX64
78.6530 ++
78.6531 ++.text
78.6532 ++ .align 2
78.6533 ++.globl float2sse
78.6534 ++ .type float2sse,@function
78.6535 ++float2sse:
78.6536 ++ /* Save the contents of this sse-float in a pointer. */
78.6537 ++ movaps %xmm0, (%rdi)
78.6538 ++ ret
78.6539 ++
78.6540 ++ .align 2
78.6541 ++.globl floatfloat2sse
78.6542 ++ .type floatfloat2sse,@function
78.6543 ++floatfloat2sse:
78.6544 ++ /* Save the contents of these two sse-floats in a pointer. */
78.6545 ++ movq (%rdi), %xmm0
78.6546 ++ movaps %xmm0, (%rsi)
78.6547 ++ ret
78.6548 ++
78.6549 ++ .align 2
78.6550 ++.globl double2sse
78.6551 ++ .type double2sse,@function
78.6552 ++double2sse:
78.6553 ++ /* Save the contents of this sse-double in a pointer. */
78.6554 ++ movaps %xmm0, (%rdi)
78.6555 ++ ret
78.6556 ++
78.6557 ++ .align 2
78.6558 ++.globl sse2float
78.6559 ++ .type sse2float,@function
78.6560 ++sse2float:
78.6561 ++ /* Save the contents of this sse-float in a pointer. */
78.6562 ++ movaps (%rdi), %xmm0
78.6563 ++ ret
78.6564 ++
78.6565 ++ .align 2
78.6566 ++.globl sse2double
78.6567 ++ .type sse2double,@function
78.6568 ++sse2double:
78.6569 ++ /* Save the contents of this pointer in a sse-double. */
78.6570 ++ movaps (%rdi), %xmm0
78.6571 ++ ret
78.6572 ++
78.6573 ++ .align 2
78.6574 ++.globl sse2floatfloat
78.6575 ++ .type sse2floatfloat,@function
78.6576 ++sse2floatfloat:
78.6577 ++ /* Save the contents of this pointer in two sse-floats. */
78.6578 ++ movaps (%rdi), %xmm0
78.6579 ++ movq %xmm0, (%rsi)
78.6580 ++ ret
78.6581 ++
78.6582 ++ .align 2
78.6583 ++.globl ffi_closure_UNIX64
78.6584 ++ .type ffi_closure_UNIX64,@function
78.6585 ++
78.6586 ++ffi_closure_UNIX64:
78.6587 ++.LFB2:
78.6588 ++ pushq %rbp
78.6589 ++.LCFI10:
78.6590 ++ movq %rsp, %rbp
78.6591 ++.LCFI11:
78.6592 ++ subq $240, %rsp
78.6593 ++.LCFI12:
78.6594 ++ movq %rdi, -176(%rbp)
78.6595 ++ movq %rsi, -168(%rbp)
78.6596 ++ movq %rdx, -160(%rbp)
78.6597 ++ movq %rcx, -152(%rbp)
78.6598 ++ movq %r8, -144(%rbp)
78.6599 ++ movq %r9, -136(%rbp)
78.6600 ++ /* FIXME: We can avoid all this stashing of XMM registers by
78.6601 ++ (in ffi_prep_closure) computing the number of
78.6602 ++ floating-point args and moving it into %rax before calling
78.6603 ++ this function. Once this is done, uncomment the next few
78.6604 ++ lines and only the essential XMM registers will be written
78.6605 ++ to memory. This is a significant saving. */
78.6606 ++/* movzbl %al, %eax */
78.6607 ++/* movq %rax, %rdx */
78.6608 ++/* leaq 0(,%rdx,4), %rax */
78.6609 ++/* leaq 2f(%rip), %rdx */
78.6610 ++/* subq %rax, %rdx */
78.6611 ++ leaq -1(%rbp), %rax
78.6612 ++/* jmp *%rdx */
78.6613 ++ movaps %xmm7, -15(%rax)
78.6614 ++ movaps %xmm6, -31(%rax)
78.6615 ++ movaps %xmm5, -47(%rax)
78.6616 ++ movaps %xmm4, -63(%rax)
78.6617 ++ movaps %xmm3, -79(%rax)
78.6618 ++ movaps %xmm2, -95(%rax)
78.6619 ++ movaps %xmm1, -111(%rax)
78.6620 ++ movaps %xmm0, -127(%rax)
78.6621 ++2:
78.6622 ++ movl %edi, -180(%rbp)
78.6623 ++ movl $0, -224(%rbp)
78.6624 ++ movl $48, -220(%rbp)
78.6625 ++ leaq 16(%rbp), %rax
78.6626 ++ movq %rax, -216(%rbp)
78.6627 ++ leaq -176(%rbp), %rdx
78.6628 ++ movq %rdx, -208(%rbp)
78.6629 ++ leaq -224(%rbp), %rsi
78.6630 ++ movq %r10, %rdi
78.6631 ++ movq %rsp, %rdx
78.6632 ++ call ffi_closure_UNIX64_inner@PLT
78.6633 ++
78.6634 ++ cmpl $FFI_TYPE_FLOAT, %eax
78.6635 ++ je 1f
78.6636 ++ cmpl $FFI_TYPE_DOUBLE, %eax
78.6637 ++ je 2f
78.6638 ++ cmpl $FFI_TYPE_LONGDOUBLE, %eax
78.6639 ++ je 3f
78.6640 ++ cmpl $FFI_TYPE_STRUCT, %eax
78.6641 ++ je 4f
78.6642 ++ popq %rax
78.6643 ++ leave
78.6644 ++ ret
78.6645 ++1:
78.6646 ++2:
78.6647 ++3:
78.6648 ++ movaps -240(%rbp), %xmm0
78.6649 ++ leave
78.6650 ++ ret
78.6651 ++4:
78.6652 ++ leave
78.6653 ++ ret
78.6654 ++.LFE2:
78.6655 ++
78.6656 ++ .section .eh_frame,"a",@progbits
78.6657 ++.Lframe0:
78.6658 ++ .long .LECIE1-.LSCIE1
78.6659 ++.LSCIE1:
78.6660 ++ .long 0x0
78.6661 ++ .byte 0x1
78.6662 ++ .string "zR"
78.6663 ++ .uleb128 0x1
78.6664 ++ .sleb128 -8
78.6665 ++ .byte 0x10
78.6666 ++ .uleb128 0x1
78.6667 ++ .byte 0x1b
78.6668 ++ .byte 0xc
78.6669 ++ .uleb128 0x7
78.6670 ++ .uleb128 0x8
78.6671 ++ .byte 0x90
78.6672 ++ .uleb128 0x1
78.6673 ++ .align 8
78.6674 ++.LECIE1:
78.6675 ++.LSFDE1:
78.6676 ++ .long .LEFDE1-.LASFDE1
78.6677 ++.LASFDE1:
78.6678 ++ .long .LASFDE1-.Lframe0
78.6679 ++
78.6680 ++ .long .LFB1-.
78.6681 ++ .long .LFE1-.LFB1
78.6682 ++ .uleb128 0x0
78.6683 ++ .byte 0x4 # DW_CFA_advance_loc4
78.6684 ++ .long .LCFI0-.LFB1
78.6685 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.6686 ++ .uleb128 0x10
78.6687 ++ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
78.6688 ++ .uleb128 0x2
78.6689 ++ .byte 0x4 # DW_CFA_advance_loc4
78.6690 ++ .long .LCFI1-.LCFI0
78.6691 ++ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
78.6692 ++ .uleb128 0x2
78.6693 ++ .byte 0xd # DW_CFA_def_cfa_reg: r6
78.6694 ++ .uleb128 0x6
78.6695 ++ .align 8
78.6696 ++.LEFDE1:
78.6697 ++.LSFDE3:
78.6698 ++ .long .LEFDE3-.LASFDE3 # FDE Length
78.6699 ++.LASFDE3:
78.6700 ++ .long .LASFDE3-.Lframe0 # FDE CIE offset
78.6701 ++
78.6702 ++ .long .LFB2-. # FDE initial location
78.6703 ++ .long .LFE2-.LFB2 # FDE address range
78.6704 ++ .uleb128 0x0 # Augmentation size
78.6705 ++ .byte 0x4 # DW_CFA_advance_loc4
78.6706 ++ .long .LCFI10-.LFB2
78.6707 ++ .byte 0xe # DW_CFA_def_cfa_offset
78.6708 ++ .uleb128 0x10
78.6709 ++ .byte 0x86 # DW_CFA_offset, column 0x6
78.6710 ++ .uleb128 0x2
78.6711 ++ .byte 0x4 # DW_CFA_advance_loc4
78.6712 ++ .long .LCFI11-.LCFI10
78.6713 ++ .byte 0xd # DW_CFA_def_cfa_register
78.6714 ++ .uleb128 0x6
78.6715 ++ .align 8
78.6716 ++.LEFDE3:
78.6717 ++
78.6718 ++#endif /* __x86_64__ */
78.6719 +diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/win32.S gcc/libffi/src/x86/win32.S
78.6720 +--- gcc-3.2.2.orig/libffi/src/x86/win32.S Tue Mar 27 11:39:16 2001
78.6721 ++++ gcc/libffi/src/x86/win32.S Fri Dec 6 10:16:45 2002
78.6722 +@@ -1,5 +1,8 @@
78.6723 + /* -----------------------------------------------------------------------
78.6724 +- win32.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
78.6725 ++ win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc.
78.6726 ++ Copyright (c) 2001 John Beniton
78.6727 ++ Copyright (c) 2002 Ranjit Mathew
78.6728 ++
78.6729 +
78.6730 + X86 Foreign Function Interface
78.6731 +
78.6732 +@@ -52,7 +55,10 @@
78.6733 + # Return stack to previous state and call the function
78.6734 + addl $8,%esp
78.6735 +
78.6736 +- call *28(%ebp)
78.6737 ++ # FIXME: Align the stack to a 128-bit boundary to avoid
78.6738 ++ # potential performance hits.
78.6739 ++
78.6740 ++ call *28(%ebp)
78.6741 +
78.6742 + # Remove the space we pushed for the args
78.6743 + movl 16(%ebp),%ecx
78.6744 +@@ -123,3 +129,98 @@
78.6745 + ret
78.6746 +
78.6747 + .ffi_call_SYSV_end:
78.6748 ++
78.6749 ++ # This assumes we are using gas.
78.6750 ++ .balign 16
78.6751 ++.globl _ffi_call_STDCALL
78.6752 ++
78.6753 ++_ffi_call_STDCALL:
78.6754 ++ pushl %ebp
78.6755 ++ movl %esp,%ebp
78.6756 ++
78.6757 ++ # Make room for all of the new args.
78.6758 ++ movl 16(%ebp),%ecx
78.6759 ++ subl %ecx,%esp
78.6760 ++
78.6761 ++ movl %esp,%eax
78.6762 ++
78.6763 ++ # Place all of the ffi_prep_args in position
78.6764 ++ pushl 12(%ebp)
78.6765 ++ pushl %eax
78.6766 ++ call *8(%ebp)
78.6767 ++
78.6768 ++ # Return stack to previous state and call the function
78.6769 ++ addl $8,%esp
78.6770 ++
78.6771 ++ # FIXME: Align the stack to a 128-bit boundary to avoid
78.6772 ++ # potential performance hits.
78.6773 ++
78.6774 ++ call *28(%ebp)
78.6775 ++
78.6776 ++ # stdcall functions pop arguments off the stack themselves
78.6777 ++
78.6778 ++ # Load %ecx with the return type code
78.6779 ++ movl 20(%ebp),%ecx
78.6780 ++
78.6781 ++ # If the return value pointer is NULL, assume no return value.
78.6782 ++ cmpl $0,24(%ebp)
78.6783 ++ jne sc_retint
78.6784 ++
78.6785 ++ # Even if there is no space for the return value, we are
78.6786 ++ # obliged to handle floating-point values.
78.6787 ++ cmpl $FFI_TYPE_FLOAT,%ecx
78.6788 ++ jne sc_noretval
78.6789 ++ fstp %st(0)
78.6790 ++
78.6791 ++ jmp sc_epilogue
78.6792 ++
78.6793 ++sc_retint:
78.6794 ++ cmpl $FFI_TYPE_INT,%ecx
78.6795 ++ jne sc_retfloat
78.6796 ++ # Load %ecx with the pointer to storage for the return value
78.6797 ++ movl 24(%ebp),%ecx
78.6798 ++ movl %eax,0(%ecx)
78.6799 ++ jmp sc_epilogue
78.6800 ++
78.6801 ++sc_retfloat:
78.6802 ++ cmpl $FFI_TYPE_FLOAT,%ecx
78.6803 ++ jne sc_retdouble
78.6804 ++ # Load %ecx with the pointer to storage for the return value
78.6805 ++ movl 24(%ebp),%ecx
78.6806 ++ fstps (%ecx)
78.6807 ++ jmp sc_epilogue
78.6808 ++
78.6809 ++sc_retdouble:
78.6810 ++ cmpl $FFI_TYPE_DOUBLE,%ecx
78.6811 ++ jne sc_retlongdouble
78.6812 ++ # Load %ecx with the pointer to storage for the return value
78.6813 ++ movl 24(%ebp),%ecx
78.6814 ++ fstpl (%ecx)
78.6815 ++ jmp sc_epilogue
78.6816 ++
78.6817 ++sc_retlongdouble:
78.6818 ++ cmpl $FFI_TYPE_LONGDOUBLE,%ecx
78.6819 ++ jne sc_retint64
78.6820 ++ # Load %ecx with the pointer to storage for the return value
78.6821 ++ movl 24(%ebp),%ecx
78.6822 ++ fstpt (%ecx)
78.6823 ++ jmp sc_epilogue
78.6824 ++
78.6825 ++sc_retint64:
78.6826 ++ cmpl $FFI_TYPE_SINT64,%ecx
78.6827 ++ jne sc_retstruct
78.6828 ++ # Load %ecx with the pointer to storage for the return value
78.6829 ++ movl 24(%ebp),%ecx
78.6830 ++ movl %eax,0(%ecx)
78.6831 ++ movl %edx,4(%ecx)
78.6832 ++
78.6833 ++sc_retstruct:
78.6834 ++ # Nothing to do!
78.6835 ++
78.6836 ++sc_noretval:
78.6837 ++sc_epilogue:
78.6838 ++ movl %ebp,%esp
78.6839 ++ popl %ebp
78.6840 ++ ret
78.6841 ++
78.6842 ++.ffi_call_STDCALL_end:
78.6843 +--- gcc-3.2.2.orig/libjava/configure.host Mon Jun 10 13:15:26 2002
78.6844 ++++ gcc-3.2.2/libjava/configure.host Sat Feb 15 19:57:25 2003
78.6845 +@@ -115,6 +115,12 @@
78.6846 + enable_getenv_properties_default=no
78.6847 + enable_main_args_default=no
78.6848 + ;;
78.6849 ++ sh-* | sh[34]*-*)
78.6850 ++ sysdeps_dir=sh
78.6851 ++ libgcj_flags="${libgcj_flags} -mieee"
78.6852 ++ libgcj_interpreter=yes
78.6853 ++ enable_hash_synchronization_default=yes
78.6854 ++ ;;
78.6855 + esac
78.6856 +
78.6857 + # This case statement supports generic port properties and may refine
78.6858 +@@ -126,7 +132,8 @@
78.6859 + powerpc*-linux* | \
78.6860 + alpha*-linux* | \
78.6861 + sparc*-linux* | \
78.6862 +- ia64-*)
78.6863 ++ ia64-* | \
78.6864 ++ sh-linux* | sh[34]*-linux*)
78.6865 + can_unwind_signal=yes
78.6866 + ;;
78.6867 + *-*-darwin*)
79.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
79.2 +++ b/patches/gcc/3.2.3/150-gcc-3.2.3-ppc-asm-spec.patch Sun Sep 23 17:08:09 2007 +0000
79.3 @@ -0,0 +1,54 @@
79.4 +Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
79.5 +
79.6 +Fixes the following errors when building gcc for ppc7450:
79.7 +
79.8 +/tmp/ccYph3gd.s: Assembler messages:
79.9 +/tmp/ccYph3gd.s:3823: Error: Unrecognized opcode: `mfvrsave'
79.10 +/tmp/ccYph3gd.s:3857: Error: Unrecognized opcode: `stvx'
79.11 +/tmp/ccYph3gd.s:4026: Error: Unrecognized opcode: `lvx'
79.12 +/tmp/ccYph3gd.s:4027: Error: Unrecognized opcode: `mtvrsave'
79.13 +make[2]: *** [libgcc/./unwind-dw2.o] Error 1
79.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'
79.15 +make[1]: *** [stmp-multilib] Error 2
79.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'
79.17 +make: *** [all-gcc] Error 2
79.18 +
79.19 +Note that the "-mcpu=7450" option must appear on the "gcc" command line in
79.20 +order for "-maltivec" to be passed to the assembler. Or, "-maltivec" itself
79.21 +may be passed to the "gcc" command.
79.22 +
79.23 +Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
79.24 +
79.25 +===================================================================
79.26 +--- gcc-3.2.3/gcc/config/rs6000/rs6000.h~ 2003-03-29 07:39:20.000000000 -0500
79.27 ++++ gcc-3.2.3/gcc/config/rs6000/rs6000.h 2004-08-23 16:33:21.000000000 -0400
79.28 +@@ -77,8 +77,8 @@
79.29 + %{mcpu=604e: -D_ARCH_PPC} \
79.30 + %{mcpu=620: -D_ARCH_PPC} \
79.31 + %{mcpu=740: -D_ARCH_PPC} \
79.32 +-%{mcpu=7400: -D_ARCH_PPC} \
79.33 +-%{mcpu=7450: -D_ARCH_PPC} \
79.34 ++%{mcpu=7400: -D_ARCH_PPC -D__ALTIVEC__} \
79.35 ++%{mcpu=7450: -D_ARCH_PPC -D__ALTIVEC__} \
79.36 + %{mcpu=750: -D_ARCH_PPC} \
79.37 + %{mcpu=801: -D_ARCH_PPC} \
79.38 + %{mcpu=821: -D_ARCH_PPC} \
79.39 +@@ -117,14 +117,15 @@
79.40 + %{mcpu=604e: -mppc} \
79.41 + %{mcpu=620: -mppc} \
79.42 + %{mcpu=740: -mppc} \
79.43 +-%{mcpu=7400: -mppc} \
79.44 +-%{mcpu=7450: -mppc} \
79.45 ++%{mcpu=7400: -mppc -maltivec} \
79.46 ++%{mcpu=7450: -mppc -maltivec} \
79.47 + %{mcpu=750: -mppc} \
79.48 + %{mcpu=801: -mppc} \
79.49 + %{mcpu=821: -mppc} \
79.50 + %{mcpu=823: -mppc} \
79.51 + %{mcpu=860: -mppc} \
79.52 +-%{maltivec: -maltivec}"
79.53 ++%{maltivec: -maltivec} \
79.54 ++-many"
79.55 +
79.56 + #define CPP_DEFAULT_SPEC ""
79.57 +
80.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
80.2 +++ b/patches/gcc/3.2.3/160-gcc-3.2.3-trap-posix.patch Sun Sep 23 17:08:09 2007 +0000
80.3 @@ -0,0 +1,45 @@
80.4 +#
80.5 +# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
80.6 +#
80.7 +# Error:
80.8 +#
80.9 +# creating libintl.h
80.10 +# Configuring etc...
80.11 +# loading cache ../config.cache
80.12 +# checking for a BSD compatible install... (cached) /usr/bin/install -c
80.13 +# creating ./config.status
80.14 +# creating Makefile
80.15 +# trap: usage: trap [-lp] [[arg] signal_spec ...]
80.16 +#
80.17 +# Description:
80.18 +#
80.19 +# non-posix conform usage of trap causes bash >= 3.0 to fail
80.20 +#
80.21 +# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
80.22 +#
80.23 +# Status:
80.24 +#
80.25 +# fixed in gcc >= 3.3.5
80.26 +# backport of gcc-3.3.5 fix
80.27 +#
80.28 +diff -ruN gcc-3.2.3-orig/configure gcc-3.2.3/configure
80.29 +--- gcc-3.2.3-orig/configure 2002-06-24 18:14:28.000000000 +0200
80.30 ++++ gcc-3.2.3/configure 2005-04-20 18:42:49.000000000 +0200
80.31 +@@ -697,7 +697,7 @@
80.32 + if test -f skip-this-dir; then
80.33 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
80.34 + # and reset the trap handler.
80.35 +- trap 0
80.36 ++ trap '' 0
80.37 + rm -rf Makefile* ${tmpdir}
80.38 + # Execute the final clean-up actions
80.39 + ${config_shell} skip-this-dir
80.40 +@@ -1615,7 +1615,7 @@
80.41 + # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
80.42 + # and reset the trap handler.
80.43 + rm -rf ${tmpdir}
80.44 +-trap 0
80.45 ++trap '' 0
80.46 +
80.47 + exit 0
80.48 +
81.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
81.2 +++ b/patches/gcc/3.2.3/170-gcc-3.3-libstdc++-v3-dg.exp.patch Sun Sep 23 17:08:09 2007 +0000
81.3 @@ -0,0 +1,54 @@
81.4 +Without this patch, the command
81.5 +
81.6 +RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
81.7 +
81.8 +fails in two ways:
81.9 +1. the -L option meant to locate the testsuite directory is incorrect, and
81.10 +2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
81.11 +is the native compiler is invoked when we really wanted to invoke the cross-compiler
81.12 +we just built.
81.13 +
81.14 +Here's an example log of the problem in action. Every testcase fails, this shows just one:
81.15 +-------------
81.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
81.17 +compiler exited with status 1
81.18 +output is:
81.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
81.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
81.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
81.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
81.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
81.24 +...
81.25 +FAIL: 20_util/binders.cc (test for excess errors)
81.26 +WARNING: 20_util/binders.cc compilation failed to produce executable
81.27 +-------------
81.28 +
81.29 +And here's the patch. I'm not happy with it, and it probably gets some cases wrong,
81.30 +but it seems to work for the common native case and for my cross-compiler case.
81.31 +
81.32 +--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old Sun Jul 13 10:42:01 2003
81.33 ++++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp Sun Jul 13 11:39:54 2003
81.34 +@@ -46,8 +46,23 @@
81.35 + global gluefile wrap_flags
81.36 + global ld_library_path
81.37 + global tool_root_dir
81.38 ++ global target_triplet
81.39 +
81.40 + set blddir [lookfor_file [get_multilibs] libstdc++-v3]
81.41 ++ if { $blddir == "" } {
81.42 ++ set multilibs [get_multilibs]
81.43 ++ # FIXME: assume multilib only one level deep
81.44 ++ set multisub [file tail $multilibs]
81.45 ++ verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
81.46 ++ set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
81.47 ++ }
81.48 ++ if { $blddir == "" } {
81.49 ++ verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
81.50 ++ set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
81.51 ++ }
81.52 ++ if { $blddir == "" } {
81.53 ++ error "Can't find libstdc++-v3"
81.54 ++ }
81.55 +
81.56 + # By default, we assume we want to run program images.
81.57 + global dg-do-what-default
82.1 --- a/patches/gcc/3.2.3/config.sub.patch Sat Sep 22 17:25:42 2007 +0000
82.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
82.3 @@ -1,72 +0,0 @@
82.4 -When configuring a s390->s390 or cris->cris crosscompiler
82.5 -(ok, I haven't hit this yet, but one of these days I'll get me an account
82.6 -on an s390, and then I'll need this patch :-), you'll get the
82.7 -following error:
82.8 -
82.9 -+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
82.10 ---target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
82.11 ---prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
82.12 ---enable-languages=c
82.13 ---with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
82.14 -unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
82.15 ---disable-shared
82.16 -...
82.17 -*** --with-headers is only supported when cross compiling
82.18 -
82.19 -This error pops up only when you're using Daniel Jacobowitz's technique
82.20 -of slightly changing the target and host tuples to make them different
82.21 -enough to force gcc's build system to not try to pull in system libraries
82.22 -or headers. This technique is needed e.g. to build an x86 -> x86
82.23 -cross-compiler.
82.24 -(The LFS developers ran into the same bug that prompted me to use
82.25 -this technique; they point people who run into it to
82.26 -http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
82.27 -way of avoiding this problem. I think the tuple tweak is the way to go, though.)
82.28 -
82.29 -config-patches@gnu.org rejected this patch, on the grounds that there
82.30 -is only one vendor of each of those two architectures, so the
82.31 -canonicalization is by definition correct. When I pointed out the
82.32 -difficulty this causes for people building s390 -> s390 or
82.33 -cris -> cris compilers that are incompatible with the system
82.34 -libraries and thus must be built like cross-compilers, he grumped and said
82.35 -"autoconf should let you specify a cross-compiler in some other way than
82.36 -comparing tuple strings".
82.37 -
82.38 -
82.39 -
82.40 ---- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003
82.41 -+++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003
82.42 -@@ -433,9 +433,12 @@
82.43 - crds | unos)
82.44 - basic_machine=m68k-crds
82.45 - ;;
82.46 -- cris | cris-* | etrax*)
82.47 -+ cris | etrax*)
82.48 - basic_machine=cris-axis
82.49 - ;;
82.50 -+ cris-*)
82.51 -+ basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
82.52 -+ ;;
82.53 - da30 | da30-*)
82.54 - basic_machine=m68k-da30
82.55 - ;;
82.56 -@@ -820,11 +823,17 @@
82.57 - rtpc | rtpc-*)
82.58 - basic_machine=romp-ibm
82.59 - ;;
82.60 -- s390 | s390-*)
82.61 -+ s390)
82.62 - basic_machine=s390-ibm
82.63 - ;;
82.64 -- s390x | s390x-*)
82.65 -+ s390-*)
82.66 -+ basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
82.67 -+ ;;
82.68 -+ s390x)
82.69 - basic_machine=s390x-ibm
82.70 -+ ;;
82.71 -+ s390x-*)
82.72 -+ basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
82.73 - ;;
82.74 - sa29200)
82.75 - basic_machine=a29k-amd
83.1 --- a/patches/gcc/3.2.3/gcc-20020722-ppc405erratum77.patch Sat Sep 22 17:25:42 2007 +0000
83.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
83.3 @@ -1,105 +0,0 @@
83.4 -# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
83.5 -# Fixed in gcc-3.3
83.6 -
83.7 -diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
83.8 ---- gcc-20020722.orig/gcc/config/rs6000/rs6000.h Thu Jul 25 09:32:21 2002
83.9 -+++ gcc-20020722/gcc/config/rs6000/rs6000.h Thu Jul 25 09:34:45 2002
83.10 -@@ -66,7 +66,7 @@
83.11 - %{mcpu=rsc1: -D_ARCH_PWR} \
83.12 - %{mcpu=401: -D_ARCH_PPC} \
83.13 - %{mcpu=403: -D_ARCH_PPC} \
83.14 --%{mcpu=405: -D_ARCH_PPC} \
83.15 -+%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
83.16 - %{mcpu=505: -D_ARCH_PPC} \
83.17 - %{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
83.18 - %{mcpu=602: -D_ARCH_PPC} \
83.19 -diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
83.20 ---- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h Thu Jul 25 09:32:30 2002
83.21 -+++ gcc-20020722/libjava/sysdep/powerpc/locks.h Thu Jul 25 11:39:13 2002
83.22 -@@ -11,6 +11,17 @@
83.23 - #ifndef __SYSDEP_LOCKS_H__
83.24 - #define __SYSDEP_LOCKS_H__
83.25 -
83.26 -+#ifdef __PPC405__
83.27 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN. References:
83.28 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
83.29 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
83.30 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
83.31 -+// FIXME: using dbct instead of sync would be faster
83.32 -+#define __LIBGCJ_PPC405_ERR77_SYNC "sync \n\t"
83.33 -+#else
83.34 -+#define __LIBGCJ_PPC405_ERR77_SYNC
83.35 -+#endif
83.36 -+
83.37 - typedef size_t obj_addr_t; /* Integer type big enough for object */
83.38 - /* address. */
83.39 -
83.40 -@@ -25,6 +36,7 @@
83.41 - "0: lwarx %0,0,%1 ;"
83.42 - " xor. %0,%3,%0;"
83.43 - " bne 1f;"
83.44 -+ __LIBGCJ_PPC405_ERR77_SYNC
83.45 - " stwcx. %2,0,%1;"
83.46 - " bne- 0b;"
83.47 - "1: "
83.48 -@@ -58,6 +70,7 @@
83.49 - "0: lwarx %0,0,%1 ;"
83.50 - " xor. %0,%3,%0;"
83.51 - " bne 1f;"
83.52 -+ __LIBGCJ_PPC405_ERR77_SYNC
83.53 - " stwcx. %2,0,%1;"
83.54 - " bne- 0b;"
83.55 - "1: "
83.56 -diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
83.57 ---- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:32:31 2002
83.58 -+++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:34:45 2002
83.59 -@@ -32,6 +32,17 @@
83.60 -
83.61 - typedef int _Atomic_word;
83.62 -
83.63 -+#ifdef __PPC405__
83.64 -+// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank. References:
83.65 -+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
83.66 -+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
83.67 -+// http://www.kegel.com/xgcc3/ppc405erratum77.html
83.68 -+// FIXME: using dbct instead of sync would be faster
83.69 -+#define __LIBSTDCPP_PPC405_ERR77_SYNC "sync \n\t"
83.70 -+#else
83.71 -+#define __LIBSTDCPP_PPC405_ERR77_SYNC
83.72 -+#endif
83.73 -+
83.74 - static inline _Atomic_word
83.75 - __attribute__ ((__unused__))
83.76 - __exchange_and_add (volatile _Atomic_word* __mem, int __val)
83.77 -@@ -42,6 +53,7 @@
83.78 - "0:\t"
83.79 - "lwarx %0,0,%2 \n\t"
83.80 - "add%I3 %1,%0,%3 \n\t"
83.81 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
83.82 - "stwcx. %1,0,%2 \n\t"
83.83 - "bne- 0b \n\t"
83.84 - "/* End exchange & add */"
83.85 -@@ -61,6 +73,7 @@
83.86 - "0:\t"
83.87 - "lwarx %0,0,%1 \n\t"
83.88 - "add%I2 %0,%0,%2 \n\t"
83.89 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
83.90 - "stwcx. %0,0,%1 \n\t"
83.91 - "bne- 0b \n\t"
83.92 - "/* End atomic add */"
83.93 -@@ -78,6 +91,7 @@
83.94 - "/* Inline always swap */\n"
83.95 - "0:\t"
83.96 - "lwarx %0,0,%1 \n\t"
83.97 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
83.98 - "stwcx. %2,0,%1 \n\t"
83.99 - "bne- 0b \n\t"
83.100 - "/* End always swap */"
83.101 -@@ -98,6 +112,7 @@
83.102 - "lwarx %0,0,%1 \n\t"
83.103 - "cmpwi %0,0 \n\t"
83.104 - "bne- 1f \n\t"
83.105 -+ __LIBSTDCPP_PPC405_ERR77_SYNC
83.106 - "stwcx. %2,0,%1 \n\t"
83.107 - "bne- 0b \n"
83.108 - "1:\n\t"
84.1 --- a/patches/gcc/3.2.3/gcc-20030210-sh-linux-1.patch Sat Sep 22 17:25:42 2007 +0000
84.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
84.3 @@ -1,1761 +0,0 @@
84.4 -diff -ruN gcc-20030210.orig/boehm-gc/configure gcc-20030210/boehm-gc/configure
84.5 ---- gcc-20030210.orig/boehm-gc/configure Fri Jan 31 19:17:00 2003
84.6 -+++ gcc-20030210/boehm-gc/configure Sat Feb 22 01:40:14 2003
84.7 -@@ -1922,7 +1922,7 @@
84.8 - # This must be Linux ELF.
84.9 - linux-gnu*)
84.10 - case $host_cpu in
84.11 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
84.12 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
84.13 - lt_cv_deplibs_check_method=pass_all ;;
84.14 - *)
84.15 - # glibc up to 2.1.1 does not perform some relocations on ARM
84.16 -diff -ruN gcc-20030210.orig/config-ml.in gcc-20030210/config-ml.in
84.17 ---- gcc-20030210.orig/config-ml.in Fri Jan 31 19:16:59 2003
84.18 -+++ gcc-20030210/config-ml.in Sat Feb 22 01:40:14 2003
84.19 -@@ -545,6 +545,7 @@
84.20 - if [ -d ../$${dir}/$${lib} ]; then \
84.21 - flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
84.22 - if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
84.23 -+ DESTDIR="$(DESTDIR)" \
84.24 - CFLAGS="$(CFLAGS) $${flags}" \
84.25 - prefix="$(prefix)" \
84.26 - exec_prefix="$(exec_prefix)" \
84.27 -diff -ruN gcc-20030210.orig/debian/edit-specs.in gcc-20030210/debian/edit-specs.in
84.28 ---- gcc-20030210.orig/debian/edit-specs.in Thu Jan 1 09:00:00 1970
84.29 -+++ gcc-20030210/debian/edit-specs.in Sat Feb 22 01:40:14 2003
84.30 -@@ -0,0 +1,45 @@
84.31 -+/^*asm:$/ {
84.32 -+n
84.33 -+c\
84.34 -+@AS_ENDIAN_FLAG@ %{mrelax:-relax}
84.35 -+}
84.36 -+/^*cpp:$/ {
84.37 -+n
84.38 -+c\
84.39 -+%(cpp_default_cpu_spec) %(subtarget_cpp_spec) %(subtarget_cpp_ptr_spec) %(subtarget_cpp_endian_spec)
84.40 -+}
84.41 -+/^*cc1:$/ {
84.42 -+n
84.43 -+c\
84.44 -+-musermode @CC1_CPU_ENDIAN_FLAGS@ %{profile:-p}
84.45 -+}
84.46 -+/^*link:$/ {
84.47 -+n
84.48 -+c\
84.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}
84.50 -+}
84.51 -+/^*multilib:$/ {
84.52 -+n
84.53 -+c\
84.54 -+. ;
84.55 -+}
84.56 -+/^*multilib_matches:$/ {
84.57 -+n
84.58 -+c\
84.59 -+
84.60 -+}
84.61 -+/^*multilib_options:$/ {
84.62 -+n
84.63 -+c\
84.64 -+
84.65 -+}
84.66 -+/^*subtarget_cpp_endian_spec:$/ {
84.67 -+n
84.68 -+c\
84.69 -+@CPP_ENDIAN_DEF@
84.70 -+}
84.71 -+/^*cpp_default_cpu_spec:$/ {
84.72 -+n
84.73 -+c\
84.74 -+@CPP_CPU_DEFS@
84.75 -+}
84.76 -diff -ruN gcc-20030210.orig/debian/install-CPU-linux gcc-20030210/debian/install-CPU-linux
84.77 ---- gcc-20030210.orig/debian/install-CPU-linux Thu Jan 1 09:00:00 1970
84.78 -+++ gcc-20030210/debian/install-CPU-linux Sat Feb 22 01:40:14 2003
84.79 -@@ -0,0 +1,111 @@
84.80 -+#! /bin/sh
84.81 -+
84.82 -+VERSION=$1; shift
84.83 -+CPU=$1
84.84 -+
84.85 -+# literally (binary-ly) same
84.86 -+PROGS_C="cpp gcc"
84.87 -+PROGS_ADDITIONAL="c++ g++ g77 gcj"
84.88 -+
84.89 -+DRIVERS_C="cc1 cpp0 tradcpp0"
84.90 -+DRIVERS_ADDITIONAL="cc1obj cc1plus collect2 f771 jc1 jvgenmain"
84.91 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
84.92 -+ PROGS="$PROGS_C $PROGS_ADDITIONAL"
84.93 -+ DRIVERS="$DRIVERS_C $DRIVERSADDITIONAL"
84.94 -+ INITIAL=""
84.95 -+else
84.96 -+ PROGS=$PROGS_C
84.97 -+ DRIVERS=$DRIVERS_C
84.98 -+ INITIAL="-initial"
84.99 -+fi
84.100 -+
84.101 -+OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o"
84.102 -+LIBS_C="libgcc.a"
84.103 -+LIBS_1="libgcc_s.so libgcc_s.so.1 libstdc++.so libstdc++.so.3 libstdc++.so.3.0.2"
84.104 -+LIBS_2="libobjc.a libstdc++.a libsupc++.a"
84.105 -+INCLUDE="include"
84.106 -+
84.107 -+cd debian/gcc-sh-linux-others${INITIAL} || exit 1
84.108 -+
84.109 -+# Make directories.
84.110 -+mkdir -p usr/bin usr/share usr/share/man usr/share/man/man1 usr/lib \
84.111 -+ usr/lib/gcc-lib usr/lib/gcc-lib/${CPU}-linux \
84.112 -+ usr/lib/gcc-lib/${CPU}-linux/${VERSION} \
84.113 -+ usr/${CPU}-linux usr/${CPU}-linux/lib
84.114 -+
84.115 -+# Make symbolic links for include dir.
84.116 -+(cd usr/${CPU}-linux; ln -s ../sh-linux/include .)
84.117 -+
84.118 -+# Make symbolic links for executables.
84.119 -+(cd usr/bin;
84.120 -+ for p in ${PROGS}; do
84.121 -+ ln -s shCPU-linux-GCC ${CPU}-linux-$p
84.122 -+ done)
84.123 -+
84.124 -+case "${CPU}" in
84.125 -+ sh3)
84.126 -+ MULTILIBDIR=
84.127 -+ AS_ENDIAN_FLAG="-little"
84.128 -+ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
84.129 -+ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
84.130 -+ CC1_CPU_ENDIAN_FLAGS="-ml -m3"
84.131 -+ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
84.132 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3-linux/lib"
84.133 -+ ;;
84.134 -+ sh3eb)
84.135 -+ MULTILIBDIR=/mb
84.136 -+ AS_ENDIAN_FLAG="-big"
84.137 -+ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
84.138 -+ CPP_CPU_DEFS="-D__SH3__ -D__sh3__"
84.139 -+ CC1_CPU_ENDIAN_FLAGS="-mb -m3"
84.140 -+ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
84.141 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh3eb-linux/lib"
84.142 -+ ;;
84.143 -+ sh4)
84.144 -+ MULTILIBDIR=/m4
84.145 -+ AS_ENDIAN_FLAG="-little"
84.146 -+ CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
84.147 -+ CPP_CPU_DEFS="-D__SH4__"
84.148 -+ CC1_CPU_ENDIAN_FLAGS="-ml -m4"
84.149 -+ LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
84.150 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4-linux/lib"
84.151 -+ ;;
84.152 -+ sh4eb)
84.153 -+ MULTILIBDIR=/mb/m4
84.154 -+ AS_ENDIAN_FLAG="-big"
84.155 -+ CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
84.156 -+ CPP_CPU_DEFS="-D__SH4__"
84.157 -+ CC1_CPU_ENDIAN_FLAGS="-mb -m4"
84.158 -+ LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
84.159 -+ LINKER_RPATH_LINK_FLAG="-rpath-link /usr/sh4eb-linux/lib"
84.160 -+ ;;
84.161 -+esac
84.162 -+
84.163 -+# Make symbolic links for GCC drivers, objects, libraries, and include dir.
84.164 -+(cd usr/lib/gcc-lib/${CPU}-linux/${VERSION};
84.165 -+ for f in ${DRIVERS} ${INCLUDE}; do
84.166 -+ ln -s ../../sh-linux/${VERSION}/$f $f;
84.167 -+ done
84.168 -+ for f in ${OBJS} ${LIBS_C}; do
84.169 -+ ln -s ../../sh-linux/${VERSION}${MULTILIBDIR}/$f $f;
84.170 -+ done)
84.171 -+
84.172 -+if [ -z "$STEP1_COMPILER_BUILD" ]; then
84.173 -+ for f in ${LIBS_1} ${LIBS_2}; do
84.174 -+ mv ../gcc-sh-linux/usr/sh-linux/lib${MULTILIBDIR}/$f usr/${CPU}-linux/lib/;
84.175 -+ done
84.176 -+fi
84.177 -+
84.178 -+sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
84.179 -+ -e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
84.180 -+ -e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
84.181 -+ -e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
84.182 -+ -e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
84.183 -+ -e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
84.184 -+ ../edit-specs.in >../edit-specs-${CPU}.sed
84.185 -+
84.186 -+sed -f ../edit-specs-${CPU}.sed \
84.187 -+ ../gcc-sh-linux${INITIAL}/usr/lib/gcc-lib/sh-linux/${VERSION}/specs \
84.188 -+ > usr/lib/gcc-lib/${CPU}-linux/${VERSION}/specs
84.189 -+
84.190 -+exit 0
84.191 -diff -ruN gcc-20030210.orig/debian/multilib-symlink gcc-20030210/debian/multilib-symlink
84.192 ---- gcc-20030210.orig/debian/multilib-symlink Thu Jan 1 09:00:00 1970
84.193 -+++ gcc-20030210/debian/multilib-symlink Sat Feb 22 01:40:14 2003
84.194 -@@ -0,0 +1,10 @@
84.195 -+#! /bin/sh
84.196 -+
84.197 -+cd /usr/sh-linux/lib
84.198 -+ln -s ../../sh3-linux/lib/{*.a,*.so*,*.o} .
84.199 -+cd m4
84.200 -+ln -s ../../../sh4-linux/lib/{*.a,*.so*,*.o} .
84.201 -+cd ../mb
84.202 -+ln -s ../../../sh3eb-linux/lib/{*.a,*.so*,*.o} .
84.203 -+cd m4
84.204 -+ln -s ../../../../sh4eb-linux/lib/{*.a,*.so*,*.o} .
84.205 -diff -ruN gcc-20030210.orig/debian/shCPU-linux-GCC gcc-20030210/debian/shCPU-linux-GCC
84.206 ---- gcc-20030210.orig/debian/shCPU-linux-GCC Thu Jan 1 09:00:00 1970
84.207 -+++ gcc-20030210/debian/shCPU-linux-GCC Sat Feb 22 01:40:14 2003
84.208 -@@ -0,0 +1,59 @@
84.209 -+#! /bin/bash
84.210 -+
84.211 -+BASENAME=${0##*/}
84.212 -+PROG=${BASENAME##*-}
84.213 -+CPU=${BASENAME%%-*}
84.214 -+
84.215 -+if [ "$PROG" = gcc ]; then
84.216 -+ if [ "$1" = "-b" -a "$2" = "i386-linux" ]; then
84.217 -+ shift 2
84.218 -+ exec /usr/bin/gcc "$@"
84.219 -+ elif [ "$1" = "-print-multi-lib" -o "$1" = "--print-multi-lib" ]; then
84.220 -+ echo ".;"
84.221 -+ exit 0
84.222 -+ elif [ "$1" = "-print-multi-os-directory" -o "$1" = "--print-multi-os-directory" ]; then
84.223 -+ echo "."
84.224 -+ exit 0
84.225 -+ elif [ "$1" = "-dumpspecs" ]; then
84.226 -+ cat /usr/lib/gcc-lib/${CPU}-linux/@@VERSION@@/specs
84.227 -+ exit 0
84.228 -+ fi
84.229 -+fi
84.230 -+
84.231 -+case "${CPU}" in
84.232 -+ sh3)
84.233 -+ ARCH=m3
84.234 -+ DEFINES="-D__sh3__ -D__SH3__ -D__LITTLE_ENDIAN__"
84.235 -+ ENDIAN=ml
84.236 -+ ;;
84.237 -+ sh3eb)
84.238 -+ ARCH=m3
84.239 -+ DEFINES="-D__sh3__ -D__SH3__ -D__BIG_ENDIAN__"
84.240 -+ ENDIAN=mb
84.241 -+ ;;
84.242 -+ sh4)
84.243 -+ ARCH=m4
84.244 -+ DEFINES="-D__SH4__ -D__LITTLE_ENDIAN__"
84.245 -+ ENDIAN=ml
84.246 -+ ;;
84.247 -+ sh4eb)
84.248 -+ ARCH=m4
84.249 -+ DEFINES="-D__SH4__ -D__BIG_ENDIAN__"
84.250 -+ ENDIAN=mb
84.251 -+ ;;
84.252 -+esac
84.253 -+
84.254 -+# Prepend the appropriate options
84.255 -+# If user specifies some options, it will be overridden
84.256 -+
84.257 -+case "${PROG}" in
84.258 -+ cpp)
84.259 -+ exec sh-linux-${PROG} $DEFINES "$@"
84.260 -+ ;;
84.261 -+ c++|g++|g77|gcc|gcj)
84.262 -+ exec sh-linux-${PROG} -$ARCH -$ENDIAN "$@"
84.263 -+ ;;
84.264 -+esac
84.265 -+
84.266 -+echo "Something wrong..."
84.267 -+exit 1
84.268 -diff -ruN gcc-20030210.orig/gcc/config/sh/elf.h gcc-20030210/gcc/config/sh/elf.h
84.269 ---- gcc-20030210.orig/gcc/config/sh/elf.h Fri Feb 22 01:42:28 2002
84.270 -+++ gcc-20030210/gcc/config/sh/elf.h Sat Feb 22 01:40:14 2003
84.271 -@@ -170,3 +170,7 @@
84.272 - #undef ENDFILE_SPEC
84.273 - #define ENDFILE_SPEC \
84.274 - "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
84.275 -+
84.276 -+/* ASM_OUTPUT_CASE_LABEL is defined in elfos.h. With it,
84.277 -+ redundant .align will be generated. */
84.278 -+#undef ASM_OUTPUT_CASE_LABEL
84.279 -diff -ruN gcc-20030210.orig/gcc/config/sh/lib1funcs.asm gcc-20030210/gcc/config/sh/lib1funcs.asm
84.280 ---- gcc-20030210.orig/gcc/config/sh/lib1funcs.asm Fri Feb 22 01:42:28 2002
84.281 -+++ gcc-20030210/gcc/config/sh/lib1funcs.asm Sat Feb 22 01:40:14 2003
84.282 -@@ -39,8 +39,13 @@
84.283 -
84.284 - #ifdef __ELF__
84.285 - #define LOCAL(X) .L_##X
84.286 -+#define FUNC(X) .type X,@function; .hidden X
84.287 -+#define _ENDFUNC(X) .Lfe_##X: .size X,.Lfe_##X-X
84.288 -+#define ENDFUNC(X) _ENDFUNC(X)
84.289 - #else
84.290 - #define LOCAL(X) L_##X
84.291 -+#define FUNC(X)
84.292 -+#define ENDFUNC(X)
84.293 - #endif
84.294 -
84.295 - #ifdef __linux__
84.296 -@@ -91,6 +96,40 @@
84.297 - .global GLOBAL(ashiftrt_r4_31)
84.298 - .global GLOBAL(ashiftrt_r4_32)
84.299 -
84.300 -+ FUNC(GLOBAL(ashiftrt_r4_0))
84.301 -+ FUNC(GLOBAL(ashiftrt_r4_1))
84.302 -+ FUNC(GLOBAL(ashiftrt_r4_2))
84.303 -+ FUNC(GLOBAL(ashiftrt_r4_3))
84.304 -+ FUNC(GLOBAL(ashiftrt_r4_4))
84.305 -+ FUNC(GLOBAL(ashiftrt_r4_5))
84.306 -+ FUNC(GLOBAL(ashiftrt_r4_6))
84.307 -+ FUNC(GLOBAL(ashiftrt_r4_7))
84.308 -+ FUNC(GLOBAL(ashiftrt_r4_8))
84.309 -+ FUNC(GLOBAL(ashiftrt_r4_9))
84.310 -+ FUNC(GLOBAL(ashiftrt_r4_10))
84.311 -+ FUNC(GLOBAL(ashiftrt_r4_11))
84.312 -+ FUNC(GLOBAL(ashiftrt_r4_12))
84.313 -+ FUNC(GLOBAL(ashiftrt_r4_13))
84.314 -+ FUNC(GLOBAL(ashiftrt_r4_14))
84.315 -+ FUNC(GLOBAL(ashiftrt_r4_15))
84.316 -+ FUNC(GLOBAL(ashiftrt_r4_16))
84.317 -+ FUNC(GLOBAL(ashiftrt_r4_17))
84.318 -+ FUNC(GLOBAL(ashiftrt_r4_18))
84.319 -+ FUNC(GLOBAL(ashiftrt_r4_19))
84.320 -+ FUNC(GLOBAL(ashiftrt_r4_20))
84.321 -+ FUNC(GLOBAL(ashiftrt_r4_21))
84.322 -+ FUNC(GLOBAL(ashiftrt_r4_22))
84.323 -+ FUNC(GLOBAL(ashiftrt_r4_23))
84.324 -+ FUNC(GLOBAL(ashiftrt_r4_24))
84.325 -+ FUNC(GLOBAL(ashiftrt_r4_25))
84.326 -+ FUNC(GLOBAL(ashiftrt_r4_26))
84.327 -+ FUNC(GLOBAL(ashiftrt_r4_27))
84.328 -+ FUNC(GLOBAL(ashiftrt_r4_28))
84.329 -+ FUNC(GLOBAL(ashiftrt_r4_29))
84.330 -+ FUNC(GLOBAL(ashiftrt_r4_30))
84.331 -+ FUNC(GLOBAL(ashiftrt_r4_31))
84.332 -+ FUNC(GLOBAL(ashiftrt_r4_32))
84.333 -+
84.334 - .align 1
84.335 - GLOBAL(ashiftrt_r4_32):
84.336 - GLOBAL(ashiftrt_r4_31):
84.337 -@@ -170,6 +209,41 @@
84.338 - GLOBAL(ashiftrt_r4_0):
84.339 - rts
84.340 - nop
84.341 -+
84.342 -+ ENDFUNC(GLOBAL(ashiftrt_r4_0))
84.343 -+ ENDFUNC(GLOBAL(ashiftrt_r4_1))
84.344 -+ ENDFUNC(GLOBAL(ashiftrt_r4_2))
84.345 -+ ENDFUNC(GLOBAL(ashiftrt_r4_3))
84.346 -+ ENDFUNC(GLOBAL(ashiftrt_r4_4))
84.347 -+ ENDFUNC(GLOBAL(ashiftrt_r4_5))
84.348 -+ ENDFUNC(GLOBAL(ashiftrt_r4_6))
84.349 -+ ENDFUNC(GLOBAL(ashiftrt_r4_7))
84.350 -+ ENDFUNC(GLOBAL(ashiftrt_r4_8))
84.351 -+ ENDFUNC(GLOBAL(ashiftrt_r4_9))
84.352 -+ ENDFUNC(GLOBAL(ashiftrt_r4_10))
84.353 -+ ENDFUNC(GLOBAL(ashiftrt_r4_11))
84.354 -+ ENDFUNC(GLOBAL(ashiftrt_r4_12))
84.355 -+ ENDFUNC(GLOBAL(ashiftrt_r4_13))
84.356 -+ ENDFUNC(GLOBAL(ashiftrt_r4_14))
84.357 -+ ENDFUNC(GLOBAL(ashiftrt_r4_15))
84.358 -+ ENDFUNC(GLOBAL(ashiftrt_r4_16))
84.359 -+ ENDFUNC(GLOBAL(ashiftrt_r4_17))
84.360 -+ ENDFUNC(GLOBAL(ashiftrt_r4_18))
84.361 -+ ENDFUNC(GLOBAL(ashiftrt_r4_19))
84.362 -+ ENDFUNC(GLOBAL(ashiftrt_r4_20))
84.363 -+ ENDFUNC(GLOBAL(ashiftrt_r4_21))
84.364 -+ ENDFUNC(GLOBAL(ashiftrt_r4_22))
84.365 -+ ENDFUNC(GLOBAL(ashiftrt_r4_23))
84.366 -+ ENDFUNC(GLOBAL(ashiftrt_r4_24))
84.367 -+ ENDFUNC(GLOBAL(ashiftrt_r4_25))
84.368 -+ ENDFUNC(GLOBAL(ashiftrt_r4_26))
84.369 -+ ENDFUNC(GLOBAL(ashiftrt_r4_27))
84.370 -+ ENDFUNC(GLOBAL(ashiftrt_r4_28))
84.371 -+ ENDFUNC(GLOBAL(ashiftrt_r4_29))
84.372 -+ ENDFUNC(GLOBAL(ashiftrt_r4_30))
84.373 -+ ENDFUNC(GLOBAL(ashiftrt_r4_31))
84.374 -+ ENDFUNC(GLOBAL(ashiftrt_r4_32))
84.375 -+
84.376 - #endif
84.377 -
84.378 - #ifdef L_ashiftrt_n
84.379 -@@ -192,6 +266,7 @@
84.380 - !
84.381 -
84.382 - .global GLOBAL(ashrsi3)
84.383 -+ FUNC(GLOBAL(ashrsi3))
84.384 - .align 2
84.385 - GLOBAL(ashrsi3):
84.386 - mov #31,r0
84.387 -@@ -319,6 +394,8 @@
84.388 - rts
84.389 - nop
84.390 -
84.391 -+ ENDFUNC(GLOBAL(ashrsi3))
84.392 -+
84.393 - #endif
84.394 -
84.395 - #ifdef L_ashiftlt
84.396 -@@ -340,6 +417,7 @@
84.397 - ! (none)
84.398 - !
84.399 - .global GLOBAL(ashlsi3)
84.400 -+ FUNC(GLOBAL(ashlsi3))
84.401 - .align 2
84.402 - GLOBAL(ashlsi3):
84.403 - mov #31,r0
84.404 -@@ -476,6 +554,8 @@
84.405 - rts
84.406 - nop
84.407 -
84.408 -+ ENDFUNC(GLOBAL(ashlsi3))
84.409 -+
84.410 - #endif
84.411 -
84.412 - #ifdef L_lshiftrt
84.413 -@@ -497,6 +577,7 @@
84.414 - ! (none)
84.415 - !
84.416 - .global GLOBAL(lshrsi3)
84.417 -+ FUNC(GLOBAL(lshrsi3))
84.418 - .align 2
84.419 - GLOBAL(lshrsi3):
84.420 - mov #31,r0
84.421 -@@ -633,6 +714,8 @@
84.422 - rts
84.423 - nop
84.424 -
84.425 -+ ENDFUNC(GLOBAL(lshrsi3))
84.426 -+
84.427 - #endif
84.428 -
84.429 - #ifdef L_movstr
84.430 -@@ -649,76 +732,113 @@
84.431 - add #64,r4
84.432 - .align 4
84.433 - .global GLOBAL(movstrSI64)
84.434 -+ FUNC(GLOBAL(movstrSI64))
84.435 - GLOBAL(movstrSI64):
84.436 - mov.l @(60,r5),r0
84.437 - mov.l r0,@(60,r4)
84.438 - .global GLOBAL(movstrSI60)
84.439 -+ FUNC(GLOBAL(movstrSI60))
84.440 - GLOBAL(movstrSI60):
84.441 - mov.l @(56,r5),r0
84.442 - mov.l r0,@(56,r4)
84.443 - .global GLOBAL(movstrSI56)
84.444 -+ FUNC(GLOBAL(movstrSI56))
84.445 - GLOBAL(movstrSI56):
84.446 - mov.l @(52,r5),r0
84.447 - mov.l r0,@(52,r4)
84.448 - .global GLOBAL(movstrSI52)
84.449 -+ FUNC(GLOBAL(movstrSI52))
84.450 - GLOBAL(movstrSI52):
84.451 - mov.l @(48,r5),r0
84.452 - mov.l r0,@(48,r4)
84.453 - .global GLOBAL(movstrSI48)
84.454 -+ FUNC(GLOBAL(movstrSI48))
84.455 - GLOBAL(movstrSI48):
84.456 - mov.l @(44,r5),r0
84.457 - mov.l r0,@(44,r4)
84.458 - .global GLOBAL(movstrSI44)
84.459 -+ FUNC(GLOBAL(movstrSI44))
84.460 - GLOBAL(movstrSI44):
84.461 - mov.l @(40,r5),r0
84.462 - mov.l r0,@(40,r4)
84.463 - .global GLOBAL(movstrSI40)
84.464 -+ FUNC(GLOBAL(movstrSI40))
84.465 - GLOBAL(movstrSI40):
84.466 - mov.l @(36,r5),r0
84.467 - mov.l r0,@(36,r4)
84.468 - .global GLOBAL(movstrSI36)
84.469 -+ FUNC(GLOBAL(movstrSI36))
84.470 - GLOBAL(movstrSI36):
84.471 - mov.l @(32,r5),r0
84.472 - mov.l r0,@(32,r4)
84.473 - .global GLOBAL(movstrSI32)
84.474 -+ FUNC(GLOBAL(movstrSI32))
84.475 - GLOBAL(movstrSI32):
84.476 - mov.l @(28,r5),r0
84.477 - mov.l r0,@(28,r4)
84.478 - .global GLOBAL(movstrSI28)
84.479 -+ FUNC(GLOBAL(movstrSI28))
84.480 - GLOBAL(movstrSI28):
84.481 - mov.l @(24,r5),r0
84.482 - mov.l r0,@(24,r4)
84.483 - .global GLOBAL(movstrSI24)
84.484 -+ FUNC(GLOBAL(movstrSI24))
84.485 - GLOBAL(movstrSI24):
84.486 - mov.l @(20,r5),r0
84.487 - mov.l r0,@(20,r4)
84.488 - .global GLOBAL(movstrSI20)
84.489 -+ FUNC(GLOBAL(movstrSI20))
84.490 - GLOBAL(movstrSI20):
84.491 - mov.l @(16,r5),r0
84.492 - mov.l r0,@(16,r4)
84.493 - .global GLOBAL(movstrSI16)
84.494 -+ FUNC(GLOBAL(movstrSI16))
84.495 - GLOBAL(movstrSI16):
84.496 - mov.l @(12,r5),r0
84.497 - mov.l r0,@(12,r4)
84.498 - .global GLOBAL(movstrSI12)
84.499 -+ FUNC(GLOBAL(movstrSI12))
84.500 - GLOBAL(movstrSI12):
84.501 - mov.l @(8,r5),r0
84.502 - mov.l r0,@(8,r4)
84.503 - .global GLOBAL(movstrSI8)
84.504 -+ FUNC(GLOBAL(movstrSI8))
84.505 - GLOBAL(movstrSI8):
84.506 - mov.l @(4,r5),r0
84.507 - mov.l r0,@(4,r4)
84.508 - .global GLOBAL(movstrSI4)
84.509 -+ FUNC(GLOBAL(movstrSI4))
84.510 - GLOBAL(movstrSI4):
84.511 - mov.l @(0,r5),r0
84.512 - mov.l r0,@(0,r4)
84.513 -+ .global GLOBAL(movstrSI0)
84.514 -+ FUNC(GLOBAL(movstrSI0))
84.515 - GLOBAL(movstrSI0):
84.516 - rts
84.517 - nop
84.518 -
84.519 -+ ENDFUNC(GLOBAL(movstrSI64))
84.520 -+ ENDFUNC(GLOBAL(movstrSI60))
84.521 -+ ENDFUNC(GLOBAL(movstrSI56))
84.522 -+ ENDFUNC(GLOBAL(movstrSI52))
84.523 -+ ENDFUNC(GLOBAL(movstrSI48))
84.524 -+ ENDFUNC(GLOBAL(movstrSI44))
84.525 -+ ENDFUNC(GLOBAL(movstrSI40))
84.526 -+ ENDFUNC(GLOBAL(movstrSI36))
84.527 -+ ENDFUNC(GLOBAL(movstrSI32))
84.528 -+ ENDFUNC(GLOBAL(movstrSI28))
84.529 -+ ENDFUNC(GLOBAL(movstrSI24))
84.530 -+ ENDFUNC(GLOBAL(movstrSI20))
84.531 -+ ENDFUNC(GLOBAL(movstrSI16))
84.532 -+ ENDFUNC(GLOBAL(movstrSI12))
84.533 -+ ENDFUNC(GLOBAL(movstrSI8))
84.534 -+ ENDFUNC(GLOBAL(movstrSI4))
84.535 -+ ENDFUNC(GLOBAL(movstrSI0))
84.536 -+
84.537 - .align 4
84.538 -
84.539 - .global GLOBAL(movstr)
84.540 -+ FUNC(GLOBAL(movstr))
84.541 - GLOBAL(movstr):
84.542 - mov.l @(60,r5),r0
84.543 - mov.l r0,@(60,r4)
84.544 -@@ -775,6 +895,8 @@
84.545 - add #64,r5
84.546 - bra GLOBAL(movstr)
84.547 - add #64,r4
84.548 -+
84.549 -+ FUNC(GLOBAL(movstr))
84.550 - #endif
84.551 -
84.552 - #ifdef L_movstr_i4
84.553 -@@ -783,6 +905,10 @@
84.554 - .global GLOBAL(movstr_i4_odd)
84.555 - .global GLOBAL(movstrSI12_i4)
84.556 -
84.557 -+ FUNC(GLOBAL(movstr_i4_even))
84.558 -+ FUNC(GLOBAL(movstr_i4_odd))
84.559 -+ FUNC(GLOBAL(movstrSI12_i4))
84.560 -+
84.561 - .p2align 5
84.562 - L_movstr_2mod4_end:
84.563 - mov.l r0,@(16,r4)
84.564 -@@ -791,6 +917,11 @@
84.565 -
84.566 - .p2align 2
84.567 -
84.568 -+GLOBAL(movstr_i4_even):
84.569 -+ mov.l @r5+,r0
84.570 -+ bra L_movstr_start_even
84.571 -+ mov.l @r5+,r1
84.572 -+
84.573 - GLOBAL(movstr_i4_odd):
84.574 - mov.l @r5+,r1
84.575 - add #-4,r4
84.576 -@@ -817,10 +948,8 @@
84.577 - rts
84.578 - mov.l r3,@(12,r4)
84.579 -
84.580 --GLOBAL(movstr_i4_even):
84.581 -- mov.l @r5+,r0
84.582 -- bra L_movstr_start_even
84.583 -- mov.l @r5+,r1
84.584 -+ ENDFUNC(GLOBAL(movstr_i4_even))
84.585 -+ ENDFUNC(GLOBAL(movstr_i4_odd))
84.586 -
84.587 - .p2align 4
84.588 - GLOBAL(movstrSI12_i4):
84.589 -@@ -831,12 +960,16 @@
84.590 - mov.l r1,@(4,r4)
84.591 - rts
84.592 - mov.l r2,@(8,r4)
84.593 -+
84.594 -+ ENDFUNC(GLOBAL(movstrSI12_i4))
84.595 -+
84.596 - #endif
84.597 -
84.598 - #ifdef L_mulsi3
84.599 -
84.600 -
84.601 - .global GLOBAL(mulsi3)
84.602 -+ FUNC(GLOBAL(mulsi3))
84.603 -
84.604 - ! r4 = aabb
84.605 - ! r5 = ccdd
84.606 -@@ -869,7 +1002,7 @@
84.607 - rts
84.608 - add r2,r0
84.609 -
84.610 --
84.611 -+ FUNC(GLOBAL(mulsi3))
84.612 - #endif
84.613 - #endif /* ! __SH5__ */
84.614 - #ifdef L_sdivsi3_i4
84.615 -@@ -879,6 +1012,7 @@
84.616 - !! args in r4 and r5, result in fpul, clobber dr0, dr2
84.617 -
84.618 - .global GLOBAL(sdivsi3_i4)
84.619 -+ FUNC(GLOBAL(sdivsi3_i4))
84.620 - GLOBAL(sdivsi3_i4):
84.621 - lds r4,fpul
84.622 - float fpul,dr0
84.623 -@@ -888,6 +1022,8 @@
84.624 - rts
84.625 - ftrc dr0,fpul
84.626 -
84.627 -+ ENDFUNC(GLOBAL(sdivsi3_i4))
84.628 -+
84.629 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
84.630 - !! args in r4 and r5, result in fpul, clobber r2, dr0, dr2
84.631 -
84.632 -@@ -896,6 +1032,7 @@
84.633 - .mode SHcompact
84.634 - #endif
84.635 - .global GLOBAL(sdivsi3_i4)
84.636 -+ FUNC(GLOBAL(sdivsi3_i4))
84.637 - GLOBAL(sdivsi3_i4):
84.638 - sts.l fpscr,@-r15
84.639 - mov #8,r2
84.640 -@@ -910,6 +1047,8 @@
84.641 - rts
84.642 - lds.l @r15+,fpscr
84.643 -
84.644 -+ ENDFUNC(GLOBAL(sdivsi3_i4))
84.645 -+
84.646 - #endif /* ! __SH5__ || __SH5__ == 32 */
84.647 - #endif /* ! __SH4__ */
84.648 - #endif
84.649 -@@ -924,9 +1063,10 @@
84.650 - !!
84.651 - !!
84.652 -
84.653 --!! args in r4 and r5, result in r0 clobber r1,r2,r3
84.654 -+!! args in r4 and r5, result in r0 clobber r1, r2, r3, and t bit
84.655 -
84.656 - .global GLOBAL(sdivsi3)
84.657 -+ FUNC(GLOBAL(sdivsi3))
84.658 - #if __SHMEDIA__
84.659 - #if __SH5__ == 32
84.660 - .section .text..SHmedia32,"ax"
84.661 -@@ -1076,6 +1216,7 @@
84.662 - div0: rts
84.663 - mov #0,r0
84.664 -
84.665 -+ ENDFUNC(GLOBAL(sdivsi3))
84.666 - #endif /* ! __SHMEDIA__ */
84.667 - #endif /* ! __SH4__ */
84.668 - #endif
84.669 -@@ -1084,9 +1225,11 @@
84.670 - .title "SH DIVIDE"
84.671 - !! 4 byte integer Divide code for the Hitachi SH
84.672 - #ifdef __SH4__
84.673 --!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
84.674 -+!! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4,
84.675 -+!! and t bit
84.676 -
84.677 - .global GLOBAL(udivsi3_i4)
84.678 -+ FUNC(GLOBAL(udivsi3_i4))
84.679 - GLOBAL(udivsi3_i4):
84.680 - mov #1,r1
84.681 - cmp/hi r1,r5
84.682 -@@ -1127,6 +1270,8 @@
84.683 - L1:
84.684 - .double 2147483648
84.685 -
84.686 -+ ENDFUNC(GLOBAL(udivsi3_i4))
84.687 -+
84.688 - #elif defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) || (defined (__SH5__) && ! defined __SH4_NOFPU__)
84.689 - !! args in r4 and r5, result in fpul, clobber r0, r1, r4, r5, dr0, dr2, dr4
84.690 -
84.691 -@@ -1135,6 +1280,7 @@
84.692 - .mode SHcompact
84.693 - #endif
84.694 - .global GLOBAL(udivsi3_i4)
84.695 -+ FUNC(GLOBAL(udivsi3_i4))
84.696 - GLOBAL(udivsi3_i4):
84.697 - mov #1,r1
84.698 - cmp/hi r1,r5
84.699 -@@ -1183,6 +1329,8 @@
84.700 - #endif
84.701 - .double 2147483648
84.702 -
84.703 -+ ENDFUNC(GLOBAL(udivsi3_i4))
84.704 -+
84.705 - #endif /* ! __SH5__ || __SH5__ == 32 */
84.706 - #endif /* ! __SH4__ */
84.707 - #endif
84.708 -@@ -1199,6 +1347,7 @@
84.709 -
84.710 - !! args in r4 and r5, result in r0, clobbers r4, pr, and t bit
84.711 - .global GLOBAL(udivsi3)
84.712 -+ FUNC(GLOBAL(udivsi3))
84.713 -
84.714 - #if __SHMEDIA__
84.715 - #if __SH5__ == 32
84.716 -@@ -1299,6 +1448,8 @@
84.717 - ret: rts
84.718 - mov r4,r0
84.719 -
84.720 -+ ENDFUNC(GLOBAL(udivsi3))
84.721 -+
84.722 - #endif /* ! __SHMEDIA__ */
84.723 - #endif /* __SH4__ */
84.724 - #endif
84.725 -@@ -1308,6 +1459,7 @@
84.726 - .mode SHcompact
84.727 - #endif
84.728 - .global GLOBAL(set_fpscr)
84.729 -+ FUNC(GLOBAL(set_fpscr))
84.730 - GLOBAL(set_fpscr):
84.731 - lds r4,fpscr
84.732 - mov.l LOCAL(set_fpscr_L1),r1
84.733 -@@ -1340,11 +1492,16 @@
84.734 - .align 2
84.735 - LOCAL(set_fpscr_L1):
84.736 - .long GLOBAL(fpscr_values)
84.737 -+
84.738 -+ ENDFUNC(GLOBAL(set_fpscr))
84.739 -+
84.740 -+#ifndef NO_FPSCR_VALUES
84.741 - #ifdef __ELF__
84.742 - .comm GLOBAL(fpscr_values),8,4
84.743 - #else
84.744 - .comm GLOBAL(fpscr_values),8
84.745 - #endif /* ELF */
84.746 -+#endif /* NO_FPSCR_VALUES */
84.747 - #endif /* SH3E / SH4 */
84.748 - #endif /* L_set_fpscr */
84.749 - #ifdef L_ic_invalidate
84.750 -@@ -1360,6 +1517,7 @@
84.751 - blink tr0, r63
84.752 - #elif defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__)
84.753 - .global GLOBAL(ic_invalidate)
84.754 -+ FUNC(GLOBAL(ic_invalidate))
84.755 - GLOBAL(ic_invalidate):
84.756 - ocbwb @r4
84.757 - mova 0f,r0
84.758 -@@ -1382,6 +1540,9 @@
84.759 - nop
84.760 - .endr
84.761 - .endr
84.762 -+
84.763 -+ ENDFUNC(GLOBAL(ic_invalidate))
84.764 -+
84.765 - #endif /* SH4 */
84.766 - #endif /* L_ic_invalidate */
84.767 -
84.768 -diff -ruN gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver gcc-20030210/gcc/config/sh/libgcc-glibc.ver
84.769 ---- gcc-20030210.orig/gcc/config/sh/libgcc-glibc.ver Thu Jan 1 09:00:00 1970
84.770 -+++ gcc-20030210/gcc/config/sh/libgcc-glibc.ver Sat Feb 22 01:40:14 2003
84.771 -@@ -0,0 +1,21 @@
84.772 -+# In order to work around the very problems that force us to now generally
84.773 -+# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
84.774 -+# By now choosing the same version tags for these specific routines, we
84.775 -+# maintain enough binary compatibility to allow future versions of glibc
84.776 -+# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
84.777 -+
84.778 -+# Note that we cannot use the default libgcc-glibc.ver file on sh,
84.779 -+# because GLIBC_2.0 does not exist on this architecture, as the first
84.780 -+# ever glibc release on the platform was GLIBC_2.2.
84.781 -+
84.782 -+%inherit GCC_3.0 GLIBC_2.2
84.783 -+GLIBC_2.2 {
84.784 -+ __register_frame
84.785 -+ __register_frame_table
84.786 -+ __deregister_frame
84.787 -+ __register_frame_info
84.788 -+ __deregister_frame_info
84.789 -+ __frame_state_for
84.790 -+ __register_frame_info_table
84.791 -+}
84.792 -+
84.793 -diff -ruN gcc-20030210.orig/gcc/config/sh/linux.h gcc-20030210/gcc/config/sh/linux.h
84.794 ---- gcc-20030210.orig/gcc/config/sh/linux.h Tue Apr 16 05:27:42 2002
84.795 -+++ gcc-20030210/gcc/config/sh/linux.h Sat Feb 22 01:40:14 2003
84.796 -@@ -19,6 +19,10 @@
84.797 - the Free Software Foundation, 59 Temple Place - Suite 330,
84.798 - Boston, MA 02111-1307, USA. */
84.799 -
84.800 -+/* We're not SYSVR4, not having /usr/ccs */
84.801 -+#undef MD_EXEC_PREFIX
84.802 -+#undef MD_STARTFILE_PREFIX
84.803 -+
84.804 - /* Run-time Target Specification. */
84.805 - #undef TARGET_VERSION
84.806 - #define TARGET_VERSION fputs (" (SH GNU/Linux with ELF)", stderr);
84.807 -@@ -39,6 +43,28 @@
84.808 - #undef WCHAR_TYPE_SIZE
84.809 - #define WCHAR_TYPE_SIZE BITS_PER_WORD
84.810 -
84.811 -+/* This was defined in linux.h. Define it here also. */
84.812 -+#undef DEFAULT_VTABLE_THUNKS
84.813 -+#define DEFAULT_VTABLE_THUNKS 1
84.814 -+
84.815 -+/* Likewise. */
84.816 -+#define HANDLE_PRAGMA_PACK_PUSH_POP
84.817 -+
84.818 -+/* Pick up the return address upon entry to a procedure. Used for
84.819 -+ dwarf2 unwind information. This also enables the table driven
84.820 -+ mechanism. */
84.821 -+
84.822 -+#define INCOMING_RETURN_ADDR_RTX gen_rtx_REG (Pmode, PR_REG)
84.823 -+#define DWARF_FRAME_RETURN_COLUMN DWARF_FRAME_REGNUM (PR_REG)
84.824 -+
84.825 -+#undef CPP_SPEC
84.826 -+#define CPP_SPEC "\
84.827 -+ %{m4:-D__SH4__} \
84.828 -+ %{!m4:%(cpp_default_cpu_spec)} \
84.829 -+ %(subtarget_cpp_spec) \
84.830 -+ %(subtarget_cpp_ptr_spec) \
84.831 -+ %(subtarget_cpp_endian_spec) "
84.832 -+
84.833 - #undef SUBTARGET_CPP_SPEC
84.834 - #define SUBTARGET_CPP_SPEC "\
84.835 - %{fPIC:-D__PIC__ -D__pic__} \
84.836 -@@ -55,36 +81,45 @@
84.837 - #undef CPP_DEFAULT_CPU_SPEC
84.838 - #define CPP_DEFAULT_CPU_SPEC "-D__SH3__ -D__sh3__"
84.839 -
84.840 --
84.841 - #undef CPP_PREDEFINES
84.842 - #define CPP_PREDEFINES "-D__ELF__ -Dunix -D__sh__ -D__gnu_linux__ -Dlinux -Asystem=posix"
84.843 -
84.844 -+/* The GNU C++ standard library requires that these macros be defined. */
84.845 -+#undef CPLUSPLUS_CPP_SPEC
84.846 -+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
84.847 -+
84.848 - #undef ASM_SPEC
84.849 --#define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}"
84.850 -+#define ASM_SPEC "%{mb:-big} %{!mb:-little} %{mrelax:-relax}"
84.851 -
84.852 - #undef CC1_SPEC
84.853 - #define CC1_SPEC \
84.854 -- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
84.855 --
84.856 --#undef CC1PLUS_SPEC
84.857 --#define CC1PLUS_SPEC \
84.858 -- "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}"
84.859 -+ "-musermode %{!mb:-ml} %{!m4:-m3} %{profile:-p}"
84.860 -
84.861 -+/* XXX: It's wrong if prefix != /usr */
84.862 - #undef LINK_SPEC
84.863 - #define LINK_SPEC \
84.864 -- "%{!mb:-m shlelf_linux} %{mrelax:-relax} \
84.865 -+ "%{!mb:-m shlelf_linux -EL} %{mb:-m shelf_linux -EB} %{mrelax:-relax} \
84.866 - %{shared:-shared} \
84.867 - %{!static: \
84.868 - %{rdynamic:-export-dynamic} \
84.869 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
84.870 -- %{!rpath:-rpath /lib}} \
84.871 -+ %{!mb:%{!m4:-rpath-link /usr/sh-linux/lib }} \
84.872 -+ %{!mb:%{m4:-rpath-link /usr/sh-linux/lib/m4 }} \
84.873 -+ %{mb:%{!m4:-rpath-link /usr/sh-linux/lib/mb }} \
84.874 -+ %{mb:%{m4:-rpath-link /usr/sh-linux/lib/mb/m4 }}} \
84.875 - %{static:-static}"
84.876 -
84.877 - #undef LIB_SPEC
84.878 -+#undef LIB_SPEC
84.879 - #define LIB_SPEC \
84.880 - "%{shared: -lc} \
84.881 -- %{!shared: %{pthread:-lthread} \
84.882 -- %{profile:-lc_p} %{!profile: -lc}}"
84.883 -+ %{!shared: %{mieee:-lieee} %{pthread:-lpthread} \
84.884 -+ %{profile:-lc_p} %{!profile: -lc}}"
84.885 -+
84.886 -+#if defined(HAVE_LD_EH_FRAME_HDR)
84.887 -+#undef LINK_EH_SPEC
84.888 -+#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
84.889 -+#endif
84.890 -
84.891 - #undef STARTFILE_SPEC
84.892 - #define STARTFILE_SPEC \
84.893 -@@ -92,4 +127,40 @@
84.894 - %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \
84.895 - %{!p:%{profile:gcrt1.o%s} \
84.896 - %{!profile:crt1.o%s}}}} \
84.897 -- crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
84.898 -+ crti.o%s %{static:crtbeginT.o%s}\
84.899 -+ %{!static:%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
84.900 -+
84.901 -+#undef FUNCTION_PROFILER
84.902 -+#define FUNCTION_PROFILER(STREAM,LABELNO) \
84.903 -+do \
84.904 -+{ \
84.905 -+ if (flag_pic) \
84.906 -+ { \
84.907 -+ fprintf (STREAM, " mov.l 3f,r1\n"); \
84.908 -+ fprintf (STREAM, " mova 3f,r0\n"); \
84.909 -+ fprintf (STREAM, " add r1,r0\n"); \
84.910 -+ fprintf (STREAM, " mov.l 1f,r1\n"); \
84.911 -+ fprintf (STREAM, " mov.l @(r0,r1),r1\n"); \
84.912 -+ } \
84.913 -+ else \
84.914 -+ { \
84.915 -+ fprintf (STREAM, " mov.l 1f,r1\n"); \
84.916 -+ } \
84.917 -+ fprintf (STREAM, " sts.l pr,@-r15\n"); \
84.918 -+ fprintf (STREAM, " mova 2f,r0\n"); \
84.919 -+ fprintf (STREAM, " jmp @r1\n"); \
84.920 -+ fprintf (STREAM, " lds r0,pr\n"); \
84.921 -+ fprintf (STREAM, " .align 2\n"); \
84.922 -+ if (flag_pic) \
84.923 -+ { \
84.924 -+ fprintf (STREAM, "1: .long mcount@GOT\n"); \
84.925 -+ fprintf (STREAM, "3: .long _GLOBAL_OFFSET_TABLE_\n"); \
84.926 -+ } \
84.927 -+ else \
84.928 -+ { \
84.929 -+ fprintf (STREAM, "1: .long mcount\n"); \
84.930 -+ } \
84.931 -+ fprintf (STREAM, "2: lds.l @r15+,pr\n"); \
84.932 -+} while (0)
84.933 -+
84.934 -+#define NO_SHARED_LIBGCC_MULTILIB
84.935 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh-protos.h gcc-20030210/gcc/config/sh/sh-protos.h
84.936 ---- gcc-20030210.orig/gcc/config/sh/sh-protos.h Fri Feb 22 01:42:28 2002
84.937 -+++ gcc-20030210/gcc/config/sh/sh-protos.h Sat Feb 22 01:40:14 2003
84.938 -@@ -74,6 +74,7 @@
84.939 - extern int shl_sext_length PARAMS ((rtx));
84.940 - extern int gen_shl_sext PARAMS ((rtx, rtx, rtx, rtx));
84.941 - extern rtx gen_datalabel_ref PARAMS ((rtx));
84.942 -+extern int shl_casesi_worker_length PARAMS ((rtx));
84.943 - extern int regs_used PARAMS ((rtx, int));
84.944 - extern void fixup_addr_diff_vecs PARAMS ((rtx));
84.945 - extern int get_dest_uid PARAMS ((rtx, int));
84.946 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.c gcc-20030210/gcc/config/sh/sh.c
84.947 ---- gcc-20030210.orig/gcc/config/sh/sh.c Fri Feb 22 01:42:28 2002
84.948 -+++ gcc-20030210/gcc/config/sh/sh.c Sat Feb 22 01:40:14 2003
84.949 -@@ -2143,6 +2143,48 @@
84.950 - return sym;
84.951 - }
84.952 -
84.953 -+
84.954 -+/* Function to be used in the length attribute of the casesi_worker
84.955 -+ instruction. Returns number of instructions, which is half of the
84.956 -+ length of bytes. */
84.957 -+
84.958 -+int
84.959 -+shl_casesi_worker_length (insn)
84.960 -+ rtx insn;
84.961 -+{
84.962 -+ rtx set_src, label;
84.963 -+ rtx diff_vec;
84.964 -+
84.965 -+ set_src = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
84.966 -+ if (!(GET_CODE (set_src) == UNSPEC
84.967 -+ && XINT (set_src, 1) == UNSPEC_CASESI))
84.968 -+ abort ();
84.969 -+
84.970 -+ label = XVECEXP (set_src, 0, 2);
84.971 -+ if (GET_CODE (label) != LABEL_REF)
84.972 -+ abort ();
84.973 -+
84.974 -+ diff_vec = PATTERN (next_real_insn (XEXP (label, 0)));
84.975 -+
84.976 -+ if (GET_CODE (diff_vec) != ADDR_DIFF_VEC)
84.977 -+ abort ();
84.978 -+
84.979 -+ switch (GET_MODE (diff_vec))
84.980 -+ {
84.981 -+ case SImode:
84.982 -+ return 2;
84.983 -+ case HImode:
84.984 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
84.985 -+ return 3;
84.986 -+ return 2;
84.987 -+ case QImode:
84.988 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
84.989 -+ return 2;
84.990 -+ return 1;
84.991 -+ default:
84.992 -+ abort ();
84.993 -+ }
84.994 -+}
84.995 -
84.996 - /* The SH cannot load a large constant into a register, constants have to
84.997 - come from a pc relative load. The reference of a pc relative load
84.998 -@@ -3190,7 +3232,7 @@
84.999 - vec_lab = XEXP (XEXP (pat, 0), 0);
84.1000 -
84.1001 - /* Search the matching casesi_jump_2. */
84.1002 -- for (prev = vec_lab; ; prev = PREV_INSN (prev))
84.1003 -+ for (prev = vec_lab; prev; prev = PREV_INSN (prev))
84.1004 - {
84.1005 - if (GET_CODE (prev) != JUMP_INSN)
84.1006 - continue;
84.1007 -@@ -3205,6 +3247,13 @@
84.1008 - break;
84.1009 - }
84.1010 -
84.1011 -+ if (prev == NULL)
84.1012 -+ { /* Switch statement has been optimized out. */
84.1013 -+ delete_insn (PREV_INSN (insn));
84.1014 -+ delete_insn (insn);
84.1015 -+ continue;
84.1016 -+ }
84.1017 -+
84.1018 - /* Emit the reference label of the braf where it belongs, right after
84.1019 - the casesi_jump_2 (i.e. braf). */
84.1020 - braf_label = XEXP (XEXP (SET_SRC (XVECEXP (prevpat, 0, 0)), 1), 0);
84.1021 -@@ -3223,7 +3272,7 @@
84.1022 - rtx barrier_or_label;
84.1023 - {
84.1024 - rtx next = next_real_insn (barrier_or_label), pat, prev;
84.1025 -- int slot, credit, jump_to_next;
84.1026 -+ int slot, credit, jump_to_next = 0;
84.1027 -
84.1028 - if (! next)
84.1029 - return 0;
84.1030 -@@ -4507,7 +4556,8 @@
84.1031 - if (current_function_varargs || current_function_stdarg)
84.1032 - {
84.1033 - /* This is not used by the SH3E calling convention */
84.1034 -- if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI)
84.1035 -+ if (TARGET_SH1 && ! TARGET_SH3E && ! TARGET_SH5 && ! TARGET_HITACHI
84.1036 -+ || TARGET_NO_IMPLICIT_FP)
84.1037 - {
84.1038 - /* Push arg regs as if they'd been provided by caller in stack. */
84.1039 - for (i = 0; i < NPARM_REGS(SImode); i++)
84.1040 -@@ -5149,7 +5199,8 @@
84.1041 - tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
84.1042 - tree record;
84.1043 -
84.1044 -- if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
84.1045 -+ if (TARGET_SH5 || (! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI
84.1046 -+ || TARGET_NO_IMPLICIT_FP)
84.1047 - return ptr_type_node;
84.1048 -
84.1049 - record = make_node (RECORD_TYPE);
84.1050 -@@ -5211,7 +5262,8 @@
84.1051 - return;
84.1052 - }
84.1053 -
84.1054 -- if ((! TARGET_SH3E && ! TARGET_SH4) || TARGET_HITACHI)
84.1055 -+ if ((! TARGET_SH3E && ! TARGET_SH4)
84.1056 -+ || TARGET_HITACHI || TARGET_NO_IMPLICIT_FP)
84.1057 - {
84.1058 - std_expand_builtin_va_start (stdarg_p, valist, nextarg);
84.1059 - return;
84.1060 -@@ -5289,7 +5341,8 @@
84.1061 - rsize = (size + UNITS_PER_WORD - 1) & -UNITS_PER_WORD;
84.1062 - pptr_type_node = build_pointer_type (ptr_type_node);
84.1063 -
84.1064 -- if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4) && ! TARGET_HITACHI)
84.1065 -+ if (! TARGET_SH5 && (TARGET_SH3E || TARGET_SH4)
84.1066 -+ && ! TARGET_HITACHI && ! TARGET_NO_IMPLICIT_FP)
84.1067 - {
84.1068 - tree f_next_o, f_next_o_limit, f_next_fp, f_next_fp_limit, f_next_stack;
84.1069 - tree next_o, next_o_limit, next_fp, next_fp_limit, next_stack;
84.1070 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.h gcc-20030210/gcc/config/sh/sh.h
84.1071 ---- gcc-20030210.orig/gcc/config/sh/sh.h Fri Feb 22 01:42:28 2002
84.1072 -+++ gcc-20030210/gcc/config/sh/sh.h Sat Feb 22 01:40:14 2003
84.1073 -@@ -147,10 +147,10 @@
84.1074 - #define HARD_SH4_BIT (1<<5)
84.1075 - #define FPU_SINGLE_BIT (1<<7)
84.1076 - #define SH4_BIT (1<<12)
84.1077 -+#define NO_IMPLICIT_FP_BIT (1<<3)
84.1078 - #define FMOVD_BIT (1<<4)
84.1079 - #define SH5_BIT (1<<0)
84.1080 - #define SPACE_BIT (1<<13)
84.1081 --#define BIGTABLE_BIT (1<<14)
84.1082 - #define RELAX_BIT (1<<15)
84.1083 - #define USERMODE_BIT (1<<16)
84.1084 - #define HITACHI_BIT (1<<22)
84.1085 -@@ -205,6 +205,9 @@
84.1086 - /* Nonzero if we should generate code for a SH5 CPU (either ISA). */
84.1087 - #define TARGET_SH5 (target_flags & SH5_BIT)
84.1088 -
84.1089 -+/* Nonzero if we should not use FPU implicitly. */
84.1090 -+#define TARGET_NO_IMPLICIT_FP (target_flags & NO_IMPLICIT_FP_BIT)
84.1091 -+
84.1092 - /* Nonzero if we should generate code using the SHcompact instruction
84.1093 - set and 32-bit ABI. */
84.1094 - #define TARGET_SHCOMPACT (TARGET_SH5 && TARGET_SH1)
84.1095 -@@ -225,6 +228,7 @@
84.1096 -
84.1097 - /* Nonzero if we should generate code using SHmedia FPU instructions. */
84.1098 - #define TARGET_SHMEDIA_FPU (TARGET_SHMEDIA && TARGET_FPU_DOUBLE)
84.1099 -+
84.1100 - /* Nonzero if we should generate fmovd. */
84.1101 - #define TARGET_FMOVD (target_flags & FMOVD_BIT)
84.1102 -
84.1103 -@@ -234,9 +238,6 @@
84.1104 - /* Nonzero if we should generate smaller code rather than faster code. */
84.1105 - #define TARGET_SMALLCODE (target_flags & SPACE_BIT)
84.1106 -
84.1107 --/* Nonzero to use long jump tables. */
84.1108 --#define TARGET_BIGTABLE (target_flags & BIGTABLE_BIT)
84.1109 --
84.1110 - /* Nonzero to generate pseudo-ops needed by the assembler and linker
84.1111 - to do function call relaxing. */
84.1112 - #define TARGET_RELAX (target_flags & RELAX_BIT)
84.1113 -@@ -297,7 +298,6 @@
84.1114 - {"5-compact-nofpu", TARGET_NONE, "" }, \
84.1115 - {"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
84.1116 - {"b", -LITTLE_ENDIAN_BIT, "" }, \
84.1117 -- {"bigtable", BIGTABLE_BIT, "" }, \
84.1118 - {"dalign", DALIGN_BIT, "" }, \
84.1119 - {"fmovd", FMOVD_BIT, "" }, \
84.1120 - {"hitachi", HITACHI_BIT, "" }, \
84.1121 -@@ -306,6 +306,7 @@
84.1122 - {"isize", ISIZE_BIT, "" }, \
84.1123 - {"l", LITTLE_ENDIAN_BIT, "" }, \
84.1124 - {"no-ieee", -IEEE_BIT, "" }, \
84.1125 -+ {"no-implicit-fp", NO_IMPLICIT_FP_BIT, "" }, \
84.1126 - {"padstruct", PADSTRUCT_BIT, "" }, \
84.1127 - {"prefergot", PREFERGOT_BIT, "" }, \
84.1128 - {"relax", RELAX_BIT, "" }, \
84.1129 -@@ -2493,16 +2494,22 @@
84.1130 - goto LABEL; \
84.1131 - }
84.1132 -
84.1133 -+extern int optimize; /* needed for gen_casesi. */
84.1134 -+extern int optimize_size;
84.1135 -+
84.1136 - /* Specify the machine mode that this machine uses
84.1137 - for the index in the tablejump instruction. */
84.1138 --#define CASE_VECTOR_MODE (TARGET_BIGTABLE ? SImode : HImode)
84.1139 -+#define CASE_VECTOR_MODE SImode
84.1140 -
84.1141 - #define CASE_VECTOR_SHORTEN_MODE(MIN_OFFSET, MAX_OFFSET, BODY) \
84.1142 - ((MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 127 \
84.1143 - ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, QImode) \
84.1144 - : (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 255 \
84.1145 - ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, QImode) \
84.1146 -- : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 ? HImode \
84.1147 -+ : (MIN_OFFSET) >= -32768 && (MAX_OFFSET) <= 32767 \
84.1148 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 0, HImode) \
84.1149 -+ : optimize_size && (MIN_OFFSET) >= 0 && (MAX_OFFSET) <= 65535 \
84.1150 -+ ? (ADDR_DIFF_VEC_FLAGS (BODY).offset_unsigned = 1, HImode) \
84.1151 - : SImode)
84.1152 -
84.1153 - /* Define as C expression which evaluates to nonzero if the tablejump
84.1154 -@@ -3038,10 +3045,7 @@
84.1155 - /* Output an absolute table element. */
84.1156 -
84.1157 - #define ASM_OUTPUT_ADDR_VEC_ELT(STREAM,VALUE) \
84.1158 -- if (TARGET_BIGTABLE) \
84.1159 -- asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE)); \
84.1160 -- else \
84.1161 -- asm_fprintf ((STREAM), "\t.word\t%LL%d\n", (VALUE)); \
84.1162 -+ asm_fprintf ((STREAM), "\t.long\t%LL%d\n", (VALUE))
84.1163 -
84.1164 - /* Output various types of constants. */
84.1165 -
84.1166 -@@ -3167,8 +3171,6 @@
84.1167 - #define sh_cpu_attr ((enum attr_cpu)sh_cpu)
84.1168 - extern enum processor_type sh_cpu;
84.1169 -
84.1170 --extern int optimize; /* needed for gen_casesi. */
84.1171 --
84.1172 - enum mdep_reorg_phase_e
84.1173 - {
84.1174 - SH_BEFORE_MDEP_REORG,
84.1175 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh.md gcc-20030210/gcc/config/sh/sh.md
84.1176 ---- gcc-20030210.orig/gcc/config/sh/sh.md Sat Nov 23 04:58:06 2002
84.1177 -+++ gcc-20030210/gcc/config/sh/sh.md Sat Feb 22 01:40:14 2003
84.1178 -@@ -1242,7 +1242,7 @@
84.1179 - (clobber (reg:SI PR_REG))
84.1180 - (clobber (reg:SI R4_REG))
84.1181 - (use (match_operand:SI 1 "arith_reg_operand" "r"))]
84.1182 -- "TARGET_SH1 && ! TARGET_SH4"
84.1183 -+ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
84.1184 - "jsr @%1%#"
84.1185 - [(set_attr "type" "sfunc")
84.1186 - (set_attr "needs_delay_slot" "yes")])
84.1187 -@@ -1336,7 +1336,7 @@
84.1188 -
84.1189 - operands[3] = gen_reg_rtx (Pmode);
84.1190 - /* Emit the move of the address to a pseudo outside of the libcall. */
84.1191 -- if (TARGET_HARD_SH4 && TARGET_SH3E)
84.1192 -+ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
84.1193 - {
84.1194 - emit_move_insn (operands[3],
84.1195 - gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"));
84.1196 -@@ -1391,7 +1391,7 @@
84.1197 - (clobber (reg:SI R2_REG))
84.1198 - (clobber (reg:SI R3_REG))
84.1199 - (use (match_operand:SI 1 "arith_reg_operand" "r"))]
84.1200 -- "TARGET_SH1 && ! TARGET_SH4"
84.1201 -+ "TARGET_SH1 && ! TARGET_SH4 || TARGET_NO_IMPLICIT_FP"
84.1202 - "jsr @%1%#"
84.1203 - [(set_attr "type" "sfunc")
84.1204 - (set_attr "needs_delay_slot" "yes")])
84.1205 -@@ -1476,7 +1476,7 @@
84.1206 -
84.1207 - operands[3] = gen_reg_rtx (Pmode);
84.1208 - /* Emit the move of the address to a pseudo outside of the libcall. */
84.1209 -- if (TARGET_HARD_SH4 && TARGET_SH3E)
84.1210 -+ if (TARGET_HARD_SH4 && TARGET_SH3E && !TARGET_NO_IMPLICIT_FP)
84.1211 - {
84.1212 - emit_move_insn (operands[3],
84.1213 - gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"));
84.1214 -@@ -6446,6 +6446,8 @@
84.1215 - case SImode:
84.1216 - return \"shll2 %1\;mov.l @(r0,%1),%0\";
84.1217 - case HImode:
84.1218 -+ if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
84.1219 -+ return \"add %1,%1\;mov.w @(r0,%1),%0\;extu.w %0,%0\";
84.1220 - return \"add %1,%1\;mov.w @(r0,%1),%0\";
84.1221 - case QImode:
84.1222 - if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned)
84.1223 -@@ -6455,7 +6457,15 @@
84.1224 - abort ();
84.1225 - }
84.1226 - }"
84.1227 -- [(set_attr "length" "4")])
84.1228 -+ [(set (attr "length")
84.1229 -+ (cond [(eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 1))
84.1230 -+ (const_string "2")
84.1231 -+ (eq (symbol_ref "shl_casesi_worker_length (insn)") (const_int 2))
84.1232 -+ (const_string "4")
84.1233 -+ ;; Put "match_dup" here so that insn_variable_length_p return 1.
84.1234 -+ (ne (match_dup 2) (match_dup 2))
84.1235 -+ (const_string "4")]
84.1236 -+ (const_string "6")))])
84.1237 -
84.1238 - (define_insn "casesi_shift_media"
84.1239 - [(set (match_operand 0 "arith_reg_operand" "=r")
84.1240 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3-linux.h gcc-20030210/gcc/config/sh/sh3-linux.h
84.1241 ---- gcc-20030210.orig/gcc/config/sh/sh3-linux.h Thu Jan 1 09:00:00 1970
84.1242 -+++ gcc-20030210/gcc/config/sh/sh3-linux.h Sat Feb 22 01:40:14 2003
84.1243 -@@ -0,0 +1,29 @@
84.1244 -+#undef TARGET_VERSION
84.1245 -+#define TARGET_VERSION fputs (" (SH3 GNU/Linux with ELF)", stderr);
84.1246 -+
84.1247 -+#undef CPP_SPEC
84.1248 -+#define CPP_SPEC \
84.1249 -+ "-D__LITTLE_ENDIAN__ \
84.1250 -+ -D__SH3__ -D__sh3__ \
84.1251 -+ -D__SIZE_TYPE__=unsigned\\ int \
84.1252 -+ -D__PTRDIFF_TYPE__=int \
84.1253 -+ %{fPIC:-D__PIC__ -D__pic__} \
84.1254 -+ %{fpic:-D__PIC__ -D__pic__} \
84.1255 -+ %{posix:-D_POSIX_SOURCE} \
84.1256 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
84.1257 -+
84.1258 -+#undef ASM_SPEC
84.1259 -+#define ASM_SPEC "%{mrelax:-relax}"
84.1260 -+
84.1261 -+#undef CC1_SPEC
84.1262 -+#define CC1_SPEC \
84.1263 -+ "-musermode -ml -m3 %{profile:-p}"
84.1264 -+
84.1265 -+#undef LINK_SPEC
84.1266 -+#define LINK_SPEC \
84.1267 -+ "%{mrelax:-relax} \
84.1268 -+ %{shared:-shared} \
84.1269 -+ %{!static: \
84.1270 -+ %{rdynamic:-export-dynamic} \
84.1271 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
84.1272 -+ %{static:-static}"
84.1273 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h gcc-20030210/gcc/config/sh/sh3eb-linux.h
84.1274 ---- gcc-20030210.orig/gcc/config/sh/sh3eb-linux.h Thu Jan 1 09:00:00 1970
84.1275 -+++ gcc-20030210/gcc/config/sh/sh3eb-linux.h Sat Feb 22 01:40:14 2003
84.1276 -@@ -0,0 +1,29 @@
84.1277 -+#undef TARGET_VERSION
84.1278 -+#define TARGET_VERSION fputs (" (SH3EB GNU/Linux with ELF)", stderr);
84.1279 -+
84.1280 -+#undef CPP_SPEC
84.1281 -+#define CPP_SPEC \
84.1282 -+ "-D__BIG_ENDIAN__ \
84.1283 -+ -D__SH3__ -D__sh3__ \
84.1284 -+ -D__SIZE_TYPE__=unsigned\\ int \
84.1285 -+ -D__PTRDIFF_TYPE__=int \
84.1286 -+ %{fPIC:-D__PIC__ -D__pic__} \
84.1287 -+ %{fpic:-D__PIC__ -D__pic__} \
84.1288 -+ %{posix:-D_POSIX_SOURCE} \
84.1289 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
84.1290 -+
84.1291 -+#undef ASM_SPEC
84.1292 -+#define ASM_SPEC "%{mrelax:-relax}"
84.1293 -+
84.1294 -+#undef CC1_SPEC
84.1295 -+#define CC1_SPEC \
84.1296 -+ "-musermode -mb -m3 %{profile:-p}"
84.1297 -+
84.1298 -+#undef LINK_SPEC
84.1299 -+#define LINK_SPEC \
84.1300 -+ "%{mrelax:-relax} \
84.1301 -+ %{shared:-shared} \
84.1302 -+ %{!static: \
84.1303 -+ %{rdynamic:-export-dynamic} \
84.1304 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
84.1305 -+ %{static:-static}"
84.1306 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4-linux.h gcc-20030210/gcc/config/sh/sh4-linux.h
84.1307 ---- gcc-20030210.orig/gcc/config/sh/sh4-linux.h Thu Jan 1 09:00:00 1970
84.1308 -+++ gcc-20030210/gcc/config/sh/sh4-linux.h Sat Feb 22 01:40:14 2003
84.1309 -@@ -0,0 +1,29 @@
84.1310 -+#undef TARGET_VERSION
84.1311 -+#define TARGET_VERSION fputs (" (SH4 GNU/Linux with ELF)", stderr);
84.1312 -+
84.1313 -+#undef CPP_SPEC
84.1314 -+#define CPP_SPEC \
84.1315 -+ "-D__LITTLE_ENDIAN__ \
84.1316 -+ -D__SH4__ \
84.1317 -+ -D__SIZE_TYPE__=unsigned\\ int \
84.1318 -+ -D__PTRDIFF_TYPE__=int \
84.1319 -+ %{fPIC:-D__PIC__ -D__pic__} \
84.1320 -+ %{fpic:-D__PIC__ -D__pic__} \
84.1321 -+ %{posix:-D_POSIX_SOURCE} \
84.1322 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
84.1323 -+
84.1324 -+#undef ASM_SPEC
84.1325 -+#define ASM_SPEC "%{mrelax:-relax}"
84.1326 -+
84.1327 -+#undef CC1_SPEC
84.1328 -+#define CC1_SPEC \
84.1329 -+ "-musermode -ml -m4 %{profile:-p}"
84.1330 -+
84.1331 -+#undef LINK_SPEC
84.1332 -+#define LINK_SPEC \
84.1333 -+ "%{mrelax:-relax} \
84.1334 -+ %{shared:-shared} \
84.1335 -+ %{!static: \
84.1336 -+ %{rdynamic:-export-dynamic} \
84.1337 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
84.1338 -+ %{static:-static}"
84.1339 -diff -ruN gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h gcc-20030210/gcc/config/sh/sh4eb-linux.h
84.1340 ---- gcc-20030210.orig/gcc/config/sh/sh4eb-linux.h Thu Jan 1 09:00:00 1970
84.1341 -+++ gcc-20030210/gcc/config/sh/sh4eb-linux.h Sat Feb 22 01:40:14 2003
84.1342 -@@ -0,0 +1,29 @@
84.1343 -+#undef TARGET_VERSION
84.1344 -+#define TARGET_VERSION fputs (" (SH4EB GNU/Linux with ELF)", stderr);
84.1345 -+
84.1346 -+#undef CPP_SPEC
84.1347 -+#define CPP_SPEC \
84.1348 -+ "-D__BIG_ENDIAN__ \
84.1349 -+ -D__SH4__ \
84.1350 -+ -D__SIZE_TYPE__=unsigned\\ int \
84.1351 -+ -D__PTRDIFF_TYPE__=int \
84.1352 -+ %{fPIC:-D__PIC__ -D__pic__} \
84.1353 -+ %{fpic:-D__PIC__ -D__pic__} \
84.1354 -+ %{posix:-D_POSIX_SOURCE} \
84.1355 -+ %{pthread:-D_REENTRANT -D_PTHREADS}"
84.1356 -+
84.1357 -+#undef ASM_SPEC
84.1358 -+#define ASM_SPEC "%{mrelax:-relax}"
84.1359 -+
84.1360 -+#undef CC1_SPEC
84.1361 -+#define CC1_SPEC \
84.1362 -+ "-musermode -mb -m4 %{profile:-p}"
84.1363 -+
84.1364 -+#undef LINK_SPEC
84.1365 -+#define LINK_SPEC \
84.1366 -+ "%{mrelax:-relax} \
84.1367 -+ %{shared:-shared} \
84.1368 -+ %{!static: \
84.1369 -+ %{rdynamic:-export-dynamic} \
84.1370 -+ %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
84.1371 -+ %{static:-static}"
84.1372 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux gcc-20030210/gcc/config/sh/t-linux
84.1373 ---- gcc-20030210.orig/gcc/config/sh/t-linux Thu May 17 12:16:12 2001
84.1374 -+++ gcc-20030210/gcc/config/sh/t-linux Sat Feb 22 01:40:14 2003
84.1375 -@@ -1,10 +1,20 @@
84.1376 --TARGET_LIBGCC2_CFLAGS = -fpic
84.1377 -+TARGET_LIBGCC2_CFLAGS = -fpic -DNO_FPSCR_VALUES
84.1378 -+LIBGCC1 = libgcc1-asm.a
84.1379 -+CROSS_LIBGCC1 = libgcc1-asm.a
84.1380 -+LIBGCC1_TEST = libgcc1-test
84.1381 - LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \
84.1382 - _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \
84.1383 - _ic_invalidate
84.1384 -+LIB2ADDEH = $(srcdir)/unwind-sjlj.c
84.1385 -+LIB2ADDEHDEP = unwind.inc unwind-sjlj.c
84.1386 -
84.1387 --MULTILIB_OPTIONS= mb m3e/m4
84.1388 -+MULTILIB_OPTIONS= mb m4
84.1389 - MULTILIB_DIRNAMES=
84.1390 - MULTILIB_MATCHES =
84.1391 -
84.1392 --EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o
84.1393 -+EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
84.1394 -+
84.1395 -+# Override t-slibgcc-elf-ver to export some libgcc symbols with
84.1396 -+# the symbol versions that glibc used and SH specific.
84.1397 -+SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
84.1398 -+ $(srcdir)/config/sh/libgcc-glibc.ver
84.1399 -diff -ruN gcc-20030210.orig/gcc/config/sh/t-linux-nomulti gcc-20030210/gcc/config/sh/t-linux-nomulti
84.1400 ---- gcc-20030210.orig/gcc/config/sh/t-linux-nomulti Thu Jan 1 09:00:00 1970
84.1401 -+++ gcc-20030210/gcc/config/sh/t-linux-nomulti Sat Feb 22 01:40:14 2003
84.1402 -@@ -0,0 +1,9 @@
84.1403 -+LIBGCC = libgcc.a
84.1404 -+EXTRA_PARTS = crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o
84.1405 -+
84.1406 -+INSTALL_LIBGCC = install-libgcc
84.1407 -+
84.1408 -+MULTILIB_OPTIONS=
84.1409 -+MULTILIB_DIRNAMES=
84.1410 -+MULTILIB_MATCHES =
84.1411 -+EXTRA_MULTILIB_PARTS=
84.1412 -diff -ruN gcc-20030210.orig/gcc/config.gcc gcc-20030210/gcc/config.gcc
84.1413 ---- gcc-20030210.orig/gcc/config.gcc Fri Jan 31 19:17:13 2003
84.1414 -+++ gcc-20030210/gcc/config.gcc Sat Feb 22 01:40:14 2003
84.1415 -@@ -337,9 +337,9 @@
84.1416 - sparc*-*-*)
84.1417 - cpu_type=sparc
84.1418 - ;;
84.1419 --sh64-*-*)
84.1420 -- cpu_type=sh
84.1421 -- ;;
84.1422 -+sh*-*-*)
84.1423 -+ cpu_type=sh
84.1424 -+ ;;
84.1425 - esac
84.1426 -
84.1427 - tm_file=${cpu_type}/${cpu_type}.h
84.1428 -@@ -3018,9 +3018,31 @@
84.1429 - thread_file='rtems'
84.1430 - fi
84.1431 - ;;
84.1432 --sh-*-linux*)
84.1433 -+sh*-*-linux*)
84.1434 - tm_file="${tm_file} sh/elf.h sh/linux.h"
84.1435 -- tmake_file="sh/t-sh sh/t-elf sh/t-linux"
84.1436 -+ tmake_file="sh/t-sh sh/t-elf t-slibgcc-elf-ver t-linux sh/t-linux"
84.1437 -+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o"
84.1438 -+ case $machine in
84.1439 -+ sh3eb-*)
84.1440 -+ tm_file="${tm_file} sh/sh3eb-linux.h"
84.1441 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
84.1442 -+ ;;
84.1443 -+ sh4eb-*)
84.1444 -+ tm_file="${tm_file} sh/sh4eb-linux.h"
84.1445 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
84.1446 -+ ;;
84.1447 -+ sh3-*)
84.1448 -+ tm_file="${tm_file} sh/sh3-linux.h"
84.1449 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
84.1450 -+ ;;
84.1451 -+ sh4-*)
84.1452 -+ tm_file="${tm_file} sh/sh4-linux.h"
84.1453 -+ tmake_file="${tmake_file} sh/t-linux-nomulti"
84.1454 -+ ;;
84.1455 -+ *)
84.1456 -+ ;;
84.1457 -+ esac
84.1458 -+ xmake_file=x-linux
84.1459 - gas=yes gnu_ld=yes
84.1460 - float_format=sh
84.1461 - ;;
84.1462 -diff -ruN gcc-20030210.orig/gcc/dwarf2out.c gcc-20030210/gcc/dwarf2out.c
84.1463 ---- gcc-20030210.orig/gcc/dwarf2out.c Mon Feb 10 19:36:25 2003
84.1464 -+++ gcc-20030210/gcc/dwarf2out.c Sat Feb 22 01:40:14 2003
84.1465 -@@ -10224,7 +10224,9 @@
84.1466 - /* We can have a normal definition following an inline one in the
84.1467 - case of redefinition of GNU C extern inlines.
84.1468 - It seems reasonable to use AT_specification in this case. */
84.1469 -- && !get_AT_unsigned (old_die, DW_AT_inline))
84.1470 -+ && !get_AT_unsigned (old_die, DW_AT_inline)
84.1471 -+ /* Skip the nested function. */
84.1472 -+ && !decl_function_context (decl))
84.1473 - {
84.1474 - /* ??? This can happen if there is a bug in the program, for
84.1475 - instance, if it has duplicate function definitions. Ideally,
84.1476 -diff -ruN gcc-20030210.orig/gcc/final.c gcc-20030210/gcc/final.c
84.1477 ---- gcc-20030210.orig/gcc/final.c Fri Jan 31 19:17:20 2003
84.1478 -+++ gcc-20030210/gcc/final.c Sat Feb 22 01:40:14 2003
84.1479 -@@ -1128,7 +1128,7 @@
84.1480 - }
84.1481 - }
84.1482 -
84.1483 -- INSN_ADDRESSES (uid) = insn_current_address;
84.1484 -+ INSN_ADDRESSES (uid) = insn_current_address + insn_lengths[uid];
84.1485 -
84.1486 - if (GET_CODE (insn) == NOTE || GET_CODE (insn) == BARRIER
84.1487 - || GET_CODE (insn) == CODE_LABEL)
84.1488 -diff -ruN gcc-20030210.orig/gcc/mkmap-symver.awk gcc-20030210/gcc/mkmap-symver.awk
84.1489 ---- gcc-20030210.orig/gcc/mkmap-symver.awk Fri Jan 31 19:17:26 2003
84.1490 -+++ gcc-20030210/gcc/mkmap-symver.awk Sat Feb 22 01:40:14 2003
84.1491 -@@ -89,7 +89,11 @@
84.1492 - output(inherit[lib]);
84.1493 -
84.1494 - printf("%s {\n", lib);
84.1495 -- printf(" global:\n");
84.1496 -+ for (sym in ver)
84.1497 -+ if ((ver[sym] == lib) && (sym in def))
84.1498 -+ count++;
84.1499 -+ if (count > 0)
84.1500 -+ printf(" global:\n");
84.1501 - for (sym in ver)
84.1502 - if ((ver[sym] == lib) && (sym in def))
84.1503 - {
84.1504 -diff -ruN gcc-20030210.orig/gcc/reload1.c gcc-20030210/gcc/reload1.c
84.1505 ---- gcc-20030210.orig/gcc/reload1.c Fri Jan 31 19:17:29 2003
84.1506 -+++ gcc-20030210/gcc/reload1.c Sat Feb 22 01:40:14 2003
84.1507 -@@ -6103,6 +6103,7 @@
84.1508 - for (j = 0; j < n_reloads; j++)
84.1509 - if (rld[j].in != 0
84.1510 - && rld[j].when_needed != RELOAD_OTHER
84.1511 -+ && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS
84.1512 - && reg_overlap_mentioned_for_reload_p (rld[j].in,
84.1513 - rld[i].in))
84.1514 - rld[j].when_needed
84.1515 -diff -ruN gcc-20030210.orig/gcc/reorg.c gcc-20030210/gcc/reorg.c
84.1516 ---- gcc-20030210.orig/gcc/reorg.c Fri Jan 31 19:17:30 2003
84.1517 -+++ gcc-20030210/gcc/reorg.c Sat Feb 22 01:40:14 2003
84.1518 -@@ -3265,6 +3265,14 @@
84.1519 - || condjump_in_parallel_p (XVECEXP (PATTERN (insn), 0, 0))))
84.1520 - continue;
84.1521 -
84.1522 -+#ifdef MD_CAN_REDIRECT_BRANCH
84.1523 -+ /* On some targets, branches with delay slots can have a limited
84.1524 -+ displacement. Give the back end a chance to tell us we can't do
84.1525 -+ this. */
84.1526 -+ if (! MD_CAN_REDIRECT_BRANCH (insn, delay_insn))
84.1527 -+ continue;
84.1528 -+#endif
84.1529 -+
84.1530 - target_label = JUMP_LABEL (delay_insn);
84.1531 -
84.1532 - if (target_label)
84.1533 -diff -ruN gcc-20030210.orig/gcc/tree-inline.c gcc-20030210/gcc/tree-inline.c
84.1534 ---- gcc-20030210.orig/gcc/tree-inline.c Fri Jan 31 19:17:33 2003
84.1535 -+++ gcc-20030210/gcc/tree-inline.c Sat Feb 22 01:40:14 2003
84.1536 -@@ -836,11 +836,17 @@
84.1537 -
84.1538 - /* Don't try to inline functions that are not well-suited to
84.1539 - inlining. */
84.1540 -- if (!inlinable_function_p (fn, id))
84.1541 -- return NULL_TREE;
84.1542 -+ if (! inlinable_function_p (fn, id)
84.1543 -+ || ! (*lang_hooks.tree_inlining.start_inlining) (fn))
84.1544 -+ {
84.1545 -+ if (DECL_INLINE (fn) && warn_inline && ! flag_really_no_inline)
84.1546 -+ {
84.1547 -+ warning_with_decl (fn, "inlining failed in call to `%s'");
84.1548 -+ warning ("called from here");
84.1549 -+ }
84.1550 -
84.1551 -- if (! (*lang_hooks.tree_inlining.start_inlining) (fn))
84.1552 -- return NULL_TREE;
84.1553 -+ return NULL_TREE;
84.1554 -+ }
84.1555 -
84.1556 - /* Set the current filename and line number to the function we are
84.1557 - inlining so that when we create new _STMT nodes here they get
84.1558 -diff -ruN gcc-20030210.orig/libjava/Makefile.in gcc-20030210/libjava/Makefile.in
84.1559 ---- gcc-20030210.orig/libjava/Makefile.in Tue Jan 28 10:44:37 2003
84.1560 -+++ gcc-20030210/libjava/Makefile.in Sat Feb 22 01:40:14 2003
84.1561 -@@ -1637,6 +1637,7 @@
84.1562 - "AS=$(AS)" \
84.1563 - "CC=$(CC)" \
84.1564 - "CXX=$(CXX)" \
84.1565 -+ "GCJ=$(GCJ)" \
84.1566 - "LD=$(LD)" \
84.1567 - "LIBCFLAGS=$(LIBCFLAGS)" \
84.1568 - "NM=$(NM)" \
84.1569 -diff -ruN gcc-20030210.orig/libjava/configure gcc-20030210/libjava/configure
84.1570 ---- gcc-20030210.orig/libjava/configure Tue Jan 28 10:44:37 2003
84.1571 -+++ gcc-20030210/libjava/configure Sat Feb 22 01:42:11 2003
84.1572 -@@ -2031,7 +2031,7 @@
84.1573 - # This must be Linux ELF.
84.1574 - linux-gnu*)
84.1575 - case $host_cpu in
84.1576 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
84.1577 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
84.1578 - lt_cv_deplibs_check_method=pass_all ;;
84.1579 - *)
84.1580 - # glibc up to 2.1.1 does not perform some relocations on ARM
84.1581 -diff -ruN gcc-20030210.orig/libjava/java/net/natInetAddress.cc gcc-20030210/libjava/java/net/natInetAddress.cc
84.1582 ---- gcc-20030210.orig/libjava/java/net/natInetAddress.cc Tue Mar 5 05:02:19 2002
84.1583 -+++ gcc-20030210/libjava/java/net/natInetAddress.cc Sat Feb 22 01:40:14 2003
84.1584 -@@ -56,7 +56,7 @@
84.1585 - #endif
84.1586 -
84.1587 - #ifndef HAVE_GETHOSTNAME_DECL
84.1588 --extern "C" int gethostname (char *name, int namelen);
84.1589 -+extern "C" int gethostname (char *name, unsigned int namelen);
84.1590 - #endif
84.1591 -
84.1592 - #ifdef DISABLE_JAVA_NET
84.1593 -diff -ruN gcc-20030210.orig/libjava/libltdl/aclocal.m4 gcc-20030210/libjava/libltdl/aclocal.m4
84.1594 ---- gcc-20030210.orig/libjava/libltdl/aclocal.m4 Sun Sep 10 17:04:40 2000
84.1595 -+++ gcc-20030210/libjava/libltdl/aclocal.m4 Sat Feb 22 01:40:14 2003
84.1596 -@@ -573,7 +573,7 @@
84.1597 - # This must be Linux ELF.
84.1598 - linux-gnu*)
84.1599 - case "$host_cpu" in
84.1600 -- alpha* | i*86 | powerpc* | sparc* | ia64* )
84.1601 -+ alpha* | i*86 | powerpc* | sparc* | ia64* | sh*)
84.1602 - lt_cv_deplibs_check_method=pass_all ;;
84.1603 - *)
84.1604 - # glibc up to 2.1.1 does not perform some relocations on ARM
84.1605 -diff -ruN gcc-20030210.orig/libjava/sysdep/sh/locks.h gcc-20030210/libjava/sysdep/sh/locks.h
84.1606 ---- gcc-20030210.orig/libjava/sysdep/sh/locks.h Thu Jan 1 09:00:00 1970
84.1607 -+++ gcc-20030210/libjava/sysdep/sh/locks.h Sat Feb 22 01:40:14 2003
84.1608 -@@ -0,0 +1,72 @@
84.1609 -+// locks.h - Thread synchronization primitives. SuperH implementation.
84.1610 -+
84.1611 -+/* Copyright (C) 2002 Free Software Foundation
84.1612 -+
84.1613 -+ This file is part of libgcj.
84.1614 -+
84.1615 -+This software is copyrighted work licensed under the terms of the
84.1616 -+Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
84.1617 -+details. */
84.1618 -+
84.1619 -+#ifndef __SYSDEP_LOCKS_H__
84.1620 -+#define __SYSDEP_LOCKS_H__
84.1621 -+
84.1622 -+typedef size_t obj_addr_t; /* Integer type big enough for object */
84.1623 -+ /* address. */
84.1624 -+
84.1625 -+static unsigned char __cas_lock = 0;
84.1626 -+
84.1627 -+inline static void
84.1628 -+__cas_start_atomic (void)
84.1629 -+{
84.1630 -+ unsigned int val;
84.1631 -+
84.1632 -+ do
84.1633 -+ __asm__ __volatile__ ("tas.b @%1; movt %0"
84.1634 -+ : "=r" (val)
84.1635 -+ : "r" (&__cas_lock)
84.1636 -+ : "memory");
84.1637 -+ while (val == 0);
84.1638 -+}
84.1639 -+
84.1640 -+inline static void
84.1641 -+__cas_end_atomic (void)
84.1642 -+{
84.1643 -+ __asm__ __volatile__ (" " : : : "memory");
84.1644 -+ __cas_lock = 0;
84.1645 -+}
84.1646 -+
84.1647 -+inline static bool
84.1648 -+compare_and_swap (volatile obj_addr_t *addr, obj_addr_t old,
84.1649 -+ obj_addr_t new_val)
84.1650 -+{
84.1651 -+ bool ret;
84.1652 -+
84.1653 -+ __cas_start_atomic ();
84.1654 -+ if (*addr != old)
84.1655 -+ ret = false;
84.1656 -+ else
84.1657 -+ {
84.1658 -+ *addr = new_val;
84.1659 -+ ret = true;
84.1660 -+ }
84.1661 -+ __cas_end_atomic ();
84.1662 -+
84.1663 -+ return ret;
84.1664 -+}
84.1665 -+
84.1666 -+inline static void
84.1667 -+release_set (volatile obj_addr_t *addr, obj_addr_t new_val)
84.1668 -+{
84.1669 -+ __asm__ __volatile__ (" " : : : "memory");
84.1670 -+ *(addr) = new_val;
84.1671 -+}
84.1672 -+
84.1673 -+inline static bool
84.1674 -+compare_and_swap_release (volatile obj_addr_t *addr, obj_addr_t old,
84.1675 -+ obj_addr_t new_val)
84.1676 -+{
84.1677 -+ return compare_and_swap (addr, old, new_val);
84.1678 -+}
84.1679 -+
84.1680 -+#endif /* ! __SYSDEP_LOCKS_H__ */
84.1681 -diff -ruN gcc-20030210.orig/libstdc++-v3/acinclude.m4 gcc-20030210/libstdc++-v3/acinclude.m4
84.1682 ---- gcc-20030210.orig/libstdc++-v3/acinclude.m4 Tue Jan 28 02:30:41 2003
84.1683 -+++ gcc-20030210/libstdc++-v3/acinclude.m4 Sat Feb 22 01:40:14 2003
84.1684 -@@ -1828,9 +1828,10 @@
84.1685 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
84.1686 -
84.1687 - # Passed down for canadian crosses.
84.1688 -- if test x"$CANADIAN" = xyes; then
84.1689 -- TOPLEVEL_INCLUDES='-I$(includedir)'
84.1690 -- fi
84.1691 -+ #if test x"$CANADIAN" = xyes; then
84.1692 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
84.1693 -+ #fi
84.1694 -+ TOPLEVEL_INCLUDES=''
84.1695 -
84.1696 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
84.1697 -
84.1698 -diff -ruN gcc-20030210.orig/libstdc++-v3/aclocal.m4 gcc-20030210/libstdc++-v3/aclocal.m4
84.1699 ---- gcc-20030210.orig/libstdc++-v3/aclocal.m4 Mon Feb 10 19:36:47 2003
84.1700 -+++ gcc-20030210/libstdc++-v3/aclocal.m4 Sat Feb 22 01:40:14 2003
84.1701 -@@ -1840,9 +1840,10 @@
84.1702 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
84.1703 -
84.1704 - # Passed down for canadian crosses.
84.1705 -- if test x"$CANADIAN" = xyes; then
84.1706 -- TOPLEVEL_INCLUDES='-I$(includedir)'
84.1707 -- fi
84.1708 -+ #if test x"$CANADIAN" = xyes; then
84.1709 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
84.1710 -+ #fi
84.1711 -+ TOPLEVEL_INCLUDES=''
84.1712 -
84.1713 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
84.1714 -
84.1715 -diff -ruN gcc-20030210.orig/libstdc++-v3/configure gcc-20030210/libstdc++-v3/configure
84.1716 ---- gcc-20030210.orig/libstdc++-v3/configure Mon Feb 10 19:37:17 2003
84.1717 -+++ gcc-20030210/libstdc++-v3/configure Sat Feb 22 01:40:14 2003
84.1718 -@@ -1982,7 +1982,7 @@
84.1719 - # This must be Linux ELF.
84.1720 - linux-gnu*)
84.1721 - case $host_cpu in
84.1722 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
84.1723 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh*)
84.1724 - lt_cv_deplibs_check_method=pass_all ;;
84.1725 - *)
84.1726 - # glibc up to 2.1.1 does not perform some relocations on ARM
84.1727 -@@ -22340,9 +22340,10 @@
84.1728 - GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
84.1729 -
84.1730 - # Passed down for canadian crosses.
84.1731 -- if test x"$CANADIAN" = xyes; then
84.1732 -- TOPLEVEL_INCLUDES='-I$(includedir)'
84.1733 -- fi
84.1734 -+ #if test x"$CANADIAN" = xyes; then
84.1735 -+ # TOPLEVEL_INCLUDES='-I$(includedir)'
84.1736 -+ #fi
84.1737 -+ TOPLEVEL_INCLUDES=''
84.1738 -
84.1739 - LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
84.1740 -
84.1741 -diff -ruN gcc-20030210.orig/libtool.m4 gcc-20030210/libtool.m4
84.1742 ---- gcc-20030210.orig/libtool.m4 Fri Jan 31 19:16:59 2003
84.1743 -+++ gcc-20030210/libtool.m4 Sat Feb 22 01:40:14 2003
84.1744 -@@ -597,7 +597,7 @@
84.1745 - # This must be Linux ELF.
84.1746 - linux-gnu*)
84.1747 - case $host_cpu in
84.1748 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
84.1749 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
84.1750 - lt_cv_deplibs_check_method=pass_all ;;
84.1751 - *)
84.1752 - # glibc up to 2.1.1 does not perform some relocations on ARM
84.1753 -diff -ruN gcc-20030210.orig/zlib/configure gcc-20030210/zlib/configure
84.1754 ---- gcc-20030210.orig/zlib/configure Tue Jan 28 10:44:15 2003
84.1755 -+++ gcc-20030210/zlib/configure Sat Feb 22 01:40:14 2003
84.1756 -@@ -1571,7 +1571,7 @@
84.1757 - # This must be Linux ELF.
84.1758 - linux-gnu*)
84.1759 - case $host_cpu in
84.1760 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
84.1761 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
84.1762 - lt_cv_deplibs_check_method=pass_all ;;
84.1763 - *)
84.1764 - # glibc up to 2.1.1 does not perform some relocations on ARM
85.1 --- a/patches/gcc/3.2.3/gcc-3.2.3-g++.exp.patch Sat Sep 22 17:25:42 2007 +0000
85.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
85.3 @@ -1,98 +0,0 @@
85.4 -g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
85.5 -
85.6 -The first hunk fixes the error
85.7 -
85.8 -/testsuite_flags: /testsuite_flags: No such file or directory
85.9 - while executing
85.10 -"exec sh ${odir_v3}/testsuite_flags --build-includes"
85.11 - (procedure "g++_include_flags" line 21)
85.12 - invoked from within
85.13 -"g++_include_flags [get_multilibs] "
85.14 - (procedure "g++_init" line 63)
85.15 - invoked from within
85.16 -"${tool}_init $test_file_name"
85.17 - (procedure "runtest" line 19)
85.18 - invoked from within
85.19 -"runtest $test_name"
85.20 - ("foreach" body line 42)
85.21 - invoked from within
85.22 -...
85.23 -make[1]: [check-g++] Error 1 (ignored)
85.24 -
85.25 -The fix isn't especially pretty, but it worked for me, and can't hurt the
85.26 -more common native compiler case. Maybe someone who knows the code better
85.27 -can come up with a better fix.
85.28 -
85.29 -The second hunk fixes the error
85.30 -
85.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
85.32 -
85.33 -when trying to compile g++ testcases (!); setting up
85.34 -the shared library environment when running crosstests of g++
85.35 -should either be done by a special board file, or by
85.36 -setting up a remote chroot environment (see http://kegel.com/crosstool),
85.37 -not by blithely setting LD_LIBRARY_PATH on the local system.
85.38 -
85.39 ---- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old Fri Jul 11 15:42:47 2003
85.40 -+++ gcc-3.2.3/gcc/testsuite/lib/g++.exp Sat Jul 12 12:57:07 2003
85.41 -@@ -72,6 +72,8 @@
85.42 - #
85.43 - proc g++_include_flags { paths } {
85.44 - global srcdir
85.45 -+ global objdir
85.46 -+ global target_triplet
85.47 - global HAVE_LIBSTDCXX_V3
85.48 - global TESTING_IN_BUILD_TREE
85.49 -
85.50 -@@ -90,6 +92,20 @@
85.51 -
85.52 - if { ${HAVE_LIBSTDCXX_V3} } {
85.53 - set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
85.54 -+ if { $odir_v3 == "" } {
85.55 -+ verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
85.56 -+ # first assume no multilibs
85.57 -+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
85.58 -+ }
85.59 -+ if { $odir_v3 == "" } {
85.60 -+ verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
85.61 -+ # assume multilib only one level deep
85.62 -+ set multisub [file tail $gccpath]
85.63 -+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
85.64 -+ }
85.65 -+ if { $odir_v3 == "" } {
85.66 -+ error "Can't find libstdc++-v3"
85.67 -+ }
85.68 - append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
85.69 - } else {
85.70 - set odir_v2 [lookfor_file ${gccpath} libstdc++]
85.71 -@@ -192,16 +192,20 @@
85.72 - }
85.73 - }
85.74 -
85.75 -- # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
85.76 -- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
85.77 -- # (for the 64-bit ABI). The right way to do this would be to modify
85.78 -- # unix.exp -- but that's not an option since it's part of DejaGNU
85.79 -- # proper, so we do it here. We really only need to do
85.80 -- # this on IRIX, but it shouldn't hurt to do it anywhere else.
85.81 -- setenv LD_LIBRARY_PATH $ld_library_path
85.82 -- setenv SHLIB_PATH $ld_library_path
85.83 -- setenv LD_LIBRARYN32_PATH $ld_library_path
85.84 -- setenv LD_LIBRARY64_PATH $ld_library_path
85.85 -+ if {![is_remote target]} {
85.86 -+ # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
85.87 -+ # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
85.88 -+ # (for the 64-bit ABI). The right way to do this would be to modify
85.89 -+ # unix.exp -- but that's not an option since it's part of DejaGNU
85.90 -+ # proper, so we do it here. We really only need to do
85.91 -+ # this on IRIX, but it shouldn't hurt to do it anywhere else.
85.92 -+
85.93 -+ # Doing this causes us to be unable to run cross-compilers.
85.94 -+ setenv LD_LIBRARY_PATH $ld_library_path
85.95 -+ setenv SHLIB_PATH $ld_library_path
85.96 -+ setenv LD_LIBRARYN32_PATH $ld_library_path
85.97 -+ setenv LD_LIBRARY64_PATH $ld_library_path
85.98 -+ }
85.99 -
85.100 - return "$flags"
85.101 - }
86.1 --- a/patches/gcc/3.2.3/gcc-3.2.3-libffi-1.patch Sat Sep 22 17:25:42 2007 +0000
86.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
86.3 @@ -1,6864 +0,0 @@
86.4 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.am gcc/libffi/Makefile.am
86.5 ---- gcc-3.2.2.orig/libffi/Makefile.am Tue Jan 28 10:43:56 2003
86.6 -+++ gcc/libffi/Makefile.am Tue Jan 28 10:48:33 2003
86.7 -@@ -8,14 +8,17 @@
86.8 - src/mips/n32.s src/mips/o32.S src/mips/o32.s \
86.9 - src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
86.10 - src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
86.11 -+ src/x86/ffi64.c src/x86/unix64.S \
86.12 - src/alpha/ffi.c src/alpha/osf.S \
86.13 - src/m68k/ffi.c src/m68k/sysv.S \
86.14 - src/powerpc/ffi.c src/powerpc/sysv.S \
86.15 - src/powerpc/ppc_closure.S src/powerpc/asm.h \
86.16 - src/powerpc/ffi_darwin.c \
86.17 - src/powerpc/darwin.S src/powerpc/aix.S \
86.18 -- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
86.19 -- src/arm/ffi.c src/arm/sysv.S
86.20 -+ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
86.21 -+ src/arm/ffi.c src/arm/sysv.S \
86.22 -+ src/s390/ffi.c src/s390/sysv.S \
86.23 -+ src/sh/ffi.c src/sh/sysv.S
86.24 -
86.25 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
86.26 -
86.27 -@@ -83,6 +86,7 @@
86.28 - ffitest_LDFLAGS = -shared-libgcc
86.29 -
86.30 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
86.31 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
86.32 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
86.33 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
86.34 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
86.35 -@@ -91,9 +95,12 @@
86.36 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
86.37 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
86.38 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
86.39 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
86.40 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
86.41 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
86.42 - TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
86.43 -+TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
86.44 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
86.45 -+TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
86.46 -
86.47 - ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@)
86.48 - ## Work around automake deficiency
86.49 -@@ -103,6 +110,10 @@
86.50 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
86.51 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
86.52 - endif
86.53 -+if MIPS_LINUX
86.54 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
86.55 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
86.56 -+endif
86.57 - if MIPS_SGI
86.58 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
86.59 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
86.60 -@@ -147,6 +158,18 @@
86.61 - libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
86.62 - libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
86.63 - endif
86.64 -+if S390
86.65 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
86.66 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
86.67 -+endif
86.68 -+if X86_64
86.69 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
86.70 -+libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
86.71 -+endif
86.72 -+if SH
86.73 -+libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
86.74 -+libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
86.75 -+endif
86.76 -
86.77 - AM_CFLAGS = -fexceptions
86.78 -
86.79 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/Makefile.in gcc/libffi/Makefile.in
86.80 ---- gcc-3.2.2.orig/libffi/Makefile.in Wed Jan 29 07:59:05 2003
86.81 -+++ gcc/libffi/Makefile.in Wed Jan 29 07:58:58 2003
86.82 -@@ -91,14 +91,17 @@
86.83 - src/mips/n32.s src/mips/o32.S src/mips/o32.s \
86.84 - src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
86.85 - src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \
86.86 -+ src/x86/ffi64.c src/x86/unix64.S \
86.87 - src/alpha/ffi.c src/alpha/osf.S \
86.88 - src/m68k/ffi.c src/m68k/sysv.S \
86.89 - src/powerpc/ffi.c src/powerpc/sysv.S \
86.90 - src/powerpc/ppc_closure.S src/powerpc/asm.h \
86.91 - src/powerpc/ffi_darwin.c \
86.92 - src/powerpc/darwin.S src/powerpc/aix.S \
86.93 -- src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \
86.94 -- src/arm/ffi.c src/arm/sysv.S
86.95 -+ src/powerpc/darwin_closure.S src/powerpc/aix_closure.S \
86.96 -+ src/arm/ffi.c src/arm/sysv.S \
86.97 -+ src/s390/ffi.c src/s390/sysv.S \
86.98 -+ src/sh/ffi.c src/sh/sysv.S
86.99 -
86.100 -
86.101 - VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
86.102 -@@ -162,6 +165,7 @@
86.103 - ffitest_LDFLAGS = -shared-libgcc
86.104 -
86.105 - TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S
86.106 -+TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S
86.107 - TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s
86.108 - TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S
86.109 - TARGET_SRC_X86_WIN32 = src/x86/ffi.c src/x86/win32.S
86.110 -@@ -170,14 +174,18 @@
86.111 - TARGET_SRC_IA64 = src/ia64/ffi.c src/ia64/unix.S
86.112 - TARGET_SRC_M68K = src/m68k/ffi.c src/m68k/sysv.S
86.113 - TARGET_SRC_POWERPC = src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
86.114 --TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closures.S
86.115 -+TARGET_SRC_POWERPC_AIX = src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
86.116 - TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
86.117 - TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c
86.118 -+TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c
86.119 -+TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
86.120 -+TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c
86.121 -
86.122 - libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \
86.123 - src/raw_api.c src/java_raw_api.c
86.124 -
86.125 - @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
86.126 -+@MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
86.127 - @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
86.128 - @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
86.129 - @X86_WIN32_TRUE@libffi_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
86.130 -@@ -189,7 +197,11 @@
86.131 - @POWERPC_AIX_TRUE@libffi_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
86.132 - @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
86.133 - @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
86.134 -+@S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
86.135 -+@X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
86.136 -+@SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
86.137 - @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC)
86.138 -+@MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX)
86.139 - @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI)
86.140 - @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86)
86.141 - @X86_WIN32_TRUE@libffi_convenience_la_SOURCES = @X86_WIN32_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_WIN32)
86.142 -@@ -201,6 +213,9 @@
86.143 - @POWERPC_AIX_TRUE@libffi_convenience_la_SOURCES = @POWERPC_AIX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_AIX)
86.144 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN)
86.145 - @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM)
86.146 -+@S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390)
86.147 -+@X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64)
86.148 -+@SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH)
86.149 -
86.150 - AM_CFLAGS = -fexceptions
86.151 -
86.152 -@@ -208,7 +223,7 @@
86.153 -
86.154 - INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
86.155 - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
86.156 --mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
86.157 -+mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs
86.158 - CONFIG_HEADER = fficonfig.h
86.159 - CONFIG_CLEAN_FILES =
86.160 - LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
86.161 -@@ -220,10 +235,6 @@
86.162 - LIBS = @LIBS@
86.163 - libffi_convenience_la_LDFLAGS =
86.164 - libffi_convenience_la_LIBADD =
86.165 --@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.166 --@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.167 --@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
86.168 --@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
86.169 - @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.170 - @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.171 - @ALPHA_TRUE@src/java_raw_api.lo src/alpha/ffi.lo src/alpha/osf.lo
86.172 -@@ -234,12 +245,29 @@
86.173 - @MIPS_GCC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.174 - @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
86.175 - @MIPS_GCC_TRUE@src/mips/n32.lo
86.176 --@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.177 --@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.178 --@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
86.179 -+@S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.180 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.181 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
86.182 - @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.183 - @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.184 - @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
86.185 -+@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.186 -+@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.187 -+@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
86.188 -+@POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.189 -+@POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.190 -+@POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \
86.191 -+@POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo
86.192 -+@MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.193 -+@MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.194 -+@MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo
86.195 -+@X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.196 -+@X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.197 -+@X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo
86.198 -+@X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.199 -+@X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.200 -+@X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \
86.201 -+@X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo
86.202 - @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.203 - @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.204 - @SPARC_TRUE@src/java_raw_api.lo src/sparc/ffi.lo src/sparc/v8.lo \
86.205 -@@ -247,62 +275,75 @@
86.206 - @POWERPC_AIX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.207 - @POWERPC_AIX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.208 - @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
86.209 --@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo
86.210 --@X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.211 --@X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.212 --@X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo
86.213 --@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.214 --@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.215 --@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
86.216 -+@POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closure.lo
86.217 -+@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.218 -+@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.219 -+@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
86.220 -+@MIPS_SGI_TRUE@src/mips/n32.lo
86.221 - @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.222 - @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.223 - @POWERPC_DARWIN_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \
86.224 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \
86.225 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
86.226 --@MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \
86.227 --@MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \
86.228 --@MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \
86.229 --@MIPS_SGI_TRUE@src/mips/n32.lo
86.230 -+@ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.231 -+@ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.232 -+@ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo
86.233 -+@SH_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.234 -+@SH_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.235 -+@SH_TRUE@src/sh/sysv.lo src/sh/ffi.lo
86.236 - libffi_la_LIBADD =
86.237 -+@SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
86.238 -+@SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \
86.239 -+@SH_TRUE@src/sh/ffi.lo
86.240 -+@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.241 -+@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.242 -+@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
86.243 -+@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
86.244 -+@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
86.245 -+@X86_TRUE@src/x86/sysv.lo
86.246 - @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.247 - @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.248 - @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \
86.249 - @POWERPC_TRUE@src/powerpc/ppc_closure.lo
86.250 --@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.251 --@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.252 --@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
86.253 --@IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.254 --@IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.255 --@IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo
86.256 --@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.257 --@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.258 --@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
86.259 --@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.260 --@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.261 --@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
86.262 --@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.263 --@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.264 --@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
86.265 -+@MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.266 -+@MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.267 -+@MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo
86.268 - @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.269 - @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.270 - @SPARC_TRUE@src/sparc/ffi.lo src/sparc/v8.lo src/sparc/v9.lo
86.271 - @POWERPC_AIX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.272 - @POWERPC_AIX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.273 - @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \
86.274 --@POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo
86.275 --@X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
86.276 --@X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \
86.277 --@X86_TRUE@src/x86/sysv.lo
86.278 -+@POWERPC_AIX_TRUE@src/powerpc/aix_closure.lo
86.279 -+@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.280 -+@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.281 -+@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
86.282 - @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \
86.283 - @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \
86.284 - @ARM_TRUE@src/arm/ffi.lo
86.285 -+@ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.286 -+@ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.287 -+@ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo
86.288 -+@MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.289 -+@MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.290 -+@MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
86.291 -+@S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.292 -+@S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.293 -+@S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo
86.294 -+@M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.295 -+@M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.296 -+@M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo
86.297 -+@X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.298 -+@X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.299 -+@X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo
86.300 -+@X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.301 -+@X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.302 -+@X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \
86.303 -+@X86_64_TRUE@src/x86/sysv.lo
86.304 - @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.305 - @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.306 - @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \
86.307 - @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo
86.308 --@MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \
86.309 --@MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \
86.310 --@MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo
86.311 - noinst_PROGRAMS = ffitest$(EXEEXT)
86.312 - PROGRAMS = $(noinst_PROGRAMS)
86.313 -
86.314 -@@ -578,8 +616,8 @@
86.315 - -chmod 777 $(distdir)
86.316 - $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \
86.317 - $(distdir)/src/m68k $(distdir)/src/mips \
86.318 -- $(distdir)/src/powerpc $(distdir)/src/sparc \
86.319 -- $(distdir)/src/x86
86.320 -+ $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \
86.321 -+ $(distdir)/src/sparc $(distdir)/src/x86
86.322 - @for file in $(DISTFILES); do \
86.323 - if test -f $$file; then d=.; else d=$(srcdir); fi; \
86.324 - if test -d $$d/$$file; then \
86.325 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/acinclude.m4 gcc/libffi/acinclude.m4
86.326 ---- gcc-3.2.2.orig/libffi/acinclude.m4 Sun Sep 10 16:43:14 2000
86.327 -+++ gcc/libffi/acinclude.m4 Tue Dec 17 03:22:47 2002
86.328 -@@ -4,5 +4,8 @@
86.329 - dnl to add a definition of LIBTOOL to Makefile.in.
86.330 - ifelse(yes,no,[
86.331 - AC_DEFUN([AC_PROG_LIBTOOL],)
86.332 -+AC_DEFUN([AM_PROG_LIBTOOL],)
86.333 - AC_SUBST(LIBTOOL)
86.334 - ])
86.335 -+
86.336 -+sinclude(../config/accross.m4)
86.337 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/aclocal.m4 gcc/libffi/aclocal.m4
86.338 ---- gcc-3.2.2.orig/libffi/aclocal.m4 Fri Feb 1 07:25:31 2002
86.339 -+++ gcc/libffi/aclocal.m4 Tue Dec 17 03:22:47 2002
86.340 -@@ -1,6 +1,6 @@
86.341 --dnl aclocal.m4 generated automatically by aclocal 1.4
86.342 -+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
86.343 -
86.344 --dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
86.345 -+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
86.346 - dnl This file is free software; the Free Software Foundation
86.347 - dnl gives unlimited permission to copy and/or distribute it,
86.348 - dnl with or without modifications, as long as this notice is preserved.
86.349 -@@ -16,108 +16,15 @@
86.350 - dnl to add a definition of LIBTOOL to Makefile.in.
86.351 - ifelse(yes,no,[
86.352 - AC_DEFUN([AC_PROG_LIBTOOL],)
86.353 -+AC_DEFUN([AM_PROG_LIBTOOL],)
86.354 - AC_SUBST(LIBTOOL)
86.355 - ])
86.356 -
86.357 --AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
86.358 --[changequote(<<, >>)dnl
86.359 --dnl The name to #define.
86.360 --define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
86.361 --dnl The cache variable name.
86.362 --define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
86.363 --changequote([, ])dnl
86.364 --AC_MSG_CHECKING(size of $1)
86.365 --AC_CACHE_VAL(AC_CV_NAME,
86.366 --[for ac_size in 4 8 1 2 16 12 $2 ; do # List sizes in rough order of prevalence.
86.367 -- AC_TRY_COMPILE([#include "confdefs.h"
86.368 --#include <sys/types.h>
86.369 --$2
86.370 --], [switch (0) case 0: case (sizeof ($1) == $ac_size):;], AC_CV_NAME=$ac_size)
86.371 -- if test x$AC_CV_NAME != x ; then break; fi
86.372 --done
86.373 --])
86.374 --if test x$AC_CV_NAME = x ; then
86.375 -- AC_MSG_ERROR([cannot determine a size for $1])
86.376 --fi
86.377 --AC_MSG_RESULT($AC_CV_NAME)
86.378 --AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
86.379 --undefine([AC_TYPE_NAME])dnl
86.380 --undefine([AC_CV_NAME])dnl
86.381 --])
86.382 --
86.383 --AC_DEFUN([AC_C_BIGENDIAN_CROSS],
86.384 --[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian,
86.385 --[ac_cv_c_bigendian=unknown
86.386 --# See if sys/param.h defines the BYTE_ORDER macro.
86.387 --AC_TRY_COMPILE([#include <sys/types.h>
86.388 --#include <sys/param.h>], [
86.389 --#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
86.390 -- bogus endian macros
86.391 --#endif], [# It does; now see whether it defined to BIG_ENDIAN or not.
86.392 --AC_TRY_COMPILE([#include <sys/types.h>
86.393 --#include <sys/param.h>], [
86.394 --#if BYTE_ORDER != BIG_ENDIAN
86.395 -- not big endian
86.396 --#endif], ac_cv_c_bigendian=yes, ac_cv_c_bigendian=no)])
86.397 --if test $ac_cv_c_bigendian = unknown; then
86.398 --AC_TRY_RUN([main () {
86.399 -- /* Are we little or big endian? From Harbison&Steele. */
86.400 -- union
86.401 -- {
86.402 -- long l;
86.403 -- char c[sizeof (long)];
86.404 -- } u;
86.405 -- u.l = 1;
86.406 -- exit (u.c[sizeof (long) - 1] == 1);
86.407 --}], ac_cv_c_bigendian=no, ac_cv_c_bigendian=yes,
86.408 --[ echo $ac_n "cross-compiling... " 2>&AC_FD_MSG ])
86.409 --fi])
86.410 --if test $ac_cv_c_bigendian = unknown; then
86.411 --AC_MSG_CHECKING(to probe for byte ordering)
86.412 --[
86.413 --cat >conftest.c <<EOF
86.414 --short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
86.415 --short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
86.416 --void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; }
86.417 --short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
86.418 --short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
86.419 --void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; }
86.420 --int main() { _ascii (); _ebcdic (); return 0; }
86.421 --EOF
86.422 --] if test -f conftest.c ; then
86.423 -- if ${CC-cc} ${CFLAGS} conftest.c -o conftest.o && test -f conftest.o ; then
86.424 -- if test `grep -l BIGenDianSyS conftest.o` ; then
86.425 -- echo $ac_n ' big endian probe OK, ' 1>&AC_FD_MSG
86.426 -- ac_cv_c_bigendian=yes
86.427 -- fi
86.428 -- if test `grep -l LiTTleEnDian conftest.o` ; then
86.429 -- echo $ac_n ' little endian probe OK, ' 1>&AC_FD_MSG
86.430 -- if test $ac_cv_c_bigendian = yes ; then
86.431 -- ac_cv_c_bigendian=unknown;
86.432 -- else
86.433 -- ac_cv_c_bigendian=no
86.434 -- fi
86.435 -- fi
86.436 -- echo $ac_n 'guessing bigendian ... ' >&AC_FD_MSG
86.437 -- fi
86.438 -- fi
86.439 --AC_MSG_RESULT($ac_cv_c_bigendian)
86.440 --fi
86.441 --if test $ac_cv_c_bigendian = yes; then
86.442 -- AC_DEFINE(WORDS_BIGENDIAN, 1, [whether byteorder is bigendian])
86.443 -- BYTEORDER=4321
86.444 --else
86.445 -- BYTEORDER=1234
86.446 --fi
86.447 --AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LIL_ENDIAN, 4321 = BIGENDIAN])
86.448 --if test $ac_cv_c_bigendian = unknown; then
86.449 -- AC_MSG_ERROR(unknown endianess - sorry, please pre-set ac_cv_c_bigendian)
86.450 --fi
86.451 --])
86.452 -+sinclude(../config/accross.m4)
86.453 -
86.454 - # Like AC_CONFIG_HEADER, but automatically create stamp file.
86.455 -
86.456 --AC_DEFUN(AM_CONFIG_HEADER,
86.457 -+AC_DEFUN([AM_CONFIG_HEADER],
86.458 - [AC_PREREQ([2.12])
86.459 - AC_CONFIG_HEADER([$1])
86.460 - dnl When config.status generates a header, we must update the stamp-h file.
86.461 -@@ -147,7 +54,7 @@
86.462 - dnl Usage:
86.463 - dnl AM_INIT_AUTOMAKE(package,version, [no-define])
86.464 -
86.465 --AC_DEFUN(AM_INIT_AUTOMAKE,
86.466 -+AC_DEFUN([AM_INIT_AUTOMAKE],
86.467 - [AC_REQUIRE([AC_PROG_INSTALL])
86.468 - PACKAGE=[$1]
86.469 - AC_SUBST(PACKAGE)
86.470 -@@ -175,7 +82,7 @@
86.471 - # Check to make sure that the build environment is sane.
86.472 - #
86.473 -
86.474 --AC_DEFUN(AM_SANITY_CHECK,
86.475 -+AC_DEFUN([AM_SANITY_CHECK],
86.476 - [AC_MSG_CHECKING([whether build environment is sane])
86.477 - # Just in case
86.478 - sleep 1
86.479 -@@ -216,7 +123,7 @@
86.480 -
86.481 - dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
86.482 - dnl The program must properly implement --version.
86.483 --AC_DEFUN(AM_MISSING_PROG,
86.484 -+AC_DEFUN([AM_MISSING_PROG],
86.485 - [AC_MSG_CHECKING(for working $2)
86.486 - # Run test in a subshell; some versions of sh will print an error if
86.487 - # an executable is not found, even if stderr is redirected.
86.488 -@@ -235,7 +142,7 @@
86.489 -
86.490 - # serial 1
86.491 -
86.492 --AC_DEFUN(AM_MAINTAINER_MODE,
86.493 -+AC_DEFUN([AM_MAINTAINER_MODE],
86.494 - [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
86.495 - dnl maintainer-mode is disabled by default
86.496 - AC_ARG_ENABLE(maintainer-mode,
86.497 -@@ -252,7 +159,7 @@
86.498 -
86.499 - # Define a conditional.
86.500 -
86.501 --AC_DEFUN(AM_CONDITIONAL,
86.502 -+AC_DEFUN([AM_CONDITIONAL],
86.503 - [AC_SUBST($1_TRUE)
86.504 - AC_SUBST($1_FALSE)
86.505 - if $2; then
86.506 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure gcc/libffi/configure
86.507 ---- gcc-3.2.2.orig/libffi/configure Wed Jan 29 07:59:05 2003
86.508 -+++ gcc/libffi/configure Sat Feb 1 20:16:19 2003
86.509 -@@ -633,17 +633,16 @@
86.510 -
86.511 - if test "${srcdir}" = "."; then
86.512 - if test "${with_target_subdir}" != "."; then
86.513 -- libffi_basedir="${srcdir}/${with_multisrctop}.."
86.514 -+ libffi_basedir="${with_multisrctop}../"
86.515 - else
86.516 -- libffi_basedir="${srcdir}/${with_multisrctop}"
86.517 -+ libffi_basedir="${with_multisrctop}"
86.518 - fi
86.519 - else
86.520 -- libffi_basedir="${srcdir}"
86.521 -+ libffi_basedir=
86.522 - fi
86.523 -
86.524 --
86.525 - ac_aux_dir=
86.526 --for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
86.527 -+for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do
86.528 - if test -f $ac_dir/install-sh; then
86.529 - ac_aux_dir=$ac_dir
86.530 - ac_install_sh="$ac_aux_dir/install-sh -c"
86.531 -@@ -655,13 +654,14 @@
86.532 - fi
86.533 - done
86.534 - if test -z "$ac_aux_dir"; then
86.535 -- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
86.536 -+ { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; }
86.537 - fi
86.538 - ac_config_guess=$ac_aux_dir/config.guess
86.539 - ac_config_sub=$ac_aux_dir/config.sub
86.540 - ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
86.541 -
86.542 -
86.543 -+
86.544 - # Make sure we can run config.sub.
86.545 - if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
86.546 - else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
86.547 -@@ -1238,9 +1238,18 @@
86.548 - ;;
86.549 -
86.550 - hpux10.20*|hpux11*)
86.551 -- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
86.552 -- lt_cv_file_magic_cmd=/usr/bin/file
86.553 -- lt_cv_file_magic_test_file=/usr/lib/libc.sl
86.554 -+ case $host_cpu in
86.555 -+ hppa*)
86.556 -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
86.557 -+ lt_cv_file_magic_cmd=/usr/bin/file
86.558 -+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
86.559 -+ ;;
86.560 -+ ia64*)
86.561 -+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
86.562 -+ lt_cv_file_magic_cmd=/usr/bin/file
86.563 -+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
86.564 -+ ;;
86.565 -+ esac
86.566 - ;;
86.567 -
86.568 - irix5* | irix6*)
86.569 -@@ -1267,7 +1276,7 @@
86.570 - # This must be Linux ELF.
86.571 - linux-gnu*)
86.572 - case $host_cpu in
86.573 -- alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
86.574 -+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | sh* )
86.575 - lt_cv_deplibs_check_method=pass_all ;;
86.576 - *)
86.577 - # glibc up to 2.1.1 does not perform some relocations on ARM
86.578 -@@ -1330,13 +1339,13 @@
86.579 - deplibs_check_method=$lt_cv_deplibs_check_method
86.580 -
86.581 - echo $ac_n "checking for object suffix""... $ac_c" 1>&6
86.582 --echo "configure:1334: checking for object suffix" >&5
86.583 -+echo "configure:1343: checking for object suffix" >&5
86.584 - if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
86.585 - echo $ac_n "(cached) $ac_c" 1>&6
86.586 - else
86.587 - rm -f conftest*
86.588 - echo 'int i = 1;' > conftest.$ac_ext
86.589 --if { (eval echo configure:1340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.590 -+if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.591 - for ac_file in conftest.*; do
86.592 - case $ac_file in
86.593 - *.c) ;;
86.594 -@@ -1356,7 +1365,7 @@
86.595 -
86.596 -
86.597 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
86.598 --echo "configure:1360: checking for executable suffix" >&5
86.599 -+echo "configure:1369: checking for executable suffix" >&5
86.600 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
86.601 - echo $ac_n "(cached) $ac_c" 1>&6
86.602 - else
86.603 -@@ -1366,7 +1375,7 @@
86.604 - rm -f conftest*
86.605 - echo 'int main () { return 0; }' > conftest.$ac_ext
86.606 - ac_cv_exeext=
86.607 -- if { (eval echo configure:1370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
86.608 -+ if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
86.609 - for file in conftest.*; do
86.610 - case $file in
86.611 - *.c | *.o | *.obj) ;;
86.612 -@@ -1399,7 +1408,7 @@
86.613 - file_magic*)
86.614 - if test "$file_magic_cmd" = '$MAGIC_CMD'; then
86.615 - echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
86.616 --echo "configure:1403: checking for ${ac_tool_prefix}file" >&5
86.617 -+echo "configure:1412: checking for ${ac_tool_prefix}file" >&5
86.618 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
86.619 - echo $ac_n "(cached) $ac_c" 1>&6
86.620 - else
86.621 -@@ -1461,7 +1470,7 @@
86.622 - if test -z "$lt_cv_path_MAGIC_CMD"; then
86.623 - if test -n "$ac_tool_prefix"; then
86.624 - echo $ac_n "checking for file""... $ac_c" 1>&6
86.625 --echo "configure:1465: checking for file" >&5
86.626 -+echo "configure:1474: checking for file" >&5
86.627 - if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
86.628 - echo $ac_n "(cached) $ac_c" 1>&6
86.629 - else
86.630 -@@ -1532,7 +1541,7 @@
86.631 - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
86.632 - set dummy ${ac_tool_prefix}ranlib; ac_word=$2
86.633 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.634 --echo "configure:1536: checking for $ac_word" >&5
86.635 -+echo "configure:1545: checking for $ac_word" >&5
86.636 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
86.637 - echo $ac_n "(cached) $ac_c" 1>&6
86.638 - else
86.639 -@@ -1564,7 +1573,7 @@
86.640 - # Extract the first word of "ranlib", so it can be a program name with args.
86.641 - set dummy ranlib; ac_word=$2
86.642 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.643 --echo "configure:1568: checking for $ac_word" >&5
86.644 -+echo "configure:1577: checking for $ac_word" >&5
86.645 - if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
86.646 - echo $ac_n "(cached) $ac_c" 1>&6
86.647 - else
86.648 -@@ -1599,7 +1608,7 @@
86.649 - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
86.650 - set dummy ${ac_tool_prefix}strip; ac_word=$2
86.651 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.652 --echo "configure:1603: checking for $ac_word" >&5
86.653 -+echo "configure:1612: checking for $ac_word" >&5
86.654 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
86.655 - echo $ac_n "(cached) $ac_c" 1>&6
86.656 - else
86.657 -@@ -1631,7 +1640,7 @@
86.658 - # Extract the first word of "strip", so it can be a program name with args.
86.659 - set dummy strip; ac_word=$2
86.660 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.661 --echo "configure:1635: checking for $ac_word" >&5
86.662 -+echo "configure:1644: checking for $ac_word" >&5
86.663 - if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
86.664 - echo $ac_n "(cached) $ac_c" 1>&6
86.665 - else
86.666 -@@ -1698,8 +1707,8 @@
86.667 - case $host in
86.668 - *-*-irix6*)
86.669 - # Find out which ABI we are using.
86.670 -- echo '#line 1702 "configure"' > conftest.$ac_ext
86.671 -- if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.672 -+ echo '#line 1711 "configure"' > conftest.$ac_ext
86.673 -+ if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.674 - case `/usr/bin/file conftest.$ac_objext` in
86.675 - *32-bit*)
86.676 - LD="${LD-ld} -32"
86.677 -@@ -1715,12 +1724,70 @@
86.678 - rm -rf conftest*
86.679 - ;;
86.680 -
86.681 -+ia64-*-hpux*)
86.682 -+ # Find out which ABI we are using.
86.683 -+ echo 'int i;' > conftest.$ac_ext
86.684 -+ if { (eval echo configure:1731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.685 -+ case "`/usr/bin/file conftest.o`" in
86.686 -+ *ELF-32*)
86.687 -+ HPUX_IA64_MODE="32"
86.688 -+ ;;
86.689 -+ *ELF-64*)
86.690 -+ HPUX_IA64_MODE="64"
86.691 -+ ;;
86.692 -+ esac
86.693 -+ fi
86.694 -+ rm -rf conftest*
86.695 -+ ;;
86.696 -+
86.697 -+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
86.698 -+ # Find out which ABI we are using.
86.699 -+ echo 'int i;' > conftest.$ac_ext
86.700 -+ if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.701 -+ case "`/usr/bin/file conftest.o`" in
86.702 -+ *32-bit*)
86.703 -+ case $host in
86.704 -+ x86_64-*linux*)
86.705 -+ LD="${LD-ld} -m elf_i386"
86.706 -+ ;;
86.707 -+ ppc64-*linux*)
86.708 -+ LD="${LD-ld} -m elf32ppclinux"
86.709 -+ ;;
86.710 -+ s390x-*linux*)
86.711 -+ LD="${LD-ld} -m elf_s390"
86.712 -+ ;;
86.713 -+ sparc64-*linux*)
86.714 -+ LD="${LD-ld} -m elf32_sparc"
86.715 -+ ;;
86.716 -+ esac
86.717 -+ ;;
86.718 -+ *64-bit*)
86.719 -+ case $host in
86.720 -+ x86_64-*linux*)
86.721 -+ LD="${LD-ld} -m elf_x86_64"
86.722 -+ ;;
86.723 -+ ppc*-*linux*|powerpc*-*linux*)
86.724 -+ LD="${LD-ld} -m elf64ppc"
86.725 -+ ;;
86.726 -+ s390*-*linux*)
86.727 -+ LD="${LD-ld} -m elf64_s390"
86.728 -+ ;;
86.729 -+ sparc*-*linux*)
86.730 -+ LD="${LD-ld} -m elf64_sparc"
86.731 -+ ;;
86.732 -+ esac
86.733 -+ ;;
86.734 -+ esac
86.735 -+ fi
86.736 -+ rm -rf conftest*
86.737 -+ ;;
86.738 -+
86.739 - *-*-sco3.2v5*)
86.740 - # On SCO OpenServer 5, we need -belf to get full-featured binaries.
86.741 - SAVE_CFLAGS="$CFLAGS"
86.742 - CFLAGS="$CFLAGS -belf"
86.743 - echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
86.744 --echo "configure:1724: checking whether the C compiler needs -belf" >&5
86.745 -+echo "configure:1791: checking whether the C compiler needs -belf" >&5
86.746 - if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
86.747 - echo $ac_n "(cached) $ac_c" 1>&6
86.748 - else
86.749 -@@ -1733,14 +1800,14 @@
86.750 - cross_compiling=$ac_cv_prog_cc_cross
86.751 -
86.752 - cat > conftest.$ac_ext <<EOF
86.753 --#line 1737 "configure"
86.754 -+#line 1804 "configure"
86.755 - #include "confdefs.h"
86.756 -
86.757 - int main() {
86.758 -
86.759 - ; return 0; }
86.760 - EOF
86.761 --if { (eval echo configure:1744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.762 -+if { (eval echo configure:1811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.763 - rm -rf conftest*
86.764 - lt_cv_cc_needs_belf=yes
86.765 - else
86.766 -@@ -1868,7 +1935,7 @@
86.767 - # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
86.768 - # ./install, which can be erroneously created by make from ./install.sh.
86.769 - echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
86.770 --echo "configure:1872: checking for a BSD compatible install" >&5
86.771 -+echo "configure:1939: checking for a BSD compatible install" >&5
86.772 - if test -z "$INSTALL"; then
86.773 - if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
86.774 - echo $ac_n "(cached) $ac_c" 1>&6
86.775 -@@ -1921,7 +1988,7 @@
86.776 - test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
86.777 -
86.778 - echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
86.779 --echo "configure:1925: checking whether build environment is sane" >&5
86.780 -+echo "configure:1992: checking whether build environment is sane" >&5
86.781 - # Just in case
86.782 - sleep 1
86.783 - echo timestamp > conftestfile
86.784 -@@ -1978,7 +2045,7 @@
86.785 - test "$program_transform_name" = "" && program_transform_name="s,x,x,"
86.786 -
86.787 - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
86.788 --echo "configure:1982: checking whether ${MAKE-make} sets \${MAKE}" >&5
86.789 -+echo "configure:2049: checking whether ${MAKE-make} sets \${MAKE}" >&5
86.790 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
86.791 - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
86.792 - echo $ac_n "(cached) $ac_c" 1>&6
86.793 -@@ -2017,7 +2084,7 @@
86.794 -
86.795 - missing_dir=`cd $ac_aux_dir && pwd`
86.796 - echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
86.797 --echo "configure:2021: checking for working aclocal" >&5
86.798 -+echo "configure:2088: checking for working aclocal" >&5
86.799 - # Run test in a subshell; some versions of sh will print an error if
86.800 - # an executable is not found, even if stderr is redirected.
86.801 - # Redirect stdin to placate older versions of autoconf. Sigh.
86.802 -@@ -2030,7 +2097,7 @@
86.803 - fi
86.804 -
86.805 - echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
86.806 --echo "configure:2034: checking for working autoconf" >&5
86.807 -+echo "configure:2101: checking for working autoconf" >&5
86.808 - # Run test in a subshell; some versions of sh will print an error if
86.809 - # an executable is not found, even if stderr is redirected.
86.810 - # Redirect stdin to placate older versions of autoconf. Sigh.
86.811 -@@ -2043,7 +2110,7 @@
86.812 - fi
86.813 -
86.814 - echo $ac_n "checking for working automake""... $ac_c" 1>&6
86.815 --echo "configure:2047: checking for working automake" >&5
86.816 -+echo "configure:2114: checking for working automake" >&5
86.817 - # Run test in a subshell; some versions of sh will print an error if
86.818 - # an executable is not found, even if stderr is redirected.
86.819 - # Redirect stdin to placate older versions of autoconf. Sigh.
86.820 -@@ -2056,7 +2123,7 @@
86.821 - fi
86.822 -
86.823 - echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
86.824 --echo "configure:2060: checking for working autoheader" >&5
86.825 -+echo "configure:2127: checking for working autoheader" >&5
86.826 - # Run test in a subshell; some versions of sh will print an error if
86.827 - # an executable is not found, even if stderr is redirected.
86.828 - # Redirect stdin to placate older versions of autoconf. Sigh.
86.829 -@@ -2069,7 +2136,7 @@
86.830 - fi
86.831 -
86.832 - echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
86.833 --echo "configure:2073: checking for working makeinfo" >&5
86.834 -+echo "configure:2140: checking for working makeinfo" >&5
86.835 - # Run test in a subshell; some versions of sh will print an error if
86.836 - # an executable is not found, even if stderr is redirected.
86.837 - # Redirect stdin to placate older versions of autoconf. Sigh.
86.838 -@@ -2086,7 +2153,7 @@
86.839 -
86.840 -
86.841 - echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
86.842 --echo "configure:2090: checking for executable suffix" >&5
86.843 -+echo "configure:2157: checking for executable suffix" >&5
86.844 - if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
86.845 - echo $ac_n "(cached) $ac_c" 1>&6
86.846 - else
86.847 -@@ -2096,7 +2163,7 @@
86.848 - rm -f conftest*
86.849 - echo 'int main () { return 0; }' > conftest.$ac_ext
86.850 - ac_cv_exeext=
86.851 -- if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
86.852 -+ if { (eval echo configure:2167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
86.853 - for file in conftest.*; do
86.854 - case $file in
86.855 - *.c | *.o | *.obj) ;;
86.856 -@@ -2117,7 +2184,7 @@
86.857 - ac_exeext=$EXEEXT
86.858 -
86.859 - echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
86.860 --echo "configure:2121: checking whether to enable maintainer-specific portions of Makefiles" >&5
86.861 -+echo "configure:2188: checking whether to enable maintainer-specific portions of Makefiles" >&5
86.862 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
86.863 - if test "${enable_maintainer_mode+set}" = set; then
86.864 - enableval="$enable_maintainer_mode"
86.865 -@@ -2143,7 +2210,7 @@
86.866 - # Extract the first word of "gcc", so it can be a program name with args.
86.867 - set dummy gcc; ac_word=$2
86.868 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.869 --echo "configure:2147: checking for $ac_word" >&5
86.870 -+echo "configure:2214: checking for $ac_word" >&5
86.871 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
86.872 - echo $ac_n "(cached) $ac_c" 1>&6
86.873 - else
86.874 -@@ -2173,7 +2240,7 @@
86.875 - # Extract the first word of "cc", so it can be a program name with args.
86.876 - set dummy cc; ac_word=$2
86.877 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.878 --echo "configure:2177: checking for $ac_word" >&5
86.879 -+echo "configure:2244: checking for $ac_word" >&5
86.880 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
86.881 - echo $ac_n "(cached) $ac_c" 1>&6
86.882 - else
86.883 -@@ -2224,7 +2291,7 @@
86.884 - # Extract the first word of "cl", so it can be a program name with args.
86.885 - set dummy cl; ac_word=$2
86.886 - echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
86.887 --echo "configure:2228: checking for $ac_word" >&5
86.888 -+echo "configure:2295: checking for $ac_word" >&5
86.889 - if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
86.890 - echo $ac_n "(cached) $ac_c" 1>&6
86.891 - else
86.892 -@@ -2256,7 +2323,7 @@
86.893 - fi
86.894 -
86.895 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
86.896 --echo "configure:2260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
86.897 -+echo "configure:2327: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
86.898 -
86.899 - ac_ext=c
86.900 - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
86.901 -@@ -2267,12 +2334,12 @@
86.902 -
86.903 - cat > conftest.$ac_ext << EOF
86.904 -
86.905 --#line 2271 "configure"
86.906 -+#line 2338 "configure"
86.907 - #include "confdefs.h"
86.908 -
86.909 - main(){return(0);}
86.910 - EOF
86.911 --if { (eval echo configure:2276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.912 -+if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.913 - ac_cv_prog_cc_works=yes
86.914 - # If we can't run a trivial program, we are probably using a cross compiler.
86.915 - if (./conftest; exit) 2>/dev/null; then
86.916 -@@ -2298,12 +2365,12 @@
86.917 - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
86.918 - fi
86.919 - echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
86.920 --echo "configure:2302: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
86.921 -+echo "configure:2369: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
86.922 - echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
86.923 - cross_compiling=$ac_cv_prog_cc_cross
86.924 -
86.925 - echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
86.926 --echo "configure:2307: checking whether we are using GNU C" >&5
86.927 -+echo "configure:2374: checking whether we are using GNU C" >&5
86.928 - if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
86.929 - echo $ac_n "(cached) $ac_c" 1>&6
86.930 - else
86.931 -@@ -2312,7 +2379,7 @@
86.932 - yes;
86.933 - #endif
86.934 - EOF
86.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
86.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
86.937 - ac_cv_prog_gcc=yes
86.938 - else
86.939 - ac_cv_prog_gcc=no
86.940 -@@ -2331,7 +2398,7 @@
86.941 - ac_save_CFLAGS="$CFLAGS"
86.942 - CFLAGS=
86.943 - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
86.944 --echo "configure:2335: checking whether ${CC-cc} accepts -g" >&5
86.945 -+echo "configure:2402: checking whether ${CC-cc} accepts -g" >&5
86.946 - if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
86.947 - echo $ac_n "(cached) $ac_c" 1>&6
86.948 - else
86.949 -@@ -2381,17 +2448,23 @@
86.950 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
86.951 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
86.952 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
86.953 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
86.954 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
86.955 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
86.956 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
86.957 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
86.958 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
86.959 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
86.960 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
86.961 -+mips64*-*);;
86.962 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
86.963 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
86.964 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
86.965 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
86.966 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
86.967 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
86.968 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
86.969 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
86.970 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
86.971 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
86.972 -+sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
86.973 - esac
86.974 -
86.975 - if test $TARGETDIR = unknown; then
86.976 -@@ -2418,6 +2491,15 @@
86.977 - fi
86.978 -
86.979 -
86.980 -+if test x$TARGET = xMIPS_LINUX; then
86.981 -+ MIPS_LINUX_TRUE=
86.982 -+ MIPS_LINUX_FALSE='#'
86.983 -+else
86.984 -+ MIPS_LINUX_TRUE='#'
86.985 -+ MIPS_LINUX_FALSE=
86.986 -+fi
86.987 -+
86.988 -+
86.989 - if test x$TARGET = xSPARC; then
86.990 - SPARC_TRUE=
86.991 - SPARC_FALSE='#'
86.992 -@@ -2507,8 +2589,39 @@
86.993 - ARM_FALSE=
86.994 - fi
86.995 -
86.996 -+
86.997 -+if test x$TARGET = xS390; then
86.998 -+ S390_TRUE=
86.999 -+ S390_FALSE='#'
86.1000 -+else
86.1001 -+ S390_TRUE='#'
86.1002 -+ S390_FALSE=
86.1003 -+fi
86.1004 -+
86.1005 -+
86.1006 -+if test x$TARGET = xX86_64; then
86.1007 -+ X86_64_TRUE=
86.1008 -+ X86_64_FALSE='#'
86.1009 -+else
86.1010 -+ X86_64_TRUE='#'
86.1011 -+ X86_64_FALSE=
86.1012 -+fi
86.1013 -+
86.1014 -+
86.1015 -+if test x$TARGET = xSH; then
86.1016 -+ SH_TRUE=
86.1017 -+ SH_FALSE='#'
86.1018 -+else
86.1019 -+ SH_TRUE='#'
86.1020 -+ SH_FALSE=
86.1021 -+fi
86.1022 -+
86.1023 -+if test x$TARGET = xMIPS_LINUX; then
86.1024 -+ TARGET=MIPS
86.1025 -+fi
86.1026 -+
86.1027 - echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
86.1028 --echo "configure:2512: checking how to run the C preprocessor" >&5
86.1029 -+echo "configure:2625: checking how to run the C preprocessor" >&5
86.1030 - # On Suns, sometimes $CPP names a directory.
86.1031 - if test -n "$CPP" && test -d "$CPP"; then
86.1032 - CPP=
86.1033 -@@ -2523,13 +2636,13 @@
86.1034 - # On the NeXT, cc -E runs the code through the compiler's parser,
86.1035 - # not just through cpp.
86.1036 - cat > conftest.$ac_ext <<EOF
86.1037 --#line 2527 "configure"
86.1038 -+#line 2640 "configure"
86.1039 - #include "confdefs.h"
86.1040 - #include <assert.h>
86.1041 - Syntax Error
86.1042 - EOF
86.1043 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
86.1044 --{ (eval echo configure:2533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1045 -+{ (eval echo configure:2646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1046 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
86.1047 - if test -z "$ac_err"; then
86.1048 - :
86.1049 -@@ -2540,13 +2653,13 @@
86.1050 - rm -rf conftest*
86.1051 - CPP="${CC-cc} -E -traditional-cpp"
86.1052 - cat > conftest.$ac_ext <<EOF
86.1053 --#line 2544 "configure"
86.1054 -+#line 2657 "configure"
86.1055 - #include "confdefs.h"
86.1056 - #include <assert.h>
86.1057 - Syntax Error
86.1058 - EOF
86.1059 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
86.1060 --{ (eval echo configure:2550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1061 -+{ (eval echo configure:2663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1062 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
86.1063 - if test -z "$ac_err"; then
86.1064 - :
86.1065 -@@ -2557,13 +2670,13 @@
86.1066 - rm -rf conftest*
86.1067 - CPP="${CC-cc} -nologo -E"
86.1068 - cat > conftest.$ac_ext <<EOF
86.1069 --#line 2561 "configure"
86.1070 -+#line 2674 "configure"
86.1071 - #include "confdefs.h"
86.1072 - #include <assert.h>
86.1073 - Syntax Error
86.1074 - EOF
86.1075 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
86.1076 --{ (eval echo configure:2567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1077 -+{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1078 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
86.1079 - if test -z "$ac_err"; then
86.1080 - :
86.1081 -@@ -2588,12 +2701,12 @@
86.1082 - echo "$ac_t""$CPP" 1>&6
86.1083 -
86.1084 - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
86.1085 --echo "configure:2592: checking for ANSI C header files" >&5
86.1086 -+echo "configure:2705: checking for ANSI C header files" >&5
86.1087 - if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
86.1088 - echo $ac_n "(cached) $ac_c" 1>&6
86.1089 - else
86.1090 - cat > conftest.$ac_ext <<EOF
86.1091 --#line 2597 "configure"
86.1092 -+#line 2710 "configure"
86.1093 - #include "confdefs.h"
86.1094 - #include <stdlib.h>
86.1095 - #include <stdarg.h>
86.1096 -@@ -2601,7 +2714,7 @@
86.1097 - #include <float.h>
86.1098 - EOF
86.1099 - ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
86.1100 --{ (eval echo configure:2605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1101 -+{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
86.1102 - ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
86.1103 - if test -z "$ac_err"; then
86.1104 - rm -rf conftest*
86.1105 -@@ -2618,7 +2731,7 @@
86.1106 - if test $ac_cv_header_stdc = yes; then
86.1107 - # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
86.1108 - cat > conftest.$ac_ext <<EOF
86.1109 --#line 2622 "configure"
86.1110 -+#line 2735 "configure"
86.1111 - #include "confdefs.h"
86.1112 - #include <string.h>
86.1113 - EOF
86.1114 -@@ -2636,7 +2749,7 @@
86.1115 - if test $ac_cv_header_stdc = yes; then
86.1116 - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
86.1117 - cat > conftest.$ac_ext <<EOF
86.1118 --#line 2640 "configure"
86.1119 -+#line 2753 "configure"
86.1120 - #include "confdefs.h"
86.1121 - #include <stdlib.h>
86.1122 - EOF
86.1123 -@@ -2657,7 +2770,7 @@
86.1124 - :
86.1125 - else
86.1126 - cat > conftest.$ac_ext <<EOF
86.1127 --#line 2661 "configure"
86.1128 -+#line 2774 "configure"
86.1129 - #include "confdefs.h"
86.1130 - #include <ctype.h>
86.1131 - #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
86.1132 -@@ -2668,7 +2781,7 @@
86.1133 - exit (0); }
86.1134 -
86.1135 - EOF
86.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
86.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
86.1138 - then
86.1139 - :
86.1140 - else
86.1141 -@@ -2694,12 +2807,12 @@
86.1142 - for ac_func in memcpy
86.1143 - do
86.1144 - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
86.1145 --echo "configure:2698: checking for $ac_func" >&5
86.1146 -+echo "configure:2811: checking for $ac_func" >&5
86.1147 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
86.1148 - echo $ac_n "(cached) $ac_c" 1>&6
86.1149 - else
86.1150 - cat > conftest.$ac_ext <<EOF
86.1151 --#line 2703 "configure"
86.1152 -+#line 2816 "configure"
86.1153 - #include "confdefs.h"
86.1154 - /* System header to define __stub macros and hopefully few prototypes,
86.1155 - which can conflict with char $ac_func(); below. */
86.1156 -@@ -2722,7 +2835,7 @@
86.1157 -
86.1158 - ; return 0; }
86.1159 - EOF
86.1160 --if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1161 -+if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1162 - rm -rf conftest*
86.1163 - eval "ac_cv_func_$ac_func=yes"
86.1164 - else
86.1165 -@@ -2749,19 +2862,19 @@
86.1166 - # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
86.1167 - # for constant arguments. Useless!
86.1168 - echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
86.1169 --echo "configure:2753: checking for working alloca.h" >&5
86.1170 -+echo "configure:2866: checking for working alloca.h" >&5
86.1171 - if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
86.1172 - echo $ac_n "(cached) $ac_c" 1>&6
86.1173 - else
86.1174 - cat > conftest.$ac_ext <<EOF
86.1175 --#line 2758 "configure"
86.1176 -+#line 2871 "configure"
86.1177 - #include "confdefs.h"
86.1178 - #include <alloca.h>
86.1179 - int main() {
86.1180 - char *p = alloca(2 * sizeof(int));
86.1181 - ; return 0; }
86.1182 - EOF
86.1183 --if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1184 -+if { (eval echo configure:2878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1185 - rm -rf conftest*
86.1186 - ac_cv_header_alloca_h=yes
86.1187 - else
86.1188 -@@ -2782,12 +2895,12 @@
86.1189 - fi
86.1190 -
86.1191 - echo $ac_n "checking for alloca""... $ac_c" 1>&6
86.1192 --echo "configure:2786: checking for alloca" >&5
86.1193 -+echo "configure:2899: checking for alloca" >&5
86.1194 - if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
86.1195 - echo $ac_n "(cached) $ac_c" 1>&6
86.1196 - else
86.1197 - cat > conftest.$ac_ext <<EOF
86.1198 --#line 2791 "configure"
86.1199 -+#line 2904 "configure"
86.1200 - #include "confdefs.h"
86.1201 -
86.1202 - #ifdef __GNUC__
86.1203 -@@ -2815,7 +2928,7 @@
86.1204 - char *p = (char *) alloca(1);
86.1205 - ; return 0; }
86.1206 - EOF
86.1207 --if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1208 -+if { (eval echo configure:2932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1209 - rm -rf conftest*
86.1210 - ac_cv_func_alloca_works=yes
86.1211 - else
86.1212 -@@ -2847,12 +2960,12 @@
86.1213 -
86.1214 -
86.1215 - echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
86.1216 --echo "configure:2851: checking whether alloca needs Cray hooks" >&5
86.1217 -+echo "configure:2964: checking whether alloca needs Cray hooks" >&5
86.1218 - if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
86.1219 - echo $ac_n "(cached) $ac_c" 1>&6
86.1220 - else
86.1221 - cat > conftest.$ac_ext <<EOF
86.1222 --#line 2856 "configure"
86.1223 -+#line 2969 "configure"
86.1224 - #include "confdefs.h"
86.1225 - #if defined(CRAY) && ! defined(CRAY2)
86.1226 - webecray
86.1227 -@@ -2877,12 +2990,12 @@
86.1228 - if test $ac_cv_os_cray = yes; then
86.1229 - for ac_func in _getb67 GETB67 getb67; do
86.1230 - echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
86.1231 --echo "configure:2881: checking for $ac_func" >&5
86.1232 -+echo "configure:2994: checking for $ac_func" >&5
86.1233 - if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
86.1234 - echo $ac_n "(cached) $ac_c" 1>&6
86.1235 - else
86.1236 - cat > conftest.$ac_ext <<EOF
86.1237 --#line 2886 "configure"
86.1238 -+#line 2999 "configure"
86.1239 - #include "confdefs.h"
86.1240 - /* System header to define __stub macros and hopefully few prototypes,
86.1241 - which can conflict with char $ac_func(); below. */
86.1242 -@@ -2905,7 +3018,7 @@
86.1243 -
86.1244 - ; return 0; }
86.1245 - EOF
86.1246 --if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1247 -+if { (eval echo configure:3022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1248 - rm -rf conftest*
86.1249 - eval "ac_cv_func_$ac_func=yes"
86.1250 - else
86.1251 -@@ -2932,7 +3045,7 @@
86.1252 - fi
86.1253 -
86.1254 - echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
86.1255 --echo "configure:2936: checking stack direction for C alloca" >&5
86.1256 -+echo "configure:3049: checking stack direction for C alloca" >&5
86.1257 - if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
86.1258 - echo $ac_n "(cached) $ac_c" 1>&6
86.1259 - else
86.1260 -@@ -2940,7 +3053,7 @@
86.1261 - ac_cv_c_stack_direction=0
86.1262 - else
86.1263 - cat > conftest.$ac_ext <<EOF
86.1264 --#line 2944 "configure"
86.1265 -+#line 3057 "configure"
86.1266 - #include "confdefs.h"
86.1267 - find_stack_direction ()
86.1268 - {
86.1269 -@@ -2959,7 +3072,7 @@
86.1270 - exit (find_stack_direction() < 0);
86.1271 - }
86.1272 - EOF
86.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
86.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
86.1275 - then
86.1276 - ac_cv_c_stack_direction=1
86.1277 - else
86.1278 -@@ -2982,13 +3095,13 @@
86.1279 -
86.1280 -
86.1281 - echo $ac_n "checking size of short""... $ac_c" 1>&6
86.1282 --echo "configure:2986: checking size of short" >&5
86.1283 -+echo "configure:3099: checking size of short" >&5
86.1284 - if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
86.1285 - echo $ac_n "(cached) $ac_c" 1>&6
86.1286 - else
86.1287 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1288 - cat > conftest.$ac_ext <<EOF
86.1289 --#line 2992 "configure"
86.1290 -+#line 3105 "configure"
86.1291 - #include "confdefs.h"
86.1292 - #include "confdefs.h"
86.1293 - #include <sys/types.h>
86.1294 -@@ -2998,7 +3111,7 @@
86.1295 - switch (0) case 0: case (sizeof (short) == $ac_size):;
86.1296 - ; return 0; }
86.1297 - EOF
86.1298 --if { (eval echo configure:3002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1299 -+if { (eval echo configure:3115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1300 - rm -rf conftest*
86.1301 - ac_cv_sizeof_short=$ac_size
86.1302 - else
86.1303 -@@ -3021,13 +3134,13 @@
86.1304 -
86.1305 -
86.1306 - echo $ac_n "checking size of int""... $ac_c" 1>&6
86.1307 --echo "configure:3025: checking size of int" >&5
86.1308 -+echo "configure:3138: checking size of int" >&5
86.1309 - if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
86.1310 - echo $ac_n "(cached) $ac_c" 1>&6
86.1311 - else
86.1312 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1313 - cat > conftest.$ac_ext <<EOF
86.1314 --#line 3031 "configure"
86.1315 -+#line 3144 "configure"
86.1316 - #include "confdefs.h"
86.1317 - #include "confdefs.h"
86.1318 - #include <sys/types.h>
86.1319 -@@ -3037,7 +3150,7 @@
86.1320 - switch (0) case 0: case (sizeof (int) == $ac_size):;
86.1321 - ; return 0; }
86.1322 - EOF
86.1323 --if { (eval echo configure:3041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1324 -+if { (eval echo configure:3154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1325 - rm -rf conftest*
86.1326 - ac_cv_sizeof_int=$ac_size
86.1327 - else
86.1328 -@@ -3060,13 +3173,13 @@
86.1329 -
86.1330 -
86.1331 - echo $ac_n "checking size of long""... $ac_c" 1>&6
86.1332 --echo "configure:3064: checking size of long" >&5
86.1333 -+echo "configure:3177: checking size of long" >&5
86.1334 - if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
86.1335 - echo $ac_n "(cached) $ac_c" 1>&6
86.1336 - else
86.1337 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1338 - cat > conftest.$ac_ext <<EOF
86.1339 --#line 3070 "configure"
86.1340 -+#line 3183 "configure"
86.1341 - #include "confdefs.h"
86.1342 - #include "confdefs.h"
86.1343 - #include <sys/types.h>
86.1344 -@@ -3076,7 +3189,7 @@
86.1345 - switch (0) case 0: case (sizeof (long) == $ac_size):;
86.1346 - ; return 0; }
86.1347 - EOF
86.1348 --if { (eval echo configure:3080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1349 -+if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1350 - rm -rf conftest*
86.1351 - ac_cv_sizeof_long=$ac_size
86.1352 - else
86.1353 -@@ -3099,13 +3212,13 @@
86.1354 -
86.1355 -
86.1356 - echo $ac_n "checking size of long long""... $ac_c" 1>&6
86.1357 --echo "configure:3103: checking size of long long" >&5
86.1358 -+echo "configure:3216: checking size of long long" >&5
86.1359 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
86.1360 - echo $ac_n "(cached) $ac_c" 1>&6
86.1361 - else
86.1362 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1363 - cat > conftest.$ac_ext <<EOF
86.1364 --#line 3109 "configure"
86.1365 -+#line 3222 "configure"
86.1366 - #include "confdefs.h"
86.1367 - #include "confdefs.h"
86.1368 - #include <sys/types.h>
86.1369 -@@ -3115,7 +3228,7 @@
86.1370 - switch (0) case 0: case (sizeof (long long) == $ac_size):;
86.1371 - ; return 0; }
86.1372 - EOF
86.1373 --if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1374 -+if { (eval echo configure:3232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1375 - rm -rf conftest*
86.1376 - ac_cv_sizeof_long_long=$ac_size
86.1377 - else
86.1378 -@@ -3138,13 +3251,13 @@
86.1379 -
86.1380 -
86.1381 - echo $ac_n "checking size of float""... $ac_c" 1>&6
86.1382 --echo "configure:3142: checking size of float" >&5
86.1383 -+echo "configure:3255: checking size of float" >&5
86.1384 - if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
86.1385 - echo $ac_n "(cached) $ac_c" 1>&6
86.1386 - else
86.1387 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1388 - cat > conftest.$ac_ext <<EOF
86.1389 --#line 3148 "configure"
86.1390 -+#line 3261 "configure"
86.1391 - #include "confdefs.h"
86.1392 - #include "confdefs.h"
86.1393 - #include <sys/types.h>
86.1394 -@@ -3154,7 +3267,7 @@
86.1395 - switch (0) case 0: case (sizeof (float) == $ac_size):;
86.1396 - ; return 0; }
86.1397 - EOF
86.1398 --if { (eval echo configure:3158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1399 -+if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1400 - rm -rf conftest*
86.1401 - ac_cv_sizeof_float=$ac_size
86.1402 - else
86.1403 -@@ -3177,13 +3290,13 @@
86.1404 -
86.1405 -
86.1406 - echo $ac_n "checking size of double""... $ac_c" 1>&6
86.1407 --echo "configure:3181: checking size of double" >&5
86.1408 -+echo "configure:3294: checking size of double" >&5
86.1409 - if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
86.1410 - echo $ac_n "(cached) $ac_c" 1>&6
86.1411 - else
86.1412 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1413 - cat > conftest.$ac_ext <<EOF
86.1414 --#line 3187 "configure"
86.1415 -+#line 3300 "configure"
86.1416 - #include "confdefs.h"
86.1417 - #include "confdefs.h"
86.1418 - #include <sys/types.h>
86.1419 -@@ -3193,7 +3306,7 @@
86.1420 - switch (0) case 0: case (sizeof (double) == $ac_size):;
86.1421 - ; return 0; }
86.1422 - EOF
86.1423 --if { (eval echo configure:3197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1424 -+if { (eval echo configure:3310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1425 - rm -rf conftest*
86.1426 - ac_cv_sizeof_double=$ac_size
86.1427 - else
86.1428 -@@ -3216,13 +3329,13 @@
86.1429 -
86.1430 -
86.1431 - echo $ac_n "checking size of long double""... $ac_c" 1>&6
86.1432 --echo "configure:3220: checking size of long double" >&5
86.1433 -+echo "configure:3333: checking size of long double" >&5
86.1434 - if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then
86.1435 - echo $ac_n "(cached) $ac_c" 1>&6
86.1436 - else
86.1437 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1438 - cat > conftest.$ac_ext <<EOF
86.1439 --#line 3226 "configure"
86.1440 -+#line 3339 "configure"
86.1441 - #include "confdefs.h"
86.1442 - #include "confdefs.h"
86.1443 - #include <sys/types.h>
86.1444 -@@ -3232,7 +3345,7 @@
86.1445 - switch (0) case 0: case (sizeof (long double) == $ac_size):;
86.1446 - ; return 0; }
86.1447 - EOF
86.1448 --if { (eval echo configure:3236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1449 -+if { (eval echo configure:3349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1450 - rm -rf conftest*
86.1451 - ac_cv_sizeof_long_double=$ac_size
86.1452 - else
86.1453 -@@ -3256,13 +3369,13 @@
86.1454 -
86.1455 -
86.1456 - echo $ac_n "checking size of void *""... $ac_c" 1>&6
86.1457 --echo "configure:3260: checking size of void *" >&5
86.1458 -+echo "configure:3373: checking size of void *" >&5
86.1459 - if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
86.1460 - echo $ac_n "(cached) $ac_c" 1>&6
86.1461 - else
86.1462 - for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence.
86.1463 - cat > conftest.$ac_ext <<EOF
86.1464 --#line 3266 "configure"
86.1465 -+#line 3379 "configure"
86.1466 - #include "confdefs.h"
86.1467 - #include "confdefs.h"
86.1468 - #include <sys/types.h>
86.1469 -@@ -3272,7 +3385,7 @@
86.1470 - switch (0) case 0: case (sizeof (void *) == $ac_size):;
86.1471 - ; return 0; }
86.1472 - EOF
86.1473 --if { (eval echo configure:3276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1474 -+if { (eval echo configure:3389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1475 - rm -rf conftest*
86.1476 - ac_cv_sizeof_void_p=$ac_size
86.1477 - else
86.1478 -@@ -3295,14 +3408,14 @@
86.1479 -
86.1480 -
86.1481 - echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
86.1482 --echo "configure:3299: checking whether byte ordering is bigendian" >&5
86.1483 -+echo "configure:3412: checking whether byte ordering is bigendian" >&5
86.1484 - if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
86.1485 - echo $ac_n "(cached) $ac_c" 1>&6
86.1486 - else
86.1487 - ac_cv_c_bigendian=unknown
86.1488 - # See if sys/param.h defines the BYTE_ORDER macro.
86.1489 - cat > conftest.$ac_ext <<EOF
86.1490 --#line 3306 "configure"
86.1491 -+#line 3419 "configure"
86.1492 - #include "confdefs.h"
86.1493 - #include <sys/types.h>
86.1494 - #include <sys/param.h>
86.1495 -@@ -3313,11 +3426,11 @@
86.1496 - #endif
86.1497 - ; return 0; }
86.1498 - EOF
86.1499 --if { (eval echo configure:3317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1500 -+if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1501 - rm -rf conftest*
86.1502 - # It does; now see whether it defined to BIG_ENDIAN or not.
86.1503 - cat > conftest.$ac_ext <<EOF
86.1504 --#line 3321 "configure"
86.1505 -+#line 3434 "configure"
86.1506 - #include "confdefs.h"
86.1507 - #include <sys/types.h>
86.1508 - #include <sys/param.h>
86.1509 -@@ -3328,7 +3441,7 @@
86.1510 - #endif
86.1511 - ; return 0; }
86.1512 - EOF
86.1513 --if { (eval echo configure:3332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1514 -+if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
86.1515 - rm -rf conftest*
86.1516 - ac_cv_c_bigendian=yes
86.1517 - else
86.1518 -@@ -3348,7 +3461,7 @@
86.1519 - echo $ac_n "cross-compiling... " 2>&6
86.1520 - else
86.1521 - cat > conftest.$ac_ext <<EOF
86.1522 --#line 3352 "configure"
86.1523 -+#line 3465 "configure"
86.1524 - #include "confdefs.h"
86.1525 - main () {
86.1526 - /* Are we little or big endian? From Harbison&Steele. */
86.1527 -@@ -3361,7 +3474,7 @@
86.1528 - exit (u.c[sizeof (long) - 1] == 1);
86.1529 - }
86.1530 - EOF
86.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
86.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
86.1533 - then
86.1534 - ac_cv_c_bigendian=no
86.1535 - else
86.1536 -@@ -3379,7 +3492,7 @@
86.1537 - echo "$ac_t""$ac_cv_c_bigendian" 1>&6
86.1538 - if test $ac_cv_c_bigendian = unknown; then
86.1539 - echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6
86.1540 --echo "configure:3383: checking to probe for byte ordering" >&5
86.1541 -+echo "configure:3496: checking to probe for byte ordering" >&5
86.1542 -
86.1543 - cat >conftest.c <<EOF
86.1544 - short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
86.1545 -@@ -3414,6 +3527,10 @@
86.1546 - #define WORDS_BIGENDIAN 1
86.1547 - EOF
86.1548 -
86.1549 -+ cat >> confdefs.h <<\EOF
86.1550 -+#define HOST_WORDS_BIG_ENDIAN 1
86.1551 -+EOF
86.1552 -+
86.1553 - BYTEORDER=4321
86.1554 - else
86.1555 - BYTEORDER=1234
86.1556 -@@ -3429,7 +3546,7 @@
86.1557 -
86.1558 - if test x$TARGET = xSPARC; then
86.1559 - echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6
86.1560 --echo "configure:3433: checking assembler and linker support unaligned pc related relocs" >&5
86.1561 -+echo "configure:3550: checking assembler and linker support unaligned pc related relocs" >&5
86.1562 - if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then
86.1563 - echo $ac_n "(cached) $ac_c" 1>&6
86.1564 - else
86.1565 -@@ -3439,14 +3556,14 @@
86.1566 - CFLAGS="$CFLAGS -fpic"
86.1567 - LDFLAGS="$LDFLAGS -shared"
86.1568 - cat > conftest.$ac_ext <<EOF
86.1569 --#line 3443 "configure"
86.1570 -+#line 3560 "configure"
86.1571 - #include "confdefs.h"
86.1572 - asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text");
86.1573 - int main() {
86.1574 -
86.1575 - ; return 0; }
86.1576 - EOF
86.1577 --if { (eval echo configure:3450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1578 -+if { (eval echo configure:3567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
86.1579 - rm -rf conftest*
86.1580 - libffi_cv_as_sparc_ua_pcrel=yes
86.1581 - else
86.1582 -@@ -3709,6 +3826,8 @@
86.1583 - s%@MIPS_GCC_FALSE@%$MIPS_GCC_FALSE%g
86.1584 - s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g
86.1585 - s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g
86.1586 -+s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g
86.1587 -+s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g
86.1588 - s%@SPARC_TRUE@%$SPARC_TRUE%g
86.1589 - s%@SPARC_FALSE@%$SPARC_FALSE%g
86.1590 - s%@X86_TRUE@%$X86_TRUE%g
86.1591 -@@ -3729,6 +3848,12 @@
86.1592 - s%@POWERPC_DARWIN_FALSE@%$POWERPC_DARWIN_FALSE%g
86.1593 - s%@ARM_TRUE@%$ARM_TRUE%g
86.1594 - s%@ARM_FALSE@%$ARM_FALSE%g
86.1595 -+s%@S390_TRUE@%$S390_TRUE%g
86.1596 -+s%@S390_FALSE@%$S390_FALSE%g
86.1597 -+s%@X86_64_TRUE@%$X86_64_TRUE%g
86.1598 -+s%@X86_64_FALSE@%$X86_64_FALSE%g
86.1599 -+s%@SH_TRUE@%$SH_TRUE%g
86.1600 -+s%@SH_FALSE@%$SH_FALSE%g
86.1601 - s%@CPP@%$CPP%g
86.1602 - s%@ALLOCA@%$ALLOCA%g
86.1603 - s%@TARGET@%$TARGET%g
86.1604 -@@ -3969,7 +4094,7 @@
86.1605 -
86.1606 - if test -n "$CONFIG_FILES"; then
86.1607 - LD="${ORIGINAL_LD_FOR_MULTILIBS}"
86.1608 -- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
86.1609 -+ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
86.1610 - fi
86.1611 -
86.1612 - exit 0
86.1613 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/configure.in gcc/libffi/configure.in
86.1614 ---- gcc-3.2.2.orig/libffi/configure.in Tue Jan 28 10:43:56 2003
86.1615 -+++ gcc/libffi/configure.in Sat Feb 1 20:16:19 2003
86.1616 -@@ -22,14 +22,15 @@
86.1617 -
86.1618 - if test "${srcdir}" = "."; then
86.1619 - if test "${with_target_subdir}" != "."; then
86.1620 -- libffi_basedir="${srcdir}/${with_multisrctop}.."
86.1621 -+ libffi_basedir="${with_multisrctop}../"
86.1622 - else
86.1623 -- libffi_basedir="${srcdir}/${with_multisrctop}"
86.1624 -+ libffi_basedir="${with_multisrctop}"
86.1625 - fi
86.1626 - else
86.1627 -- libffi_basedir="${srcdir}"
86.1628 -+ libffi_basedir=
86.1629 - fi
86.1630 - AC_SUBST(libffi_basedir)
86.1631 -+AC_CONFIG_AUX_DIR(${libffi_basedir}..)
86.1632 -
86.1633 - AC_CANONICAL_HOST
86.1634 -
86.1635 -@@ -56,17 +57,23 @@
86.1636 - i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;;
86.1637 - sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;;
86.1638 - sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;;
86.1639 --sparc-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
86.1640 --sparc64-*-linux*) TARGET=SPARC; TARGETDIR=sparc;;
86.1641 --alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd*) TARGET=ALPHA; TARGETDIR=alpha;;
86.1642 -+sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;;
86.1643 -+sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;;
86.1644 -+alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;;
86.1645 - ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;;
86.1646 - m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;;
86.1647 -+mips64*-*);;
86.1648 -+mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;;
86.1649 - powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;;
86.1650 - powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;;
86.1651 - powerpc-*-darwin*) TARGET=POWERPC_DARWIN; TARGETDIR=powerpc;;
86.1652 - powerpc-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
86.1653 - rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;;
86.1654 - arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;;
86.1655 -+s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
86.1656 -+s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
86.1657 -+x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;;
86.1658 -+sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
86.1659 - esac
86.1660 -
86.1661 - if test $TARGETDIR = unknown; then
86.1662 -@@ -75,6 +82,7 @@
86.1663 -
86.1664 - AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes)
86.1665 - AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno)
86.1666 -+AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX)
86.1667 - AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
86.1668 - AM_CONDITIONAL(X86, test x$TARGET = xX86)
86.1669 - AM_CONDITIONAL(X86_WIN32, test x$TARGET = xX86_WIN32)
86.1670 -@@ -85,6 +93,13 @@
86.1671 - AM_CONDITIONAL(POWERPC_AIX, test x$TARGET = xPOWERPC_AIX)
86.1672 - AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN)
86.1673 - AM_CONDITIONAL(ARM, test x$TARGET = xARM)
86.1674 -+AM_CONDITIONAL(S390, test x$TARGET = xS390)
86.1675 -+AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64)
86.1676 -+AM_CONDITIONAL(SH, test x$TARGET = xSH)
86.1677 -+
86.1678 -+if test x$TARGET = xMIPS_LINUX; then
86.1679 -+ TARGET=MIPS
86.1680 -+fi
86.1681 -
86.1682 - AC_HEADER_STDC
86.1683 - AC_CHECK_FUNCS(memcpy)
86.1684 -@@ -171,7 +186,7 @@
86.1685 - [
86.1686 - if test -n "$CONFIG_FILES"; then
86.1687 - LD="${ORIGINAL_LD_FOR_MULTILIBS}"
86.1688 -- ac_file=Makefile . ${libffi_basedir}/../config-ml.in
86.1689 -+ ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in
86.1690 - fi
86.1691 - ],
86.1692 - srcdir=${srcdir}
86.1693 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/Makefile.in gcc/libffi/include/Makefile.in
86.1694 ---- gcc-3.2.2.orig/libffi/include/Makefile.in Tue Oct 9 14:32:16 2001
86.1695 -+++ gcc/libffi/include/Makefile.in Mon Apr 29 13:14:44 2002
86.1696 -@@ -99,7 +99,7 @@
86.1697 -
86.1698 - DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
86.1699 -
86.1700 --TAR = gnutar
86.1701 -+TAR = gtar
86.1702 - GZIP_ENV = --best
86.1703 - all: all-redirect
86.1704 - .SUFFIXES:
86.1705 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/include/ffi.h.in gcc/libffi/include/ffi.h.in
86.1706 ---- gcc-3.2.2.orig/libffi/include/ffi.h.in Wed Mar 13 07:35:56 2002
86.1707 -+++ gcc/libffi/include/ffi.h.in Wed Jan 29 00:54:28 2003
86.1708 -@@ -1,5 +1,5 @@
86.1709 - /* -----------------------------------------------------------------*-C-*-
86.1710 -- libffi @VERSION@ - Copyright (c) 1996-2002 Cygnus Solutions
86.1711 -+ libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions
86.1712 -
86.1713 - Permission is hereby granted, free of charge, to any person obtaining
86.1714 - a copy of this software and associated documentation files (the
86.1715 -@@ -164,6 +164,12 @@
86.1716 - #endif
86.1717 - #endif
86.1718 -
86.1719 -+#ifdef S390
86.1720 -+#if defined (__s390x__)
86.1721 -+#define S390X
86.1722 -+#endif
86.1723 -+#endif
86.1724 -+
86.1725 - #ifndef LIBFFI_ASM
86.1726 -
86.1727 - /* ---- Generic type definitions ----------------------------------------- */
86.1728 -@@ -189,16 +195,23 @@
86.1729 - #endif
86.1730 - #endif
86.1731 -
86.1732 -- /* ---- Intel x86 ---------------- */
86.1733 --#ifdef X86
86.1734 -+ /* ---- Intel x86 Win32 ---------- */
86.1735 -+#ifdef X86_WIN32
86.1736 - FFI_SYSV,
86.1737 -+ FFI_STDCALL,
86.1738 -+ /* TODO: Add fastcall support for the sake of completeness */
86.1739 - FFI_DEFAULT_ABI = FFI_SYSV,
86.1740 - #endif
86.1741 -
86.1742 -- /* ---- Intel x86 Win32 ---------- */
86.1743 --#ifdef X86_WIN32
86.1744 -+ /* ---- Intel x86 and AMD x86-64 - */
86.1745 -+#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__))
86.1746 - FFI_SYSV,
86.1747 -+ FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */
86.1748 -+#ifdef __i386__
86.1749 - FFI_DEFAULT_ABI = FFI_SYSV,
86.1750 -+#else
86.1751 -+ FFI_DEFAULT_ABI = FFI_UNIX64,
86.1752 -+#endif
86.1753 - #endif
86.1754 -
86.1755 - /* ---- Intel ia64 ---------------- */
86.1756 -@@ -251,6 +264,18 @@
86.1757 - FFI_DEFAULT_ABI = FFI_SYSV,
86.1758 - #endif
86.1759 -
86.1760 -+ /* ---- S390 --------------------- */
86.1761 -+#ifdef S390
86.1762 -+ FFI_SYSV,
86.1763 -+ FFI_DEFAULT_ABI = FFI_SYSV,
86.1764 -+#endif
86.1765 -+
86.1766 -+ /* ---- SuperH ------------------- */
86.1767 -+#ifdef SH
86.1768 -+ FFI_SYSV,
86.1769 -+ FFI_DEFAULT_ABI = FFI_SYSV,
86.1770 -+#endif
86.1771 -+
86.1772 - /* Leave this for debugging purposes */
86.1773 - FFI_LAST_ABI
86.1774 -
86.1775 -@@ -264,7 +289,7 @@
86.1776 - /*@null@*/ struct _ffi_type **elements;
86.1777 - } ffi_type;
86.1778 -
86.1779 --/* These are defined in ffi.c */
86.1780 -+/* These are defined in types.c */
86.1781 - extern ffi_type ffi_type_void;
86.1782 - extern ffi_type ffi_type_uint8;
86.1783 - extern ffi_type ffi_type_sint8;
86.1784 -@@ -373,13 +398,7 @@
86.1785 -
86.1786 - /* ---- Definitions for closures ----------------------------------------- */
86.1787 -
86.1788 --#ifdef X86
86.1789 --
86.1790 --#define FFI_CLOSURES 1 /* x86 supports closures */
86.1791 --#define FFI_TRAMPOLINE_SIZE 10
86.1792 --#define FFI_NATIVE_RAW_API 1 /* and has native raw api support */
86.1793 --
86.1794 --#elif defined(X86_WIN32)
86.1795 -+#ifdef __i386__
86.1796 -
86.1797 - #define FFI_CLOSURES 1 /* x86 supports closures */
86.1798 - #define FFI_TRAMPOLINE_SIZE 10
86.1799 -@@ -424,6 +443,40 @@
86.1800 - #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */
86.1801 - #define FFI_NATIVE_RAW_API 0
86.1802 -
86.1803 -+#elif defined(SPARC64)
86.1804 -+
86.1805 -+#define FFI_CLOSURES 1
86.1806 -+#define FFI_TRAMPOLINE_SIZE 24
86.1807 -+#define FFI_NATIVE_RAW_API 0
86.1808 -+
86.1809 -+#elif defined(SPARC)
86.1810 -+
86.1811 -+#define FFI_CLOSURES 1
86.1812 -+#define FFI_TRAMPOLINE_SIZE 16
86.1813 -+#define FFI_NATIVE_RAW_API 0
86.1814 -+
86.1815 -+#elif defined(S390)
86.1816 -+
86.1817 -+#define FFI_CLOSURES 1
86.1818 -+#ifdef S390X
86.1819 -+#define FFI_TRAMPOLINE_SIZE 32
86.1820 -+#else
86.1821 -+#define FFI_TRAMPOLINE_SIZE 16
86.1822 -+#endif
86.1823 -+#define FFI_NATIVE_RAW_API 0
86.1824 -+
86.1825 -+#elif defined(SH)
86.1826 -+
86.1827 -+#define FFI_CLOSURES 1
86.1828 -+#define FFI_TRAMPOLINE_SIZE 16
86.1829 -+#define FFI_NATIVE_RAW_API 0
86.1830 -+
86.1831 -+#elif defined(__x86_64__)
86.1832 -+
86.1833 -+#define FFI_CLOSURES 1
86.1834 -+#define FFI_TRAMPOLINE_SIZE 24
86.1835 -+#define FFI_NATIVE_RAW_API 0
86.1836 -+
86.1837 - #else
86.1838 -
86.1839 - #define FFI_CLOSURES 0
86.1840 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/ffi.c gcc/libffi/src/arm/ffi.c
86.1841 ---- gcc-3.2.2.orig/libffi/src/arm/ffi.c Sat Mar 3 07:21:23 2001
86.1842 -+++ gcc/libffi/src/arm/ffi.c Fri Jul 19 08:08:30 2002
86.1843 -@@ -36,13 +36,10 @@
86.1844 - /*@=exportheader@*/
86.1845 - {
86.1846 - register unsigned int i;
86.1847 -- register int tmp;
86.1848 -- register unsigned int avn;
86.1849 - register void **p_argv;
86.1850 - register char *argp;
86.1851 - register ffi_type **p_arg;
86.1852 -
86.1853 -- tmp = 0;
86.1854 - argp = stack;
86.1855 -
86.1856 - if ( ecif->cif->rtype->type == FFI_TYPE_STRUCT ) {
86.1857 -@@ -50,11 +47,10 @@
86.1858 - argp += 4;
86.1859 - }
86.1860 -
86.1861 -- avn = ecif->cif->nargs;
86.1862 - p_argv = ecif->avalue;
86.1863 -
86.1864 - for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
86.1865 -- (i != 0) && (avn != 0);
86.1866 -+ (i != 0);
86.1867 - i--, p_arg++)
86.1868 - {
86.1869 - size_t z;
86.1870 -@@ -64,9 +60,6 @@
86.1871 - argp = (char *) ALIGN(argp, (*p_arg)->alignment);
86.1872 - }
86.1873 -
86.1874 -- if (avn != 0)
86.1875 -- {
86.1876 -- avn--;
86.1877 - z = (*p_arg)->size;
86.1878 - if (z < sizeof(int))
86.1879 - {
86.1880 -@@ -107,7 +100,6 @@
86.1881 - }
86.1882 - p_argv++;
86.1883 - argp += z;
86.1884 -- }
86.1885 - }
86.1886 -
86.1887 - return;
86.1888 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/arm/sysv.S gcc/libffi/src/arm/sysv.S
86.1889 ---- gcc-3.2.2.orig/libffi/src/arm/sysv.S Sat Mar 3 07:21:23 2001
86.1890 -+++ gcc/libffi/src/arm/sysv.S Mon Sep 30 03:08:58 2002
86.1891 -@@ -28,8 +28,15 @@
86.1892 - #ifdef HAVE_MACHINE_ASM_H
86.1893 - #include <machine/asm.h>
86.1894 - #else
86.1895 --/* XXX these lose for some platforms, I'm sure. */
86.1896 -+#ifdef __USER_LABEL_PREFIX__
86.1897 -+#define CONCAT1(a, b) CONCAT2(a, b)
86.1898 -+#define CONCAT2(a, b) a ## b
86.1899 -+
86.1900 -+/* Use the right prefix for global labels. */
86.1901 -+#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
86.1902 -+#else
86.1903 - #define CNAME(x) x
86.1904 -+#endif
86.1905 - #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
86.1906 - #endif
86.1907 -
86.1908 -@@ -96,12 +103,20 @@
86.1909 -
86.1910 - # return FLOAT
86.1911 - cmp a4, #FFI_TYPE_FLOAT
86.1912 -+#ifdef __SOFTFP__
86.1913 -+ streq a1, [a3]
86.1914 -+#else
86.1915 - stfeqs f0, [a3]
86.1916 -+#endif
86.1917 - beq epilogue
86.1918 -
86.1919 - # return DOUBLE or LONGDOUBLE
86.1920 - cmp a4, #FFI_TYPE_DOUBLE
86.1921 -+#ifdef __SOFTFP__
86.1922 -+ stmeqia a3, {a1, a2}
86.1923 -+#else
86.1924 - stfeqd f0, [a3]
86.1925 -+#endif
86.1926 -
86.1927 - epilogue:
86.1928 - ldmfd sp!, {a1-a4, fp, pc}
86.1929 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/java_raw_api.c gcc/libffi/src/java_raw_api.c
86.1930 ---- gcc-3.2.2.orig/libffi/src/java_raw_api.c Tue Apr 9 07:31:14 2002
86.1931 -+++ gcc/libffi/src/java_raw_api.c Tue Oct 8 23:55:02 2002
86.1932 -@@ -81,21 +81,14 @@
86.1933 - {
86.1934 - case FFI_TYPE_UINT8:
86.1935 - case FFI_TYPE_SINT8:
86.1936 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);
86.1937 -+ *args = (void*) ((char*)(raw++) + 3);
86.1938 - break;
86.1939 -
86.1940 - case FFI_TYPE_UINT16:
86.1941 - case FFI_TYPE_SINT16:
86.1942 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2);
86.1943 -+ *args = (void*) ((char*)(raw++) + 2);
86.1944 - break;
86.1945 -
86.1946 --#if SIZEOF_ARG >= 4
86.1947 -- case FFI_TYPE_UINT32:
86.1948 -- case FFI_TYPE_SINT32:
86.1949 -- *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4);
86.1950 -- break;
86.1951 --#endif
86.1952 --
86.1953 - #if SIZEOF_ARG == 8
86.1954 - case FFI_TYPE_UINT64:
86.1955 - case FFI_TYPE_SINT64:
86.1956 -@@ -157,31 +150,54 @@
86.1957 - switch ((*tp)->type)
86.1958 - {
86.1959 - case FFI_TYPE_UINT8:
86.1960 -+#if WORDS_BIGENDIAN
86.1961 -+ *(UINT32*)(raw++) = *(UINT8*) (*args);
86.1962 -+#else
86.1963 - (raw++)->uint = *(UINT8*) (*args);
86.1964 -+#endif
86.1965 - break;
86.1966 -
86.1967 - case FFI_TYPE_SINT8:
86.1968 -+#if WORDS_BIGENDIAN
86.1969 -+ *(SINT32*)(raw++) = *(SINT8*) (*args);
86.1970 -+#else
86.1971 - (raw++)->sint = *(SINT8*) (*args);
86.1972 -+#endif
86.1973 - break;
86.1974 -
86.1975 - case FFI_TYPE_UINT16:
86.1976 -+#if WORDS_BIGENDIAN
86.1977 -+ *(UINT32*)(raw++) = *(UINT16*) (*args);
86.1978 -+#else
86.1979 - (raw++)->uint = *(UINT16*) (*args);
86.1980 -+#endif
86.1981 - break;
86.1982 -
86.1983 - case FFI_TYPE_SINT16:
86.1984 -+#if WORDS_BIGENDIAN
86.1985 -+ *(SINT32*)(raw++) = *(SINT16*) (*args);
86.1986 -+#else
86.1987 - (raw++)->sint = *(SINT16*) (*args);
86.1988 -+#endif
86.1989 - break;
86.1990 -
86.1991 --#if SIZEOF_ARG >= 4
86.1992 - case FFI_TYPE_UINT32:
86.1993 -+#if WORDS_BIGENDIAN
86.1994 -+ *(UINT32*)(raw++) = *(UINT32*) (*args);
86.1995 -+#else
86.1996 - (raw++)->uint = *(UINT32*) (*args);
86.1997 -+#endif
86.1998 - break;
86.1999 -
86.2000 - case FFI_TYPE_SINT32:
86.2001 -+#if WORDS_BIGENDIAN
86.2002 -+ *(SINT32*)(raw++) = *(SINT32*) (*args);
86.2003 -+#else
86.2004 - (raw++)->sint = *(SINT32*) (*args);
86.2005 -- break;
86.2006 - #endif
86.2007 -- case FFI_TYPE_FLOAT:
86.2008 -+ break;
86.2009 -+
86.2010 -+ case FFI_TYPE_FLOAT:
86.2011 - (raw++)->flt = *(FLOAT32*) (*args);
86.2012 - break;
86.2013 -
86.2014 -@@ -211,6 +227,55 @@
86.2015 -
86.2016 - #if !FFI_NATIVE_RAW_API
86.2017 -
86.2018 -+static void
86.2019 -+ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue)
86.2020 -+{
86.2021 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
86.2022 -+ switch (cif->rtype->type)
86.2023 -+ {
86.2024 -+ case FFI_TYPE_UINT8:
86.2025 -+ case FFI_TYPE_UINT16:
86.2026 -+ case FFI_TYPE_UINT32:
86.2027 -+ *(UINT64 *)rvalue <<= 32;
86.2028 -+ break;
86.2029 -+
86.2030 -+ case FFI_TYPE_SINT8:
86.2031 -+ case FFI_TYPE_SINT16:
86.2032 -+ case FFI_TYPE_SINT32:
86.2033 -+ case FFI_TYPE_INT:
86.2034 -+ *(SINT64 *)rvalue <<= 32;
86.2035 -+ break;
86.2036 -+
86.2037 -+ default:
86.2038 -+ break;
86.2039 -+ }
86.2040 -+#endif
86.2041 -+}
86.2042 -+
86.2043 -+static void
86.2044 -+ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue)
86.2045 -+{
86.2046 -+#if WORDS_BIGENDIAN && SIZEOF_ARG == 8
86.2047 -+ switch (cif->rtype->type)
86.2048 -+ {
86.2049 -+ case FFI_TYPE_UINT8:
86.2050 -+ case FFI_TYPE_UINT16:
86.2051 -+ case FFI_TYPE_UINT32:
86.2052 -+ *(UINT64 *)rvalue >>= 32;
86.2053 -+ break;
86.2054 -+
86.2055 -+ case FFI_TYPE_SINT8:
86.2056 -+ case FFI_TYPE_SINT16:
86.2057 -+ case FFI_TYPE_SINT32:
86.2058 -+ case FFI_TYPE_INT:
86.2059 -+ *(SINT64 *)rvalue >>= 32;
86.2060 -+ break;
86.2061 -+
86.2062 -+ default:
86.2063 -+ break;
86.2064 -+ }
86.2065 -+#endif
86.2066 -+}
86.2067 -
86.2068 - /* This is a generic definition of ffi_raw_call, to be used if the
86.2069 - * native system does not provide a machine-specific implementation.
86.2070 -@@ -227,6 +292,7 @@
86.2071 - void **avalue = (void**) alloca (cif->nargs * sizeof (void*));
86.2072 - ffi_java_raw_to_ptrarray (cif, raw, avalue);
86.2073 - ffi_call (cif, fn, rvalue, avalue);
86.2074 -+ ffi_java_rvalue_to_raw (cif, rvalue);
86.2075 - }
86.2076 -
86.2077 - #if FFI_CLOSURES /* base system provides closures */
86.2078 -@@ -240,6 +306,7 @@
86.2079 -
86.2080 - ffi_java_ptrarray_to_raw (cif, avalue, raw);
86.2081 - (*cl->fun) (cif, rvalue, raw, cl->user_data);
86.2082 -+ ffi_java_raw_to_rvalue (cif, rvalue);
86.2083 - }
86.2084 -
86.2085 - /* Again, here is the generic version of ffi_prep_raw_closure, which
86.2086 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/m68k/ffi.c gcc/libffi/src/m68k/ffi.c
86.2087 ---- gcc-3.2.2.orig/libffi/src/m68k/ffi.c Sun Aug 8 22:27:19 1999
86.2088 -+++ gcc/libffi/src/m68k/ffi.c Fri Jul 19 08:08:30 2002
86.2089 -@@ -16,14 +16,11 @@
86.2090 - ffi_prep_args (void *stack, extended_cif *ecif)
86.2091 - {
86.2092 - unsigned int i;
86.2093 -- int tmp;
86.2094 -- unsigned int avn;
86.2095 - void **p_argv;
86.2096 - char *argp;
86.2097 - ffi_type **p_arg;
86.2098 - void *struct_value_ptr;
86.2099 -
86.2100 -- tmp = 0;
86.2101 - argp = stack;
86.2102 -
86.2103 - if (ecif->cif->rtype->type == FFI_TYPE_STRUCT
86.2104 -@@ -32,11 +29,10 @@
86.2105 - else
86.2106 - struct_value_ptr = NULL;
86.2107 -
86.2108 -- avn = ecif->cif->nargs;
86.2109 - p_argv = ecif->avalue;
86.2110 -
86.2111 - for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
86.2112 -- i != 0 && avn != 0;
86.2113 -+ i != 0;
86.2114 - i--, p_arg++)
86.2115 - {
86.2116 - size_t z;
86.2117 -@@ -45,9 +41,6 @@
86.2118 - if (((*p_arg)->alignment - 1) & (unsigned) argp)
86.2119 - argp = (char *) ALIGN (argp, (*p_arg)->alignment);
86.2120 -
86.2121 -- if (avn != 0)
86.2122 -- {
86.2123 -- avn--;
86.2124 - z = (*p_arg)->size;
86.2125 - if (z < sizeof (int))
86.2126 - {
86.2127 -@@ -82,7 +75,6 @@
86.2128 - memcpy (argp, *p_argv, z);
86.2129 - p_argv++;
86.2130 - argp += z;
86.2131 -- }
86.2132 - }
86.2133 -
86.2134 - return struct_value_ptr;
86.2135 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/mips/ffi.c gcc/libffi/src/mips/ffi.c
86.2136 ---- gcc-3.2.2.orig/libffi/src/mips/ffi.c Sat Mar 3 07:21:23 2001
86.2137 -+++ gcc/libffi/src/mips/ffi.c Fri Jul 19 08:08:31 2002
86.2138 -@@ -23,6 +23,7 @@
86.2139 - OTHER DEALINGS IN THE SOFTWARE.
86.2140 - ----------------------------------------------------------------------- */
86.2141 -
86.2142 -+#include <sgidefs.h>
86.2143 - #include <ffi.h>
86.2144 - #include <ffi_common.h>
86.2145 -
86.2146 -@@ -50,7 +51,6 @@
86.2147 - int flags)
86.2148 - {
86.2149 - register int i;
86.2150 -- register int avn;
86.2151 - register void **p_argv;
86.2152 - register char *argp;
86.2153 - register ffi_type **p_arg;
86.2154 -@@ -80,12 +80,9 @@
86.2155 - FIX_ARGP;
86.2156 - }
86.2157 -
86.2158 -- avn = ecif->cif->nargs;
86.2159 - p_argv = ecif->avalue;
86.2160 -
86.2161 -- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
86.2162 -- i && avn;
86.2163 -- i--, p_arg++)
86.2164 -+ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
86.2165 - {
86.2166 - size_t z;
86.2167 -
86.2168 -@@ -101,9 +98,6 @@
86.2169 - #define OFFSET sizeof(int)
86.2170 - #endif
86.2171 -
86.2172 -- if (avn)
86.2173 -- {
86.2174 -- avn--;
86.2175 - z = (*p_arg)->size;
86.2176 - if (z < sizeof(SLOT_TYPE_UNSIGNED))
86.2177 - {
86.2178 -@@ -179,7 +173,6 @@
86.2179 - p_argv++;
86.2180 - argp += z;
86.2181 - FIX_ARGP;
86.2182 -- }
86.2183 - }
86.2184 -
86.2185 - return;
86.2186 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/powerpc/darwin.S gcc/libffi/src/powerpc/darwin.S
86.2187 ---- gcc-3.2.2.orig/libffi/src/powerpc/darwin.S Sat Jan 19 01:22:34 2002
86.2188 -+++ gcc/libffi/src/powerpc/darwin.S Thu Jan 23 03:21:55 2003
86.2189 -@@ -3,8 +3,6 @@
86.2190 -
86.2191 - PowerPC Assembly glue.
86.2192 -
86.2193 -- $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $
86.2194 --
86.2195 - Permission is hereby granted, free of charge, to any person obtaining
86.2196 - a copy of this software and associated documentation files (the
86.2197 - ``Software''), to deal in the Software without restriction, including
86.2198 -@@ -39,30 +37,34 @@
86.2199 - .text
86.2200 - .align 2
86.2201 - _ffi_call_DARWIN:
86.2202 -- mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
86.2203 -+LFB0:
86.2204 -+ mr r12,r8 /* We only need r12 until the call,
86.2205 -+ so it doesn't have to be saved... */
86.2206 -+LFB1:
86.2207 - /* Save the old stack pointer as AP. */
86.2208 - mr r8,r1
86.2209 --
86.2210 -+LCFI0:
86.2211 - /* Allocate the stack space we need. */
86.2212 - stwux r1,r1,r4
86.2213 -
86.2214 - /* Save registers we use. */
86.2215 - mflr r9
86.2216 -
86.2217 -- stw r28,-16(r8)
86.2218 -+ stw r28,-16(r8)
86.2219 - stw r29,-12(r8)
86.2220 - stw r30, -8(r8)
86.2221 - stw r31, -4(r8)
86.2222 --
86.2223 -- stw r9, 8(r8)
86.2224 -+
86.2225 -+ stw r9, 8(r8)
86.2226 - stw r2, 20(r1)
86.2227 -+LCFI1:
86.2228 -
86.2229 - /* Save arguments over call... */
86.2230 -- mr r31,r5 /* flags, */
86.2231 -- mr r30,r6 /* rvalue, */
86.2232 -- mr r29,r7 /* function address, */
86.2233 -- mr r28,r8 /* our AP. */
86.2234 --
86.2235 -+ mr r31,r5 /* flags, */
86.2236 -+ mr r30,r6 /* rvalue, */
86.2237 -+ mr r29,r7 /* function address, */
86.2238 -+ mr r28,r8 /* our AP. */
86.2239 -+LCFI2:
86.2240 - /* Call ffi_prep_args. */
86.2241 - mr r4,r1
86.2242 - li r9,0
86.2243 -@@ -145,7 +147,8 @@
86.2244 - L(float_return_value):
86.2245 - stfs f1,0(r30)
86.2246 - b L(done_return_value)
86.2247 --//END(_ffi_call_DARWIN)
86.2248 -+LFE1:
86.2249 -+/* END(_ffi_call_DARWIN) */
86.2250 -
86.2251 - /* Provide a null definition of _ffi_call_AIX. */
86.2252 - .text
86.2253 -@@ -155,5 +158,61 @@
86.2254 - .align 2
86.2255 - _ffi_call_AIX:
86.2256 - blr
86.2257 --//END(_ffi_call_AIX)
86.2258 -+/* END(_ffi_call_AIX) */
86.2259 -
86.2260 -+.data
86.2261 -+.section __TEXT,__eh_frame
86.2262 -+Lframe1:
86.2263 -+ .set L$set$0,LECIE1-LSCIE1
86.2264 -+ .long L$set$0 ; Length of Common Information Entry
86.2265 -+LSCIE1:
86.2266 -+ .long 0x0 ; CIE Identifier Tag
86.2267 -+ .byte 0x1 ; CIE Version
86.2268 -+ .ascii "zR\0" ; CIE Augmentation
86.2269 -+ .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor
86.2270 -+ .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor
86.2271 -+ .byte 0x41 ; CIE RA Column
86.2272 -+ .byte 0x1 ; uleb128 0x1; Augmentation size
86.2273 -+ .byte 0x10 ; FDE Encoding (pcrel)
86.2274 -+ .byte 0xc ; DW_CFA_def_cfa
86.2275 -+ .byte 0x1 ; uleb128 0x1
86.2276 -+ .byte 0x0 ; uleb128 0x0
86.2277 -+ .align 2
86.2278 -+LECIE1:
86.2279 -+LSFDE1:
86.2280 -+ .set L$set$1,LEFDE1-LASFDE1
86.2281 -+ .long L$set$1 ; FDE Length
86.2282 -+LASFDE1:
86.2283 -+ .set L$set$2,LASFDE1-Lframe1
86.2284 -+ .long L$set$2 ; FDE CIE offset
86.2285 -+ .long LFB0-. ; FDE initial location
86.2286 -+ .set L$set$3,LFE1-LFB0
86.2287 -+ .long L$set$3 ; FDE address range
86.2288 -+ .byte 0x0 ; uleb128 0x0; Augmentation size
86.2289 -+ .byte 0x4 ; DW_CFA_advance_loc4
86.2290 -+ .set L$set$4,LCFI0-LFB1
86.2291 -+ .long L$set$4
86.2292 -+ .byte 0xd ; DW_CFA_def_cfa_register
86.2293 -+ .byte 0x08 ; uleb128 0x08
86.2294 -+ .byte 0x4 ; DW_CFA_advance_loc4
86.2295 -+ .set L$set$5,LCFI1-LCFI0
86.2296 -+ .long L$set$5
86.2297 -+ .byte 0x11 ; DW_CFA_offset_extended_sf
86.2298 -+ .byte 0x41 ; uleb128 0x41
86.2299 -+ .byte 0x7e ; sleb128 -2
86.2300 -+ .byte 0x9f ; DW_CFA_offset, column 0x1f
86.2301 -+ .byte 0x1 ; uleb128 0x1
86.2302 -+ .byte 0x9e ; DW_CFA_offset, column 0x1e
86.2303 -+ .byte 0x2 ; uleb128 0x2
86.2304 -+ .byte 0x9d ; DW_CFA_offset, column 0x1d
86.2305 -+ .byte 0x3 ; uleb128 0x3
86.2306 -+ .byte 0x9c ; DW_CFA_offset, column 0x1c
86.2307 -+ .byte 0x4 ; uleb128 0x4
86.2308 -+ .byte 0x4 ; DW_CFA_advance_loc4
86.2309 -+ .set L$set$6,LCFI2-LCFI1
86.2310 -+ .long L$set$6
86.2311 -+ .byte 0xd ; DW_CFA_def_cfa_register
86.2312 -+ .byte 0x1c ; uleb128 0x1c
86.2313 -+ .align 2
86.2314 -+LEFDE1:
86.2315 -+
86.2316 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/prep_cif.c gcc/libffi/src/prep_cif.c
86.2317 ---- gcc-3.2.2.orig/libffi/src/prep_cif.c Sat Mar 3 07:21:22 2001
86.2318 -+++ gcc/libffi/src/prep_cif.c Mon Sep 30 20:59:42 2002
86.2319 -@@ -103,7 +103,8 @@
86.2320 - /* Perform a sanity check on the return type */
86.2321 - FFI_ASSERT(ffi_type_test(cif->rtype));
86.2322 -
86.2323 --#ifndef M68K
86.2324 -+ /* x86-64 and s390 stack space allocation is handled in prep_machdep. */
86.2325 -+#if !defined M68K && !defined __x86_64__ && !defined S390
86.2326 - /* Make space for the return structure pointer */
86.2327 - if (cif->rtype->type == FFI_TYPE_STRUCT
86.2328 - #ifdef SPARC
86.2329 -@@ -122,6 +123,7 @@
86.2330 - if (((*ptr)->size == 0) && (initialize_aggregate((*ptr)) != FFI_OK))
86.2331 - return FFI_BAD_TYPEDEF;
86.2332 -
86.2333 -+#if !defined __x86_64__ && !defined S390
86.2334 - #ifdef SPARC
86.2335 - if (((*ptr)->type == FFI_TYPE_STRUCT
86.2336 - && ((*ptr)->size > 16 || cif->abi != FFI_V9))
86.2337 -@@ -137,6 +139,7 @@
86.2338 -
86.2339 - bytes += STACK_ARG_SIZE((*ptr)->size);
86.2340 - }
86.2341 -+#endif
86.2342 - }
86.2343 -
86.2344 - cif->bytes = bytes;
86.2345 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/ffi.c gcc/libffi/src/s390/ffi.c
86.2346 ---- gcc-3.2.2.orig/libffi/src/s390/ffi.c Thu Jan 1 09:00:00 1970
86.2347 -+++ gcc/libffi/src/s390/ffi.c Thu Feb 6 08:58:57 2003
86.2348 -@@ -0,0 +1,753 @@
86.2349 -+/* -----------------------------------------------------------------------
86.2350 -+ ffi.c - Copyright (c) 2000 Software AG
86.2351 -+
86.2352 -+ S390 Foreign Function Interface
86.2353 -+
86.2354 -+ Permission is hereby granted, free of charge, to any person obtaining
86.2355 -+ a copy of this software and associated documentation files (the
86.2356 -+ ``Software''), to deal in the Software without restriction, including
86.2357 -+ without limitation the rights to use, copy, modify, merge, publish,
86.2358 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.2359 -+ permit persons to whom the Software is furnished to do so, subject to
86.2360 -+ the following conditions:
86.2361 -+
86.2362 -+ The above copyright notice and this permission notice shall be included
86.2363 -+ in all copies or substantial portions of the Software.
86.2364 -+
86.2365 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.2366 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.2367 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.2368 -+ IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.2369 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.2370 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.2371 -+ OTHER DEALINGS IN THE SOFTWARE.
86.2372 -+ ----------------------------------------------------------------------- */
86.2373 -+/*====================================================================*/
86.2374 -+/* Includes */
86.2375 -+/* -------- */
86.2376 -+/*====================================================================*/
86.2377 -+
86.2378 -+#include <ffi.h>
86.2379 -+#include <ffi_common.h>
86.2380 -+
86.2381 -+#include <stdlib.h>
86.2382 -+#include <stdio.h>
86.2383 -+
86.2384 -+/*====================== End of Includes =============================*/
86.2385 -+
86.2386 -+/*====================================================================*/
86.2387 -+/* Defines */
86.2388 -+/* ------- */
86.2389 -+/*====================================================================*/
86.2390 -+
86.2391 -+/* Maximum number of GPRs available for argument passing. */
86.2392 -+#define MAX_GPRARGS 5
86.2393 -+
86.2394 -+/* Maximum number of FPRs available for argument passing. */
86.2395 -+#ifdef __s390x__
86.2396 -+#define MAX_FPRARGS 4
86.2397 -+#else
86.2398 -+#define MAX_FPRARGS 2
86.2399 -+#endif
86.2400 -+
86.2401 -+/* Round to multiple of 16. */
86.2402 -+#define ROUND_SIZE(size) (((size) + 15) & ~15)
86.2403 -+
86.2404 -+/* If these values change, sysv.S must be adapted! */
86.2405 -+#define FFI390_RET_VOID 0
86.2406 -+#define FFI390_RET_STRUCT 1
86.2407 -+#define FFI390_RET_FLOAT 2
86.2408 -+#define FFI390_RET_DOUBLE 3
86.2409 -+#define FFI390_RET_INT32 4
86.2410 -+#define FFI390_RET_INT64 5
86.2411 -+
86.2412 -+/*===================== End of Defines ===============================*/
86.2413 -+
86.2414 -+/*====================================================================*/
86.2415 -+/* Prototypes */
86.2416 -+/* ---------- */
86.2417 -+/*====================================================================*/
86.2418 -+
86.2419 -+static void ffi_prep_args (unsigned char *, extended_cif *);
86.2420 -+static int ffi_check_float_struct (ffi_type *);
86.2421 -+void
86.2422 -+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2)
86.2423 -+__attribute__ ((visibility ("hidden")))
86.2424 -+#endif
86.2425 -+ffi_closure_helper_SYSV (ffi_closure *, unsigned long *,
86.2426 -+ unsigned long long *, unsigned long *);
86.2427 -+
86.2428 -+/*====================== End of Prototypes ===========================*/
86.2429 -+
86.2430 -+/*====================================================================*/
86.2431 -+/* Externals */
86.2432 -+/* --------- */
86.2433 -+/*====================================================================*/
86.2434 -+
86.2435 -+extern void ffi_call_SYSV(unsigned,
86.2436 -+ extended_cif *,
86.2437 -+ void (*)(unsigned char *, extended_cif *),
86.2438 -+ unsigned,
86.2439 -+ void *,
86.2440 -+ void (*fn)());
86.2441 -+
86.2442 -+extern void ffi_closure_SYSV(void);
86.2443 -+
86.2444 -+/*====================== End of Externals ============================*/
86.2445 -+
86.2446 -+/*====================================================================*/
86.2447 -+/* */
86.2448 -+/* Name - ffi_check_struct_type. */
86.2449 -+/* */
86.2450 -+/* Function - Determine if a structure can be passed within a */
86.2451 -+/* general purpose or floating point register. */
86.2452 -+/* */
86.2453 -+/*====================================================================*/
86.2454 -+
86.2455 -+static int
86.2456 -+ffi_check_struct_type (ffi_type *arg)
86.2457 -+{
86.2458 -+ size_t size = arg->size;
86.2459 -+
86.2460 -+ /* If the struct has just one element, look at that element
86.2461 -+ to find out whether to consider the struct as floating point. */
86.2462 -+ while (arg->type == FFI_TYPE_STRUCT
86.2463 -+ && arg->elements[0] && !arg->elements[1])
86.2464 -+ arg = arg->elements[0];
86.2465 -+
86.2466 -+ /* Structs of size 1, 2, 4, and 8 are passed in registers,
86.2467 -+ just like the corresponding int/float types. */
86.2468 -+ switch (size)
86.2469 -+ {
86.2470 -+ case 1:
86.2471 -+ return FFI_TYPE_UINT8;
86.2472 -+
86.2473 -+ case 2:
86.2474 -+ return FFI_TYPE_UINT16;
86.2475 -+
86.2476 -+ case 4:
86.2477 -+ if (arg->type == FFI_TYPE_FLOAT)
86.2478 -+ return FFI_TYPE_FLOAT;
86.2479 -+ else
86.2480 -+ return FFI_TYPE_UINT32;
86.2481 -+
86.2482 -+ case 8:
86.2483 -+ if (arg->type == FFI_TYPE_DOUBLE)
86.2484 -+ return FFI_TYPE_DOUBLE;
86.2485 -+ else
86.2486 -+ return FFI_TYPE_UINT64;
86.2487 -+
86.2488 -+ default:
86.2489 -+ break;
86.2490 -+ }
86.2491 -+
86.2492 -+ /* Other structs are passed via a pointer to the data. */
86.2493 -+ return FFI_TYPE_POINTER;
86.2494 -+}
86.2495 -+
86.2496 -+/*======================== End of Routine ============================*/
86.2497 -+
86.2498 -+/*====================================================================*/
86.2499 -+/* */
86.2500 -+/* Name - ffi_prep_args. */
86.2501 -+/* */
86.2502 -+/* Function - Prepare parameters for call to function. */
86.2503 -+/* */
86.2504 -+/* ffi_prep_args is called by the assembly routine once stack space */
86.2505 -+/* has been allocated for the function's arguments. */
86.2506 -+/* */
86.2507 -+/*====================================================================*/
86.2508 -+
86.2509 -+static void
86.2510 -+ffi_prep_args (unsigned char *stack, extended_cif *ecif)
86.2511 -+{
86.2512 -+ /* The stack space will be filled with those areas:
86.2513 -+
86.2514 -+ FPR argument register save area (highest addresses)
86.2515 -+ GPR argument register save area
86.2516 -+ temporary struct copies
86.2517 -+ overflow argument area (lowest addresses)
86.2518 -+
86.2519 -+ We set up the following pointers:
86.2520 -+
86.2521 -+ p_fpr: bottom of the FPR area (growing upwards)
86.2522 -+ p_gpr: bottom of the GPR area (growing upwards)
86.2523 -+ p_ov: bottom of the overflow area (growing upwards)
86.2524 -+ p_struct: top of the struct copy area (growing downwards)
86.2525 -+
86.2526 -+ All areas are kept aligned to twice the word size. */
86.2527 -+
86.2528 -+ int gpr_off = ecif->cif->bytes;
86.2529 -+ int fpr_off = gpr_off + ROUND_SIZE (MAX_GPRARGS * sizeof (long));
86.2530 -+
86.2531 -+ unsigned long long *p_fpr = (unsigned long long *)(stack + fpr_off);
86.2532 -+ unsigned long *p_gpr = (unsigned long *)(stack + gpr_off);
86.2533 -+ unsigned char *p_struct = (unsigned char *)p_gpr;
86.2534 -+ unsigned long *p_ov = (unsigned long *)stack;
86.2535 -+
86.2536 -+ int n_fpr = 0;
86.2537 -+ int n_gpr = 0;
86.2538 -+ int n_ov = 0;
86.2539 -+
86.2540 -+ ffi_type **ptr;
86.2541 -+ void **p_argv = ecif->avalue;
86.2542 -+ int i;
86.2543 -+
86.2544 -+ /* If we returning a structure then we set the first parameter register
86.2545 -+ to the address of where we are returning this structure. */
86.2546 -+
86.2547 -+ if (ecif->cif->flags == FFI390_RET_STRUCT)
86.2548 -+ p_gpr[n_gpr++] = (unsigned long) ecif->rvalue;
86.2549 -+
86.2550 -+ /* Now for the arguments. */
86.2551 -+
86.2552 -+ for (ptr = ecif->cif->arg_types, i = ecif->cif->nargs;
86.2553 -+ i > 0;
86.2554 -+ i--, ptr++, p_argv++)
86.2555 -+ {
86.2556 -+ void *arg = *p_argv;
86.2557 -+ int type = (*ptr)->type;
86.2558 -+
86.2559 -+ /* Check how a structure type is passed. */
86.2560 -+ if (type == FFI_TYPE_STRUCT)
86.2561 -+ {
86.2562 -+ type = ffi_check_struct_type (*ptr);
86.2563 -+
86.2564 -+ /* If we pass the struct via pointer, copy the data. */
86.2565 -+ if (type == FFI_TYPE_POINTER)
86.2566 -+ {
86.2567 -+ p_struct -= ROUND_SIZE ((*ptr)->size);
86.2568 -+ memcpy (p_struct, (char *)arg, (*ptr)->size);
86.2569 -+ arg = &p_struct;
86.2570 -+ }
86.2571 -+ }
86.2572 -+
86.2573 -+ /* Pointers are passed like UINTs of the same size. */
86.2574 -+ if (type == FFI_TYPE_POINTER)
86.2575 -+#ifdef __s390x__
86.2576 -+ type = FFI_TYPE_UINT64;
86.2577 -+#else
86.2578 -+ type = FFI_TYPE_UINT32;
86.2579 -+#endif
86.2580 -+
86.2581 -+ /* Now handle all primitive int/float data types. */
86.2582 -+ switch (type)
86.2583 -+ {
86.2584 -+ case FFI_TYPE_DOUBLE:
86.2585 -+ if (n_fpr < MAX_FPRARGS)
86.2586 -+ p_fpr[n_fpr++] = *(unsigned long long *) arg;
86.2587 -+ else
86.2588 -+#ifdef __s390x__
86.2589 -+ p_ov[n_ov++] = *(unsigned long *) arg;
86.2590 -+#else
86.2591 -+ p_ov[n_ov++] = ((unsigned long *) arg)[0],
86.2592 -+ p_ov[n_ov++] = ((unsigned long *) arg)[1];
86.2593 -+#endif
86.2594 -+ break;
86.2595 -+
86.2596 -+ case FFI_TYPE_FLOAT:
86.2597 -+ if (n_fpr < MAX_FPRARGS)
86.2598 -+ p_fpr[n_fpr++] = (long long) *(unsigned int *) arg << 32;
86.2599 -+ else
86.2600 -+ p_ov[n_ov++] = *(unsigned int *) arg;
86.2601 -+ break;
86.2602 -+
86.2603 -+ case FFI_TYPE_UINT64:
86.2604 -+ case FFI_TYPE_SINT64:
86.2605 -+#ifdef __s390x__
86.2606 -+ if (n_gpr < MAX_GPRARGS)
86.2607 -+ p_gpr[n_gpr++] = *(unsigned long *) arg;
86.2608 -+ else
86.2609 -+ p_ov[n_ov++] = *(unsigned long *) arg;
86.2610 -+#else
86.2611 -+ if (n_gpr == MAX_GPRARGS-1)
86.2612 -+ n_gpr = MAX_GPRARGS;
86.2613 -+ if (n_gpr < MAX_GPRARGS)
86.2614 -+ p_gpr[n_gpr++] = ((unsigned long *) arg)[0],
86.2615 -+ p_gpr[n_gpr++] = ((unsigned long *) arg)[1];
86.2616 -+ else
86.2617 -+ p_ov[n_ov++] = ((unsigned long *) arg)[0],
86.2618 -+ p_ov[n_ov++] = ((unsigned long *) arg)[1];
86.2619 -+#endif
86.2620 -+ break;
86.2621 -+
86.2622 -+ case FFI_TYPE_UINT32:
86.2623 -+ if (n_gpr < MAX_GPRARGS)
86.2624 -+ p_gpr[n_gpr++] = *(unsigned int *) arg;
86.2625 -+ else
86.2626 -+ p_ov[n_ov++] = *(unsigned int *) arg;
86.2627 -+ break;
86.2628 -+
86.2629 -+ case FFI_TYPE_INT:
86.2630 -+ case FFI_TYPE_SINT32:
86.2631 -+ if (n_gpr < MAX_GPRARGS)
86.2632 -+ p_gpr[n_gpr++] = *(signed int *) arg;
86.2633 -+ else
86.2634 -+ p_ov[n_ov++] = *(signed int *) arg;
86.2635 -+ break;
86.2636 -+
86.2637 -+ case FFI_TYPE_UINT16:
86.2638 -+ if (n_gpr < MAX_GPRARGS)
86.2639 -+ p_gpr[n_gpr++] = *(unsigned short *) arg;
86.2640 -+ else
86.2641 -+ p_ov[n_ov++] = *(unsigned short *) arg;
86.2642 -+ break;
86.2643 -+
86.2644 -+ case FFI_TYPE_SINT16:
86.2645 -+ if (n_gpr < MAX_GPRARGS)
86.2646 -+ p_gpr[n_gpr++] = *(signed short *) arg;
86.2647 -+ else
86.2648 -+ p_ov[n_ov++] = *(signed short *) arg;
86.2649 -+ break;
86.2650 -+
86.2651 -+ case FFI_TYPE_UINT8:
86.2652 -+ if (n_gpr < MAX_GPRARGS)
86.2653 -+ p_gpr[n_gpr++] = *(unsigned char *) arg;
86.2654 -+ else
86.2655 -+ p_ov[n_ov++] = *(unsigned char *) arg;
86.2656 -+ break;
86.2657 -+
86.2658 -+ case FFI_TYPE_SINT8:
86.2659 -+ if (n_gpr < MAX_GPRARGS)
86.2660 -+ p_gpr[n_gpr++] = *(signed char *) arg;
86.2661 -+ else
86.2662 -+ p_ov[n_ov++] = *(signed char *) arg;
86.2663 -+ break;
86.2664 -+
86.2665 -+ default:
86.2666 -+ FFI_ASSERT (0);
86.2667 -+ break;
86.2668 -+ }
86.2669 -+ }
86.2670 -+}
86.2671 -+
86.2672 -+/*======================== End of Routine ============================*/
86.2673 -+
86.2674 -+/*====================================================================*/
86.2675 -+/* */
86.2676 -+/* Name - ffi_prep_cif_machdep. */
86.2677 -+/* */
86.2678 -+/* Function - Perform machine dependent CIF processing. */
86.2679 -+/* */
86.2680 -+/*====================================================================*/
86.2681 -+
86.2682 -+ffi_status
86.2683 -+ffi_prep_cif_machdep(ffi_cif *cif)
86.2684 -+{
86.2685 -+ size_t struct_size = 0;
86.2686 -+ int n_gpr = 0;
86.2687 -+ int n_fpr = 0;
86.2688 -+ int n_ov = 0;
86.2689 -+
86.2690 -+ ffi_type **ptr;
86.2691 -+ int i;
86.2692 -+
86.2693 -+ /* Determine return value handling. */
86.2694 -+
86.2695 -+ switch (cif->rtype->type)
86.2696 -+ {
86.2697 -+ /* Void is easy. */
86.2698 -+ case FFI_TYPE_VOID:
86.2699 -+ cif->flags = FFI390_RET_VOID;
86.2700 -+ break;
86.2701 -+
86.2702 -+ /* Structures are returned via a hidden pointer. */
86.2703 -+ case FFI_TYPE_STRUCT:
86.2704 -+ cif->flags = FFI390_RET_STRUCT;
86.2705 -+ n_gpr++; /* We need one GPR to pass the pointer. */
86.2706 -+ break;
86.2707 -+
86.2708 -+ /* Floating point values are returned in fpr 0. */
86.2709 -+ case FFI_TYPE_FLOAT:
86.2710 -+ cif->flags = FFI390_RET_FLOAT;
86.2711 -+ break;
86.2712 -+
86.2713 -+ case FFI_TYPE_DOUBLE:
86.2714 -+ cif->flags = FFI390_RET_DOUBLE;
86.2715 -+ break;
86.2716 -+
86.2717 -+ /* Integer values are returned in gpr 2 (and gpr 3
86.2718 -+ for 64-bit values on 31-bit machines). */
86.2719 -+ case FFI_TYPE_UINT64:
86.2720 -+ case FFI_TYPE_SINT64:
86.2721 -+ cif->flags = FFI390_RET_INT64;
86.2722 -+ break;
86.2723 -+
86.2724 -+ case FFI_TYPE_POINTER:
86.2725 -+ case FFI_TYPE_INT:
86.2726 -+ case FFI_TYPE_UINT32:
86.2727 -+ case FFI_TYPE_SINT32:
86.2728 -+ case FFI_TYPE_UINT16:
86.2729 -+ case FFI_TYPE_SINT16:
86.2730 -+ case FFI_TYPE_UINT8:
86.2731 -+ case FFI_TYPE_SINT8:
86.2732 -+ /* These are to be extended to word size. */
86.2733 -+#ifdef __s390x__
86.2734 -+ cif->flags = FFI390_RET_INT64;
86.2735 -+#else
86.2736 -+ cif->flags = FFI390_RET_INT32;
86.2737 -+#endif
86.2738 -+ break;
86.2739 -+
86.2740 -+ default:
86.2741 -+ FFI_ASSERT (0);
86.2742 -+ break;
86.2743 -+ }
86.2744 -+
86.2745 -+ /* Now for the arguments. */
86.2746 -+
86.2747 -+ for (ptr = cif->arg_types, i = cif->nargs;
86.2748 -+ i > 0;
86.2749 -+ i--, ptr++)
86.2750 -+ {
86.2751 -+ int type = (*ptr)->type;
86.2752 -+
86.2753 -+ /* Check how a structure type is passed. */
86.2754 -+ if (type == FFI_TYPE_STRUCT)
86.2755 -+ {
86.2756 -+ type = ffi_check_struct_type (*ptr);
86.2757 -+
86.2758 -+ /* If we pass the struct via pointer, we must reserve space
86.2759 -+ to copy its data for proper call-by-value semantics. */
86.2760 -+ if (type == FFI_TYPE_POINTER)
86.2761 -+ struct_size += ROUND_SIZE ((*ptr)->size);
86.2762 -+ }
86.2763 -+
86.2764 -+ /* Now handle all primitive int/float data types. */
86.2765 -+ switch (type)
86.2766 -+ {
86.2767 -+ /* The first MAX_FPRARGS floating point arguments
86.2768 -+ go in FPRs, the rest overflow to the stack. */
86.2769 -+
86.2770 -+ case FFI_TYPE_DOUBLE:
86.2771 -+ if (n_fpr < MAX_FPRARGS)
86.2772 -+ n_fpr++;
86.2773 -+ else
86.2774 -+ n_ov += sizeof (double) / sizeof (long);
86.2775 -+ break;
86.2776 -+
86.2777 -+ case FFI_TYPE_FLOAT:
86.2778 -+ if (n_fpr < MAX_FPRARGS)
86.2779 -+ n_fpr++;
86.2780 -+ else
86.2781 -+ n_ov++;
86.2782 -+ break;
86.2783 -+
86.2784 -+ /* On 31-bit machines, 64-bit integers are passed in GPR pairs,
86.2785 -+ if one is still available, or else on the stack. If only one
86.2786 -+ register is free, skip the register (it won't be used for any
86.2787 -+ subsequent argument either). */
86.2788 -+
86.2789 -+#ifndef __s390x__
86.2790 -+ case FFI_TYPE_UINT64:
86.2791 -+ case FFI_TYPE_SINT64:
86.2792 -+ if (n_gpr == MAX_GPRARGS-1)
86.2793 -+ n_gpr = MAX_GPRARGS;
86.2794 -+ if (n_gpr < MAX_GPRARGS)
86.2795 -+ n_gpr += 2;
86.2796 -+ else
86.2797 -+ n_ov += 2;
86.2798 -+ break;
86.2799 -+#endif
86.2800 -+
86.2801 -+ /* Everything else is passed in GPRs (until MAX_GPRARGS
86.2802 -+ have been used) or overflows to the stack. */
86.2803 -+
86.2804 -+ default:
86.2805 -+ if (n_gpr < MAX_GPRARGS)
86.2806 -+ n_gpr++;
86.2807 -+ else
86.2808 -+ n_ov++;
86.2809 -+ break;
86.2810 -+ }
86.2811 -+ }
86.2812 -+
86.2813 -+ /* Total stack space as required for overflow arguments
86.2814 -+ and temporary structure copies. */
86.2815 -+
86.2816 -+ cif->bytes = ROUND_SIZE (n_ov * sizeof (long)) + struct_size;
86.2817 -+
86.2818 -+ return FFI_OK;
86.2819 -+}
86.2820 -+
86.2821 -+/*======================== End of Routine ============================*/
86.2822 -+
86.2823 -+/*====================================================================*/
86.2824 -+/* */
86.2825 -+/* Name - ffi_call. */
86.2826 -+/* */
86.2827 -+/* Function - Call the FFI routine. */
86.2828 -+/* */
86.2829 -+/*====================================================================*/
86.2830 -+
86.2831 -+void
86.2832 -+ffi_call(ffi_cif *cif,
86.2833 -+ void (*fn)(),
86.2834 -+ void *rvalue,
86.2835 -+ void **avalue)
86.2836 -+{
86.2837 -+ int ret_type = cif->flags;
86.2838 -+ extended_cif ecif;
86.2839 -+
86.2840 -+ ecif.cif = cif;
86.2841 -+ ecif.avalue = avalue;
86.2842 -+ ecif.rvalue = rvalue;
86.2843 -+
86.2844 -+ /* If we don't have a return value, we need to fake one. */
86.2845 -+ if (rvalue == NULL)
86.2846 -+ {
86.2847 -+ if (ret_type == FFI390_RET_STRUCT)
86.2848 -+ ecif.rvalue = alloca (cif->rtype->size);
86.2849 -+ else
86.2850 -+ ret_type = FFI390_RET_VOID;
86.2851 -+ }
86.2852 -+
86.2853 -+ switch (cif->abi)
86.2854 -+ {
86.2855 -+ case FFI_SYSV:
86.2856 -+ ffi_call_SYSV (cif->bytes, &ecif, ffi_prep_args,
86.2857 -+ ret_type, ecif.rvalue, fn);
86.2858 -+ break;
86.2859 -+
86.2860 -+ default:
86.2861 -+ FFI_ASSERT (0);
86.2862 -+ break;
86.2863 -+ }
86.2864 -+}
86.2865 -+
86.2866 -+/*======================== End of Routine ============================*/
86.2867 -+
86.2868 -+/*====================================================================*/
86.2869 -+/* */
86.2870 -+/* Name - ffi_closure_helper_SYSV. */
86.2871 -+/* */
86.2872 -+/* Function - Call a FFI closure target function. */
86.2873 -+/* */
86.2874 -+/*====================================================================*/
86.2875 -+
86.2876 -+void
86.2877 -+ffi_closure_helper_SYSV (ffi_closure *closure,
86.2878 -+ unsigned long *p_gpr,
86.2879 -+ unsigned long long *p_fpr,
86.2880 -+ unsigned long *p_ov)
86.2881 -+{
86.2882 -+ unsigned long long ret_buffer;
86.2883 -+
86.2884 -+ void *rvalue = &ret_buffer;
86.2885 -+ void **avalue;
86.2886 -+ void **p_arg;
86.2887 -+
86.2888 -+ int n_gpr = 0;
86.2889 -+ int n_fpr = 0;
86.2890 -+ int n_ov = 0;
86.2891 -+
86.2892 -+ ffi_type **ptr;
86.2893 -+ int i;
86.2894 -+
86.2895 -+ /* Allocate buffer for argument list pointers. */
86.2896 -+
86.2897 -+ p_arg = avalue = alloca (closure->cif->nargs * sizeof (void *));
86.2898 -+
86.2899 -+ /* If we returning a structure, pass the structure address
86.2900 -+ directly to the target function. Otherwise, have the target
86.2901 -+ function store the return value to the GPR save area. */
86.2902 -+
86.2903 -+ if (closure->cif->flags == FFI390_RET_STRUCT)
86.2904 -+ rvalue = (void *) p_gpr[n_gpr++];
86.2905 -+
86.2906 -+ /* Now for the arguments. */
86.2907 -+
86.2908 -+ for (ptr = closure->cif->arg_types, i = closure->cif->nargs;
86.2909 -+ i > 0;
86.2910 -+ i--, p_arg++, ptr++)
86.2911 -+ {
86.2912 -+ int deref_struct_pointer = 0;
86.2913 -+ int type = (*ptr)->type;
86.2914 -+
86.2915 -+ /* Check how a structure type is passed. */
86.2916 -+ if (type == FFI_TYPE_STRUCT)
86.2917 -+ {
86.2918 -+ type = ffi_check_struct_type (*ptr);
86.2919 -+
86.2920 -+ /* If we pass the struct via pointer, remember to
86.2921 -+ retrieve the pointer later. */
86.2922 -+ if (type == FFI_TYPE_POINTER)
86.2923 -+ deref_struct_pointer = 1;
86.2924 -+ }
86.2925 -+
86.2926 -+ /* Pointers are passed like UINTs of the same size. */
86.2927 -+ if (type == FFI_TYPE_POINTER)
86.2928 -+#ifdef __s390x__
86.2929 -+ type = FFI_TYPE_UINT64;
86.2930 -+#else
86.2931 -+ type = FFI_TYPE_UINT32;
86.2932 -+#endif
86.2933 -+
86.2934 -+ /* Now handle all primitive int/float data types. */
86.2935 -+ switch (type)
86.2936 -+ {
86.2937 -+ case FFI_TYPE_DOUBLE:
86.2938 -+ if (n_fpr < MAX_FPRARGS)
86.2939 -+ *p_arg = &p_fpr[n_fpr++];
86.2940 -+ else
86.2941 -+ *p_arg = &p_ov[n_ov],
86.2942 -+ n_ov += sizeof (double) / sizeof (long);
86.2943 -+ break;
86.2944 -+
86.2945 -+ case FFI_TYPE_FLOAT:
86.2946 -+ if (n_fpr < MAX_FPRARGS)
86.2947 -+ *p_arg = &p_fpr[n_fpr++];
86.2948 -+ else
86.2949 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
86.2950 -+ break;
86.2951 -+
86.2952 -+ case FFI_TYPE_UINT64:
86.2953 -+ case FFI_TYPE_SINT64:
86.2954 -+#ifdef __s390x__
86.2955 -+ if (n_gpr < MAX_GPRARGS)
86.2956 -+ *p_arg = &p_gpr[n_gpr++];
86.2957 -+ else
86.2958 -+ *p_arg = &p_ov[n_ov++];
86.2959 -+#else
86.2960 -+ if (n_gpr == MAX_GPRARGS-1)
86.2961 -+ n_gpr = MAX_GPRARGS;
86.2962 -+ if (n_gpr < MAX_GPRARGS)
86.2963 -+ *p_arg = &p_gpr[n_gpr], n_gpr += 2;
86.2964 -+ else
86.2965 -+ *p_arg = &p_ov[n_ov], n_ov += 2;
86.2966 -+#endif
86.2967 -+ break;
86.2968 -+
86.2969 -+ case FFI_TYPE_INT:
86.2970 -+ case FFI_TYPE_UINT32:
86.2971 -+ case FFI_TYPE_SINT32:
86.2972 -+ if (n_gpr < MAX_GPRARGS)
86.2973 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 4;
86.2974 -+ else
86.2975 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 4;
86.2976 -+ break;
86.2977 -+
86.2978 -+ case FFI_TYPE_UINT16:
86.2979 -+ case FFI_TYPE_SINT16:
86.2980 -+ if (n_gpr < MAX_GPRARGS)
86.2981 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 2;
86.2982 -+ else
86.2983 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 2;
86.2984 -+ break;
86.2985 -+
86.2986 -+ case FFI_TYPE_UINT8:
86.2987 -+ case FFI_TYPE_SINT8:
86.2988 -+ if (n_gpr < MAX_GPRARGS)
86.2989 -+ *p_arg = (char *)&p_gpr[n_gpr++] + sizeof (long) - 1;
86.2990 -+ else
86.2991 -+ *p_arg = (char *)&p_ov[n_ov++] + sizeof (long) - 1;
86.2992 -+ break;
86.2993 -+
86.2994 -+ default:
86.2995 -+ FFI_ASSERT (0);
86.2996 -+ break;
86.2997 -+ }
86.2998 -+
86.2999 -+ /* If this is a struct passed via pointer, we need to
86.3000 -+ actually retrieve that pointer. */
86.3001 -+ if (deref_struct_pointer)
86.3002 -+ *p_arg = *(void **)*p_arg;
86.3003 -+ }
86.3004 -+
86.3005 -+
86.3006 -+ /* Call the target function. */
86.3007 -+ (closure->fun) (closure->cif, rvalue, avalue, closure->user_data);
86.3008 -+
86.3009 -+ /* Convert the return value. */
86.3010 -+ switch (closure->cif->rtype->type)
86.3011 -+ {
86.3012 -+ /* Void is easy, and so is struct. */
86.3013 -+ case FFI_TYPE_VOID:
86.3014 -+ case FFI_TYPE_STRUCT:
86.3015 -+ break;
86.3016 -+
86.3017 -+ /* Floating point values are returned in fpr 0. */
86.3018 -+ case FFI_TYPE_FLOAT:
86.3019 -+ p_fpr[0] = (long long) *(unsigned int *) rvalue << 32;
86.3020 -+ break;
86.3021 -+
86.3022 -+ case FFI_TYPE_DOUBLE:
86.3023 -+ p_fpr[0] = *(unsigned long long *) rvalue;
86.3024 -+ break;
86.3025 -+
86.3026 -+ /* Integer values are returned in gpr 2 (and gpr 3
86.3027 -+ for 64-bit values on 31-bit machines). */
86.3028 -+ case FFI_TYPE_UINT64:
86.3029 -+ case FFI_TYPE_SINT64:
86.3030 -+#ifdef __s390x__
86.3031 -+ p_gpr[0] = *(unsigned long *) rvalue;
86.3032 -+#else
86.3033 -+ p_gpr[0] = ((unsigned long *) rvalue)[0],
86.3034 -+ p_gpr[1] = ((unsigned long *) rvalue)[1];
86.3035 -+#endif
86.3036 -+ break;
86.3037 -+
86.3038 -+ case FFI_TYPE_POINTER:
86.3039 -+ case FFI_TYPE_UINT32:
86.3040 -+ case FFI_TYPE_UINT16:
86.3041 -+ case FFI_TYPE_UINT8:
86.3042 -+ p_gpr[0] = *(unsigned long *) rvalue;
86.3043 -+ break;
86.3044 -+
86.3045 -+ case FFI_TYPE_INT:
86.3046 -+ case FFI_TYPE_SINT32:
86.3047 -+ case FFI_TYPE_SINT16:
86.3048 -+ case FFI_TYPE_SINT8:
86.3049 -+ p_gpr[0] = *(signed long *) rvalue;
86.3050 -+ break;
86.3051 -+
86.3052 -+ default:
86.3053 -+ FFI_ASSERT (0);
86.3054 -+ break;
86.3055 -+ }
86.3056 -+}
86.3057 -+
86.3058 -+/*======================== End of Routine ============================*/
86.3059 -+
86.3060 -+/*====================================================================*/
86.3061 -+/* */
86.3062 -+/* Name - ffi_prep_closure. */
86.3063 -+/* */
86.3064 -+/* Function - Prepare a FFI closure. */
86.3065 -+/* */
86.3066 -+/*====================================================================*/
86.3067 -+
86.3068 -+ffi_status
86.3069 -+ffi_prep_closure (ffi_closure *closure,
86.3070 -+ ffi_cif *cif,
86.3071 -+ void (*fun) (ffi_cif *, void *, void **, void *),
86.3072 -+ void *user_data)
86.3073 -+{
86.3074 -+ FFI_ASSERT (cif->abi == FFI_SYSV);
86.3075 -+
86.3076 -+#ifndef __s390x__
86.3077 -+ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
86.3078 -+ *(short *)&closure->tramp [2] = 0x9801; /* lm %r0,%r1,6(%r1) */
86.3079 -+ *(short *)&closure->tramp [4] = 0x1006;
86.3080 -+ *(short *)&closure->tramp [6] = 0x07f1; /* br %r1 */
86.3081 -+ *(long *)&closure->tramp [8] = (long)closure;
86.3082 -+ *(long *)&closure->tramp[12] = (long)&ffi_closure_SYSV;
86.3083 -+#else
86.3084 -+ *(short *)&closure->tramp [0] = 0x0d10; /* basr %r1,0 */
86.3085 -+ *(short *)&closure->tramp [2] = 0xeb01; /* lmg %r0,%r1,14(%r1) */
86.3086 -+ *(short *)&closure->tramp [4] = 0x100e;
86.3087 -+ *(short *)&closure->tramp [6] = 0x0004;
86.3088 -+ *(short *)&closure->tramp [8] = 0x07f1; /* br %r1 */
86.3089 -+ *(long *)&closure->tramp[16] = (long)closure;
86.3090 -+ *(long *)&closure->tramp[24] = (long)&ffi_closure_SYSV;
86.3091 -+#endif
86.3092 -+
86.3093 -+ closure->cif = cif;
86.3094 -+ closure->user_data = user_data;
86.3095 -+ closure->fun = fun;
86.3096 -+
86.3097 -+ return FFI_OK;
86.3098 -+}
86.3099 -+
86.3100 -+/*======================== End of Routine ============================*/
86.3101 -+
86.3102 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/s390/sysv.S gcc/libffi/src/s390/sysv.S
86.3103 ---- gcc-3.2.2.orig/libffi/src/s390/sysv.S Thu Jan 1 09:00:00 1970
86.3104 -+++ gcc/libffi/src/s390/sysv.S Thu Nov 28 01:44:35 2002
86.3105 -@@ -0,0 +1,425 @@
86.3106 -+/* -----------------------------------------------------------------------
86.3107 -+ sysv.S - Copyright (c) 2000 Software AG
86.3108 -+
86.3109 -+ S390 Foreign Function Interface
86.3110 -+
86.3111 -+ Permission is hereby granted, free of charge, to any person obtaining
86.3112 -+ a copy of this software and associated documentation files (the
86.3113 -+ ``Software''), to deal in the Software without restriction, including
86.3114 -+ without limitation the rights to use, copy, modify, merge, publish,
86.3115 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.3116 -+ permit persons to whom the Software is furnished to do so, subject to
86.3117 -+ the following conditions:
86.3118 -+
86.3119 -+ The above copyright notice and this permission notice shall be included
86.3120 -+ in all copies or substantial portions of the Software.
86.3121 -+
86.3122 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.3123 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.3124 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.3125 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.3126 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.3127 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.3128 -+ OTHER DEALINGS IN THE SOFTWARE.
86.3129 -+ ----------------------------------------------------------------------- */
86.3130 -+
86.3131 -+#ifndef __s390x__
86.3132 -+
86.3133 -+.text
86.3134 -+
86.3135 -+ # r2: cif->bytes
86.3136 -+ # r3: &ecif
86.3137 -+ # r4: ffi_prep_args
86.3138 -+ # r5: ret_type
86.3139 -+ # r6: ecif.rvalue
86.3140 -+ # ov: fn
86.3141 -+
86.3142 -+ # This assumes we are using gas.
86.3143 -+ .globl ffi_call_SYSV
86.3144 -+ .type ffi_call_SYSV,%function
86.3145 -+ffi_call_SYSV:
86.3146 -+.LFB1:
86.3147 -+ stm %r6,%r15,24(%r15) # Save registers
86.3148 -+.LCFI0:
86.3149 -+ basr %r13,0 # Set up base register
86.3150 -+.Lbase:
86.3151 -+ lr %r11,%r15 # Set up frame pointer
86.3152 -+.LCFI1:
86.3153 -+ sr %r15,%r2
86.3154 -+ ahi %r15,-96-48 # Allocate stack
86.3155 -+ lr %r8,%r6 # Save ecif.rvalue
86.3156 -+ sr %r9,%r9
86.3157 -+ ic %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
86.3158 -+ l %r7,96(%r11) # Load function address
86.3159 -+ st %r11,0(%r15) # Set up back chain
86.3160 -+ ahi %r11,-48 # Register save area
86.3161 -+.LCFI2:
86.3162 -+
86.3163 -+ la %r2,96(%r15) # Save area
86.3164 -+ # r3 already holds &ecif
86.3165 -+ basr %r14,%r4 # Call ffi_prep_args
86.3166 -+
86.3167 -+ lm %r2,%r6,0(%r11) # Load arguments
86.3168 -+ ld %f0,32(%r11)
86.3169 -+ ld %f2,40(%r11)
86.3170 -+ la %r14,0(%r13,%r9) # Set return address
86.3171 -+ br %r7 # ... and call function
86.3172 -+
86.3173 -+.LretNone: # Return void
86.3174 -+ l %r4,48+56(%r11)
86.3175 -+ lm %r6,%r15,48+24(%r11)
86.3176 -+ br %r4
86.3177 -+
86.3178 -+.LretFloat:
86.3179 -+ l %r4,48+56(%r11)
86.3180 -+ ste %f0,0(%r8) # Return float
86.3181 -+ lm %r6,%r15,48+24(%r11)
86.3182 -+ br %r4
86.3183 -+
86.3184 -+.LretDouble:
86.3185 -+ l %r4,48+56(%r11)
86.3186 -+ std %f0,0(%r8) # Return double
86.3187 -+ lm %r6,%r15,48+24(%r11)
86.3188 -+ br %r4
86.3189 -+
86.3190 -+.LretInt32:
86.3191 -+ l %r4,48+56(%r11)
86.3192 -+ st %r2,0(%r8) # Return int
86.3193 -+ lm %r6,%r15,48+24(%r11)
86.3194 -+ br %r4
86.3195 -+
86.3196 -+.LretInt64:
86.3197 -+ l %r4,48+56(%r11)
86.3198 -+ stm %r2,%r3,0(%r8) # Return long long
86.3199 -+ lm %r6,%r15,48+24(%r11)
86.3200 -+ br %r4
86.3201 -+
86.3202 -+.Ltable:
86.3203 -+ .byte .LretNone-.Lbase # FFI390_RET_VOID
86.3204 -+ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
86.3205 -+ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
86.3206 -+ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
86.3207 -+ .byte .LretInt32-.Lbase # FFI390_RET_INT32
86.3208 -+ .byte .LretInt64-.Lbase # FFI390_RET_INT64
86.3209 -+
86.3210 -+.LFE1:
86.3211 -+.ffi_call_SYSV_end:
86.3212 -+ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
86.3213 -+
86.3214 -+
86.3215 -+ .globl ffi_closure_SYSV
86.3216 -+ .type ffi_closure_SYSV,%function
86.3217 -+ffi_closure_SYSV:
86.3218 -+.LFB2:
86.3219 -+ stm %r12,%r15,48(%r15) # Save registers
86.3220 -+.LCFI10:
86.3221 -+ basr %r13,0 # Set up base register
86.3222 -+.Lcbase:
86.3223 -+ stm %r2,%r6,8(%r15) # Save arguments
86.3224 -+ std %f0,64(%r15)
86.3225 -+ std %f2,72(%r15)
86.3226 -+ lr %r1,%r15 # Set up stack frame
86.3227 -+ ahi %r15,-96
86.3228 -+.LCFI11:
86.3229 -+ l %r12,.Lchelper-.Lcbase(%r13) # Get helper function
86.3230 -+ lr %r2,%r0 # Closure
86.3231 -+ la %r3,8(%r1) # GPRs
86.3232 -+ la %r4,64(%r1) # FPRs
86.3233 -+ la %r5,96(%r1) # Overflow
86.3234 -+ st %r1,0(%r15) # Set up back chain
86.3235 -+
86.3236 -+ bas %r14,0(%r12,%r13) # Call helper
86.3237 -+
86.3238 -+ l %r4,96+56(%r15)
86.3239 -+ ld %f0,96+64(%r15) # Load return registers
86.3240 -+ lm %r2,%r3,96+8(%r15)
86.3241 -+ lm %r12,%r15,96+48(%r15)
86.3242 -+ br %r4
86.3243 -+
86.3244 -+ .align 4
86.3245 -+.Lchelper:
86.3246 -+ .long ffi_closure_helper_SYSV-.Lcbase
86.3247 -+
86.3248 -+.LFE2:
86.3249 -+
86.3250 -+.ffi_closure_SYSV_end:
86.3251 -+ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
86.3252 -+
86.3253 -+
86.3254 -+ .section .eh_frame,"a",@progbits
86.3255 -+.Lframe1:
86.3256 -+ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
86.3257 -+.LSCIE1:
86.3258 -+ .4byte 0x0 # CIE Identifier Tag
86.3259 -+ .byte 0x1 # CIE Version
86.3260 -+ .ascii "zR\0" # CIE Augmentation
86.3261 -+ .uleb128 0x1 # CIE Code Alignment Factor
86.3262 -+ .sleb128 -4 # CIE Data Alignment Factor
86.3263 -+ .byte 0xe # CIE RA Column
86.3264 -+ .uleb128 0x1 # Augmentation size
86.3265 -+ .byte 0x1b # FDE Encoding (pcrel sdata4)
86.3266 -+ .byte 0xc # DW_CFA_def_cfa
86.3267 -+ .uleb128 0xf
86.3268 -+ .uleb128 0x60
86.3269 -+ .align 4
86.3270 -+.LECIE1:
86.3271 -+.LSFDE1:
86.3272 -+ .4byte .LEFDE1-.LASFDE1 # FDE Length
86.3273 -+.LASFDE1:
86.3274 -+ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
86.3275 -+ .4byte .LFB1-. # FDE initial location
86.3276 -+ .4byte .LFE1-.LFB1 # FDE address range
86.3277 -+ .uleb128 0x0 # Augmentation size
86.3278 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3279 -+ .4byte .LCFI0-.LFB1
86.3280 -+ .byte 0x8f # DW_CFA_offset, column 0xf
86.3281 -+ .uleb128 0x9
86.3282 -+ .byte 0x8e # DW_CFA_offset, column 0xe
86.3283 -+ .uleb128 0xa
86.3284 -+ .byte 0x8d # DW_CFA_offset, column 0xd
86.3285 -+ .uleb128 0xb
86.3286 -+ .byte 0x8c # DW_CFA_offset, column 0xc
86.3287 -+ .uleb128 0xc
86.3288 -+ .byte 0x8b # DW_CFA_offset, column 0xb
86.3289 -+ .uleb128 0xd
86.3290 -+ .byte 0x8a # DW_CFA_offset, column 0xa
86.3291 -+ .uleb128 0xe
86.3292 -+ .byte 0x89 # DW_CFA_offset, column 0x9
86.3293 -+ .uleb128 0xf
86.3294 -+ .byte 0x88 # DW_CFA_offset, column 0x8
86.3295 -+ .uleb128 0x10
86.3296 -+ .byte 0x87 # DW_CFA_offset, column 0x7
86.3297 -+ .uleb128 0x11
86.3298 -+ .byte 0x86 # DW_CFA_offset, column 0x6
86.3299 -+ .uleb128 0x12
86.3300 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3301 -+ .4byte .LCFI1-.LCFI0
86.3302 -+ .byte 0xd # DW_CFA_def_cfa_register
86.3303 -+ .uleb128 0xb
86.3304 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3305 -+ .4byte .LCFI2-.LCFI1
86.3306 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.3307 -+ .uleb128 0x90
86.3308 -+ .align 4
86.3309 -+.LEFDE1:
86.3310 -+.LSFDE2:
86.3311 -+ .4byte .LEFDE2-.LASFDE2 # FDE Length
86.3312 -+.LASFDE2:
86.3313 -+ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
86.3314 -+ .4byte .LFB2-. # FDE initial location
86.3315 -+ .4byte .LFE2-.LFB2 # FDE address range
86.3316 -+ .uleb128 0x0 # Augmentation size
86.3317 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3318 -+ .4byte .LCFI10-.LFB2
86.3319 -+ .byte 0x8f # DW_CFA_offset, column 0xf
86.3320 -+ .uleb128 0x9
86.3321 -+ .byte 0x8e # DW_CFA_offset, column 0xe
86.3322 -+ .uleb128 0xa
86.3323 -+ .byte 0x8d # DW_CFA_offset, column 0xd
86.3324 -+ .uleb128 0xb
86.3325 -+ .byte 0x8c # DW_CFA_offset, column 0xc
86.3326 -+ .uleb128 0xc
86.3327 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3328 -+ .4byte .LCFI11-.LCFI10
86.3329 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.3330 -+ .uleb128 0xc0
86.3331 -+ .align 4
86.3332 -+.LEFDE2:
86.3333 -+
86.3334 -+#else
86.3335 -+
86.3336 -+.text
86.3337 -+
86.3338 -+ # r2: cif->bytes
86.3339 -+ # r3: &ecif
86.3340 -+ # r4: ffi_prep_args
86.3341 -+ # r5: ret_type
86.3342 -+ # r6: ecif.rvalue
86.3343 -+ # ov: fn
86.3344 -+
86.3345 -+ # This assumes we are using gas.
86.3346 -+ .globl ffi_call_SYSV
86.3347 -+ .type ffi_call_SYSV,%function
86.3348 -+ffi_call_SYSV:
86.3349 -+.LFB1:
86.3350 -+ stmg %r6,%r15,48(%r15) # Save registers
86.3351 -+.LCFI0:
86.3352 -+ larl %r13,.Lbase # Set up base register
86.3353 -+ lgr %r11,%r15 # Set up frame pointer
86.3354 -+.LCFI1:
86.3355 -+ sgr %r15,%r2
86.3356 -+ aghi %r15,-160-80 # Allocate stack
86.3357 -+ lgr %r8,%r6 # Save ecif.rvalue
86.3358 -+ llgc %r9,.Ltable-.Lbase(%r13,%r5) # Load epilog address
86.3359 -+ lg %r7,160(%r11) # Load function address
86.3360 -+ stg %r11,0(%r15) # Set up back chain
86.3361 -+ aghi %r11,-80 # Register save area
86.3362 -+.LCFI2:
86.3363 -+
86.3364 -+ la %r2,160(%r15) # Save area
86.3365 -+ # r3 already holds &ecif
86.3366 -+ basr %r14,%r4 # Call ffi_prep_args
86.3367 -+
86.3368 -+ lmg %r2,%r6,0(%r11) # Load arguments
86.3369 -+ ld %f0,48(%r11)
86.3370 -+ ld %f2,56(%r11)
86.3371 -+ ld %f4,64(%r11)
86.3372 -+ ld %f6,72(%r11)
86.3373 -+ la %r14,0(%r13,%r9) # Set return address
86.3374 -+ br %r7 # ... and call function
86.3375 -+
86.3376 -+.Lbase:
86.3377 -+.LretNone: # Return void
86.3378 -+ lg %r4,80+112(%r11)
86.3379 -+ lmg %r6,%r15,80+48(%r11)
86.3380 -+ br %r4
86.3381 -+
86.3382 -+.LretFloat:
86.3383 -+ lg %r4,80+112(%r11)
86.3384 -+ ste %f0,0(%r8) # Return float
86.3385 -+ lmg %r6,%r15,80+48(%r11)
86.3386 -+ br %r4
86.3387 -+
86.3388 -+.LretDouble:
86.3389 -+ lg %r4,80+112(%r11)
86.3390 -+ std %f0,0(%r8) # Return double
86.3391 -+ lmg %r6,%r15,80+48(%r11)
86.3392 -+ br %r4
86.3393 -+
86.3394 -+.LretInt32:
86.3395 -+ lg %r4,80+112(%r11)
86.3396 -+ st %r2,0(%r8) # Return int
86.3397 -+ lmg %r6,%r15,80+48(%r11)
86.3398 -+ br %r4
86.3399 -+
86.3400 -+.LretInt64:
86.3401 -+ lg %r4,80+112(%r11)
86.3402 -+ stg %r2,0(%r8) # Return long
86.3403 -+ lmg %r6,%r15,80+48(%r11)
86.3404 -+ br %r4
86.3405 -+
86.3406 -+.Ltable:
86.3407 -+ .byte .LretNone-.Lbase # FFI390_RET_VOID
86.3408 -+ .byte .LretNone-.Lbase # FFI390_RET_STRUCT
86.3409 -+ .byte .LretFloat-.Lbase # FFI390_RET_FLOAT
86.3410 -+ .byte .LretDouble-.Lbase # FFI390_RET_DOUBLE
86.3411 -+ .byte .LretInt32-.Lbase # FFI390_RET_INT32
86.3412 -+ .byte .LretInt64-.Lbase # FFI390_RET_INT64
86.3413 -+
86.3414 -+.LFE1:
86.3415 -+.ffi_call_SYSV_end:
86.3416 -+ .size ffi_call_SYSV,.ffi_call_SYSV_end-ffi_call_SYSV
86.3417 -+
86.3418 -+
86.3419 -+ .globl ffi_closure_SYSV
86.3420 -+ .type ffi_closure_SYSV,%function
86.3421 -+ffi_closure_SYSV:
86.3422 -+.LFB2:
86.3423 -+ stmg %r14,%r15,112(%r15) # Save registers
86.3424 -+.LCFI10:
86.3425 -+ stmg %r2,%r6,16(%r15) # Save arguments
86.3426 -+ std %f0,128(%r15)
86.3427 -+ std %f2,136(%r15)
86.3428 -+ std %f4,144(%r15)
86.3429 -+ std %f6,152(%r15)
86.3430 -+ lgr %r1,%r15 # Set up stack frame
86.3431 -+ aghi %r15,-160
86.3432 -+.LCFI11:
86.3433 -+ lgr %r2,%r0 # Closure
86.3434 -+ la %r3,16(%r1) # GPRs
86.3435 -+ la %r4,128(%r1) # FPRs
86.3436 -+ la %r5,160(%r1) # Overflow
86.3437 -+ stg %r1,0(%r15) # Set up back chain
86.3438 -+
86.3439 -+ brasl %r14,ffi_closure_helper_SYSV # Call helper
86.3440 -+
86.3441 -+ lg %r14,160+112(%r15)
86.3442 -+ ld %f0,160+128(%r15) # Load return registers
86.3443 -+ lg %r2,160+16(%r15)
86.3444 -+ la %r15,160(%r15)
86.3445 -+ br %r14
86.3446 -+.LFE2:
86.3447 -+
86.3448 -+.ffi_closure_SYSV_end:
86.3449 -+ .size ffi_closure_SYSV,.ffi_closure_SYSV_end-ffi_closure_SYSV
86.3450 -+
86.3451 -+
86.3452 -+
86.3453 -+ .section .eh_frame,"a",@progbits
86.3454 -+.Lframe1:
86.3455 -+ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
86.3456 -+.LSCIE1:
86.3457 -+ .4byte 0x0 # CIE Identifier Tag
86.3458 -+ .byte 0x1 # CIE Version
86.3459 -+ .ascii "zR\0" # CIE Augmentation
86.3460 -+ .uleb128 0x1 # CIE Code Alignment Factor
86.3461 -+ .sleb128 -8 # CIE Data Alignment Factor
86.3462 -+ .byte 0xe # CIE RA Column
86.3463 -+ .uleb128 0x1 # Augmentation size
86.3464 -+ .byte 0x1b # FDE Encoding (pcrel sdata4)
86.3465 -+ .byte 0xc # DW_CFA_def_cfa
86.3466 -+ .uleb128 0xf
86.3467 -+ .uleb128 0xa0
86.3468 -+ .align 8
86.3469 -+.LECIE1:
86.3470 -+.LSFDE1:
86.3471 -+ .4byte .LEFDE1-.LASFDE1 # FDE Length
86.3472 -+.LASFDE1:
86.3473 -+ .4byte .LASFDE1-.Lframe1 # FDE CIE offset
86.3474 -+ .4byte .LFB1-. # FDE initial location
86.3475 -+ .4byte .LFE1-.LFB1 # FDE address range
86.3476 -+ .uleb128 0x0 # Augmentation size
86.3477 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3478 -+ .4byte .LCFI0-.LFB1
86.3479 -+ .byte 0x8f # DW_CFA_offset, column 0xf
86.3480 -+ .uleb128 0x5
86.3481 -+ .byte 0x8e # DW_CFA_offset, column 0xe
86.3482 -+ .uleb128 0x6
86.3483 -+ .byte 0x8d # DW_CFA_offset, column 0xd
86.3484 -+ .uleb128 0x7
86.3485 -+ .byte 0x8c # DW_CFA_offset, column 0xc
86.3486 -+ .uleb128 0x8
86.3487 -+ .byte 0x8b # DW_CFA_offset, column 0xb
86.3488 -+ .uleb128 0x9
86.3489 -+ .byte 0x8a # DW_CFA_offset, column 0xa
86.3490 -+ .uleb128 0xa
86.3491 -+ .byte 0x89 # DW_CFA_offset, column 0x9
86.3492 -+ .uleb128 0xb
86.3493 -+ .byte 0x88 # DW_CFA_offset, column 0x8
86.3494 -+ .uleb128 0xc
86.3495 -+ .byte 0x87 # DW_CFA_offset, column 0x7
86.3496 -+ .uleb128 0xd
86.3497 -+ .byte 0x86 # DW_CFA_offset, column 0x6
86.3498 -+ .uleb128 0xe
86.3499 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3500 -+ .4byte .LCFI1-.LCFI0
86.3501 -+ .byte 0xd # DW_CFA_def_cfa_register
86.3502 -+ .uleb128 0xb
86.3503 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3504 -+ .4byte .LCFI2-.LCFI1
86.3505 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.3506 -+ .uleb128 0xf0
86.3507 -+ .align 8
86.3508 -+.LEFDE1:
86.3509 -+.LSFDE2:
86.3510 -+ .4byte .LEFDE2-.LASFDE2 # FDE Length
86.3511 -+.LASFDE2:
86.3512 -+ .4byte .LASFDE2-.Lframe1 # FDE CIE offset
86.3513 -+ .4byte .LFB2-. # FDE initial location
86.3514 -+ .4byte .LFE2-.LFB2 # FDE address range
86.3515 -+ .uleb128 0x0 # Augmentation size
86.3516 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3517 -+ .4byte .LCFI10-.LFB2
86.3518 -+ .byte 0x8f # DW_CFA_offset, column 0xf
86.3519 -+ .uleb128 0x5
86.3520 -+ .byte 0x8e # DW_CFA_offset, column 0xe
86.3521 -+ .uleb128 0x6
86.3522 -+ .byte 0x4 # DW_CFA_advance_loc4
86.3523 -+ .4byte .LCFI11-.LCFI10
86.3524 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.3525 -+ .uleb128 0x140
86.3526 -+ .align 8
86.3527 -+.LEFDE2:
86.3528 -+
86.3529 -+#endif
86.3530 -+
86.3531 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/ffi.c gcc/libffi/src/sh/ffi.c
86.3532 ---- gcc-3.2.2.orig/libffi/src/sh/ffi.c Thu Jan 1 09:00:00 1970
86.3533 -+++ gcc/libffi/src/sh/ffi.c Fri Jul 19 10:08:43 2002
86.3534 -@@ -0,0 +1,722 @@
86.3535 -+/* -----------------------------------------------------------------------
86.3536 -+ ffi.c - Copyright (c) 2002 Kaz Kojima
86.3537 -+
86.3538 -+ SuperH Foreign Function Interface
86.3539 -+
86.3540 -+ Permission is hereby granted, free of charge, to any person obtaining
86.3541 -+ a copy of this software and associated documentation files (the
86.3542 -+ ``Software''), to deal in the Software without restriction, including
86.3543 -+ without limitation the rights to use, copy, modify, merge, publish,
86.3544 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.3545 -+ permit persons to whom the Software is furnished to do so, subject to
86.3546 -+ the following conditions:
86.3547 -+
86.3548 -+ The above copyright notice and this permission notice shall be included
86.3549 -+ in all copies or substantial portions of the Software.
86.3550 -+
86.3551 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.3552 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.3553 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.3554 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.3555 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.3556 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.3557 -+ OTHER DEALINGS IN THE SOFTWARE.
86.3558 -+ ----------------------------------------------------------------------- */
86.3559 -+
86.3560 -+#include <ffi.h>
86.3561 -+#include <ffi_common.h>
86.3562 -+
86.3563 -+#include <stdlib.h>
86.3564 -+
86.3565 -+#define NGREGARG 4
86.3566 -+#if defined(__SH4__)
86.3567 -+#define NFREGARG 8
86.3568 -+#endif
86.3569 -+
86.3570 -+#if defined(__HITACHI__)
86.3571 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
86.3572 -+#else
86.3573 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
86.3574 -+#endif
86.3575 -+
86.3576 -+/* If the structure has essentialy an unique element, return its type. */
86.3577 -+static int
86.3578 -+simple_type (ffi_type *arg)
86.3579 -+{
86.3580 -+ if (arg->type != FFI_TYPE_STRUCT)
86.3581 -+ return arg->type;
86.3582 -+ else if (arg->elements[1])
86.3583 -+ return FFI_TYPE_STRUCT;
86.3584 -+
86.3585 -+ return simple_type (arg->elements[0]);
86.3586 -+}
86.3587 -+
86.3588 -+static int
86.3589 -+return_type (ffi_type *arg)
86.3590 -+{
86.3591 -+ unsigned short type;
86.3592 -+
86.3593 -+ if (arg->type != FFI_TYPE_STRUCT)
86.3594 -+ return arg->type;
86.3595 -+
86.3596 -+ type = simple_type (arg->elements[0]);
86.3597 -+ if (! arg->elements[1])
86.3598 -+ {
86.3599 -+ switch (type)
86.3600 -+ {
86.3601 -+ case FFI_TYPE_SINT8:
86.3602 -+ case FFI_TYPE_UINT8:
86.3603 -+ case FFI_TYPE_SINT16:
86.3604 -+ case FFI_TYPE_UINT16:
86.3605 -+ case FFI_TYPE_SINT32:
86.3606 -+ case FFI_TYPE_UINT32:
86.3607 -+ return FFI_TYPE_INT;
86.3608 -+
86.3609 -+ default:
86.3610 -+ return type;
86.3611 -+ }
86.3612 -+ }
86.3613 -+
86.3614 -+ /* gcc uses r0/r1 pair for some kind of structures. */
86.3615 -+ if (arg->size <= 2 * sizeof (int))
86.3616 -+ {
86.3617 -+ int i = 0;
86.3618 -+ ffi_type *e;
86.3619 -+
86.3620 -+ while ((e = arg->elements[i++]))
86.3621 -+ {
86.3622 -+ type = simple_type (e);
86.3623 -+ switch (type)
86.3624 -+ {
86.3625 -+ case FFI_TYPE_SINT32:
86.3626 -+ case FFI_TYPE_UINT32:
86.3627 -+ case FFI_TYPE_INT:
86.3628 -+ case FFI_TYPE_FLOAT:
86.3629 -+ return FFI_TYPE_UINT64;
86.3630 -+
86.3631 -+ default:
86.3632 -+ break;
86.3633 -+ }
86.3634 -+ }
86.3635 -+ }
86.3636 -+
86.3637 -+ return FFI_TYPE_STRUCT;
86.3638 -+}
86.3639 -+
86.3640 -+/* ffi_prep_args is called by the assembly routine once stack space
86.3641 -+ has been allocated for the function's arguments */
86.3642 -+
86.3643 -+/*@-exportheader@*/
86.3644 -+void ffi_prep_args(char *stack, extended_cif *ecif)
86.3645 -+/*@=exportheader@*/
86.3646 -+{
86.3647 -+ register unsigned int i;
86.3648 -+ register int tmp;
86.3649 -+ register unsigned int avn;
86.3650 -+ register void **p_argv;
86.3651 -+ register char *argp;
86.3652 -+ register ffi_type **p_arg;
86.3653 -+ int greg, ireg;
86.3654 -+#if defined(__SH4__)
86.3655 -+ int freg = 0;
86.3656 -+#endif
86.3657 -+
86.3658 -+ tmp = 0;
86.3659 -+ argp = stack;
86.3660 -+
86.3661 -+ if (return_type (ecif->cif->rtype) == FFI_TYPE_STRUCT)
86.3662 -+ {
86.3663 -+ *(void **) argp = ecif->rvalue;
86.3664 -+ argp += 4;
86.3665 -+ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
86.3666 -+ }
86.3667 -+ else
86.3668 -+ ireg = 0;
86.3669 -+
86.3670 -+ /* Set arguments for registers. */
86.3671 -+ greg = ireg;
86.3672 -+ avn = ecif->cif->nargs;
86.3673 -+ p_argv = ecif->avalue;
86.3674 -+
86.3675 -+ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
86.3676 -+ {
86.3677 -+ size_t z;
86.3678 -+
86.3679 -+ z = (*p_arg)->size;
86.3680 -+ if (z < sizeof(int))
86.3681 -+ {
86.3682 -+ if (greg++ >= NGREGARG)
86.3683 -+ continue;
86.3684 -+
86.3685 -+ z = sizeof(int);
86.3686 -+ switch ((*p_arg)->type)
86.3687 -+ {
86.3688 -+ case FFI_TYPE_SINT8:
86.3689 -+ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
86.3690 -+ break;
86.3691 -+
86.3692 -+ case FFI_TYPE_UINT8:
86.3693 -+ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
86.3694 -+ break;
86.3695 -+
86.3696 -+ case FFI_TYPE_SINT16:
86.3697 -+ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
86.3698 -+ break;
86.3699 -+
86.3700 -+ case FFI_TYPE_UINT16:
86.3701 -+ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
86.3702 -+ break;
86.3703 -+
86.3704 -+ case FFI_TYPE_STRUCT:
86.3705 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
86.3706 -+ break;
86.3707 -+
86.3708 -+ default:
86.3709 -+ FFI_ASSERT(0);
86.3710 -+ }
86.3711 -+ argp += z;
86.3712 -+ }
86.3713 -+ else if (z == sizeof(int))
86.3714 -+ {
86.3715 -+#if defined(__SH4__)
86.3716 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
86.3717 -+ {
86.3718 -+ if (freg++ >= NFREGARG)
86.3719 -+ continue;
86.3720 -+ }
86.3721 -+ else
86.3722 -+#endif
86.3723 -+ {
86.3724 -+ if (greg++ >= NGREGARG)
86.3725 -+ continue;
86.3726 -+ }
86.3727 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
86.3728 -+ argp += z;
86.3729 -+ }
86.3730 -+#if defined(__SH4__)
86.3731 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
86.3732 -+ {
86.3733 -+ if (freg + 1 >= NFREGARG)
86.3734 -+ continue;
86.3735 -+ freg = (freg + 1) & ~1;
86.3736 -+ freg += 2;
86.3737 -+ memcpy (argp, *p_argv, z);
86.3738 -+ argp += z;
86.3739 -+ }
86.3740 -+#endif
86.3741 -+ else
86.3742 -+ {
86.3743 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
86.3744 -+#if defined(__SH4__)
86.3745 -+ if (greg + n - 1 >= NGREGARG)
86.3746 -+ continue;
86.3747 -+ greg += n;
86.3748 -+#else
86.3749 -+ if (greg >= NGREGARG)
86.3750 -+ continue;
86.3751 -+ else if (greg + n - 1 >= NGREGARG)
86.3752 -+ greg = NGREGARG;
86.3753 -+ else
86.3754 -+ greg += n;
86.3755 -+#endif
86.3756 -+ memcpy (argp, *p_argv, z);
86.3757 -+ argp += z;
86.3758 -+ }
86.3759 -+ }
86.3760 -+
86.3761 -+ /* Set arguments on stack. */
86.3762 -+ greg = ireg;
86.3763 -+#if defined(__SH4__)
86.3764 -+ freg = 0;
86.3765 -+#endif
86.3766 -+ p_argv = ecif->avalue;
86.3767 -+
86.3768 -+ for (i = 0, p_arg = ecif->cif->arg_types; i < avn; i++, p_arg++, p_argv++)
86.3769 -+ {
86.3770 -+ size_t z;
86.3771 -+
86.3772 -+ z = (*p_arg)->size;
86.3773 -+ if (z < sizeof(int))
86.3774 -+ {
86.3775 -+ if (greg++ < NGREGARG)
86.3776 -+ continue;
86.3777 -+
86.3778 -+ z = sizeof(int);
86.3779 -+ switch ((*p_arg)->type)
86.3780 -+ {
86.3781 -+ case FFI_TYPE_SINT8:
86.3782 -+ *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv);
86.3783 -+ break;
86.3784 -+
86.3785 -+ case FFI_TYPE_UINT8:
86.3786 -+ *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv);
86.3787 -+ break;
86.3788 -+
86.3789 -+ case FFI_TYPE_SINT16:
86.3790 -+ *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv);
86.3791 -+ break;
86.3792 -+
86.3793 -+ case FFI_TYPE_UINT16:
86.3794 -+ *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv);
86.3795 -+ break;
86.3796 -+
86.3797 -+ case FFI_TYPE_STRUCT:
86.3798 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
86.3799 -+ break;
86.3800 -+
86.3801 -+ default:
86.3802 -+ FFI_ASSERT(0);
86.3803 -+ }
86.3804 -+ argp += z;
86.3805 -+ }
86.3806 -+ else if (z == sizeof(int))
86.3807 -+ {
86.3808 -+#if defined(__SH4__)
86.3809 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
86.3810 -+ {
86.3811 -+ if (freg++ < NFREGARG)
86.3812 -+ continue;
86.3813 -+ }
86.3814 -+ else
86.3815 -+#endif
86.3816 -+ {
86.3817 -+ if (greg++ < NGREGARG)
86.3818 -+ continue;
86.3819 -+ }
86.3820 -+ *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv);
86.3821 -+ argp += z;
86.3822 -+ }
86.3823 -+#if defined(__SH4__)
86.3824 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
86.3825 -+ {
86.3826 -+ if (freg + 1 < NFREGARG)
86.3827 -+ {
86.3828 -+ freg = (freg + 1) & ~1;
86.3829 -+ freg += 2;
86.3830 -+ continue;
86.3831 -+ }
86.3832 -+ memcpy (argp, *p_argv, z);
86.3833 -+ argp += z;
86.3834 -+ }
86.3835 -+#endif
86.3836 -+ else
86.3837 -+ {
86.3838 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
86.3839 -+ if (greg + n - 1 < NGREGARG)
86.3840 -+ {
86.3841 -+ greg += n;
86.3842 -+ continue;
86.3843 -+ }
86.3844 -+#if (! defined(__SH4__))
86.3845 -+ else if (greg < NGREGARG)
86.3846 -+ {
86.3847 -+ greg = NGREGARG;
86.3848 -+ continue;
86.3849 -+ }
86.3850 -+#endif
86.3851 -+ memcpy (argp, *p_argv, z);
86.3852 -+ argp += z;
86.3853 -+ }
86.3854 -+ }
86.3855 -+
86.3856 -+ return;
86.3857 -+}
86.3858 -+
86.3859 -+/* Perform machine dependent cif processing */
86.3860 -+ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
86.3861 -+{
86.3862 -+ int i, j;
86.3863 -+ int size, type;
86.3864 -+ int n, m;
86.3865 -+ int greg;
86.3866 -+#if defined(__SH4__)
86.3867 -+ int freg = 0;
86.3868 -+#endif
86.3869 -+
86.3870 -+ cif->flags = 0;
86.3871 -+
86.3872 -+ greg = ((return_type (cif->rtype) == FFI_TYPE_STRUCT) &&
86.3873 -+ STRUCT_VALUE_ADDRESS_WITH_ARG) ? 1 : 0;
86.3874 -+
86.3875 -+#if defined(__SH4__)
86.3876 -+ for (i = j = 0; i < cif->nargs && j < 12; i++)
86.3877 -+ {
86.3878 -+ type = (cif->arg_types)[i]->type;
86.3879 -+ switch (type)
86.3880 -+ {
86.3881 -+ case FFI_TYPE_FLOAT:
86.3882 -+ if (freg >= NFREGARG)
86.3883 -+ continue;
86.3884 -+ freg++;
86.3885 -+ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
86.3886 -+ j++;
86.3887 -+ break;
86.3888 -+
86.3889 -+ case FFI_TYPE_DOUBLE:
86.3890 -+ if ((freg + 1) >= NFREGARG)
86.3891 -+ continue;
86.3892 -+ freg = (freg + 1) & ~1;
86.3893 -+ freg += 2;
86.3894 -+ cif->flags += ((cif->arg_types)[i]->type) << (2 * j);
86.3895 -+ j++;
86.3896 -+ break;
86.3897 -+
86.3898 -+ default:
86.3899 -+ size = (cif->arg_types)[i]->size;
86.3900 -+ n = (size + sizeof (int) - 1) / sizeof (int);
86.3901 -+ if (greg + n - 1 >= NGREGARG)
86.3902 -+ continue;
86.3903 -+ greg += n;
86.3904 -+ for (m = 0; m < n; m++)
86.3905 -+ cif->flags += FFI_TYPE_INT << (2 * j++);
86.3906 -+ break;
86.3907 -+ }
86.3908 -+ }
86.3909 -+#else
86.3910 -+ for (i = j = 0; i < cif->nargs && j < 4; i++)
86.3911 -+ {
86.3912 -+ size = (cif->arg_types)[i]->size;
86.3913 -+ n = (size + sizeof (int) - 1) / sizeof (int);
86.3914 -+ if (greg >= NGREGARG)
86.3915 -+ continue;
86.3916 -+ else if (greg + n - 1 >= NGREGARG)
86.3917 -+ greg = NGREGARG;
86.3918 -+ else
86.3919 -+ greg += n;
86.3920 -+ for (m = 0; m < n; m++)
86.3921 -+ cif->flags += FFI_TYPE_INT << (2 * j++);
86.3922 -+ }
86.3923 -+#endif
86.3924 -+
86.3925 -+ /* Set the return type flag */
86.3926 -+ switch (cif->rtype->type)
86.3927 -+ {
86.3928 -+ case FFI_TYPE_STRUCT:
86.3929 -+ cif->flags += (unsigned) (return_type (cif->rtype)) << 24;
86.3930 -+ break;
86.3931 -+
86.3932 -+ case FFI_TYPE_VOID:
86.3933 -+ case FFI_TYPE_FLOAT:
86.3934 -+ case FFI_TYPE_DOUBLE:
86.3935 -+ case FFI_TYPE_SINT64:
86.3936 -+ case FFI_TYPE_UINT64:
86.3937 -+ cif->flags += (unsigned) cif->rtype->type << 24;
86.3938 -+ break;
86.3939 -+
86.3940 -+ default:
86.3941 -+ cif->flags += FFI_TYPE_INT << 24;
86.3942 -+ break;
86.3943 -+ }
86.3944 -+
86.3945 -+ return FFI_OK;
86.3946 -+}
86.3947 -+
86.3948 -+/*@-declundef@*/
86.3949 -+/*@-exportheader@*/
86.3950 -+extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
86.3951 -+ /*@out@*/ extended_cif *,
86.3952 -+ unsigned, unsigned,
86.3953 -+ /*@out@*/ unsigned *,
86.3954 -+ void (*fn)());
86.3955 -+/*@=declundef@*/
86.3956 -+/*@=exportheader@*/
86.3957 -+
86.3958 -+void ffi_call(/*@dependent@*/ ffi_cif *cif,
86.3959 -+ void (*fn)(),
86.3960 -+ /*@out@*/ void *rvalue,
86.3961 -+ /*@dependent@*/ void **avalue)
86.3962 -+{
86.3963 -+ extended_cif ecif;
86.3964 -+
86.3965 -+ ecif.cif = cif;
86.3966 -+ ecif.avalue = avalue;
86.3967 -+
86.3968 -+ /* If the return value is a struct and we don't have a return */
86.3969 -+ /* value address then we need to make one */
86.3970 -+
86.3971 -+ if ((rvalue == NULL) &&
86.3972 -+ (cif->rtype->type == FFI_TYPE_STRUCT))
86.3973 -+ {
86.3974 -+ /*@-sysunrecog@*/
86.3975 -+ ecif.rvalue = alloca(cif->rtype->size);
86.3976 -+ /*@=sysunrecog@*/
86.3977 -+ }
86.3978 -+ else
86.3979 -+ ecif.rvalue = rvalue;
86.3980 -+
86.3981 -+
86.3982 -+ switch (cif->abi)
86.3983 -+ {
86.3984 -+ case FFI_SYSV:
86.3985 -+ /*@-usedef@*/
86.3986 -+ ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
86.3987 -+ cif->flags, ecif.rvalue, fn);
86.3988 -+ /*@=usedef@*/
86.3989 -+ break;
86.3990 -+ default:
86.3991 -+ FFI_ASSERT(0);
86.3992 -+ break;
86.3993 -+ }
86.3994 -+}
86.3995 -+
86.3996 -+extern void ffi_closure_SYSV (void);
86.3997 -+#if defined(__SH4__)
86.3998 -+extern void __ic_invalidate (void *line);
86.3999 -+#endif
86.4000 -+
86.4001 -+ffi_status
86.4002 -+ffi_prep_closure (ffi_closure* closure,
86.4003 -+ ffi_cif* cif,
86.4004 -+ void (*fun)(ffi_cif*, void*, void**, void*),
86.4005 -+ void *user_data)
86.4006 -+{
86.4007 -+ unsigned int *tramp;
86.4008 -+
86.4009 -+ FFI_ASSERT (cif->abi == FFI_GCC_SYSV);
86.4010 -+
86.4011 -+ tramp = (unsigned int *) &closure->tramp[0];
86.4012 -+#ifdef __LITTLE_ENDIAN__
86.4013 -+ tramp[0] = 0xd301d202;
86.4014 -+ tramp[1] = 0x0009422b;
86.4015 -+#else
86.4016 -+ tramp[0] = 0xd202d301;
86.4017 -+ tramp[1] = 0x422b0009;
86.4018 -+#endif
86.4019 -+ *(void **) &tramp[2] = (void *)closure; /* ctx */
86.4020 -+ *(void **) &tramp[3] = (void *)ffi_closure_SYSV; /* funaddr */
86.4021 -+
86.4022 -+ closure->cif = cif;
86.4023 -+ closure->fun = fun;
86.4024 -+ closure->user_data = user_data;
86.4025 -+
86.4026 -+#if defined(__SH4__)
86.4027 -+ /* Flush the icache. */
86.4028 -+ __ic_invalidate(&closure->tramp[0]);
86.4029 -+#endif
86.4030 -+
86.4031 -+ return FFI_OK;
86.4032 -+}
86.4033 -+
86.4034 -+/* Basically the trampoline invokes ffi_closure_SYSV, and on
86.4035 -+ * entry, r3 holds the address of the closure.
86.4036 -+ * After storing the registers that could possibly contain
86.4037 -+ * parameters to be passed into the stack frame and setting
86.4038 -+ * up space for a return value, ffi_closure_SYSV invokes the
86.4039 -+ * following helper function to do most of the work.
86.4040 -+ */
86.4041 -+
86.4042 -+#ifdef __LITTLE_ENDIAN__
86.4043 -+#define OFS_INT8 0
86.4044 -+#define OFS_INT16 2
86.4045 -+#else
86.4046 -+#define OFS_INT8 3
86.4047 -+#define OFS_INT16 2
86.4048 -+#endif
86.4049 -+
86.4050 -+int
86.4051 -+ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue,
86.4052 -+ unsigned long *pgr, unsigned long *pfr,
86.4053 -+ unsigned long *pst)
86.4054 -+{
86.4055 -+ void **avalue;
86.4056 -+ ffi_type **p_arg;
86.4057 -+ int i, avn;
86.4058 -+ int ireg, greg = 0;
86.4059 -+#if defined(__SH4__)
86.4060 -+ int freg = 0;
86.4061 -+#endif
86.4062 -+ ffi_cif *cif;
86.4063 -+ double temp;
86.4064 -+
86.4065 -+ cif = closure->cif;
86.4066 -+ avalue = alloca(cif->nargs * sizeof(void *));
86.4067 -+
86.4068 -+ /* Copy the caller's structure return value address so that the closure
86.4069 -+ returns the data directly to the caller. */
86.4070 -+ if (cif->rtype->type == FFI_TYPE_STRUCT)
86.4071 -+ {
86.4072 -+ rvalue = *pgr++;
86.4073 -+ ireg = STRUCT_VALUE_ADDRESS_WITH_ARG ? 1 : 0;
86.4074 -+ }
86.4075 -+ else
86.4076 -+ ireg = 0;
86.4077 -+
86.4078 -+ cif = closure->cif;
86.4079 -+ greg = ireg;
86.4080 -+ avn = cif->nargs;
86.4081 -+
86.4082 -+ /* Grab the addresses of the arguments from the stack frame. */
86.4083 -+ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
86.4084 -+ {
86.4085 -+ size_t z;
86.4086 -+
86.4087 -+ z = (*p_arg)->size;
86.4088 -+ if (z < sizeof(int))
86.4089 -+ {
86.4090 -+ if (greg++ >= NGREGARG)
86.4091 -+ continue;
86.4092 -+
86.4093 -+ z = sizeof(int);
86.4094 -+ switch ((*p_arg)->type)
86.4095 -+ {
86.4096 -+ case FFI_TYPE_SINT8:
86.4097 -+ case FFI_TYPE_UINT8:
86.4098 -+ avalue[i] = (((char *)pgr) + OFS_INT8);
86.4099 -+ break;
86.4100 -+
86.4101 -+ case FFI_TYPE_SINT16:
86.4102 -+ case FFI_TYPE_UINT16:
86.4103 -+ avalue[i] = (((char *)pgr) + OFS_INT16);
86.4104 -+ break;
86.4105 -+
86.4106 -+ case FFI_TYPE_STRUCT:
86.4107 -+ avalue[i] = pgr;
86.4108 -+ break;
86.4109 -+
86.4110 -+ default:
86.4111 -+ FFI_ASSERT(0);
86.4112 -+ }
86.4113 -+ pgr++;
86.4114 -+ }
86.4115 -+ else if (z == sizeof(int))
86.4116 -+ {
86.4117 -+#if defined(__SH4__)
86.4118 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
86.4119 -+ {
86.4120 -+ if (freg++ >= NFREGARG)
86.4121 -+ continue;
86.4122 -+ avalue[i] = pfr;
86.4123 -+ pfr++;
86.4124 -+ }
86.4125 -+ else
86.4126 -+#endif
86.4127 -+ {
86.4128 -+ if (greg++ >= NGREGARG)
86.4129 -+ continue;
86.4130 -+ avalue[i] = pgr;
86.4131 -+ pgr++;
86.4132 -+ }
86.4133 -+ }
86.4134 -+#if defined(__SH4__)
86.4135 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
86.4136 -+ {
86.4137 -+ if (freg + 1 >= NFREGARG)
86.4138 -+ continue;
86.4139 -+ freg = (freg + 1) & ~1;
86.4140 -+ freg += 2;
86.4141 -+ avalue[i] = pfr;
86.4142 -+ pfr += 2;
86.4143 -+ }
86.4144 -+#endif
86.4145 -+ else
86.4146 -+ {
86.4147 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
86.4148 -+#if defined(__SH4__)
86.4149 -+ if (greg + n - 1 >= NGREGARG)
86.4150 -+ continue;
86.4151 -+ greg += n;
86.4152 -+#else
86.4153 -+ if (greg >= NGREGARG)
86.4154 -+ continue;
86.4155 -+ else if (greg + n - 1 >= NGREGARG)
86.4156 -+ greg = NGREGARG;
86.4157 -+ else
86.4158 -+ greg += n;
86.4159 -+#endif
86.4160 -+ avalue[i] = pgr;
86.4161 -+ pgr += n;
86.4162 -+ }
86.4163 -+ }
86.4164 -+
86.4165 -+ greg = ireg;
86.4166 -+#if defined(__SH4__)
86.4167 -+ freg = 0;
86.4168 -+#endif
86.4169 -+
86.4170 -+ for (i = 0, p_arg = cif->arg_types; i < avn; i++, p_arg++)
86.4171 -+ {
86.4172 -+ size_t z;
86.4173 -+
86.4174 -+ z = (*p_arg)->size;
86.4175 -+ if (z < sizeof(int))
86.4176 -+ {
86.4177 -+ if (greg++ < NGREGARG)
86.4178 -+ continue;
86.4179 -+
86.4180 -+ z = sizeof(int);
86.4181 -+ switch ((*p_arg)->type)
86.4182 -+ {
86.4183 -+ case FFI_TYPE_SINT8:
86.4184 -+ case FFI_TYPE_UINT8:
86.4185 -+ avalue[i] = (((char *)pst) + OFS_INT8);
86.4186 -+ break;
86.4187 -+
86.4188 -+ case FFI_TYPE_SINT16:
86.4189 -+ case FFI_TYPE_UINT16:
86.4190 -+ avalue[i] = (((char *)pst) + OFS_INT16);
86.4191 -+ break;
86.4192 -+
86.4193 -+ case FFI_TYPE_STRUCT:
86.4194 -+ avalue[i] = pst;
86.4195 -+ break;
86.4196 -+
86.4197 -+ default:
86.4198 -+ FFI_ASSERT(0);
86.4199 -+ }
86.4200 -+ pst++;
86.4201 -+ }
86.4202 -+ else if (z == sizeof(int))
86.4203 -+ {
86.4204 -+#if defined(__SH4__)
86.4205 -+ if ((*p_arg)->type == FFI_TYPE_FLOAT)
86.4206 -+ {
86.4207 -+ if (freg++ < NFREGARG)
86.4208 -+ continue;
86.4209 -+ }
86.4210 -+ else
86.4211 -+#endif
86.4212 -+ {
86.4213 -+ if (greg++ < NGREGARG)
86.4214 -+ continue;
86.4215 -+ }
86.4216 -+ avalue[i] = pst;
86.4217 -+ pst++;
86.4218 -+ }
86.4219 -+#if defined(__SH4__)
86.4220 -+ else if ((*p_arg)->type == FFI_TYPE_DOUBLE)
86.4221 -+ {
86.4222 -+ if (freg + 1 < NFREGARG)
86.4223 -+ {
86.4224 -+ freg = (freg + 1) & ~1;
86.4225 -+ freg += 2;
86.4226 -+ continue;
86.4227 -+ }
86.4228 -+ avalue[i] = pst;
86.4229 -+ pst += 2;
86.4230 -+ }
86.4231 -+#endif
86.4232 -+ else
86.4233 -+ {
86.4234 -+ int n = (z + sizeof (int) - 1) / sizeof (int);
86.4235 -+ if (greg + n - 1 < NGREGARG)
86.4236 -+ {
86.4237 -+ greg += n;
86.4238 -+ continue;
86.4239 -+ }
86.4240 -+#if (! defined(__SH4__))
86.4241 -+ else if (greg < NGREGARG)
86.4242 -+ {
86.4243 -+ greg = NGREGARG;
86.4244 -+ continue;
86.4245 -+ }
86.4246 -+#endif
86.4247 -+ avalue[i] = pst;
86.4248 -+ pst += n;
86.4249 -+ }
86.4250 -+ }
86.4251 -+
86.4252 -+ (closure->fun) (cif, rvalue, avalue, closure->user_data);
86.4253 -+
86.4254 -+ /* Tell ffi_closure_osf how to perform return type promotions. */
86.4255 -+ return cif->rtype->type;
86.4256 -+}
86.4257 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sh/sysv.S gcc/libffi/src/sh/sysv.S
86.4258 ---- gcc-3.2.2.orig/libffi/src/sh/sysv.S Thu Jan 1 09:00:00 1970
86.4259 -+++ gcc/libffi/src/sh/sysv.S Tue Dec 17 03:22:48 2002
86.4260 -@@ -0,0 +1,773 @@
86.4261 -+/* -----------------------------------------------------------------------
86.4262 -+ sysv.S - Copyright (c) 2002 Kaz Kojima
86.4263 -+
86.4264 -+ SuperH Foreign Function Interface
86.4265 -+
86.4266 -+ Permission is hereby granted, free of charge, to any person obtaining
86.4267 -+ a copy of this software and associated documentation files (the
86.4268 -+ ``Software''), to deal in the Software without restriction, including
86.4269 -+ without limitation the rights to use, copy, modify, merge, publish,
86.4270 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.4271 -+ permit persons to whom the Software is furnished to do so, subject to
86.4272 -+ the following conditions:
86.4273 -+
86.4274 -+ The above copyright notice and this permission notice shall be included
86.4275 -+ in all copies or substantial portions of the Software.
86.4276 -+
86.4277 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.4278 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.4279 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.4280 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.4281 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.4282 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.4283 -+ OTHER DEALINGS IN THE SOFTWARE.
86.4284 -+ ----------------------------------------------------------------------- */
86.4285 -+
86.4286 -+#define LIBFFI_ASM
86.4287 -+#include <ffi.h>
86.4288 -+#ifdef HAVE_MACHINE_ASM_H
86.4289 -+#include <machine/asm.h>
86.4290 -+#else
86.4291 -+/* XXX these lose for some platforms, I'm sure. */
86.4292 -+#define CNAME(x) x
86.4293 -+#define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
86.4294 -+#endif
86.4295 -+
86.4296 -+#if defined(__HITACHI__)
86.4297 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 1
86.4298 -+#else
86.4299 -+#define STRUCT_VALUE_ADDRESS_WITH_ARG 0
86.4300 -+#endif
86.4301 -+
86.4302 -+.text
86.4303 -+
86.4304 -+ # r4: ffi_prep_args
86.4305 -+ # r5: &ecif
86.4306 -+ # r6: bytes
86.4307 -+ # r7: flags
86.4308 -+ # sp+0: rvalue
86.4309 -+ # sp+4: fn
86.4310 -+
86.4311 -+ # This assumes we are using gas.
86.4312 -+ENTRY(ffi_call_SYSV)
86.4313 -+ # Save registers
86.4314 -+.LFB1:
86.4315 -+ mov.l r8,@-r15
86.4316 -+.LCFI0:
86.4317 -+ mov.l r9,@-r15
86.4318 -+.LCFI1:
86.4319 -+ mov.l r10,@-r15
86.4320 -+.LCFI2:
86.4321 -+ mov.l r12,@-r15
86.4322 -+.LCFI3:
86.4323 -+ mov.l r14,@-r15
86.4324 -+.LCFI4:
86.4325 -+ sts.l pr,@-r15
86.4326 -+.LCFI5:
86.4327 -+ mov r15,r14
86.4328 -+.LCFI6:
86.4329 -+#if defined(__SH4__)
86.4330 -+ mov r6,r8
86.4331 -+ mov r7,r9
86.4332 -+
86.4333 -+ sub r6,r15
86.4334 -+ add #-16,r15
86.4335 -+ mov #~7,r0
86.4336 -+ and r0,r15
86.4337 -+
86.4338 -+ mov r4,r0
86.4339 -+ jsr @r0
86.4340 -+ mov r15,r4
86.4341 -+
86.4342 -+ mov r9,r1
86.4343 -+ shlr8 r9
86.4344 -+ shlr8 r9
86.4345 -+ shlr8 r9
86.4346 -+
86.4347 -+ mov #FFI_TYPE_STRUCT,r2
86.4348 -+ cmp/eq r2,r9
86.4349 -+ bf 1f
86.4350 -+#if STRUCT_VALUE_ADDRESS_WITH_ARG
86.4351 -+ mov.l @r15+,r4
86.4352 -+ bra 2f
86.4353 -+ mov #5,r2
86.4354 -+#else
86.4355 -+ mov.l @r15+,r10
86.4356 -+#endif
86.4357 -+1:
86.4358 -+ mov #4,r2
86.4359 -+2:
86.4360 -+ mov #4,r3
86.4361 -+
86.4362 -+L_pass:
86.4363 -+ cmp/pl r8
86.4364 -+ bf L_call_it
86.4365 -+
86.4366 -+ mov r1,r0
86.4367 -+ and #3,r0
86.4368 -+
86.4369 -+L_pass_d:
86.4370 -+ cmp/eq #FFI_TYPE_DOUBLE,r0
86.4371 -+ bf L_pass_f
86.4372 -+
86.4373 -+ mov r3,r0
86.4374 -+ and #1,r0
86.4375 -+ tst r0,r0
86.4376 -+ bt 1f
86.4377 -+ add #1,r3
86.4378 -+1:
86.4379 -+ mov r15,r0
86.4380 -+ and #7,r0
86.4381 -+ tst r0,r0
86.4382 -+ bt 2f
86.4383 -+ add #4,r15
86.4384 -+2:
86.4385 -+ mov #12,r0
86.4386 -+ cmp/hs r0,r3
86.4387 -+ bt/s 3f
86.4388 -+ shlr2 r1
86.4389 -+ bsr L_pop_d
86.4390 -+ nop
86.4391 -+3:
86.4392 -+ add #2,r3
86.4393 -+ bra L_pass
86.4394 -+ add #-8,r8
86.4395 -+
86.4396 -+L_pop_d:
86.4397 -+ mov r3,r0
86.4398 -+ add r0,r0
86.4399 -+ add r3,r0
86.4400 -+ add #-12,r0
86.4401 -+ braf r0
86.4402 -+ nop
86.4403 -+#ifdef __LITTLE_ENDIAN__
86.4404 -+ fmov.s @r15+,fr5
86.4405 -+ rts
86.4406 -+ fmov.s @r15+,fr4
86.4407 -+ fmov.s @r15+,fr7
86.4408 -+ rts
86.4409 -+ fmov.s @r15+,fr6
86.4410 -+ fmov.s @r15+,fr9
86.4411 -+ rts
86.4412 -+ fmov.s @r15+,fr8
86.4413 -+ fmov.s @r15+,fr11
86.4414 -+ rts
86.4415 -+ fmov.s @r15+,fr10
86.4416 -+#else
86.4417 -+ fmov.s @r15+,fr4
86.4418 -+ rts
86.4419 -+ fmov.s @r15+,fr5
86.4420 -+ fmov.s @r15+,fr6
86.4421 -+ rts
86.4422 -+ fmov.s @r15+,fr7
86.4423 -+ fmov.s @r15+,fr8
86.4424 -+ rts
86.4425 -+ fmov.s @r15+,fr9
86.4426 -+ fmov.s @r15+,fr10
86.4427 -+ rts
86.4428 -+ fmov.s @r15+,fr11
86.4429 -+#endif
86.4430 -+
86.4431 -+L_pass_f:
86.4432 -+ cmp/eq #FFI_TYPE_FLOAT,r0
86.4433 -+ bf L_pass_i
86.4434 -+
86.4435 -+ mov #12,r0
86.4436 -+ cmp/hs r0,r3
86.4437 -+ bt/s 2f
86.4438 -+ shlr2 r1
86.4439 -+ bsr L_pop_f
86.4440 -+ nop
86.4441 -+2:
86.4442 -+ add #1,r3
86.4443 -+ bra L_pass
86.4444 -+ add #-4,r8
86.4445 -+
86.4446 -+L_pop_f:
86.4447 -+ mov r3,r0
86.4448 -+ shll2 r0
86.4449 -+ add #-16,r0
86.4450 -+ braf r0
86.4451 -+ nop
86.4452 -+#ifdef __LITTLE_ENDIAN__
86.4453 -+ rts
86.4454 -+ fmov.s @r15+,fr5
86.4455 -+ rts
86.4456 -+ fmov.s @r15+,fr4
86.4457 -+ rts
86.4458 -+ fmov.s @r15+,fr7
86.4459 -+ rts
86.4460 -+ fmov.s @r15+,fr6
86.4461 -+ rts
86.4462 -+ fmov.s @r15+,fr9
86.4463 -+ rts
86.4464 -+ fmov.s @r15+,fr8
86.4465 -+ rts
86.4466 -+ fmov.s @r15+,fr11
86.4467 -+ rts
86.4468 -+ fmov.s @r15+,fr10
86.4469 -+#else
86.4470 -+ rts
86.4471 -+ fmov.s @r15+,fr4
86.4472 -+ rts
86.4473 -+ fmov.s @r15+,fr5
86.4474 -+ rts
86.4475 -+ fmov.s @r15+,fr6
86.4476 -+ rts
86.4477 -+ fmov.s @r15+,fr7
86.4478 -+ rts
86.4479 -+ fmov.s @r15+,fr8
86.4480 -+ rts
86.4481 -+ fmov.s @r15+,fr9
86.4482 -+ rts
86.4483 -+ fmov.s @r15+,fr10
86.4484 -+ rts
86.4485 -+ fmov.s @r15+,fr11
86.4486 -+#endif
86.4487 -+
86.4488 -+L_pass_i:
86.4489 -+ cmp/eq #FFI_TYPE_INT,r0
86.4490 -+ bf L_call_it
86.4491 -+
86.4492 -+ mov #8,r0
86.4493 -+ cmp/hs r0,r2
86.4494 -+ bt/s 2f
86.4495 -+ shlr2 r1
86.4496 -+ bsr L_pop_i
86.4497 -+ nop
86.4498 -+2:
86.4499 -+ add #1,r2
86.4500 -+ bra L_pass
86.4501 -+ add #-4,r8
86.4502 -+
86.4503 -+L_pop_i:
86.4504 -+ mov r2,r0
86.4505 -+ shll2 r0
86.4506 -+ add #-16,r0
86.4507 -+ braf r0
86.4508 -+ nop
86.4509 -+ rts
86.4510 -+ mov.l @r15+,r4
86.4511 -+ rts
86.4512 -+ mov.l @r15+,r5
86.4513 -+ rts
86.4514 -+ mov.l @r15+,r6
86.4515 -+ rts
86.4516 -+ mov.l @r15+,r7
86.4517 -+
86.4518 -+L_call_it:
86.4519 -+ # call function
86.4520 -+#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
86.4521 -+ mov r10, r2
86.4522 -+#endif
86.4523 -+ mov.l @(28,r14),r1
86.4524 -+ jsr @r1
86.4525 -+ nop
86.4526 -+
86.4527 -+L_ret_d:
86.4528 -+ mov #FFI_TYPE_DOUBLE,r2
86.4529 -+ cmp/eq r2,r9
86.4530 -+ bf L_ret_ll
86.4531 -+
86.4532 -+ mov.l @(24,r14),r1
86.4533 -+#ifdef __LITTLE_ENDIAN__
86.4534 -+ fmov.s fr1,@r1
86.4535 -+ add #4,r1
86.4536 -+ bra L_epilogue
86.4537 -+ fmov.s fr0,@r1
86.4538 -+#else
86.4539 -+ fmov.s fr0,@r1
86.4540 -+ add #4,r1
86.4541 -+ bra L_epilogue
86.4542 -+ fmov.s fr1,@r1
86.4543 -+#endif
86.4544 -+
86.4545 -+L_ret_ll:
86.4546 -+ mov #FFI_TYPE_SINT64,r2
86.4547 -+ cmp/eq r2,r9
86.4548 -+ bt/s 1f
86.4549 -+ mov #FFI_TYPE_UINT64,r2
86.4550 -+ cmp/eq r2,r9
86.4551 -+ bf L_ret_f
86.4552 -+
86.4553 -+1:
86.4554 -+ mov.l @(24,r14),r2
86.4555 -+ mov.l r0,@r2
86.4556 -+ bra L_epilogue
86.4557 -+ mov.l r1,@(4,r2)
86.4558 -+
86.4559 -+L_ret_f:
86.4560 -+ mov #FFI_TYPE_FLOAT,r2
86.4561 -+ cmp/eq r2,r9
86.4562 -+ bf L_ret_i
86.4563 -+
86.4564 -+ mov.l @(24,r14),r1
86.4565 -+ bra L_epilogue
86.4566 -+ fmov.s fr0,@r1
86.4567 -+
86.4568 -+L_ret_i:
86.4569 -+ mov #FFI_TYPE_INT,r2
86.4570 -+ cmp/eq r2,r9
86.4571 -+ bf L_epilogue
86.4572 -+
86.4573 -+ mov.l @(24,r14),r1
86.4574 -+ bra L_epilogue
86.4575 -+ mov.l r0,@r1
86.4576 -+
86.4577 -+L_epilogue:
86.4578 -+ # Remove the space we pushed for the args
86.4579 -+ mov r14,r15
86.4580 -+
86.4581 -+ lds.l @r15+,pr
86.4582 -+ mov.l @r15+,r14
86.4583 -+ mov.l @r15+,r12
86.4584 -+ mov.l @r15+,r10
86.4585 -+ mov.l @r15+,r9
86.4586 -+ rts
86.4587 -+ mov.l @r15+,r8
86.4588 -+#else
86.4589 -+ mov r6,r8
86.4590 -+ mov r7,r9
86.4591 -+
86.4592 -+ sub r6,r15
86.4593 -+ add #-16,r15
86.4594 -+ mov #~7,r0
86.4595 -+ and r0,r15
86.4596 -+
86.4597 -+ mov r4,r0
86.4598 -+ jsr @r0
86.4599 -+ mov r15,r4
86.4600 -+
86.4601 -+ mov r9,r3
86.4602 -+ shlr8 r9
86.4603 -+ shlr8 r9
86.4604 -+ shlr8 r9
86.4605 -+
86.4606 -+ mov #FFI_TYPE_STRUCT,r2
86.4607 -+ cmp/eq r2,r9
86.4608 -+ bf 1f
86.4609 -+#if STRUCT_VALUE_ADDRESS_WITH_ARG
86.4610 -+ mov.l @r15+,r4
86.4611 -+ bra 2f
86.4612 -+ mov #5,r2
86.4613 -+#else
86.4614 -+ mov.l @r15+,r10
86.4615 -+#endif
86.4616 -+1:
86.4617 -+ mov #4,r2
86.4618 -+2:
86.4619 -+
86.4620 -+L_pass:
86.4621 -+ cmp/pl r8
86.4622 -+ bf L_call_it
86.4623 -+
86.4624 -+ mov r3,r0
86.4625 -+ and #3,r0
86.4626 -+
86.4627 -+L_pass_d:
86.4628 -+ cmp/eq #FFI_TYPE_DOUBLE,r0
86.4629 -+ bf L_pass_i
86.4630 -+
86.4631 -+ mov r15,r0
86.4632 -+ and #7,r0
86.4633 -+ tst r0,r0
86.4634 -+ bt 1f
86.4635 -+ add #4,r15
86.4636 -+1:
86.4637 -+ mov #8,r0
86.4638 -+ cmp/hs r0,r2
86.4639 -+ bt/s 2f
86.4640 -+ shlr2 r3
86.4641 -+ bsr L_pop_d
86.4642 -+ nop
86.4643 -+2:
86.4644 -+ add #2,r2
86.4645 -+ bra L_pass
86.4646 -+ add #-8,r8
86.4647 -+
86.4648 -+L_pop_d:
86.4649 -+ mov r2,r0
86.4650 -+ add r0,r0
86.4651 -+ add r2,r0
86.4652 -+ add #-12,r0
86.4653 -+ add r0,r0
86.4654 -+ braf r0
86.4655 -+ nop
86.4656 -+ mov.l @r15+,r4
86.4657 -+ rts
86.4658 -+ mov.l @r15+,r5
86.4659 -+ mov.l @r15+,r5
86.4660 -+ rts
86.4661 -+ mov.l @r15+,r6
86.4662 -+ mov.l @r15+,r6
86.4663 -+ rts
86.4664 -+ mov.l @r15+,r7
86.4665 -+ rts
86.4666 -+ mov.l @r15+,r7
86.4667 -+
86.4668 -+L_pass_i:
86.4669 -+ mov #8,r0
86.4670 -+ cmp/hs r0,r2
86.4671 -+ bt/s 2f
86.4672 -+ shlr2 r3
86.4673 -+ bsr L_pop_i
86.4674 -+ nop
86.4675 -+2:
86.4676 -+ add #1,r2
86.4677 -+ bra L_pass
86.4678 -+ add #-4,r8
86.4679 -+
86.4680 -+L_pop_i:
86.4681 -+ mov r2,r0
86.4682 -+ shll2 r0
86.4683 -+ add #-16,r0
86.4684 -+ braf r0
86.4685 -+ nop
86.4686 -+ rts
86.4687 -+ mov.l @r15+,r4
86.4688 -+ rts
86.4689 -+ mov.l @r15+,r5
86.4690 -+ rts
86.4691 -+ mov.l @r15+,r6
86.4692 -+ rts
86.4693 -+ mov.l @r15+,r7
86.4694 -+
86.4695 -+L_call_it:
86.4696 -+ # call function
86.4697 -+#if (! STRUCT_VALUE_ADDRESS_WITH_ARG)
86.4698 -+ mov r10, r2
86.4699 -+#endif
86.4700 -+ mov.l @(28,r14),r1
86.4701 -+ jsr @r1
86.4702 -+ nop
86.4703 -+
86.4704 -+L_ret_d:
86.4705 -+ mov #FFI_TYPE_DOUBLE,r2
86.4706 -+ cmp/eq r2,r9
86.4707 -+ bf L_ret_ll
86.4708 -+
86.4709 -+ mov.l @(24,r14),r2
86.4710 -+ mov.l r0,@r2
86.4711 -+ bra L_epilogue
86.4712 -+ mov.l r1,@(4,r2)
86.4713 -+
86.4714 -+L_ret_ll:
86.4715 -+ mov #FFI_TYPE_SINT64,r2
86.4716 -+ cmp/eq r2,r9
86.4717 -+ bt/s 1f
86.4718 -+ mov #FFI_TYPE_UINT64,r2
86.4719 -+ cmp/eq r2,r9
86.4720 -+ bf L_ret_i
86.4721 -+
86.4722 -+1:
86.4723 -+ mov.l @(24,r14),r2
86.4724 -+ mov.l r0,@r2
86.4725 -+ bra L_epilogue
86.4726 -+ mov.l r1,@(4,r2)
86.4727 -+
86.4728 -+L_ret_i:
86.4729 -+ mov #FFI_TYPE_FLOAT,r2
86.4730 -+ cmp/eq r2,r9
86.4731 -+ bt 1f
86.4732 -+ mov #FFI_TYPE_INT,r2
86.4733 -+ cmp/eq r2,r9
86.4734 -+ bf L_epilogue
86.4735 -+1:
86.4736 -+ mov.l @(24,r14),r1
86.4737 -+ bra L_epilogue
86.4738 -+ mov.l r0,@r1
86.4739 -+
86.4740 -+L_epilogue:
86.4741 -+ # Remove the space we pushed for the args
86.4742 -+ mov r14,r15
86.4743 -+
86.4744 -+ lds.l @r15+,pr
86.4745 -+ mov.l @r15+,r14
86.4746 -+ mov.l @r15+,r12
86.4747 -+ mov.l @r15+,r10
86.4748 -+ mov.l @r15+,r9
86.4749 -+ rts
86.4750 -+ mov.l @r15+,r8
86.4751 -+#endif
86.4752 -+.LFE1:
86.4753 -+.ffi_call_SYSV_end:
86.4754 -+ .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
86.4755 -+
86.4756 -+.globl ffi_closure_helper_SYSV
86.4757 -+
86.4758 -+ENTRY(ffi_closure_SYSV)
86.4759 -+.LFB2:
86.4760 -+ mov.l r14,@-r15
86.4761 -+.LCFI7:
86.4762 -+ sts.l pr,@-r15
86.4763 -+
86.4764 -+ /* Stack layout:
86.4765 -+ ...
86.4766 -+ 32 bytes (floating register parameters, SH-4 only)
86.4767 -+ 16 bytes (register parameters)
86.4768 -+ 4 bytes (result)
86.4769 -+ 4 bytes (5th arg)
86.4770 -+ <- new stack pointer
86.4771 -+ */
86.4772 -+.LCFI8:
86.4773 -+#if defined(__SH4__)
86.4774 -+ add #-56,r15
86.4775 -+#else
86.4776 -+ add #-24,r15
86.4777 -+#endif
86.4778 -+.LCFI9:
86.4779 -+ mov r15,r14
86.4780 -+.LCFIA:
86.4781 -+ mov r14,r1
86.4782 -+ add #24,r1
86.4783 -+ mov.l r7,@-r1
86.4784 -+ mov.l r6,@-r1
86.4785 -+ mov.l r5,@-r1
86.4786 -+ mov.l r4,@-r1
86.4787 -+ mov r1,r6
86.4788 -+
86.4789 -+#if defined(__SH4__)
86.4790 -+ mov r14,r1
86.4791 -+ add #56,r1
86.4792 -+#ifdef __LITTLE_ENDIAN__
86.4793 -+ fmov.s fr10,@-r1
86.4794 -+ fmov.s fr11,@-r1
86.4795 -+ fmov.s fr8,@-r1
86.4796 -+ fmov.s fr9,@-r1
86.4797 -+ fmov.s fr6,@-r1
86.4798 -+ fmov.s fr7,@-r1
86.4799 -+ fmov.s fr4,@-r1
86.4800 -+ fmov.s fr5,@-r1
86.4801 -+#else
86.4802 -+ fmov.s fr11,@-r1
86.4803 -+ fmov.s fr10,@-r1
86.4804 -+ fmov.s fr9,@-r1
86.4805 -+ fmov.s fr8,@-r1
86.4806 -+ fmov.s fr7,@-r1
86.4807 -+ fmov.s fr6,@-r1
86.4808 -+ fmov.s fr5,@-r1
86.4809 -+ fmov.s fr4,@-r1
86.4810 -+#endif
86.4811 -+ mov r1,r7
86.4812 -+#endif
86.4813 -+
86.4814 -+ mov r14,r1
86.4815 -+ add #4,r1
86.4816 -+ mov r1,r5
86.4817 -+
86.4818 -+ mov r14,r1
86.4819 -+#if defined(__SH4__)
86.4820 -+ add #64,r1
86.4821 -+#else
86.4822 -+ add #32,r1
86.4823 -+#endif
86.4824 -+ mov.l r1,@r14
86.4825 -+
86.4826 -+ mov.l L_helper,r0
86.4827 -+ jsr @r0
86.4828 -+ mov r3,r4
86.4829 -+
86.4830 -+ shll r0
86.4831 -+ mov r0,r1
86.4832 -+ mova L_table,r0
86.4833 -+ add r1,r0
86.4834 -+ mov.w @r0,r0
86.4835 -+ mov r14,r2
86.4836 -+ braf r0
86.4837 -+ add #4,r2
86.4838 -+0:
86.4839 -+ .align 2
86.4840 -+L_helper:
86.4841 -+ .long ffi_closure_helper_SYSV
86.4842 -+L_table:
86.4843 -+ .short L_case_v - 0b /* FFI_TYPE_VOID */
86.4844 -+ .short L_case_i - 0b /* FFI_TYPE_INT */
86.4845 -+#if defined(__SH4__)
86.4846 -+ .short L_case_f - 0b /* FFI_TYPE_FLOAT */
86.4847 -+ .short L_case_d - 0b /* FFI_TYPE_DOUBLE */
86.4848 -+ .short L_case_d - 0b /* FFI_TYPE_LONGDOUBLE */
86.4849 -+#else
86.4850 -+ .short L_case_i - 0b /* FFI_TYPE_FLOAT */
86.4851 -+ .short L_case_ll - 0b /* FFI_TYPE_DOUBLE */
86.4852 -+ .short L_case_ll - 0b /* FFI_TYPE_LONGDOUBLE */
86.4853 -+#endif
86.4854 -+ .short L_case_uq - 0b /* FFI_TYPE_UINT8 */
86.4855 -+ .short L_case_q - 0b /* FFI_TYPE_SINT8 */
86.4856 -+ .short L_case_uh - 0b /* FFI_TYPE_UINT16 */
86.4857 -+ .short L_case_h - 0b /* FFI_TYPE_SINT16 */
86.4858 -+ .short L_case_i - 0b /* FFI_TYPE_UINT32 */
86.4859 -+ .short L_case_i - 0b /* FFI_TYPE_SINT32 */
86.4860 -+ .short L_case_ll - 0b /* FFI_TYPE_UINT64 */
86.4861 -+ .short L_case_ll - 0b /* FFI_TYPE_SINT64 */
86.4862 -+ .short L_case_v - 0b /* FFI_TYPE_STRUCT */
86.4863 -+ .short L_case_i - 0b /* FFI_TYPE_POINTER */
86.4864 -+
86.4865 -+#if defined(__SH4__)
86.4866 -+L_case_d:
86.4867 -+#ifdef __LITTLE_ENDIAN__
86.4868 -+ fmov.s @r2+,fr1
86.4869 -+ bra L_case_v
86.4870 -+ fmov.s @r2,fr0
86.4871 -+#else
86.4872 -+ fmov.s @r2+,fr0
86.4873 -+ bra L_case_v
86.4874 -+ fmov.s @r2,fr1
86.4875 -+#endif
86.4876 -+
86.4877 -+L_case_f:
86.4878 -+ bra L_case_v
86.4879 -+ fmov.s @r2,fr0
86.4880 -+#endif
86.4881 -+
86.4882 -+L_case_ll:
86.4883 -+ mov.l @r2+,r0
86.4884 -+ bra L_case_v
86.4885 -+ mov.l @r2,r1
86.4886 -+
86.4887 -+L_case_i:
86.4888 -+ bra L_case_v
86.4889 -+ mov.l @r2,r0
86.4890 -+
86.4891 -+L_case_q:
86.4892 -+#ifdef __LITTLE_ENDIAN__
86.4893 -+#else
86.4894 -+ add #3,r2
86.4895 -+#endif
86.4896 -+ bra L_case_v
86.4897 -+ mov.b @r2,r0
86.4898 -+
86.4899 -+L_case_uq:
86.4900 -+#ifdef __LITTLE_ENDIAN__
86.4901 -+#else
86.4902 -+ add #3,r2
86.4903 -+#endif
86.4904 -+ mov.b @r2,r0
86.4905 -+ bra L_case_v
86.4906 -+ extu.b r0,r0
86.4907 -+
86.4908 -+L_case_h:
86.4909 -+#ifdef __LITTLE_ENDIAN__
86.4910 -+#else
86.4911 -+ add #2,r2
86.4912 -+#endif
86.4913 -+ bra L_case_v
86.4914 -+ mov.w @r2,r0
86.4915 -+
86.4916 -+L_case_uh:
86.4917 -+#ifdef __LITTLE_ENDIAN__
86.4918 -+#else
86.4919 -+ add #2,r2
86.4920 -+#endif
86.4921 -+ mov.w @r2,r0
86.4922 -+ extu.w r0,r0
86.4923 -+ /* fall through */
86.4924 -+
86.4925 -+L_case_v:
86.4926 -+#if defined(__SH4__)
86.4927 -+ add #56,r15
86.4928 -+#else
86.4929 -+ add #24,r15
86.4930 -+#endif
86.4931 -+ lds.l @r15+,pr
86.4932 -+ rts
86.4933 -+ mov.l @r15+,r14
86.4934 -+.LFE2:
86.4935 -+.ffi_closure_SYSV_end:
86.4936 -+ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
86.4937 -+
86.4938 -+ .section ".eh_frame","aw",@progbits
86.4939 -+__FRAME_BEGIN__:
86.4940 -+ .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */
86.4941 -+.LSCIE1:
86.4942 -+ .4byte 0x0 /* CIE Identifier Tag */
86.4943 -+ .byte 0x1 /* CIE Version */
86.4944 -+ .byte 0x0 /* CIE Augmentation */
86.4945 -+ .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */
86.4946 -+ .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */
86.4947 -+ .byte 0x11 /* CIE RA Column */
86.4948 -+ .byte 0xc /* DW_CFA_def_cfa */
86.4949 -+ .byte 0xf /* uleb128 0xf */
86.4950 -+ .byte 0x0 /* uleb128 0x0 */
86.4951 -+ .align 2
86.4952 -+.LECIE1:
86.4953 -+.LSFDE1:
86.4954 -+ .4byte .LEFDE1-.LASFDE1 /* FDE Length */
86.4955 -+.LASFDE1:
86.4956 -+ .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */
86.4957 -+ .4byte .LFB1 /* FDE initial location */
86.4958 -+ .4byte .LFE1-.LFB1 /* FDE address range */
86.4959 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4960 -+ .4byte .LCFI0-.LFB1
86.4961 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4962 -+ .byte 0x4 /* uleb128 0x4 */
86.4963 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4964 -+ .4byte .LCFI1-.LCFI0
86.4965 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4966 -+ .byte 0x8 /* uleb128 0x4 */
86.4967 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4968 -+ .4byte .LCFI2-.LCFI1
86.4969 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4970 -+ .byte 0xc /* uleb128 0x4 */
86.4971 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4972 -+ .4byte .LCFI3-.LCFI2
86.4973 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4974 -+ .byte 0x10 /* uleb128 0x4 */
86.4975 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4976 -+ .4byte .LCFI4-.LCFI3
86.4977 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4978 -+ .byte 0x14 /* uleb128 0x4 */
86.4979 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4980 -+ .4byte .LCFI5-.LCFI4
86.4981 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.4982 -+ .byte 0x18 /* uleb128 0x4 */
86.4983 -+ .byte 0x91 /* DW_CFA_offset, column 0x11 */
86.4984 -+ .byte 0x6 /* uleb128 0x6 */
86.4985 -+ .byte 0x8e /* DW_CFA_offset, column 0xe */
86.4986 -+ .byte 0x5 /* uleb128 0x5 */
86.4987 -+ .byte 0x8c /* DW_CFA_offset, column 0xc */
86.4988 -+ .byte 0x4 /* uleb128 0x4 */
86.4989 -+ .byte 0x8a /* DW_CFA_offset, column 0xa */
86.4990 -+ .byte 0x3 /* uleb128 0x3 */
86.4991 -+ .byte 0x89 /* DW_CFA_offset, column 0x9 */
86.4992 -+ .byte 0x2 /* uleb128 0x2 */
86.4993 -+ .byte 0x88 /* DW_CFA_offset, column 0x8 */
86.4994 -+ .byte 0x1 /* uleb128 0x1 */
86.4995 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.4996 -+ .4byte .LCFI6-.LCFI5
86.4997 -+ .byte 0xd /* DW_CFA_def_cfa_register */
86.4998 -+ .byte 0xe /* uleb128 0xe */
86.4999 -+ .align 2
86.5000 -+.LEFDE1:
86.5001 -+
86.5002 -+.LSFDE3:
86.5003 -+ .4byte .LEFDE3-.LASFDE3 /* FDE Length */
86.5004 -+.LASFDE3:
86.5005 -+ .4byte .LASFDE3-__FRAME_BEGIN__ /* FDE CIE offset */
86.5006 -+ .4byte .LFB2 /* FDE initial location */
86.5007 -+ .4byte .LFE2-.LFB2 /* FDE address range */
86.5008 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.5009 -+ .4byte .LCFI7-.LFB2
86.5010 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.5011 -+ .byte 0x4 /* uleb128 0x4 */
86.5012 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.5013 -+ .4byte .LCFI8-.LCFI7
86.5014 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.5015 -+ .byte 0x8 /* uleb128 0x8 */
86.5016 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.5017 -+ .4byte .LCFI9-.LCFI8
86.5018 -+ .byte 0xe /* DW_CFA_def_cfa_offset */
86.5019 -+#if defined(__SH4__)
86.5020 -+ .byte 8+56 /* uleb128 8+56 */
86.5021 -+#else
86.5022 -+ .byte 8+24 /* uleb128 8+24 */
86.5023 -+#endif
86.5024 -+ .byte 0x91 /* DW_CFA_offset, column 0x11 */
86.5025 -+ .byte 0x2
86.5026 -+ .byte 0x8e /* DW_CFA_offset, column 0xe */
86.5027 -+ .byte 0x1
86.5028 -+ .byte 0x4 /* DW_CFA_advance_loc4 */
86.5029 -+ .4byte .LCFIA-.LCFI9
86.5030 -+ .byte 0xd /* DW_CFA_def_cfa_register */
86.5031 -+ .byte 0xe /* uleb128 0xe */
86.5032 -+ .align 2
86.5033 -+.LEFDE3:
86.5034 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/ffi.c gcc/libffi/src/sparc/ffi.c
86.5035 ---- gcc-3.2.2.orig/libffi/src/sparc/ffi.c Sat Mar 3 07:21:23 2001
86.5036 -+++ gcc/libffi/src/sparc/ffi.c Sat Jan 4 08:08:56 2003
86.5037 -@@ -1,5 +1,5 @@
86.5038 - /* -----------------------------------------------------------------------
86.5039 -- ffi.c - Copyright (c) 1996 Cygnus Solutions
86.5040 -+ ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions
86.5041 -
86.5042 - Sparc Foreign Function Interface
86.5043 -
86.5044 -@@ -28,20 +28,22 @@
86.5045 -
86.5046 - #include <stdlib.h>
86.5047 -
86.5048 -+#ifdef SPARC64
86.5049 -+extern void ffi_closure_v9(void);
86.5050 -+#else
86.5051 -+extern void ffi_closure_v8(void);
86.5052 -+#endif
86.5053 -+
86.5054 - /* ffi_prep_args is called by the assembly routine once stack space
86.5055 - has been allocated for the function's arguments */
86.5056 -
86.5057 - void ffi_prep_args_v8(char *stack, extended_cif *ecif)
86.5058 - {
86.5059 - int i;
86.5060 -- int tmp;
86.5061 -- int avn;
86.5062 - void **p_argv;
86.5063 - char *argp;
86.5064 - ffi_type **p_arg;
86.5065 -
86.5066 -- tmp = 0;
86.5067 --
86.5068 - /* Skip 16 words for the window save area */
86.5069 - argp = stack + 16*sizeof(int);
86.5070 -
86.5071 -@@ -66,18 +68,12 @@
86.5072 - ((int*)argp)[5] = 0;
86.5073 - #endif
86.5074 -
86.5075 -- avn = ecif->cif->nargs;
86.5076 - p_argv = ecif->avalue;
86.5077 -
86.5078 -- for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types;
86.5079 -- i && avn;
86.5080 -- i--, p_arg++)
86.5081 -+ for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++)
86.5082 - {
86.5083 - size_t z;
86.5084 -
86.5085 -- if (avn)
86.5086 -- {
86.5087 -- avn--;
86.5088 - if ((*p_arg)->type == FFI_TYPE_STRUCT
86.5089 - #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
86.5090 - || (*p_arg)->type == FFI_TYPE_LONGDOUBLE
86.5091 -@@ -122,7 +118,6 @@
86.5092 - }
86.5093 - p_argv++;
86.5094 - argp += z;
86.5095 -- }
86.5096 - }
86.5097 -
86.5098 - return;
86.5099 -@@ -420,3 +415,101 @@
86.5100 - }
86.5101 -
86.5102 - }
86.5103 -+
86.5104 -+ffi_status
86.5105 -+ffi_prep_closure (ffi_closure* closure,
86.5106 -+ ffi_cif* cif,
86.5107 -+ void (*fun)(ffi_cif*, void*, void**, void*),
86.5108 -+ void *user_data)
86.5109 -+{
86.5110 -+ unsigned int *tramp = (unsigned int *) &closure->tramp[0];
86.5111 -+ unsigned long fn;
86.5112 -+ unsigned long ctx = (unsigned long) closure;
86.5113 -+
86.5114 -+#ifdef SPARC64
86.5115 -+ /* Trampoline address is equal to the closure address. We take advantage
86.5116 -+ of that to reduce the trampoline size by 8 bytes. */
86.5117 -+ FFI_ASSERT (cif->abi == FFI_V9);
86.5118 -+ fn = (unsigned long) ffi_closure_v9;
86.5119 -+ tramp[0] = 0x83414000; /* rd %pc, %g1 */
86.5120 -+ tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */
86.5121 -+ tramp[2] = 0x81c14000; /* jmp %g5 */
86.5122 -+ tramp[3] = 0x01000000; /* nop */
86.5123 -+ *((unsigned long *) &tramp[4]) = fn;
86.5124 -+#else
86.5125 -+ FFI_ASSERT (cif->abi == FFI_V8);
86.5126 -+ fn = (unsigned long) ffi_closure_v8;
86.5127 -+ tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */
86.5128 -+ tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */
86.5129 -+ tramp[2] = 0x81c06000 | (fn & 0x3ff); /* jmp %g1+%lo(fn) */
86.5130 -+ tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or %g2, %lo(ctx) */
86.5131 -+#endif
86.5132 -+
86.5133 -+ closure->cif = cif;
86.5134 -+ closure->fun = fun;
86.5135 -+ closure->user_data = user_data;
86.5136 -+
86.5137 -+ /* Flush the Icache. FIXME: alignment isn't certain, assume 8 bytes */
86.5138 -+#ifdef SPARC64
86.5139 -+ asm volatile ("flush %0" : : "r" (closure) : "memory");
86.5140 -+ asm volatile ("flush %0" : : "r" (((char *) closure) + 8) : "memory");
86.5141 -+#else
86.5142 -+ asm volatile ("iflush %0" : : "r" (closure) : "memory");
86.5143 -+ asm volatile ("iflush %0" : : "r" (((char *) closure) + 8) : "memory");
86.5144 -+#endif
86.5145 -+
86.5146 -+ return FFI_OK;
86.5147 -+}
86.5148 -+
86.5149 -+int
86.5150 -+ffi_closure_sparc_inner(ffi_closure *closure,
86.5151 -+ void *rvalue, unsigned long *gpr, double *fpr)
86.5152 -+{
86.5153 -+ ffi_cif *cif;
86.5154 -+ void **avalue;
86.5155 -+ ffi_type **arg_types;
86.5156 -+ int i, avn, argn;
86.5157 -+
86.5158 -+ cif = closure->cif;
86.5159 -+ avalue = alloca(cif->nargs * sizeof(void *));
86.5160 -+
86.5161 -+ argn = 0;
86.5162 -+
86.5163 -+ /* Copy the caller's structure return address to that the closure
86.5164 -+ returns the data directly to the caller. */
86.5165 -+ if (cif->flags == FFI_TYPE_STRUCT)
86.5166 -+ {
86.5167 -+ rvalue = (void *) gpr[0];
86.5168 -+ argn = 1;
86.5169 -+ }
86.5170 -+
86.5171 -+ i = 0;
86.5172 -+ avn = cif->nargs;
86.5173 -+ arg_types = cif->arg_types;
86.5174 -+
86.5175 -+ /* Grab the addresses of the arguments from the stack frame. */
86.5176 -+ while (i < avn)
86.5177 -+ {
86.5178 -+ /* Assume big-endian. FIXME */
86.5179 -+ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
86.5180 -+
86.5181 -+#ifdef SPARC64
86.5182 -+ if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT
86.5183 -+ || arg_types[i]->type == FFI_TYPE_DOUBLE
86.5184 -+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
86.5185 -+ || arg_types[i]->type == FFI_TYPE_LONGDOUBLE
86.5186 -+#endif
86.5187 -+ ))
86.5188 -+ avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size;
86.5189 -+ else
86.5190 -+#endif
86.5191 -+ avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size;
86.5192 -+ i++;
86.5193 -+ }
86.5194 -+
86.5195 -+ /* Invoke the closure. */
86.5196 -+ (closure->fun) (cif, rvalue, avalue, closure->user_data);
86.5197 -+
86.5198 -+ /* Tell ffi_closure_sparc how to perform return type promotions. */
86.5199 -+ return cif->rtype->type;
86.5200 -+}
86.5201 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v8.S gcc/libffi/src/sparc/v8.S
86.5202 ---- gcc-3.2.2.orig/libffi/src/sparc/v8.S Mon Apr 29 05:12:04 2002
86.5203 -+++ gcc/libffi/src/sparc/v8.S Sat Jan 4 08:08:56 2003
86.5204 -@@ -1,5 +1,5 @@
86.5205 - /* -----------------------------------------------------------------------
86.5206 -- v8.S - Copyright (c) 1996, 1997 Cygnus Solutions
86.5207 -+ v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions
86.5208 -
86.5209 - Sparc Foreign Function Interface
86.5210 -
86.5211 -@@ -94,6 +94,72 @@
86.5212 - .ffi_call_V8_end:
86.5213 - .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8
86.5214 -
86.5215 -+
86.5216 -+#define STACKFRAME 104 /* 16*4 register window +
86.5217 -+ 1*4 struct return +
86.5218 -+ 6*4 args backing store +
86.5219 -+ 3*4 locals */
86.5220 -+
86.5221 -+/* ffi_closure_v8(...)
86.5222 -+
86.5223 -+ Receives the closure argument in %g2. */
86.5224 -+
86.5225 -+ .text
86.5226 -+ .align 8
86.5227 -+ .globl ffi_closure_v8
86.5228 -+
86.5229 -+ffi_closure_v8:
86.5230 -+ .register %g2, #scratch
86.5231 -+.LLFB2:
86.5232 -+ save %sp, -STACKFRAME, %sp
86.5233 -+.LLCFI1:
86.5234 -+
86.5235 -+ ! Store all of the potential argument registers in va_list format.
86.5236 -+ st %i0, [%fp+68+0]
86.5237 -+ st %i1, [%fp+68+4]
86.5238 -+ st %i2, [%fp+68+8]
86.5239 -+ st %i3, [%fp+68+12]
86.5240 -+ st %i4, [%fp+68+16]
86.5241 -+ st %i5, [%fp+68+20]
86.5242 -+
86.5243 -+ ! Call ffi_closure_sparc_inner to do the bulk of the work.
86.5244 -+ mov %g2, %o0
86.5245 -+ add %fp, -8, %o1
86.5246 -+ add %fp, 68, %o2
86.5247 -+ call ffi_closure_sparc_inner
86.5248 -+ mov 0, %o3
86.5249 -+
86.5250 -+ ! Load up the return value in the proper type.
86.5251 -+ cmp %o0, FFI_TYPE_VOID
86.5252 -+ be done1
86.5253 -+
86.5254 -+ cmp %o0, FFI_TYPE_FLOAT
86.5255 -+ be,a done1
86.5256 -+ ld [%fp-8], %f0
86.5257 -+
86.5258 -+ cmp %o0, FFI_TYPE_DOUBLE
86.5259 -+ be,a done1
86.5260 -+ ldd [%fp-8], %f0
86.5261 -+
86.5262 -+ cmp %o0, FFI_TYPE_SINT64
86.5263 -+ be,a integer
86.5264 -+ ld [%fp-4], %i1
86.5265 -+
86.5266 -+ cmp %o0, FFI_TYPE_UINT64
86.5267 -+ be,a integer
86.5268 -+ ld [%fp-4], %i1
86.5269 -+
86.5270 -+integer:
86.5271 -+ ld [%fp-8], %i0
86.5272 -+
86.5273 -+done1:
86.5274 -+ ret
86.5275 -+ restore
86.5276 -+.LLFE2:
86.5277 -+
86.5278 -+.ffi_closure_v8_end:
86.5279 -+ .size ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8
86.5280 -+
86.5281 - #ifdef SPARC64
86.5282 - #define WS 8
86.5283 - #define nword xword
86.5284 -@@ -148,3 +214,26 @@
86.5285 - .byte 0x1f ! uleb128 0x1f
86.5286 - .align WS
86.5287 - .LLEFDE1:
86.5288 -+.LLSFDE2:
86.5289 -+ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
86.5290 -+.LLASFDE2:
86.5291 -+ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
86.5292 -+#ifdef HAVE_AS_SPARC_UA_PCREL
86.5293 -+ .uaword %r_disp32(.LLFB2)
86.5294 -+ .uaword .LLFE2-.LLFB2 ! FDE address range
86.5295 -+#else
86.5296 -+ .align WS
86.5297 -+ .nword .LLFB2
86.5298 -+ .uanword .LLFE2-.LLFB2 ! FDE address range
86.5299 -+#endif
86.5300 -+ .byte 0x0 ! uleb128 0x0; Augmentation size
86.5301 -+ .byte 0x4 ! DW_CFA_advance_loc4
86.5302 -+ .uaword .LLCFI1-.LLFB2
86.5303 -+ .byte 0xd ! DW_CFA_def_cfa_register
86.5304 -+ .byte 0x1e ! uleb128 0x1e
86.5305 -+ .byte 0x2d ! DW_CFA_GNU_window_save
86.5306 -+ .byte 0x9 ! DW_CFA_register
86.5307 -+ .byte 0xf ! uleb128 0xf
86.5308 -+ .byte 0x1f ! uleb128 0x1f
86.5309 -+ .align WS
86.5310 -+.LLEFDE2:
86.5311 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/sparc/v9.S gcc/libffi/src/sparc/v9.S
86.5312 ---- gcc-3.2.2.orig/libffi/src/sparc/v9.S Mon Apr 29 05:12:04 2002
86.5313 -+++ gcc/libffi/src/sparc/v9.S Sat Jan 4 08:08:56 2003
86.5314 -@@ -1,5 +1,5 @@
86.5315 - /* -----------------------------------------------------------------------
86.5316 -- v9.S - Copyright (c) 2000 Cygnus Solutions
86.5317 -+ v9.S - Copyright (c) 2000, 2003 Cygnus Solutions
86.5318 -
86.5319 - Sparc 64bit Foreign Function Interface
86.5320 -
86.5321 -@@ -99,7 +99,7 @@
86.5322 - cmp %i3, FFI_TYPE_STRUCT
86.5323 - be,pn %icc, dostruct
86.5324 -
86.5325 -- cmp %i3, FFI_TYPE_LONGDOUBLE
86.5326 -+ cmp %i3, FFI_TYPE_LONGDOUBLE
86.5327 - bne,pt %icc, done
86.5328 - nop
86.5329 - std %f0, [%i4+0]
86.5330 -@@ -125,6 +125,88 @@
86.5331 - .ffi_call_V9_end:
86.5332 - .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9
86.5333 -
86.5334 -+
86.5335 -+#define STACKFRAME 240 /* 16*8 register window +
86.5336 -+ 6*8 args backing store +
86.5337 -+ 8*8 locals */
86.5338 -+#define FP %fp+STACK_BIAS
86.5339 -+
86.5340 -+/* ffi_closure_v9(...)
86.5341 -+
86.5342 -+ Receives the closure argument in %g1. */
86.5343 -+
86.5344 -+ .text
86.5345 -+ .align 8
86.5346 -+ .globl ffi_closure_v9
86.5347 -+
86.5348 -+ffi_closure_v9:
86.5349 -+.LLFB2:
86.5350 -+ save %sp, -STACKFRAME, %sp
86.5351 -+.LLCFI1:
86.5352 -+
86.5353 -+ ! Store all of the potential argument registers in va_list format.
86.5354 -+ stx %i0, [FP+128+0]
86.5355 -+ stx %i1, [FP+128+8]
86.5356 -+ stx %i2, [FP+128+16]
86.5357 -+ stx %i3, [FP+128+24]
86.5358 -+ stx %i4, [FP+128+32]
86.5359 -+ stx %i5, [FP+128+40]
86.5360 -+
86.5361 -+ ! Store possible floating point argument registers too.
86.5362 -+ std %f0, [FP-48]
86.5363 -+ std %f2, [FP-40]
86.5364 -+ std %f4, [FP-32]
86.5365 -+ std %f6, [FP-24]
86.5366 -+ std %f8, [FP-16]
86.5367 -+ std %f10, [FP-8]
86.5368 -+
86.5369 -+ ! Call ffi_closure_sparc_inner to do the bulk of the work.
86.5370 -+ mov %g1, %o0
86.5371 -+ add %fp, STACK_BIAS-64, %o1
86.5372 -+ add %fp, STACK_BIAS+128, %o2
86.5373 -+ call ffi_closure_sparc_inner
86.5374 -+ add %fp, STACK_BIAS-48, %o3
86.5375 -+
86.5376 -+ ! Load up the return value in the proper type.
86.5377 -+ cmp %o0, FFI_TYPE_VOID
86.5378 -+ be,pn %icc, done1
86.5379 -+
86.5380 -+ cmp %o0, FFI_TYPE_FLOAT
86.5381 -+ be,a,pn %icc, done1
86.5382 -+ ld [FP-64], %f0
86.5383 -+
86.5384 -+ cmp %o0, FFI_TYPE_DOUBLE
86.5385 -+ be,a,pn %icc, done1
86.5386 -+ ldd [FP-64], %f0
86.5387 -+
86.5388 -+ cmp %o0, FFI_TYPE_LONGDOUBLE
86.5389 -+ be,a,pn %icc, longdouble1
86.5390 -+ ldd [FP-64], %f0
86.5391 -+
86.5392 -+ cmp %o0, FFI_TYPE_STRUCT
86.5393 -+ be,pn %icc, struct1
86.5394 -+
86.5395 -+ ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER
86.5396 -+ ldx [FP-64], %i0
86.5397 -+
86.5398 -+done1:
86.5399 -+ ret
86.5400 -+ restore
86.5401 -+
86.5402 -+struct1:
86.5403 -+ ldx [FP-56], %i2
86.5404 -+ ret
86.5405 -+ restore
86.5406 -+
86.5407 -+longdouble1:
86.5408 -+ ldd [FP-56], %f2
86.5409 -+ ret
86.5410 -+ restore
86.5411 -+.LLFE2:
86.5412 -+
86.5413 -+.ffi_closure_v9_end:
86.5414 -+ .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9
86.5415 -+
86.5416 - .section ".eh_frame",#alloc,#write
86.5417 - .LLframe1:
86.5418 - .uaword .LLECIE1-.LLSCIE1 ! Length of Common Information Entry
86.5419 -@@ -169,5 +251,27 @@
86.5420 - .byte 0x1f ! uleb128 0x1f
86.5421 - .align 8
86.5422 - .LLEFDE1:
86.5423 --
86.5424 -+.LLSFDE2:
86.5425 -+ .uaword .LLEFDE2-.LLASFDE2 ! FDE Length
86.5426 -+.LLASFDE2:
86.5427 -+ .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset
86.5428 -+#ifdef HAVE_AS_SPARC_UA_PCREL
86.5429 -+ .uaword %r_disp32(.LLFB2)
86.5430 -+ .uaword .LLFE2-.LLFB2 ! FDE address range
86.5431 -+#else
86.5432 -+ .align 8
86.5433 -+ .xword .LLFB2
86.5434 -+ .uaxword .LLFE2-.LLFB2 ! FDE address range
86.5435 -+#endif
86.5436 -+ .byte 0x0 ! uleb128 0x0; Augmentation size
86.5437 -+ .byte 0x4 ! DW_CFA_advance_loc4
86.5438 -+ .uaword .LLCFI1-.LLFB2
86.5439 -+ .byte 0xd ! DW_CFA_def_cfa_register
86.5440 -+ .byte 0x1e ! uleb128 0x1e
86.5441 -+ .byte 0x2d ! DW_CFA_GNU_window_save
86.5442 -+ .byte 0x9 ! DW_CFA_register
86.5443 -+ .byte 0xf ! uleb128 0xf
86.5444 -+ .byte 0x1f ! uleb128 0x1f
86.5445 -+ .align 8
86.5446 -+.LLEFDE2:
86.5447 - #endif
86.5448 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/types.c gcc/libffi/src/types.c
86.5449 ---- gcc-3.2.2.orig/libffi/src/types.c Tue Mar 27 11:39:16 2001
86.5450 -+++ gcc/libffi/src/types.c Wed Nov 27 07:24:05 2002
86.5451 -@@ -42,7 +42,8 @@
86.5452 - FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32);
86.5453 - FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT);
86.5454 -
86.5455 --#if defined ALPHA || defined SPARC64
86.5456 -+#if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \
86.5457 -+ || defined IA64
86.5458 -
86.5459 - FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER);
86.5460 -
86.5461 -@@ -52,22 +53,12 @@
86.5462 -
86.5463 - #endif
86.5464 -
86.5465 --#ifdef X86
86.5466 -+#if defined X86 || defined X86_WIN32 || defined ARM || defined M68K
86.5467 -
86.5468 - FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
86.5469 - FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
86.5470 -
86.5471 --#elif defined X86_WIN32
86.5472 --
86.5473 --FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
86.5474 --FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
86.5475 --
86.5476 --#elif defined ARM
86.5477 --
86.5478 --FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
86.5479 --FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
86.5480 --
86.5481 --#elif defined M68K
86.5482 -+#elif defined SH
86.5483 -
86.5484 - FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64);
86.5485 - FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64);
86.5486 -@@ -80,12 +71,7 @@
86.5487 - #endif
86.5488 -
86.5489 -
86.5490 --#ifdef X86
86.5491 --
86.5492 --FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
86.5493 --FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
86.5494 --
86.5495 --#elif defined X86_WIN32
86.5496 -+#if defined X86 || defined X86_WIN32 || defined M68K
86.5497 -
86.5498 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
86.5499 - FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
86.5500 -@@ -95,25 +81,25 @@
86.5501 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
86.5502 - FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
86.5503 -
86.5504 --#elif defined M68K
86.5505 -+#elif defined SH
86.5506 -
86.5507 - FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE);
86.5508 --FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);
86.5509 -+FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE);
86.5510 -
86.5511 - #elif defined SPARC
86.5512 -
86.5513 - FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
86.5514 --
86.5515 - #ifdef SPARC64
86.5516 --
86.5517 - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
86.5518 --
86.5519 - #else
86.5520 --
86.5521 - FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);
86.5522 --
86.5523 - #endif
86.5524 -
86.5525 -+#elif defined X86_64
86.5526 -+
86.5527 -+FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
86.5528 -+FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE);
86.5529 -+
86.5530 - #else
86.5531 -
86.5532 - FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE);
86.5533 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi.c gcc/libffi/src/x86/ffi.c
86.5534 ---- gcc-3.2.2.orig/libffi/src/x86/ffi.c Tue May 28 18:22:08 2002
86.5535 -+++ gcc/libffi/src/x86/ffi.c Fri Dec 6 10:16:45 2002
86.5536 -@@ -1,5 +1,8 @@
86.5537 - /* -----------------------------------------------------------------------
86.5538 -- ffi.c - Copyright (c) 1996, 1998, 1999 Cygnus Solutions
86.5539 -+ ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc.
86.5540 -+ Copyright (c) 2002 Ranjit Mathew
86.5541 -+ Copyright (c) 2002 Bo Thorsen
86.5542 -+ Copyright (c) 2002 Roger Sayle
86.5543 -
86.5544 - x86 Foreign Function Interface
86.5545 -
86.5546 -@@ -23,6 +26,8 @@
86.5547 - OTHER DEALINGS IN THE SOFTWARE.
86.5548 - ----------------------------------------------------------------------- */
86.5549 -
86.5550 -+#ifndef __x86_64__
86.5551 -+
86.5552 - #include <ffi.h>
86.5553 - #include <ffi_common.h>
86.5554 -
86.5555 -@@ -36,12 +41,10 @@
86.5556 - /*@=exportheader@*/
86.5557 - {
86.5558 - register unsigned int i;
86.5559 -- register int tmp;
86.5560 - register void **p_argv;
86.5561 - register char *argp;
86.5562 - register ffi_type **p_arg;
86.5563 -
86.5564 -- tmp = 0;
86.5565 - argp = stack;
86.5566 -
86.5567 - if (ecif->cif->rtype->type == FFI_TYPE_STRUCT)
86.5568 -@@ -148,6 +151,18 @@
86.5569 - /*@=declundef@*/
86.5570 - /*@=exportheader@*/
86.5571 -
86.5572 -+#ifdef X86_WIN32
86.5573 -+/*@-declundef@*/
86.5574 -+/*@-exportheader@*/
86.5575 -+extern void ffi_call_STDCALL(void (*)(char *, extended_cif *),
86.5576 -+ /*@out@*/ extended_cif *,
86.5577 -+ unsigned, unsigned,
86.5578 -+ /*@out@*/ unsigned *,
86.5579 -+ void (*fn)());
86.5580 -+/*@=declundef@*/
86.5581 -+/*@=exportheader@*/
86.5582 -+#endif /* X86_WIN32 */
86.5583 -+
86.5584 - void ffi_call(/*@dependent@*/ ffi_cif *cif,
86.5585 - void (*fn)(),
86.5586 - /*@out@*/ void *rvalue,
86.5587 -@@ -180,6 +195,14 @@
86.5588 - cif->flags, ecif.rvalue, fn);
86.5589 - /*@=usedef@*/
86.5590 - break;
86.5591 -+#ifdef X86_WIN32
86.5592 -+ case FFI_STDCALL:
86.5593 -+ /*@-usedef@*/
86.5594 -+ ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes,
86.5595 -+ cif->flags, ecif.rvalue, fn);
86.5596 -+ /*@=usedef@*/
86.5597 -+ break;
86.5598 -+#endif /* X86_WIN32 */
86.5599 - default:
86.5600 - FFI_ASSERT(0);
86.5601 - break;
86.5602 -@@ -266,12 +289,10 @@
86.5603 - /*@=exportheader@*/
86.5604 - {
86.5605 - register unsigned int i;
86.5606 -- register int tmp;
86.5607 - register void **p_argv;
86.5608 - register char *argp;
86.5609 - register ffi_type **p_arg;
86.5610 -
86.5611 -- tmp = 0;
86.5612 - argp = stack;
86.5613 -
86.5614 - if ( cif->rtype->type == FFI_TYPE_STRUCT ) {
86.5615 -@@ -281,13 +302,14 @@
86.5616 -
86.5617 - p_argv = avalue;
86.5618 -
86.5619 -- for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)
86.5620 -+ for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++)
86.5621 - {
86.5622 - size_t z;
86.5623 -
86.5624 - /* Align if necessary */
86.5625 -- if (((*p_arg)->alignment - 1) & (unsigned) argp)
86.5626 -+ if (((*p_arg)->alignment - 1) & (unsigned) argp) {
86.5627 - argp = (char *) ALIGN(argp, (*p_arg)->alignment);
86.5628 -+ }
86.5629 -
86.5630 - z = (*p_arg)->size;
86.5631 -
86.5632 -@@ -298,7 +320,7 @@
86.5633 - p_argv++;
86.5634 - argp += z;
86.5635 - }
86.5636 --
86.5637 -+
86.5638 - return;
86.5639 - }
86.5640 -
86.5641 -@@ -449,6 +471,15 @@
86.5642 - /*@out@*/ unsigned *,
86.5643 - void (*fn)());
86.5644 -
86.5645 -+#ifdef X86_WIN32
86.5646 -+extern void
86.5647 -+ffi_call_STDCALL(void (*)(char *, extended_cif *),
86.5648 -+ /*@out@*/ extended_cif *,
86.5649 -+ unsigned, unsigned,
86.5650 -+ /*@out@*/ unsigned *,
86.5651 -+ void (*fn)());
86.5652 -+#endif /* X86_WIN32 */
86.5653 -+
86.5654 - void
86.5655 - ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
86.5656 - void (*fn)(),
86.5657 -@@ -483,6 +514,14 @@
86.5658 - cif->flags, ecif.rvalue, fn);
86.5659 - /*@=usedef@*/
86.5660 - break;
86.5661 -+#ifdef X86_WIN32
86.5662 -+ case FFI_STDCALL:
86.5663 -+ /*@-usedef@*/
86.5664 -+ ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes,
86.5665 -+ cif->flags, ecif.rvalue, fn);
86.5666 -+ /*@=usedef@*/
86.5667 -+ break;
86.5668 -+#endif /* X86_WIN32 */
86.5669 - default:
86.5670 - FFI_ASSERT(0);
86.5671 - break;
86.5672 -@@ -490,3 +529,5 @@
86.5673 - }
86.5674 -
86.5675 - #endif
86.5676 -+
86.5677 -+#endif /* __x86_64__ */
86.5678 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/ffi64.c gcc/libffi/src/x86/ffi64.c
86.5679 ---- gcc-3.2.2.orig/libffi/src/x86/ffi64.c Thu Jan 1 09:00:00 1970
86.5680 -+++ gcc/libffi/src/x86/ffi64.c Wed Jan 29 00:54:28 2003
86.5681 -@@ -0,0 +1,706 @@
86.5682 -+/* -----------------------------------------------------------------------
86.5683 -+ ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
86.5684 -+
86.5685 -+ x86-64 Foreign Function Interface
86.5686 -+
86.5687 -+ Permission is hereby granted, free of charge, to any person obtaining
86.5688 -+ a copy of this software and associated documentation files (the
86.5689 -+ ``Software''), to deal in the Software without restriction, including
86.5690 -+ without limitation the rights to use, copy, modify, merge, publish,
86.5691 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.5692 -+ permit persons to whom the Software is furnished to do so, subject to
86.5693 -+ the following conditions:
86.5694 -+
86.5695 -+ The above copyright notice and this permission notice shall be included
86.5696 -+ in all copies or substantial portions of the Software.
86.5697 -+
86.5698 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.5699 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.5700 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.5701 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.5702 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.5703 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.5704 -+ OTHER DEALINGS IN THE SOFTWARE.
86.5705 -+ ----------------------------------------------------------------------- */
86.5706 -+
86.5707 -+#include <ffi.h>
86.5708 -+#include <ffi_common.h>
86.5709 -+
86.5710 -+#include <stdlib.h>
86.5711 -+#include <stdarg.h>
86.5712 -+
86.5713 -+/* ffi_prep_args is called by the assembly routine once stack space
86.5714 -+ has been allocated for the function's arguments */
86.5715 -+
86.5716 -+#ifdef __x86_64__
86.5717 -+
86.5718 -+#define MAX_GPR_REGS 6
86.5719 -+#define MAX_SSE_REGS 8
86.5720 -+typedef struct
86.5721 -+{
86.5722 -+ /* Registers for argument passing. */
86.5723 -+ long gpr[MAX_GPR_REGS];
86.5724 -+ __int128_t sse[MAX_SSE_REGS];
86.5725 -+
86.5726 -+ /* Stack space for arguments. */
86.5727 -+ char argspace[0];
86.5728 -+} stackLayout;
86.5729 -+
86.5730 -+/* All reference to register classes here is identical to the code in
86.5731 -+ gcc/config/i386/i386.c. Do *not* change one without the other. */
86.5732 -+
86.5733 -+/* Register class used for passing given 64bit part of the argument.
86.5734 -+ These represent classes as documented by the PS ABI, with the exception
86.5735 -+ of SSESF, SSEDF classes, that are basically SSE class, just gcc will
86.5736 -+ use SF or DFmode move instead of DImode to avoid reformating penalties.
86.5737 -+
86.5738 -+ Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
86.5739 -+ whenever possible (upper half does contain padding).
86.5740 -+ */
86.5741 -+enum x86_64_reg_class
86.5742 -+ {
86.5743 -+ X86_64_NO_CLASS,
86.5744 -+ X86_64_INTEGER_CLASS,
86.5745 -+ X86_64_INTEGERSI_CLASS,
86.5746 -+ X86_64_SSE_CLASS,
86.5747 -+ X86_64_SSESF_CLASS,
86.5748 -+ X86_64_SSEDF_CLASS,
86.5749 -+ X86_64_SSEUP_CLASS,
86.5750 -+ X86_64_X87_CLASS,
86.5751 -+ X86_64_X87UP_CLASS,
86.5752 -+ X86_64_MEMORY_CLASS
86.5753 -+ };
86.5754 -+
86.5755 -+#define MAX_CLASSES 4
86.5756 -+
86.5757 -+/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
86.5758 -+ of this code is to classify each 8bytes of incoming argument by the register
86.5759 -+ class and assign registers accordingly. */
86.5760 -+
86.5761 -+/* Return the union class of CLASS1 and CLASS2.
86.5762 -+ See the x86-64 PS ABI for details. */
86.5763 -+
86.5764 -+static enum x86_64_reg_class
86.5765 -+merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
86.5766 -+{
86.5767 -+ /* Rule #1: If both classes are equal, this is the resulting class. */
86.5768 -+ if (class1 == class2)
86.5769 -+ return class1;
86.5770 -+
86.5771 -+ /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
86.5772 -+ the other class. */
86.5773 -+ if (class1 == X86_64_NO_CLASS)
86.5774 -+ return class2;
86.5775 -+ if (class2 == X86_64_NO_CLASS)
86.5776 -+ return class1;
86.5777 -+
86.5778 -+ /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
86.5779 -+ if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
86.5780 -+ return X86_64_MEMORY_CLASS;
86.5781 -+
86.5782 -+ /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
86.5783 -+ if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
86.5784 -+ || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
86.5785 -+ return X86_64_INTEGERSI_CLASS;
86.5786 -+ if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
86.5787 -+ || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
86.5788 -+ return X86_64_INTEGER_CLASS;
86.5789 -+
86.5790 -+ /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
86.5791 -+ if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
86.5792 -+ || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
86.5793 -+ return X86_64_MEMORY_CLASS;
86.5794 -+
86.5795 -+ /* Rule #6: Otherwise class SSE is used. */
86.5796 -+ return X86_64_SSE_CLASS;
86.5797 -+}
86.5798 -+
86.5799 -+/* Classify the argument of type TYPE and mode MODE.
86.5800 -+ CLASSES will be filled by the register class used to pass each word
86.5801 -+ of the operand. The number of words is returned. In case the parameter
86.5802 -+ should be passed in memory, 0 is returned. As a special case for zero
86.5803 -+ sized containers, classes[0] will be NO_CLASS and 1 is returned.
86.5804 -+
86.5805 -+ See the x86-64 PS ABI for details.
86.5806 -+*/
86.5807 -+static int
86.5808 -+classify_argument (ffi_type *type, enum x86_64_reg_class classes[],
86.5809 -+ int *byte_offset)
86.5810 -+{
86.5811 -+ /* First, align to the right place. */
86.5812 -+ *byte_offset = ALIGN(*byte_offset, type->alignment);
86.5813 -+
86.5814 -+ switch (type->type)
86.5815 -+ {
86.5816 -+ case FFI_TYPE_UINT8:
86.5817 -+ case FFI_TYPE_SINT8:
86.5818 -+ case FFI_TYPE_UINT16:
86.5819 -+ case FFI_TYPE_SINT16:
86.5820 -+ case FFI_TYPE_UINT32:
86.5821 -+ case FFI_TYPE_SINT32:
86.5822 -+ case FFI_TYPE_UINT64:
86.5823 -+ case FFI_TYPE_SINT64:
86.5824 -+ case FFI_TYPE_POINTER:
86.5825 -+ if (((*byte_offset) % 8 + type->size) <= 4)
86.5826 -+ classes[0] = X86_64_INTEGERSI_CLASS;
86.5827 -+ else
86.5828 -+ classes[0] = X86_64_INTEGER_CLASS;
86.5829 -+ return 1;
86.5830 -+ case FFI_TYPE_FLOAT:
86.5831 -+ if (((*byte_offset) % 8) == 0)
86.5832 -+ classes[0] = X86_64_SSESF_CLASS;
86.5833 -+ else
86.5834 -+ classes[0] = X86_64_SSE_CLASS;
86.5835 -+ return 1;
86.5836 -+ case FFI_TYPE_DOUBLE:
86.5837 -+ classes[0] = X86_64_SSEDF_CLASS;
86.5838 -+ return 1;
86.5839 -+ case FFI_TYPE_LONGDOUBLE:
86.5840 -+ classes[0] = X86_64_X87_CLASS;
86.5841 -+ classes[1] = X86_64_X87UP_CLASS;
86.5842 -+ return 2;
86.5843 -+ case FFI_TYPE_STRUCT:
86.5844 -+ {
86.5845 -+ const int UNITS_PER_WORD = 8;
86.5846 -+ int words = (type->size + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
86.5847 -+ ffi_type **ptr;
86.5848 -+ int i;
86.5849 -+ enum x86_64_reg_class subclasses[MAX_CLASSES];
86.5850 -+
86.5851 -+ /* If the struct is larger than 16 bytes, pass it on the stack. */
86.5852 -+ if (type->size > 16)
86.5853 -+ return 0;
86.5854 -+
86.5855 -+ for (i = 0; i < words; i++)
86.5856 -+ classes[i] = X86_64_NO_CLASS;
86.5857 -+
86.5858 -+ /* Merge the fields of structure. */
86.5859 -+ for (ptr=type->elements; (*ptr)!=NULL; ptr++)
86.5860 -+ {
86.5861 -+ int num;
86.5862 -+
86.5863 -+ num = classify_argument (*ptr, subclasses, byte_offset);
86.5864 -+ if (num == 0)
86.5865 -+ return 0;
86.5866 -+ for (i = 0; i < num; i++)
86.5867 -+ {
86.5868 -+ int pos = *byte_offset / 8;
86.5869 -+ classes[i + pos] =
86.5870 -+ merge_classes (subclasses[i], classes[i + pos]);
86.5871 -+ }
86.5872 -+
86.5873 -+ if ((*ptr)->type != FFI_TYPE_STRUCT)
86.5874 -+ *byte_offset += (*ptr)->size;
86.5875 -+ }
86.5876 -+
86.5877 -+ /* Final merger cleanup. */
86.5878 -+ for (i = 0; i < words; i++)
86.5879 -+ {
86.5880 -+ /* If one class is MEMORY, everything should be passed in
86.5881 -+ memory. */
86.5882 -+ if (classes[i] == X86_64_MEMORY_CLASS)
86.5883 -+ return 0;
86.5884 -+
86.5885 -+ /* The X86_64_SSEUP_CLASS should be always preceded by
86.5886 -+ X86_64_SSE_CLASS. */
86.5887 -+ if (classes[i] == X86_64_SSEUP_CLASS
86.5888 -+ && (i == 0 || classes[i - 1] != X86_64_SSE_CLASS))
86.5889 -+ classes[i] = X86_64_SSE_CLASS;
86.5890 -+
86.5891 -+ /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
86.5892 -+ if (classes[i] == X86_64_X87UP_CLASS
86.5893 -+ && (i == 0 || classes[i - 1] != X86_64_X87_CLASS))
86.5894 -+ classes[i] = X86_64_SSE_CLASS;
86.5895 -+ }
86.5896 -+ return words;
86.5897 -+ }
86.5898 -+
86.5899 -+ default:
86.5900 -+ FFI_ASSERT(0);
86.5901 -+ }
86.5902 -+ return 0; /* Never reached. */
86.5903 -+}
86.5904 -+
86.5905 -+/* Examine the argument and return set number of register required in each
86.5906 -+ class. Return 0 iff parameter should be passed in memory. */
86.5907 -+static int
86.5908 -+examine_argument (ffi_type *type, int in_return, int *int_nregs,int *sse_nregs)
86.5909 -+{
86.5910 -+ enum x86_64_reg_class class[MAX_CLASSES];
86.5911 -+ int offset = 0;
86.5912 -+ int n;
86.5913 -+
86.5914 -+ n = classify_argument (type, class, &offset);
86.5915 -+
86.5916 -+ if (n == 0)
86.5917 -+ return 0;
86.5918 -+
86.5919 -+ *int_nregs = 0;
86.5920 -+ *sse_nregs = 0;
86.5921 -+ for (n--; n>=0; n--)
86.5922 -+ switch (class[n])
86.5923 -+ {
86.5924 -+ case X86_64_INTEGER_CLASS:
86.5925 -+ case X86_64_INTEGERSI_CLASS:
86.5926 -+ (*int_nregs)++;
86.5927 -+ break;
86.5928 -+ case X86_64_SSE_CLASS:
86.5929 -+ case X86_64_SSESF_CLASS:
86.5930 -+ case X86_64_SSEDF_CLASS:
86.5931 -+ (*sse_nregs)++;
86.5932 -+ break;
86.5933 -+ case X86_64_NO_CLASS:
86.5934 -+ case X86_64_SSEUP_CLASS:
86.5935 -+ break;
86.5936 -+ case X86_64_X87_CLASS:
86.5937 -+ case X86_64_X87UP_CLASS:
86.5938 -+ if (!in_return)
86.5939 -+ return 0;
86.5940 -+ break;
86.5941 -+ default:
86.5942 -+ abort ();
86.5943 -+ }
86.5944 -+ return 1;
86.5945 -+}
86.5946 -+
86.5947 -+/* Functions to load floats and double to an SSE register placeholder. */
86.5948 -+extern void float2sse (float, __int128_t *);
86.5949 -+extern void double2sse (double, __int128_t *);
86.5950 -+extern void floatfloat2sse (void *, __int128_t *);
86.5951 -+
86.5952 -+/* Functions to put the floats and doubles back. */
86.5953 -+extern float sse2float (__int128_t *);
86.5954 -+extern double sse2double (__int128_t *);
86.5955 -+extern void sse2floatfloat(__int128_t *, void *);
86.5956 -+
86.5957 -+/*@-exportheader@*/
86.5958 -+void
86.5959 -+ffi_prep_args (stackLayout *stack, extended_cif *ecif)
86.5960 -+/*@=exportheader@*/
86.5961 -+{
86.5962 -+ int gprcount, ssecount, i, g, s;
86.5963 -+ void **p_argv;
86.5964 -+ void *argp = &stack->argspace;
86.5965 -+ ffi_type **p_arg;
86.5966 -+
86.5967 -+ /* First check if the return value should be passed in memory. If so,
86.5968 -+ pass the pointer as the first argument. */
86.5969 -+ gprcount = ssecount = 0;
86.5970 -+ if (ecif->cif->rtype->type != FFI_TYPE_VOID
86.5971 -+ && examine_argument (ecif->cif->rtype, 1, &g, &s) == 0)
86.5972 -+ (void *)stack->gpr[gprcount++] = ecif->rvalue;
86.5973 -+
86.5974 -+ for (i=ecif->cif->nargs, p_arg=ecif->cif->arg_types, p_argv = ecif->avalue;
86.5975 -+ i!=0; i--, p_arg++, p_argv++)
86.5976 -+ {
86.5977 -+ int in_register = 0;
86.5978 -+
86.5979 -+ switch ((*p_arg)->type)
86.5980 -+ {
86.5981 -+ case FFI_TYPE_SINT8:
86.5982 -+ case FFI_TYPE_SINT16:
86.5983 -+ case FFI_TYPE_SINT32:
86.5984 -+ case FFI_TYPE_SINT64:
86.5985 -+ case FFI_TYPE_UINT8:
86.5986 -+ case FFI_TYPE_UINT16:
86.5987 -+ case FFI_TYPE_UINT32:
86.5988 -+ case FFI_TYPE_UINT64:
86.5989 -+ case FFI_TYPE_POINTER:
86.5990 -+ if (gprcount < MAX_GPR_REGS)
86.5991 -+ {
86.5992 -+ stack->gpr[gprcount] = 0;
86.5993 -+ stack->gpr[gprcount++] = *(long long *)(*p_argv);
86.5994 -+ in_register = 1;
86.5995 -+ }
86.5996 -+ break;
86.5997 -+
86.5998 -+ case FFI_TYPE_FLOAT:
86.5999 -+ if (ssecount < MAX_SSE_REGS)
86.6000 -+ {
86.6001 -+ float2sse (*(float *)(*p_argv), &stack->sse[ssecount++]);
86.6002 -+ in_register = 1;
86.6003 -+ }
86.6004 -+ break;
86.6005 -+
86.6006 -+ case FFI_TYPE_DOUBLE:
86.6007 -+ if (ssecount < MAX_SSE_REGS)
86.6008 -+ {
86.6009 -+ double2sse (*(double *)(*p_argv), &stack->sse[ssecount++]);
86.6010 -+ in_register = 1;
86.6011 -+ }
86.6012 -+ break;
86.6013 -+ }
86.6014 -+
86.6015 -+ if (in_register)
86.6016 -+ continue;
86.6017 -+
86.6018 -+ /* Either all places in registers where filled, or this is a
86.6019 -+ type that potentially goes into a memory slot. */
86.6020 -+ if (examine_argument (*p_arg, 0, &g, &s) == 0
86.6021 -+ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
86.6022 -+ {
86.6023 -+ /* Pass this argument in memory. */
86.6024 -+ argp = (void *)ALIGN(argp, (*p_arg)->alignment);
86.6025 -+ memcpy (argp, *p_argv, (*p_arg)->size);
86.6026 -+ argp += (*p_arg)->size;
86.6027 -+ }
86.6028 -+ else
86.6029 -+ {
86.6030 -+ /* All easy cases are eliminated. Now fire the big guns. */
86.6031 -+
86.6032 -+ enum x86_64_reg_class classes[MAX_CLASSES];
86.6033 -+ int offset = 0, j, num;
86.6034 -+ void *a;
86.6035 -+
86.6036 -+ num = classify_argument (*p_arg, classes, &offset);
86.6037 -+ for (j=0, a=*p_argv; j<num; j++, a+=8)
86.6038 -+ {
86.6039 -+ switch (classes[j])
86.6040 -+ {
86.6041 -+ case X86_64_INTEGER_CLASS:
86.6042 -+ case X86_64_INTEGERSI_CLASS:
86.6043 -+ stack->gpr[gprcount++] = *(long long *)a;
86.6044 -+ break;
86.6045 -+ case X86_64_SSE_CLASS:
86.6046 -+ floatfloat2sse (a, &stack->sse[ssecount++]);
86.6047 -+ break;
86.6048 -+ case X86_64_SSESF_CLASS:
86.6049 -+ float2sse (*(float *)a, &stack->sse[ssecount++]);
86.6050 -+ break;
86.6051 -+ case X86_64_SSEDF_CLASS:
86.6052 -+ double2sse (*(double *)a, &stack->sse[ssecount++]);
86.6053 -+ break;
86.6054 -+ default:
86.6055 -+ abort();
86.6056 -+ }
86.6057 -+ }
86.6058 -+ }
86.6059 -+ }
86.6060 -+}
86.6061 -+
86.6062 -+/* Perform machine dependent cif processing. */
86.6063 -+ffi_status
86.6064 -+ffi_prep_cif_machdep (ffi_cif *cif)
86.6065 -+{
86.6066 -+ int gprcount, ssecount, i, g, s;
86.6067 -+
86.6068 -+ gprcount = ssecount = 0;
86.6069 -+
86.6070 -+ /* Reset the byte count. We handle this size estimation here. */
86.6071 -+ cif->bytes = 0;
86.6072 -+
86.6073 -+ /* If the return value should be passed in memory, pass the pointer
86.6074 -+ as the first argument. The actual memory isn't allocated here. */
86.6075 -+ if (cif->rtype->type != FFI_TYPE_VOID
86.6076 -+ && examine_argument (cif->rtype, 1, &g, &s) == 0)
86.6077 -+ gprcount = 1;
86.6078 -+
86.6079 -+ /* Go over all arguments and determine the way they should be passed.
86.6080 -+ If it's in a register and there is space for it, let that be so. If
86.6081 -+ not, add it's size to the stack byte count. */
86.6082 -+ for (i=0; i<cif->nargs; i++)
86.6083 -+ {
86.6084 -+ if (examine_argument (cif->arg_types[i], 0, &g, &s) == 0
86.6085 -+ || gprcount + g > MAX_GPR_REGS || ssecount + s > MAX_SSE_REGS)
86.6086 -+ {
86.6087 -+ /* This is passed in memory. First align to the basic type. */
86.6088 -+ cif->bytes = ALIGN(cif->bytes, cif->arg_types[i]->alignment);
86.6089 -+
86.6090 -+ /* Stack arguments are *always* at least 8 byte aligned. */
86.6091 -+ cif->bytes = ALIGN(cif->bytes, 8);
86.6092 -+
86.6093 -+ /* Now add the size of this argument. */
86.6094 -+ cif->bytes += cif->arg_types[i]->size;
86.6095 -+ }
86.6096 -+ else
86.6097 -+ {
86.6098 -+ gprcount += g;
86.6099 -+ ssecount += s;
86.6100 -+ }
86.6101 -+ }
86.6102 -+
86.6103 -+ /* Set the flag for the closures return. */
86.6104 -+ switch (cif->rtype->type)
86.6105 -+ {
86.6106 -+ case FFI_TYPE_VOID:
86.6107 -+ case FFI_TYPE_STRUCT:
86.6108 -+ case FFI_TYPE_SINT64:
86.6109 -+ case FFI_TYPE_FLOAT:
86.6110 -+ case FFI_TYPE_DOUBLE:
86.6111 -+ case FFI_TYPE_LONGDOUBLE:
86.6112 -+ cif->flags = (unsigned) cif->rtype->type;
86.6113 -+ break;
86.6114 -+
86.6115 -+ case FFI_TYPE_UINT64:
86.6116 -+ cif->flags = FFI_TYPE_SINT64;
86.6117 -+ break;
86.6118 -+
86.6119 -+ default:
86.6120 -+ cif->flags = FFI_TYPE_INT;
86.6121 -+ break;
86.6122 -+ }
86.6123 -+
86.6124 -+ return FFI_OK;
86.6125 -+}
86.6126 -+
86.6127 -+typedef struct
86.6128 -+{
86.6129 -+ long gpr[2];
86.6130 -+ __int128_t sse[2];
86.6131 -+ long double st0;
86.6132 -+} return_value;
86.6133 -+
86.6134 -+void
86.6135 -+ffi_fill_return_value (return_value *rv, extended_cif *ecif)
86.6136 -+{
86.6137 -+ enum x86_64_reg_class classes[MAX_CLASSES];
86.6138 -+ int i = 0, num;
86.6139 -+ long *gpr = rv->gpr;
86.6140 -+ __int128_t *sse = rv->sse;
86.6141 -+ signed char sc;
86.6142 -+ signed short ss;
86.6143 -+
86.6144 -+ /* This is needed because of the way x86-64 handles signed short
86.6145 -+ integers. */
86.6146 -+ switch (ecif->cif->rtype->type)
86.6147 -+ {
86.6148 -+ case FFI_TYPE_SINT8:
86.6149 -+ sc = *(signed char *)gpr;
86.6150 -+ *(long long *)ecif->rvalue = (long long)sc;
86.6151 -+ return;
86.6152 -+ case FFI_TYPE_SINT16:
86.6153 -+ ss = *(signed short *)gpr;
86.6154 -+ *(long long *)ecif->rvalue = (long long)ss;
86.6155 -+ return;
86.6156 -+ default:
86.6157 -+ /* Just continue. */
86.6158 -+ ;
86.6159 -+ }
86.6160 -+
86.6161 -+ num = classify_argument (ecif->cif->rtype, classes, &i);
86.6162 -+
86.6163 -+ if (num == 0)
86.6164 -+ /* Return in memory. */
86.6165 -+ ecif->rvalue = (void *) rv->gpr[0];
86.6166 -+ else if (num == 2 && classes[0] == X86_64_X87_CLASS &&
86.6167 -+ classes[1] == X86_64_X87UP_CLASS)
86.6168 -+ /* This is a long double (this is easiest to handle this way instead
86.6169 -+ of an eightbyte at a time as in the loop below. */
86.6170 -+ *((long double *)ecif->rvalue) = rv->st0;
86.6171 -+ else
86.6172 -+ {
86.6173 -+ void *a;
86.6174 -+
86.6175 -+ for (i=0, a=ecif->rvalue; i<num; i++, a+=8)
86.6176 -+ {
86.6177 -+ switch (classes[i])
86.6178 -+ {
86.6179 -+ case X86_64_INTEGER_CLASS:
86.6180 -+ case X86_64_INTEGERSI_CLASS:
86.6181 -+ *(long long *)a = *gpr;
86.6182 -+ gpr++;
86.6183 -+ break;
86.6184 -+ case X86_64_SSE_CLASS:
86.6185 -+ sse2floatfloat (sse++, a);
86.6186 -+ break;
86.6187 -+ case X86_64_SSESF_CLASS:
86.6188 -+ *(float *)a = sse2float (sse++);
86.6189 -+ break;
86.6190 -+ case X86_64_SSEDF_CLASS:
86.6191 -+ *(double *)a = sse2double (sse++);
86.6192 -+ break;
86.6193 -+ default:
86.6194 -+ abort();
86.6195 -+ }
86.6196 -+ }
86.6197 -+ }
86.6198 -+}
86.6199 -+
86.6200 -+/*@-declundef@*/
86.6201 -+/*@-exportheader@*/
86.6202 -+extern void ffi_call_UNIX64(void (*)(stackLayout *, extended_cif *),
86.6203 -+ void (*) (return_value *, extended_cif *),
86.6204 -+ /*@out@*/ extended_cif *,
86.6205 -+ unsigned, /*@out@*/ unsigned *, void (*fn)());
86.6206 -+/*@=declundef@*/
86.6207 -+/*@=exportheader@*/
86.6208 -+
86.6209 -+void ffi_call(/*@dependent@*/ ffi_cif *cif,
86.6210 -+ void (*fn)(),
86.6211 -+ /*@out@*/ void *rvalue,
86.6212 -+ /*@dependent@*/ void **avalue)
86.6213 -+{
86.6214 -+ extended_cif ecif;
86.6215 -+ int dummy;
86.6216 -+
86.6217 -+ ecif.cif = cif;
86.6218 -+ ecif.avalue = avalue;
86.6219 -+
86.6220 -+ /* If the return value is a struct and we don't have a return */
86.6221 -+ /* value address then we need to make one */
86.6222 -+
86.6223 -+ if ((rvalue == NULL) &&
86.6224 -+ (examine_argument (cif->rtype, 1, &dummy, &dummy) == 0))
86.6225 -+ {
86.6226 -+ /*@-sysunrecog@*/
86.6227 -+ ecif.rvalue = alloca(cif->rtype->size);
86.6228 -+ /*@=sysunrecog@*/
86.6229 -+ }
86.6230 -+ else
86.6231 -+ ecif.rvalue = rvalue;
86.6232 -+
86.6233 -+ /* Stack must always be 16byte aligned. Make it so. */
86.6234 -+ cif->bytes = ALIGN(cif->bytes, 16);
86.6235 -+
86.6236 -+ switch (cif->abi)
86.6237 -+ {
86.6238 -+ case FFI_SYSV:
86.6239 -+ /* Calling 32bit code from 64bit is not possible */
86.6240 -+ FFI_ASSERT(0);
86.6241 -+ break;
86.6242 -+
86.6243 -+ case FFI_UNIX64:
86.6244 -+ /*@-usedef@*/
86.6245 -+ ffi_call_UNIX64 (ffi_prep_args, ffi_fill_return_value, &ecif,
86.6246 -+ cif->bytes, ecif.rvalue, fn);
86.6247 -+ /*@=usedef@*/
86.6248 -+ break;
86.6249 -+
86.6250 -+ default:
86.6251 -+ FFI_ASSERT(0);
86.6252 -+ break;
86.6253 -+ }
86.6254 -+}
86.6255 -+
86.6256 -+extern void ffi_closure_UNIX64(void);
86.6257 -+
86.6258 -+ffi_status
86.6259 -+ffi_prep_closure (ffi_closure* closure,
86.6260 -+ ffi_cif* cif,
86.6261 -+ void (*fun)(ffi_cif*, void*, void**, void*),
86.6262 -+ void *user_data)
86.6263 -+{
86.6264 -+ volatile unsigned short *tramp;
86.6265 -+
86.6266 -+ /* FFI_ASSERT (cif->abi == FFI_OSF); */
86.6267 -+
86.6268 -+ tramp = (volatile unsigned short *) &closure->tramp[0];
86.6269 -+ tramp[0] = 0xbb49; /* mov <code>, %r11 */
86.6270 -+ tramp[5] = 0xba49; /* mov <data>, %r10 */
86.6271 -+ tramp[10] = 0xff49; /* jmp *%r11 */
86.6272 -+ tramp[11] = 0x00e3;
86.6273 -+ *(void * volatile *) &tramp[1] = ffi_closure_UNIX64;
86.6274 -+ *(void * volatile *) &tramp[6] = closure;
86.6275 -+
86.6276 -+ closure->cif = cif;
86.6277 -+ closure->fun = fun;
86.6278 -+ closure->user_data = user_data;
86.6279 -+
86.6280 -+ return FFI_OK;
86.6281 -+}
86.6282 -+
86.6283 -+int
86.6284 -+ffi_closure_UNIX64_inner(ffi_closure *closure, va_list l, void *rp)
86.6285 -+{
86.6286 -+ ffi_cif *cif;
86.6287 -+ void **avalue;
86.6288 -+ ffi_type **arg_types;
86.6289 -+ long i, avn, argn;
86.6290 -+
86.6291 -+ cif = closure->cif;
86.6292 -+ avalue = alloca(cif->nargs * sizeof(void *));
86.6293 -+
86.6294 -+ argn = 0;
86.6295 -+
86.6296 -+ i = 0;
86.6297 -+ avn = cif->nargs;
86.6298 -+ arg_types = cif->arg_types;
86.6299 -+
86.6300 -+ /* Grab the addresses of the arguments from the stack frame. */
86.6301 -+ while (i < avn)
86.6302 -+ {
86.6303 -+ switch (arg_types[i]->type)
86.6304 -+ {
86.6305 -+ case FFI_TYPE_SINT8:
86.6306 -+ case FFI_TYPE_UINT8:
86.6307 -+ case FFI_TYPE_SINT16:
86.6308 -+ case FFI_TYPE_UINT16:
86.6309 -+ case FFI_TYPE_SINT32:
86.6310 -+ case FFI_TYPE_UINT32:
86.6311 -+ case FFI_TYPE_SINT64:
86.6312 -+ case FFI_TYPE_UINT64:
86.6313 -+ case FFI_TYPE_POINTER:
86.6314 -+ {
86.6315 -+ if (l->gp_offset > 48-8)
86.6316 -+ {
86.6317 -+ avalue[i] = l->overflow_arg_area;
86.6318 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
86.6319 -+ }
86.6320 -+ else
86.6321 -+ {
86.6322 -+ avalue[i] = (char *)l->reg_save_area + l->gp_offset;
86.6323 -+ l->gp_offset += 8;
86.6324 -+ }
86.6325 -+ }
86.6326 -+ break;
86.6327 -+
86.6328 -+ case FFI_TYPE_STRUCT:
86.6329 -+ /* FIXME */
86.6330 -+ FFI_ASSERT(0);
86.6331 -+ break;
86.6332 -+
86.6333 -+ case FFI_TYPE_DOUBLE:
86.6334 -+ {
86.6335 -+ if (l->fp_offset > 176-16)
86.6336 -+ {
86.6337 -+ avalue[i] = l->overflow_arg_area;
86.6338 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
86.6339 -+ }
86.6340 -+ else
86.6341 -+ {
86.6342 -+ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
86.6343 -+ l->fp_offset += 16;
86.6344 -+ }
86.6345 -+ }
86.6346 -+#if DEBUG_FFI
86.6347 -+ fprintf (stderr, "double arg %d = %g\n", i, *(double *)avalue[i]);
86.6348 -+#endif
86.6349 -+ break;
86.6350 -+
86.6351 -+ case FFI_TYPE_FLOAT:
86.6352 -+ {
86.6353 -+ if (l->fp_offset > 176-16)
86.6354 -+ {
86.6355 -+ avalue[i] = l->overflow_arg_area;
86.6356 -+ l->overflow_arg_area = (char *)l->overflow_arg_area + 8;
86.6357 -+ }
86.6358 -+ else
86.6359 -+ {
86.6360 -+ avalue[i] = (char *)l->reg_save_area + l->fp_offset;
86.6361 -+ l->fp_offset += 16;
86.6362 -+ }
86.6363 -+ }
86.6364 -+#if DEBUG_FFI
86.6365 -+ fprintf (stderr, "float arg %d = %g\n", i, *(float *)avalue[i]);
86.6366 -+#endif
86.6367 -+ break;
86.6368 -+
86.6369 -+ default:
86.6370 -+ FFI_ASSERT(0);
86.6371 -+ }
86.6372 -+
86.6373 -+ argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG;
86.6374 -+ i++;
86.6375 -+ }
86.6376 -+
86.6377 -+ /* Invoke the closure. */
86.6378 -+ (closure->fun) (cif, rp, avalue, closure->user_data);
86.6379 -+
86.6380 -+ /* FIXME: Structs not supported. */
86.6381 -+ FFI_ASSERT(cif->rtype->type != FFI_TYPE_STRUCT);
86.6382 -+
86.6383 -+ /* Tell ffi_closure_UNIX64 how to perform return type promotions. */
86.6384 -+
86.6385 -+ return cif->rtype->type;
86.6386 -+}
86.6387 -+#endif /* ifndef __x86_64__ */
86.6388 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/sysv.S gcc/libffi/src/x86/sysv.S
86.6389 ---- gcc-3.2.2.orig/libffi/src/x86/sysv.S Tue Jul 17 02:10:53 2001
86.6390 -+++ gcc/libffi/src/x86/sysv.S Fri Jul 19 08:08:31 2002
86.6391 -@@ -1,5 +1,5 @@
86.6392 - /* -----------------------------------------------------------------------
86.6393 -- sysv.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
86.6394 -+ sysv.S - Copyright (c) 1996, 1998, 2001, 2002 Cygnus Solutions
86.6395 -
86.6396 - X86 Foreign Function Interface
86.6397 -
86.6398 -@@ -23,6 +23,8 @@
86.6399 - OTHER DEALINGS IN THE SOFTWARE.
86.6400 - ----------------------------------------------------------------------- */
86.6401 -
86.6402 -+#ifndef __x86_64__
86.6403 -+
86.6404 - #define LIBFFI_ASM
86.6405 - #include <ffi.h>
86.6406 -
86.6407 -@@ -163,3 +165,5 @@
86.6408 - .align 4
86.6409 - .LEFDE1:
86.6410 - .set .LLFDE1,.LEFDE1-.LSFDE1
86.6411 -+
86.6412 -+#endif /* ifndef __x86_64__ */
86.6413 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/unix64.S gcc/libffi/src/x86/unix64.S
86.6414 ---- gcc-3.2.2.orig/libffi/src/x86/unix64.S Thu Jan 1 09:00:00 1970
86.6415 -+++ gcc/libffi/src/x86/unix64.S Wed Jan 29 00:54:28 2003
86.6416 -@@ -0,0 +1,302 @@
86.6417 -+/* -----------------------------------------------------------------------
86.6418 -+ unix64.S - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
86.6419 -+
86.6420 -+ x86-64 Foreign Function Interface
86.6421 -+
86.6422 -+ Permission is hereby granted, free of charge, to any person obtaining
86.6423 -+ a copy of this software and associated documentation files (the
86.6424 -+ ``Software''), to deal in the Software without restriction, including
86.6425 -+ without limitation the rights to use, copy, modify, merge, publish,
86.6426 -+ distribute, sublicense, and/or sell copies of the Software, and to
86.6427 -+ permit persons to whom the Software is furnished to do so, subject to
86.6428 -+ the following conditions:
86.6429 -+
86.6430 -+ The above copyright notice and this permission notice shall be included
86.6431 -+ in all copies or substantial portions of the Software.
86.6432 -+
86.6433 -+ THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
86.6434 -+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
86.6435 -+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
86.6436 -+ IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
86.6437 -+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
86.6438 -+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
86.6439 -+ OTHER DEALINGS IN THE SOFTWARE.
86.6440 -+ ----------------------------------------------------------------------- */
86.6441 -+
86.6442 -+#ifdef __x86_64__
86.6443 -+#define LIBFFI_ASM
86.6444 -+#include <ffi.h>
86.6445 -+
86.6446 -+ .section .rodata
86.6447 -+.LC0:
86.6448 -+ .string "asm in progress %lld\n"
86.6449 -+.LC1:
86.6450 -+ .string "asm in progress\n"
86.6451 -+.text
86.6452 -+ .align 2
86.6453 -+.globl ffi_call_UNIX64
86.6454 -+ .type ffi_call_UNIX64,@function
86.6455 -+
86.6456 -+ffi_call_UNIX64:
86.6457 -+.LFB1:
86.6458 -+ pushq %rbp
86.6459 -+.LCFI0:
86.6460 -+ movq %rsp, %rbp
86.6461 -+.LCFI1:
86.6462 -+ /* Save all arguments */
86.6463 -+ subq $48, %rsp
86.6464 -+.LCFI2:
86.6465 -+ movq %rdi, -8(%rbp) /* ffi_prep_args */
86.6466 -+ movq %rsi, -16(%rbp) /* ffi_fill_return_value */
86.6467 -+ movq %rdx, -24(%rbp) /* ecif */
86.6468 -+ movq %rcx, -32(%rbp) /* cif->bytes */
86.6469 -+ movq %r8, -40(%rbp) /* ecif.rvalue */
86.6470 -+ movq %r9, -48(%rbp) /* fn */
86.6471 -+
86.6472 -+ /* Make room for all of the new args and the register args */
86.6473 -+ addl $176, %ecx
86.6474 -+.LCFI3:
86.6475 -+ subq %rcx, %rsp
86.6476 -+.LCFI4:
86.6477 -+ /* Setup the call to ffi_prep_args. */
86.6478 -+ movq %rdi, %rax /* &ffi_prep_args */
86.6479 -+ movq %rsp, %rdi /* stackLayout */
86.6480 -+ movq %rdx, %rsi /* ecif */
86.6481 -+ call *%rax /* ffi_prep_args(stackLayout, ecif);*/
86.6482 -+
86.6483 -+ /* ffi_prep_args have put all the register contents into the */
86.6484 -+ /* stackLayout struct. Now put the register values in place. */
86.6485 -+ movq (%rsp), %rdi
86.6486 -+ movq 8(%rsp), %rsi
86.6487 -+ movq 16(%rsp), %rdx
86.6488 -+ movq 24(%rsp), %rcx
86.6489 -+ movq 32(%rsp), %r8
86.6490 -+ movq 40(%rsp), %r9
86.6491 -+ movaps 48(%rsp), %xmm0
86.6492 -+ movaps 64(%rsp), %xmm1
86.6493 -+ movaps 80(%rsp), %xmm2
86.6494 -+ movaps 96(%rsp), %xmm3
86.6495 -+ movaps 112(%rsp), %xmm4
86.6496 -+ movaps 128(%rsp), %xmm5
86.6497 -+ movaps 144(%rsp), %xmm6
86.6498 -+ movaps 160(%rsp), %xmm7
86.6499 -+
86.6500 -+ /* Remove space for stackLayout so stack arguments are placed
86.6501 -+ correctly for the call. */
86.6502 -+.LCFI5:
86.6503 -+ addq $176, %rsp
86.6504 -+.LCFI6:
86.6505 -+ /* Call the user function. */
86.6506 -+ call *-48(%rbp)
86.6507 -+
86.6508 -+ /* Make stack space for the return_value struct. */
86.6509 -+ subq $64, %rsp
86.6510 -+
86.6511 -+ /* Fill in all potential return values to this struct. */
86.6512 -+ movq %rax, (%rsp)
86.6513 -+ movq %rdx, 8(%rsp)
86.6514 -+ movaps %xmm0, 16(%rsp)
86.6515 -+ movaps %xmm1, 32(%rsp)
86.6516 -+ fstpt 48(%rsp)
86.6517 -+
86.6518 -+ /* Now call ffi_fill_return_value. */
86.6519 -+ movq %rsp, %rdi /* struct return_value */
86.6520 -+ movq -24(%rbp), %rsi /* ecif */
86.6521 -+ movq -16(%rbp), %rax /* &ffi_fill_return_value */
86.6522 -+ call *%rax /* call it */
86.6523 -+
86.6524 -+ /* And the work is done. */
86.6525 -+ leave
86.6526 -+ ret
86.6527 -+.LFE1:
86.6528 -+.ffi_call_UNIX64_end:
86.6529 -+ .size ffi_call_UNIX64,.ffi_call_UNIX64_end-ffi_call_UNIX64
86.6530 -+
86.6531 -+.text
86.6532 -+ .align 2
86.6533 -+.globl float2sse
86.6534 -+ .type float2sse,@function
86.6535 -+float2sse:
86.6536 -+ /* Save the contents of this sse-float in a pointer. */
86.6537 -+ movaps %xmm0, (%rdi)
86.6538 -+ ret
86.6539 -+
86.6540 -+ .align 2
86.6541 -+.globl floatfloat2sse
86.6542 -+ .type floatfloat2sse,@function
86.6543 -+floatfloat2sse:
86.6544 -+ /* Save the contents of these two sse-floats in a pointer. */
86.6545 -+ movq (%rdi), %xmm0
86.6546 -+ movaps %xmm0, (%rsi)
86.6547 -+ ret
86.6548 -+
86.6549 -+ .align 2
86.6550 -+.globl double2sse
86.6551 -+ .type double2sse,@function
86.6552 -+double2sse:
86.6553 -+ /* Save the contents of this sse-double in a pointer. */
86.6554 -+ movaps %xmm0, (%rdi)
86.6555 -+ ret
86.6556 -+
86.6557 -+ .align 2
86.6558 -+.globl sse2float
86.6559 -+ .type sse2float,@function
86.6560 -+sse2float:
86.6561 -+ /* Save the contents of this sse-float in a pointer. */
86.6562 -+ movaps (%rdi), %xmm0
86.6563 -+ ret
86.6564 -+
86.6565 -+ .align 2
86.6566 -+.globl sse2double
86.6567 -+ .type sse2double,@function
86.6568 -+sse2double:
86.6569 -+ /* Save the contents of this pointer in a sse-double. */
86.6570 -+ movaps (%rdi), %xmm0
86.6571 -+ ret
86.6572 -+
86.6573 -+ .align 2
86.6574 -+.globl sse2floatfloat
86.6575 -+ .type sse2floatfloat,@function
86.6576 -+sse2floatfloat:
86.6577 -+ /* Save the contents of this pointer in two sse-floats. */
86.6578 -+ movaps (%rdi), %xmm0
86.6579 -+ movq %xmm0, (%rsi)
86.6580 -+ ret
86.6581 -+
86.6582 -+ .align 2
86.6583 -+.globl ffi_closure_UNIX64
86.6584 -+ .type ffi_closure_UNIX64,@function
86.6585 -+
86.6586 -+ffi_closure_UNIX64:
86.6587 -+.LFB2:
86.6588 -+ pushq %rbp
86.6589 -+.LCFI10:
86.6590 -+ movq %rsp, %rbp
86.6591 -+.LCFI11:
86.6592 -+ subq $240, %rsp
86.6593 -+.LCFI12:
86.6594 -+ movq %rdi, -176(%rbp)
86.6595 -+ movq %rsi, -168(%rbp)
86.6596 -+ movq %rdx, -160(%rbp)
86.6597 -+ movq %rcx, -152(%rbp)
86.6598 -+ movq %r8, -144(%rbp)
86.6599 -+ movq %r9, -136(%rbp)
86.6600 -+ /* FIXME: We can avoid all this stashing of XMM registers by
86.6601 -+ (in ffi_prep_closure) computing the number of
86.6602 -+ floating-point args and moving it into %rax before calling
86.6603 -+ this function. Once this is done, uncomment the next few
86.6604 -+ lines and only the essential XMM registers will be written
86.6605 -+ to memory. This is a significant saving. */
86.6606 -+/* movzbl %al, %eax */
86.6607 -+/* movq %rax, %rdx */
86.6608 -+/* leaq 0(,%rdx,4), %rax */
86.6609 -+/* leaq 2f(%rip), %rdx */
86.6610 -+/* subq %rax, %rdx */
86.6611 -+ leaq -1(%rbp), %rax
86.6612 -+/* jmp *%rdx */
86.6613 -+ movaps %xmm7, -15(%rax)
86.6614 -+ movaps %xmm6, -31(%rax)
86.6615 -+ movaps %xmm5, -47(%rax)
86.6616 -+ movaps %xmm4, -63(%rax)
86.6617 -+ movaps %xmm3, -79(%rax)
86.6618 -+ movaps %xmm2, -95(%rax)
86.6619 -+ movaps %xmm1, -111(%rax)
86.6620 -+ movaps %xmm0, -127(%rax)
86.6621 -+2:
86.6622 -+ movl %edi, -180(%rbp)
86.6623 -+ movl $0, -224(%rbp)
86.6624 -+ movl $48, -220(%rbp)
86.6625 -+ leaq 16(%rbp), %rax
86.6626 -+ movq %rax, -216(%rbp)
86.6627 -+ leaq -176(%rbp), %rdx
86.6628 -+ movq %rdx, -208(%rbp)
86.6629 -+ leaq -224(%rbp), %rsi
86.6630 -+ movq %r10, %rdi
86.6631 -+ movq %rsp, %rdx
86.6632 -+ call ffi_closure_UNIX64_inner@PLT
86.6633 -+
86.6634 -+ cmpl $FFI_TYPE_FLOAT, %eax
86.6635 -+ je 1f
86.6636 -+ cmpl $FFI_TYPE_DOUBLE, %eax
86.6637 -+ je 2f
86.6638 -+ cmpl $FFI_TYPE_LONGDOUBLE, %eax
86.6639 -+ je 3f
86.6640 -+ cmpl $FFI_TYPE_STRUCT, %eax
86.6641 -+ je 4f
86.6642 -+ popq %rax
86.6643 -+ leave
86.6644 -+ ret
86.6645 -+1:
86.6646 -+2:
86.6647 -+3:
86.6648 -+ movaps -240(%rbp), %xmm0
86.6649 -+ leave
86.6650 -+ ret
86.6651 -+4:
86.6652 -+ leave
86.6653 -+ ret
86.6654 -+.LFE2:
86.6655 -+
86.6656 -+ .section .eh_frame,"a",@progbits
86.6657 -+.Lframe0:
86.6658 -+ .long .LECIE1-.LSCIE1
86.6659 -+.LSCIE1:
86.6660 -+ .long 0x0
86.6661 -+ .byte 0x1
86.6662 -+ .string "zR"
86.6663 -+ .uleb128 0x1
86.6664 -+ .sleb128 -8
86.6665 -+ .byte 0x10
86.6666 -+ .uleb128 0x1
86.6667 -+ .byte 0x1b
86.6668 -+ .byte 0xc
86.6669 -+ .uleb128 0x7
86.6670 -+ .uleb128 0x8
86.6671 -+ .byte 0x90
86.6672 -+ .uleb128 0x1
86.6673 -+ .align 8
86.6674 -+.LECIE1:
86.6675 -+.LSFDE1:
86.6676 -+ .long .LEFDE1-.LASFDE1
86.6677 -+.LASFDE1:
86.6678 -+ .long .LASFDE1-.Lframe0
86.6679 -+
86.6680 -+ .long .LFB1-.
86.6681 -+ .long .LFE1-.LFB1
86.6682 -+ .uleb128 0x0
86.6683 -+ .byte 0x4 # DW_CFA_advance_loc4
86.6684 -+ .long .LCFI0-.LFB1
86.6685 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.6686 -+ .uleb128 0x10
86.6687 -+ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
86.6688 -+ .uleb128 0x2
86.6689 -+ .byte 0x4 # DW_CFA_advance_loc4
86.6690 -+ .long .LCFI1-.LCFI0
86.6691 -+ .byte 0x86 # DW_CFA_offset: r6 at cfa-16
86.6692 -+ .uleb128 0x2
86.6693 -+ .byte 0xd # DW_CFA_def_cfa_reg: r6
86.6694 -+ .uleb128 0x6
86.6695 -+ .align 8
86.6696 -+.LEFDE1:
86.6697 -+.LSFDE3:
86.6698 -+ .long .LEFDE3-.LASFDE3 # FDE Length
86.6699 -+.LASFDE3:
86.6700 -+ .long .LASFDE3-.Lframe0 # FDE CIE offset
86.6701 -+
86.6702 -+ .long .LFB2-. # FDE initial location
86.6703 -+ .long .LFE2-.LFB2 # FDE address range
86.6704 -+ .uleb128 0x0 # Augmentation size
86.6705 -+ .byte 0x4 # DW_CFA_advance_loc4
86.6706 -+ .long .LCFI10-.LFB2
86.6707 -+ .byte 0xe # DW_CFA_def_cfa_offset
86.6708 -+ .uleb128 0x10
86.6709 -+ .byte 0x86 # DW_CFA_offset, column 0x6
86.6710 -+ .uleb128 0x2
86.6711 -+ .byte 0x4 # DW_CFA_advance_loc4
86.6712 -+ .long .LCFI11-.LCFI10
86.6713 -+ .byte 0xd # DW_CFA_def_cfa_register
86.6714 -+ .uleb128 0x6
86.6715 -+ .align 8
86.6716 -+.LEFDE3:
86.6717 -+
86.6718 -+#endif /* __x86_64__ */
86.6719 -diff -ruN --exclude=CVS gcc-3.2.2.orig/libffi/src/x86/win32.S gcc/libffi/src/x86/win32.S
86.6720 ---- gcc-3.2.2.orig/libffi/src/x86/win32.S Tue Mar 27 11:39:16 2001
86.6721 -+++ gcc/libffi/src/x86/win32.S Fri Dec 6 10:16:45 2002
86.6722 -@@ -1,5 +1,8 @@
86.6723 - /* -----------------------------------------------------------------------
86.6724 -- win32.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions
86.6725 -+ win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc.
86.6726 -+ Copyright (c) 2001 John Beniton
86.6727 -+ Copyright (c) 2002 Ranjit Mathew
86.6728 -+
86.6729 -
86.6730 - X86 Foreign Function Interface
86.6731 -
86.6732 -@@ -52,7 +55,10 @@
86.6733 - # Return stack to previous state and call the function
86.6734 - addl $8,%esp
86.6735 -
86.6736 -- call *28(%ebp)
86.6737 -+ # FIXME: Align the stack to a 128-bit boundary to avoid
86.6738 -+ # potential performance hits.
86.6739 -+
86.6740 -+ call *28(%ebp)
86.6741 -
86.6742 - # Remove the space we pushed for the args
86.6743 - movl 16(%ebp),%ecx
86.6744 -@@ -123,3 +129,98 @@
86.6745 - ret
86.6746 -
86.6747 - .ffi_call_SYSV_end:
86.6748 -+
86.6749 -+ # This assumes we are using gas.
86.6750 -+ .balign 16
86.6751 -+.globl _ffi_call_STDCALL
86.6752 -+
86.6753 -+_ffi_call_STDCALL:
86.6754 -+ pushl %ebp
86.6755 -+ movl %esp,%ebp
86.6756 -+
86.6757 -+ # Make room for all of the new args.
86.6758 -+ movl 16(%ebp),%ecx
86.6759 -+ subl %ecx,%esp
86.6760 -+
86.6761 -+ movl %esp,%eax
86.6762 -+
86.6763 -+ # Place all of the ffi_prep_args in position
86.6764 -+ pushl 12(%ebp)
86.6765 -+ pushl %eax
86.6766 -+ call *8(%ebp)
86.6767 -+
86.6768 -+ # Return stack to previous state and call the function
86.6769 -+ addl $8,%esp
86.6770 -+
86.6771 -+ # FIXME: Align the stack to a 128-bit boundary to avoid
86.6772 -+ # potential performance hits.
86.6773 -+
86.6774 -+ call *28(%ebp)
86.6775 -+
86.6776 -+ # stdcall functions pop arguments off the stack themselves
86.6777 -+
86.6778 -+ # Load %ecx with the return type code
86.6779 -+ movl 20(%ebp),%ecx
86.6780 -+
86.6781 -+ # If the return value pointer is NULL, assume no return value.
86.6782 -+ cmpl $0,24(%ebp)
86.6783 -+ jne sc_retint
86.6784 -+
86.6785 -+ # Even if there is no space for the return value, we are
86.6786 -+ # obliged to handle floating-point values.
86.6787 -+ cmpl $FFI_TYPE_FLOAT,%ecx
86.6788 -+ jne sc_noretval
86.6789 -+ fstp %st(0)
86.6790 -+
86.6791 -+ jmp sc_epilogue
86.6792 -+
86.6793 -+sc_retint:
86.6794 -+ cmpl $FFI_TYPE_INT,%ecx
86.6795 -+ jne sc_retfloat
86.6796 -+ # Load %ecx with the pointer to storage for the return value
86.6797 -+ movl 24(%ebp),%ecx
86.6798 -+ movl %eax,0(%ecx)
86.6799 -+ jmp sc_epilogue
86.6800 -+
86.6801 -+sc_retfloat:
86.6802 -+ cmpl $FFI_TYPE_FLOAT,%ecx
86.6803 -+ jne sc_retdouble
86.6804 -+ # Load %ecx with the pointer to storage for the return value
86.6805 -+ movl 24(%ebp),%ecx
86.6806 -+ fstps (%ecx)
86.6807 -+ jmp sc_epilogue
86.6808 -+
86.6809 -+sc_retdouble:
86.6810 -+ cmpl $FFI_TYPE_DOUBLE,%ecx
86.6811 -+ jne sc_retlongdouble
86.6812 -+ # Load %ecx with the pointer to storage for the return value
86.6813 -+ movl 24(%ebp),%ecx
86.6814 -+ fstpl (%ecx)
86.6815 -+ jmp sc_epilogue
86.6816 -+
86.6817 -+sc_retlongdouble:
86.6818 -+ cmpl $FFI_TYPE_LONGDOUBLE,%ecx
86.6819 -+ jne sc_retint64
86.6820 -+ # Load %ecx with the pointer to storage for the return value
86.6821 -+ movl 24(%ebp),%ecx
86.6822 -+ fstpt (%ecx)
86.6823 -+ jmp sc_epilogue
86.6824 -+
86.6825 -+sc_retint64:
86.6826 -+ cmpl $FFI_TYPE_SINT64,%ecx
86.6827 -+ jne sc_retstruct
86.6828 -+ # Load %ecx with the pointer to storage for the return value
86.6829 -+ movl 24(%ebp),%ecx
86.6830 -+ movl %eax,0(%ecx)
86.6831 -+ movl %edx,4(%ecx)
86.6832 -+
86.6833 -+sc_retstruct:
86.6834 -+ # Nothing to do!
86.6835 -+
86.6836 -+sc_noretval:
86.6837 -+sc_epilogue:
86.6838 -+ movl %ebp,%esp
86.6839 -+ popl %ebp
86.6840 -+ ret
86.6841 -+
86.6842 -+.ffi_call_STDCALL_end:
86.6843 ---- gcc-3.2.2.orig/libjava/configure.host Mon Jun 10 13:15:26 2002
86.6844 -+++ gcc-3.2.2/libjava/configure.host Sat Feb 15 19:57:25 2003
86.6845 -@@ -115,6 +115,12 @@
86.6846 - enable_getenv_properties_default=no
86.6847 - enable_main_args_default=no
86.6848 - ;;
86.6849 -+ sh-* | sh[34]*-*)
86.6850 -+ sysdeps_dir=sh
86.6851 -+ libgcj_flags="${libgcj_flags} -mieee"
86.6852 -+ libgcj_interpreter=yes
86.6853 -+ enable_hash_synchronization_default=yes
86.6854 -+ ;;
86.6855 - esac
86.6856 -
86.6857 - # This case statement supports generic port properties and may refine
86.6858 -@@ -126,7 +132,8 @@
86.6859 - powerpc*-linux* | \
86.6860 - alpha*-linux* | \
86.6861 - sparc*-linux* | \
86.6862 -- ia64-*)
86.6863 -+ ia64-* | \
86.6864 -+ sh-linux* | sh[34]*-linux*)
86.6865 - can_unwind_signal=yes
86.6866 - ;;
86.6867 - *-*-darwin*)
87.1 --- a/patches/gcc/3.2.3/gcc-3.2.3-ppc-asm-spec.patch Sat Sep 22 17:25:42 2007 +0000
87.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
87.3 @@ -1,54 +0,0 @@
87.4 -Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
87.5 -
87.6 -Fixes the following errors when building gcc for ppc7450:
87.7 -
87.8 -/tmp/ccYph3gd.s: Assembler messages:
87.9 -/tmp/ccYph3gd.s:3823: Error: Unrecognized opcode: `mfvrsave'
87.10 -/tmp/ccYph3gd.s:3857: Error: Unrecognized opcode: `stvx'
87.11 -/tmp/ccYph3gd.s:4026: Error: Unrecognized opcode: `lvx'
87.12 -/tmp/ccYph3gd.s:4027: Error: Unrecognized opcode: `mtvrsave'
87.13 -make[2]: *** [libgcc/./unwind-dw2.o] Error 1
87.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'
87.15 -make[1]: *** [stmp-multilib] Error 2
87.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'
87.17 -make: *** [all-gcc] Error 2
87.18 -
87.19 -Note that the "-mcpu=7450" option must appear on the "gcc" command line in
87.20 -order for "-maltivec" to be passed to the assembler. Or, "-maltivec" itself
87.21 -may be passed to the "gcc" command.
87.22 -
87.23 -Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
87.24 -
87.25 -===================================================================
87.26 ---- gcc-3.2.3/gcc/config/rs6000/rs6000.h~ 2003-03-29 07:39:20.000000000 -0500
87.27 -+++ gcc-3.2.3/gcc/config/rs6000/rs6000.h 2004-08-23 16:33:21.000000000 -0400
87.28 -@@ -77,8 +77,8 @@
87.29 - %{mcpu=604e: -D_ARCH_PPC} \
87.30 - %{mcpu=620: -D_ARCH_PPC} \
87.31 - %{mcpu=740: -D_ARCH_PPC} \
87.32 --%{mcpu=7400: -D_ARCH_PPC} \
87.33 --%{mcpu=7450: -D_ARCH_PPC} \
87.34 -+%{mcpu=7400: -D_ARCH_PPC -D__ALTIVEC__} \
87.35 -+%{mcpu=7450: -D_ARCH_PPC -D__ALTIVEC__} \
87.36 - %{mcpu=750: -D_ARCH_PPC} \
87.37 - %{mcpu=801: -D_ARCH_PPC} \
87.38 - %{mcpu=821: -D_ARCH_PPC} \
87.39 -@@ -117,14 +117,15 @@
87.40 - %{mcpu=604e: -mppc} \
87.41 - %{mcpu=620: -mppc} \
87.42 - %{mcpu=740: -mppc} \
87.43 --%{mcpu=7400: -mppc} \
87.44 --%{mcpu=7450: -mppc} \
87.45 -+%{mcpu=7400: -mppc -maltivec} \
87.46 -+%{mcpu=7450: -mppc -maltivec} \
87.47 - %{mcpu=750: -mppc} \
87.48 - %{mcpu=801: -mppc} \
87.49 - %{mcpu=821: -mppc} \
87.50 - %{mcpu=823: -mppc} \
87.51 - %{mcpu=860: -mppc} \
87.52 --%{maltivec: -maltivec}"
87.53 -+%{maltivec: -maltivec} \
87.54 -+-many"
87.55 -
87.56 - #define CPP_DEFAULT_SPEC ""
87.57 -
88.1 --- a/patches/gcc/3.2.3/gcc-3.2.3-trap-posix.patch Sat Sep 22 17:25:42 2007 +0000
88.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
88.3 @@ -1,45 +0,0 @@
88.4 -#
88.5 -# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
88.6 -#
88.7 -# Error:
88.8 -#
88.9 -# creating libintl.h
88.10 -# Configuring etc...
88.11 -# loading cache ../config.cache
88.12 -# checking for a BSD compatible install... (cached) /usr/bin/install -c
88.13 -# creating ./config.status
88.14 -# creating Makefile
88.15 -# trap: usage: trap [-lp] [[arg] signal_spec ...]
88.16 -#
88.17 -# Description:
88.18 -#
88.19 -# non-posix conform usage of trap causes bash >= 3.0 to fail
88.20 -#
88.21 -# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
88.22 -#
88.23 -# Status:
88.24 -#
88.25 -# fixed in gcc >= 3.3.5
88.26 -# backport of gcc-3.3.5 fix
88.27 -#
88.28 -diff -ruN gcc-3.2.3-orig/configure gcc-3.2.3/configure
88.29 ---- gcc-3.2.3-orig/configure 2002-06-24 18:14:28.000000000 +0200
88.30 -+++ gcc-3.2.3/configure 2005-04-20 18:42:49.000000000 +0200
88.31 -@@ -697,7 +697,7 @@
88.32 - if test -f skip-this-dir; then
88.33 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
88.34 - # and reset the trap handler.
88.35 -- trap 0
88.36 -+ trap '' 0
88.37 - rm -rf Makefile* ${tmpdir}
88.38 - # Execute the final clean-up actions
88.39 - ${config_shell} skip-this-dir
88.40 -@@ -1615,7 +1615,7 @@
88.41 - # Perform the same cleanup as the trap handler, minus the "exit 1" of course,
88.42 - # and reset the trap handler.
88.43 - rm -rf ${tmpdir}
88.44 --trap 0
88.45 -+trap '' 0
88.46 -
88.47 - exit 0
88.48 -
89.1 --- a/patches/gcc/3.2.3/gcc-3.3-libstdc++-v3-dg.exp.patch Sat Sep 22 17:25:42 2007 +0000
89.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
89.3 @@ -1,54 +0,0 @@
89.4 -Without this patch, the command
89.5 -
89.6 -RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
89.7 -
89.8 -fails in two ways:
89.9 -1. the -L option meant to locate the testsuite directory is incorrect, and
89.10 -2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
89.11 -is the native compiler is invoked when we really wanted to invoke the cross-compiler
89.12 -we just built.
89.13 -
89.14 -Here's an example log of the problem in action. Every testcase fails, this shows just one:
89.15 --------------
89.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
89.17 -compiler exited with status 1
89.18 -output is:
89.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
89.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
89.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
89.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
89.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
89.24 -...
89.25 -FAIL: 20_util/binders.cc (test for excess errors)
89.26 -WARNING: 20_util/binders.cc compilation failed to produce executable
89.27 --------------
89.28 -
89.29 -And here's the patch. I'm not happy with it, and it probably gets some cases wrong,
89.30 -but it seems to work for the common native case and for my cross-compiler case.
89.31 -
89.32 ---- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old Sun Jul 13 10:42:01 2003
89.33 -+++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp Sun Jul 13 11:39:54 2003
89.34 -@@ -46,8 +46,23 @@
89.35 - global gluefile wrap_flags
89.36 - global ld_library_path
89.37 - global tool_root_dir
89.38 -+ global target_triplet
89.39 -
89.40 - set blddir [lookfor_file [get_multilibs] libstdc++-v3]
89.41 -+ if { $blddir == "" } {
89.42 -+ set multilibs [get_multilibs]
89.43 -+ # FIXME: assume multilib only one level deep
89.44 -+ set multisub [file tail $multilibs]
89.45 -+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
89.46 -+ set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
89.47 -+ }
89.48 -+ if { $blddir == "" } {
89.49 -+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
89.50 -+ set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
89.51 -+ }
89.52 -+ if { $blddir == "" } {
89.53 -+ error "Can't find libstdc++-v3"
89.54 -+ }
89.55 -
89.56 - # By default, we assume we want to run program images.
89.57 - global dg-do-what-default
90.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
90.2 +++ b/patches/gcc/3.3.6/100-fix-fixincl.patch Sun Sep 23 17:08:09 2007 +0000
90.3 @@ -0,0 +1,70 @@
90.4 +See http://gcc.gnu.org/PR22541
90.5 +
90.6 +From: Dan Kegel
90.7 +
90.8 +When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
90.9 +(the only two I've tried like this), the configure script happily copies
90.10 +the glibc include files from include to sys-include; here's the line
90.11 +from the log file (with $PREFIX instead of the real prefix):
90.12 +
90.13 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
90.14 +
90.15 +But later, when running fixincludes, it gives the error message
90.16 + The directory that should contain system headers does not exist:
90.17 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
90.18 +
90.19 +Nevertheless, it continues building; the header files it installs in
90.20 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
90.21 +do not include the boilerplate that would cause it to #include_next the
90.22 +glibc headers in the system header directory.
90.23 +Thus the resulting toolchain can't compile the following program:
90.24 +#include <limits.h>
90.25 +int x = PATH_MAX;
90.26 +because its limits.h doesn't include the glibc header.
90.27 +
90.28 +That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
90.29 +it can refer to $PREFIX/i686-unknown-linux-gnu with the path
90.30 + $PREFIX/lib/../i686-unknown-linux-gnu, but
90.31 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
90.32 +it is only created later, during 'make install'. (Which makes this problem
90.33 +confusing, since one only notices the breakage well after 'make install',
90.34 +at which point the path configure complained about does exist, and has the
90.35 +right stuff in it.)
90.36 +
90.37 +A possible fix is to replace the line in gcc/Makefile.in that says
90.38 + SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
90.39 +with a version that gets rid of extra ..'s, e.g.
90.40 + SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
90.41 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
90.42 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
90.43 +
90.44 +
90.45 +--- gcc-3.4.3/gcc/Makefile.in.foo 2005-05-20 11:41:39.000000000 -0700
90.46 ++++ gcc-3.4.3/gcc/Makefile.in 2005-05-20 12:08:46.000000000 -0700
90.47 +@@ -350,7 +350,10 @@
90.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
90.49 +
90.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
90.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
90.52 ++# Purge it of unneccessary internal relative paths
90.53 ++# to directories that might not exist yet.
90.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
90.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
90.56 +
90.57 + # Control whether to run fixproto and fixincludes.
90.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
90.59 +@@ -2532,11 +2535,13 @@
90.60 + $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
90.61 +
90.62 + # Build fixed copies of system files.
90.63 ++# Abort if no system headers available, unless building a crosscompiler.
90.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
90.65 + stmp-fixinc: fixinc.sh gsyslimits.h
90.66 + @if test ! -d ${SYSTEM_HEADER_DIR}; then \
90.67 + echo The directory that should contain system headers does not exist: >&2 ; \
90.68 + echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
90.69 +- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
90.70 ++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
90.71 + then sleep 1; else exit 1; fi; \
90.72 + fi
90.73 + rm -rf include; mkdir include
91.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
91.2 +++ b/patches/gcc/3.3.6/110-gcc-3.3.4-arm-bigendian.patch Sun Sep 23 17:08:09 2007 +0000
91.3 @@ -0,0 +1,62 @@
91.4 +diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
91.5 +--- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h 2004-03-30 22:43:45.000000000 +0200
91.6 ++++ gcc-3.3.4/gcc/config/arm/linux-elf.h 2004-08-20 02:13:02.969084177 +0200
91.7 +@@ -30,17 +30,31 @@
91.8 + /* Do not assume anything about header files. */
91.9 + #define NO_IMPLICIT_EXTERN_C
91.10 +
91.11 ++/*
91.12 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
91.13 ++ * (big endian) configurations.
91.14 ++ */
91.15 ++#if TARGET_BIG_ENDIAN_DEFAULT
91.16 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
91.17 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
91.18 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
91.19 ++#else
91.20 ++#define TARGET_ENDIAN_DEFAULT 0
91.21 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
91.22 ++#define TARGET_LINKER_EMULATION "armelf_linux"
91.23 ++#endif
91.24 ++
91.25 + /* Default is to use APCS-32 mode. */
91.26 + #undef TARGET_DEFAULT
91.27 +-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
91.28 ++#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
91.29 +
91.30 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
91.31 +
91.32 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
91.33 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
91.34 +
91.35 + #undef MULTILIB_DEFAULTS
91.36 + #define MULTILIB_DEFAULTS \
91.37 +- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
91.38 ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
91.39 +
91.40 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
91.41 +
91.42 +@@ -88,7 +102,7 @@
91.43 + %{rdynamic:-export-dynamic} \
91.44 + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
91.45 + -X \
91.46 +- %{mbig-endian:-EB}" \
91.47 ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
91.48 + SUBTARGET_EXTRA_LINK_SPEC
91.49 +
91.50 + #define TARGET_OS_CPP_BUILTINS() \
91.51 +diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
91.52 +--- gcc-3.3.4.orig/gcc/config.gcc 2004-04-29 06:42:47.000000000 +0200
91.53 ++++ gcc-3.3.4/gcc/config.gcc 2004-08-20 02:11:04.326143343 +0200
91.54 +@@ -699,6 +699,11 @@
91.55 + ;;
91.56 + arm*-*-linux*) # ARM GNU/Linux with ELF
91.57 + tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
91.58 ++ case $machine in
91.59 ++ arm*b-*)
91.60 ++ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
91.61 ++ ;;
91.62 ++ esac
91.63 + tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
91.64 + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
91.65 + gnu_ld=yes
92.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
92.2 +++ b/patches/gcc/3.3.6/120-gcc-3.3.4-arm-pr22528.patch Sun Sep 23 17:08:09 2007 +0000
92.3 @@ -0,0 +1,71 @@
92.4 +From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
92.5 +Richard Earnshaw. Fixes http://gcc.gnu.org/PR22528
92.6 +
92.7 +--- gcc-3.3.4/gcc/config/arm/arm.md.orig 2004-03-30 22:43:44.000000000 +0200
92.8 ++++ gcc-3.3.4/gcc/config/arm/arm.md 2005-08-15 12:21:55.000000000 +0200
92.9 +@@ -4275,7 +4275,7 @@
92.10 + (set (match_dup 2)
92.11 + (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
92.12 + ;; store the high byte
92.13 +- (set (match_dup 4) (subreg:QI (match_dup 2) 0))] ;explicit subreg safe
92.14 ++ (set (match_dup 4) (match_dup 5))]
92.15 + "TARGET_ARM"
92.16 + "
92.17 + {
92.18 +@@ -4291,7 +4291,8 @@
92.19 + operands[1] = adjust_address (operands[1], QImode, 0);
92.20 + operands[3] = gen_lowpart (QImode, operands[0]);
92.21 + operands[0] = gen_lowpart (SImode, operands[0]);
92.22 +- operands[2] = gen_reg_rtx (SImode);
92.23 ++ operands[2] = gen_reg_rtx (SImode);
92.24 ++ operands[5] = gen_lowpart (QImode, operands[2]);
92.25 + }"
92.26 + )
92.27 +
92.28 +@@ -4299,7 +4300,7 @@
92.29 + [(set (match_dup 4) (match_dup 3))
92.30 + (set (match_dup 2)
92.31 + (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
92.32 +- (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 3))]
92.33 ++ (set (match_operand 1 "" "") (match_dup 5))]
92.34 + "TARGET_ARM"
92.35 + "
92.36 + {
92.37 +@@ -4316,13 +4317,14 @@
92.38 + operands[3] = gen_lowpart (QImode, operands[0]);
92.39 + operands[0] = gen_lowpart (SImode, operands[0]);
92.40 + operands[2] = gen_reg_rtx (SImode);
92.41 ++ operands[5] = gen_lowpart (QImode, operands[2]);
92.42 + }"
92.43 + )
92.44 +
92.45 + ;; Subroutine to store a half word integer constant into memory.
92.46 + (define_expand "storeinthi"
92.47 + [(set (match_operand 0 "" "")
92.48 +- (subreg:QI (match_operand 1 "" "") 0))
92.49 ++ (match_operand 1 "" ""))
92.50 + (set (match_dup 3) (match_dup 2))]
92.51 + "TARGET_ARM"
92.52 + "
92.53 +@@ -4363,6 +4365,7 @@
92.54 + operands[3] = adjust_address (op0, QImode, 1);
92.55 + operands[0] = adjust_address (operands[0], QImode, 0);
92.56 + operands[2] = gen_lowpart (QImode, operands[2]);
92.57 ++ operands[1] = gen_lowpart (QImode, operands[1]);
92.58 + }"
92.59 + )
92.60 +
92.61 +@@ -4682,11 +4685,12 @@
92.62 + (set (match_dup 3)
92.63 + (ashiftrt:SI (match_dup 2) (const_int 16)))
92.64 + (set (match_operand:HI 0 "s_register_operand" "")
92.65 +- (subreg:HI (match_dup 3) 0))]
92.66 ++ (match_dup 4))]
92.67 + "TARGET_ARM"
92.68 + "
92.69 + operands[2] = gen_reg_rtx (SImode);
92.70 + operands[3] = gen_reg_rtx (SImode);
92.71 ++ operands[4] = gen_lowpart (HImode, operands[3]);
92.72 + "
92.73 + )
92.74 +
93.1 --- a/patches/gcc/3.3.6/fix-fixincl.patch Sat Sep 22 17:25:42 2007 +0000
93.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
93.3 @@ -1,70 +0,0 @@
93.4 -See http://gcc.gnu.org/PR22541
93.5 -
93.6 -From: Dan Kegel
93.7 -
93.8 -When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
93.9 -(the only two I've tried like this), the configure script happily copies
93.10 -the glibc include files from include to sys-include; here's the line
93.11 -from the log file (with $PREFIX instead of the real prefix):
93.12 -
93.13 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
93.14 -
93.15 -But later, when running fixincludes, it gives the error message
93.16 - The directory that should contain system headers does not exist:
93.17 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
93.18 -
93.19 -Nevertheless, it continues building; the header files it installs in
93.20 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
93.21 -do not include the boilerplate that would cause it to #include_next the
93.22 -glibc headers in the system header directory.
93.23 -Thus the resulting toolchain can't compile the following program:
93.24 -#include <limits.h>
93.25 -int x = PATH_MAX;
93.26 -because its limits.h doesn't include the glibc header.
93.27 -
93.28 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
93.29 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
93.30 - $PREFIX/lib/../i686-unknown-linux-gnu, but
93.31 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
93.32 -it is only created later, during 'make install'. (Which makes this problem
93.33 -confusing, since one only notices the breakage well after 'make install',
93.34 -at which point the path configure complained about does exist, and has the
93.35 -right stuff in it.)
93.36 -
93.37 -A possible fix is to replace the line in gcc/Makefile.in that says
93.38 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
93.39 -with a version that gets rid of extra ..'s, e.g.
93.40 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
93.41 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
93.42 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
93.43 -
93.44 -
93.45 ---- gcc-3.4.3/gcc/Makefile.in.foo 2005-05-20 11:41:39.000000000 -0700
93.46 -+++ gcc-3.4.3/gcc/Makefile.in 2005-05-20 12:08:46.000000000 -0700
93.47 -@@ -350,7 +350,10 @@
93.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
93.49 -
93.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
93.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
93.52 -+# Purge it of unneccessary internal relative paths
93.53 -+# to directories that might not exist yet.
93.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
93.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
93.56 -
93.57 - # Control whether to run fixproto and fixincludes.
93.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
93.59 -@@ -2532,11 +2535,13 @@
93.60 - $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
93.61 -
93.62 - # Build fixed copies of system files.
93.63 -+# Abort if no system headers available, unless building a crosscompiler.
93.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
93.65 - stmp-fixinc: fixinc.sh gsyslimits.h
93.66 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
93.67 - echo The directory that should contain system headers does not exist: >&2 ; \
93.68 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
93.69 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
93.70 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
93.71 - then sleep 1; else exit 1; fi; \
93.72 - fi
93.73 - rm -rf include; mkdir include
94.1 --- a/patches/gcc/3.3.6/gcc-3.3.4-arm-bigendian.patch Sat Sep 22 17:25:42 2007 +0000
94.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
94.3 @@ -1,62 +0,0 @@
94.4 -diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
94.5 ---- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h 2004-03-30 22:43:45.000000000 +0200
94.6 -+++ gcc-3.3.4/gcc/config/arm/linux-elf.h 2004-08-20 02:13:02.969084177 +0200
94.7 -@@ -30,17 +30,31 @@
94.8 - /* Do not assume anything about header files. */
94.9 - #define NO_IMPLICIT_EXTERN_C
94.10 -
94.11 -+/*
94.12 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
94.13 -+ * (big endian) configurations.
94.14 -+ */
94.15 -+#if TARGET_BIG_ENDIAN_DEFAULT
94.16 -+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
94.17 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
94.18 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
94.19 -+#else
94.20 -+#define TARGET_ENDIAN_DEFAULT 0
94.21 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
94.22 -+#define TARGET_LINKER_EMULATION "armelf_linux"
94.23 -+#endif
94.24 -+
94.25 - /* Default is to use APCS-32 mode. */
94.26 - #undef TARGET_DEFAULT
94.27 --#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
94.28 -+#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
94.29 -
94.30 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
94.31 -
94.32 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
94.33 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
94.34 -
94.35 - #undef MULTILIB_DEFAULTS
94.36 - #define MULTILIB_DEFAULTS \
94.37 -- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
94.38 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
94.39 -
94.40 - #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
94.41 -
94.42 -@@ -88,7 +102,7 @@
94.43 - %{rdynamic:-export-dynamic} \
94.44 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
94.45 - -X \
94.46 -- %{mbig-endian:-EB}" \
94.47 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
94.48 - SUBTARGET_EXTRA_LINK_SPEC
94.49 -
94.50 - #define TARGET_OS_CPP_BUILTINS() \
94.51 -diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
94.52 ---- gcc-3.3.4.orig/gcc/config.gcc 2004-04-29 06:42:47.000000000 +0200
94.53 -+++ gcc-3.3.4/gcc/config.gcc 2004-08-20 02:11:04.326143343 +0200
94.54 -@@ -699,6 +699,11 @@
94.55 - ;;
94.56 - arm*-*-linux*) # ARM GNU/Linux with ELF
94.57 - tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
94.58 -+ case $machine in
94.59 -+ arm*b-*)
94.60 -+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
94.61 -+ ;;
94.62 -+ esac
94.63 - tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
94.64 - extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
94.65 - gnu_ld=yes
95.1 --- a/patches/gcc/3.3.6/gcc-3.3.4-arm-pr22528.patch Sat Sep 22 17:25:42 2007 +0000
95.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
95.3 @@ -1,71 +0,0 @@
95.4 -From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
95.5 -Richard Earnshaw. Fixes http://gcc.gnu.org/PR22528
95.6 -
95.7 ---- gcc-3.3.4/gcc/config/arm/arm.md.orig 2004-03-30 22:43:44.000000000 +0200
95.8 -+++ gcc-3.3.4/gcc/config/arm/arm.md 2005-08-15 12:21:55.000000000 +0200
95.9 -@@ -4275,7 +4275,7 @@
95.10 - (set (match_dup 2)
95.11 - (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
95.12 - ;; store the high byte
95.13 -- (set (match_dup 4) (subreg:QI (match_dup 2) 0))] ;explicit subreg safe
95.14 -+ (set (match_dup 4) (match_dup 5))]
95.15 - "TARGET_ARM"
95.16 - "
95.17 - {
95.18 -@@ -4291,7 +4291,8 @@
95.19 - operands[1] = adjust_address (operands[1], QImode, 0);
95.20 - operands[3] = gen_lowpart (QImode, operands[0]);
95.21 - operands[0] = gen_lowpart (SImode, operands[0]);
95.22 -- operands[2] = gen_reg_rtx (SImode);
95.23 -+ operands[2] = gen_reg_rtx (SImode);
95.24 -+ operands[5] = gen_lowpart (QImode, operands[2]);
95.25 - }"
95.26 - )
95.27 -
95.28 -@@ -4299,7 +4300,7 @@
95.29 - [(set (match_dup 4) (match_dup 3))
95.30 - (set (match_dup 2)
95.31 - (ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
95.32 -- (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 3))]
95.33 -+ (set (match_operand 1 "" "") (match_dup 5))]
95.34 - "TARGET_ARM"
95.35 - "
95.36 - {
95.37 -@@ -4316,13 +4317,14 @@
95.38 - operands[3] = gen_lowpart (QImode, operands[0]);
95.39 - operands[0] = gen_lowpart (SImode, operands[0]);
95.40 - operands[2] = gen_reg_rtx (SImode);
95.41 -+ operands[5] = gen_lowpart (QImode, operands[2]);
95.42 - }"
95.43 - )
95.44 -
95.45 - ;; Subroutine to store a half word integer constant into memory.
95.46 - (define_expand "storeinthi"
95.47 - [(set (match_operand 0 "" "")
95.48 -- (subreg:QI (match_operand 1 "" "") 0))
95.49 -+ (match_operand 1 "" ""))
95.50 - (set (match_dup 3) (match_dup 2))]
95.51 - "TARGET_ARM"
95.52 - "
95.53 -@@ -4363,6 +4365,7 @@
95.54 - operands[3] = adjust_address (op0, QImode, 1);
95.55 - operands[0] = adjust_address (operands[0], QImode, 0);
95.56 - operands[2] = gen_lowpart (QImode, operands[2]);
95.57 -+ operands[1] = gen_lowpart (QImode, operands[1]);
95.58 - }"
95.59 - )
95.60 -
95.61 -@@ -4682,11 +4685,12 @@
95.62 - (set (match_dup 3)
95.63 - (ashiftrt:SI (match_dup 2) (const_int 16)))
95.64 - (set (match_operand:HI 0 "s_register_operand" "")
95.65 -- (subreg:HI (match_dup 3) 0))]
95.66 -+ (match_dup 4))]
95.67 - "TARGET_ARM"
95.68 - "
95.69 - operands[2] = gen_reg_rtx (SImode);
95.70 - operands[3] = gen_reg_rtx (SImode);
95.71 -+ operands[4] = gen_lowpart (HImode, operands[3]);
95.72 - "
95.73 - )
95.74 -
96.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
96.2 +++ b/patches/gcc/3.4.6/710-all_sh-pr16665-fix.patch Sun Sep 23 17:08:09 2007 +0000
96.3 @@ -0,0 +1,44 @@
96.4 +diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.c gcc-3.4.6/gcc/config/sh/sh.c
96.5 +--- gcc-3.4.6.orig/gcc/config/sh/sh.c 2004-09-03 08:51:30.000000000 +0200
96.6 ++++ gcc-3.4.6/gcc/config/sh/sh.c 2007-08-15 23:01:48.000000000 +0200
96.7 +@@ -9107,6 +9107,15 @@
96.8 + }
96.9 + this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
96.10 +
96.11 ++ /* In PIC case, we set PIC register to compute the target address. We
96.12 ++ can use a scratch register to save and restore the original value
96.13 ++ except for SHcompact. For SHcompact, use stack. */
96.14 ++ if (flag_pic && TARGET_SHCOMPACT)
96.15 ++ {
96.16 ++ push (PIC_OFFSET_TABLE_REGNUM);
96.17 ++ emit_insn (gen_GOTaddr2picreg ());
96.18 ++ }
96.19 ++
96.20 + /* For SHcompact, we only have r0 for a scratch register: r1 is the
96.21 + static chain pointer (even if you can't have nested virtual functions
96.22 + right now, someone might implement them sometime), and the rest of the
96.23 +@@ -9189,8 +9198,24 @@
96.24 + assemble_external (function);
96.25 + TREE_USED (function) = 1;
96.26 + }
96.27 ++ /* We can use scratch1 to save and restore the original value of
96.28 ++ PIC register except for SHcompact. */
96.29 ++ if (flag_pic && ! TARGET_SHCOMPACT)
96.30 ++ {
96.31 ++ emit_move_insn (scratch1,
96.32 ++ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
96.33 ++ emit_insn (gen_GOTaddr2picreg ());
96.34 ++ }
96.35 + funexp = XEXP (DECL_RTL (function), 0);
96.36 + emit_move_insn (scratch2, funexp);
96.37 ++ if (flag_pic)
96.38 ++ {
96.39 ++ if (! TARGET_SHCOMPACT)
96.40 ++ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
96.41 ++ scratch1);
96.42 ++ else
96.43 ++ pop (PIC_OFFSET_TABLE_REGNUM);
96.44 ++ }
96.45 + funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
96.46 + sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
96.47 + SIBLING_CALL_P (sibcall) = 1;
97.1 --- a/patches/gcc/3.4.6/71_all_sh-pr16665-fix.patch Sat Sep 22 17:25:42 2007 +0000
97.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
97.3 @@ -1,44 +0,0 @@
97.4 -diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.c gcc-3.4.6/gcc/config/sh/sh.c
97.5 ---- gcc-3.4.6.orig/gcc/config/sh/sh.c 2004-09-03 08:51:30.000000000 +0200
97.6 -+++ gcc-3.4.6/gcc/config/sh/sh.c 2007-08-15 23:01:48.000000000 +0200
97.7 -@@ -9107,6 +9107,15 @@
97.8 - }
97.9 - this = FUNCTION_ARG (cum, Pmode, ptr_type_node, 1);
97.10 -
97.11 -+ /* In PIC case, we set PIC register to compute the target address. We
97.12 -+ can use a scratch register to save and restore the original value
97.13 -+ except for SHcompact. For SHcompact, use stack. */
97.14 -+ if (flag_pic && TARGET_SHCOMPACT)
97.15 -+ {
97.16 -+ push (PIC_OFFSET_TABLE_REGNUM);
97.17 -+ emit_insn (gen_GOTaddr2picreg ());
97.18 -+ }
97.19 -+
97.20 - /* For SHcompact, we only have r0 for a scratch register: r1 is the
97.21 - static chain pointer (even if you can't have nested virtual functions
97.22 - right now, someone might implement them sometime), and the rest of the
97.23 -@@ -9189,8 +9198,24 @@
97.24 - assemble_external (function);
97.25 - TREE_USED (function) = 1;
97.26 - }
97.27 -+ /* We can use scratch1 to save and restore the original value of
97.28 -+ PIC register except for SHcompact. */
97.29 -+ if (flag_pic && ! TARGET_SHCOMPACT)
97.30 -+ {
97.31 -+ emit_move_insn (scratch1,
97.32 -+ gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM));
97.33 -+ emit_insn (gen_GOTaddr2picreg ());
97.34 -+ }
97.35 - funexp = XEXP (DECL_RTL (function), 0);
97.36 - emit_move_insn (scratch2, funexp);
97.37 -+ if (flag_pic)
97.38 -+ {
97.39 -+ if (! TARGET_SHCOMPACT)
97.40 -+ emit_move_insn (gen_rtx_REG (Pmode, PIC_OFFSET_TABLE_REGNUM),
97.41 -+ scratch1);
97.42 -+ else
97.43 -+ pop (PIC_OFFSET_TABLE_REGNUM);
97.44 -+ }
97.45 - funexp = gen_rtx_MEM (FUNCTION_MODE, scratch2);
97.46 - sibcall = emit_call_insn (gen_sibcall (funexp, const0_rtx, NULL_RTX));
97.47 - SIBLING_CALL_P (sibcall) = 1;
98.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
98.2 +++ b/patches/gcc/3.4.6/720-all_sh-no-reorder-blocks.patch Sun Sep 23 17:08:09 2007 +0000
98.3 @@ -0,0 +1,14 @@
98.4 +diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.h gcc-3.4.6/gcc/config/sh/sh.h
98.5 +--- gcc-3.4.6.orig/gcc/config/sh/sh.h 2006-01-12 02:20:32.000000000 +0100
98.6 ++++ gcc-3.4.6/gcc/config/sh/sh.h 2007-08-15 23:03:09.000000000 +0200
98.7 +@@ -422,6 +422,10 @@
98.8 + do { \
98.9 + if (LEVEL) \
98.10 + flag_omit_frame_pointer = -1; \
98.11 ++ if (LEVEL <= 2) \
98.12 ++ { \
98.13 ++ flag_reorder_blocks = 0; \
98.14 ++ } \
98.15 + if (SIZE) \
98.16 + target_flags |= SPACE_BIT; \
98.17 + if (TARGET_SHMEDIA && LEVEL > 1) \
99.1 --- a/patches/gcc/3.4.6/72_all_sh-no-reorder-blocks.patch Sat Sep 22 17:25:42 2007 +0000
99.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
99.3 @@ -1,14 +0,0 @@
99.4 -diff -durN gcc-3.4.6.orig/gcc/config/sh/sh.h gcc-3.4.6/gcc/config/sh/sh.h
99.5 ---- gcc-3.4.6.orig/gcc/config/sh/sh.h 2006-01-12 02:20:32.000000000 +0100
99.6 -+++ gcc-3.4.6/gcc/config/sh/sh.h 2007-08-15 23:03:09.000000000 +0200
99.7 -@@ -422,6 +422,10 @@
99.8 - do { \
99.9 - if (LEVEL) \
99.10 - flag_omit_frame_pointer = -1; \
99.11 -+ if (LEVEL <= 2) \
99.12 -+ { \
99.13 -+ flag_reorder_blocks = 0; \
99.14 -+ } \
99.15 - if (SIZE) \
99.16 - target_flags |= SPACE_BIT; \
99.17 - if (TARGET_SHMEDIA && LEVEL > 1) \
100.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
100.2 +++ b/patches/gcc/3.4.6/730-all_sh-pr20617.patch Sun Sep 23 17:08:09 2007 +0000
100.3 @@ -0,0 +1,24 @@
100.4 +diff -durN gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm gcc-3.4.6/gcc/config/sh/lib1funcs.asm
100.5 +--- gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm 2003-08-12 03:25:07.000000000 +0200
100.6 ++++ gcc-3.4.6/gcc/config/sh/lib1funcs.asm 2007-08-15 23:04:26.000000000 +0200
100.7 +@@ -37,9 +37,19 @@
100.8 + ELF local label prefixes by J"orn Rennecke
100.9 + amylaar@cygnus.com */
100.10 +
100.11 ++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
100.12 ++
100.13 + #ifdef __ELF__
100.14 + #define LOCAL(X) .L_##X
100.15 +-#define FUNC(X) .type X,@function
100.16 ++
100.17 ++#if 1 /* ??? The export list mechanism is broken, everything that is not
100.18 ++ hidden is exported. */
100.19 ++#undef FUNC
100.20 ++#define FUNC(X) .type X,@function; .hidden X
100.21 ++#undef ALIAS
100.22 ++#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
100.23 ++#endif
100.24 ++
100.25 + #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
100.26 + #define ENDFUNC(X) ENDFUNC0(X)
100.27 + #else
101.1 --- a/patches/gcc/3.4.6/73_all_sh-pr20617.patch Sat Sep 22 17:25:42 2007 +0000
101.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
101.3 @@ -1,24 +0,0 @@
101.4 -diff -durN gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm gcc-3.4.6/gcc/config/sh/lib1funcs.asm
101.5 ---- gcc-3.4.6.orig/gcc/config/sh/lib1funcs.asm 2003-08-12 03:25:07.000000000 +0200
101.6 -+++ gcc-3.4.6/gcc/config/sh/lib1funcs.asm 2007-08-15 23:04:26.000000000 +0200
101.7 -@@ -37,9 +37,19 @@
101.8 - ELF local label prefixes by J"orn Rennecke
101.9 - amylaar@cygnus.com */
101.10 -
101.11 -+#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y)
101.12 -+
101.13 - #ifdef __ELF__
101.14 - #define LOCAL(X) .L_##X
101.15 --#define FUNC(X) .type X,@function
101.16 -+
101.17 -+#if 1 /* ??? The export list mechanism is broken, everything that is not
101.18 -+ hidden is exported. */
101.19 -+#undef FUNC
101.20 -+#define FUNC(X) .type X,@function; .hidden X
101.21 -+#undef ALIAS
101.22 -+#define ALIAS(X,Y) .global GLOBAL(X); .set GLOBAL(X),GLOBAL(Y); .hidden GLOBAL(X)
101.23 -+#endif
101.24 -+
101.25 - #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
101.26 - #define ENDFUNC(X) ENDFUNC0(X)
101.27 - #else
102.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
102.2 +++ b/patches/gcc/3.4.6/910-arm-softfloat.patch Sun Sep 23 17:08:09 2007 +0000
102.3 @@ -0,0 +1,161 @@
102.4 +diff -durN gcc-3.4.6.orig/gcc/config/arm/coff.h gcc-3.4.6/gcc/config/arm/coff.h
102.5 +--- gcc-3.4.6.orig/gcc/config/arm/coff.h 2004-02-24 15:25:22.000000000 +0100
102.6 ++++ gcc-3.4.6/gcc/config/arm/coff.h 2007-08-15 23:10:54.000000000 +0200
102.7 +@@ -31,11 +31,16 @@
102.8 + #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
102.9 +
102.10 + #undef TARGET_DEFAULT
102.11 +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
102.12 ++#define TARGET_DEFAULT \
102.13 ++ ( ARM_FLAG_SOFT_FLOAT \
102.14 ++ | ARM_FLAG_VFP \
102.15 ++ | ARM_FLAG_APCS_32 \
102.16 ++ | ARM_FLAG_APCS_FRAME \
102.17 ++ | ARM_FLAG_MMU_TRAPS )
102.18 +
102.19 + #ifndef MULTILIB_DEFAULTS
102.20 + #define MULTILIB_DEFAULTS \
102.21 +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
102.22 ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
102.23 + #endif
102.24 +
102.25 + /* This is COFF, but prefer stabs. */
102.26 +diff -durN gcc-3.4.6.orig/gcc/config/arm/elf.h gcc-3.4.6/gcc/config/arm/elf.h
102.27 +--- gcc-3.4.6.orig/gcc/config/arm/elf.h 2004-02-24 15:25:22.000000000 +0100
102.28 ++++ gcc-3.4.6/gcc/config/arm/elf.h 2007-08-15 23:10:54.000000000 +0200
102.29 +@@ -46,7 +46,9 @@
102.30 +
102.31 + #ifndef SUBTARGET_ASM_FLOAT_SPEC
102.32 + #define SUBTARGET_ASM_FLOAT_SPEC "\
102.33 +-%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
102.34 ++%{mapcs-float:-mfloat} \
102.35 ++%{mhard-float:-mfpu=fpa} \
102.36 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
102.37 + #endif
102.38 +
102.39 + #ifndef ASM_SPEC
102.40 +@@ -106,12 +108,17 @@
102.41 + #endif
102.42 +
102.43 + #ifndef TARGET_DEFAULT
102.44 +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
102.45 ++#define TARGET_DEFAULT \
102.46 ++ ( ARM_FLAG_SOFT_FLOAT \
102.47 ++ | ARM_FLAG_VFP \
102.48 ++ | ARM_FLAG_APCS_32 \
102.49 ++ | ARM_FLAG_APCS_FRAME \
102.50 ++ | ARM_FLAG_MMU_TRAPS )
102.51 + #endif
102.52 +
102.53 + #ifndef MULTILIB_DEFAULTS
102.54 + #define MULTILIB_DEFAULTS \
102.55 +- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
102.56 ++ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
102.57 + #endif
102.58 +
102.59 + #define TARGET_ASM_FILE_START_APP_OFF true
102.60 +diff -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
102.61 +--- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h 2007-08-15 23:07:00.000000000 +0200
102.62 ++++ gcc-3.4.6/gcc/config/arm/linux-elf.h 2007-08-15 23:10:54.000000000 +0200
102.63 +@@ -44,12 +44,26 @@
102.64 + #define TARGET_LINKER_EMULATION "armelf_linux"
102.65 + #endif
102.66 +
102.67 +-/* Default is to use APCS-32 mode. */
102.68 ++/*
102.69 ++ * Default is to use APCS-32 mode with soft-vfp.
102.70 ++ * The old Linux default for floats can be achieved with -mhard-float
102.71 ++ * or with the configure --with-float=hard option.
102.72 ++ * If -msoft-float or --with-float=soft is used then software float
102.73 ++ * support will be used just like the default but with the legacy
102.74 ++ * big endian word ordering for double float representation instead.
102.75 ++ */
102.76 + #undef TARGET_DEFAULT
102.77 +-#define TARGET_DEFAULT \
102.78 +- ( ARM_FLAG_APCS_32 | \
102.79 +- ARM_FLAG_MMU_TRAPS | \
102.80 +- TARGET_ENDIAN_DEFAULT )
102.81 ++#define TARGET_DEFAULT \
102.82 ++ ( ARM_FLAG_APCS_32 \
102.83 ++ | ARM_FLAG_SOFT_FLOAT \
102.84 ++ | TARGET_ENDIAN_DEFAULT \
102.85 ++ | ARM_FLAG_VFP \
102.86 ++ | ARM_FLAG_MMU_TRAPS )
102.87 ++
102.88 ++#undef SUBTARGET_EXTRA_ASM_SPEC
102.89 ++#define SUBTARGET_EXTRA_ASM_SPEC "\
102.90 ++%{mhard-float:-mfpu=fpa} \
102.91 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
102.92 +
102.93 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
102.94 +
102.95 +@@ -57,7 +71,7 @@
102.96 +
102.97 + #undef MULTILIB_DEFAULTS
102.98 + #define MULTILIB_DEFAULTS \
102.99 +- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
102.100 ++ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
102.101 +
102.102 + #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
102.103 +
102.104 +@@ -72,7 +86,7 @@
102.105 + %{shared:-lc} \
102.106 + %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
102.107 +
102.108 +-#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
102.109 ++#define LIBGCC_SPEC "-lgcc"
102.110 +
102.111 + /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
102.112 + the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
102.113 +diff -durN gcc-3.4.6.orig/gcc/config/arm/t-linux gcc-3.4.6/gcc/config/arm/t-linux
102.114 +--- gcc-3.4.6.orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
102.115 ++++ gcc-3.4.6/gcc/config/arm/t-linux 2007-08-15 23:10:54.000000000 +0200
102.116 +@@ -4,7 +4,10 @@
102.117 + LIBGCC2_DEBUG_CFLAGS = -g0
102.118 +
102.119 + LIB1ASMSRC = arm/lib1funcs.asm
102.120 +-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
102.121 ++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
102.122 ++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
102.123 ++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
102.124 ++ _fixsfsi _fixunssfsi
102.125 +
102.126 + # MULTILIB_OPTIONS = mhard-float/msoft-float
102.127 + # MULTILIB_DIRNAMES = hard-float soft-float
102.128 +diff -durN gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h gcc-3.4.6/gcc/config/arm/unknown-elf.h
102.129 +--- gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h 2004-02-24 15:25:22.000000000 +0100
102.130 ++++ gcc-3.4.6/gcc/config/arm/unknown-elf.h 2007-08-15 23:10:54.000000000 +0200
102.131 +@@ -30,7 +30,12 @@
102.132 +
102.133 + /* Default to using APCS-32 and software floating point. */
102.134 + #ifndef TARGET_DEFAULT
102.135 +-#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
102.136 ++#define TARGET_DEFAULT \
102.137 ++ ( ARM_FLAG_SOFT_FLOAT \
102.138 ++ | ARM_FLAG_VFP \
102.139 ++ | ARM_FLAG_APCS_32 \
102.140 ++ | ARM_FLAG_APCS_FRAME \
102.141 ++ | ARM_FLAG_MMU_TRAPS )
102.142 + #endif
102.143 +
102.144 + /* Now we define the strings used to build the spec file. */
102.145 +diff -durN gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h gcc-3.4.6/gcc/config/arm/xscale-elf.h
102.146 +--- gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h 2003-07-02 01:26:43.000000000 +0200
102.147 ++++ gcc-3.4.6/gcc/config/arm/xscale-elf.h 2007-08-15 23:10:54.000000000 +0200
102.148 +@@ -49,11 +49,12 @@
102.149 + endian, regardless of the endian-ness of the memory
102.150 + system. */
102.151 +
102.152 +-#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
102.153 +- %{mhard-float:-mfpu=fpa} \
102.154 +- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
102.155 ++#define SUBTARGET_EXTRA_ASM_SPEC "\
102.156 ++%{!mcpu=*:-mcpu=xscale} \
102.157 ++%{mhard-float:-mfpu=fpa} \
102.158 ++%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
102.159 +
102.160 + #ifndef MULTILIB_DEFAULTS
102.161 + #define MULTILIB_DEFAULTS \
102.162 +- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
102.163 ++ { "mlittle-endian", "mno-thumb-interwork", "marm" }
102.164 + #endif
103.1 --- a/patches/gcc/3.4.6/arm-softfloat.patch Sat Sep 22 17:25:42 2007 +0000
103.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
103.3 @@ -1,161 +0,0 @@
103.4 -diff -durN gcc-3.4.6.orig/gcc/config/arm/coff.h gcc-3.4.6/gcc/config/arm/coff.h
103.5 ---- gcc-3.4.6.orig/gcc/config/arm/coff.h 2004-02-24 15:25:22.000000000 +0100
103.6 -+++ gcc-3.4.6/gcc/config/arm/coff.h 2007-08-15 23:10:54.000000000 +0200
103.7 -@@ -31,11 +31,16 @@
103.8 - #define TARGET_VERSION fputs (" (ARM/coff)", stderr)
103.9 -
103.10 - #undef TARGET_DEFAULT
103.11 --#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
103.12 -+#define TARGET_DEFAULT \
103.13 -+ ( ARM_FLAG_SOFT_FLOAT \
103.14 -+ | ARM_FLAG_VFP \
103.15 -+ | ARM_FLAG_APCS_32 \
103.16 -+ | ARM_FLAG_APCS_FRAME \
103.17 -+ | ARM_FLAG_MMU_TRAPS )
103.18 -
103.19 - #ifndef MULTILIB_DEFAULTS
103.20 - #define MULTILIB_DEFAULTS \
103.21 -- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
103.22 -+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork" }
103.23 - #endif
103.24 -
103.25 - /* This is COFF, but prefer stabs. */
103.26 -diff -durN gcc-3.4.6.orig/gcc/config/arm/elf.h gcc-3.4.6/gcc/config/arm/elf.h
103.27 ---- gcc-3.4.6.orig/gcc/config/arm/elf.h 2004-02-24 15:25:22.000000000 +0100
103.28 -+++ gcc-3.4.6/gcc/config/arm/elf.h 2007-08-15 23:10:54.000000000 +0200
103.29 -@@ -46,7 +46,9 @@
103.30 -
103.31 - #ifndef SUBTARGET_ASM_FLOAT_SPEC
103.32 - #define SUBTARGET_ASM_FLOAT_SPEC "\
103.33 --%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}"
103.34 -+%{mapcs-float:-mfloat} \
103.35 -+%{mhard-float:-mfpu=fpa} \
103.36 -+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
103.37 - #endif
103.38 -
103.39 - #ifndef ASM_SPEC
103.40 -@@ -106,12 +108,17 @@
103.41 - #endif
103.42 -
103.43 - #ifndef TARGET_DEFAULT
103.44 --#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
103.45 -+#define TARGET_DEFAULT \
103.46 -+ ( ARM_FLAG_SOFT_FLOAT \
103.47 -+ | ARM_FLAG_VFP \
103.48 -+ | ARM_FLAG_APCS_32 \
103.49 -+ | ARM_FLAG_APCS_FRAME \
103.50 -+ | ARM_FLAG_MMU_TRAPS )
103.51 - #endif
103.52 -
103.53 - #ifndef MULTILIB_DEFAULTS
103.54 - #define MULTILIB_DEFAULTS \
103.55 -- { "marm", "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
103.56 -+ { "marm", "mlittle-endian", "mapcs-32", "mno-thumb-interwork", "fno-leading-underscore" }
103.57 - #endif
103.58 -
103.59 - #define TARGET_ASM_FILE_START_APP_OFF true
103.60 -diff -durN gcc-3.4.6.orig/gcc/config/arm/linux-elf.h gcc-3.4.6/gcc/config/arm/linux-elf.h
103.61 ---- gcc-3.4.6.orig/gcc/config/arm/linux-elf.h 2007-08-15 23:07:00.000000000 +0200
103.62 -+++ gcc-3.4.6/gcc/config/arm/linux-elf.h 2007-08-15 23:10:54.000000000 +0200
103.63 -@@ -44,12 +44,26 @@
103.64 - #define TARGET_LINKER_EMULATION "armelf_linux"
103.65 - #endif
103.66 -
103.67 --/* Default is to use APCS-32 mode. */
103.68 -+/*
103.69 -+ * Default is to use APCS-32 mode with soft-vfp.
103.70 -+ * The old Linux default for floats can be achieved with -mhard-float
103.71 -+ * or with the configure --with-float=hard option.
103.72 -+ * If -msoft-float or --with-float=soft is used then software float
103.73 -+ * support will be used just like the default but with the legacy
103.74 -+ * big endian word ordering for double float representation instead.
103.75 -+ */
103.76 - #undef TARGET_DEFAULT
103.77 --#define TARGET_DEFAULT \
103.78 -- ( ARM_FLAG_APCS_32 | \
103.79 -- ARM_FLAG_MMU_TRAPS | \
103.80 -- TARGET_ENDIAN_DEFAULT )
103.81 -+#define TARGET_DEFAULT \
103.82 -+ ( ARM_FLAG_APCS_32 \
103.83 -+ | ARM_FLAG_SOFT_FLOAT \
103.84 -+ | TARGET_ENDIAN_DEFAULT \
103.85 -+ | ARM_FLAG_VFP \
103.86 -+ | ARM_FLAG_MMU_TRAPS )
103.87 -+
103.88 -+#undef SUBTARGET_EXTRA_ASM_SPEC
103.89 -+#define SUBTARGET_EXTRA_ASM_SPEC "\
103.90 -+%{mhard-float:-mfpu=fpa} \
103.91 -+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
103.92 -
103.93 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
103.94 -
103.95 -@@ -57,7 +71,7 @@
103.96 -
103.97 - #undef MULTILIB_DEFAULTS
103.98 - #define MULTILIB_DEFAULTS \
103.99 -- { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
103.100 -+ { "marm", TARGET_ENDIAN_OPTION, "mapcs-32", "mno-thumb-interwork" }
103.101 -
103.102 - #define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
103.103 -
103.104 -@@ -72,7 +86,7 @@
103.105 - %{shared:-lc} \
103.106 - %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
103.107 -
103.108 --#define LIBGCC_SPEC "%{msoft-float:-lfloat} -lgcc"
103.109 -+#define LIBGCC_SPEC "-lgcc"
103.110 -
103.111 - /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
103.112 - the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
103.113 -diff -durN gcc-3.4.6.orig/gcc/config/arm/t-linux gcc-3.4.6/gcc/config/arm/t-linux
103.114 ---- gcc-3.4.6.orig/gcc/config/arm/t-linux 2003-09-20 23:09:07.000000000 +0200
103.115 -+++ gcc-3.4.6/gcc/config/arm/t-linux 2007-08-15 23:10:54.000000000 +0200
103.116 -@@ -4,7 +4,10 @@
103.117 - LIBGCC2_DEBUG_CFLAGS = -g0
103.118 -
103.119 - LIB1ASMSRC = arm/lib1funcs.asm
103.120 --LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
103.121 -+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
103.122 -+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
103.123 -+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
103.124 -+ _fixsfsi _fixunssfsi
103.125 -
103.126 - # MULTILIB_OPTIONS = mhard-float/msoft-float
103.127 - # MULTILIB_DIRNAMES = hard-float soft-float
103.128 -diff -durN gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h gcc-3.4.6/gcc/config/arm/unknown-elf.h
103.129 ---- gcc-3.4.6.orig/gcc/config/arm/unknown-elf.h 2004-02-24 15:25:22.000000000 +0100
103.130 -+++ gcc-3.4.6/gcc/config/arm/unknown-elf.h 2007-08-15 23:10:54.000000000 +0200
103.131 -@@ -30,7 +30,12 @@
103.132 -
103.133 - /* Default to using APCS-32 and software floating point. */
103.134 - #ifndef TARGET_DEFAULT
103.135 --#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)
103.136 -+#define TARGET_DEFAULT \
103.137 -+ ( ARM_FLAG_SOFT_FLOAT \
103.138 -+ | ARM_FLAG_VFP \
103.139 -+ | ARM_FLAG_APCS_32 \
103.140 -+ | ARM_FLAG_APCS_FRAME \
103.141 -+ | ARM_FLAG_MMU_TRAPS )
103.142 - #endif
103.143 -
103.144 - /* Now we define the strings used to build the spec file. */
103.145 -diff -durN gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h gcc-3.4.6/gcc/config/arm/xscale-elf.h
103.146 ---- gcc-3.4.6.orig/gcc/config/arm/xscale-elf.h 2003-07-02 01:26:43.000000000 +0200
103.147 -+++ gcc-3.4.6/gcc/config/arm/xscale-elf.h 2007-08-15 23:10:54.000000000 +0200
103.148 -@@ -49,11 +49,12 @@
103.149 - endian, regardless of the endian-ness of the memory
103.150 - system. */
103.151 -
103.152 --#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale} \
103.153 -- %{mhard-float:-mfpu=fpa} \
103.154 -- %{!mhard-float: %{msoft-float:-mfpu=softfpa;:-mfpu=softvfp}}"
103.155 -+#define SUBTARGET_EXTRA_ASM_SPEC "\
103.156 -+%{!mcpu=*:-mcpu=xscale} \
103.157 -+%{mhard-float:-mfpu=fpa} \
103.158 -+%{!mhard-float: %{msoft-float:-mfpu=softfpa} %{!msoft-float:-mfpu=softvfp}}"
103.159 -
103.160 - #ifndef MULTILIB_DEFAULTS
103.161 - #define MULTILIB_DEFAULTS \
103.162 -- { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
103.163 -+ { "mlittle-endian", "mno-thumb-interwork", "marm" }
103.164 - #endif
104.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
104.2 +++ b/patches/gcc/4.0.0/100-fix-fixincl.patch Sun Sep 23 17:08:09 2007 +0000
104.3 @@ -0,0 +1,72 @@
104.4 +See http://gcc.gnu.org/PR22541
104.5 +
104.6 +From: Dan Kegel
104.7 +
104.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
104.9 +the configure script happily copies the glibc include files from include to sys-include;
104.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
104.11 +
104.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
104.13 +
104.14 +But later, when running fixincludes, it gives the error message
104.15 + The directory that should contain system headers does not exist:
104.16 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
104.17 +
104.18 +Nevertheless, it continues building; the header files it installs in
104.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
104.20 +do not include the boilerplate that would cause it to #include_next the
104.21 +glibc headers in the system header directory.
104.22 +Thus the resulting toolchain can't compile the following program:
104.23 +#include <limits.h>
104.24 +int x = PATH_MAX;
104.25 +because its limits.h doesn't include the glibc header.
104.26 +
104.27 +That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
104.28 +it can refer to $PREFIX/i686-unknown-linux-gnu with the path
104.29 + $PREFIX/lib/../i686-unknown-linux-gnu, but
104.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
104.31 +it is only created later, during 'make install'. (Which makes this problem
104.32 +confusing, since one only notices the breakage well after 'make install',
104.33 +at which point the path configure complained about does exist, and has the
104.34 +right stuff in it.)
104.35 +
104.36 +A possible fix is to replace the line in gcc/Makefile.in that says
104.37 + SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
104.38 +with a version that gets rid of extra ..'s, e.g.
104.39 + SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
104.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
104.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
104.42 +
104.43 +[rediffed against gcc-4.0.0]
104.44 +
104.45 +--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
104.46 ++++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
104.47 +@@ -378,7 +378,10 @@
104.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
104.49 +
104.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
104.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
104.52 ++# Purge it of unneccessary internal relative paths
104.53 ++# to directories that might not exist yet.
104.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
104.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
104.56 +
104.57 + # Control whether to run fixproto and fixincludes.
104.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
104.59 +@@ -2838,13 +2841,15 @@
104.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
104.61 +
104.62 + # Build fixed copies of system files.
104.63 ++# Abort if no system headers available, unless building a crosscompiler.
104.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
104.65 + stmp-fixinc: gsyslimits.h macro_list \
104.66 + ../$(build_subdir)/fixincludes/fixincl \
104.67 + ../$(build_subdir)/fixincludes/fixinc.sh
104.68 + @if test ! -d ${SYSTEM_HEADER_DIR}; then \
104.69 + echo The directory that should contain system headers does not exist: >&2 ; \
104.70 + echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
104.71 +- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
104.72 ++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
104.73 + then sleep 1; else exit 1; fi; \
104.74 + fi
104.75 + rm -rf include; mkdir include
105.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
105.2 +++ b/patches/gcc/4.0.0/110-gcc-4.0-arm-bigendian.patch Sun Sep 23 17:08:09 2007 +0000
105.3 @@ -0,0 +1,79 @@
105.4 +By Lennert Buytenhek <buytenh@wantstofly.org>
105.5 +Adds support for arm*b-linux* big-endian ARM targets
105.6 +
105.7 +Fixes following build error for big-endian ARM targets:
105.8 +
105.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
105.10 +Supported emulations: armelfb_linux armelfb
105.11 +collect2: ld returned 1 exit status
105.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
105.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'
105.14 +make[1]: *** [csu/subdir_lib] Error 2
105.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'
105.16 +make: *** [lib] Error 2
105.17 +
105.18 +
105.19 +See http://gcc.gnu.org/PR16350
105.20 +
105.21 +--- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
105.22 ++++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
105.23 +@@ -31,19 +31,33 @@
105.24 + /* Do not assume anything about header files. */
105.25 + #define NO_IMPLICIT_EXTERN_C
105.26 +
105.27 ++/*
105.28 ++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
105.29 ++ * arm*b-*-linux* (big endian) configurations.
105.30 ++ */
105.31 ++#if TARGET_BIG_ENDIAN_DEFAULT
105.32 ++#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
105.33 ++#define TARGET_ENDIAN_OPTION "mbig-endian"
105.34 ++#define TARGET_LINKER_EMULATION "armelfb_linux"
105.35 ++#else
105.36 ++#define TARGET_ENDIAN_DEFAULT 0
105.37 ++#define TARGET_ENDIAN_OPTION "mlittle-endian"
105.38 ++#define TARGET_LINKER_EMULATION "armelf_linux"
105.39 ++#endif
105.40 ++
105.41 + #undef TARGET_DEFAULT_FLOAT_ABI
105.42 + #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
105.43 +
105.44 + #undef TARGET_DEFAULT
105.45 +-#define TARGET_DEFAULT (0)
105.46 ++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
105.47 +
105.48 + #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
105.49 +
105.50 +-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
105.51 ++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
105.52 +
105.53 + #undef MULTILIB_DEFAULTS
105.54 + #define MULTILIB_DEFAULTS \
105.55 +- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
105.56 ++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
105.57 +
105.58 + /* The GNU C++ standard library requires that these macros be defined. */
105.59 + #undef CPLUSPLUS_CPP_SPEC
105.60 +@@ -90,7 +104,7 @@
105.61 + %{rdynamic:-export-dynamic} \
105.62 + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
105.63 + -X \
105.64 +- %{mbig-endian:-EB}" \
105.65 ++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
105.66 + SUBTARGET_EXTRA_LINK_SPEC
105.67 +
105.68 + #define TARGET_OS_CPP_BUILTINS() \
105.69 +--- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
105.70 ++++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
105.71 +@@ -650,6 +650,11 @@
105.72 + ;;
105.73 + arm*-*-linux*) # ARM GNU/Linux with ELF
105.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"
105.75 ++ case $target in
105.76 ++ arm*b-*-linux*)
105.77 ++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
105.78 ++ ;;
105.79 ++ esac
105.80 + tmake_file="${tmake_file} arm/t-arm arm/t-linux"
105.81 + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
105.82 + gnu_ld=yes
106.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
106.2 +++ b/patches/gcc/4.0.0/120-pr20815-fix.patch Sun Sep 23 17:08:09 2007 +0000
106.3 @@ -0,0 +1,121 @@
106.4 +Date: 18 May 2005 22:47:59 -0000
106.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
106.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
106.7 +To: dank@kegel.com
106.8 +References: <20050407215701.20815.dank@kegel.com>
106.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
106.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
106.11 +
106.12 +
106.13 +------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
106.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
106.15 +
106.16 +>
106.17 +> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
106.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
106.19 +>
106.20 +> coverage_checksum_string already knows a bit about ignoring random seed
106.21 +> produced mess. It looks like this needs to be extended somehow to
106.22 +> handle namespaces too...
106.23 +
106.24 +This seems to solve the missmatch. Would it be possible to test it on
106.25 +bigger testcase and if it works distile a testcase that don't use
106.26 +file IO so it is more suitable for gcc regtesting?
106.27 +
106.28 +Index: coverage.c
106.29 +===================================================================
106.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
106.31 +retrieving revision 1.6.2.12.2.12
106.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
106.33 +*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
106.34 +--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
106.35 +*************** coverage_checksum_string (unsigned chksu
106.36 +*** 471,505 ****
106.37 + as the checksums are used only for sanity checking. */
106.38 + for (i = 0; string[i]; i++)
106.39 + {
106.40 + if (!strncmp (string + i, "_GLOBAL__", 9))
106.41 +! for (i = i + 9; string[i]; i++)
106.42 +! if (string[i]=='_')
106.43 +! {
106.44 +! int y;
106.45 +! unsigned seed;
106.46 +! int scan;
106.47 +!
106.48 +! for (y = 1; y < 9; y++)
106.49 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
106.50 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
106.51 +! break;
106.52 +! if (y != 9 || string[i + 9] != '_')
106.53 +! continue;
106.54 +! for (y = 10; y < 18; y++)
106.55 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
106.56 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
106.57 +! break;
106.58 +! if (y != 18)
106.59 +! continue;
106.60 +! scan = sscanf (string + i + 10, "%X", &seed);
106.61 +! gcc_assert (scan);
106.62 +! if (seed != crc32_string (0, flag_random_seed))
106.63 +! continue;
106.64 +! string = dup = xstrdup (string);
106.65 +! for (y = 10; y < 18; y++)
106.66 +! dup[i + y] = '0';
106.67 +! break;
106.68 +! }
106.69 + break;
106.70 + }
106.71 +
106.72 +--- 471,511 ----
106.73 + as the checksums are used only for sanity checking. */
106.74 + for (i = 0; string[i]; i++)
106.75 + {
106.76 ++ int offset = 0;
106.77 ++ if (!strncmp (string + i, "_GLOBAL__N_", 11))
106.78 ++ offset = 11;
106.79 + if (!strncmp (string + i, "_GLOBAL__", 9))
106.80 +! offset = 9;
106.81 +!
106.82 +! /* C++ namespaces do have scheme:
106.83 +! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
106.84 +! since filename might contain extra underscores there seems
106.85 +! to be no better chance then walk all possible offsets looking
106.86 +! for magicnuber. */
106.87 +! if (offset)
106.88 +! for (;string[offset]; offset++)
106.89 +! for (i = i + offset; string[i]; i++)
106.90 +! if (string[i]=='_')
106.91 +! {
106.92 +! int y;
106.93 +!
106.94 +! for (y = 1; y < 9; y++)
106.95 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
106.96 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
106.97 +! break;
106.98 +! if (y != 9 || string[i + 9] != '_')
106.99 +! continue;
106.100 +! for (y = 10; y < 18; y++)
106.101 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
106.102 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
106.103 +! break;
106.104 +! if (y != 18)
106.105 +! continue;
106.106 +! if (!dup)
106.107 +! string = dup = xstrdup (string);
106.108 +! for (y = 10; y < 18; y++)
106.109 +! dup[i + y] = '0';
106.110 +! }
106.111 + break;
106.112 + }
106.113 +
106.114 +
106.115 +
106.116 +--
106.117 +
106.118 +
106.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
106.120 +
106.121 +------- You are receiving this mail because: -------
106.122 +You reported the bug, or are watching the reporter.
106.123 +
106.124 +
107.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
107.2 +++ b/patches/gcc/4.0.0/130-pr20973-fix.patch Sun Sep 23 17:08:09 2007 +0000
107.3 @@ -0,0 +1,80 @@
107.4 +http://gcc.gnu.org/PR20973
107.5 +
107.6 +"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically
107.7 +leads to all websites being misrendered. I can't easily reduce the testcase,
107.8 +but have applied the whole preprocessed source of css/cssstyleselector.ii.
107.9 +
107.10 +It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686
107.11 +-fno-exceptions. A more detailed analysis will follow, as we've found out
107.12 +some things already."
107.13 +
107.14 +---
107.15 +
107.16 +Subject: Bug 20973
107.17 +
107.18 +CVSROOT: /cvs/gcc
107.19 +Module name: gcc
107.20 +Branch: gcc-4_0-branch
107.21 +Changes by: matz@gcc.gnu.org 2005-04-22 17:30:21
107.22 +
107.23 +Modified files:
107.24 + gcc : ChangeLog reload.c
107.25 +
107.26 +Log message:
107.27 + PR middle-end/20973
107.28 + * reload.c (push_reload, find_dummy_reload): Check for uninitialized
107.29 + pseudos.
107.30 +
107.31 +Patches:
107.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
107.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
107.34 +
107.35 +---
107.36 +
107.37 +===================================================================
107.38 +RCS file: /cvs/gcc/gcc/gcc/reload.c,v
107.39 +retrieving revision 1.268
107.40 +retrieving revision 1.268.2.1
107.41 +diff -u -r1.268 -r1.268.2.1
107.42 +--- gcc/gcc/reload.c 2005/02/24 22:06:06 1.268
107.43 ++++ gcc/gcc/reload.c 2005/04/22 17:30:15 1.268.2.1
107.44 +@@ -1520,7 +1520,7 @@
107.45 + But if there is no spilling in this block, that is OK.
107.46 + An explicitly used hard reg cannot be a spill reg. */
107.47 +
107.48 +- if (rld[i].reg_rtx == 0 && in != 0)
107.49 ++ if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
107.50 + {
107.51 + rtx note;
107.52 + int regno;
107.53 +@@ -1534,6 +1534,11 @@
107.54 + && REG_P (XEXP (note, 0))
107.55 + && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
107.56 + && reg_mentioned_p (XEXP (note, 0), in)
107.57 ++ /* Check that we don't use a hardreg for an uninitialized
107.58 ++ pseudo. See also find_dummy_reload(). */
107.59 ++ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
107.60 ++ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
107.61 ++ ORIGINAL_REGNO (XEXP (note, 0))))
107.62 + && ! refers_to_regno_for_reload_p (regno,
107.63 + (regno
107.64 + + hard_regno_nregs[regno]
107.65 +@@ -1997,7 +2002,17 @@
107.66 + is a subreg, and in that case, out
107.67 + has a real mode. */
107.68 + (GET_MODE (out) != VOIDmode
107.69 +- ? GET_MODE (out) : outmode)))
107.70 ++ ? GET_MODE (out) : outmode))
107.71 ++ /* But only do all this if we can be sure, that this input
107.72 ++ operand doesn't correspond with an uninitialized pseudoreg.
107.73 ++ global can assign some hardreg to it, which is the same as
107.74 ++ a different pseudo also currently live (as it can ignore the
107.75 ++ conflict). So we never must introduce writes to such hardregs,
107.76 ++ as they would clobber the other live pseudo using the same.
107.77 ++ See also PR20973. */
107.78 ++ && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
107.79 ++ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
107.80 ++ ORIGINAL_REGNO (in))))
107.81 + {
107.82 + unsigned int regno = REGNO (in) + in_offset;
107.83 + unsigned int nwords = hard_regno_nregs[regno][inmode];
108.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
108.2 +++ b/patches/gcc/4.0.0/140-pr21173-fix.patch Sun Sep 23 17:08:09 2007 +0000
108.3 @@ -0,0 +1,66 @@
108.4 +See http://gcc.gnu.org/PR21173
108.5 +This is a fix for a last minute brown-bag bug with gcc-4.0.0
108.6 +
108.7 + ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] -------
108.8 +Subject: Bug 21173
108.9 +
108.10 +CVSROOT: /cvs/gcc
108.11 +Module name: gcc
108.12 +Branch: gcc-4_0-branch
108.13 +Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38
108.14 +
108.15 +Modified files:
108.16 + gcc : ChangeLog tree-ssa-pre.c
108.17 +
108.18 +Log message:
108.19 + 2005-04-25 Daniel Berlin <dberlin@dberlin.org>
108.20 +
108.21 + Fix PR tree-optimization/21173
108.22 +
108.23 + * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
108.24 + on things we pass to force_gimple_operand. Don't try to special
108.25 + case min_invariants.
108.26 +
108.27 +Patches:
108.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
108.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
108.30 +
108.31 +===================================================================
108.32 +RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
108.33 +retrieving revision 2.65.4.2
108.34 +retrieving revision 2.65.4.3
108.35 +diff -u -r2.65.4.2 -r2.65.4.3
108.36 +--- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
108.37 ++++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
108.38 +@@ -1330,7 +1330,8 @@
108.39 +
108.40 + folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
108.41 + genop1, genop2));
108.42 +- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
108.43 ++ newexpr = force_gimple_operand (unshare_expr (folded),
108.44 ++ &forced_stmts, false, NULL);
108.45 + if (forced_stmts)
108.46 + {
108.47 + tsi = tsi_start (forced_stmts);
108.48 +@@ -1372,14 +1373,8 @@
108.49 + add_referenced_tmp_var (temp);
108.50 + folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
108.51 + genop1));
108.52 +- /* If the generated operand is already GIMPLE min_invariant
108.53 +- just use it instead of calling force_gimple_operand on it,
108.54 +- since that may make it not invariant by copying it into an
108.55 +- assignment. */
108.56 +- if (!is_gimple_min_invariant (genop1))
108.57 +- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
108.58 +- else
108.59 +- newexpr = genop1;
108.60 ++ newexpr = force_gimple_operand (unshare_expr (folded),
108.61 ++ &forced_stmts, false, NULL);
108.62 + if (forced_stmts)
108.63 + {
108.64 + tsi = tsi_start (forced_stmts);
108.65 +
108.66 + 0K . 1.24 MB/s
108.67 +
108.68 +13:16:54 (1.24 MB/s) - `-' saved [1303]
108.69 +
109.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
109.2 +++ b/patches/gcc/4.0.0/150-pr21951.patch Sun Sep 23 17:08:09 2007 +0000
109.3 @@ -0,0 +1,153 @@
109.4 +Workaround for buglet in std::vector etc. when compiling
109.5 +with gcc-4.0.0 -Wall -O -fno-exceptions
109.6 +Fixes:
109.7 +
109.8 +.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
109.9 +_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
109.10 +.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
109.11 +non-void function 'typename _Alloc::pointer std::vector<_Tp,
109.12 +_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
109.13 +_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
109.14 +
109.15 +See http://gcc.gnu.org/PR21951
109.16 +
109.17 +--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old 2005-06-11 03:58:20.000000000 -0700
109.18 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h 2005-06-11 04:01:21.000000000 -0700
109.19 +@@ -765,13 +765,13 @@
109.20 + {
109.21 + std::__uninitialized_copy_a(__first, __last, __result,
109.22 + this->get_allocator());
109.23 +- return __result;
109.24 + }
109.25 + catch(...)
109.26 + {
109.27 + _M_deallocate(__result, __n);
109.28 + __throw_exception_again;
109.29 + }
109.30 ++ return __result;
109.31 + }
109.32 +
109.33 +
109.34 +--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old 2005-06-11 03:58:20.000000000 -0700
109.35 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h 2005-06-11 04:05:18.990003248 -0700
109.36 +@@ -84,13 +84,13 @@
109.37 + {
109.38 + for (; __first != __last; ++__first, ++__cur)
109.39 + std::_Construct(&*__cur, *__first);
109.40 +- return __cur;
109.41 + }
109.42 + catch(...)
109.43 + {
109.44 + std::_Destroy(__result, __cur);
109.45 + __throw_exception_again;
109.46 + }
109.47 ++ return __cur;
109.48 + }
109.49 +
109.50 + /**
109.51 +@@ -236,13 +236,13 @@
109.52 + {
109.53 + for (; __first != __last; ++__first, ++__cur)
109.54 + __alloc.construct(&*__cur, *__first);
109.55 +- return __cur;
109.56 + }
109.57 + catch(...)
109.58 + {
109.59 + std::_Destroy(__result, __cur, __alloc);
109.60 + __throw_exception_again;
109.61 + }
109.62 ++ return __cur;
109.63 + }
109.64 +
109.65 + template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
109.66 +@@ -337,11 +337,13 @@
109.67 + {
109.68 + return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
109.69 + }
109.70 ++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
109.71 + catch(...)
109.72 + {
109.73 + std::_Destroy(__result, __mid, __alloc);
109.74 + __throw_exception_again;
109.75 + }
109.76 ++#endif
109.77 + }
109.78 +
109.79 + // __uninitialized_fill_copy
109.80 +@@ -360,11 +362,13 @@
109.81 + {
109.82 + return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
109.83 + }
109.84 ++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
109.85 + catch(...)
109.86 + {
109.87 + std::_Destroy(__result, __mid, __alloc);
109.88 + __throw_exception_again;
109.89 + }
109.90 ++#endif
109.91 + }
109.92 +
109.93 + // __uninitialized_copy_fill
109.94 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old 2005-06-11 03:58:20.000000000 -0700
109.95 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope 2005-06-11 04:13:26.628870872 -0700
109.96 +@@ -1645,11 +1645,13 @@
109.97 + _S_cond_store_eos(__buf[__size]);
109.98 + try
109.99 + { return _S_new_RopeLeaf(__buf, __size, __a); }
109.100 ++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
109.101 + catch(...)
109.102 + {
109.103 + _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
109.104 + __throw_exception_again;
109.105 + }
109.106 ++#endif
109.107 + }
109.108 +
109.109 + // Concatenation of nonempty strings.
109.110 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old 2005-06-11 03:58:20.000000000 -0700
109.111 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory 2005-06-11 04:13:52.897877376 -0700
109.112 +@@ -85,11 +85,13 @@
109.113 + std::_Construct(&*__cur, *__first);
109.114 + return pair<_InputIter, _ForwardIter>(__first, __cur);
109.115 + }
109.116 ++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
109.117 + catch(...)
109.118 + {
109.119 + std::_Destroy(__result, __cur);
109.120 + __throw_exception_again;
109.121 + }
109.122 ++#endif
109.123 + }
109.124 +
109.125 + template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
109.126 +@@ -144,11 +146,13 @@
109.127 + __alloc.construct(&*__cur, *__first);
109.128 + return pair<_InputIter, _ForwardIter>(__first, __cur);
109.129 + }
109.130 ++#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
109.131 + catch(...)
109.132 + {
109.133 + std::_Destroy(__result, __cur, __alloc);
109.134 + __throw_exception_again;
109.135 + }
109.136 ++#endif
109.137 + }
109.138 +
109.139 + template<typename _InputIter, typename _Size, typename _ForwardIter,
109.140 +--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old 2005-06-11 03:58:20.000000000 -0700
109.141 ++++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h 2005-06-11 04:14:28.384482592 -0700
109.142 +@@ -607,13 +607,13 @@
109.143 + try
109.144 + {
109.145 + this->get_allocator().construct(&__n->_M_val, __obj);
109.146 +- return __n;
109.147 + }
109.148 + catch(...)
109.149 + {
109.150 + _M_put_node(__n);
109.151 + __throw_exception_again;
109.152 + }
109.153 ++ return __n;
109.154 + }
109.155 +
109.156 + void
110.1 --- a/patches/gcc/4.0.0/fix-fixincl.patch Sat Sep 22 17:25:42 2007 +0000
110.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
110.3 @@ -1,72 +0,0 @@
110.4 -See http://gcc.gnu.org/PR22541
110.5 -
110.6 -From: Dan Kegel
110.7 -
110.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
110.9 -the configure script happily copies the glibc include files from include to sys-include;
110.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
110.11 -
110.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
110.13 -
110.14 -But later, when running fixincludes, it gives the error message
110.15 - The directory that should contain system headers does not exist:
110.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
110.17 -
110.18 -Nevertheless, it continues building; the header files it installs in
110.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
110.20 -do not include the boilerplate that would cause it to #include_next the
110.21 -glibc headers in the system header directory.
110.22 -Thus the resulting toolchain can't compile the following program:
110.23 -#include <limits.h>
110.24 -int x = PATH_MAX;
110.25 -because its limits.h doesn't include the glibc header.
110.26 -
110.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
110.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
110.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
110.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
110.31 -it is only created later, during 'make install'. (Which makes this problem
110.32 -confusing, since one only notices the breakage well after 'make install',
110.33 -at which point the path configure complained about does exist, and has the
110.34 -right stuff in it.)
110.35 -
110.36 -A possible fix is to replace the line in gcc/Makefile.in that says
110.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
110.38 -with a version that gets rid of extra ..'s, e.g.
110.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
110.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
110.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
110.42 -
110.43 -[rediffed against gcc-4.0.0]
110.44 -
110.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
110.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
110.47 -@@ -378,7 +378,10 @@
110.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
110.49 -
110.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
110.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
110.52 -+# Purge it of unneccessary internal relative paths
110.53 -+# to directories that might not exist yet.
110.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
110.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
110.56 -
110.57 - # Control whether to run fixproto and fixincludes.
110.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
110.59 -@@ -2838,13 +2841,15 @@
110.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
110.61 -
110.62 - # Build fixed copies of system files.
110.63 -+# Abort if no system headers available, unless building a crosscompiler.
110.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
110.65 - stmp-fixinc: gsyslimits.h macro_list \
110.66 - ../$(build_subdir)/fixincludes/fixincl \
110.67 - ../$(build_subdir)/fixincludes/fixinc.sh
110.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
110.69 - echo The directory that should contain system headers does not exist: >&2 ; \
110.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
110.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
110.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
110.73 - then sleep 1; else exit 1; fi; \
110.74 - fi
110.75 - rm -rf include; mkdir include
111.1 --- a/patches/gcc/4.0.0/gcc-4.0-arm-bigendian.patch Sat Sep 22 17:25:42 2007 +0000
111.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
111.3 @@ -1,79 +0,0 @@
111.4 -By Lennert Buytenhek <buytenh@wantstofly.org>
111.5 -Adds support for arm*b-linux* big-endian ARM targets
111.6 -
111.7 -Fixes following build error for big-endian ARM targets:
111.8 -
111.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
111.10 -Supported emulations: armelfb_linux armelfb
111.11 -collect2: ld returned 1 exit status
111.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
111.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'
111.14 -make[1]: *** [csu/subdir_lib] Error 2
111.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'
111.16 -make: *** [lib] Error 2
111.17 -
111.18 -
111.19 -See http://gcc.gnu.org/PR16350
111.20 -
111.21 ---- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
111.22 -+++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
111.23 -@@ -31,19 +31,33 @@
111.24 - /* Do not assume anything about header files. */
111.25 - #define NO_IMPLICIT_EXTERN_C
111.26 -
111.27 -+/*
111.28 -+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
111.29 -+ * arm*b-*-linux* (big endian) configurations.
111.30 -+ */
111.31 -+#if TARGET_BIG_ENDIAN_DEFAULT
111.32 -+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
111.33 -+#define TARGET_ENDIAN_OPTION "mbig-endian"
111.34 -+#define TARGET_LINKER_EMULATION "armelfb_linux"
111.35 -+#else
111.36 -+#define TARGET_ENDIAN_DEFAULT 0
111.37 -+#define TARGET_ENDIAN_OPTION "mlittle-endian"
111.38 -+#define TARGET_LINKER_EMULATION "armelf_linux"
111.39 -+#endif
111.40 -+
111.41 - #undef TARGET_DEFAULT_FLOAT_ABI
111.42 - #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
111.43 -
111.44 - #undef TARGET_DEFAULT
111.45 --#define TARGET_DEFAULT (0)
111.46 -+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
111.47 -
111.48 - #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
111.49 -
111.50 --#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
111.51 -+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
111.52 -
111.53 - #undef MULTILIB_DEFAULTS
111.54 - #define MULTILIB_DEFAULTS \
111.55 -- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
111.56 -+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
111.57 -
111.58 - /* The GNU C++ standard library requires that these macros be defined. */
111.59 - #undef CPLUSPLUS_CPP_SPEC
111.60 -@@ -90,7 +104,7 @@
111.61 - %{rdynamic:-export-dynamic} \
111.62 - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
111.63 - -X \
111.64 -- %{mbig-endian:-EB}" \
111.65 -+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
111.66 - SUBTARGET_EXTRA_LINK_SPEC
111.67 -
111.68 - #define TARGET_OS_CPP_BUILTINS() \
111.69 ---- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
111.70 -+++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
111.71 -@@ -650,6 +650,11 @@
111.72 - ;;
111.73 - arm*-*-linux*) # ARM GNU/Linux with ELF
111.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"
111.75 -+ case $target in
111.76 -+ arm*b-*-linux*)
111.77 -+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
111.78 -+ ;;
111.79 -+ esac
111.80 - tmake_file="${tmake_file} arm/t-arm arm/t-linux"
111.81 - extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
111.82 - gnu_ld=yes
112.1 --- a/patches/gcc/4.0.0/pr20815-fix.patch Sat Sep 22 17:25:42 2007 +0000
112.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
112.3 @@ -1,121 +0,0 @@
112.4 -Date: 18 May 2005 22:47:59 -0000
112.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
112.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
112.7 -To: dank@kegel.com
112.8 -References: <20050407215701.20815.dank@kegel.com>
112.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
112.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
112.11 -
112.12 -
112.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
112.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
112.15 -
112.16 ->
112.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
112.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
112.19 ->
112.20 -> coverage_checksum_string already knows a bit about ignoring random seed
112.21 -> produced mess. It looks like this needs to be extended somehow to
112.22 -> handle namespaces too...
112.23 -
112.24 -This seems to solve the missmatch. Would it be possible to test it on
112.25 -bigger testcase and if it works distile a testcase that don't use
112.26 -file IO so it is more suitable for gcc regtesting?
112.27 -
112.28 -Index: coverage.c
112.29 -===================================================================
112.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
112.31 -retrieving revision 1.6.2.12.2.12
112.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
112.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
112.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
112.35 -*************** coverage_checksum_string (unsigned chksu
112.36 -*** 471,505 ****
112.37 - as the checksums are used only for sanity checking. */
112.38 - for (i = 0; string[i]; i++)
112.39 - {
112.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
112.41 -! for (i = i + 9; string[i]; i++)
112.42 -! if (string[i]=='_')
112.43 -! {
112.44 -! int y;
112.45 -! unsigned seed;
112.46 -! int scan;
112.47 -!
112.48 -! for (y = 1; y < 9; y++)
112.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
112.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
112.51 -! break;
112.52 -! if (y != 9 || string[i + 9] != '_')
112.53 -! continue;
112.54 -! for (y = 10; y < 18; y++)
112.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
112.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
112.57 -! break;
112.58 -! if (y != 18)
112.59 -! continue;
112.60 -! scan = sscanf (string + i + 10, "%X", &seed);
112.61 -! gcc_assert (scan);
112.62 -! if (seed != crc32_string (0, flag_random_seed))
112.63 -! continue;
112.64 -! string = dup = xstrdup (string);
112.65 -! for (y = 10; y < 18; y++)
112.66 -! dup[i + y] = '0';
112.67 -! break;
112.68 -! }
112.69 - break;
112.70 - }
112.71 -
112.72 ---- 471,511 ----
112.73 - as the checksums are used only for sanity checking. */
112.74 - for (i = 0; string[i]; i++)
112.75 - {
112.76 -+ int offset = 0;
112.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
112.78 -+ offset = 11;
112.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
112.80 -! offset = 9;
112.81 -!
112.82 -! /* C++ namespaces do have scheme:
112.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
112.84 -! since filename might contain extra underscores there seems
112.85 -! to be no better chance then walk all possible offsets looking
112.86 -! for magicnuber. */
112.87 -! if (offset)
112.88 -! for (;string[offset]; offset++)
112.89 -! for (i = i + offset; string[i]; i++)
112.90 -! if (string[i]=='_')
112.91 -! {
112.92 -! int y;
112.93 -!
112.94 -! for (y = 1; y < 9; y++)
112.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
112.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
112.97 -! break;
112.98 -! if (y != 9 || string[i + 9] != '_')
112.99 -! continue;
112.100 -! for (y = 10; y < 18; y++)
112.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
112.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
112.103 -! break;
112.104 -! if (y != 18)
112.105 -! continue;
112.106 -! if (!dup)
112.107 -! string = dup = xstrdup (string);
112.108 -! for (y = 10; y < 18; y++)
112.109 -! dup[i + y] = '0';
112.110 -! }
112.111 - break;
112.112 - }
112.113 -
112.114 -
112.115 -
112.116 ---
112.117 -
112.118 -
112.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
112.120 -
112.121 -------- You are receiving this mail because: -------
112.122 -You reported the bug, or are watching the reporter.
112.123 -
112.124 -
113.1 --- a/patches/gcc/4.0.0/pr20973-fix.patch Sat Sep 22 17:25:42 2007 +0000
113.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
113.3 @@ -1,80 +0,0 @@
113.4 -http://gcc.gnu.org/PR20973
113.5 -
113.6 -"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically
113.7 -leads to all websites being misrendered. I can't easily reduce the testcase,
113.8 -but have applied the whole preprocessed source of css/cssstyleselector.ii.
113.9 -
113.10 -It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686
113.11 --fno-exceptions. A more detailed analysis will follow, as we've found out
113.12 -some things already."
113.13 -
113.14 ----
113.15 -
113.16 -Subject: Bug 20973
113.17 -
113.18 -CVSROOT: /cvs/gcc
113.19 -Module name: gcc
113.20 -Branch: gcc-4_0-branch
113.21 -Changes by: matz@gcc.gnu.org 2005-04-22 17:30:21
113.22 -
113.23 -Modified files:
113.24 - gcc : ChangeLog reload.c
113.25 -
113.26 -Log message:
113.27 - PR middle-end/20973
113.28 - * reload.c (push_reload, find_dummy_reload): Check for uninitialized
113.29 - pseudos.
113.30 -
113.31 -Patches:
113.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
113.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
113.34 -
113.35 ----
113.36 -
113.37 -===================================================================
113.38 -RCS file: /cvs/gcc/gcc/gcc/reload.c,v
113.39 -retrieving revision 1.268
113.40 -retrieving revision 1.268.2.1
113.41 -diff -u -r1.268 -r1.268.2.1
113.42 ---- gcc/gcc/reload.c 2005/02/24 22:06:06 1.268
113.43 -+++ gcc/gcc/reload.c 2005/04/22 17:30:15 1.268.2.1
113.44 -@@ -1520,7 +1520,7 @@
113.45 - But if there is no spilling in this block, that is OK.
113.46 - An explicitly used hard reg cannot be a spill reg. */
113.47 -
113.48 -- if (rld[i].reg_rtx == 0 && in != 0)
113.49 -+ if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
113.50 - {
113.51 - rtx note;
113.52 - int regno;
113.53 -@@ -1534,6 +1534,11 @@
113.54 - && REG_P (XEXP (note, 0))
113.55 - && (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
113.56 - && reg_mentioned_p (XEXP (note, 0), in)
113.57 -+ /* Check that we don't use a hardreg for an uninitialized
113.58 -+ pseudo. See also find_dummy_reload(). */
113.59 -+ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
113.60 -+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
113.61 -+ ORIGINAL_REGNO (XEXP (note, 0))))
113.62 - && ! refers_to_regno_for_reload_p (regno,
113.63 - (regno
113.64 - + hard_regno_nregs[regno]
113.65 -@@ -1997,7 +2002,17 @@
113.66 - is a subreg, and in that case, out
113.67 - has a real mode. */
113.68 - (GET_MODE (out) != VOIDmode
113.69 -- ? GET_MODE (out) : outmode)))
113.70 -+ ? GET_MODE (out) : outmode))
113.71 -+ /* But only do all this if we can be sure, that this input
113.72 -+ operand doesn't correspond with an uninitialized pseudoreg.
113.73 -+ global can assign some hardreg to it, which is the same as
113.74 -+ a different pseudo also currently live (as it can ignore the
113.75 -+ conflict). So we never must introduce writes to such hardregs,
113.76 -+ as they would clobber the other live pseudo using the same.
113.77 -+ See also PR20973. */
113.78 -+ && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
113.79 -+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
113.80 -+ ORIGINAL_REGNO (in))))
113.81 - {
113.82 - unsigned int regno = REGNO (in) + in_offset;
113.83 - unsigned int nwords = hard_regno_nregs[regno][inmode];
114.1 --- a/patches/gcc/4.0.0/pr21173-fix.patch Sat Sep 22 17:25:42 2007 +0000
114.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
114.3 @@ -1,66 +0,0 @@
114.4 -See http://gcc.gnu.org/PR21173
114.5 -This is a fix for a last minute brown-bag bug with gcc-4.0.0
114.6 -
114.7 - ------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] -------
114.8 -Subject: Bug 21173
114.9 -
114.10 -CVSROOT: /cvs/gcc
114.11 -Module name: gcc
114.12 -Branch: gcc-4_0-branch
114.13 -Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38
114.14 -
114.15 -Modified files:
114.16 - gcc : ChangeLog tree-ssa-pre.c
114.17 -
114.18 -Log message:
114.19 - 2005-04-25 Daniel Berlin <dberlin@dberlin.org>
114.20 -
114.21 - Fix PR tree-optimization/21173
114.22 -
114.23 - * tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
114.24 - on things we pass to force_gimple_operand. Don't try to special
114.25 - case min_invariants.
114.26 -
114.27 -Patches:
114.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
114.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
114.30 -
114.31 -===================================================================
114.32 -RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
114.33 -retrieving revision 2.65.4.2
114.34 -retrieving revision 2.65.4.3
114.35 -diff -u -r2.65.4.2 -r2.65.4.3
114.36 ---- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
114.37 -+++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
114.38 -@@ -1330,7 +1330,8 @@
114.39 -
114.40 - folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
114.41 - genop1, genop2));
114.42 -- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
114.43 -+ newexpr = force_gimple_operand (unshare_expr (folded),
114.44 -+ &forced_stmts, false, NULL);
114.45 - if (forced_stmts)
114.46 - {
114.47 - tsi = tsi_start (forced_stmts);
114.48 -@@ -1372,14 +1373,8 @@
114.49 - add_referenced_tmp_var (temp);
114.50 - folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
114.51 - genop1));
114.52 -- /* If the generated operand is already GIMPLE min_invariant
114.53 -- just use it instead of calling force_gimple_operand on it,
114.54 -- since that may make it not invariant by copying it into an
114.55 -- assignment. */
114.56 -- if (!is_gimple_min_invariant (genop1))
114.57 -- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
114.58 -- else
114.59 -- newexpr = genop1;
114.60 -+ newexpr = force_gimple_operand (unshare_expr (folded),
114.61 -+ &forced_stmts, false, NULL);
114.62 - if (forced_stmts)
114.63 - {
114.64 - tsi = tsi_start (forced_stmts);
114.65 -
114.66 - 0K . 1.24 MB/s
114.67 -
114.68 -13:16:54 (1.24 MB/s) - `-' saved [1303]
114.69 -
115.1 --- a/patches/gcc/4.0.0/pr21951.patch Sat Sep 22 17:25:42 2007 +0000
115.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
115.3 @@ -1,153 +0,0 @@
115.4 -Workaround for buglet in std::vector etc. when compiling
115.5 -with gcc-4.0.0 -Wall -O -fno-exceptions
115.6 -Fixes:
115.7 -
115.8 -.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
115.9 -_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
115.10 -.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
115.11 -non-void function 'typename _Alloc::pointer std::vector<_Tp,
115.12 -_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
115.13 -_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
115.14 -
115.15 -See http://gcc.gnu.org/PR21951
115.16 -
115.17 ---- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old 2005-06-11 03:58:20.000000000 -0700
115.18 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h 2005-06-11 04:01:21.000000000 -0700
115.19 -@@ -765,13 +765,13 @@
115.20 - {
115.21 - std::__uninitialized_copy_a(__first, __last, __result,
115.22 - this->get_allocator());
115.23 -- return __result;
115.24 - }
115.25 - catch(...)
115.26 - {
115.27 - _M_deallocate(__result, __n);
115.28 - __throw_exception_again;
115.29 - }
115.30 -+ return __result;
115.31 - }
115.32 -
115.33 -
115.34 ---- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old 2005-06-11 03:58:20.000000000 -0700
115.35 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h 2005-06-11 04:05:18.990003248 -0700
115.36 -@@ -84,13 +84,13 @@
115.37 - {
115.38 - for (; __first != __last; ++__first, ++__cur)
115.39 - std::_Construct(&*__cur, *__first);
115.40 -- return __cur;
115.41 - }
115.42 - catch(...)
115.43 - {
115.44 - std::_Destroy(__result, __cur);
115.45 - __throw_exception_again;
115.46 - }
115.47 -+ return __cur;
115.48 - }
115.49 -
115.50 - /**
115.51 -@@ -236,13 +236,13 @@
115.52 - {
115.53 - for (; __first != __last; ++__first, ++__cur)
115.54 - __alloc.construct(&*__cur, *__first);
115.55 -- return __cur;
115.56 - }
115.57 - catch(...)
115.58 - {
115.59 - std::_Destroy(__result, __cur, __alloc);
115.60 - __throw_exception_again;
115.61 - }
115.62 -+ return __cur;
115.63 - }
115.64 -
115.65 - template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
115.66 -@@ -337,11 +337,13 @@
115.67 - {
115.68 - return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
115.69 - }
115.70 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
115.71 - catch(...)
115.72 - {
115.73 - std::_Destroy(__result, __mid, __alloc);
115.74 - __throw_exception_again;
115.75 - }
115.76 -+#endif
115.77 - }
115.78 -
115.79 - // __uninitialized_fill_copy
115.80 -@@ -360,11 +362,13 @@
115.81 - {
115.82 - return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
115.83 - }
115.84 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
115.85 - catch(...)
115.86 - {
115.87 - std::_Destroy(__result, __mid, __alloc);
115.88 - __throw_exception_again;
115.89 - }
115.90 -+#endif
115.91 - }
115.92 -
115.93 - // __uninitialized_copy_fill
115.94 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old 2005-06-11 03:58:20.000000000 -0700
115.95 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope 2005-06-11 04:13:26.628870872 -0700
115.96 -@@ -1645,11 +1645,13 @@
115.97 - _S_cond_store_eos(__buf[__size]);
115.98 - try
115.99 - { return _S_new_RopeLeaf(__buf, __size, __a); }
115.100 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
115.101 - catch(...)
115.102 - {
115.103 - _RopeRep::__STL_FREE_STRING(__buf, __size, __a);
115.104 - __throw_exception_again;
115.105 - }
115.106 -+#endif
115.107 - }
115.108 -
115.109 - // Concatenation of nonempty strings.
115.110 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old 2005-06-11 03:58:20.000000000 -0700
115.111 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory 2005-06-11 04:13:52.897877376 -0700
115.112 -@@ -85,11 +85,13 @@
115.113 - std::_Construct(&*__cur, *__first);
115.114 - return pair<_InputIter, _ForwardIter>(__first, __cur);
115.115 - }
115.116 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
115.117 - catch(...)
115.118 - {
115.119 - std::_Destroy(__result, __cur);
115.120 - __throw_exception_again;
115.121 - }
115.122 -+#endif
115.123 - }
115.124 -
115.125 - template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
115.126 -@@ -144,11 +146,13 @@
115.127 - __alloc.construct(&*__cur, *__first);
115.128 - return pair<_InputIter, _ForwardIter>(__first, __cur);
115.129 - }
115.130 -+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
115.131 - catch(...)
115.132 - {
115.133 - std::_Destroy(__result, __cur, __alloc);
115.134 - __throw_exception_again;
115.135 - }
115.136 -+#endif
115.137 - }
115.138 -
115.139 - template<typename _InputIter, typename _Size, typename _ForwardIter,
115.140 ---- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old 2005-06-11 03:58:20.000000000 -0700
115.141 -+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h 2005-06-11 04:14:28.384482592 -0700
115.142 -@@ -607,13 +607,13 @@
115.143 - try
115.144 - {
115.145 - this->get_allocator().construct(&__n->_M_val, __obj);
115.146 -- return __n;
115.147 - }
115.148 - catch(...)
115.149 - {
115.150 - _M_put_node(__n);
115.151 - __throw_exception_again;
115.152 - }
115.153 -+ return __n;
115.154 - }
115.155 -
115.156 - void
116.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
116.2 +++ b/patches/gcc/4.0.1/100-fix-fixincl.patch Sun Sep 23 17:08:09 2007 +0000
116.3 @@ -0,0 +1,72 @@
116.4 +See http://gcc.gnu.org/PR22541
116.5 +
116.6 +From: Dan Kegel
116.7 +
116.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
116.9 +the configure script happily copies the glibc include files from include to sys-include;
116.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
116.11 +
116.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
116.13 +
116.14 +But later, when running fixincludes, it gives the error message
116.15 + The directory that should contain system headers does not exist:
116.16 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
116.17 +
116.18 +Nevertheless, it continues building; the header files it installs in
116.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
116.20 +do not include the boilerplate that would cause it to #include_next the
116.21 +glibc headers in the system header directory.
116.22 +Thus the resulting toolchain can't compile the following program:
116.23 +#include <limits.h>
116.24 +int x = PATH_MAX;
116.25 +because its limits.h doesn't include the glibc header.
116.26 +
116.27 +That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
116.28 +it can refer to $PREFIX/i686-unknown-linux-gnu with the path
116.29 + $PREFIX/lib/../i686-unknown-linux-gnu, but
116.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
116.31 +it is only created later, during 'make install'. (Which makes this problem
116.32 +confusing, since one only notices the breakage well after 'make install',
116.33 +at which point the path configure complained about does exist, and has the
116.34 +right stuff in it.)
116.35 +
116.36 +A possible fix is to replace the line in gcc/Makefile.in that says
116.37 + SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
116.38 +with a version that gets rid of extra ..'s, e.g.
116.39 + SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
116.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
116.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
116.42 +
116.43 +[rediffed against gcc-4.0.0]
116.44 +
116.45 +--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
116.46 ++++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
116.47 +@@ -378,7 +378,10 @@
116.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
116.49 +
116.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
116.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
116.52 ++# Purge it of unneccessary internal relative paths
116.53 ++# to directories that might not exist yet.
116.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
116.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
116.56 +
116.57 + # Control whether to run fixproto and fixincludes.
116.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
116.59 +@@ -2838,13 +2841,15 @@
116.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
116.61 +
116.62 + # Build fixed copies of system files.
116.63 ++# Abort if no system headers available, unless building a crosscompiler.
116.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
116.65 + stmp-fixinc: gsyslimits.h macro_list \
116.66 + ../$(build_subdir)/fixincludes/fixincl \
116.67 + ../$(build_subdir)/fixincludes/fixinc.sh
116.68 + @if test ! -d ${SYSTEM_HEADER_DIR}; then \
116.69 + echo The directory that should contain system headers does not exist: >&2 ; \
116.70 + echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
116.71 +- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
116.72 ++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
116.73 + then sleep 1; else exit 1; fi; \
116.74 + fi
116.75 + rm -rf include; mkdir include
117.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
117.2 +++ b/patches/gcc/4.0.1/110-pr20815-fix.patch Sun Sep 23 17:08:09 2007 +0000
117.3 @@ -0,0 +1,121 @@
117.4 +Date: 18 May 2005 22:47:59 -0000
117.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
117.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
117.7 +To: dank@kegel.com
117.8 +References: <20050407215701.20815.dank@kegel.com>
117.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
117.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
117.11 +
117.12 +
117.13 +------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
117.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
117.15 +
117.16 +>
117.17 +> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
117.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
117.19 +>
117.20 +> coverage_checksum_string already knows a bit about ignoring random seed
117.21 +> produced mess. It looks like this needs to be extended somehow to
117.22 +> handle namespaces too...
117.23 +
117.24 +This seems to solve the missmatch. Would it be possible to test it on
117.25 +bigger testcase and if it works distile a testcase that don't use
117.26 +file IO so it is more suitable for gcc regtesting?
117.27 +
117.28 +Index: coverage.c
117.29 +===================================================================
117.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
117.31 +retrieving revision 1.6.2.12.2.12
117.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
117.33 +*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
117.34 +--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
117.35 +*************** coverage_checksum_string (unsigned chksu
117.36 +*** 471,505 ****
117.37 + as the checksums are used only for sanity checking. */
117.38 + for (i = 0; string[i]; i++)
117.39 + {
117.40 + if (!strncmp (string + i, "_GLOBAL__", 9))
117.41 +! for (i = i + 9; string[i]; i++)
117.42 +! if (string[i]=='_')
117.43 +! {
117.44 +! int y;
117.45 +! unsigned seed;
117.46 +! int scan;
117.47 +!
117.48 +! for (y = 1; y < 9; y++)
117.49 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
117.50 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
117.51 +! break;
117.52 +! if (y != 9 || string[i + 9] != '_')
117.53 +! continue;
117.54 +! for (y = 10; y < 18; y++)
117.55 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
117.56 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
117.57 +! break;
117.58 +! if (y != 18)
117.59 +! continue;
117.60 +! scan = sscanf (string + i + 10, "%X", &seed);
117.61 +! gcc_assert (scan);
117.62 +! if (seed != crc32_string (0, flag_random_seed))
117.63 +! continue;
117.64 +! string = dup = xstrdup (string);
117.65 +! for (y = 10; y < 18; y++)
117.66 +! dup[i + y] = '0';
117.67 +! break;
117.68 +! }
117.69 + break;
117.70 + }
117.71 +
117.72 +--- 471,511 ----
117.73 + as the checksums are used only for sanity checking. */
117.74 + for (i = 0; string[i]; i++)
117.75 + {
117.76 ++ int offset = 0;
117.77 ++ if (!strncmp (string + i, "_GLOBAL__N_", 11))
117.78 ++ offset = 11;
117.79 + if (!strncmp (string + i, "_GLOBAL__", 9))
117.80 +! offset = 9;
117.81 +!
117.82 +! /* C++ namespaces do have scheme:
117.83 +! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
117.84 +! since filename might contain extra underscores there seems
117.85 +! to be no better chance then walk all possible offsets looking
117.86 +! for magicnuber. */
117.87 +! if (offset)
117.88 +! for (;string[offset]; offset++)
117.89 +! for (i = i + offset; string[i]; i++)
117.90 +! if (string[i]=='_')
117.91 +! {
117.92 +! int y;
117.93 +!
117.94 +! for (y = 1; y < 9; y++)
117.95 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
117.96 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
117.97 +! break;
117.98 +! if (y != 9 || string[i + 9] != '_')
117.99 +! continue;
117.100 +! for (y = 10; y < 18; y++)
117.101 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
117.102 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
117.103 +! break;
117.104 +! if (y != 18)
117.105 +! continue;
117.106 +! if (!dup)
117.107 +! string = dup = xstrdup (string);
117.108 +! for (y = 10; y < 18; y++)
117.109 +! dup[i + y] = '0';
117.110 +! }
117.111 + break;
117.112 + }
117.113 +
117.114 +
117.115 +
117.116 +--
117.117 +
117.118 +
117.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
117.120 +
117.121 +------- You are receiving this mail because: -------
117.122 +You reported the bug, or are watching the reporter.
117.123 +
117.124 +
118.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
118.2 +++ b/patches/gcc/4.0.1/120-pr21951-fix2.patch Sun Sep 23 17:08:09 2007 +0000
118.3 @@ -0,0 +1,71 @@
118.4 +Workaround for buglet in std::vector etc. when compiling
118.5 +with gcc-4.0.1 -Wall -O -fno-exceptions
118.6 +Fixes:
118.7 +
118.8 +.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
118.9 +_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
118.10 +.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
118.11 +non-void function 'typename _Alloc::pointer std::vector<_Tp,
118.12 +_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
118.13 +_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
118.14 +
118.15 +See http://gcc.gnu.org/PR21951
118.16 +
118.17 +To: gcc-patches at gcc dot gnu dot org
118.18 +Subject: [4.0.x] may reach end warning in system headers
118.19 +Message-Id: <20050701183024.E138714C16A9@geoffk5.apple.com>
118.20 +Date: Fri, 1 Jul 2005 11:30:24 -0700 (PDT)
118.21 +From: gkeating at apple dot com (Geoffrey Keating)
118.22 +
118.23 +
118.24 +One of our users was getting
118.25 +
118.26 +/usr/include/gcc/darwin/4.0/c++/bits/stl_uninitialized.h:113: warning:
118.27 +control may reach end of non-void function '_ForwardIterator
118.28 +std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
118.29 +_ForwardIterator, __false_type) [with _InputIterator =
118.30 +__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
118.31 +std::vector<TPoolAllocator::tAllocState,
118.32 +std::allocator<TPoolAllocator::tAllocState> > >, _ForwardIterator =
118.33 +__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
118.34 +std::vector<TPoolAllocator::tAllocState,
118.35 +std::allocator<TPoolAllocator::tAllocState> > >]' being inlined
118.36 +
118.37 +which shouldn't be happening, he has no way to change a standard C++
118.38 +header. The warning is bogus anyway, but it's fixed in 4.1 through
118.39 +the CFG changes, which I don't really want to backport to the 4.0
118.40 +branch, so instead I'll add this patch. Other warnings generated from
118.41 +tree-inline.c check for DECL_SYSTEM_HEADER like this.
118.42 +
118.43 +Bootstrapped & tested on powerpc-darwin8, I'll commit when the branch
118.44 +is unfrozen.
118.45 +
118.46 +--
118.47 +- Geoffrey Keating <geoffk@apple.com>
118.48 +
118.49 +===File ~/patches/gcc-40-4121982.patch======================
118.50 +Index: ChangeLog
118.51 +2005-06-28 Geoffrey Keating <geoffk@apple.com>
118.52 +
118.53 + * tree-inline.c (expand_call_inline): Prevent 'may reach end'
118.54 + warning in system headers.
118.55 +
118.56 +Index: tree-inline.c
118.57 +===================================================================
118.58 +RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
118.59 +retrieving revision 1.170.8.4
118.60 +diff -u -p -u -p -r1.170.8.4 tree-inline.c
118.61 +--- gcc-4.0.1/gcc/tree-inline.c.old 6 Jun 2005 19:20:32 -0000 1.170.8.4
118.62 ++++ gcc-4.0.1/gcc/tree-inline.c 1 Jul 2005 18:27:26 -0000
118.63 +@@ -1693,7 +1693,8 @@ expand_call_inline (tree *tp, int *walk_
118.64 + && !TREE_NO_WARNING (fn)
118.65 + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
118.66 + && return_slot_addr == NULL_TREE
118.67 +- && block_may_fallthru (copy))
118.68 ++ && block_may_fallthru (copy)
118.69 ++ && !DECL_IN_SYSTEM_HEADER (fn))
118.70 + {
118.71 + warning ("control may reach end of non-void function %qD being inlined",
118.72 + fn);
118.73 +============================================================
118.74 +
119.1 --- a/patches/gcc/4.0.1/fix-fixincl.patch Sat Sep 22 17:25:42 2007 +0000
119.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
119.3 @@ -1,72 +0,0 @@
119.4 -See http://gcc.gnu.org/PR22541
119.5 -
119.6 -From: Dan Kegel
119.7 -
119.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
119.9 -the configure script happily copies the glibc include files from include to sys-include;
119.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
119.11 -
119.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
119.13 -
119.14 -But later, when running fixincludes, it gives the error message
119.15 - The directory that should contain system headers does not exist:
119.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
119.17 -
119.18 -Nevertheless, it continues building; the header files it installs in
119.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
119.20 -do not include the boilerplate that would cause it to #include_next the
119.21 -glibc headers in the system header directory.
119.22 -Thus the resulting toolchain can't compile the following program:
119.23 -#include <limits.h>
119.24 -int x = PATH_MAX;
119.25 -because its limits.h doesn't include the glibc header.
119.26 -
119.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
119.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
119.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
119.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
119.31 -it is only created later, during 'make install'. (Which makes this problem
119.32 -confusing, since one only notices the breakage well after 'make install',
119.33 -at which point the path configure complained about does exist, and has the
119.34 -right stuff in it.)
119.35 -
119.36 -A possible fix is to replace the line in gcc/Makefile.in that says
119.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
119.38 -with a version that gets rid of extra ..'s, e.g.
119.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
119.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
119.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
119.42 -
119.43 -[rediffed against gcc-4.0.0]
119.44 -
119.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
119.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
119.47 -@@ -378,7 +378,10 @@
119.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
119.49 -
119.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
119.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
119.52 -+# Purge it of unneccessary internal relative paths
119.53 -+# to directories that might not exist yet.
119.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
119.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
119.56 -
119.57 - # Control whether to run fixproto and fixincludes.
119.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
119.59 -@@ -2838,13 +2841,15 @@
119.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
119.61 -
119.62 - # Build fixed copies of system files.
119.63 -+# Abort if no system headers available, unless building a crosscompiler.
119.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
119.65 - stmp-fixinc: gsyslimits.h macro_list \
119.66 - ../$(build_subdir)/fixincludes/fixincl \
119.67 - ../$(build_subdir)/fixincludes/fixinc.sh
119.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
119.69 - echo The directory that should contain system headers does not exist: >&2 ; \
119.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
119.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
119.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
119.73 - then sleep 1; else exit 1; fi; \
119.74 - fi
119.75 - rm -rf include; mkdir include
120.1 --- a/patches/gcc/4.0.1/pr20815-fix.patch Sat Sep 22 17:25:42 2007 +0000
120.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
120.3 @@ -1,121 +0,0 @@
120.4 -Date: 18 May 2005 22:47:59 -0000
120.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
120.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
120.7 -To: dank@kegel.com
120.8 -References: <20050407215701.20815.dank@kegel.com>
120.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
120.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
120.11 -
120.12 -
120.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
120.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
120.15 -
120.16 ->
120.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
120.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
120.19 ->
120.20 -> coverage_checksum_string already knows a bit about ignoring random seed
120.21 -> produced mess. It looks like this needs to be extended somehow to
120.22 -> handle namespaces too...
120.23 -
120.24 -This seems to solve the missmatch. Would it be possible to test it on
120.25 -bigger testcase and if it works distile a testcase that don't use
120.26 -file IO so it is more suitable for gcc regtesting?
120.27 -
120.28 -Index: coverage.c
120.29 -===================================================================
120.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
120.31 -retrieving revision 1.6.2.12.2.12
120.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
120.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
120.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
120.35 -*************** coverage_checksum_string (unsigned chksu
120.36 -*** 471,505 ****
120.37 - as the checksums are used only for sanity checking. */
120.38 - for (i = 0; string[i]; i++)
120.39 - {
120.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
120.41 -! for (i = i + 9; string[i]; i++)
120.42 -! if (string[i]=='_')
120.43 -! {
120.44 -! int y;
120.45 -! unsigned seed;
120.46 -! int scan;
120.47 -!
120.48 -! for (y = 1; y < 9; y++)
120.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
120.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
120.51 -! break;
120.52 -! if (y != 9 || string[i + 9] != '_')
120.53 -! continue;
120.54 -! for (y = 10; y < 18; y++)
120.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
120.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
120.57 -! break;
120.58 -! if (y != 18)
120.59 -! continue;
120.60 -! scan = sscanf (string + i + 10, "%X", &seed);
120.61 -! gcc_assert (scan);
120.62 -! if (seed != crc32_string (0, flag_random_seed))
120.63 -! continue;
120.64 -! string = dup = xstrdup (string);
120.65 -! for (y = 10; y < 18; y++)
120.66 -! dup[i + y] = '0';
120.67 -! break;
120.68 -! }
120.69 - break;
120.70 - }
120.71 -
120.72 ---- 471,511 ----
120.73 - as the checksums are used only for sanity checking. */
120.74 - for (i = 0; string[i]; i++)
120.75 - {
120.76 -+ int offset = 0;
120.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
120.78 -+ offset = 11;
120.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
120.80 -! offset = 9;
120.81 -!
120.82 -! /* C++ namespaces do have scheme:
120.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
120.84 -! since filename might contain extra underscores there seems
120.85 -! to be no better chance then walk all possible offsets looking
120.86 -! for magicnuber. */
120.87 -! if (offset)
120.88 -! for (;string[offset]; offset++)
120.89 -! for (i = i + offset; string[i]; i++)
120.90 -! if (string[i]=='_')
120.91 -! {
120.92 -! int y;
120.93 -!
120.94 -! for (y = 1; y < 9; y++)
120.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
120.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
120.97 -! break;
120.98 -! if (y != 9 || string[i + 9] != '_')
120.99 -! continue;
120.100 -! for (y = 10; y < 18; y++)
120.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
120.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
120.103 -! break;
120.104 -! if (y != 18)
120.105 -! continue;
120.106 -! if (!dup)
120.107 -! string = dup = xstrdup (string);
120.108 -! for (y = 10; y < 18; y++)
120.109 -! dup[i + y] = '0';
120.110 -! }
120.111 - break;
120.112 - }
120.113 -
120.114 -
120.115 -
120.116 ---
120.117 -
120.118 -
120.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
120.120 -
120.121 -------- You are receiving this mail because: -------
120.122 -You reported the bug, or are watching the reporter.
120.123 -
120.124 -
121.1 --- a/patches/gcc/4.0.1/pr21951-fix2.patch Sat Sep 22 17:25:42 2007 +0000
121.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
121.3 @@ -1,71 +0,0 @@
121.4 -Workaround for buglet in std::vector etc. when compiling
121.5 -with gcc-4.0.1 -Wall -O -fno-exceptions
121.6 -Fixes:
121.7 -
121.8 -.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
121.9 -_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
121.10 -.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
121.11 -non-void function 'typename _Alloc::pointer std::vector<_Tp,
121.12 -_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
121.13 -_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
121.14 -
121.15 -See http://gcc.gnu.org/PR21951
121.16 -
121.17 -To: gcc-patches at gcc dot gnu dot org
121.18 -Subject: [4.0.x] may reach end warning in system headers
121.19 -Message-Id: <20050701183024.E138714C16A9@geoffk5.apple.com>
121.20 -Date: Fri, 1 Jul 2005 11:30:24 -0700 (PDT)
121.21 -From: gkeating at apple dot com (Geoffrey Keating)
121.22 -
121.23 -
121.24 -One of our users was getting
121.25 -
121.26 -/usr/include/gcc/darwin/4.0/c++/bits/stl_uninitialized.h:113: warning:
121.27 -control may reach end of non-void function '_ForwardIterator
121.28 -std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
121.29 -_ForwardIterator, __false_type) [with _InputIterator =
121.30 -__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
121.31 -std::vector<TPoolAllocator::tAllocState,
121.32 -std::allocator<TPoolAllocator::tAllocState> > >, _ForwardIterator =
121.33 -__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
121.34 -std::vector<TPoolAllocator::tAllocState,
121.35 -std::allocator<TPoolAllocator::tAllocState> > >]' being inlined
121.36 -
121.37 -which shouldn't be happening, he has no way to change a standard C++
121.38 -header. The warning is bogus anyway, but it's fixed in 4.1 through
121.39 -the CFG changes, which I don't really want to backport to the 4.0
121.40 -branch, so instead I'll add this patch. Other warnings generated from
121.41 -tree-inline.c check for DECL_SYSTEM_HEADER like this.
121.42 -
121.43 -Bootstrapped & tested on powerpc-darwin8, I'll commit when the branch
121.44 -is unfrozen.
121.45 -
121.46 ---
121.47 -- Geoffrey Keating <geoffk@apple.com>
121.48 -
121.49 -===File ~/patches/gcc-40-4121982.patch======================
121.50 -Index: ChangeLog
121.51 -2005-06-28 Geoffrey Keating <geoffk@apple.com>
121.52 -
121.53 - * tree-inline.c (expand_call_inline): Prevent 'may reach end'
121.54 - warning in system headers.
121.55 -
121.56 -Index: tree-inline.c
121.57 -===================================================================
121.58 -RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
121.59 -retrieving revision 1.170.8.4
121.60 -diff -u -p -u -p -r1.170.8.4 tree-inline.c
121.61 ---- gcc-4.0.1/gcc/tree-inline.c.old 6 Jun 2005 19:20:32 -0000 1.170.8.4
121.62 -+++ gcc-4.0.1/gcc/tree-inline.c 1 Jul 2005 18:27:26 -0000
121.63 -@@ -1693,7 +1693,8 @@ expand_call_inline (tree *tp, int *walk_
121.64 - && !TREE_NO_WARNING (fn)
121.65 - && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
121.66 - && return_slot_addr == NULL_TREE
121.67 -- && block_may_fallthru (copy))
121.68 -+ && block_may_fallthru (copy)
121.69 -+ && !DECL_IN_SYSTEM_HEADER (fn))
121.70 - {
121.71 - warning ("control may reach end of non-void function %qD being inlined",
121.72 - fn);
121.73 -============================================================
121.74 -
122.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
122.2 +++ b/patches/gcc/4.0.2/100-fix-fixincl.patch Sun Sep 23 17:08:09 2007 +0000
122.3 @@ -0,0 +1,72 @@
122.4 +See http://gcc.gnu.org/PR22541
122.5 +
122.6 +From: Dan Kegel
122.7 +
122.8 +When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
122.9 +the configure script happily copies the glibc include files from include to sys-include;
122.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
122.11 +
122.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
122.13 +
122.14 +But later, when running fixincludes, it gives the error message
122.15 + The directory that should contain system headers does not exist:
122.16 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
122.17 +
122.18 +Nevertheless, it continues building; the header files it installs in
122.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
122.20 +do not include the boilerplate that would cause it to #include_next the
122.21 +glibc headers in the system header directory.
122.22 +Thus the resulting toolchain can't compile the following program:
122.23 +#include <limits.h>
122.24 +int x = PATH_MAX;
122.25 +because its limits.h doesn't include the glibc header.
122.26 +
122.27 +That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
122.28 +it can refer to $PREFIX/i686-unknown-linux-gnu with the path
122.29 + $PREFIX/lib/../i686-unknown-linux-gnu, but
122.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
122.31 +it is only created later, during 'make install'. (Which makes this problem
122.32 +confusing, since one only notices the breakage well after 'make install',
122.33 +at which point the path configure complained about does exist, and has the
122.34 +right stuff in it.)
122.35 +
122.36 +A possible fix is to replace the line in gcc/Makefile.in that says
122.37 + SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
122.38 +with a version that gets rid of extra ..'s, e.g.
122.39 + SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
122.40 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
122.41 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
122.42 +
122.43 +[rediffed against gcc-4.0.0]
122.44 +
122.45 +--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
122.46 ++++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
122.47 +@@ -378,7 +378,10 @@
122.48 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
122.49 +
122.50 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
122.51 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
122.52 ++# Purge it of unneccessary internal relative paths
122.53 ++# to directories that might not exist yet.
122.54 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
122.55 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
122.56 +
122.57 + # Control whether to run fixproto and fixincludes.
122.58 + STMP_FIXPROTO = @STMP_FIXPROTO@
122.59 +@@ -2838,13 +2841,15 @@
122.60 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
122.61 +
122.62 + # Build fixed copies of system files.
122.63 ++# Abort if no system headers available, unless building a crosscompiler.
122.64 ++# FIXME: abort unless building --without-headers would be more accurate and less ugly
122.65 + stmp-fixinc: gsyslimits.h macro_list \
122.66 + ../$(build_subdir)/fixincludes/fixincl \
122.67 + ../$(build_subdir)/fixincludes/fixinc.sh
122.68 + @if test ! -d ${SYSTEM_HEADER_DIR}; then \
122.69 + echo The directory that should contain system headers does not exist: >&2 ; \
122.70 + echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
122.71 +- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
122.72 ++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
122.73 + then sleep 1; else exit 1; fi; \
122.74 + fi
122.75 + rm -rf include; mkdir include
123.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
123.2 +++ b/patches/gcc/4.0.2/110-pr20815-fix.patch Sun Sep 23 17:08:09 2007 +0000
123.3 @@ -0,0 +1,121 @@
123.4 +Date: 18 May 2005 22:47:59 -0000
123.5 +Message-ID: <20050518224759.7352.qmail@sourceware.org>
123.6 +From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
123.7 +To: dank@kegel.com
123.8 +References: <20050407215701.20815.dank@kegel.com>
123.9 +Reply-To: gcc-bugzilla@gcc.gnu.org
123.10 +Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
123.11 +
123.12 +
123.13 +------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
123.14 +Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
123.15 +
123.16 +>
123.17 +> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
123.18 +> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
123.19 +>
123.20 +> coverage_checksum_string already knows a bit about ignoring random seed
123.21 +> produced mess. It looks like this needs to be extended somehow to
123.22 +> handle namespaces too...
123.23 +
123.24 +This seems to solve the missmatch. Would it be possible to test it on
123.25 +bigger testcase and if it works distile a testcase that don't use
123.26 +file IO so it is more suitable for gcc regtesting?
123.27 +
123.28 +Index: coverage.c
123.29 +===================================================================
123.30 +RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
123.31 +retrieving revision 1.6.2.12.2.12
123.32 +diff -c -3 -p -r1.6.2.12.2.12 coverage.c
123.33 +*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
123.34 +--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
123.35 +*************** coverage_checksum_string (unsigned chksu
123.36 +*** 471,505 ****
123.37 + as the checksums are used only for sanity checking. */
123.38 + for (i = 0; string[i]; i++)
123.39 + {
123.40 + if (!strncmp (string + i, "_GLOBAL__", 9))
123.41 +! for (i = i + 9; string[i]; i++)
123.42 +! if (string[i]=='_')
123.43 +! {
123.44 +! int y;
123.45 +! unsigned seed;
123.46 +! int scan;
123.47 +!
123.48 +! for (y = 1; y < 9; y++)
123.49 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
123.50 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
123.51 +! break;
123.52 +! if (y != 9 || string[i + 9] != '_')
123.53 +! continue;
123.54 +! for (y = 10; y < 18; y++)
123.55 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
123.56 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
123.57 +! break;
123.58 +! if (y != 18)
123.59 +! continue;
123.60 +! scan = sscanf (string + i + 10, "%X", &seed);
123.61 +! gcc_assert (scan);
123.62 +! if (seed != crc32_string (0, flag_random_seed))
123.63 +! continue;
123.64 +! string = dup = xstrdup (string);
123.65 +! for (y = 10; y < 18; y++)
123.66 +! dup[i + y] = '0';
123.67 +! break;
123.68 +! }
123.69 + break;
123.70 + }
123.71 +
123.72 +--- 471,511 ----
123.73 + as the checksums are used only for sanity checking. */
123.74 + for (i = 0; string[i]; i++)
123.75 + {
123.76 ++ int offset = 0;
123.77 ++ if (!strncmp (string + i, "_GLOBAL__N_", 11))
123.78 ++ offset = 11;
123.79 + if (!strncmp (string + i, "_GLOBAL__", 9))
123.80 +! offset = 9;
123.81 +!
123.82 +! /* C++ namespaces do have scheme:
123.83 +! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
123.84 +! since filename might contain extra underscores there seems
123.85 +! to be no better chance then walk all possible offsets looking
123.86 +! for magicnuber. */
123.87 +! if (offset)
123.88 +! for (;string[offset]; offset++)
123.89 +! for (i = i + offset; string[i]; i++)
123.90 +! if (string[i]=='_')
123.91 +! {
123.92 +! int y;
123.93 +!
123.94 +! for (y = 1; y < 9; y++)
123.95 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
123.96 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
123.97 +! break;
123.98 +! if (y != 9 || string[i + 9] != '_')
123.99 +! continue;
123.100 +! for (y = 10; y < 18; y++)
123.101 +! if (!(string[i + y] >= '0' && string[i + y] <= '9')
123.102 +! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
123.103 +! break;
123.104 +! if (y != 18)
123.105 +! continue;
123.106 +! if (!dup)
123.107 +! string = dup = xstrdup (string);
123.108 +! for (y = 10; y < 18; y++)
123.109 +! dup[i + y] = '0';
123.110 +! }
123.111 + break;
123.112 + }
123.113 +
123.114 +
123.115 +
123.116 +--
123.117 +
123.118 +
123.119 +http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
123.120 +
123.121 +------- You are receiving this mail because: -------
123.122 +You reported the bug, or are watching the reporter.
123.123 +
123.124 +
124.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
124.2 +++ b/patches/gcc/4.0.2/120-pr21623-workaround.patch Sun Sep 23 17:08:09 2007 +0000
124.3 @@ -0,0 +1,53 @@
124.4 +Message-ID: <434576E1.6020305@sscd.de>
124.5 +Date: Thu, 06 Oct 2005 21:11:29 +0200
124.6 +From: Alexander Sieb <sieb@sscd.de>
124.7 +To: crossgcc@sourceware.org
124.8 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
124.9 +
124.10 +Hi,
124.11 +
124.12 +attached you find the files I needed to add to crosstool-0.38
124.13 +in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
124.14 +
124.15 +Files attached:
124.16 +
124.17 +sh4-gcc4.dat:
124.18 + * gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
124.19 + kernel won't build as it uses the -m4-nofpu option.
124.20 +
124.21 +gcc-pr21623.patch:
124.22 + * Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
124.23 +
124.24 +glibc-2.3.5-sh-memset.patch:
124.25 + * A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
124.26 + See content for rationale.
124.27 +
124.28 +-- snip --
124.29 +
124.30 +-- Here's patch 1 of 2, plus URLs showing where it is in CVS --
124.31 +
124.32 +[http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00081.html]
124.33 +
124.34 +2005-09-30 Kaz Kojima <kkojima@gcc.gnu.org>
124.35 +
124.36 + * config/sh/sh.c (sh_register_move_cost): Add case for moving
124.37 + from T_REGS to FP register class.
124.38 +
124.39 +[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.c.diff?cvsroot=gcc&r1=1.347&r2=1.348]
124.40 +
124.41 +RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
124.42 +retrieving revision 1.347
124.43 +retrieving revision 1.348
124.44 +diff -u -r1.347 -r1.348
124.45 +--- gcc/gcc/config/sh/sh.c 2005/09/05 12:45:22 1.347
124.46 ++++ gcc/gcc/config/sh/sh.c 2005/10/03 22:07:08 1.348
124.47 +@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
124.48 + && REGCLASS_HAS_FP_REG (dstclass))
124.49 + return 4;
124.50 +
124.51 ++ if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
124.52 ++ return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
124.53 ++
124.54 + if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
124.55 + || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
124.56 + return 9;
125.1 --- a/patches/gcc/4.0.2/fix-fixincl.patch Sat Sep 22 17:25:42 2007 +0000
125.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
125.3 @@ -1,72 +0,0 @@
125.4 -See http://gcc.gnu.org/PR22541
125.5 -
125.6 -From: Dan Kegel
125.7 -
125.8 -When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
125.9 -the configure script happily copies the glibc include files from include to sys-include;
125.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
125.11 -
125.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
125.13 -
125.14 -But later, when running fixincludes, it gives the error message
125.15 - The directory that should contain system headers does not exist:
125.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
125.17 -
125.18 -Nevertheless, it continues building; the header files it installs in
125.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
125.20 -do not include the boilerplate that would cause it to #include_next the
125.21 -glibc headers in the system header directory.
125.22 -Thus the resulting toolchain can't compile the following program:
125.23 -#include <limits.h>
125.24 -int x = PATH_MAX;
125.25 -because its limits.h doesn't include the glibc header.
125.26 -
125.27 -That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
125.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
125.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
125.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
125.31 -it is only created later, during 'make install'. (Which makes this problem
125.32 -confusing, since one only notices the breakage well after 'make install',
125.33 -at which point the path configure complained about does exist, and has the
125.34 -right stuff in it.)
125.35 -
125.36 -A possible fix is to replace the line in gcc/Makefile.in that says
125.37 - SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
125.38 -with a version that gets rid of extra ..'s, e.g.
125.39 - SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
125.40 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
125.41 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
125.42 -
125.43 -[rediffed against gcc-4.0.0]
125.44 -
125.45 ---- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
125.46 -+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
125.47 -@@ -378,7 +378,10 @@
125.48 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
125.49 -
125.50 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
125.51 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
125.52 -+# Purge it of unneccessary internal relative paths
125.53 -+# to directories that might not exist yet.
125.54 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
125.55 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
125.56 -
125.57 - # Control whether to run fixproto and fixincludes.
125.58 - STMP_FIXPROTO = @STMP_FIXPROTO@
125.59 -@@ -2838,13 +2841,15 @@
125.60 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
125.61 -
125.62 - # Build fixed copies of system files.
125.63 -+# Abort if no system headers available, unless building a crosscompiler.
125.64 -+# FIXME: abort unless building --without-headers would be more accurate and less ugly
125.65 - stmp-fixinc: gsyslimits.h macro_list \
125.66 - ../$(build_subdir)/fixincludes/fixincl \
125.67 - ../$(build_subdir)/fixincludes/fixinc.sh
125.68 - @if test ! -d ${SYSTEM_HEADER_DIR}; then \
125.69 - echo The directory that should contain system headers does not exist: >&2 ; \
125.70 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
125.71 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
125.72 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
125.73 - then sleep 1; else exit 1; fi; \
125.74 - fi
125.75 - rm -rf include; mkdir include
126.1 --- a/patches/gcc/4.0.2/pr20815-fix.patch Sat Sep 22 17:25:42 2007 +0000
126.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
126.3 @@ -1,121 +0,0 @@
126.4 -Date: 18 May 2005 22:47:59 -0000
126.5 -Message-ID: <20050518224759.7352.qmail@sourceware.org>
126.6 -From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
126.7 -To: dank@kegel.com
126.8 -References: <20050407215701.20815.dank@kegel.com>
126.9 -Reply-To: gcc-bugzilla@gcc.gnu.org
126.10 -Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
126.11 -
126.12 -
126.13 -------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
126.14 -Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
126.15 -
126.16 ->
126.17 -> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
126.18 -> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
126.19 ->
126.20 -> coverage_checksum_string already knows a bit about ignoring random seed
126.21 -> produced mess. It looks like this needs to be extended somehow to
126.22 -> handle namespaces too...
126.23 -
126.24 -This seems to solve the missmatch. Would it be possible to test it on
126.25 -bigger testcase and if it works distile a testcase that don't use
126.26 -file IO so it is more suitable for gcc regtesting?
126.27 -
126.28 -Index: coverage.c
126.29 -===================================================================
126.30 -RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
126.31 -retrieving revision 1.6.2.12.2.12
126.32 -diff -c -3 -p -r1.6.2.12.2.12 coverage.c
126.33 -*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
126.34 ---- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
126.35 -*************** coverage_checksum_string (unsigned chksu
126.36 -*** 471,505 ****
126.37 - as the checksums are used only for sanity checking. */
126.38 - for (i = 0; string[i]; i++)
126.39 - {
126.40 - if (!strncmp (string + i, "_GLOBAL__", 9))
126.41 -! for (i = i + 9; string[i]; i++)
126.42 -! if (string[i]=='_')
126.43 -! {
126.44 -! int y;
126.45 -! unsigned seed;
126.46 -! int scan;
126.47 -!
126.48 -! for (y = 1; y < 9; y++)
126.49 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
126.50 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
126.51 -! break;
126.52 -! if (y != 9 || string[i + 9] != '_')
126.53 -! continue;
126.54 -! for (y = 10; y < 18; y++)
126.55 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
126.56 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
126.57 -! break;
126.58 -! if (y != 18)
126.59 -! continue;
126.60 -! scan = sscanf (string + i + 10, "%X", &seed);
126.61 -! gcc_assert (scan);
126.62 -! if (seed != crc32_string (0, flag_random_seed))
126.63 -! continue;
126.64 -! string = dup = xstrdup (string);
126.65 -! for (y = 10; y < 18; y++)
126.66 -! dup[i + y] = '0';
126.67 -! break;
126.68 -! }
126.69 - break;
126.70 - }
126.71 -
126.72 ---- 471,511 ----
126.73 - as the checksums are used only for sanity checking. */
126.74 - for (i = 0; string[i]; i++)
126.75 - {
126.76 -+ int offset = 0;
126.77 -+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
126.78 -+ offset = 11;
126.79 - if (!strncmp (string + i, "_GLOBAL__", 9))
126.80 -! offset = 9;
126.81 -!
126.82 -! /* C++ namespaces do have scheme:
126.83 -! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
126.84 -! since filename might contain extra underscores there seems
126.85 -! to be no better chance then walk all possible offsets looking
126.86 -! for magicnuber. */
126.87 -! if (offset)
126.88 -! for (;string[offset]; offset++)
126.89 -! for (i = i + offset; string[i]; i++)
126.90 -! if (string[i]=='_')
126.91 -! {
126.92 -! int y;
126.93 -!
126.94 -! for (y = 1; y < 9; y++)
126.95 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
126.96 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
126.97 -! break;
126.98 -! if (y != 9 || string[i + 9] != '_')
126.99 -! continue;
126.100 -! for (y = 10; y < 18; y++)
126.101 -! if (!(string[i + y] >= '0' && string[i + y] <= '9')
126.102 -! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
126.103 -! break;
126.104 -! if (y != 18)
126.105 -! continue;
126.106 -! if (!dup)
126.107 -! string = dup = xstrdup (string);
126.108 -! for (y = 10; y < 18; y++)
126.109 -! dup[i + y] = '0';
126.110 -! }
126.111 - break;
126.112 - }
126.113 -
126.114 -
126.115 -
126.116 ---
126.117 -
126.118 -
126.119 -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
126.120 -
126.121 -------- You are receiving this mail because: -------
126.122 -You reported the bug, or are watching the reporter.
126.123 -
126.124 -
127.1 --- a/patches/gcc/4.0.2/pr21623-workaround.patch Sat Sep 22 17:25:42 2007 +0000
127.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
127.3 @@ -1,53 +0,0 @@
127.4 -Message-ID: <434576E1.6020305@sscd.de>
127.5 -Date: Thu, 06 Oct 2005 21:11:29 +0200
127.6 -From: Alexander Sieb <sieb@sscd.de>
127.7 -To: crossgcc@sourceware.org
127.8 -Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
127.9 -
127.10 -Hi,
127.11 -
127.12 -attached you find the files I needed to add to crosstool-0.38
127.13 -in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
127.14 -
127.15 -Files attached:
127.16 -
127.17 -sh4-gcc4.dat:
127.18 - * gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
127.19 - kernel won't build as it uses the -m4-nofpu option.
127.20 -
127.21 -gcc-pr21623.patch:
127.22 - * Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
127.23 -
127.24 -glibc-2.3.5-sh-memset.patch:
127.25 - * A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
127.26 - See content for rationale.
127.27 -
127.28 --- snip --
127.29 -
127.30 --- Here's patch 1 of 2, plus URLs showing where it is in CVS --
127.31 -
127.32 -[http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00081.html]
127.33 -
127.34 -2005-09-30 Kaz Kojima <kkojima@gcc.gnu.org>
127.35 -
127.36 - * config/sh/sh.c (sh_register_move_cost): Add case for moving
127.37 - from T_REGS to FP register class.
127.38 -
127.39 -[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.c.diff?cvsroot=gcc&r1=1.347&r2=1.348]
127.40 -
127.41 -RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
127.42 -retrieving revision 1.347
127.43 -retrieving revision 1.348
127.44 -diff -u -r1.347 -r1.348
127.45 ---- gcc/gcc/config/sh/sh.c 2005/09/05 12:45:22 1.347
127.46 -+++ gcc/gcc/config/sh/sh.c 2005/10/03 22:07:08 1.348
127.47 -@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
127.48 - && REGCLASS_HAS_FP_REG (dstclass))
127.49 - return 4;
127.50 -
127.51 -+ if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
127.52 -+ return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
127.53 -+
127.54 - if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
127.55 - || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
127.56 - return 9;
128.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
128.2 +++ b/patches/gcc/4.1.0/100-gcc-4.1-fix-fixincl.patch Sun Sep 23 17:08:09 2007 +0000
128.3 @@ -0,0 +1,71 @@
128.4 +See http://gcc.gnu.org/PR22541
128.5 +
128.6 +From: Dan Kegel
128.7 +
128.8 +When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
128.9 +the configure script happily copies the glibc include files from include to sys-include;
128.10 +here's the line from the log file (with $PREFIX instead of the real prefix):
128.11 +
128.12 +Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
128.13 +
128.14 +But later, when running fixincludes, it gives the error message
128.15 + The directory that should contain system headers does not exist:
128.16 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
128.17 +
128.18 +Nevertheless, it continues building; the header files it installs in
128.19 + $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
128.20 +do not include the boilerplate that would cause it to #include_next the
128.21 +glibc headers in the system header directory.
128.22 +Thus the resulting toolchain can't compile the following program:
128.23 +#include <limits.h>
128.24 +int x = PATH_MAX;
128.25 +because its limits.h doesn't include the glibc header.
128.26 +
128.27 +The problem is that gcc/Makefile.in assumes that
128.28 +it can refer to $PREFIX/i686-unknown-linux-gnu with the path
128.29 + $PREFIX/lib/../i686-unknown-linux-gnu, but
128.30 +that fails because the directory $PREFIX/lib doesn't exist during 'make all';
128.31 +it is only created later, during 'make install'. (Which makes this problem
128.32 +confusing, since one only notices the breakage well after 'make install',
128.33 +at which point the path configure complained about does exist, and has the
128.34 +right stuff in it.)
128.35 +
128.36 +A fix that I've been using for a while is to use sed to canonicalize
128.37 +the path. The sed syntax is a bit obtuse, but it works.
128.38 +
128.39 +(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
128.40 +for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
128.41 +
128.42 +[rediffed against gcc-4.1-20060210]
128.43 +
128.44 +--- gcc-4.1-20060210/gcc/Makefile.in.old 2006-01-11 06:29:29.000000000 -0800
128.45 ++++ gcc-4.1-20060210/gcc/Makefile.in 2006-02-14 16:08:54.000000000 -0800
128.46 +@@ -388,7 +388,10 @@
128.47 + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
128.48 +
128.49 + # autoconf sets SYSTEM_HEADER_DIR to one of the above.
128.50 +-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
128.51 ++# Purge it of unneccessary internal relative paths
128.52 ++# to directories that might not exist yet.
128.53 ++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
128.54 ++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
128.55 +
128.56 + # Control whether to run fixproto and fixincludes.
128.57 + STMP_FIXPROTO = @STMP_FIXPROTO@
128.58 +@@ -3167,13 +3170,15 @@
128.59 + ../$(build_subdir)/fixincludes/fixincl: ; @ :
128.60 +
128.61 + # Build fixed copies of system files.
128.62 ++# Abort if no system headers available, unless building a crosscompiler.
128.63 ++# Canonicalize $gcc_tooldir/sys-include in same way as $SYSTEM_HEADER_DIR was canonicalized so test still works
128.64 + stmp-fixinc: gsyslimits.h macro_list \
128.65 + $(build_objdir)/fixincludes/fixincl \
128.66 + $(build_objdir)/fixincludes/fixinc.sh
128.67 + @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
128.68 + echo The directory that should contain system headers does not exist: >&2 ; \
128.69 + echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
128.70 +- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
128.71 ++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
128.72 + then sleep 1; else exit 1; fi; \
128.73 + fi
128.74 + rm -rf include; mkdir include
129.1 --- a/patches/gcc/4.1.0/gcc-4.1-fix-fixincl.patch Sat Sep 22 17:25:42 2007 +0000
129.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
129.3 @@ -1,71 +0,0 @@
129.4 -See http://gcc.gnu.org/PR22541
129.5 -
129.6 -From: Dan Kegel
129.7 -
129.8 -When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
129.9 -the configure script happily copies the glibc include files from include to sys-include;
129.10 -here's the line from the log file (with $PREFIX instead of the real prefix):
129.11 -
129.12 -Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
129.13 -
129.14 -But later, when running fixincludes, it gives the error message
129.15 - The directory that should contain system headers does not exist:
129.16 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
129.17 -
129.18 -Nevertheless, it continues building; the header files it installs in
129.19 - $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
129.20 -do not include the boilerplate that would cause it to #include_next the
129.21 -glibc headers in the system header directory.
129.22 -Thus the resulting toolchain can't compile the following program:
129.23 -#include <limits.h>
129.24 -int x = PATH_MAX;
129.25 -because its limits.h doesn't include the glibc header.
129.26 -
129.27 -The problem is that gcc/Makefile.in assumes that
129.28 -it can refer to $PREFIX/i686-unknown-linux-gnu with the path
129.29 - $PREFIX/lib/../i686-unknown-linux-gnu, but
129.30 -that fails because the directory $PREFIX/lib doesn't exist during 'make all';
129.31 -it is only created later, during 'make install'. (Which makes this problem
129.32 -confusing, since one only notices the breakage well after 'make install',
129.33 -at which point the path configure complained about does exist, and has the
129.34 -right stuff in it.)
129.35 -
129.36 -A fix that I've been using for a while is to use sed to canonicalize
129.37 -the path. The sed syntax is a bit obtuse, but it works.
129.38 -
129.39 -(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
129.40 -for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
129.41 -
129.42 -[rediffed against gcc-4.1-20060210]
129.43 -
129.44 ---- gcc-4.1-20060210/gcc/Makefile.in.old 2006-01-11 06:29:29.000000000 -0800
129.45 -+++ gcc-4.1-20060210/gcc/Makefile.in 2006-02-14 16:08:54.000000000 -0800
129.46 -@@ -388,7 +388,10 @@
129.47 - CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
129.48 -
129.49 - # autoconf sets SYSTEM_HEADER_DIR to one of the above.
129.50 --SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
129.51 -+# Purge it of unneccessary internal relative paths
129.52 -+# to directories that might not exist yet.
129.53 -+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
129.54 -+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
129.55 -
129.56 - # Control whether to run fixproto and fixincludes.
129.57 - STMP_FIXPROTO = @STMP_FIXPROTO@
129.58 -@@ -3167,13 +3170,15 @@
129.59 - ../$(build_subdir)/fixincludes/fixincl: ; @ :
129.60 -
129.61 - # Build fixed copies of system files.
129.62 -+# Abort if no system headers available, unless building a crosscompiler.
129.63 -+# Canonicalize $gcc_tooldir/sys-include in same way as $SYSTEM_HEADER_DIR was canonicalized so test still works
129.64 - stmp-fixinc: gsyslimits.h macro_list \
129.65 - $(build_objdir)/fixincludes/fixincl \
129.66 - $(build_objdir)/fixincludes/fixinc.sh
129.67 - @if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
129.68 - echo The directory that should contain system headers does not exist: >&2 ; \
129.69 - echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
129.70 -- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
129.71 -+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
129.72 - then sleep 1; else exit 1; fi; \
129.73 - fi
129.74 - rm -rf include; mkdir include
130.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
130.2 +++ b/patches/glibc/2.3.6/100-arm-ctl_bus_isa.patch Sun Sep 23 17:08:09 2007 +0000
130.3 @@ -0,0 +1,53 @@
130.4 +Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
130.5 +Needed to build glibc with linux kernels 2.4.23 or higher on ARM,
130.6 +Fixes following error:
130.7 +
130.8 +../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
130.9 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
130.10 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
130.11 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
130.12 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
130.13 +../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
130.14 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
130.15 +../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
130.16 +make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
130.17 +
130.18 +cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA", http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
130.19 +
130.20 +--- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old 2003-02-20 14:22:24.000000000 -0800
130.21 ++++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-01-31 16:01:50.000000000 -0800
130.22 +@@ -47,6 +47,12 @@
130.23 + #include <asm/page.h>
130.24 + #include <sys/sysctl.h>
130.25 +
130.26 ++/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
130.27 ++#include <linux/version.h>
130.28 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
130.29 ++#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
130.30 ++#endif
130.31 ++
130.32 + #define PATH_ARM_SYSTYPE "/etc/arm_systype"
130.33 + #define PATH_CPUINFO "/proc/cpuinfo"
130.34 +
130.35 +@@ -80,7 +86,7 @@
130.36 + * Initialize I/O system. There are several ways to get the information
130.37 + * we need. Each is tried in turn until one succeeds.
130.38 + *
130.39 +- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
130.40 ++ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
130.41 + * but not all kernels support it.
130.42 + *
130.43 + * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
130.44 +@@ -100,8 +106,8 @@
130.45 + {
130.46 + char systype[256];
130.47 + int i, n;
130.48 +- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
130.49 +- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
130.50 ++ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
130.51 ++ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
130.52 + size_t len = sizeof(io.base);
130.53 +
130.54 + if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
130.55 +
130.56 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
131.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
131.2 +++ b/patches/glibc/2.3.6/110-fix-pr398.patch Sun Sep 23 17:08:09 2007 +0000
131.3 @@ -0,0 +1,70 @@
131.4 +Fixes error
131.5 +
131.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
131.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
131.8 +e.o] Error 1
131.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
131.10 +822/elf'
131.11 +make[1]: *** [elf/subdir_lib] Error 2
131.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
131.13 +822'
131.14 +make: *** [all] Error 2
131.15 +
131.16 +-----------------
131.17 +
131.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
131.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
131.20 +
131.21 +-----------------
131.22 +
131.23 +CVSROOT: /cvs/glibc
131.24 +Module name: libc
131.25 +Branch: glibc-2_3-branch
131.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
131.27 +
131.28 +Modified files:
131.29 + sysdeps/s390/s390-64: dl-machine.h
131.30 + sysdeps/s390/s390-32: dl-machine.h
131.31 +
131.32 +Log message:
131.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
131.34 +
131.35 + [BZ #398]
131.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
131.37 + directive.
131.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
131.39 +
131.40 +Patches:
131.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
131.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
131.43 +
131.44 +===================================================================
131.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
131.46 +retrieving revision 1.19.4.1
131.47 +retrieving revision 1.19.4.2
131.48 +diff -u -r1.19.4.1 -r1.19.4.2
131.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
131.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
131.51 +@@ -27,6 +27,7 @@
131.52 + #include <sys/param.h>
131.53 + #include <string.h>
131.54 + #include <link.h>
131.55 ++#include <sysdep.h>
131.56 +
131.57 + /* This is an older, now obsolete value. */
131.58 + #define EM_S390_OLD 0xA390
131.59 +===================================================================
131.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
131.61 +retrieving revision 1.20.4.1
131.62 +retrieving revision 1.20.4.2
131.63 +diff -u -r1.20.4.1 -r1.20.4.2
131.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
131.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
131.66 +@@ -27,6 +27,7 @@
131.67 + #include <sys/param.h>
131.68 + #include <string.h>
131.69 + #include <link.h>
131.70 ++#include <sysdep.h>
131.71 +
131.72 + /* This is an older, now obsolete value. */
131.73 + #define EM_S390_OLD 0xA390
132.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
132.2 +++ b/patches/glibc/2.3.6/120-glibc-2.3.5-allow-gcc-4.0-wordexp.patch Sun Sep 23 17:08:09 2007 +0000
132.3 @@ -0,0 +1,21 @@
132.4 +../sysdeps/generic/wordexp.c: In function 'exec_comm':
132.5 +../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
132.6 +../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
132.7 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
132.8 +
132.9 +I had to add the keyword 'inline' to get it to compile:
132.10 +
132.11 +--- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old 2005-03-12 08:54:15.709253928 -0800
132.12 ++++ glibc-2.3-20050307/sysdeps/generic/wordexp.c 2005-03-12 08:54:51.242852000 -0800
132.13 +@@ -809,7 +809,7 @@
132.14 + }
132.15 +
132.16 + /* Function called by child process in exec_comm() */
132.17 +-static void
132.18 ++static inline void
132.19 + internal_function __attribute__ ((always_inline))
132.20 + exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
132.21 + {
132.22 +
132.23 +
132.24 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
133.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
133.2 +++ b/patches/glibc/2.3.6/130-glibc-2.3.5-allow-gcc4-wcstol_l.patch Sun Sep 23 17:08:09 2007 +0000
133.3 @@ -0,0 +1,59 @@
133.4 +Fixes
133.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
133.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
133.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
133.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
133.9 +
133.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
133.11 +%changelog
133.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
133.13 ++- fix build on 64-bit arches with new GCC
133.14 +
133.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
133.16 +Branch: fedora-branch
133.17 +CVS Tags: fedora-glibc-2_3_4-18
133.18 +Changes since 1.4: +2 -0 lines
133.19 +Diff to previous 1.4 (colored)
133.20 +
133.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
133.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
133.23 +
133.24 +
133.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
133.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
133.27 +
133.28 +===================================================================
133.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
133.30 +retrieving revision 1.4
133.31 +retrieving revision 1.4.2.1
133.32 +diff -u -r1.4 -r1.4.2.1
133.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
133.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
133.35 +@@ -8,7 +8,9 @@
133.36 + #undef ____strtoll_l_internal
133.37 + #undef __strtoll_l
133.38 + #undef strtoll_l
133.39 ++#if !UNSIGNED
133.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
133.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
133.42 + weak_alias (__strtol_l, __strtoll_l)
133.43 + weak_alias (__strtol_l, strtoll_l)
133.44 ++#endif
133.45 +===================================================================
133.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
133.47 +retrieving revision 1.4
133.48 +retrieving revision 1.4.2.1
133.49 +diff -u -r1.4 -r1.4.2.1
133.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
133.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
133.52 +@@ -8,6 +8,8 @@
133.53 + #undef ____wcstoll_l_internal
133.54 + #undef __wcstoll_l
133.55 + #undef wcstoll_l
133.56 ++#if !UNSIGNED
133.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
133.58 + weak_alias (__wcstol_l, __wcstoll_l)
133.59 + weak_alias (__wcstol_l, wcstoll_l)
133.60 ++#endif
133.61 +
133.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
134.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
134.2 +++ b/patches/glibc/2.3.6/140-glibc-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
134.3 @@ -0,0 +1,187 @@
134.4 +Fixes
134.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
134.6 +...
134.7 +when building glibc-2.3.x on cygwin
134.8 +
134.9 +Idea from
134.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
134.11 +Basically, make glibc use .oST as suffix for 'object static'
134.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
134.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
134.14 +
134.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
134.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
134.17 +
134.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
134.19 +
134.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
134.21 +Date: Thu, 12 May 2005 08:50:34 +0200
134.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
134.23 +To: Dan Kegel <dank@kegel.com>
134.24 +CC: crossgcc@sources.redhat.com
134.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
134.26 +
134.27 +Hi Dan,
134.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
134.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
134.30 +
134.31 +--
134.32 + Petr Cvachoucek
134.33 + Unicontrols a.s.
134.34 + http://www.unicontrols.cz
134.35 +]
134.36 +
134.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
134.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
134.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
134.40 +@@ -449,7 +449,7 @@
134.41 + # run the linked programs.
134.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
134.43 + $(common-objpfx)libc.so$(libc.so-version) \
134.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
134.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
134.46 + # This is how to find at build-time things that will be installed there.
134.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
134.48 + endif
134.49 +@@ -656,7 +656,7 @@
134.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
134.51 + # to pass different flags for each flavor.
134.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
134.53 +-all-object-suffixes := .o .os .op .og .ob .oS
134.54 ++all-object-suffixes := .o .os .op .og .ob .oST
134.55 + object-suffixes :=
134.56 + CPPFLAGS-.o = $(pic-default)
134.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
134.58 +@@ -712,14 +712,14 @@
134.59 +
134.60 + ifeq (yes,$(build-shared))
134.61 + # Build special library that contains the static-only routines for libc.
134.62 +-object-suffixes-for-libc += .oS
134.63 ++object-suffixes-for-libc += .oST
134.64 +
134.65 + # Must build the routines as PIC, though, because they can end up in (users')
134.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
134.67 + # example, make that processor-specific.
134.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
134.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
134.70 +-libtype.oS = lib%_nonshared.a
134.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
134.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
134.73 ++libtype.oST = lib%_nonshared.a
134.74 + endif
134.75 +
134.76 + # The assembler can generate debug information too.
134.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
134.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
134.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
134.80 +@@ -416,7 +416,7 @@
134.81 + # Bounded pointer thunks are only built for *.ob
134.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
134.83 +
134.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
134.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
134.86 + $(routines) $(aux) $(sysdep_routines)) \
134.87 + $(elide-bp-thunks)
134.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
134.89 +@@ -961,7 +961,7 @@
134.90 + install: $(inst_libdir)/libc.so
134.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
134.92 + $(common-objpfx)libc.so$(libc.so-version) \
134.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
134.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
134.95 + $(libprefix)$(libc-name)) \
134.96 + $(+force)
134.97 + (echo '/* GNU ld script';\
134.98 +@@ -969,7 +969,7 @@
134.99 + echo ' the static library, so try that secondarily. */';\
134.100 + cat $<; \
134.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
134.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
134.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
134.104 + ')' \
134.105 + ) > $@.new
134.106 + mv -f $@.new $@
134.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
134.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
134.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
134.110 +@@ -13,7 +13,7 @@
134.111 +
134.112 + ifneq (,$($(lib)-static-only-routines))
134.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
134.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
134.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
134.116 + endif
134.117 + endif
134.118 +
134.119 +@@ -29,7 +29,7 @@
134.120 +
134.121 + # Add each flavor of library to the lists of things to build and install.
134.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
134.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
134.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
134.125 + $(patsubst %,%$o,$(filter-out \
134.126 + $($(lib)-shared-only-routines),\
134.127 + $(all-$(lib)-routines))))
134.128 +@@ -57,7 +57,7 @@
134.129 +
134.130 +
134.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
134.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
134.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
134.134 + define o-iterator-doit
134.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
134.136 + $(patsubst %,$(objpfx)%$o,\
134.137 +@@ -65,7 +65,7 @@
134.138 + $(all-$(lib)-routines))); \
134.139 + $$(build-extra-lib)
134.140 + endef
134.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
134.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
134.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
134.144 + endif
134.145 +
134.146 +@@ -77,9 +77,9 @@
134.147 + $(build-extra-lib)
134.148 + endif
134.149 +
134.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
134.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
134.152 +- $(patsubst %,$(objpfx)%.oS,\
134.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
134.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
134.155 ++ $(patsubst %,$(objpfx)%.oST,\
134.156 + $(filter $($(lib)-static-only-routines),\
134.157 + $(all-$(lib)-routines)))
134.158 + $(build-extra-lib)
134.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
134.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
134.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
134.162 +@@ -360,7 +360,7 @@
134.163 +
134.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
134.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
134.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
134.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
134.168 + $(libprefix)pthread) \
134.169 + $(+force)
134.170 + (echo '/* GNU ld script';\
134.171 +@@ -368,7 +368,7 @@
134.172 + echo ' the static library, so try that secondarily. */';\
134.173 + cat $<; \
134.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
134.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
134.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
134.177 + ')' \
134.178 + ) > $@.new
134.179 + mv -f $@.new $@
134.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
134.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
134.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
134.183 +@@ -10,4 +10,4 @@
134.184 + ASFLAGS-.op += -Wa,-Av9a
134.185 + ASFLAGS-.og += -Wa,-Av9a
134.186 + ASFLAGS-.ob += -Wa,-Av9a
134.187 +-ASFLAGS-.oS += -Wa,-Av9a
134.188 ++ASFLAGS-.oST += -Wa,-Av9a
134.189 +
134.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
135.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
135.2 +++ b/patches/glibc/2.3.6/150-glibc-2.3.5-sh-lowlevellock.patch Sun Sep 23 17:08:09 2007 +0000
135.3 @@ -0,0 +1,43 @@
135.4 +ML: http://sources.redhat.com/ml/libc-hacker/2005-09/msg00002.html
135.5 +
135.6 +Date: Mon, 05 Sep 2005 21:07:15 +0900 (JST)
135.7 +Message-Id: <20050905.210715.15267870.kkojima@rr.iij4u.or.jp>
135.8 +To: libc-hacker at sources dot redhat dot com
135.9 +Subject: SH: A typo in lowlevellock.S
135.10 +From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
135.11 +
135.12 +Hi,
135.13 +
135.14 +The appended patch fixes a typo in a low-level lock function. It
135.15 +set the correct 3rd argument for the futex syscall in loop. Sorry
135.16 +for missing such an embarrassing bug.
135.17 +
135.18 +Regards,
135.19 + kaz
135.20 +
135.21 +nptl/ChangeLog:
135.22 +2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
135.23 +
135.24 + * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
135.25 + Fix typo in register name.
135.26 +
135.27 +--- glibc.old/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2004-10-26 04:06:44.000000000 +0900
135.28 ++++ glibc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2005-09-05 19:18:25.000000000 +0900
135.29 +@@ -1,4 +1,4 @@
135.30 +-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
135.31 ++/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
135.32 + This file is part of the GNU C Library.
135.33 +
135.34 + The GNU C Library is free software; you can redistribute it and/or
135.35 +@@ -51,8 +51,8 @@ __lll_mutex_lock_wait:
135.36 + SYSCALL_INST_PAD
135.37 +
135.38 + 2:
135.39 +- mov #2, r4
135.40 +- XCHG (r4, @r8, r2)
135.41 ++ mov #2, r6
135.42 ++ XCHG (r6, @r8, r2)
135.43 + tst r2, r2
135.44 + bf 1b
135.45 +
135.46 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
136.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
136.2 +++ b/patches/glibc/2.3.6/160-glibc-2.3.5-sh-memset.patch Sun Sep 23 17:08:09 2007 +0000
136.3 @@ -0,0 +1,30 @@
136.4 +From:
136.5 + http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
136.6 + http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
136.7 +
136.8 +Message-ID: <434576E1.6020305@sscd.de>
136.9 +Date: Thu, 06 Oct 2005 21:11:29 +0200
136.10 +From: Alexander Sieb <sieb at sscd dot de>
136.11 +To: crossgcc at sourceware dot org
136.12 +Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
136.13 +
136.14 +On sh[34]-linux, memset function does not work if 2nd argument is negative
136.15 +and 3rd argument is greater than 12.
136.16 +for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
136.17 +
136.18 +Attached patch fixes this problem.
136.19 +
136.20 + * sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
136.21 +
136.22 +--- glibc-2.3.5.old/sysdeps/sh/memset.S 29 Apr 2003 22:47:18 -0000 1.4
136.23 ++++ glibc-2.3.5/sysdeps/sh/memset.S 23 Jul 2005 08:37:21 -0000
136.24 +@@ -28,6 +28,7 @@ ENTRY(memset)
136.25 + bt.s L_byte_loop_init
136.26 + mov r4,r7
136.27 +
136.28 ++ extu.b r5,r5
136.29 + swap.b r5,r1
136.30 + or r1,r5
136.31 + swap.w r5,r1
136.32 +
136.33 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
137.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
137.2 +++ b/patches/glibc/2.3.6/170-glibc-2.3.6-allow-gcc-4.0-arm.patch Sun Sep 23 17:08:09 2007 +0000
137.3 @@ -0,0 +1,35 @@
137.4 +Fixes
137.5 +In file included from dynamic-link.h:22,
137.6 + from dl-reloc.c:265:
137.7 +../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
137.8 +../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
137.9 +make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
137.10 +
137.11 +when building glibc-2.3.6 with gcc-4.0
137.12 +
137.13 +Like
137.14 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
137.15 +but fixes fix_bad_pc24.
137.16 +
137.17 +
137.18 +--- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
137.19 ++++ glibc-2.3.6/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
137.20 +@@ -357,7 +357,14 @@
137.21 + #ifdef RESOLVE
137.22 +
137.23 + /* Deal with an out-of-range PC24 reloc. */
137.24 +-static Elf32_Addr
137.25 ++#if __GNUC__ >= 4
137.26 ++ auto inline Elf32_Addr
137.27 ++#else
137.28 ++ static inline Elf32_Addr
137.29 ++#endif
137.30 ++#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
137.31 ++ __attribute ((always_inline))
137.32 ++#endif
137.33 + fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
137.34 + {
137.35 + static void *fix_page;
137.36 +
137.37 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
137.38 +with a little editing by dank@kegel.com
138.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
138.2 +++ b/patches/glibc/2.3.6/180-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Sep 23 17:08:09 2007 +0000
138.3 @@ -0,0 +1,67 @@
138.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
138.5 +Fixes
138.6 + rtld.c: In function '_dl_start':
138.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
138.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
138.9 +when compiling glibc-2.3.4 with gcc-4.0
138.10 +
138.11 +But see also
138.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
138.13 +and
138.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
138.15 +which seem to propose less radical fixes?
138.16 +
138.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
138.18 +
138.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
138.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
138.21 +@@ -19,47 +19,6 @@
138.22 +
138.23 + #include <elf.h>
138.24 + #include <assert.h>
138.25 +-
138.26 +-#ifdef RESOLVE
138.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
138.28 +- ElfW(Addr), because not all architectures can assume that the
138.29 +- relocated address is properly aligned, whereas the compiler is
138.30 +- entitled to assume that a pointer to a type is properly aligned for
138.31 +- the type. Even if we cast the pointer back to some other type with
138.32 +- less strict alignment requirements, the compiler might still
138.33 +- remember that the pointer was originally more aligned, thereby
138.34 +- optimizing away alignment tests or using word instructions for
138.35 +- copying memory, breaking the very code written to handle the
138.36 +- unaligned cases. */
138.37 +-# if ! ELF_MACHINE_NO_REL
138.38 +-auto inline void __attribute__((always_inline))
138.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
138.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
138.41 +- void *const reloc_addr);
138.42 +-auto inline void __attribute__((always_inline))
138.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
138.44 +- void *const reloc_addr);
138.45 +-# endif
138.46 +-# if ! ELF_MACHINE_NO_RELA
138.47 +-auto inline void __attribute__((always_inline))
138.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
138.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
138.50 +- void *const reloc_addr);
138.51 +-auto inline void __attribute__((always_inline))
138.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
138.53 +- void *const reloc_addr);
138.54 +-# endif
138.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
138.56 +-auto inline void __attribute__((always_inline))
138.57 +-elf_machine_lazy_rel (struct link_map *map,
138.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
138.59 +-# else
138.60 +-auto inline void __attribute__((always_inline))
138.61 +-elf_machine_lazy_rel (struct link_map *map,
138.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
138.63 +-# endif
138.64 +-#endif
138.65 +-
138.66 + #include <dl-machine.h>
138.67 +
138.68 + #ifndef VERSYMIDX
138.69 +
138.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
139.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
139.2 +++ b/patches/glibc/2.3.6/190-glibc-2.3.6-configure-apple-as.patch Sun Sep 23 17:08:09 2007 +0000
139.3 @@ -0,0 +1,25 @@
139.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
139.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
139.6 +
139.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
139.8 +where the assembler but doesn't understand the --version flag.
139.9 +
139.10 +Fixes the symptom
139.11 +checking whether ld is GNU ld... no
139.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
139.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
139.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
139.15 +
139.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
139.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
139.18 +@@ -3914,7 +3914,7 @@
139.19 + # Found it, now check the version.
139.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
139.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
139.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
139.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
139.24 + case $ac_prog_version in
139.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
139.26 + 2.1[3-9]*)
139.27 +
139.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
140.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
140.2 +++ b/patches/glibc/2.3.6/200-glibc-2.3.6-fix-pr631.patch Sun Sep 23 17:08:09 2007 +0000
140.3 @@ -0,0 +1,45 @@
140.4 +From dank@kegel.com
140.5 +Wed Jun 15 09:12:43 PDT 2005
140.6 +
140.7 +Fixes
140.8 +
140.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
140.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
140.11 +... 53 lines deleted ...
140.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
140.13 +collect2: ld returned 1 exit status
140.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
140.15 +
140.16 +when building glibc with --enable-static-nss.
140.17 +
140.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
140.19 +
140.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
140.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
140.22 +@@ -487,7 +487,7 @@
140.23 +
140.24 + # The static libraries.
140.25 + ifeq (yes,$(build-static))
140.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
140.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
140.28 + else
140.29 + ifeq (yes,$(build-shared))
140.30 + # We can try to link the programs with lib*_pic.a...
140.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
140.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
140.33 +@@ -115,6 +115,13 @@
140.34 + install-bin-script = ldd
140.35 + endif
140.36 +
140.37 ++ifeq (yes,$(build-static-nss))
140.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
140.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
140.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
140.41 ++ $(resolvobjdir)/libresolv.a
140.42 ++endif
140.43 ++
140.44 + others = sprof sln
140.45 + install-bin = sprof
140.46 + others-static = sln
140.47 +
140.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
141.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
141.2 +++ b/patches/glibc/2.3.6/210-glibc-fp-byteorder.patch Sun Sep 23 17:08:09 2007 +0000
141.3 @@ -0,0 +1,205 @@
141.4 +Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
141.5 +Author: addsub@eyou.com
141.6 +Target: ARM
141.7 +
141.8 +Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
141.9 +and makes printf("%f", 1.0) work.
141.10 +
141.11 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
141.12 + It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
141.13 + is broken' on my big-endian hardfloat FPA ARM platform. ...
141.14 + It's definitely needed for hardfloat. So I'd think it's needed for
141.15 + big-endian systems in any case, and for VFP on little-endian systems
141.16 + too. Someone would have to verify that though.
141.17 +
141.18 +Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
141.19 + I just had a look at glibc-20040830, and [this patch] is still needed and useful
141.20 + for this version. glibc-20040830 out-of-the-box still contains the
141.21 + following wrong assumptions:
141.22 + - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
141.23 + not on vfp systems)
141.24 + - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
141.25 + are not on big endian systems, neither on vfp systems)
141.26 + - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
141.27 + (which they are not on big endian systems)
141.28 + [This patch] seems the right solution for all of these issues.
141.29 +
141.30 +Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
141.31 + It's even needed for glibc CVS, AFAICS.
141.32 + The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
141.33 + (currently at version 1.4) is only needed for proper VFP operation.
141.34 + But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
141.35 + that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
141.36 + for proper operation of *any* FP model on big endian ARM.
141.37 +
141.38 +See also discussion in followups to
141.39 +http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
141.40 +
141.41 +Message-ID: <276985760.37584@eyou.com>
141.42 +Received: from unknown (HELO eyou.com) (172.16.2.2)
141.43 + by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
141.44 +Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
141.45 +Date: 17 Feb 2004 10:42:38 +0800
141.46 +Message-ID: <20040217104238.8237.qmail@eyou.com>
141.47 +From: "add" <addsub@eyou.com>
141.48 +To: dank@kegel.com
141.49 +Reply-To: "add" <addsub@eyou.com>
141.50 +Subject: Re: problem while building arm vfp softfloat gcc `
141.51 +
141.52 +Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
141.53 +toolchain can printf("%f\n",1.0). So you may have a try of this
141.54 +
141.55 +
141.56 +diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
141.57 +--- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
141.58 ++++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
141.59 +@@ -9,4 +9,9 @@
141.60 + #else
141.61 + #define __BYTE_ORDER __LITTLE_ENDIAN
141.62 + #endif
141.63 ++
141.64 ++#ifdef __VFP_FP__
141.65 ++#define __FLOAT_WORD_ORDER __BYTE_ORDER
141.66 ++#else
141.67 + #define __FLOAT_WORD_ORDER __BIG_ENDIAN
141.68 ++#endif
141.69 +diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
141.70 +--- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
141.71 ++++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
141.72 +@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
141.73 + #define BITS_PER_SHORTINT 16
141.74 + #define BITS_PER_CHAR 8
141.75 +
141.76 +-#define IEEE_DOUBLE_BIG_ENDIAN 0
141.77 +-#define IEEE_DOUBLE_MIXED_ENDIAN 1
141.78 ++#if defined(__ARMEB__)
141.79 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
141.80 ++# define IEEE_DOUBLE_BIG_ENDIAN 1
141.81 ++#elif defined(__VFP_FP__)
141.82 ++# define IEEE_DOUBLE_MIXED_ENDIAN 0
141.83 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
141.84 ++#else
141.85 ++# define IEEE_DOUBLE_BIG_ENDIAN 0
141.86 ++# define IEEE_DOUBLE_MIXED_ENDIAN 1
141.87 ++#endif
141.88 +diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
141.89 +--- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
141.90 ++++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
141.91 +@@ -1,115 +0,0 @@
141.92 +-/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
141.93 +- This file is part of the GNU C Library.
141.94 +-
141.95 +- The GNU C Library is free software; you can redistribute it and/or
141.96 +- modify it under the terms of the GNU Lesser General Public
141.97 +- License as published by the Free Software Foundation; either
141.98 +- version 2.1 of the License, or (at your option) any later version.
141.99 +-
141.100 +- The GNU C Library is distributed in the hope that it will be useful,
141.101 +- but WITHOUT ANY WARRANTY; without even the implied warranty of
141.102 +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
141.103 +- Lesser General Public License for more details.
141.104 +-
141.105 +- You should have received a copy of the GNU Lesser General Public
141.106 +- License along with the GNU C Library; if not, write to the Free
141.107 +- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
141.108 +- 02111-1307 USA. */
141.109 +-
141.110 +-#ifndef _IEEE754_H
141.111 +-
141.112 +-#define _IEEE754_H 1
141.113 +-#include <features.h>
141.114 +-
141.115 +-#include <endian.h>
141.116 +-
141.117 +-__BEGIN_DECLS
141.118 +-
141.119 +-union ieee754_float
141.120 +- {
141.121 +- float f;
141.122 +-
141.123 +- /* This is the IEEE 754 single-precision format. */
141.124 +- struct
141.125 +- {
141.126 +- unsigned int mantissa:23;
141.127 +- unsigned int exponent:8;
141.128 +- unsigned int negative:1;
141.129 +- } ieee;
141.130 +-
141.131 +- /* This format makes it easier to see if a NaN is a signalling NaN. */
141.132 +- struct
141.133 +- {
141.134 +- unsigned int mantissa:22;
141.135 +- unsigned int quiet_nan:1;
141.136 +- unsigned int exponent:8;
141.137 +- unsigned int negative:1;
141.138 +- } ieee_nan;
141.139 +- };
141.140 +-
141.141 +-#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
141.142 +-
141.143 +-
141.144 +-union ieee754_double
141.145 +- {
141.146 +- double d;
141.147 +-
141.148 +- /* This is the IEEE 754 double-precision format. */
141.149 +- struct
141.150 +- {
141.151 +- unsigned int mantissa0:20;
141.152 +- unsigned int exponent:11;
141.153 +- unsigned int negative:1;
141.154 +- unsigned int mantissa1:32;
141.155 +- } ieee;
141.156 +-
141.157 +- /* This format makes it easier to see if a NaN is a signalling NaN. */
141.158 +- struct
141.159 +- {
141.160 +- unsigned int mantissa0:19;
141.161 +- unsigned int quiet_nan:1;
141.162 +- unsigned int exponent:11;
141.163 +- unsigned int negative:1;
141.164 +- unsigned int mantissa1:32;
141.165 +- } ieee_nan;
141.166 +- };
141.167 +-
141.168 +-#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
141.169 +-
141.170 +-
141.171 +-/* The following two structures are correct for `new' floating point systems but
141.172 +- wrong for the old FPPC. The only solution seems to be to avoid their use on
141.173 +- old hardware. */
141.174 +-
141.175 +-union ieee854_long_double
141.176 +- {
141.177 +- long double d;
141.178 +-
141.179 +- /* This is the IEEE 854 double-extended-precision format. */
141.180 +- struct
141.181 +- {
141.182 +- unsigned int exponent:15;
141.183 +- unsigned int empty:16;
141.184 +- unsigned int negative:1;
141.185 +- unsigned int mantissa1:32;
141.186 +- unsigned int mantissa0:32;
141.187 +- } ieee;
141.188 +-
141.189 +- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
141.190 +- struct
141.191 +- {
141.192 +- unsigned int exponent:15;
141.193 +- unsigned int empty:16;
141.194 +- unsigned int negative:1;
141.195 +- unsigned int mantissa1:32;
141.196 +- unsigned int mantissa0:30;
141.197 +- unsigned int quiet_nan:1;
141.198 +- unsigned int one:1;
141.199 +- } ieee_nan;
141.200 +- };
141.201 +-
141.202 +-#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
141.203 +-
141.204 +-__END_DECLS
141.205 +-
141.206 +-#endif /* ieee754.h */
141.207 +
141.208 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
142.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
142.2 +++ b/patches/glibc/2.3.6/220-glibc-mips-bootstrap-gcc-header-install.patch Sun Sep 23 17:08:09 2007 +0000
142.3 @@ -0,0 +1,37 @@
142.4 +http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
142.5 +Fixes a MIPS build problem (unrelated to NPTL)
142.6 +
142.7 +Message-ID: <428E8B24.1000201@realitydiluted.com>
142.8 +Date: Fri, 20 May 2005 20:13:08 -0500
142.9 +From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
142.10 +To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
142.11 + Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
142.12 +Subject: New NPTL patches for crosstools and MIPS NPTL patches....
142.13 +
142.14 +Greetings.
142.15 +
142.16 +I have uploaded the latest NPTL patch for crosstool-0.34. I have also
142.17 +uploaded a tarball of the patches necessary to build a MIPS NPTL
142.18 +cross toolchain. To build a MIPS NPTL toolchain you will need the
142.19 +released version of binutils-2.16 and the absolute latest GCC and
142.20 +glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
142.21 +to build the toolchain. Please report bugs or issues to the crossgcc
142.22 +mailing list. Here is the link off of my FTP site:
142.23 +
142.24 + ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
142.25 +
142.26 +[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
142.27 +
142.28 +diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
142.29 +--- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600
142.30 ++++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500
142.31 +@@ -1,3 +1,7 @@
142.32 ++ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
142.33 + ifeq ($(filter -mabi=32,$(CC)),)
142.34 + CC += -mabi=32
142.35 + endif
142.36 ++else
142.37 ++CC += -D"_MIPS_SZPTR=32"
142.38 ++endif
142.39 +
142.40 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
143.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
143.2 +++ b/patches/glibc/2.3.6/230-make-install-lib-all.patch Sun Sep 23 17:08:09 2007 +0000
143.3 @@ -0,0 +1,26 @@
143.4 +From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
143.5 +Rule to install all needed libraries, not just the ones installed by install-lib,
143.6 +yet not install programs.
143.7 +Needed because we can't use the main install target, as we can't build programs before
143.8 +we have the final gcc installed; linking fails because libeh.a is not present,
143.9 +and glibc insists on linking programs with that library.
143.10 +
143.11 +diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
143.12 +--- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
143.13 ++++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
143.14 +@@ -844,6 +844,13 @@
143.15 + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
143.16 + $(inst_libdir)/$(patsubst %,$(libtype$o),\
143.17 + $(libprefix)$(libc-name)))
143.18 ++
143.19 ++install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
143.20 ++ $(inst_slibdir)/libc-$(version).so \
143.21 ++ $(inst_libdir)/libc.so \
143.22 ++ $(inst_libdir)/libc.a \
143.23 ++ install-lib
143.24 ++
143.25 + install: $(installed-libcs)
143.26 + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
143.27 + $(make-target-directory)
143.28 +
143.29 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
144.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
144.2 +++ b/patches/glibc/2.3.6/240-weakalias.patch Sun Sep 23 17:08:09 2007 +0000
144.3 @@ -0,0 +1,45 @@
144.4 +This one was taken from debian.
144.5 +
144.6 +# DP: Description: Fix __bind redefinition problem
144.7 +# DP: Related bugs:
144.8 +# DP: Dpatch author: Phil Blundell
144.9 +# DP: Patch author: Daniel Jacobowitz
144.10 +# DP: Upstream status: In CVS
144.11 +# DP: Status Details:
144.12 +# DP: Date: 2005-12-25
144.13 +
144.14 +Index: sysdeps/unix/sysv/linux/arm/socket.S
144.15 +===================================================================
144.16 +RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
144.17 +retrieving revision 1.12
144.18 +retrieving revision 1.13
144.19 +diff -u -r1.12 -r1.13
144.20 +--- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12
144.21 ++++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13
144.22 +@@ -1,4 +1,6 @@
144.23 +-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
144.24 ++/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
144.25 ++ Free Software Foundation, Inc.
144.26 ++
144.27 + This file is part of the GNU C Library.
144.28 +
144.29 + The GNU C Library is free software; you can redistribute it and/or
144.30 +@@ -32,7 +34,11 @@
144.31 + The .S files for the other calls just #define socket and #include this. */
144.32 +
144.33 + #ifndef __socket
144.34 ++#ifndef NO_WEAK_ALIAS
144.35 + #define __socket P(__,socket)
144.36 ++#else
144.37 ++#define __socket socket
144.38 ++#endif
144.39 + #endif
144.40 +
144.41 + #define PUSHARGS_1 str a1, [sp, $-4]!
144.42 +@@ -120,4 +126,6 @@
144.43 +
144.44 + PSEUDO_END (__socket)
144.45 +
144.46 ++#ifndef NO_WEAK_ALIAS
144.47 + weak_alias (__socket, socket)
144.48 ++#endif
145.1 --- a/patches/glibc/2.3.6/arm-ctl_bus_isa.patch Sat Sep 22 17:25:42 2007 +0000
145.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
145.3 @@ -1,53 +0,0 @@
145.4 -Applies to both glibc-2.2.5 and glibc-2.3.2, and probably glibc cvs as of Aug 2004.
145.5 -Needed to build glibc with linux kernels 2.4.23 or higher on ARM,
145.6 -Fixes following error:
145.7 -
145.8 -../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
145.9 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
145.10 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
145.11 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
145.12 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
145.13 -../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
145.14 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
145.15 -../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
145.16 -make[2]: *** [/home/dank/crosstool-0.28/build/arm-softfloat-linux-gnu/gcc-3.3.4-glibc-2.2.5/build-glibc/misc/ioperm.o] Error 1
145.17 -
145.18 -cf. "[SYSCTL] BUS_ISA -> CTL_BUS_ISA", http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html
145.19 -
145.20 ---- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c.old 2003-02-20 14:22:24.000000000 -0800
145.21 -+++ glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-01-31 16:01:50.000000000 -0800
145.22 -@@ -47,6 +47,12 @@
145.23 - #include <asm/page.h>
145.24 - #include <sys/sysctl.h>
145.25 -
145.26 -+/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
145.27 -+#include <linux/version.h>
145.28 -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
145.29 -+#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
145.30 -+#endif
145.31 -+
145.32 - #define PATH_ARM_SYSTYPE "/etc/arm_systype"
145.33 - #define PATH_CPUINFO "/proc/cpuinfo"
145.34 -
145.35 -@@ -80,7 +86,7 @@
145.36 - * Initialize I/O system. There are several ways to get the information
145.37 - * we need. Each is tried in turn until one succeeds.
145.38 - *
145.39 -- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
145.40 -+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
145.41 - * but not all kernels support it.
145.42 - *
145.43 - * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
145.44 -@@ -100,8 +106,8 @@
145.45 - {
145.46 - char systype[256];
145.47 - int i, n;
145.48 -- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
145.49 -- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
145.50 -+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
145.51 -+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
145.52 - size_t len = sizeof(io.base);
145.53 -
145.54 - if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
145.55 -
145.56 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
146.1 --- a/patches/glibc/2.3.6/fix-pr398.patch Sat Sep 22 17:25:42 2007 +0000
146.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
146.3 @@ -1,70 +0,0 @@
146.4 -Fixes error
146.5 -
146.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
146.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
146.8 -e.o] Error 1
146.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
146.10 -822/elf'
146.11 -make[1]: *** [elf/subdir_lib] Error 2
146.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
146.13 -822'
146.14 -make: *** [all] Error 2
146.15 -
146.16 ------------------
146.17 -
146.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
146.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
146.20 -
146.21 ------------------
146.22 -
146.23 -CVSROOT: /cvs/glibc
146.24 -Module name: libc
146.25 -Branch: glibc-2_3-branch
146.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
146.27 -
146.28 -Modified files:
146.29 - sysdeps/s390/s390-64: dl-machine.h
146.30 - sysdeps/s390/s390-32: dl-machine.h
146.31 -
146.32 -Log message:
146.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
146.34 -
146.35 - [BZ #398]
146.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
146.37 - directive.
146.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
146.39 -
146.40 -Patches:
146.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
146.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
146.43 -
146.44 -===================================================================
146.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
146.46 -retrieving revision 1.19.4.1
146.47 -retrieving revision 1.19.4.2
146.48 -diff -u -r1.19.4.1 -r1.19.4.2
146.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
146.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
146.51 -@@ -27,6 +27,7 @@
146.52 - #include <sys/param.h>
146.53 - #include <string.h>
146.54 - #include <link.h>
146.55 -+#include <sysdep.h>
146.56 -
146.57 - /* This is an older, now obsolete value. */
146.58 - #define EM_S390_OLD 0xA390
146.59 -===================================================================
146.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
146.61 -retrieving revision 1.20.4.1
146.62 -retrieving revision 1.20.4.2
146.63 -diff -u -r1.20.4.1 -r1.20.4.2
146.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
146.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
146.66 -@@ -27,6 +27,7 @@
146.67 - #include <sys/param.h>
146.68 - #include <string.h>
146.69 - #include <link.h>
146.70 -+#include <sysdep.h>
146.71 -
146.72 - /* This is an older, now obsolete value. */
146.73 - #define EM_S390_OLD 0xA390
147.1 --- a/patches/glibc/2.3.6/glibc-2.3.5-allow-gcc-4.0-wordexp.patch Sat Sep 22 17:25:42 2007 +0000
147.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
147.3 @@ -1,21 +0,0 @@
147.4 -../sysdeps/generic/wordexp.c: In function 'exec_comm':
147.5 -../sysdeps/generic/wordexp.c:815: sorry, unimplemented: inlining failed in call to 'exec_comm_child': function body not available
147.6 -../sysdeps/generic/wordexp.c:900: sorry, unimplemented: called from here
147.7 -make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/posix/wordexp.o] Error
147.8 -
147.9 -I had to add the keyword 'inline' to get it to compile:
147.10 -
147.11 ---- glibc-2.3-20050307/sysdeps/generic/wordexp.c.old 2005-03-12 08:54:15.709253928 -0800
147.12 -+++ glibc-2.3-20050307/sysdeps/generic/wordexp.c 2005-03-12 08:54:51.242852000 -0800
147.13 -@@ -809,7 +809,7 @@
147.14 - }
147.15 -
147.16 - /* Function called by child process in exec_comm() */
147.17 --static void
147.18 -+static inline void
147.19 - internal_function __attribute__ ((always_inline))
147.20 - exec_comm_child (char *comm, int *fildes, int showerr, int noexec)
147.21 - {
147.22 -
147.23 -
147.24 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
148.1 --- a/patches/glibc/2.3.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch Sat Sep 22 17:25:42 2007 +0000
148.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
148.3 @@ -1,59 +0,0 @@
148.4 -Fixes
148.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
148.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
148.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
148.8 -make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
148.9 -
148.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
148.11 -%changelog
148.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
148.13 -+- fix build on 64-bit arches with new GCC
148.14 -
148.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
148.16 -Branch: fedora-branch
148.17 -CVS Tags: fedora-glibc-2_3_4-18
148.18 -Changes since 1.4: +2 -0 lines
148.19 -Diff to previous 1.4 (colored)
148.20 -
148.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
148.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
148.23 -
148.24 -
148.25 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
148.26 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
148.27 -
148.28 -===================================================================
148.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
148.30 -retrieving revision 1.4
148.31 -retrieving revision 1.4.2.1
148.32 -diff -u -r1.4 -r1.4.2.1
148.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
148.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
148.35 -@@ -8,7 +8,9 @@
148.36 - #undef ____strtoll_l_internal
148.37 - #undef __strtoll_l
148.38 - #undef strtoll_l
148.39 -+#if !UNSIGNED
148.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
148.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
148.42 - weak_alias (__strtol_l, __strtoll_l)
148.43 - weak_alias (__strtol_l, strtoll_l)
148.44 -+#endif
148.45 -===================================================================
148.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
148.47 -retrieving revision 1.4
148.48 -retrieving revision 1.4.2.1
148.49 -diff -u -r1.4 -r1.4.2.1
148.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
148.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
148.52 -@@ -8,6 +8,8 @@
148.53 - #undef ____wcstoll_l_internal
148.54 - #undef __wcstoll_l
148.55 - #undef wcstoll_l
148.56 -+#if !UNSIGNED
148.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
148.58 - weak_alias (__wcstol_l, __wcstoll_l)
148.59 - weak_alias (__wcstol_l, wcstoll_l)
148.60 -+#endif
148.61 -
148.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
149.1 --- a/patches/glibc/2.3.6/glibc-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
149.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
149.3 @@ -1,187 +0,0 @@
149.4 -Fixes
149.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
149.6 -...
149.7 -when building glibc-2.3.x on cygwin
149.8 -
149.9 -Idea from
149.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
149.11 -Basically, make glibc use .oST as suffix for 'object static'
149.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
149.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
149.14 -
149.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
149.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
149.17 -
149.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
149.19 -
149.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
149.21 -Date: Thu, 12 May 2005 08:50:34 +0200
149.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
149.23 -To: Dan Kegel <dank@kegel.com>
149.24 -CC: crossgcc@sources.redhat.com
149.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
149.26 -
149.27 -Hi Dan,
149.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
149.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
149.30 -
149.31 ---
149.32 - Petr Cvachoucek
149.33 - Unicontrols a.s.
149.34 - http://www.unicontrols.cz
149.35 -]
149.36 -
149.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
149.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
149.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
149.40 -@@ -449,7 +449,7 @@
149.41 - # run the linked programs.
149.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
149.43 - $(common-objpfx)libc.so$(libc.so-version) \
149.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
149.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
149.46 - # This is how to find at build-time things that will be installed there.
149.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
149.48 - endif
149.49 -@@ -656,7 +656,7 @@
149.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
149.51 - # to pass different flags for each flavor.
149.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
149.53 --all-object-suffixes := .o .os .op .og .ob .oS
149.54 -+all-object-suffixes := .o .os .op .og .ob .oST
149.55 - object-suffixes :=
149.56 - CPPFLAGS-.o = $(pic-default)
149.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
149.58 -@@ -712,14 +712,14 @@
149.59 -
149.60 - ifeq (yes,$(build-shared))
149.61 - # Build special library that contains the static-only routines for libc.
149.62 --object-suffixes-for-libc += .oS
149.63 -+object-suffixes-for-libc += .oST
149.64 -
149.65 - # Must build the routines as PIC, though, because they can end up in (users')
149.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
149.67 - # example, make that processor-specific.
149.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
149.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
149.70 --libtype.oS = lib%_nonshared.a
149.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
149.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
149.73 -+libtype.oST = lib%_nonshared.a
149.74 - endif
149.75 -
149.76 - # The assembler can generate debug information too.
149.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
149.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
149.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
149.80 -@@ -416,7 +416,7 @@
149.81 - # Bounded pointer thunks are only built for *.ob
149.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
149.83 -
149.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
149.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
149.86 - $(routines) $(aux) $(sysdep_routines)) \
149.87 - $(elide-bp-thunks)
149.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
149.89 -@@ -961,7 +961,7 @@
149.90 - install: $(inst_libdir)/libc.so
149.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
149.92 - $(common-objpfx)libc.so$(libc.so-version) \
149.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
149.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
149.95 - $(libprefix)$(libc-name)) \
149.96 - $(+force)
149.97 - (echo '/* GNU ld script';\
149.98 -@@ -969,7 +969,7 @@
149.99 - echo ' the static library, so try that secondarily. */';\
149.100 - cat $<; \
149.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
149.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
149.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
149.104 - ')' \
149.105 - ) > $@.new
149.106 - mv -f $@.new $@
149.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
149.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
149.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
149.110 -@@ -13,7 +13,7 @@
149.111 -
149.112 - ifneq (,$($(lib)-static-only-routines))
149.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
149.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
149.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
149.116 - endif
149.117 - endif
149.118 -
149.119 -@@ -29,7 +29,7 @@
149.120 -
149.121 - # Add each flavor of library to the lists of things to build and install.
149.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
149.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
149.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
149.125 - $(patsubst %,%$o,$(filter-out \
149.126 - $($(lib)-shared-only-routines),\
149.127 - $(all-$(lib)-routines))))
149.128 -@@ -57,7 +57,7 @@
149.129 -
149.130 -
149.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
149.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
149.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
149.134 - define o-iterator-doit
149.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
149.136 - $(patsubst %,$(objpfx)%$o,\
149.137 -@@ -65,7 +65,7 @@
149.138 - $(all-$(lib)-routines))); \
149.139 - $$(build-extra-lib)
149.140 - endef
149.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
149.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
149.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
149.144 - endif
149.145 -
149.146 -@@ -77,9 +77,9 @@
149.147 - $(build-extra-lib)
149.148 - endif
149.149 -
149.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
149.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
149.152 -- $(patsubst %,$(objpfx)%.oS,\
149.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
149.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
149.155 -+ $(patsubst %,$(objpfx)%.oST,\
149.156 - $(filter $($(lib)-static-only-routines),\
149.157 - $(all-$(lib)-routines)))
149.158 - $(build-extra-lib)
149.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
149.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
149.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
149.162 -@@ -360,7 +360,7 @@
149.163 -
149.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
149.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
149.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
149.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
149.168 - $(libprefix)pthread) \
149.169 - $(+force)
149.170 - (echo '/* GNU ld script';\
149.171 -@@ -368,7 +368,7 @@
149.172 - echo ' the static library, so try that secondarily. */';\
149.173 - cat $<; \
149.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
149.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
149.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
149.177 - ')' \
149.178 - ) > $@.new
149.179 - mv -f $@.new $@
149.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
149.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
149.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
149.183 -@@ -10,4 +10,4 @@
149.184 - ASFLAGS-.op += -Wa,-Av9a
149.185 - ASFLAGS-.og += -Wa,-Av9a
149.186 - ASFLAGS-.ob += -Wa,-Av9a
149.187 --ASFLAGS-.oS += -Wa,-Av9a
149.188 -+ASFLAGS-.oST += -Wa,-Av9a
149.189 -
149.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
150.1 --- a/patches/glibc/2.3.6/glibc-2.3.5-sh-lowlevellock.patch Sat Sep 22 17:25:42 2007 +0000
150.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
150.3 @@ -1,43 +0,0 @@
150.4 -ML: http://sources.redhat.com/ml/libc-hacker/2005-09/msg00002.html
150.5 -
150.6 -Date: Mon, 05 Sep 2005 21:07:15 +0900 (JST)
150.7 -Message-Id: <20050905.210715.15267870.kkojima@rr.iij4u.or.jp>
150.8 -To: libc-hacker at sources dot redhat dot com
150.9 -Subject: SH: A typo in lowlevellock.S
150.10 -From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
150.11 -
150.12 -Hi,
150.13 -
150.14 -The appended patch fixes a typo in a low-level lock function. It
150.15 -set the correct 3rd argument for the futex syscall in loop. Sorry
150.16 -for missing such an embarrassing bug.
150.17 -
150.18 -Regards,
150.19 - kaz
150.20 -
150.21 -nptl/ChangeLog:
150.22 -2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
150.23 -
150.24 - * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
150.25 - Fix typo in register name.
150.26 -
150.27 ---- glibc.old/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2004-10-26 04:06:44.000000000 +0900
150.28 -+++ glibc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S 2005-09-05 19:18:25.000000000 +0900
150.29 -@@ -1,4 +1,4 @@
150.30 --/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
150.31 -+/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
150.32 - This file is part of the GNU C Library.
150.33 -
150.34 - The GNU C Library is free software; you can redistribute it and/or
150.35 -@@ -51,8 +51,8 @@ __lll_mutex_lock_wait:
150.36 - SYSCALL_INST_PAD
150.37 -
150.38 - 2:
150.39 -- mov #2, r4
150.40 -- XCHG (r4, @r8, r2)
150.41 -+ mov #2, r6
150.42 -+ XCHG (r6, @r8, r2)
150.43 - tst r2, r2
150.44 - bf 1b
150.45 -
150.46 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
151.1 --- a/patches/glibc/2.3.6/glibc-2.3.5-sh-memset.patch Sat Sep 22 17:25:42 2007 +0000
151.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
151.3 @@ -1,30 +0,0 @@
151.4 -From:
151.5 - http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
151.6 - http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
151.7 -
151.8 -Message-ID: <434576E1.6020305@sscd.de>
151.9 -Date: Thu, 06 Oct 2005 21:11:29 +0200
151.10 -From: Alexander Sieb <sieb at sscd dot de>
151.11 -To: crossgcc at sourceware dot org
151.12 -Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
151.13 -
151.14 -On sh[34]-linux, memset function does not work if 2nd argument is negative
151.15 -and 3rd argument is greater than 12.
151.16 -for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
151.17 -
151.18 -Attached patch fixes this problem.
151.19 -
151.20 - * sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
151.21 -
151.22 ---- glibc-2.3.5.old/sysdeps/sh/memset.S 29 Apr 2003 22:47:18 -0000 1.4
151.23 -+++ glibc-2.3.5/sysdeps/sh/memset.S 23 Jul 2005 08:37:21 -0000
151.24 -@@ -28,6 +28,7 @@ ENTRY(memset)
151.25 - bt.s L_byte_loop_init
151.26 - mov r4,r7
151.27 -
151.28 -+ extu.b r5,r5
151.29 - swap.b r5,r1
151.30 - or r1,r5
151.31 - swap.w r5,r1
151.32 -
151.33 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
152.1 --- a/patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-arm.patch Sat Sep 22 17:25:42 2007 +0000
152.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
152.3 @@ -1,35 +0,0 @@
152.4 -Fixes
152.5 -In file included from dynamic-link.h:22,
152.6 - from dl-reloc.c:265:
152.7 -../sysdeps/arm/dl-machine.h: In function '_dl_relocate_object':
152.8 -../sysdeps/arm/dl-machine.h:371: error: invalid storage class for function 'fix_bad_pc24'
152.9 -make[2]: Leaving directory `/home/dank/queue/jobdir.k8/crosstool-dev/build/arm-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3.6/glibc-2.3.6/elf'
152.10 -
152.11 -when building glibc-2.3.6 with gcc-4.0
152.12 -
152.13 -Like
152.14 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/arm/dl-machine.h.diff?r1=1.51&r2=1.52&cvsroot=glibc
152.15 -but fixes fix_bad_pc24.
152.16 -
152.17 -
152.18 ---- glibc-2.3.6-orig/sysdeps/arm/dl-machine.h Sun Mar 20 17:54:37 2005
152.19 -+++ glibc-2.3.6/sysdeps/arm/dl-machine.h Sun Mar 20 17:57:32 2005
152.20 -@@ -357,7 +357,14 @@
152.21 - #ifdef RESOLVE
152.22 -
152.23 - /* Deal with an out-of-range PC24 reloc. */
152.24 --static Elf32_Addr
152.25 -+#if __GNUC__ >= 4
152.26 -+ auto inline Elf32_Addr
152.27 -+#else
152.28 -+ static inline Elf32_Addr
152.29 -+#endif
152.30 -+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
152.31 -+ __attribute ((always_inline))
152.32 -+#endif
152.33 - fix_bad_pc24 (Elf32_Addr *const reloc_addr, Elf32_Addr value)
152.34 - {
152.35 - static void *fix_page;
152.36 -
152.37 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
152.38 -with a little editing by dank@kegel.com
153.1 --- a/patches/glibc/2.3.6/glibc-2.3.6-allow-gcc-4.0-elf.patch Sat Sep 22 17:25:42 2007 +0000
153.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
153.3 @@ -1,67 +0,0 @@
153.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
153.5 -Fixes
153.6 - rtld.c: In function '_dl_start':
153.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
153.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
153.9 -when compiling glibc-2.3.4 with gcc-4.0
153.10 -
153.11 -But see also
153.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
153.13 -and
153.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
153.15 -which seem to propose less radical fixes?
153.16 -
153.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
153.18 -
153.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
153.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
153.21 -@@ -19,47 +19,6 @@
153.22 -
153.23 - #include <elf.h>
153.24 - #include <assert.h>
153.25 --
153.26 --#ifdef RESOLVE
153.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
153.28 -- ElfW(Addr), because not all architectures can assume that the
153.29 -- relocated address is properly aligned, whereas the compiler is
153.30 -- entitled to assume that a pointer to a type is properly aligned for
153.31 -- the type. Even if we cast the pointer back to some other type with
153.32 -- less strict alignment requirements, the compiler might still
153.33 -- remember that the pointer was originally more aligned, thereby
153.34 -- optimizing away alignment tests or using word instructions for
153.35 -- copying memory, breaking the very code written to handle the
153.36 -- unaligned cases. */
153.37 --# if ! ELF_MACHINE_NO_REL
153.38 --auto inline void __attribute__((always_inline))
153.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
153.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
153.41 -- void *const reloc_addr);
153.42 --auto inline void __attribute__((always_inline))
153.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
153.44 -- void *const reloc_addr);
153.45 --# endif
153.46 --# if ! ELF_MACHINE_NO_RELA
153.47 --auto inline void __attribute__((always_inline))
153.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
153.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
153.50 -- void *const reloc_addr);
153.51 --auto inline void __attribute__((always_inline))
153.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
153.53 -- void *const reloc_addr);
153.54 --# endif
153.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
153.56 --auto inline void __attribute__((always_inline))
153.57 --elf_machine_lazy_rel (struct link_map *map,
153.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
153.59 --# else
153.60 --auto inline void __attribute__((always_inline))
153.61 --elf_machine_lazy_rel (struct link_map *map,
153.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
153.63 --# endif
153.64 --#endif
153.65 --
153.66 - #include <dl-machine.h>
153.67 -
153.68 - #ifndef VERSYMIDX
153.69 -
153.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
154.1 --- a/patches/glibc/2.3.6/glibc-2.3.6-configure-apple-as.patch Sat Sep 22 17:25:42 2007 +0000
154.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
154.3 @@ -1,25 +0,0 @@
154.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
154.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
154.6 -
154.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
154.8 -where the assembler but doesn't understand the --version flag.
154.9 -
154.10 -Fixes the symptom
154.11 -checking whether ld is GNU ld... no
154.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
154.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
154.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
154.15 -
154.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
154.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
154.18 -@@ -3914,7 +3914,7 @@
154.19 - # Found it, now check the version.
154.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
154.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
154.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
154.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
154.24 - case $ac_prog_version in
154.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
154.26 - 2.1[3-9]*)
154.27 -
154.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
155.1 --- a/patches/glibc/2.3.6/glibc-2.3.6-fix-pr631.patch Sat Sep 22 17:25:42 2007 +0000
155.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
155.3 @@ -1,45 +0,0 @@
155.4 -From dank@kegel.com
155.5 -Wed Jun 15 09:12:43 PDT 2005
155.6 -
155.7 -Fixes
155.8 -
155.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
155.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
155.11 -... 53 lines deleted ...
155.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
155.13 -collect2: ld returned 1 exit status
155.14 -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
155.15 -
155.16 -when building glibc with --enable-static-nss.
155.17 -
155.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
155.19 -
155.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
155.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
155.22 -@@ -487,7 +487,7 @@
155.23 -
155.24 - # The static libraries.
155.25 - ifeq (yes,$(build-static))
155.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
155.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
155.28 - else
155.29 - ifeq (yes,$(build-shared))
155.30 - # We can try to link the programs with lib*_pic.a...
155.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
155.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
155.33 -@@ -115,6 +115,13 @@
155.34 - install-bin-script = ldd
155.35 - endif
155.36 -
155.37 -+ifeq (yes,$(build-static-nss))
155.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
155.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
155.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
155.41 -+ $(resolvobjdir)/libresolv.a
155.42 -+endif
155.43 -+
155.44 - others = sprof sln
155.45 - install-bin = sprof
155.46 - others-static = sln
155.47 -
155.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
156.1 --- a/patches/glibc/2.3.6/glibc-fp-byteorder.patch Sat Sep 22 17:25:42 2007 +0000
156.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
156.3 @@ -1,205 +0,0 @@
156.4 -Taken from http://sources.redhat.com/ml/crossgcc/2004-02/msg00104.html
156.5 -Author: addsub@eyou.com
156.6 -Target: ARM
156.7 -
156.8 -Fixes http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/920501-8.c
156.9 -and makes printf("%f", 1.0) work.
156.10 -
156.11 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00115.html :
156.12 - It ... fixes the 'printf("%f\n", 0.5); prints 0.000000' and general 'floating point
156.13 - is broken' on my big-endian hardfloat FPA ARM platform. ...
156.14 - It's definitely needed for hardfloat. So I'd think it's needed for
156.15 - big-endian systems in any case, and for VFP on little-endian systems
156.16 - too. Someone would have to verify that though.
156.17 -
156.18 -Lennert Buytenhek wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00123.html
156.19 - I just had a look at glibc-20040830, and [this patch] is still needed and useful
156.20 - for this version. glibc-20040830 out-of-the-box still contains the
156.21 - following wrong assumptions:
156.22 - - sysdeps/arm/bits/endian.h: float word order is big endian (which it is
156.23 - not on vfp systems)
156.24 - - sysdeps/arm/gmp-mparam.h: IEEE doubles are mixed endian (which they
156.25 - are not on big endian systems, neither on vfp systems)
156.26 - - sysdeps/arm/ieee754.h: IEEE doubles are in little endian byte order
156.27 - (which they are not on big endian systems)
156.28 - [This patch] seems the right solution for all of these issues.
156.29 -
156.30 -Dimitry Andric wrote in http://sources.redhat.com/ml/crossgcc/2004-09/msg00132.html :
156.31 - It's even needed for glibc CVS, AFAICS.
156.32 - The patch hunk which modifies glibc.new/sysdeps/arm/bits/endian.h
156.33 - (currently at version 1.4) is only needed for proper VFP operation.
156.34 - But the hunk which modifies sysdeps/arm/gmp-mparam.h, and the hunk
156.35 - that deletes sysdeps/arm/ieee754.h (yes, this IS correct), are needed
156.36 - for proper operation of *any* FP model on big endian ARM.
156.37 -
156.38 -See also discussion in followups to
156.39 -http://sources.redhat.com/ml/crossgcc/2004-05/msg00245.html)
156.40 -
156.41 -Message-ID: <276985760.37584@eyou.com>
156.42 -Received: from unknown (HELO eyou.com) (172.16.2.2)
156.43 - by 0.0.0.0 with SMTP; Tue, 17 Feb 2004 10:42:40 +0800
156.44 -Received: (qmail 8238 invoked by uid 65534); 17 Feb 2004 10:42:38 +0800
156.45 -Date: 17 Feb 2004 10:42:38 +0800
156.46 -Message-ID: <20040217104238.8237.qmail@eyou.com>
156.47 -From: "add" <addsub@eyou.com>
156.48 -To: dank@kegel.com
156.49 -Reply-To: "add" <addsub@eyou.com>
156.50 -Subject: Re: problem while building arm vfp softfloat gcc `
156.51 -
156.52 -Hi, Dan, This is a patch I applied to my glibc-2.3.2, then my softfloat
156.53 -toolchain can printf("%f\n",1.0). So you may have a try of this
156.54 -
156.55 -
156.56 -diff -uNrp glibc.old/sysdeps/arm/bits/endian.h glibc.new/sysdeps/arm/bits/endian.h
156.57 ---- glibc.old/sysdeps/arm/bits/endian.h 1999-04-12 11:59:13.000000000 -0400
156.58 -+++ glibc.new/sysdeps/arm/bits/endian.h 2004-02-12 09:15:13.000000000 -0500
156.59 -@@ -9,4 +9,9 @@
156.60 - #else
156.61 - #define __BYTE_ORDER __LITTLE_ENDIAN
156.62 - #endif
156.63 -+
156.64 -+#ifdef __VFP_FP__
156.65 -+#define __FLOAT_WORD_ORDER __BYTE_ORDER
156.66 -+#else
156.67 - #define __FLOAT_WORD_ORDER __BIG_ENDIAN
156.68 -+#endif
156.69 -diff -uNrp glibc.old/sysdeps/arm/gmp-mparam.h glibc.new/sysdeps/arm/gmp-mparam.h
156.70 ---- glibc.old/sysdeps/arm/gmp-mparam.h 2001-07-07 15:21:19.000000000 -0400
156.71 -+++ glibc.new/sysdeps/arm/gmp-mparam.h 2004-02-12 09:15:13.000000000 -0500
156.72 -@@ -26,5 +26,13 @@ MA 02111-1307, USA. */
156.73 - #define BITS_PER_SHORTINT 16
156.74 - #define BITS_PER_CHAR 8
156.75 -
156.76 --#define IEEE_DOUBLE_BIG_ENDIAN 0
156.77 --#define IEEE_DOUBLE_MIXED_ENDIAN 1
156.78 -+#if defined(__ARMEB__)
156.79 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
156.80 -+# define IEEE_DOUBLE_BIG_ENDIAN 1
156.81 -+#elif defined(__VFP_FP__)
156.82 -+# define IEEE_DOUBLE_MIXED_ENDIAN 0
156.83 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
156.84 -+#else
156.85 -+# define IEEE_DOUBLE_BIG_ENDIAN 0
156.86 -+# define IEEE_DOUBLE_MIXED_ENDIAN 1
156.87 -+#endif
156.88 -diff -uNrp glibc.old/sysdeps/arm/ieee754.h glibc.new/sysdeps/arm/ieee754.h
156.89 ---- glibc.old/sysdeps/arm/ieee754.h 2001-07-07 15:21:19.000000000 -0400
156.90 -+++ glibc.new/sysdeps/arm/ieee754.h 1969-12-31 19:00:00.000000000 -0500
156.91 -@@ -1,115 +0,0 @@
156.92 --/* Copyright (C) 1992, 1995, 1996, 1998 Free Software Foundation, Inc.
156.93 -- This file is part of the GNU C Library.
156.94 --
156.95 -- The GNU C Library is free software; you can redistribute it and/or
156.96 -- modify it under the terms of the GNU Lesser General Public
156.97 -- License as published by the Free Software Foundation; either
156.98 -- version 2.1 of the License, or (at your option) any later version.
156.99 --
156.100 -- The GNU C Library is distributed in the hope that it will be useful,
156.101 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
156.102 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
156.103 -- Lesser General Public License for more details.
156.104 --
156.105 -- You should have received a copy of the GNU Lesser General Public
156.106 -- License along with the GNU C Library; if not, write to the Free
156.107 -- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
156.108 -- 02111-1307 USA. */
156.109 --
156.110 --#ifndef _IEEE754_H
156.111 --
156.112 --#define _IEEE754_H 1
156.113 --#include <features.h>
156.114 --
156.115 --#include <endian.h>
156.116 --
156.117 --__BEGIN_DECLS
156.118 --
156.119 --union ieee754_float
156.120 -- {
156.121 -- float f;
156.122 --
156.123 -- /* This is the IEEE 754 single-precision format. */
156.124 -- struct
156.125 -- {
156.126 -- unsigned int mantissa:23;
156.127 -- unsigned int exponent:8;
156.128 -- unsigned int negative:1;
156.129 -- } ieee;
156.130 --
156.131 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
156.132 -- struct
156.133 -- {
156.134 -- unsigned int mantissa:22;
156.135 -- unsigned int quiet_nan:1;
156.136 -- unsigned int exponent:8;
156.137 -- unsigned int negative:1;
156.138 -- } ieee_nan;
156.139 -- };
156.140 --
156.141 --#define IEEE754_FLOAT_BIAS 0x7f /* Added to exponent. */
156.142 --
156.143 --
156.144 --union ieee754_double
156.145 -- {
156.146 -- double d;
156.147 --
156.148 -- /* This is the IEEE 754 double-precision format. */
156.149 -- struct
156.150 -- {
156.151 -- unsigned int mantissa0:20;
156.152 -- unsigned int exponent:11;
156.153 -- unsigned int negative:1;
156.154 -- unsigned int mantissa1:32;
156.155 -- } ieee;
156.156 --
156.157 -- /* This format makes it easier to see if a NaN is a signalling NaN. */
156.158 -- struct
156.159 -- {
156.160 -- unsigned int mantissa0:19;
156.161 -- unsigned int quiet_nan:1;
156.162 -- unsigned int exponent:11;
156.163 -- unsigned int negative:1;
156.164 -- unsigned int mantissa1:32;
156.165 -- } ieee_nan;
156.166 -- };
156.167 --
156.168 --#define IEEE754_DOUBLE_BIAS 0x3ff /* Added to exponent. */
156.169 --
156.170 --
156.171 --/* The following two structures are correct for `new' floating point systems but
156.172 -- wrong for the old FPPC. The only solution seems to be to avoid their use on
156.173 -- old hardware. */
156.174 --
156.175 --union ieee854_long_double
156.176 -- {
156.177 -- long double d;
156.178 --
156.179 -- /* This is the IEEE 854 double-extended-precision format. */
156.180 -- struct
156.181 -- {
156.182 -- unsigned int exponent:15;
156.183 -- unsigned int empty:16;
156.184 -- unsigned int negative:1;
156.185 -- unsigned int mantissa1:32;
156.186 -- unsigned int mantissa0:32;
156.187 -- } ieee;
156.188 --
156.189 -- /* This is for NaNs in the IEEE 854 double-extended-precision format. */
156.190 -- struct
156.191 -- {
156.192 -- unsigned int exponent:15;
156.193 -- unsigned int empty:16;
156.194 -- unsigned int negative:1;
156.195 -- unsigned int mantissa1:32;
156.196 -- unsigned int mantissa0:30;
156.197 -- unsigned int quiet_nan:1;
156.198 -- unsigned int one:1;
156.199 -- } ieee_nan;
156.200 -- };
156.201 --
156.202 --#define IEEE854_LONG_DOUBLE_BIAS 0x3fff
156.203 --
156.204 --__END_DECLS
156.205 --
156.206 --#endif /* ieee754.h */
156.207 -
156.208 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
157.1 --- a/patches/glibc/2.3.6/glibc-mips-bootstrap-gcc-header-install.patch Sat Sep 22 17:25:42 2007 +0000
157.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
157.3 @@ -1,37 +0,0 @@
157.4 -http://sourceware.org/ml/crossgcc/2005-05/msg00165.html
157.5 -Fixes a MIPS build problem (unrelated to NPTL)
157.6 -
157.7 -Message-ID: <428E8B24.1000201@realitydiluted.com>
157.8 -Date: Fri, 20 May 2005 20:13:08 -0500
157.9 -From: "Steven J dot Hill" <sjhill at realitydiluted dot com>
157.10 -To: crossgcc at sources dot redhat dot com, toolchain at gentoo dot org,
157.11 - Shay_Gal-On at pmc-sierra dot com, TheNop at gmx dot net
157.12 -Subject: New NPTL patches for crosstools and MIPS NPTL patches....
157.13 -
157.14 -Greetings.
157.15 -
157.16 -I have uploaded the latest NPTL patch for crosstool-0.34. I have also
157.17 -uploaded a tarball of the patches necessary to build a MIPS NPTL
157.18 -cross toolchain. To build a MIPS NPTL toolchain you will need the
157.19 -released version of binutils-2.16 and the absolute latest GCC and
157.20 -glibc code from the HEAD of cvs. Use the 'demo-mips-nptl.sh' script
157.21 -to build the toolchain. Please report bugs or issues to the crossgcc
157.22 -mailing list. Here is the link off of my FTP site:
157.23 -
157.24 - ftp://ftp.realitydiluted.com/crosstools/crosstool-0.34/
157.25 -
157.26 -[Note: BOOTSTRAP_GCC is set by crosstool.sh when invoking make install-headers]
157.27 -
157.28 -diff -ur glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile
157.29 ---- glibc-2.4.0-20050406/sysdeps/mips/mips32/Makefile 2003-03-29 02:15:28.000000000 -0600
157.30 -+++ glibc-2.4.0-20050406-patched/sysdeps/mips/mips32/Makefile 2005-04-12 21:36:51.318837655 -0500
157.31 -@@ -1,3 +1,7 @@
157.32 -+ifeq ($(filter -DBOOTSTRAP_GCC,$(CFLAGS)),)
157.33 - ifeq ($(filter -mabi=32,$(CC)),)
157.34 - CC += -mabi=32
157.35 - endif
157.36 -+else
157.37 -+CC += -D"_MIPS_SZPTR=32"
157.38 -+endif
157.39 -
157.40 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
158.1 --- a/patches/glibc/2.3.6/make-install-lib-all.patch Sat Sep 22 17:25:42 2007 +0000
158.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
158.3 @@ -1,26 +0,0 @@
158.4 -From http://svn.exactcode.de/t2/trunk/package/base/glibc32/make-install-lib-all.patch
158.5 -Rule to install all needed libraries, not just the ones installed by install-lib,
158.6 -yet not install programs.
158.7 -Needed because we can't use the main install target, as we can't build programs before
158.8 -we have the final gcc installed; linking fails because libeh.a is not present,
158.9 -and glibc insists on linking programs with that library.
158.10 -
158.11 -diff -Naur glibc-2.3.4.orig/Makerules glibc-2.3.4/Makerules
158.12 ---- glibc-2.3.4.orig/Makerules 2004-12-15 20:52:39.000000000 +0200
158.13 -+++ glibc-2.3.4/Makerules 2005-02-19 15:16:31.415125176 +0200
158.14 -@@ -844,6 +844,13 @@
158.15 - installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
158.16 - $(inst_libdir)/$(patsubst %,$(libtype$o),\
158.17 - $(libprefix)$(libc-name)))
158.18 -+
158.19 -+install-lib-all: $(inst_slibdir)/libc.so$(libc.so-version) \
158.20 -+ $(inst_slibdir)/libc-$(version).so \
158.21 -+ $(inst_libdir)/libc.so \
158.22 -+ $(inst_libdir)/libc.a \
158.23 -+ install-lib
158.24 -+
158.25 - install: $(installed-libcs)
158.26 - $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
158.27 - $(make-target-directory)
158.28 -
158.29 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
159.1 --- a/patches/glibc/2.3.6/weakalias.patch Sat Sep 22 17:25:42 2007 +0000
159.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
159.3 @@ -1,45 +0,0 @@
159.4 -This one was taken from debian.
159.5 -
159.6 -# DP: Description: Fix __bind redefinition problem
159.7 -# DP: Related bugs:
159.8 -# DP: Dpatch author: Phil Blundell
159.9 -# DP: Patch author: Daniel Jacobowitz
159.10 -# DP: Upstream status: In CVS
159.11 -# DP: Status Details:
159.12 -# DP: Date: 2005-12-25
159.13 -
159.14 -Index: sysdeps/unix/sysv/linux/arm/socket.S
159.15 -===================================================================
159.16 -RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
159.17 -retrieving revision 1.12
159.18 -retrieving revision 1.13
159.19 -diff -u -r1.12 -r1.13
159.20 ---- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S 4 Dec 2004 21:20:16 -0000 1.12
159.21 -+++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S 27 Oct 2005 18:50:12 -0000 1.13
159.22 -@@ -1,4 +1,6 @@
159.23 --/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
159.24 -+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
159.25 -+ Free Software Foundation, Inc.
159.26 -+
159.27 - This file is part of the GNU C Library.
159.28 -
159.29 - The GNU C Library is free software; you can redistribute it and/or
159.30 -@@ -32,7 +34,11 @@
159.31 - The .S files for the other calls just #define socket and #include this. */
159.32 -
159.33 - #ifndef __socket
159.34 -+#ifndef NO_WEAK_ALIAS
159.35 - #define __socket P(__,socket)
159.36 -+#else
159.37 -+#define __socket socket
159.38 -+#endif
159.39 - #endif
159.40 -
159.41 - #define PUSHARGS_1 str a1, [sp, $-4]!
159.42 -@@ -120,4 +126,6 @@
159.43 -
159.44 - PSEUDO_END (__socket)
159.45 -
159.46 -+#ifndef NO_WEAK_ALIAS
159.47 - weak_alias (__socket, socket)
159.48 -+#endif
160.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
160.2 +++ b/patches/glibc/2.5.1/100-fix-pr398.patch Sun Sep 23 17:08:09 2007 +0000
160.3 @@ -0,0 +1,70 @@
160.4 +Fixes error
160.5 +
160.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
160.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
160.8 +e.o] Error 1
160.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
160.10 +822/elf'
160.11 +make[1]: *** [elf/subdir_lib] Error 2
160.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
160.13 +822'
160.14 +make: *** [all] Error 2
160.15 +
160.16 +-----------------
160.17 +
160.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
160.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
160.20 +
160.21 +-----------------
160.22 +
160.23 +CVSROOT: /cvs/glibc
160.24 +Module name: libc
160.25 +Branch: glibc-2_3-branch
160.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
160.27 +
160.28 +Modified files:
160.29 + sysdeps/s390/s390-64: dl-machine.h
160.30 + sysdeps/s390/s390-32: dl-machine.h
160.31 +
160.32 +Log message:
160.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
160.34 +
160.35 + [BZ #398]
160.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
160.37 + directive.
160.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
160.39 +
160.40 +Patches:
160.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
160.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
160.43 +
160.44 +===================================================================
160.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
160.46 +retrieving revision 1.19.4.1
160.47 +retrieving revision 1.19.4.2
160.48 +diff -u -r1.19.4.1 -r1.19.4.2
160.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
160.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
160.51 +@@ -27,6 +27,7 @@
160.52 + #include <sys/param.h>
160.53 + #include <string.h>
160.54 + #include <link.h>
160.55 ++#include <sysdep.h>
160.56 +
160.57 + /* This is an older, now obsolete value. */
160.58 + #define EM_S390_OLD 0xA390
160.59 +===================================================================
160.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
160.61 +retrieving revision 1.20.4.1
160.62 +retrieving revision 1.20.4.2
160.63 +diff -u -r1.20.4.1 -r1.20.4.2
160.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
160.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
160.66 +@@ -27,6 +27,7 @@
160.67 + #include <sys/param.h>
160.68 + #include <string.h>
160.69 + #include <link.h>
160.70 ++#include <sysdep.h>
160.71 +
160.72 + /* This is an older, now obsolete value. */
160.73 + #define EM_S390_OLD 0xA390
161.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
161.2 +++ b/patches/glibc/2.5.1/110-glibc-2.3.5-allow-gcc4-wcstol_l.patch Sun Sep 23 17:08:09 2007 +0000
161.3 @@ -0,0 +1,59 @@
161.4 +Fixes
161.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
161.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
161.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
161.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
161.9 +
161.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
161.11 +%changelog
161.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
161.13 ++- fix build on 64-bit arches with new GCC
161.14 +
161.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
161.16 +Branch: fedora-branch
161.17 +CVS Tags: fedora-glibc-2_3_4-18
161.18 +Changes since 1.4: +2 -0 lines
161.19 +Diff to previous 1.4 (colored)
161.20 +
161.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
161.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
161.23 +
161.24 +
161.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
161.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
161.27 +
161.28 +===================================================================
161.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
161.30 +retrieving revision 1.4
161.31 +retrieving revision 1.4.2.1
161.32 +diff -u -r1.4 -r1.4.2.1
161.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
161.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
161.35 +@@ -8,7 +8,9 @@
161.36 + #undef ____strtoll_l_internal
161.37 + #undef __strtoll_l
161.38 + #undef strtoll_l
161.39 ++#if !UNSIGNED
161.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
161.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
161.42 + weak_alias (__strtol_l, __strtoll_l)
161.43 + weak_alias (__strtol_l, strtoll_l)
161.44 ++#endif
161.45 +===================================================================
161.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
161.47 +retrieving revision 1.4
161.48 +retrieving revision 1.4.2.1
161.49 +diff -u -r1.4 -r1.4.2.1
161.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
161.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
161.52 +@@ -8,6 +8,8 @@
161.53 + #undef ____wcstoll_l_internal
161.54 + #undef __wcstoll_l
161.55 + #undef wcstoll_l
161.56 ++#if !UNSIGNED
161.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
161.58 + weak_alias (__wcstol_l, __wcstoll_l)
161.59 + weak_alias (__wcstol_l, wcstoll_l)
161.60 ++#endif
161.61 +
161.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
162.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
162.2 +++ b/patches/glibc/2.5.1/120-glibc-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
162.3 @@ -0,0 +1,187 @@
162.4 +Fixes
162.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
162.6 +...
162.7 +when building glibc-2.3.x on cygwin
162.8 +
162.9 +Idea from
162.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
162.11 +Basically, make glibc use .oST as suffix for 'object static'
162.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
162.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
162.14 +
162.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
162.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
162.17 +
162.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
162.19 +
162.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
162.21 +Date: Thu, 12 May 2005 08:50:34 +0200
162.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
162.23 +To: Dan Kegel <dank@kegel.com>
162.24 +CC: crossgcc@sources.redhat.com
162.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
162.26 +
162.27 +Hi Dan,
162.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
162.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
162.30 +
162.31 +--
162.32 + Petr Cvachoucek
162.33 + Unicontrols a.s.
162.34 + http://www.unicontrols.cz
162.35 +]
162.36 +
162.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
162.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
162.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
162.40 +@@ -472,7 +472,7 @@
162.41 + # run the linked programs.
162.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
162.43 + $(common-objpfx)libc.so$(libc.so-version) \
162.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
162.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
162.46 + # This is how to find at build-time things that will be installed there.
162.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
162.48 + endif
162.49 +@@ -693,7 +693,7 @@
162.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
162.51 + # to pass different flags for each flavor.
162.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
162.53 +-all-object-suffixes := .o .os .op .og .ob .oS
162.54 ++all-object-suffixes := .o .os .op .og .ob .oST
162.55 + object-suffixes :=
162.56 + CPPFLAGS-.o = $(pic-default)
162.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
162.58 +@@ -749,14 +749,14 @@
162.59 +
162.60 + ifeq (yes,$(build-shared))
162.61 + # Build special library that contains the static-only routines for libc.
162.62 +-object-suffixes-for-libc += .oS
162.63 ++object-suffixes-for-libc += .oST
162.64 +
162.65 + # Must build the routines as PIC, though, because they can end up in (users')
162.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
162.67 + # example, make that processor-specific.
162.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
162.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
162.70 +-libtype.oS = lib%_nonshared.a
162.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
162.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
162.73 ++libtype.oST = lib%_nonshared.a
162.74 + endif
162.75 +
162.76 + # The assembler can generate debug information too.
162.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
162.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
162.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
162.80 +@@ -417,7 +417,7 @@
162.81 + # Bounded pointer thunks are only built for *.ob
162.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
162.83 +
162.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
162.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
162.86 + $(routines) $(aux) $(sysdep_routines)) \
162.87 + $(elide-bp-thunks)
162.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
162.89 +@@ -981,7 +981,7 @@
162.90 + install: $(inst_libdir)/libc.so
162.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
162.92 + $(common-objpfx)libc.so$(libc.so-version) \
162.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
162.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
162.95 + $(libprefix)$(libc-name)) \
162.96 + $(+force)
162.97 + (echo '/* GNU ld script';\
162.98 +@@ -989,7 +989,7 @@
162.99 + echo ' the static library, so try that secondarily. */';\
162.100 + cat $<; \
162.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
162.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
162.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
162.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
162.105 + ) > $@.new
162.106 + mv -f $@.new $@
162.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
162.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
162.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
162.110 +@@ -13,7 +13,7 @@
162.111 +
162.112 + ifneq (,$($(lib)-static-only-routines))
162.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
162.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
162.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
162.116 + endif
162.117 + endif
162.118 +
162.119 +@@ -29,7 +29,7 @@
162.120 +
162.121 + # Add each flavor of library to the lists of things to build and install.
162.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
162.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
162.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
162.125 + $(patsubst %,%$o,$(filter-out \
162.126 + $($(lib)-shared-only-routines),\
162.127 + $(all-$(lib)-routines))))
162.128 +@@ -57,7 +57,7 @@
162.129 +
162.130 +
162.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
162.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
162.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
162.134 + define o-iterator-doit
162.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
162.136 + $(patsubst %,$(objpfx)%$o,\
162.137 +@@ -65,7 +65,7 @@
162.138 + $(all-$(lib)-routines))); \
162.139 + $$(build-extra-lib)
162.140 + endef
162.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
162.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
162.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
162.144 + endif
162.145 +
162.146 +@@ -77,9 +77,9 @@
162.147 + $(build-extra-lib)
162.148 + endif
162.149 +
162.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
162.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
162.152 +- $(patsubst %,$(objpfx)%.oS,\
162.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
162.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
162.155 ++ $(patsubst %,$(objpfx)%.oST,\
162.156 + $(filter $($(lib)-static-only-routines),\
162.157 + $(all-$(lib)-routines)))
162.158 + $(build-extra-lib)
162.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
162.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
162.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
162.162 +@@ -375,7 +375,7 @@
162.163 +
162.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
162.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
162.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
162.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
162.168 + $(libprefix)pthread) \
162.169 + $(+force)
162.170 + (echo '/* GNU ld script';\
162.171 +@@ -383,7 +383,7 @@
162.172 + echo ' the static library, so try that secondarily. */';\
162.173 + cat $<; \
162.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
162.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
162.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
162.177 + ')' \
162.178 + ) > $@.new
162.179 + mv -f $@.new $@
162.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
162.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
162.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
162.183 +@@ -10,4 +10,4 @@
162.184 + ASFLAGS-.op += -Wa,-Av9a
162.185 + ASFLAGS-.og += -Wa,-Av9a
162.186 + ASFLAGS-.ob += -Wa,-Av9a
162.187 +-ASFLAGS-.oS += -Wa,-Av9a
162.188 ++ASFLAGS-.oST += -Wa,-Av9a
162.189 +
162.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
163.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
163.2 +++ b/patches/glibc/2.5.1/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Sep 23 17:08:09 2007 +0000
163.3 @@ -0,0 +1,67 @@
163.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
163.5 +Fixes
163.6 + rtld.c: In function '_dl_start':
163.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
163.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
163.9 +when compiling glibc-2.3.4 with gcc-4.0
163.10 +
163.11 +But see also
163.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
163.13 +and
163.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
163.15 +which seem to propose less radical fixes?
163.16 +
163.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
163.18 +
163.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
163.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
163.21 +@@ -19,47 +19,6 @@
163.22 +
163.23 + #include <elf.h>
163.24 + #include <assert.h>
163.25 +-
163.26 +-#ifdef RESOLVE_MAP
163.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
163.28 +- ElfW(Addr), because not all architectures can assume that the
163.29 +- relocated address is properly aligned, whereas the compiler is
163.30 +- entitled to assume that a pointer to a type is properly aligned for
163.31 +- the type. Even if we cast the pointer back to some other type with
163.32 +- less strict alignment requirements, the compiler might still
163.33 +- remember that the pointer was originally more aligned, thereby
163.34 +- optimizing away alignment tests or using word instructions for
163.35 +- copying memory, breaking the very code written to handle the
163.36 +- unaligned cases. */
163.37 +-# if ! ELF_MACHINE_NO_REL
163.38 +-auto inline void __attribute__((always_inline))
163.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
163.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
163.41 +- void *const reloc_addr);
163.42 +-auto inline void __attribute__((always_inline))
163.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
163.44 +- void *const reloc_addr);
163.45 +-# endif
163.46 +-# if ! ELF_MACHINE_NO_RELA
163.47 +-auto inline void __attribute__((always_inline))
163.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
163.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
163.50 +- void *const reloc_addr);
163.51 +-auto inline void __attribute__((always_inline))
163.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
163.53 +- void *const reloc_addr);
163.54 +-# endif
163.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
163.56 +-auto inline void __attribute__((always_inline))
163.57 +-elf_machine_lazy_rel (struct link_map *map,
163.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
163.59 +-# else
163.60 +-auto inline void __attribute__((always_inline))
163.61 +-elf_machine_lazy_rel (struct link_map *map,
163.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
163.63 +-# endif
163.64 +-#endif
163.65 +-
163.66 + #include <dl-machine.h>
163.67 +
163.68 + #ifndef VERSYMIDX
163.69 +
163.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
164.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
164.2 +++ b/patches/glibc/2.5.1/140-glibc-2.3.6-configure-apple-as.patch Sun Sep 23 17:08:09 2007 +0000
164.3 @@ -0,0 +1,25 @@
164.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
164.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
164.6 +
164.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
164.8 +where the assembler but doesn't understand the --version flag.
164.9 +
164.10 +Fixes the symptom
164.11 +checking whether ld is GNU ld... no
164.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
164.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
164.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
164.15 +
164.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
164.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
164.18 +@@ -4039,7 +4039,7 @@
164.19 + # Found it, now check the version.
164.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
164.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
164.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
164.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
164.24 + case $ac_prog_version in
164.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
164.26 + 2.1[3-9]*)
164.27 +
164.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
165.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
165.2 +++ b/patches/glibc/2.5.1/150-glibc-2.3.6-fix-pr631.patch Sun Sep 23 17:08:09 2007 +0000
165.3 @@ -0,0 +1,45 @@
165.4 +From dank@kegel.com
165.5 +Wed Jun 15 09:12:43 PDT 2005
165.6 +
165.7 +Fixes
165.8 +
165.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
165.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
165.11 +... 53 lines deleted ...
165.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
165.13 +collect2: ld returned 1 exit status
165.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
165.15 +
165.16 +when building glibc with --enable-static-nss.
165.17 +
165.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
165.19 +
165.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
165.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
165.22 +@@ -510,7 +510,7 @@
165.23 +
165.24 + # The static libraries.
165.25 + ifeq (yes,$(build-static))
165.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
165.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
165.28 + else
165.29 + ifeq (yes,$(build-shared))
165.30 + # We can try to link the programs with lib*_pic.a...
165.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
165.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
165.33 +@@ -120,6 +120,13 @@
165.34 + install-bin-script = ldd
165.35 + endif
165.36 +
165.37 ++ifeq (yes,$(build-static-nss))
165.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
165.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
165.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
165.41 ++ $(resolvobjdir)/libresolv.a
165.42 ++endif
165.43 ++
165.44 + others = sprof sln
165.45 + install-bin = sprof
165.46 + others-static = sln
165.47 +
165.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
166.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
166.2 +++ b/patches/glibc/2.5.1/160-glibc-2.4-i686-assembler.patch Sun Sep 23 17:08:09 2007 +0000
166.3 @@ -0,0 +1,38 @@
166.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
166.5 +
166.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
166.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
166.8 +
166.9 +
166.10 +
166.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
166.12 +===================================================================
166.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
166.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
166.15 +@@ -29,6 +29,10 @@
166.16 + #include <dl-sysdep.h>
166.17 + #include <tls.h>
166.18 +
166.19 ++#if defined __i686 && defined __ASSEMBLER__
166.20 ++#undef __i686
166.21 ++#define __i686 __i686
166.22 ++#endif
166.23 +
166.24 + /* For Linux we can use the system call table in the header file
166.25 + /usr/include/asm/unistd.h
166.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
166.27 +===================================================================
166.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
166.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
166.30 +@@ -45,6 +45,11 @@
166.31 + /* Embed an #include to pull in the alignment and .end directives. */
166.32 + asm ("\n#include \"defs.h\"");
166.33 +
166.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
166.35 ++asm ("\n#undef __i686");
166.36 ++asm ("\n#define __i686 __i686");
166.37 ++asm ("\n#endif");
166.38 ++
166.39 + /* The initial common code ends here. */
166.40 + asm ("\n/*@HEADER_ENDS*/");
166.41 +
167.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
167.2 +++ b/patches/glibc/2.5.1/170-glibc-i386-preferred-stack-boundary.patch Sun Sep 23 17:08:09 2007 +0000
167.3 @@ -0,0 +1,18 @@
167.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
167.5 +License: LGPL v2.1
167.6 +
167.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
167.8 +and 2 is not.
167.9 +
167.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
167.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
167.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
167.13 +@@ -36,7 +36,7 @@
167.14 + ifeq ($(subdir),csu)
167.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
167.16 + else
167.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
167.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
167.19 + # Likewise, any function which calls user callbacks
167.20 + uses-callbacks += -mpreferred-stack-boundary=4
167.21 + # Likewise, any stack alignment tests
168.1 --- a/patches/glibc/2.5.1/fix-pr398.patch Sat Sep 22 17:25:42 2007 +0000
168.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
168.3 @@ -1,70 +0,0 @@
168.4 -Fixes error
168.5 -
168.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
168.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
168.8 -e.o] Error 1
168.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
168.10 -822/elf'
168.11 -make[1]: *** [elf/subdir_lib] Error 2
168.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
168.13 -822'
168.14 -make: *** [all] Error 2
168.15 -
168.16 ------------------
168.17 -
168.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
168.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
168.20 -
168.21 ------------------
168.22 -
168.23 -CVSROOT: /cvs/glibc
168.24 -Module name: libc
168.25 -Branch: glibc-2_3-branch
168.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
168.27 -
168.28 -Modified files:
168.29 - sysdeps/s390/s390-64: dl-machine.h
168.30 - sysdeps/s390/s390-32: dl-machine.h
168.31 -
168.32 -Log message:
168.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
168.34 -
168.35 - [BZ #398]
168.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
168.37 - directive.
168.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
168.39 -
168.40 -Patches:
168.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
168.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
168.43 -
168.44 -===================================================================
168.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
168.46 -retrieving revision 1.19.4.1
168.47 -retrieving revision 1.19.4.2
168.48 -diff -u -r1.19.4.1 -r1.19.4.2
168.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
168.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
168.51 -@@ -27,6 +27,7 @@
168.52 - #include <sys/param.h>
168.53 - #include <string.h>
168.54 - #include <link.h>
168.55 -+#include <sysdep.h>
168.56 -
168.57 - /* This is an older, now obsolete value. */
168.58 - #define EM_S390_OLD 0xA390
168.59 -===================================================================
168.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
168.61 -retrieving revision 1.20.4.1
168.62 -retrieving revision 1.20.4.2
168.63 -diff -u -r1.20.4.1 -r1.20.4.2
168.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
168.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
168.66 -@@ -27,6 +27,7 @@
168.67 - #include <sys/param.h>
168.68 - #include <string.h>
168.69 - #include <link.h>
168.70 -+#include <sysdep.h>
168.71 -
168.72 - /* This is an older, now obsolete value. */
168.73 - #define EM_S390_OLD 0xA390
169.1 --- a/patches/glibc/2.5.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch Sat Sep 22 17:25:42 2007 +0000
169.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
169.3 @@ -1,59 +0,0 @@
169.4 -Fixes
169.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
169.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
169.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
169.8 -make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
169.9 -
169.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
169.11 -%changelog
169.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
169.13 -+- fix build on 64-bit arches with new GCC
169.14 -
169.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
169.16 -Branch: fedora-branch
169.17 -CVS Tags: fedora-glibc-2_3_4-18
169.18 -Changes since 1.4: +2 -0 lines
169.19 -Diff to previous 1.4 (colored)
169.20 -
169.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
169.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
169.23 -
169.24 -
169.25 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
169.26 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
169.27 -
169.28 -===================================================================
169.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
169.30 -retrieving revision 1.4
169.31 -retrieving revision 1.4.2.1
169.32 -diff -u -r1.4 -r1.4.2.1
169.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
169.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
169.35 -@@ -8,7 +8,9 @@
169.36 - #undef ____strtoll_l_internal
169.37 - #undef __strtoll_l
169.38 - #undef strtoll_l
169.39 -+#if !UNSIGNED
169.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
169.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
169.42 - weak_alias (__strtol_l, __strtoll_l)
169.43 - weak_alias (__strtol_l, strtoll_l)
169.44 -+#endif
169.45 -===================================================================
169.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
169.47 -retrieving revision 1.4
169.48 -retrieving revision 1.4.2.1
169.49 -diff -u -r1.4 -r1.4.2.1
169.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
169.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
169.52 -@@ -8,6 +8,8 @@
169.53 - #undef ____wcstoll_l_internal
169.54 - #undef __wcstoll_l
169.55 - #undef wcstoll_l
169.56 -+#if !UNSIGNED
169.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
169.58 - weak_alias (__wcstol_l, __wcstoll_l)
169.59 - weak_alias (__wcstol_l, wcstoll_l)
169.60 -+#endif
169.61 -
169.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
170.1 --- a/patches/glibc/2.5.1/glibc-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
170.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
170.3 @@ -1,187 +0,0 @@
170.4 -Fixes
170.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
170.6 -...
170.7 -when building glibc-2.3.x on cygwin
170.8 -
170.9 -Idea from
170.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
170.11 -Basically, make glibc use .oST as suffix for 'object static'
170.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
170.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
170.14 -
170.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
170.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
170.17 -
170.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
170.19 -
170.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
170.21 -Date: Thu, 12 May 2005 08:50:34 +0200
170.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
170.23 -To: Dan Kegel <dank@kegel.com>
170.24 -CC: crossgcc@sources.redhat.com
170.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
170.26 -
170.27 -Hi Dan,
170.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
170.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
170.30 -
170.31 ---
170.32 - Petr Cvachoucek
170.33 - Unicontrols a.s.
170.34 - http://www.unicontrols.cz
170.35 -]
170.36 -
170.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
170.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
170.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
170.40 -@@ -472,7 +472,7 @@
170.41 - # run the linked programs.
170.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
170.43 - $(common-objpfx)libc.so$(libc.so-version) \
170.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
170.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
170.46 - # This is how to find at build-time things that will be installed there.
170.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
170.48 - endif
170.49 -@@ -693,7 +693,7 @@
170.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
170.51 - # to pass different flags for each flavor.
170.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
170.53 --all-object-suffixes := .o .os .op .og .ob .oS
170.54 -+all-object-suffixes := .o .os .op .og .ob .oST
170.55 - object-suffixes :=
170.56 - CPPFLAGS-.o = $(pic-default)
170.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
170.58 -@@ -749,14 +749,14 @@
170.59 -
170.60 - ifeq (yes,$(build-shared))
170.61 - # Build special library that contains the static-only routines for libc.
170.62 --object-suffixes-for-libc += .oS
170.63 -+object-suffixes-for-libc += .oST
170.64 -
170.65 - # Must build the routines as PIC, though, because they can end up in (users')
170.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
170.67 - # example, make that processor-specific.
170.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
170.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
170.70 --libtype.oS = lib%_nonshared.a
170.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
170.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
170.73 -+libtype.oST = lib%_nonshared.a
170.74 - endif
170.75 -
170.76 - # The assembler can generate debug information too.
170.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
170.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
170.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
170.80 -@@ -417,7 +417,7 @@
170.81 - # Bounded pointer thunks are only built for *.ob
170.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
170.83 -
170.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
170.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
170.86 - $(routines) $(aux) $(sysdep_routines)) \
170.87 - $(elide-bp-thunks)
170.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
170.89 -@@ -981,7 +981,7 @@
170.90 - install: $(inst_libdir)/libc.so
170.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
170.92 - $(common-objpfx)libc.so$(libc.so-version) \
170.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
170.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
170.95 - $(libprefix)$(libc-name)) \
170.96 - $(+force)
170.97 - (echo '/* GNU ld script';\
170.98 -@@ -989,7 +989,7 @@
170.99 - echo ' the static library, so try that secondarily. */';\
170.100 - cat $<; \
170.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
170.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
170.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
170.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
170.105 - ) > $@.new
170.106 - mv -f $@.new $@
170.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
170.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
170.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
170.110 -@@ -13,7 +13,7 @@
170.111 -
170.112 - ifneq (,$($(lib)-static-only-routines))
170.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
170.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
170.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
170.116 - endif
170.117 - endif
170.118 -
170.119 -@@ -29,7 +29,7 @@
170.120 -
170.121 - # Add each flavor of library to the lists of things to build and install.
170.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
170.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
170.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
170.125 - $(patsubst %,%$o,$(filter-out \
170.126 - $($(lib)-shared-only-routines),\
170.127 - $(all-$(lib)-routines))))
170.128 -@@ -57,7 +57,7 @@
170.129 -
170.130 -
170.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
170.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
170.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
170.134 - define o-iterator-doit
170.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
170.136 - $(patsubst %,$(objpfx)%$o,\
170.137 -@@ -65,7 +65,7 @@
170.138 - $(all-$(lib)-routines))); \
170.139 - $$(build-extra-lib)
170.140 - endef
170.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
170.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
170.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
170.144 - endif
170.145 -
170.146 -@@ -77,9 +77,9 @@
170.147 - $(build-extra-lib)
170.148 - endif
170.149 -
170.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
170.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
170.152 -- $(patsubst %,$(objpfx)%.oS,\
170.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
170.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
170.155 -+ $(patsubst %,$(objpfx)%.oST,\
170.156 - $(filter $($(lib)-static-only-routines),\
170.157 - $(all-$(lib)-routines)))
170.158 - $(build-extra-lib)
170.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
170.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
170.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
170.162 -@@ -375,7 +375,7 @@
170.163 -
170.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
170.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
170.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
170.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
170.168 - $(libprefix)pthread) \
170.169 - $(+force)
170.170 - (echo '/* GNU ld script';\
170.171 -@@ -383,7 +383,7 @@
170.172 - echo ' the static library, so try that secondarily. */';\
170.173 - cat $<; \
170.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
170.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
170.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
170.177 - ')' \
170.178 - ) > $@.new
170.179 - mv -f $@.new $@
170.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
170.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
170.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
170.183 -@@ -10,4 +10,4 @@
170.184 - ASFLAGS-.op += -Wa,-Av9a
170.185 - ASFLAGS-.og += -Wa,-Av9a
170.186 - ASFLAGS-.ob += -Wa,-Av9a
170.187 --ASFLAGS-.oS += -Wa,-Av9a
170.188 -+ASFLAGS-.oST += -Wa,-Av9a
170.189 -
170.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
171.1 --- a/patches/glibc/2.5.1/glibc-2.3.6-allow-gcc-4.0-elf.patch Sat Sep 22 17:25:42 2007 +0000
171.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
171.3 @@ -1,67 +0,0 @@
171.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
171.5 -Fixes
171.6 - rtld.c: In function '_dl_start':
171.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
171.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
171.9 -when compiling glibc-2.3.4 with gcc-4.0
171.10 -
171.11 -But see also
171.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
171.13 -and
171.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
171.15 -which seem to propose less radical fixes?
171.16 -
171.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
171.18 -
171.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
171.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
171.21 -@@ -19,47 +19,6 @@
171.22 -
171.23 - #include <elf.h>
171.24 - #include <assert.h>
171.25 --
171.26 --#ifdef RESOLVE_MAP
171.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
171.28 -- ElfW(Addr), because not all architectures can assume that the
171.29 -- relocated address is properly aligned, whereas the compiler is
171.30 -- entitled to assume that a pointer to a type is properly aligned for
171.31 -- the type. Even if we cast the pointer back to some other type with
171.32 -- less strict alignment requirements, the compiler might still
171.33 -- remember that the pointer was originally more aligned, thereby
171.34 -- optimizing away alignment tests or using word instructions for
171.35 -- copying memory, breaking the very code written to handle the
171.36 -- unaligned cases. */
171.37 --# if ! ELF_MACHINE_NO_REL
171.38 --auto inline void __attribute__((always_inline))
171.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
171.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
171.41 -- void *const reloc_addr);
171.42 --auto inline void __attribute__((always_inline))
171.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
171.44 -- void *const reloc_addr);
171.45 --# endif
171.46 --# if ! ELF_MACHINE_NO_RELA
171.47 --auto inline void __attribute__((always_inline))
171.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
171.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
171.50 -- void *const reloc_addr);
171.51 --auto inline void __attribute__((always_inline))
171.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
171.53 -- void *const reloc_addr);
171.54 --# endif
171.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
171.56 --auto inline void __attribute__((always_inline))
171.57 --elf_machine_lazy_rel (struct link_map *map,
171.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
171.59 --# else
171.60 --auto inline void __attribute__((always_inline))
171.61 --elf_machine_lazy_rel (struct link_map *map,
171.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
171.63 --# endif
171.64 --#endif
171.65 --
171.66 - #include <dl-machine.h>
171.67 -
171.68 - #ifndef VERSYMIDX
171.69 -
171.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
172.1 --- a/patches/glibc/2.5.1/glibc-2.3.6-configure-apple-as.patch Sat Sep 22 17:25:42 2007 +0000
172.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
172.3 @@ -1,25 +0,0 @@
172.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
172.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
172.6 -
172.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
172.8 -where the assembler but doesn't understand the --version flag.
172.9 -
172.10 -Fixes the symptom
172.11 -checking whether ld is GNU ld... no
172.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
172.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
172.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
172.15 -
172.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
172.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
172.18 -@@ -4039,7 +4039,7 @@
172.19 - # Found it, now check the version.
172.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
172.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
172.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
172.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
172.24 - case $ac_prog_version in
172.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
172.26 - 2.1[3-9]*)
172.27 -
172.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
173.1 --- a/patches/glibc/2.5.1/glibc-2.3.6-fix-pr631.patch Sat Sep 22 17:25:42 2007 +0000
173.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
173.3 @@ -1,45 +0,0 @@
173.4 -From dank@kegel.com
173.5 -Wed Jun 15 09:12:43 PDT 2005
173.6 -
173.7 -Fixes
173.8 -
173.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
173.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
173.11 -... 53 lines deleted ...
173.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
173.13 -collect2: ld returned 1 exit status
173.14 -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
173.15 -
173.16 -when building glibc with --enable-static-nss.
173.17 -
173.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
173.19 -
173.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
173.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
173.22 -@@ -510,7 +510,7 @@
173.23 -
173.24 - # The static libraries.
173.25 - ifeq (yes,$(build-static))
173.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
173.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
173.28 - else
173.29 - ifeq (yes,$(build-shared))
173.30 - # We can try to link the programs with lib*_pic.a...
173.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
173.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
173.33 -@@ -120,6 +120,13 @@
173.34 - install-bin-script = ldd
173.35 - endif
173.36 -
173.37 -+ifeq (yes,$(build-static-nss))
173.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
173.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
173.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
173.41 -+ $(resolvobjdir)/libresolv.a
173.42 -+endif
173.43 -+
173.44 - others = sprof sln
173.45 - install-bin = sprof
173.46 - others-static = sln
173.47 -
173.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
174.1 --- a/patches/glibc/2.5.1/glibc-2.4-i686-assembler.patch Sat Sep 22 17:25:42 2007 +0000
174.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
174.3 @@ -1,38 +0,0 @@
174.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
174.5 -
174.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
174.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
174.8 -
174.9 -
174.10 -
174.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
174.12 -===================================================================
174.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
174.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
174.15 -@@ -29,6 +29,10 @@
174.16 - #include <dl-sysdep.h>
174.17 - #include <tls.h>
174.18 -
174.19 -+#if defined __i686 && defined __ASSEMBLER__
174.20 -+#undef __i686
174.21 -+#define __i686 __i686
174.22 -+#endif
174.23 -
174.24 - /* For Linux we can use the system call table in the header file
174.25 - /usr/include/asm/unistd.h
174.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
174.27 -===================================================================
174.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
174.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
174.30 -@@ -45,6 +45,11 @@
174.31 - /* Embed an #include to pull in the alignment and .end directives. */
174.32 - asm ("\n#include \"defs.h\"");
174.33 -
174.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
174.35 -+asm ("\n#undef __i686");
174.36 -+asm ("\n#define __i686 __i686");
174.37 -+asm ("\n#endif");
174.38 -+
174.39 - /* The initial common code ends here. */
174.40 - asm ("\n/*@HEADER_ENDS*/");
174.41 -
175.1 --- a/patches/glibc/2.5.1/glibc-i386-preferred-stack-boundary.patch Sat Sep 22 17:25:42 2007 +0000
175.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
175.3 @@ -1,18 +0,0 @@
175.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
175.5 -License: LGPL v2.1
175.6 -
175.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
175.8 -and 2 is not.
175.9 -
175.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
175.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
175.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
175.13 -@@ -36,7 +36,7 @@
175.14 - ifeq ($(subdir),csu)
175.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
175.16 - else
175.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
175.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
175.19 - # Likewise, any function which calls user callbacks
175.20 - uses-callbacks += -mpreferred-stack-boundary=4
175.21 - # Likewise, any stack alignment tests
176.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
176.2 +++ b/patches/glibc/2.5/100-fix-pr398.patch Sun Sep 23 17:08:09 2007 +0000
176.3 @@ -0,0 +1,70 @@
176.4 +Fixes error
176.5 +
176.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
176.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
176.8 +e.o] Error 1
176.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
176.10 +822/elf'
176.11 +make[1]: *** [elf/subdir_lib] Error 2
176.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
176.13 +822'
176.14 +make: *** [all] Error 2
176.15 +
176.16 +-----------------
176.17 +
176.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
176.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
176.20 +
176.21 +-----------------
176.22 +
176.23 +CVSROOT: /cvs/glibc
176.24 +Module name: libc
176.25 +Branch: glibc-2_3-branch
176.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
176.27 +
176.28 +Modified files:
176.29 + sysdeps/s390/s390-64: dl-machine.h
176.30 + sysdeps/s390/s390-32: dl-machine.h
176.31 +
176.32 +Log message:
176.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
176.34 +
176.35 + [BZ #398]
176.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
176.37 + directive.
176.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
176.39 +
176.40 +Patches:
176.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
176.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
176.43 +
176.44 +===================================================================
176.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
176.46 +retrieving revision 1.19.4.1
176.47 +retrieving revision 1.19.4.2
176.48 +diff -u -r1.19.4.1 -r1.19.4.2
176.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
176.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
176.51 +@@ -27,6 +27,7 @@
176.52 + #include <sys/param.h>
176.53 + #include <string.h>
176.54 + #include <link.h>
176.55 ++#include <sysdep.h>
176.56 +
176.57 + /* This is an older, now obsolete value. */
176.58 + #define EM_S390_OLD 0xA390
176.59 +===================================================================
176.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
176.61 +retrieving revision 1.20.4.1
176.62 +retrieving revision 1.20.4.2
176.63 +diff -u -r1.20.4.1 -r1.20.4.2
176.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
176.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
176.66 +@@ -27,6 +27,7 @@
176.67 + #include <sys/param.h>
176.68 + #include <string.h>
176.69 + #include <link.h>
176.70 ++#include <sysdep.h>
176.71 +
176.72 + /* This is an older, now obsolete value. */
176.73 + #define EM_S390_OLD 0xA390
177.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
177.2 +++ b/patches/glibc/2.5/110-glibc-2.3.5-allow-gcc4-wcstol_l.patch Sun Sep 23 17:08:09 2007 +0000
177.3 @@ -0,0 +1,59 @@
177.4 +Fixes
177.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
177.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
177.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
177.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
177.9 +
177.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
177.11 +%changelog
177.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
177.13 ++- fix build on 64-bit arches with new GCC
177.14 +
177.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
177.16 +Branch: fedora-branch
177.17 +CVS Tags: fedora-glibc-2_3_4-18
177.18 +Changes since 1.4: +2 -0 lines
177.19 +Diff to previous 1.4 (colored)
177.20 +
177.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
177.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
177.23 +
177.24 +
177.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
177.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
177.27 +
177.28 +===================================================================
177.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
177.30 +retrieving revision 1.4
177.31 +retrieving revision 1.4.2.1
177.32 +diff -u -r1.4 -r1.4.2.1
177.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
177.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
177.35 +@@ -8,7 +8,9 @@
177.36 + #undef ____strtoll_l_internal
177.37 + #undef __strtoll_l
177.38 + #undef strtoll_l
177.39 ++#if !UNSIGNED
177.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
177.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
177.42 + weak_alias (__strtol_l, __strtoll_l)
177.43 + weak_alias (__strtol_l, strtoll_l)
177.44 ++#endif
177.45 +===================================================================
177.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
177.47 +retrieving revision 1.4
177.48 +retrieving revision 1.4.2.1
177.49 +diff -u -r1.4 -r1.4.2.1
177.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
177.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
177.52 +@@ -8,6 +8,8 @@
177.53 + #undef ____wcstoll_l_internal
177.54 + #undef __wcstoll_l
177.55 + #undef wcstoll_l
177.56 ++#if !UNSIGNED
177.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
177.58 + weak_alias (__wcstol_l, __wcstoll_l)
177.59 + weak_alias (__wcstol_l, wcstoll_l)
177.60 ++#endif
177.61 +
177.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
178.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
178.2 +++ b/patches/glibc/2.5/120-glibc-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
178.3 @@ -0,0 +1,187 @@
178.4 +Fixes
178.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
178.6 +...
178.7 +when building glibc-2.3.x on cygwin
178.8 +
178.9 +Idea from
178.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
178.11 +Basically, make glibc use .oST as suffix for 'object static'
178.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
178.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
178.14 +
178.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
178.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
178.17 +
178.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
178.19 +
178.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
178.21 +Date: Thu, 12 May 2005 08:50:34 +0200
178.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
178.23 +To: Dan Kegel <dank@kegel.com>
178.24 +CC: crossgcc@sources.redhat.com
178.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
178.26 +
178.27 +Hi Dan,
178.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
178.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
178.30 +
178.31 +--
178.32 + Petr Cvachoucek
178.33 + Unicontrols a.s.
178.34 + http://www.unicontrols.cz
178.35 +]
178.36 +
178.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
178.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
178.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
178.40 +@@ -472,7 +472,7 @@
178.41 + # run the linked programs.
178.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
178.43 + $(common-objpfx)libc.so$(libc.so-version) \
178.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
178.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
178.46 + # This is how to find at build-time things that will be installed there.
178.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
178.48 + endif
178.49 +@@ -693,7 +693,7 @@
178.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
178.51 + # to pass different flags for each flavor.
178.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
178.53 +-all-object-suffixes := .o .os .op .og .ob .oS
178.54 ++all-object-suffixes := .o .os .op .og .ob .oST
178.55 + object-suffixes :=
178.56 + CPPFLAGS-.o = $(pic-default)
178.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
178.58 +@@ -749,14 +749,14 @@
178.59 +
178.60 + ifeq (yes,$(build-shared))
178.61 + # Build special library that contains the static-only routines for libc.
178.62 +-object-suffixes-for-libc += .oS
178.63 ++object-suffixes-for-libc += .oST
178.64 +
178.65 + # Must build the routines as PIC, though, because they can end up in (users')
178.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
178.67 + # example, make that processor-specific.
178.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
178.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
178.70 +-libtype.oS = lib%_nonshared.a
178.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
178.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
178.73 ++libtype.oST = lib%_nonshared.a
178.74 + endif
178.75 +
178.76 + # The assembler can generate debug information too.
178.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
178.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
178.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
178.80 +@@ -417,7 +417,7 @@
178.81 + # Bounded pointer thunks are only built for *.ob
178.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
178.83 +
178.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
178.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
178.86 + $(routines) $(aux) $(sysdep_routines)) \
178.87 + $(elide-bp-thunks)
178.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
178.89 +@@ -981,7 +981,7 @@
178.90 + install: $(inst_libdir)/libc.so
178.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
178.92 + $(common-objpfx)libc.so$(libc.so-version) \
178.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
178.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
178.95 + $(libprefix)$(libc-name)) \
178.96 + $(+force)
178.97 + (echo '/* GNU ld script';\
178.98 +@@ -989,7 +989,7 @@
178.99 + echo ' the static library, so try that secondarily. */';\
178.100 + cat $<; \
178.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
178.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
178.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
178.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
178.105 + ) > $@.new
178.106 + mv -f $@.new $@
178.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
178.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
178.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
178.110 +@@ -13,7 +13,7 @@
178.111 +
178.112 + ifneq (,$($(lib)-static-only-routines))
178.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
178.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
178.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
178.116 + endif
178.117 + endif
178.118 +
178.119 +@@ -29,7 +29,7 @@
178.120 +
178.121 + # Add each flavor of library to the lists of things to build and install.
178.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
178.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
178.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
178.125 + $(patsubst %,%$o,$(filter-out \
178.126 + $($(lib)-shared-only-routines),\
178.127 + $(all-$(lib)-routines))))
178.128 +@@ -57,7 +57,7 @@
178.129 +
178.130 +
178.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
178.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
178.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
178.134 + define o-iterator-doit
178.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
178.136 + $(patsubst %,$(objpfx)%$o,\
178.137 +@@ -65,7 +65,7 @@
178.138 + $(all-$(lib)-routines))); \
178.139 + $$(build-extra-lib)
178.140 + endef
178.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
178.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
178.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
178.144 + endif
178.145 +
178.146 +@@ -77,9 +77,9 @@
178.147 + $(build-extra-lib)
178.148 + endif
178.149 +
178.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
178.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
178.152 +- $(patsubst %,$(objpfx)%.oS,\
178.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
178.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
178.155 ++ $(patsubst %,$(objpfx)%.oST,\
178.156 + $(filter $($(lib)-static-only-routines),\
178.157 + $(all-$(lib)-routines)))
178.158 + $(build-extra-lib)
178.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
178.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
178.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
178.162 +@@ -375,7 +375,7 @@
178.163 +
178.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
178.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
178.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
178.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
178.168 + $(libprefix)pthread) \
178.169 + $(+force)
178.170 + (echo '/* GNU ld script';\
178.171 +@@ -383,7 +383,7 @@
178.172 + echo ' the static library, so try that secondarily. */';\
178.173 + cat $<; \
178.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
178.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
178.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
178.177 + ')' \
178.178 + ) > $@.new
178.179 + mv -f $@.new $@
178.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
178.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
178.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
178.183 +@@ -10,4 +10,4 @@
178.184 + ASFLAGS-.op += -Wa,-Av9a
178.185 + ASFLAGS-.og += -Wa,-Av9a
178.186 + ASFLAGS-.ob += -Wa,-Av9a
178.187 +-ASFLAGS-.oS += -Wa,-Av9a
178.188 ++ASFLAGS-.oST += -Wa,-Av9a
178.189 +
178.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
179.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
179.2 +++ b/patches/glibc/2.5/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Sep 23 17:08:09 2007 +0000
179.3 @@ -0,0 +1,67 @@
179.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
179.5 +Fixes
179.6 + rtld.c: In function '_dl_start':
179.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
179.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
179.9 +when compiling glibc-2.3.4 with gcc-4.0
179.10 +
179.11 +But see also
179.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
179.13 +and
179.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
179.15 +which seem to propose less radical fixes?
179.16 +
179.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
179.18 +
179.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
179.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
179.21 +@@ -19,47 +19,6 @@
179.22 +
179.23 + #include <elf.h>
179.24 + #include <assert.h>
179.25 +-
179.26 +-#ifdef RESOLVE_MAP
179.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
179.28 +- ElfW(Addr), because not all architectures can assume that the
179.29 +- relocated address is properly aligned, whereas the compiler is
179.30 +- entitled to assume that a pointer to a type is properly aligned for
179.31 +- the type. Even if we cast the pointer back to some other type with
179.32 +- less strict alignment requirements, the compiler might still
179.33 +- remember that the pointer was originally more aligned, thereby
179.34 +- optimizing away alignment tests or using word instructions for
179.35 +- copying memory, breaking the very code written to handle the
179.36 +- unaligned cases. */
179.37 +-# if ! ELF_MACHINE_NO_REL
179.38 +-auto inline void __attribute__((always_inline))
179.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
179.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
179.41 +- void *const reloc_addr);
179.42 +-auto inline void __attribute__((always_inline))
179.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
179.44 +- void *const reloc_addr);
179.45 +-# endif
179.46 +-# if ! ELF_MACHINE_NO_RELA
179.47 +-auto inline void __attribute__((always_inline))
179.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
179.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
179.50 +- void *const reloc_addr);
179.51 +-auto inline void __attribute__((always_inline))
179.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
179.53 +- void *const reloc_addr);
179.54 +-# endif
179.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
179.56 +-auto inline void __attribute__((always_inline))
179.57 +-elf_machine_lazy_rel (struct link_map *map,
179.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
179.59 +-# else
179.60 +-auto inline void __attribute__((always_inline))
179.61 +-elf_machine_lazy_rel (struct link_map *map,
179.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
179.63 +-# endif
179.64 +-#endif
179.65 +-
179.66 + #include <dl-machine.h>
179.67 +
179.68 + #ifndef VERSYMIDX
179.69 +
179.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
180.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
180.2 +++ b/patches/glibc/2.5/140-glibc-2.3.6-configure-apple-as.patch Sun Sep 23 17:08:09 2007 +0000
180.3 @@ -0,0 +1,25 @@
180.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
180.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
180.6 +
180.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
180.8 +where the assembler but doesn't understand the --version flag.
180.9 +
180.10 +Fixes the symptom
180.11 +checking whether ld is GNU ld... no
180.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
180.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
180.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
180.15 +
180.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
180.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
180.18 +@@ -4039,7 +4039,7 @@
180.19 + # Found it, now check the version.
180.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
180.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
180.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
180.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
180.24 + case $ac_prog_version in
180.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
180.26 + 2.1[3-9]*)
180.27 +
180.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
181.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
181.2 +++ b/patches/glibc/2.5/150-glibc-2.3.6-fix-pr631.patch Sun Sep 23 17:08:09 2007 +0000
181.3 @@ -0,0 +1,45 @@
181.4 +From dank@kegel.com
181.5 +Wed Jun 15 09:12:43 PDT 2005
181.6 +
181.7 +Fixes
181.8 +
181.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
181.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
181.11 +... 53 lines deleted ...
181.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
181.13 +collect2: ld returned 1 exit status
181.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
181.15 +
181.16 +when building glibc with --enable-static-nss.
181.17 +
181.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
181.19 +
181.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
181.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
181.22 +@@ -510,7 +510,7 @@
181.23 +
181.24 + # The static libraries.
181.25 + ifeq (yes,$(build-static))
181.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
181.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
181.28 + else
181.29 + ifeq (yes,$(build-shared))
181.30 + # We can try to link the programs with lib*_pic.a...
181.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
181.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
181.33 +@@ -120,6 +120,13 @@
181.34 + install-bin-script = ldd
181.35 + endif
181.36 +
181.37 ++ifeq (yes,$(build-static-nss))
181.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
181.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
181.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
181.41 ++ $(resolvobjdir)/libresolv.a
181.42 ++endif
181.43 ++
181.44 + others = sprof sln
181.45 + install-bin = sprof
181.46 + others-static = sln
181.47 +
181.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
182.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
182.2 +++ b/patches/glibc/2.5/160-glibc-2.4-i686-assembler.patch Sun Sep 23 17:08:09 2007 +0000
182.3 @@ -0,0 +1,38 @@
182.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
182.5 +
182.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
182.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
182.8 +
182.9 +
182.10 +
182.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
182.12 +===================================================================
182.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
182.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
182.15 +@@ -29,6 +29,10 @@
182.16 + #include <dl-sysdep.h>
182.17 + #include <tls.h>
182.18 +
182.19 ++#if defined __i686 && defined __ASSEMBLER__
182.20 ++#undef __i686
182.21 ++#define __i686 __i686
182.22 ++#endif
182.23 +
182.24 + /* For Linux we can use the system call table in the header file
182.25 + /usr/include/asm/unistd.h
182.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
182.27 +===================================================================
182.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
182.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
182.30 +@@ -45,6 +45,11 @@
182.31 + /* Embed an #include to pull in the alignment and .end directives. */
182.32 + asm ("\n#include \"defs.h\"");
182.33 +
182.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
182.35 ++asm ("\n#undef __i686");
182.36 ++asm ("\n#define __i686 __i686");
182.37 ++asm ("\n#endif");
182.38 ++
182.39 + /* The initial common code ends here. */
182.40 + asm ("\n/*@HEADER_ENDS*/");
182.41 +
183.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
183.2 +++ b/patches/glibc/2.5/170-glibc-i386-preferred-stack-boundary.patch Sun Sep 23 17:08:09 2007 +0000
183.3 @@ -0,0 +1,18 @@
183.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
183.5 +License: LGPL v2.1
183.6 +
183.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
183.8 +and 2 is not.
183.9 +
183.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
183.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
183.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
183.13 +@@ -36,7 +36,7 @@
183.14 + ifeq ($(subdir),csu)
183.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
183.16 + else
183.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
183.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
183.19 + # Likewise, any function which calls user callbacks
183.20 + uses-callbacks += -mpreferred-stack-boundary=4
183.21 + # Likewise, any stack alignment tests
184.1 --- a/patches/glibc/2.5/fix-pr398.patch Sat Sep 22 17:25:42 2007 +0000
184.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
184.3 @@ -1,70 +0,0 @@
184.4 -Fixes error
184.5 -
184.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
184.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
184.8 -e.o] Error 1
184.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
184.10 -822/elf'
184.11 -make[1]: *** [elf/subdir_lib] Error 2
184.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
184.13 -822'
184.14 -make: *** [all] Error 2
184.15 -
184.16 ------------------
184.17 -
184.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
184.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
184.20 -
184.21 ------------------
184.22 -
184.23 -CVSROOT: /cvs/glibc
184.24 -Module name: libc
184.25 -Branch: glibc-2_3-branch
184.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
184.27 -
184.28 -Modified files:
184.29 - sysdeps/s390/s390-64: dl-machine.h
184.30 - sysdeps/s390/s390-32: dl-machine.h
184.31 -
184.32 -Log message:
184.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
184.34 -
184.35 - [BZ #398]
184.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
184.37 - directive.
184.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
184.39 -
184.40 -Patches:
184.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
184.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
184.43 -
184.44 -===================================================================
184.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
184.46 -retrieving revision 1.19.4.1
184.47 -retrieving revision 1.19.4.2
184.48 -diff -u -r1.19.4.1 -r1.19.4.2
184.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
184.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
184.51 -@@ -27,6 +27,7 @@
184.52 - #include <sys/param.h>
184.53 - #include <string.h>
184.54 - #include <link.h>
184.55 -+#include <sysdep.h>
184.56 -
184.57 - /* This is an older, now obsolete value. */
184.58 - #define EM_S390_OLD 0xA390
184.59 -===================================================================
184.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
184.61 -retrieving revision 1.20.4.1
184.62 -retrieving revision 1.20.4.2
184.63 -diff -u -r1.20.4.1 -r1.20.4.2
184.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
184.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
184.66 -@@ -27,6 +27,7 @@
184.67 - #include <sys/param.h>
184.68 - #include <string.h>
184.69 - #include <link.h>
184.70 -+#include <sysdep.h>
184.71 -
184.72 - /* This is an older, now obsolete value. */
184.73 - #define EM_S390_OLD 0xA390
185.1 --- a/patches/glibc/2.5/glibc-2.3.5-allow-gcc4-wcstol_l.patch Sat Sep 22 17:25:42 2007 +0000
185.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
185.3 @@ -1,59 +0,0 @@
185.4 -Fixes
185.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
185.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
185.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
185.8 -make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
185.9 -
185.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
185.11 -%changelog
185.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
185.13 -+- fix build on 64-bit arches with new GCC
185.14 -
185.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
185.16 -Branch: fedora-branch
185.17 -CVS Tags: fedora-glibc-2_3_4-18
185.18 -Changes since 1.4: +2 -0 lines
185.19 -Diff to previous 1.4 (colored)
185.20 -
185.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
185.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
185.23 -
185.24 -
185.25 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
185.26 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
185.27 -
185.28 -===================================================================
185.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
185.30 -retrieving revision 1.4
185.31 -retrieving revision 1.4.2.1
185.32 -diff -u -r1.4 -r1.4.2.1
185.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
185.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
185.35 -@@ -8,7 +8,9 @@
185.36 - #undef ____strtoll_l_internal
185.37 - #undef __strtoll_l
185.38 - #undef strtoll_l
185.39 -+#if !UNSIGNED
185.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
185.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
185.42 - weak_alias (__strtol_l, __strtoll_l)
185.43 - weak_alias (__strtol_l, strtoll_l)
185.44 -+#endif
185.45 -===================================================================
185.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
185.47 -retrieving revision 1.4
185.48 -retrieving revision 1.4.2.1
185.49 -diff -u -r1.4 -r1.4.2.1
185.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
185.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
185.52 -@@ -8,6 +8,8 @@
185.53 - #undef ____wcstoll_l_internal
185.54 - #undef __wcstoll_l
185.55 - #undef wcstoll_l
185.56 -+#if !UNSIGNED
185.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
185.58 - weak_alias (__wcstol_l, __wcstoll_l)
185.59 - weak_alias (__wcstol_l, wcstoll_l)
185.60 -+#endif
185.61 -
185.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
186.1 --- a/patches/glibc/2.5/glibc-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
186.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
186.3 @@ -1,187 +0,0 @@
186.4 -Fixes
186.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
186.6 -...
186.7 -when building glibc-2.3.x on cygwin
186.8 -
186.9 -Idea from
186.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
186.11 -Basically, make glibc use .oST as suffix for 'object static'
186.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
186.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
186.14 -
186.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
186.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
186.17 -
186.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
186.19 -
186.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
186.21 -Date: Thu, 12 May 2005 08:50:34 +0200
186.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
186.23 -To: Dan Kegel <dank@kegel.com>
186.24 -CC: crossgcc@sources.redhat.com
186.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
186.26 -
186.27 -Hi Dan,
186.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
186.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
186.30 -
186.31 ---
186.32 - Petr Cvachoucek
186.33 - Unicontrols a.s.
186.34 - http://www.unicontrols.cz
186.35 -]
186.36 -
186.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
186.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
186.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
186.40 -@@ -472,7 +472,7 @@
186.41 - # run the linked programs.
186.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
186.43 - $(common-objpfx)libc.so$(libc.so-version) \
186.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
186.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
186.46 - # This is how to find at build-time things that will be installed there.
186.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
186.48 - endif
186.49 -@@ -693,7 +693,7 @@
186.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
186.51 - # to pass different flags for each flavor.
186.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
186.53 --all-object-suffixes := .o .os .op .og .ob .oS
186.54 -+all-object-suffixes := .o .os .op .og .ob .oST
186.55 - object-suffixes :=
186.56 - CPPFLAGS-.o = $(pic-default)
186.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
186.58 -@@ -749,14 +749,14 @@
186.59 -
186.60 - ifeq (yes,$(build-shared))
186.61 - # Build special library that contains the static-only routines for libc.
186.62 --object-suffixes-for-libc += .oS
186.63 -+object-suffixes-for-libc += .oST
186.64 -
186.65 - # Must build the routines as PIC, though, because they can end up in (users')
186.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
186.67 - # example, make that processor-specific.
186.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
186.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
186.70 --libtype.oS = lib%_nonshared.a
186.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
186.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
186.73 -+libtype.oST = lib%_nonshared.a
186.74 - endif
186.75 -
186.76 - # The assembler can generate debug information too.
186.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
186.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
186.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
186.80 -@@ -417,7 +417,7 @@
186.81 - # Bounded pointer thunks are only built for *.ob
186.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
186.83 -
186.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
186.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
186.86 - $(routines) $(aux) $(sysdep_routines)) \
186.87 - $(elide-bp-thunks)
186.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
186.89 -@@ -981,7 +981,7 @@
186.90 - install: $(inst_libdir)/libc.so
186.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
186.92 - $(common-objpfx)libc.so$(libc.so-version) \
186.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
186.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
186.95 - $(libprefix)$(libc-name)) \
186.96 - $(+force)
186.97 - (echo '/* GNU ld script';\
186.98 -@@ -989,7 +989,7 @@
186.99 - echo ' the static library, so try that secondarily. */';\
186.100 - cat $<; \
186.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
186.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
186.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
186.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
186.105 - ) > $@.new
186.106 - mv -f $@.new $@
186.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
186.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
186.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
186.110 -@@ -13,7 +13,7 @@
186.111 -
186.112 - ifneq (,$($(lib)-static-only-routines))
186.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
186.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
186.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
186.116 - endif
186.117 - endif
186.118 -
186.119 -@@ -29,7 +29,7 @@
186.120 -
186.121 - # Add each flavor of library to the lists of things to build and install.
186.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
186.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
186.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
186.125 - $(patsubst %,%$o,$(filter-out \
186.126 - $($(lib)-shared-only-routines),\
186.127 - $(all-$(lib)-routines))))
186.128 -@@ -57,7 +57,7 @@
186.129 -
186.130 -
186.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
186.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
186.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
186.134 - define o-iterator-doit
186.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
186.136 - $(patsubst %,$(objpfx)%$o,\
186.137 -@@ -65,7 +65,7 @@
186.138 - $(all-$(lib)-routines))); \
186.139 - $$(build-extra-lib)
186.140 - endef
186.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
186.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
186.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
186.144 - endif
186.145 -
186.146 -@@ -77,9 +77,9 @@
186.147 - $(build-extra-lib)
186.148 - endif
186.149 -
186.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
186.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
186.152 -- $(patsubst %,$(objpfx)%.oS,\
186.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
186.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
186.155 -+ $(patsubst %,$(objpfx)%.oST,\
186.156 - $(filter $($(lib)-static-only-routines),\
186.157 - $(all-$(lib)-routines)))
186.158 - $(build-extra-lib)
186.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
186.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
186.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
186.162 -@@ -375,7 +375,7 @@
186.163 -
186.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
186.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
186.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
186.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
186.168 - $(libprefix)pthread) \
186.169 - $(+force)
186.170 - (echo '/* GNU ld script';\
186.171 -@@ -383,7 +383,7 @@
186.172 - echo ' the static library, so try that secondarily. */';\
186.173 - cat $<; \
186.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
186.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
186.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
186.177 - ')' \
186.178 - ) > $@.new
186.179 - mv -f $@.new $@
186.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
186.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
186.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
186.183 -@@ -10,4 +10,4 @@
186.184 - ASFLAGS-.op += -Wa,-Av9a
186.185 - ASFLAGS-.og += -Wa,-Av9a
186.186 - ASFLAGS-.ob += -Wa,-Av9a
186.187 --ASFLAGS-.oS += -Wa,-Av9a
186.188 -+ASFLAGS-.oST += -Wa,-Av9a
186.189 -
186.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
187.1 --- a/patches/glibc/2.5/glibc-2.3.6-allow-gcc-4.0-elf.patch Sat Sep 22 17:25:42 2007 +0000
187.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
187.3 @@ -1,67 +0,0 @@
187.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
187.5 -Fixes
187.6 - rtld.c: In function '_dl_start':
187.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
187.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
187.9 -when compiling glibc-2.3.4 with gcc-4.0
187.10 -
187.11 -But see also
187.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
187.13 -and
187.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
187.15 -which seem to propose less radical fixes?
187.16 -
187.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
187.18 -
187.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
187.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
187.21 -@@ -19,47 +19,6 @@
187.22 -
187.23 - #include <elf.h>
187.24 - #include <assert.h>
187.25 --
187.26 --#ifdef RESOLVE_MAP
187.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
187.28 -- ElfW(Addr), because not all architectures can assume that the
187.29 -- relocated address is properly aligned, whereas the compiler is
187.30 -- entitled to assume that a pointer to a type is properly aligned for
187.31 -- the type. Even if we cast the pointer back to some other type with
187.32 -- less strict alignment requirements, the compiler might still
187.33 -- remember that the pointer was originally more aligned, thereby
187.34 -- optimizing away alignment tests or using word instructions for
187.35 -- copying memory, breaking the very code written to handle the
187.36 -- unaligned cases. */
187.37 --# if ! ELF_MACHINE_NO_REL
187.38 --auto inline void __attribute__((always_inline))
187.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
187.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
187.41 -- void *const reloc_addr);
187.42 --auto inline void __attribute__((always_inline))
187.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
187.44 -- void *const reloc_addr);
187.45 --# endif
187.46 --# if ! ELF_MACHINE_NO_RELA
187.47 --auto inline void __attribute__((always_inline))
187.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
187.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
187.50 -- void *const reloc_addr);
187.51 --auto inline void __attribute__((always_inline))
187.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
187.53 -- void *const reloc_addr);
187.54 --# endif
187.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
187.56 --auto inline void __attribute__((always_inline))
187.57 --elf_machine_lazy_rel (struct link_map *map,
187.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
187.59 --# else
187.60 --auto inline void __attribute__((always_inline))
187.61 --elf_machine_lazy_rel (struct link_map *map,
187.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
187.63 --# endif
187.64 --#endif
187.65 --
187.66 - #include <dl-machine.h>
187.67 -
187.68 - #ifndef VERSYMIDX
187.69 -
187.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
188.1 --- a/patches/glibc/2.5/glibc-2.3.6-configure-apple-as.patch Sat Sep 22 17:25:42 2007 +0000
188.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
188.3 @@ -1,25 +0,0 @@
188.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
188.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
188.6 -
188.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
188.8 -where the assembler but doesn't understand the --version flag.
188.9 -
188.10 -Fixes the symptom
188.11 -checking whether ld is GNU ld... no
188.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
188.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
188.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
188.15 -
188.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
188.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
188.18 -@@ -4039,7 +4039,7 @@
188.19 - # Found it, now check the version.
188.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
188.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
188.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
188.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
188.24 - case $ac_prog_version in
188.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
188.26 - 2.1[3-9]*)
188.27 -
188.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
189.1 --- a/patches/glibc/2.5/glibc-2.3.6-fix-pr631.patch Sat Sep 22 17:25:42 2007 +0000
189.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
189.3 @@ -1,45 +0,0 @@
189.4 -From dank@kegel.com
189.5 -Wed Jun 15 09:12:43 PDT 2005
189.6 -
189.7 -Fixes
189.8 -
189.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
189.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
189.11 -... 53 lines deleted ...
189.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
189.13 -collect2: ld returned 1 exit status
189.14 -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
189.15 -
189.16 -when building glibc with --enable-static-nss.
189.17 -
189.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
189.19 -
189.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
189.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
189.22 -@@ -510,7 +510,7 @@
189.23 -
189.24 - # The static libraries.
189.25 - ifeq (yes,$(build-static))
189.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
189.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
189.28 - else
189.29 - ifeq (yes,$(build-shared))
189.30 - # We can try to link the programs with lib*_pic.a...
189.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
189.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
189.33 -@@ -120,6 +120,13 @@
189.34 - install-bin-script = ldd
189.35 - endif
189.36 -
189.37 -+ifeq (yes,$(build-static-nss))
189.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
189.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
189.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
189.41 -+ $(resolvobjdir)/libresolv.a
189.42 -+endif
189.43 -+
189.44 - others = sprof sln
189.45 - install-bin = sprof
189.46 - others-static = sln
189.47 -
189.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
190.1 --- a/patches/glibc/2.5/glibc-2.4-i686-assembler.patch Sat Sep 22 17:25:42 2007 +0000
190.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
190.3 @@ -1,38 +0,0 @@
190.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
190.5 -
190.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
190.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
190.8 -
190.9 -
190.10 -
190.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
190.12 -===================================================================
190.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
190.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
190.15 -@@ -29,6 +29,10 @@
190.16 - #include <dl-sysdep.h>
190.17 - #include <tls.h>
190.18 -
190.19 -+#if defined __i686 && defined __ASSEMBLER__
190.20 -+#undef __i686
190.21 -+#define __i686 __i686
190.22 -+#endif
190.23 -
190.24 - /* For Linux we can use the system call table in the header file
190.25 - /usr/include/asm/unistd.h
190.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
190.27 -===================================================================
190.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
190.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
190.30 -@@ -45,6 +45,11 @@
190.31 - /* Embed an #include to pull in the alignment and .end directives. */
190.32 - asm ("\n#include \"defs.h\"");
190.33 -
190.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
190.35 -+asm ("\n#undef __i686");
190.36 -+asm ("\n#define __i686 __i686");
190.37 -+asm ("\n#endif");
190.38 -+
190.39 - /* The initial common code ends here. */
190.40 - asm ("\n/*@HEADER_ENDS*/");
190.41 -
191.1 --- a/patches/glibc/2.5/glibc-i386-preferred-stack-boundary.patch Sat Sep 22 17:25:42 2007 +0000
191.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
191.3 @@ -1,18 +0,0 @@
191.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
191.5 -License: LGPL v2.1
191.6 -
191.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
191.8 -and 2 is not.
191.9 -
191.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
191.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
191.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
191.13 -@@ -36,7 +36,7 @@
191.14 - ifeq ($(subdir),csu)
191.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
191.16 - else
191.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
191.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
191.19 - # Likewise, any function which calls user callbacks
191.20 - uses-callbacks += -mpreferred-stack-boundary=4
191.21 - # Likewise, any stack alignment tests
192.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
192.2 +++ b/patches/glibc/2.6.1/100-fix-pr398.patch Sun Sep 23 17:08:09 2007 +0000
192.3 @@ -0,0 +1,70 @@
192.4 +Fixes error
192.5 +
192.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
192.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
192.8 +e.o] Error 1
192.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
192.10 +822/elf'
192.11 +make[1]: *** [elf/subdir_lib] Error 2
192.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
192.13 +822'
192.14 +make: *** [all] Error 2
192.15 +
192.16 +-----------------
192.17 +
192.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
192.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
192.20 +
192.21 +-----------------
192.22 +
192.23 +CVSROOT: /cvs/glibc
192.24 +Module name: libc
192.25 +Branch: glibc-2_3-branch
192.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
192.27 +
192.28 +Modified files:
192.29 + sysdeps/s390/s390-64: dl-machine.h
192.30 + sysdeps/s390/s390-32: dl-machine.h
192.31 +
192.32 +Log message:
192.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
192.34 +
192.35 + [BZ #398]
192.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
192.37 + directive.
192.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
192.39 +
192.40 +Patches:
192.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
192.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
192.43 +
192.44 +===================================================================
192.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
192.46 +retrieving revision 1.19.4.1
192.47 +retrieving revision 1.19.4.2
192.48 +diff -u -r1.19.4.1 -r1.19.4.2
192.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
192.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
192.51 +@@ -27,6 +27,7 @@
192.52 + #include <sys/param.h>
192.53 + #include <string.h>
192.54 + #include <link.h>
192.55 ++#include <sysdep.h>
192.56 +
192.57 + /* This is an older, now obsolete value. */
192.58 + #define EM_S390_OLD 0xA390
192.59 +===================================================================
192.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
192.61 +retrieving revision 1.20.4.1
192.62 +retrieving revision 1.20.4.2
192.63 +diff -u -r1.20.4.1 -r1.20.4.2
192.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
192.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
192.66 +@@ -27,6 +27,7 @@
192.67 + #include <sys/param.h>
192.68 + #include <string.h>
192.69 + #include <link.h>
192.70 ++#include <sysdep.h>
192.71 +
192.72 + /* This is an older, now obsolete value. */
192.73 + #define EM_S390_OLD 0xA390
193.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
193.2 +++ b/patches/glibc/2.6.1/110-glibc-2.3.5-allow-gcc4-wcstol_l.patch Sun Sep 23 17:08:09 2007 +0000
193.3 @@ -0,0 +1,59 @@
193.4 +Fixes
193.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
193.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
193.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
193.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
193.9 +
193.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
193.11 +%changelog
193.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
193.13 ++- fix build on 64-bit arches with new GCC
193.14 +
193.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
193.16 +Branch: fedora-branch
193.17 +CVS Tags: fedora-glibc-2_3_4-18
193.18 +Changes since 1.4: +2 -0 lines
193.19 +Diff to previous 1.4 (colored)
193.20 +
193.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
193.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
193.23 +
193.24 +
193.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
193.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
193.27 +
193.28 +===================================================================
193.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
193.30 +retrieving revision 1.4
193.31 +retrieving revision 1.4.2.1
193.32 +diff -u -r1.4 -r1.4.2.1
193.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
193.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
193.35 +@@ -8,7 +8,9 @@
193.36 + #undef ____strtoll_l_internal
193.37 + #undef __strtoll_l
193.38 + #undef strtoll_l
193.39 ++#if !UNSIGNED
193.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
193.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
193.42 + weak_alias (__strtol_l, __strtoll_l)
193.43 + weak_alias (__strtol_l, strtoll_l)
193.44 ++#endif
193.45 +===================================================================
193.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
193.47 +retrieving revision 1.4
193.48 +retrieving revision 1.4.2.1
193.49 +diff -u -r1.4 -r1.4.2.1
193.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
193.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
193.52 +@@ -8,6 +8,8 @@
193.53 + #undef ____wcstoll_l_internal
193.54 + #undef __wcstoll_l
193.55 + #undef wcstoll_l
193.56 ++#if !UNSIGNED
193.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
193.58 + weak_alias (__wcstol_l, __wcstoll_l)
193.59 + weak_alias (__wcstol_l, wcstoll_l)
193.60 ++#endif
193.61 +
193.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
194.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
194.2 +++ b/patches/glibc/2.6.1/120-glibc-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
194.3 @@ -0,0 +1,187 @@
194.4 +Fixes
194.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
194.6 +...
194.7 +when building glibc-2.3.x on cygwin
194.8 +
194.9 +Idea from
194.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
194.11 +Basically, make glibc use .oST as suffix for 'object static'
194.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
194.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
194.14 +
194.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
194.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
194.17 +
194.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
194.19 +
194.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
194.21 +Date: Thu, 12 May 2005 08:50:34 +0200
194.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
194.23 +To: Dan Kegel <dank@kegel.com>
194.24 +CC: crossgcc@sources.redhat.com
194.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
194.26 +
194.27 +Hi Dan,
194.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
194.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
194.30 +
194.31 +--
194.32 + Petr Cvachoucek
194.33 + Unicontrols a.s.
194.34 + http://www.unicontrols.cz
194.35 +]
194.36 +
194.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
194.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
194.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
194.40 +@@ -472,7 +472,7 @@
194.41 + # run the linked programs.
194.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
194.43 + $(common-objpfx)libc.so$(libc.so-version) \
194.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
194.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
194.46 + # This is how to find at build-time things that will be installed there.
194.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
194.48 + endif
194.49 +@@ -693,7 +693,7 @@
194.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
194.51 + # to pass different flags for each flavor.
194.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
194.53 +-all-object-suffixes := .o .os .op .og .ob .oS
194.54 ++all-object-suffixes := .o .os .op .og .ob .oST
194.55 + object-suffixes :=
194.56 + CPPFLAGS-.o = $(pic-default)
194.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
194.58 +@@ -749,14 +749,14 @@
194.59 +
194.60 + ifeq (yes,$(build-shared))
194.61 + # Build special library that contains the static-only routines for libc.
194.62 +-object-suffixes-for-libc += .oS
194.63 ++object-suffixes-for-libc += .oST
194.64 +
194.65 + # Must build the routines as PIC, though, because they can end up in (users')
194.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
194.67 + # example, make that processor-specific.
194.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
194.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
194.70 +-libtype.oS = lib%_nonshared.a
194.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
194.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
194.73 ++libtype.oST = lib%_nonshared.a
194.74 + endif
194.75 +
194.76 + # The assembler can generate debug information too.
194.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
194.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
194.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
194.80 +@@ -417,7 +417,7 @@
194.81 + # Bounded pointer thunks are only built for *.ob
194.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
194.83 +
194.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
194.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
194.86 + $(routines) $(aux) $(sysdep_routines)) \
194.87 + $(elide-bp-thunks)
194.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
194.89 +@@ -981,7 +981,7 @@
194.90 + install: $(inst_libdir)/libc.so
194.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
194.92 + $(common-objpfx)libc.so$(libc.so-version) \
194.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
194.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
194.95 + $(libprefix)$(libc-name)) \
194.96 + $(+force)
194.97 + (echo '/* GNU ld script';\
194.98 +@@ -989,7 +989,7 @@
194.99 + echo ' the static library, so try that secondarily. */';\
194.100 + cat $<; \
194.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
194.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
194.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
194.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
194.105 + ) > $@.new
194.106 + mv -f $@.new $@
194.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
194.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
194.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
194.110 +@@ -13,7 +13,7 @@
194.111 +
194.112 + ifneq (,$($(lib)-static-only-routines))
194.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
194.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
194.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
194.116 + endif
194.117 + endif
194.118 +
194.119 +@@ -29,7 +29,7 @@
194.120 +
194.121 + # Add each flavor of library to the lists of things to build and install.
194.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
194.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
194.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
194.125 + $(patsubst %,%$o,$(filter-out \
194.126 + $($(lib)-shared-only-routines),\
194.127 + $(all-$(lib)-routines))))
194.128 +@@ -57,7 +57,7 @@
194.129 +
194.130 +
194.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
194.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
194.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
194.134 + define o-iterator-doit
194.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
194.136 + $(patsubst %,$(objpfx)%$o,\
194.137 +@@ -65,7 +65,7 @@
194.138 + $(all-$(lib)-routines))); \
194.139 + $$(build-extra-lib)
194.140 + endef
194.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
194.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
194.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
194.144 + endif
194.145 +
194.146 +@@ -77,9 +77,9 @@
194.147 + $(build-extra-lib)
194.148 + endif
194.149 +
194.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
194.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
194.152 +- $(patsubst %,$(objpfx)%.oS,\
194.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
194.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
194.155 ++ $(patsubst %,$(objpfx)%.oST,\
194.156 + $(filter $($(lib)-static-only-routines),\
194.157 + $(all-$(lib)-routines)))
194.158 + $(build-extra-lib)
194.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
194.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
194.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
194.162 +@@ -375,7 +375,7 @@
194.163 +
194.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
194.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
194.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
194.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
194.168 + $(libprefix)pthread) \
194.169 + $(+force)
194.170 + (echo '/* GNU ld script';\
194.171 +@@ -383,7 +383,7 @@
194.172 + echo ' the static library, so try that secondarily. */';\
194.173 + cat $<; \
194.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
194.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
194.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
194.177 + ')' \
194.178 + ) > $@.new
194.179 + mv -f $@.new $@
194.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
194.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
194.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
194.183 +@@ -10,4 +10,4 @@
194.184 + ASFLAGS-.op += -Wa,-Av9a
194.185 + ASFLAGS-.og += -Wa,-Av9a
194.186 + ASFLAGS-.ob += -Wa,-Av9a
194.187 +-ASFLAGS-.oS += -Wa,-Av9a
194.188 ++ASFLAGS-.oST += -Wa,-Av9a
194.189 +
194.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
195.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
195.2 +++ b/patches/glibc/2.6.1/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Sep 23 17:08:09 2007 +0000
195.3 @@ -0,0 +1,67 @@
195.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
195.5 +Fixes
195.6 + rtld.c: In function '_dl_start':
195.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
195.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
195.9 +when compiling glibc-2.3.4 with gcc-4.0
195.10 +
195.11 +But see also
195.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
195.13 +and
195.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
195.15 +which seem to propose less radical fixes?
195.16 +
195.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
195.18 +
195.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
195.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
195.21 +@@ -19,47 +19,6 @@
195.22 +
195.23 + #include <elf.h>
195.24 + #include <assert.h>
195.25 +-
195.26 +-#ifdef RESOLVE_MAP
195.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
195.28 +- ElfW(Addr), because not all architectures can assume that the
195.29 +- relocated address is properly aligned, whereas the compiler is
195.30 +- entitled to assume that a pointer to a type is properly aligned for
195.31 +- the type. Even if we cast the pointer back to some other type with
195.32 +- less strict alignment requirements, the compiler might still
195.33 +- remember that the pointer was originally more aligned, thereby
195.34 +- optimizing away alignment tests or using word instructions for
195.35 +- copying memory, breaking the very code written to handle the
195.36 +- unaligned cases. */
195.37 +-# if ! ELF_MACHINE_NO_REL
195.38 +-auto inline void __attribute__((always_inline))
195.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
195.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
195.41 +- void *const reloc_addr);
195.42 +-auto inline void __attribute__((always_inline))
195.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
195.44 +- void *const reloc_addr);
195.45 +-# endif
195.46 +-# if ! ELF_MACHINE_NO_RELA
195.47 +-auto inline void __attribute__((always_inline))
195.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
195.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
195.50 +- void *const reloc_addr);
195.51 +-auto inline void __attribute__((always_inline))
195.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
195.53 +- void *const reloc_addr);
195.54 +-# endif
195.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
195.56 +-auto inline void __attribute__((always_inline))
195.57 +-elf_machine_lazy_rel (struct link_map *map,
195.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
195.59 +-# else
195.60 +-auto inline void __attribute__((always_inline))
195.61 +-elf_machine_lazy_rel (struct link_map *map,
195.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
195.63 +-# endif
195.64 +-#endif
195.65 +-
195.66 + #include <dl-machine.h>
195.67 +
195.68 + #ifndef VERSYMIDX
195.69 +
195.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
196.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
196.2 +++ b/patches/glibc/2.6.1/140-glibc-2.3.6-configure-apple-as.patch Sun Sep 23 17:08:09 2007 +0000
196.3 @@ -0,0 +1,25 @@
196.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
196.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
196.6 +
196.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
196.8 +where the assembler but doesn't understand the --version flag.
196.9 +
196.10 +Fixes the symptom
196.11 +checking whether ld is GNU ld... no
196.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
196.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
196.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
196.15 +
196.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
196.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
196.18 +@@ -4039,7 +4039,7 @@
196.19 + # Found it, now check the version.
196.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
196.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
196.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
196.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
196.24 + case $ac_prog_version in
196.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
196.26 + 2.1[3-9]*)
196.27 +
196.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
197.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
197.2 +++ b/patches/glibc/2.6.1/150-glibc-2.3.6-fix-pr631.patch Sun Sep 23 17:08:09 2007 +0000
197.3 @@ -0,0 +1,45 @@
197.4 +From dank@kegel.com
197.5 +Wed Jun 15 09:12:43 PDT 2005
197.6 +
197.7 +Fixes
197.8 +
197.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
197.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
197.11 +... 53 lines deleted ...
197.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
197.13 +collect2: ld returned 1 exit status
197.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
197.15 +
197.16 +when building glibc with --enable-static-nss.
197.17 +
197.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
197.19 +
197.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
197.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
197.22 +@@ -510,7 +510,7 @@
197.23 +
197.24 + # The static libraries.
197.25 + ifeq (yes,$(build-static))
197.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
197.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
197.28 + else
197.29 + ifeq (yes,$(build-shared))
197.30 + # We can try to link the programs with lib*_pic.a...
197.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
197.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
197.33 +@@ -120,6 +120,13 @@
197.34 + install-bin-script = ldd
197.35 + endif
197.36 +
197.37 ++ifeq (yes,$(build-static-nss))
197.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
197.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
197.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
197.41 ++ $(resolvobjdir)/libresolv.a
197.42 ++endif
197.43 ++
197.44 + others = sprof sln
197.45 + install-bin = sprof
197.46 + others-static = sln
197.47 +
197.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
198.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
198.2 +++ b/patches/glibc/2.6.1/160-glibc-2.4-i686-assembler.patch Sun Sep 23 17:08:09 2007 +0000
198.3 @@ -0,0 +1,38 @@
198.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
198.5 +
198.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
198.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
198.8 +
198.9 +
198.10 +
198.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
198.12 +===================================================================
198.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
198.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
198.15 +@@ -29,6 +29,10 @@
198.16 + #include <dl-sysdep.h>
198.17 + #include <tls.h>
198.18 +
198.19 ++#if defined __i686 && defined __ASSEMBLER__
198.20 ++#undef __i686
198.21 ++#define __i686 __i686
198.22 ++#endif
198.23 +
198.24 + /* For Linux we can use the system call table in the header file
198.25 + /usr/include/asm/unistd.h
198.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
198.27 +===================================================================
198.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
198.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
198.30 +@@ -45,6 +45,11 @@
198.31 + /* Embed an #include to pull in the alignment and .end directives. */
198.32 + asm ("\n#include \"defs.h\"");
198.33 +
198.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
198.35 ++asm ("\n#undef __i686");
198.36 ++asm ("\n#define __i686 __i686");
198.37 ++asm ("\n#endif");
198.38 ++
198.39 + /* The initial common code ends here. */
198.40 + asm ("\n/*@HEADER_ENDS*/");
198.41 +
199.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
199.2 +++ b/patches/glibc/2.6.1/170-glibc-i386-preferred-stack-boundary.patch Sun Sep 23 17:08:09 2007 +0000
199.3 @@ -0,0 +1,18 @@
199.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
199.5 +License: LGPL v2.1
199.6 +
199.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
199.8 +and 2 is not.
199.9 +
199.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
199.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
199.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
199.13 +@@ -36,7 +36,7 @@
199.14 + ifeq ($(subdir),csu)
199.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
199.16 + else
199.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
199.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
199.19 + # Likewise, any function which calls user callbacks
199.20 + uses-callbacks += -mpreferred-stack-boundary=4
199.21 + # Likewise, any stack alignment tests
200.1 --- a/patches/glibc/2.6.1/fix-pr398.patch Sat Sep 22 17:25:42 2007 +0000
200.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
200.3 @@ -1,70 +0,0 @@
200.4 -Fixes error
200.5 -
200.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
200.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
200.8 -e.o] Error 1
200.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
200.10 -822/elf'
200.11 -make[1]: *** [elf/subdir_lib] Error 2
200.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
200.13 -822'
200.14 -make: *** [all] Error 2
200.15 -
200.16 ------------------
200.17 -
200.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
200.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
200.20 -
200.21 ------------------
200.22 -
200.23 -CVSROOT: /cvs/glibc
200.24 -Module name: libc
200.25 -Branch: glibc-2_3-branch
200.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
200.27 -
200.28 -Modified files:
200.29 - sysdeps/s390/s390-64: dl-machine.h
200.30 - sysdeps/s390/s390-32: dl-machine.h
200.31 -
200.32 -Log message:
200.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
200.34 -
200.35 - [BZ #398]
200.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
200.37 - directive.
200.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
200.39 -
200.40 -Patches:
200.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
200.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
200.43 -
200.44 -===================================================================
200.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
200.46 -retrieving revision 1.19.4.1
200.47 -retrieving revision 1.19.4.2
200.48 -diff -u -r1.19.4.1 -r1.19.4.2
200.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
200.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
200.51 -@@ -27,6 +27,7 @@
200.52 - #include <sys/param.h>
200.53 - #include <string.h>
200.54 - #include <link.h>
200.55 -+#include <sysdep.h>
200.56 -
200.57 - /* This is an older, now obsolete value. */
200.58 - #define EM_S390_OLD 0xA390
200.59 -===================================================================
200.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
200.61 -retrieving revision 1.20.4.1
200.62 -retrieving revision 1.20.4.2
200.63 -diff -u -r1.20.4.1 -r1.20.4.2
200.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
200.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
200.66 -@@ -27,6 +27,7 @@
200.67 - #include <sys/param.h>
200.68 - #include <string.h>
200.69 - #include <link.h>
200.70 -+#include <sysdep.h>
200.71 -
200.72 - /* This is an older, now obsolete value. */
200.73 - #define EM_S390_OLD 0xA390
201.1 --- a/patches/glibc/2.6.1/glibc-2.3.5-allow-gcc4-wcstol_l.patch Sat Sep 22 17:25:42 2007 +0000
201.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
201.3 @@ -1,59 +0,0 @@
201.4 -Fixes
201.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
201.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
201.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
201.8 -make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
201.9 -
201.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
201.11 -%changelog
201.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
201.13 -+- fix build on 64-bit arches with new GCC
201.14 -
201.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
201.16 -Branch: fedora-branch
201.17 -CVS Tags: fedora-glibc-2_3_4-18
201.18 -Changes since 1.4: +2 -0 lines
201.19 -Diff to previous 1.4 (colored)
201.20 -
201.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
201.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
201.23 -
201.24 -
201.25 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
201.26 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
201.27 -
201.28 -===================================================================
201.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
201.30 -retrieving revision 1.4
201.31 -retrieving revision 1.4.2.1
201.32 -diff -u -r1.4 -r1.4.2.1
201.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
201.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
201.35 -@@ -8,7 +8,9 @@
201.36 - #undef ____strtoll_l_internal
201.37 - #undef __strtoll_l
201.38 - #undef strtoll_l
201.39 -+#if !UNSIGNED
201.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
201.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
201.42 - weak_alias (__strtol_l, __strtoll_l)
201.43 - weak_alias (__strtol_l, strtoll_l)
201.44 -+#endif
201.45 -===================================================================
201.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
201.47 -retrieving revision 1.4
201.48 -retrieving revision 1.4.2.1
201.49 -diff -u -r1.4 -r1.4.2.1
201.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
201.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
201.52 -@@ -8,6 +8,8 @@
201.53 - #undef ____wcstoll_l_internal
201.54 - #undef __wcstoll_l
201.55 - #undef wcstoll_l
201.56 -+#if !UNSIGNED
201.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
201.58 - weak_alias (__wcstol_l, __wcstoll_l)
201.59 - weak_alias (__wcstol_l, wcstoll_l)
201.60 -+#endif
201.61 -
201.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
202.1 --- a/patches/glibc/2.6.1/glibc-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
202.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
202.3 @@ -1,187 +0,0 @@
202.4 -Fixes
202.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
202.6 -...
202.7 -when building glibc-2.3.x on cygwin
202.8 -
202.9 -Idea from
202.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
202.11 -Basically, make glibc use .oST as suffix for 'object static'
202.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
202.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
202.14 -
202.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
202.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
202.17 -
202.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
202.19 -
202.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
202.21 -Date: Thu, 12 May 2005 08:50:34 +0200
202.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
202.23 -To: Dan Kegel <dank@kegel.com>
202.24 -CC: crossgcc@sources.redhat.com
202.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
202.26 -
202.27 -Hi Dan,
202.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
202.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
202.30 -
202.31 ---
202.32 - Petr Cvachoucek
202.33 - Unicontrols a.s.
202.34 - http://www.unicontrols.cz
202.35 -]
202.36 -
202.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
202.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
202.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
202.40 -@@ -472,7 +472,7 @@
202.41 - # run the linked programs.
202.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
202.43 - $(common-objpfx)libc.so$(libc.so-version) \
202.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
202.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
202.46 - # This is how to find at build-time things that will be installed there.
202.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
202.48 - endif
202.49 -@@ -693,7 +693,7 @@
202.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
202.51 - # to pass different flags for each flavor.
202.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
202.53 --all-object-suffixes := .o .os .op .og .ob .oS
202.54 -+all-object-suffixes := .o .os .op .og .ob .oST
202.55 - object-suffixes :=
202.56 - CPPFLAGS-.o = $(pic-default)
202.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
202.58 -@@ -749,14 +749,14 @@
202.59 -
202.60 - ifeq (yes,$(build-shared))
202.61 - # Build special library that contains the static-only routines for libc.
202.62 --object-suffixes-for-libc += .oS
202.63 -+object-suffixes-for-libc += .oST
202.64 -
202.65 - # Must build the routines as PIC, though, because they can end up in (users')
202.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
202.67 - # example, make that processor-specific.
202.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
202.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
202.70 --libtype.oS = lib%_nonshared.a
202.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
202.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
202.73 -+libtype.oST = lib%_nonshared.a
202.74 - endif
202.75 -
202.76 - # The assembler can generate debug information too.
202.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
202.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
202.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
202.80 -@@ -417,7 +417,7 @@
202.81 - # Bounded pointer thunks are only built for *.ob
202.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
202.83 -
202.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
202.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
202.86 - $(routines) $(aux) $(sysdep_routines)) \
202.87 - $(elide-bp-thunks)
202.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
202.89 -@@ -981,7 +981,7 @@
202.90 - install: $(inst_libdir)/libc.so
202.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
202.92 - $(common-objpfx)libc.so$(libc.so-version) \
202.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
202.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
202.95 - $(libprefix)$(libc-name)) \
202.96 - $(+force)
202.97 - (echo '/* GNU ld script';\
202.98 -@@ -989,7 +989,7 @@
202.99 - echo ' the static library, so try that secondarily. */';\
202.100 - cat $<; \
202.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
202.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
202.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
202.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
202.105 - ) > $@.new
202.106 - mv -f $@.new $@
202.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
202.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
202.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
202.110 -@@ -13,7 +13,7 @@
202.111 -
202.112 - ifneq (,$($(lib)-static-only-routines))
202.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
202.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
202.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
202.116 - endif
202.117 - endif
202.118 -
202.119 -@@ -29,7 +29,7 @@
202.120 -
202.121 - # Add each flavor of library to the lists of things to build and install.
202.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
202.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
202.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
202.125 - $(patsubst %,%$o,$(filter-out \
202.126 - $($(lib)-shared-only-routines),\
202.127 - $(all-$(lib)-routines))))
202.128 -@@ -57,7 +57,7 @@
202.129 -
202.130 -
202.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
202.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
202.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
202.134 - define o-iterator-doit
202.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
202.136 - $(patsubst %,$(objpfx)%$o,\
202.137 -@@ -65,7 +65,7 @@
202.138 - $(all-$(lib)-routines))); \
202.139 - $$(build-extra-lib)
202.140 - endef
202.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
202.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
202.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
202.144 - endif
202.145 -
202.146 -@@ -77,9 +77,9 @@
202.147 - $(build-extra-lib)
202.148 - endif
202.149 -
202.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
202.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
202.152 -- $(patsubst %,$(objpfx)%.oS,\
202.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
202.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
202.155 -+ $(patsubst %,$(objpfx)%.oST,\
202.156 - $(filter $($(lib)-static-only-routines),\
202.157 - $(all-$(lib)-routines)))
202.158 - $(build-extra-lib)
202.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
202.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
202.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
202.162 -@@ -375,7 +375,7 @@
202.163 -
202.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
202.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
202.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
202.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
202.168 - $(libprefix)pthread) \
202.169 - $(+force)
202.170 - (echo '/* GNU ld script';\
202.171 -@@ -383,7 +383,7 @@
202.172 - echo ' the static library, so try that secondarily. */';\
202.173 - cat $<; \
202.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
202.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
202.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
202.177 - ')' \
202.178 - ) > $@.new
202.179 - mv -f $@.new $@
202.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
202.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
202.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
202.183 -@@ -10,4 +10,4 @@
202.184 - ASFLAGS-.op += -Wa,-Av9a
202.185 - ASFLAGS-.og += -Wa,-Av9a
202.186 - ASFLAGS-.ob += -Wa,-Av9a
202.187 --ASFLAGS-.oS += -Wa,-Av9a
202.188 -+ASFLAGS-.oST += -Wa,-Av9a
202.189 -
202.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
203.1 --- a/patches/glibc/2.6.1/glibc-2.3.6-allow-gcc-4.0-elf.patch Sat Sep 22 17:25:42 2007 +0000
203.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
203.3 @@ -1,67 +0,0 @@
203.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
203.5 -Fixes
203.6 - rtld.c: In function '_dl_start':
203.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
203.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
203.9 -when compiling glibc-2.3.4 with gcc-4.0
203.10 -
203.11 -But see also
203.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
203.13 -and
203.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
203.15 -which seem to propose less radical fixes?
203.16 -
203.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
203.18 -
203.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
203.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
203.21 -@@ -19,47 +19,6 @@
203.22 -
203.23 - #include <elf.h>
203.24 - #include <assert.h>
203.25 --
203.26 --#ifdef RESOLVE_MAP
203.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
203.28 -- ElfW(Addr), because not all architectures can assume that the
203.29 -- relocated address is properly aligned, whereas the compiler is
203.30 -- entitled to assume that a pointer to a type is properly aligned for
203.31 -- the type. Even if we cast the pointer back to some other type with
203.32 -- less strict alignment requirements, the compiler might still
203.33 -- remember that the pointer was originally more aligned, thereby
203.34 -- optimizing away alignment tests or using word instructions for
203.35 -- copying memory, breaking the very code written to handle the
203.36 -- unaligned cases. */
203.37 --# if ! ELF_MACHINE_NO_REL
203.38 --auto inline void __attribute__((always_inline))
203.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
203.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
203.41 -- void *const reloc_addr);
203.42 --auto inline void __attribute__((always_inline))
203.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
203.44 -- void *const reloc_addr);
203.45 --# endif
203.46 --# if ! ELF_MACHINE_NO_RELA
203.47 --auto inline void __attribute__((always_inline))
203.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
203.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
203.50 -- void *const reloc_addr);
203.51 --auto inline void __attribute__((always_inline))
203.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
203.53 -- void *const reloc_addr);
203.54 --# endif
203.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
203.56 --auto inline void __attribute__((always_inline))
203.57 --elf_machine_lazy_rel (struct link_map *map,
203.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
203.59 --# else
203.60 --auto inline void __attribute__((always_inline))
203.61 --elf_machine_lazy_rel (struct link_map *map,
203.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
203.63 --# endif
203.64 --#endif
203.65 --
203.66 - #include <dl-machine.h>
203.67 -
203.68 - #ifndef VERSYMIDX
203.69 -
203.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
204.1 --- a/patches/glibc/2.6.1/glibc-2.3.6-configure-apple-as.patch Sat Sep 22 17:25:42 2007 +0000
204.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
204.3 @@ -1,25 +0,0 @@
204.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
204.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
204.6 -
204.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
204.8 -where the assembler but doesn't understand the --version flag.
204.9 -
204.10 -Fixes the symptom
204.11 -checking whether ld is GNU ld... no
204.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
204.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
204.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
204.15 -
204.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
204.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
204.18 -@@ -4039,7 +4039,7 @@
204.19 - # Found it, now check the version.
204.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
204.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
204.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
204.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
204.24 - case $ac_prog_version in
204.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
204.26 - 2.1[3-9]*)
204.27 -
204.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
205.1 --- a/patches/glibc/2.6.1/glibc-2.3.6-fix-pr631.patch Sat Sep 22 17:25:42 2007 +0000
205.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
205.3 @@ -1,45 +0,0 @@
205.4 -From dank@kegel.com
205.5 -Wed Jun 15 09:12:43 PDT 2005
205.6 -
205.7 -Fixes
205.8 -
205.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
205.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
205.11 -... 53 lines deleted ...
205.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
205.13 -collect2: ld returned 1 exit status
205.14 -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
205.15 -
205.16 -when building glibc with --enable-static-nss.
205.17 -
205.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
205.19 -
205.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
205.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
205.22 -@@ -510,7 +510,7 @@
205.23 -
205.24 - # The static libraries.
205.25 - ifeq (yes,$(build-static))
205.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
205.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
205.28 - else
205.29 - ifeq (yes,$(build-shared))
205.30 - # We can try to link the programs with lib*_pic.a...
205.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
205.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
205.33 -@@ -120,6 +120,13 @@
205.34 - install-bin-script = ldd
205.35 - endif
205.36 -
205.37 -+ifeq (yes,$(build-static-nss))
205.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
205.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
205.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
205.41 -+ $(resolvobjdir)/libresolv.a
205.42 -+endif
205.43 -+
205.44 - others = sprof sln
205.45 - install-bin = sprof
205.46 - others-static = sln
205.47 -
205.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
206.1 --- a/patches/glibc/2.6.1/glibc-2.4-i686-assembler.patch Sat Sep 22 17:25:42 2007 +0000
206.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
206.3 @@ -1,38 +0,0 @@
206.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
206.5 -
206.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
206.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
206.8 -
206.9 -
206.10 -
206.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
206.12 -===================================================================
206.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
206.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
206.15 -@@ -29,6 +29,10 @@
206.16 - #include <dl-sysdep.h>
206.17 - #include <tls.h>
206.18 -
206.19 -+#if defined __i686 && defined __ASSEMBLER__
206.20 -+#undef __i686
206.21 -+#define __i686 __i686
206.22 -+#endif
206.23 -
206.24 - /* For Linux we can use the system call table in the header file
206.25 - /usr/include/asm/unistd.h
206.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
206.27 -===================================================================
206.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
206.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
206.30 -@@ -45,6 +45,11 @@
206.31 - /* Embed an #include to pull in the alignment and .end directives. */
206.32 - asm ("\n#include \"defs.h\"");
206.33 -
206.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
206.35 -+asm ("\n#undef __i686");
206.36 -+asm ("\n#define __i686 __i686");
206.37 -+asm ("\n#endif");
206.38 -+
206.39 - /* The initial common code ends here. */
206.40 - asm ("\n/*@HEADER_ENDS*/");
206.41 -
207.1 --- a/patches/glibc/2.6.1/glibc-i386-preferred-stack-boundary.patch Sat Sep 22 17:25:42 2007 +0000
207.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
207.3 @@ -1,18 +0,0 @@
207.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
207.5 -License: LGPL v2.1
207.6 -
207.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
207.8 -and 2 is not.
207.9 -
207.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
207.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
207.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
207.13 -@@ -36,7 +36,7 @@
207.14 - ifeq ($(subdir),csu)
207.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
207.16 - else
207.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
207.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
207.19 - # Likewise, any function which calls user callbacks
207.20 - uses-callbacks += -mpreferred-stack-boundary=4
207.21 - # Likewise, any stack alignment tests
208.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
208.2 +++ b/patches/glibc/2.6/100-fix-pr398.patch Sun Sep 23 17:08:09 2007 +0000
208.3 @@ -0,0 +1,70 @@
208.4 +Fixes error
208.5 +
208.6 +dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
208.7 +make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
208.8 +e.o] Error 1
208.9 +make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
208.10 +822/elf'
208.11 +make[1]: *** [elf/subdir_lib] Error 2
208.12 +make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
208.13 +822'
208.14 +make: *** [all] Error 2
208.15 +
208.16 +-----------------
208.17 +
208.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
208.19 +http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
208.20 +
208.21 +-----------------
208.22 +
208.23 +CVSROOT: /cvs/glibc
208.24 +Module name: libc
208.25 +Branch: glibc-2_3-branch
208.26 +Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
208.27 +
208.28 +Modified files:
208.29 + sysdeps/s390/s390-64: dl-machine.h
208.30 + sysdeps/s390/s390-32: dl-machine.h
208.31 +
208.32 +Log message:
208.33 + 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
208.34 +
208.35 + [BZ #398]
208.36 + * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
208.37 + directive.
208.38 + * sysdeps/s390/s390-64/dl-machine.h: Likewise.
208.39 +
208.40 +Patches:
208.41 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
208.42 +http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
208.43 +
208.44 +===================================================================
208.45 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
208.46 +retrieving revision 1.19.4.1
208.47 +retrieving revision 1.19.4.2
208.48 +diff -u -r1.19.4.1 -r1.19.4.2
208.49 +--- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
208.50 ++++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
208.51 +@@ -27,6 +27,7 @@
208.52 + #include <sys/param.h>
208.53 + #include <string.h>
208.54 + #include <link.h>
208.55 ++#include <sysdep.h>
208.56 +
208.57 + /* This is an older, now obsolete value. */
208.58 + #define EM_S390_OLD 0xA390
208.59 +===================================================================
208.60 +RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
208.61 +retrieving revision 1.20.4.1
208.62 +retrieving revision 1.20.4.2
208.63 +diff -u -r1.20.4.1 -r1.20.4.2
208.64 +--- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
208.65 ++++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
208.66 +@@ -27,6 +27,7 @@
208.67 + #include <sys/param.h>
208.68 + #include <string.h>
208.69 + #include <link.h>
208.70 ++#include <sysdep.h>
208.71 +
208.72 + /* This is an older, now obsolete value. */
208.73 + #define EM_S390_OLD 0xA390
209.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
209.2 +++ b/patches/glibc/2.6/110-glibc-2.3.5-allow-gcc4-wcstol_l.patch Sun Sep 23 17:08:09 2007 +0000
209.3 @@ -0,0 +1,59 @@
209.4 +Fixes
209.5 +../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
209.6 +../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
209.7 +../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
209.8 +make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
209.9 +
209.10 +https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
209.11 +%changelog
209.12 ++* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
209.13 ++- fix build on 64-bit arches with new GCC
209.14 +
209.15 +Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
209.16 +Branch: fedora-branch
209.17 +CVS Tags: fedora-glibc-2_3_4-18
209.18 +Changes since 1.4: +2 -0 lines
209.19 +Diff to previous 1.4 (colored)
209.20 +
209.21 + * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
209.22 + * sysdeps/wordsize-64/wcstol_l.c: Likewise.
209.23 +
209.24 +
209.25 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
209.26 +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
209.27 +
209.28 +===================================================================
209.29 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
209.30 +retrieving revision 1.4
209.31 +retrieving revision 1.4.2.1
209.32 +diff -u -r1.4 -r1.4.2.1
209.33 +--- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
209.34 ++++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
209.35 +@@ -8,7 +8,9 @@
209.36 + #undef ____strtoll_l_internal
209.37 + #undef __strtoll_l
209.38 + #undef strtoll_l
209.39 ++#if !UNSIGNED
209.40 + strong_alias (____strtol_l_internal, ____strtoll_l_internal)
209.41 + libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
209.42 + weak_alias (__strtol_l, __strtoll_l)
209.43 + weak_alias (__strtol_l, strtoll_l)
209.44 ++#endif
209.45 +===================================================================
209.46 +RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
209.47 +retrieving revision 1.4
209.48 +retrieving revision 1.4.2.1
209.49 +diff -u -r1.4 -r1.4.2.1
209.50 +--- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
209.51 ++++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
209.52 +@@ -8,6 +8,8 @@
209.53 + #undef ____wcstoll_l_internal
209.54 + #undef __wcstoll_l
209.55 + #undef wcstoll_l
209.56 ++#if !UNSIGNED
209.57 + strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
209.58 + weak_alias (__wcstol_l, __wcstoll_l)
209.59 + weak_alias (__wcstol_l, wcstoll_l)
209.60 ++#endif
209.61 +
209.62 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
210.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
210.2 +++ b/patches/glibc/2.6/120-glibc-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
210.3 @@ -0,0 +1,187 @@
210.4 +Fixes
210.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
210.6 +...
210.7 +when building glibc-2.3.x on cygwin
210.8 +
210.9 +Idea from
210.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
210.11 +Basically, make glibc use .oST as suffix for 'object static'
210.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
210.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
210.14 +
210.15 +glibc-linuxthreads-2.3.5 also requires a patch, see
210.16 +../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
210.17 +
210.18 +[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
210.19 +
210.20 +Message-ID: <4282FCBA.3040000@unicontrols.cz>
210.21 +Date: Thu, 12 May 2005 08:50:34 +0200
210.22 +From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
210.23 +To: Dan Kegel <dank@kegel.com>
210.24 +CC: crossgcc@sources.redhat.com
210.25 +Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
210.26 +
210.27 +Hi Dan,
210.28 +following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
210.29 +on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
210.30 +
210.31 +--
210.32 + Petr Cvachoucek
210.33 + Unicontrols a.s.
210.34 + http://www.unicontrols.cz
210.35 +]
210.36 +
210.37 +diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
210.38 +--- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
210.39 ++++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
210.40 +@@ -472,7 +472,7 @@
210.41 + # run the linked programs.
210.42 + link-libc = -Wl,-rpath-link=$(rpath-link) \
210.43 + $(common-objpfx)libc.so$(libc.so-version) \
210.44 +- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
210.45 ++ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
210.46 + # This is how to find at build-time things that will be installed there.
210.47 + rpath-dirs = math elf dlfcn nss nis rt resolv crypt
210.48 + endif
210.49 +@@ -693,7 +693,7 @@
210.50 + # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
210.51 + # to pass different flags for each flavor.
210.52 + libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
210.53 +-all-object-suffixes := .o .os .op .og .ob .oS
210.54 ++all-object-suffixes := .o .os .op .og .ob .oST
210.55 + object-suffixes :=
210.56 + CPPFLAGS-.o = $(pic-default)
210.57 + CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
210.58 +@@ -749,14 +749,14 @@
210.59 +
210.60 + ifeq (yes,$(build-shared))
210.61 + # Build special library that contains the static-only routines for libc.
210.62 +-object-suffixes-for-libc += .oS
210.63 ++object-suffixes-for-libc += .oST
210.64 +
210.65 + # Must build the routines as PIC, though, because they can end up in (users')
210.66 + # shared objects. We don't want to use CFLAGS-os because users may, for
210.67 + # example, make that processor-specific.
210.68 +-CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
210.69 +-CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
210.70 +-libtype.oS = lib%_nonshared.a
210.71 ++CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
210.72 ++CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
210.73 ++libtype.oST = lib%_nonshared.a
210.74 + endif
210.75 +
210.76 + # The assembler can generate debug information too.
210.77 +diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
210.78 +--- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
210.79 ++++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
210.80 +@@ -417,7 +417,7 @@
210.81 + # Bounded pointer thunks are only built for *.ob
210.82 + elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
210.83 +
210.84 +-elide-routines.oS += $(filter-out $(static-only-routines),\
210.85 ++elide-routines.oST += $(filter-out $(static-only-routines),\
210.86 + $(routines) $(aux) $(sysdep_routines)) \
210.87 + $(elide-bp-thunks)
210.88 + elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
210.89 +@@ -981,7 +981,7 @@
210.90 + install: $(inst_libdir)/libc.so
210.91 + $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
210.92 + $(common-objpfx)libc.so$(libc.so-version) \
210.93 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
210.94 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
210.95 + $(libprefix)$(libc-name)) \
210.96 + $(+force)
210.97 + (echo '/* GNU ld script';\
210.98 +@@ -989,7 +989,7 @@
210.99 + echo ' the static library, so try that secondarily. */';\
210.100 + cat $<; \
210.101 + echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
210.102 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
210.103 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
210.104 + ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
210.105 + ) > $@.new
210.106 + mv -f $@.new $@
210.107 +diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
210.108 +--- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
210.109 ++++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
210.110 +@@ -13,7 +13,7 @@
210.111 +
210.112 + ifneq (,$($(lib)-static-only-routines))
210.113 + ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
210.114 +-object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
210.115 ++object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
210.116 + endif
210.117 + endif
210.118 +
210.119 +@@ -29,7 +29,7 @@
210.120 +
210.121 + # Add each flavor of library to the lists of things to build and install.
210.122 + install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
210.123 +-extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
210.124 ++extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
210.125 + $(patsubst %,%$o,$(filter-out \
210.126 + $($(lib)-shared-only-routines),\
210.127 + $(all-$(lib)-routines))))
210.128 +@@ -57,7 +57,7 @@
210.129 +
210.130 +
210.131 + # Use o-iterator.mk to generate a rule for each flavor of library.
210.132 +-ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
210.133 ++ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
210.134 + define o-iterator-doit
210.135 + $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
210.136 + $(patsubst %,$(objpfx)%$o,\
210.137 +@@ -65,7 +65,7 @@
210.138 + $(all-$(lib)-routines))); \
210.139 + $$(build-extra-lib)
210.140 + endef
210.141 +-object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
210.142 ++object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
210.143 + include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
210.144 + endif
210.145 +
210.146 +@@ -77,9 +77,9 @@
210.147 + $(build-extra-lib)
210.148 + endif
210.149 +
210.150 +-ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
210.151 +-$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
210.152 +- $(patsubst %,$(objpfx)%.oS,\
210.153 ++ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
210.154 ++$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
210.155 ++ $(patsubst %,$(objpfx)%.oST,\
210.156 + $(filter $($(lib)-static-only-routines),\
210.157 + $(all-$(lib)-routines)))
210.158 + $(build-extra-lib)
210.159 +diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
210.160 +--- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
210.161 ++++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
210.162 +@@ -375,7 +375,7 @@
210.163 +
210.164 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
210.165 + $(objpfx)libpthread.so$(libpthread.so-version) \
210.166 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
210.167 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
210.168 + $(libprefix)pthread) \
210.169 + $(+force)
210.170 + (echo '/* GNU ld script';\
210.171 +@@ -383,7 +383,7 @@
210.172 + echo ' the static library, so try that secondarily. */';\
210.173 + cat $<; \
210.174 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
210.175 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
210.176 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
210.177 + ')' \
210.178 + ) > $@.new
210.179 + mv -f $@.new $@
210.180 +diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
210.181 +--- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
210.182 ++++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
210.183 +@@ -10,4 +10,4 @@
210.184 + ASFLAGS-.op += -Wa,-Av9a
210.185 + ASFLAGS-.og += -Wa,-Av9a
210.186 + ASFLAGS-.ob += -Wa,-Av9a
210.187 +-ASFLAGS-.oS += -Wa,-Av9a
210.188 ++ASFLAGS-.oST += -Wa,-Av9a
210.189 +
210.190 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
211.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
211.2 +++ b/patches/glibc/2.6/130-glibc-2.3.6-allow-gcc-4.0-elf.patch Sun Sep 23 17:08:09 2007 +0000
211.3 @@ -0,0 +1,67 @@
211.4 +From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
211.5 +Fixes
211.6 + rtld.c: In function '_dl_start':
211.7 + dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
211.8 + dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
211.9 +when compiling glibc-2.3.4 with gcc-4.0
211.10 +
211.11 +But see also
211.12 +http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
211.13 +and
211.14 +http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
211.15 +which seem to propose less radical fixes?
211.16 +
211.17 +Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
211.18 +
211.19 +--- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
211.20 ++++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
211.21 +@@ -19,47 +19,6 @@
211.22 +
211.23 + #include <elf.h>
211.24 + #include <assert.h>
211.25 +-
211.26 +-#ifdef RESOLVE_MAP
211.27 +-/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
211.28 +- ElfW(Addr), because not all architectures can assume that the
211.29 +- relocated address is properly aligned, whereas the compiler is
211.30 +- entitled to assume that a pointer to a type is properly aligned for
211.31 +- the type. Even if we cast the pointer back to some other type with
211.32 +- less strict alignment requirements, the compiler might still
211.33 +- remember that the pointer was originally more aligned, thereby
211.34 +- optimizing away alignment tests or using word instructions for
211.35 +- copying memory, breaking the very code written to handle the
211.36 +- unaligned cases. */
211.37 +-# if ! ELF_MACHINE_NO_REL
211.38 +-auto inline void __attribute__((always_inline))
211.39 +-elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
211.40 +- const ElfW(Sym) *sym, const struct r_found_version *version,
211.41 +- void *const reloc_addr);
211.42 +-auto inline void __attribute__((always_inline))
211.43 +-elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
211.44 +- void *const reloc_addr);
211.45 +-# endif
211.46 +-# if ! ELF_MACHINE_NO_RELA
211.47 +-auto inline void __attribute__((always_inline))
211.48 +-elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
211.49 +- const ElfW(Sym) *sym, const struct r_found_version *version,
211.50 +- void *const reloc_addr);
211.51 +-auto inline void __attribute__((always_inline))
211.52 +-elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
211.53 +- void *const reloc_addr);
211.54 +-# endif
211.55 +-# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
211.56 +-auto inline void __attribute__((always_inline))
211.57 +-elf_machine_lazy_rel (struct link_map *map,
211.58 +- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
211.59 +-# else
211.60 +-auto inline void __attribute__((always_inline))
211.61 +-elf_machine_lazy_rel (struct link_map *map,
211.62 +- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
211.63 +-# endif
211.64 +-#endif
211.65 +-
211.66 + #include <dl-machine.h>
211.67 +
211.68 + #ifndef VERSYMIDX
211.69 +
211.70 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
212.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
212.2 +++ b/patches/glibc/2.6/140-glibc-2.3.6-configure-apple-as.patch Sun Sep 23 17:08:09 2007 +0000
212.3 @@ -0,0 +1,25 @@
212.4 +http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
212.5 +http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
212.6 +
212.7 +The following makes it possible to configure glibc-2.3.2 on Mac OS X,
212.8 +where the assembler but doesn't understand the --version flag.
212.9 +
212.10 +Fixes the symptom
212.11 +checking whether ld is GNU ld... no
212.12 +checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
212.13 +checking version of /usr/libexec/gcc/darwin/ppc/as...
212.14 +<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
212.15 +
212.16 +--- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
212.17 ++++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
212.18 +@@ -4039,7 +4039,7 @@
212.19 + # Found it, now check the version.
212.20 + echo "$as_me:$LINENO: checking version of $AS" >&5
212.21 + echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
212.22 +- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
212.23 ++ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
212.24 + case $ac_prog_version in
212.25 + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
212.26 + 2.1[3-9]*)
212.27 +
212.28 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
213.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
213.2 +++ b/patches/glibc/2.6/150-glibc-2.3.6-fix-pr631.patch Sun Sep 23 17:08:09 2007 +0000
213.3 @@ -0,0 +1,45 @@
213.4 +From dank@kegel.com
213.5 +Wed Jun 15 09:12:43 PDT 2005
213.6 +
213.7 +Fixes
213.8 +
213.9 +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
213.10 +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
213.11 +... 53 lines deleted ...
213.12 +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
213.13 +collect2: ld returned 1 exit status
213.14 +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
213.15 +
213.16 +when building glibc with --enable-static-nss.
213.17 +
213.18 +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
213.19 +
213.20 +--- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
213.21 ++++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
213.22 +@@ -510,7 +510,7 @@
213.23 +
213.24 + # The static libraries.
213.25 + ifeq (yes,$(build-static))
213.26 +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
213.27 ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
213.28 + else
213.29 + ifeq (yes,$(build-shared))
213.30 + # We can try to link the programs with lib*_pic.a...
213.31 +--- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
213.32 ++++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
213.33 +@@ -120,6 +120,13 @@
213.34 + install-bin-script = ldd
213.35 + endif
213.36 +
213.37 ++ifeq (yes,$(build-static-nss))
213.38 ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
213.39 ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
213.40 ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
213.41 ++ $(resolvobjdir)/libresolv.a
213.42 ++endif
213.43 ++
213.44 + others = sprof sln
213.45 + install-bin = sprof
213.46 + others-static = sln
213.47 +
213.48 +Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
214.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
214.2 +++ b/patches/glibc/2.6/160-glibc-2.4-i686-assembler.patch Sun Sep 23 17:08:09 2007 +0000
214.3 @@ -0,0 +1,38 @@
214.4 +2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
214.5 +
214.6 + * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
214.7 + * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
214.8 +
214.9 +
214.10 +
214.11 +Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
214.12 +===================================================================
214.13 +--- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
214.14 ++++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
214.15 +@@ -29,6 +29,10 @@
214.16 + #include <dl-sysdep.h>
214.17 + #include <tls.h>
214.18 +
214.19 ++#if defined __i686 && defined __ASSEMBLER__
214.20 ++#undef __i686
214.21 ++#define __i686 __i686
214.22 ++#endif
214.23 +
214.24 + /* For Linux we can use the system call table in the header file
214.25 + /usr/include/asm/unistd.h
214.26 +Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
214.27 +===================================================================
214.28 +--- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
214.29 ++++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
214.30 +@@ -45,6 +45,11 @@
214.31 + /* Embed an #include to pull in the alignment and .end directives. */
214.32 + asm ("\n#include \"defs.h\"");
214.33 +
214.34 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
214.35 ++asm ("\n#undef __i686");
214.36 ++asm ("\n#define __i686 __i686");
214.37 ++asm ("\n#endif");
214.38 ++
214.39 + /* The initial common code ends here. */
214.40 + asm ("\n/*@HEADER_ENDS*/");
214.41 +
215.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
215.2 +++ b/patches/glibc/2.6/170-glibc-i386-preferred-stack-boundary.patch Sun Sep 23 17:08:09 2007 +0000
215.3 @@ -0,0 +1,18 @@
215.4 +(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
215.5 +License: LGPL v2.1
215.6 +
215.7 +Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
215.8 +and 2 is not.
215.9 +
215.10 +diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
215.11 +--- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
215.12 ++++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
215.13 +@@ -36,7 +36,7 @@
215.14 + ifeq ($(subdir),csu)
215.15 + sysdep-CFLAGS += -mpreferred-stack-boundary=4
215.16 + else
215.17 +-sysdep-CFLAGS += -mpreferred-stack-boundary=2
215.18 ++sysdep-CFLAGS += -mpreferred-stack-boundary=4
215.19 + # Likewise, any function which calls user callbacks
215.20 + uses-callbacks += -mpreferred-stack-boundary=4
215.21 + # Likewise, any stack alignment tests
216.1 --- a/patches/glibc/2.6/fix-pr398.patch Sat Sep 22 17:25:42 2007 +0000
216.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
216.3 @@ -1,70 +0,0 @@
216.4 -Fixes error
216.5 -
216.6 -dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
216.7 -make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
216.8 -e.o] Error 1
216.9 -make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
216.10 -822/elf'
216.11 -make[1]: *** [elf/subdir_lib] Error 2
216.12 -make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
216.13 -822'
216.14 -make: *** [all] Error 2
216.15 -
216.16 ------------------
216.17 -
216.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
216.19 -http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
216.20 -
216.21 ------------------
216.22 -
216.23 -CVSROOT: /cvs/glibc
216.24 -Module name: libc
216.25 -Branch: glibc-2_3-branch
216.26 -Changes by: roland@sources.redhat.com 2006-02-23 22:36:51
216.27 -
216.28 -Modified files:
216.29 - sysdeps/s390/s390-64: dl-machine.h
216.30 - sysdeps/s390/s390-32: dl-machine.h
216.31 -
216.32 -Log message:
216.33 - 2004-07-10 GOTO Masanori <gotom@debian.or.jp>
216.34 -
216.35 - [BZ #398]
216.36 - * sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
216.37 - directive.
216.38 - * sysdeps/s390/s390-64/dl-machine.h: Likewise.
216.39 -
216.40 -Patches:
216.41 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
216.42 -http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
216.43 -
216.44 -===================================================================
216.45 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
216.46 -retrieving revision 1.19.4.1
216.47 -retrieving revision 1.19.4.2
216.48 -diff -u -r1.19.4.1 -r1.19.4.2
216.49 ---- libc/sysdeps/s390/s390-64/dl-machine.h 2005/10/17 04:57:27 1.19.4.1
216.50 -+++ libc/sysdeps/s390/s390-64/dl-machine.h 2006/02/23 22:36:51 1.19.4.2
216.51 -@@ -27,6 +27,7 @@
216.52 - #include <sys/param.h>
216.53 - #include <string.h>
216.54 - #include <link.h>
216.55 -+#include <sysdep.h>
216.56 -
216.57 - /* This is an older, now obsolete value. */
216.58 - #define EM_S390_OLD 0xA390
216.59 -===================================================================
216.60 -RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
216.61 -retrieving revision 1.20.4.1
216.62 -retrieving revision 1.20.4.2
216.63 -diff -u -r1.20.4.1 -r1.20.4.2
216.64 ---- libc/sysdeps/s390/s390-32/dl-machine.h 2005/10/17 04:57:27 1.20.4.1
216.65 -+++ libc/sysdeps/s390/s390-32/dl-machine.h 2006/02/23 22:36:51 1.20.4.2
216.66 -@@ -27,6 +27,7 @@
216.67 - #include <sys/param.h>
216.68 - #include <string.h>
216.69 - #include <link.h>
216.70 -+#include <sysdep.h>
216.71 -
216.72 - /* This is an older, now obsolete value. */
216.73 - #define EM_S390_OLD 0xA390
217.1 --- a/patches/glibc/2.6/glibc-2.3.5-allow-gcc4-wcstol_l.patch Sat Sep 22 17:25:42 2007 +0000
217.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
217.3 @@ -1,59 +0,0 @@
217.4 -Fixes
217.5 -../sysdeps/wordsize-64/wcstol_l.c:11: error: '____wcstoll_l_internal' aliased to undefined symbol '____wcstol_l_internal'
217.6 -../sysdeps/wordsize-64/wcstol_l.c:12: error: '__wcstoll_l' aliased to undefined symbol '__wcstol_l'
217.7 -../sysdeps/wordsize-64/wcstol_l.c:13: error: 'wcstoll_l' aliased to undefined symbol '__wcstol_l'
217.8 -make[2]: *** [/home/dkegel/queue/jobdir.produser_cpsm10/crosstool-0.32/build/x86_64-unknown-linux-gnu/gcc-4.0.0-20050410-glibc-2.3.4/build-glibc/wcsmbs/wcstoul_l.o] Error 1
217.9 -
217.10 -https://www.redhat.com/archives/fedora-cvs-commits/2005-March/msg00408.html
217.11 -%changelog
217.12 -+* Fri Mar 25 2005 Jakub Jelinek <jakub redhat com> 2.3.4-18
217.13 -+- fix build on 64-bit arches with new GCC
217.14 -
217.15 -Revision 1.4.2.1, Fri Mar 25 11:59:01 2005 UTC (3 weeks, 4 days ago) by jakub
217.16 -Branch: fedora-branch
217.17 -CVS Tags: fedora-glibc-2_3_4-18
217.18 -Changes since 1.4: +2 -0 lines
217.19 -Diff to previous 1.4 (colored)
217.20 -
217.21 - * sysdeps/wordsize-64/strtol_l.c: Don't add aliases if UNSIGNED.
217.22 - * sysdeps/wordsize-64/wcstol_l.c: Likewise.
217.23 -
217.24 -
217.25 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/strtol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
217.26 -http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/wordsize-64/wcstol_l.c.diff?r1=1.4&r2=1.4.2.1&cvsroot=glibc
217.27 -
217.28 -===================================================================
217.29 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/strtol_l.c,v
217.30 -retrieving revision 1.4
217.31 -retrieving revision 1.4.2.1
217.32 -diff -u -r1.4 -r1.4.2.1
217.33 ---- libc/sysdeps/wordsize-64/strtol_l.c 2003/03/03 09:45:12 1.4
217.34 -+++ libc/sysdeps/wordsize-64/strtol_l.c 2005/03/25 11:59:01 1.4.2.1
217.35 -@@ -8,7 +8,9 @@
217.36 - #undef ____strtoll_l_internal
217.37 - #undef __strtoll_l
217.38 - #undef strtoll_l
217.39 -+#if !UNSIGNED
217.40 - strong_alias (____strtol_l_internal, ____strtoll_l_internal)
217.41 - libc_hidden_ver (____strtol_l_internal, ____strtoll_l_internal)
217.42 - weak_alias (__strtol_l, __strtoll_l)
217.43 - weak_alias (__strtol_l, strtoll_l)
217.44 -+#endif
217.45 -===================================================================
217.46 -RCS file: /cvs/glibc/libc/sysdeps/wordsize-64/wcstol_l.c,v
217.47 -retrieving revision 1.4
217.48 -retrieving revision 1.4.2.1
217.49 -diff -u -r1.4 -r1.4.2.1
217.50 ---- libc/sysdeps/wordsize-64/wcstol_l.c 2002/08/08 11:44:51 1.4
217.51 -+++ libc/sysdeps/wordsize-64/wcstol_l.c 2005/03/25 11:59:01 1.4.2.1
217.52 -@@ -8,6 +8,8 @@
217.53 - #undef ____wcstoll_l_internal
217.54 - #undef __wcstoll_l
217.55 - #undef wcstoll_l
217.56 -+#if !UNSIGNED
217.57 - strong_alias (____wcstol_l_internal, ____wcstoll_l_internal)
217.58 - weak_alias (__wcstol_l, __wcstoll_l)
217.59 - weak_alias (__wcstol_l, wcstoll_l)
217.60 -+#endif
217.61 -
217.62 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
218.1 --- a/patches/glibc/2.6/glibc-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
218.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
218.3 @@ -1,187 +0,0 @@
218.4 -Fixes
218.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
218.6 -...
218.7 -when building glibc-2.3.x on cygwin
218.8 -
218.9 -Idea from
218.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
218.11 -Basically, make glibc use .oST as suffix for 'object static'
218.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
218.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
218.14 -
218.15 -glibc-linuxthreads-2.3.5 also requires a patch, see
218.16 -../glibc-linuxthreads-2.3.5/glibc-linuxthreads-2.3.5-cygwin.patch
218.17 -
218.18 -[ forward ported to glibc-2.3.5 by Petr Cvachoucek:
218.19 -
218.20 -Message-ID: <4282FCBA.3040000@unicontrols.cz>
218.21 -Date: Thu, 12 May 2005 08:50:34 +0200
218.22 -From: Petr Cvachoucek <cvachoucek@unicontrols.cz>
218.23 -To: Dan Kegel <dank@kegel.com>
218.24 -CC: crossgcc@sources.redhat.com
218.25 -Subject: Patches to build gcc 3.4.3 / glibc 2.3.5 on cygwin
218.26 -
218.27 -Hi Dan,
218.28 -following patches are needed to build gcc-3.4.3/glibc-2.3.5 toolchain
218.29 -on cygwin. Tested to build toolchains for powerpc 604 and 750 targets.
218.30 -
218.31 ---
218.32 - Petr Cvachoucek
218.33 - Unicontrols a.s.
218.34 - http://www.unicontrols.cz
218.35 -]
218.36 -
218.37 -diff -aur glibc-2.3.5/Makeconfig glibc-2.3.5-cygwin/Makeconfig
218.38 ---- glibc-2.3.5/Makeconfig 2005-02-16 11:50:19.000000000 +0100
218.39 -+++ glibc-2.3.5-cygwin/Makeconfig 2005-05-11 08:24:51.046875000 +0200
218.40 -@@ -472,7 +472,7 @@
218.41 - # run the linked programs.
218.42 - link-libc = -Wl,-rpath-link=$(rpath-link) \
218.43 - $(common-objpfx)libc.so$(libc.so-version) \
218.44 -- $(common-objpfx)$(patsubst %,$(libtype.oS),c) $(gnulib)
218.45 -+ $(common-objpfx)$(patsubst %,$(libtype.oST),c) $(gnulib)
218.46 - # This is how to find at build-time things that will be installed there.
218.47 - rpath-dirs = math elf dlfcn nss nis rt resolv crypt
218.48 - endif
218.49 -@@ -693,7 +693,7 @@
218.50 - # The compilation rules use $(CPPFLAGS-${SUFFIX}) and $(CFLAGS-${SUFFIX})
218.51 - # to pass different flags for each flavor.
218.52 - libtypes = $(foreach o,$(object-suffixes-for-libc),$(libtype$o))
218.53 --all-object-suffixes := .o .os .op .og .ob .oS
218.54 -+all-object-suffixes := .o .os .op .og .ob .oST
218.55 - object-suffixes :=
218.56 - CPPFLAGS-.o = $(pic-default)
218.57 - CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
218.58 -@@ -749,14 +749,14 @@
218.59 -
218.60 - ifeq (yes,$(build-shared))
218.61 - # Build special library that contains the static-only routines for libc.
218.62 --object-suffixes-for-libc += .oS
218.63 -+object-suffixes-for-libc += .oST
218.64 -
218.65 - # Must build the routines as PIC, though, because they can end up in (users')
218.66 - # shared objects. We don't want to use CFLAGS-os because users may, for
218.67 - # example, make that processor-specific.
218.68 --CFLAGS-.oS = $(CFLAGS-.o) $(PIC-ccflag)
218.69 --CPPFLAGS-.oS = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
218.70 --libtype.oS = lib%_nonshared.a
218.71 -+CFLAGS-.oST = $(CFLAGS-.o) $(PIC-ccflag)
218.72 -+CPPFLAGS-.oST = $(CPPFLAGS-.o) -DPIC -DLIBC_NONSHARED=1
218.73 -+libtype.oST = lib%_nonshared.a
218.74 - endif
218.75 -
218.76 - # The assembler can generate debug information too.
218.77 -diff -aur glibc-2.3.5/Makerules glibc-2.3.5-cygwin/Makerules
218.78 ---- glibc-2.3.5/Makerules 2004-12-15 19:52:39.000000000 +0100
218.79 -+++ glibc-2.3.5-cygwin/Makerules 2005-05-11 08:25:33.578125000 +0200
218.80 -@@ -417,7 +417,7 @@
218.81 - # Bounded pointer thunks are only built for *.ob
218.82 - elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
218.83 -
218.84 --elide-routines.oS += $(filter-out $(static-only-routines),\
218.85 -+elide-routines.oST += $(filter-out $(static-only-routines),\
218.86 - $(routines) $(aux) $(sysdep_routines)) \
218.87 - $(elide-bp-thunks)
218.88 - elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
218.89 -@@ -981,7 +981,7 @@
218.90 - install: $(inst_libdir)/libc.so
218.91 - $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
218.92 - $(common-objpfx)libc.so$(libc.so-version) \
218.93 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
218.94 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
218.95 - $(libprefix)$(libc-name)) \
218.96 - $(+force)
218.97 - (echo '/* GNU ld script';\
218.98 -@@ -989,7 +989,7 @@
218.99 - echo ' the static library, so try that secondarily. */';\
218.100 - cat $<; \
218.101 - echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
218.102 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
218.103 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)$(libc-name))'\
218.104 - ' AS_NEEDED (' $(slibdir)/$(rtld-installed-name) ') )' \
218.105 - ) > $@.new
218.106 - mv -f $@.new $@
218.107 -diff -aur glibc-2.3.5/extra-lib.mk glibc-2.3.5-cygwin/extra-lib.mk
218.108 ---- glibc-2.3.5/extra-lib.mk 2004-12-02 23:54:47.000000000 +0100
218.109 -+++ glibc-2.3.5-cygwin/extra-lib.mk 2005-05-11 08:27:28.156250000 +0200
218.110 -@@ -13,7 +13,7 @@
218.111 -
218.112 - ifneq (,$($(lib)-static-only-routines))
218.113 - ifneq (,$(filter yesyes%,$(build-shared)$(elf)$($(lib).so-version)))
218.114 --object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oS)
218.115 -+object-suffixes-$(lib) += $(filter-out $($(lib)-inhibit-o),.oST)
218.116 - endif
218.117 - endif
218.118 -
218.119 -@@ -29,7 +29,7 @@
218.120 -
218.121 - # Add each flavor of library to the lists of things to build and install.
218.122 - install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
218.123 --extra-objs += $(foreach o,$(filter-out .os .oS,$(object-suffixes-$(lib))),\
218.124 -+extra-objs += $(foreach o,$(filter-out .os .oST,$(object-suffixes-$(lib))),\
218.125 - $(patsubst %,%$o,$(filter-out \
218.126 - $($(lib)-shared-only-routines),\
218.127 - $(all-$(lib)-routines))))
218.128 -@@ -57,7 +57,7 @@
218.129 -
218.130 -
218.131 - # Use o-iterator.mk to generate a rule for each flavor of library.
218.132 --ifneq (,$(filter-out .os .oS,$(object-suffixes-$(lib))))
218.133 -+ifneq (,$(filter-out .os .oST,$(object-suffixes-$(lib))))
218.134 - define o-iterator-doit
218.135 - $(objpfx)$(patsubst %,$(libtype$o),$(lib:lib%=%)): \
218.136 - $(patsubst %,$(objpfx)%$o,\
218.137 -@@ -65,7 +65,7 @@
218.138 - $(all-$(lib)-routines))); \
218.139 - $$(build-extra-lib)
218.140 - endef
218.141 --object-suffixes-left = $(filter-out .os .oS,$(object-suffixes-$(lib)))
218.142 -+object-suffixes-left = $(filter-out .os .oST,$(object-suffixes-$(lib)))
218.143 - include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
218.144 - endif
218.145 -
218.146 -@@ -77,9 +77,9 @@
218.147 - $(build-extra-lib)
218.148 - endif
218.149 -
218.150 --ifneq (,$(filter .oS,$(object-suffixes-$(lib))))
218.151 --$(objpfx)$(patsubst %,$(libtype.oS),$(lib:lib%=%)): \
218.152 -- $(patsubst %,$(objpfx)%.oS,\
218.153 -+ifneq (,$(filter .oST,$(object-suffixes-$(lib))))
218.154 -+$(objpfx)$(patsubst %,$(libtype.oST),$(lib:lib%=%)): \
218.155 -+ $(patsubst %,$(objpfx)%.oST,\
218.156 - $(filter $($(lib)-static-only-routines),\
218.157 - $(all-$(lib)-routines)))
218.158 - $(build-extra-lib)
218.159 -diff -aur glibc-2.3.5/nptl/Makefile glibc-2.3.5-cygwin/nptl/Makefile
218.160 ---- glibc-2.3.5/nptl/Makefile 2005-02-16 09:45:56.000000000 +0100
218.161 -+++ glibc-2.3.5-cygwin/nptl/Makefile 2005-05-11 08:26:01.812500000 +0200
218.162 -@@ -375,7 +375,7 @@
218.163 -
218.164 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
218.165 - $(objpfx)libpthread.so$(libpthread.so-version) \
218.166 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
218.167 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
218.168 - $(libprefix)pthread) \
218.169 - $(+force)
218.170 - (echo '/* GNU ld script';\
218.171 -@@ -383,7 +383,7 @@
218.172 - echo ' the static library, so try that secondarily. */';\
218.173 - cat $<; \
218.174 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
218.175 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
218.176 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
218.177 - ')' \
218.178 - ) > $@.new
218.179 - mv -f $@.new $@
218.180 -diff -aur glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile
218.181 ---- glibc-2.3.5/sysdeps/sparc/sparc32/sparcv9/Makefile 2004-08-16 08:46:14.000000000 +0200
218.182 -+++ glibc-2.3.5-cygwin/sysdeps/sparc/sparc32/sparcv9/Makefile 2005-05-11 08:26:25.937500000 +0200
218.183 -@@ -10,4 +10,4 @@
218.184 - ASFLAGS-.op += -Wa,-Av9a
218.185 - ASFLAGS-.og += -Wa,-Av9a
218.186 - ASFLAGS-.ob += -Wa,-Av9a
218.187 --ASFLAGS-.oS += -Wa,-Av9a
218.188 -+ASFLAGS-.oST += -Wa,-Av9a
218.189 -
218.190 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
219.1 --- a/patches/glibc/2.6/glibc-2.3.6-allow-gcc-4.0-elf.patch Sat Sep 22 17:25:42 2007 +0000
219.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
219.3 @@ -1,67 +0,0 @@
219.4 -From http://www.mail-archive.com/pld-cvs-commit@pld-linux.org/msg00229.html
219.5 -Fixes
219.6 - rtld.c: In function '_dl_start':
219.7 - dynamic-link.h:47: error: nested function 'elf_machine_rela_relative' declared but never defined
219.8 - dynamic-link.h:41: error: nested function 'elf_machine_rela' declared but never defined
219.9 -when compiling glibc-2.3.4 with gcc-4.0
219.10 -
219.11 -But see also
219.12 -http://sources.redhat.com/ml/libc-hacker/2005-02/msg00000.html
219.13 -and
219.14 -http://sources.redhat.com/ml/libc-hacker/2005-03/msg00008.html
219.15 -which seem to propose less radical fixes?
219.16 -
219.17 -Aha. See also http://sources.redhat.com/bugzilla/show_bug.cgi?id=721
219.18 -
219.19 ---- glibc-2.3.6.orig/elf/dynamic-link.h 2005-03-12 18:12:37.000000000 -0800
219.20 -+++ glibc-2.3.6/elf/dynamic-link.h 2005-03-12 18:12:59.777820848 -0800
219.21 -@@ -19,47 +19,6 @@
219.22 -
219.23 - #include <elf.h>
219.24 - #include <assert.h>
219.25 --
219.26 --#ifdef RESOLVE_MAP
219.27 --/* We pass reloc_addr as a pointer to void, as opposed to a pointer to
219.28 -- ElfW(Addr), because not all architectures can assume that the
219.29 -- relocated address is properly aligned, whereas the compiler is
219.30 -- entitled to assume that a pointer to a type is properly aligned for
219.31 -- the type. Even if we cast the pointer back to some other type with
219.32 -- less strict alignment requirements, the compiler might still
219.33 -- remember that the pointer was originally more aligned, thereby
219.34 -- optimizing away alignment tests or using word instructions for
219.35 -- copying memory, breaking the very code written to handle the
219.36 -- unaligned cases. */
219.37 --# if ! ELF_MACHINE_NO_REL
219.38 --auto inline void __attribute__((always_inline))
219.39 --elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
219.40 -- const ElfW(Sym) *sym, const struct r_found_version *version,
219.41 -- void *const reloc_addr);
219.42 --auto inline void __attribute__((always_inline))
219.43 --elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc,
219.44 -- void *const reloc_addr);
219.45 --# endif
219.46 --# if ! ELF_MACHINE_NO_RELA
219.47 --auto inline void __attribute__((always_inline))
219.48 --elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
219.49 -- const ElfW(Sym) *sym, const struct r_found_version *version,
219.50 -- void *const reloc_addr);
219.51 --auto inline void __attribute__((always_inline))
219.52 --elf_machine_rela_relative (ElfW(Addr) l_addr, const ElfW(Rela) *reloc,
219.53 -- void *const reloc_addr);
219.54 --# endif
219.55 --# if ELF_MACHINE_NO_RELA || defined ELF_MACHINE_PLT_REL
219.56 --auto inline void __attribute__((always_inline))
219.57 --elf_machine_lazy_rel (struct link_map *map,
219.58 -- ElfW(Addr) l_addr, const ElfW(Rel) *reloc);
219.59 --# else
219.60 --auto inline void __attribute__((always_inline))
219.61 --elf_machine_lazy_rel (struct link_map *map,
219.62 -- ElfW(Addr) l_addr, const ElfW(Rela) *reloc);
219.63 --# endif
219.64 --#endif
219.65 --
219.66 - #include <dl-machine.h>
219.67 -
219.68 - #ifndef VERSYMIDX
219.69 -
219.70 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
220.1 --- a/patches/glibc/2.6/glibc-2.3.6-configure-apple-as.patch Sat Sep 22 17:25:42 2007 +0000
220.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
220.3 @@ -1,25 +0,0 @@
220.4 -http://in3www.epfl.ch/~schaffne/glibc-configure-apple-as.patch
220.5 -http://sources.redhat.com/ml/crossgcc/2004-02/msg00151.html
220.6 -
220.7 -The following makes it possible to configure glibc-2.3.2 on Mac OS X,
220.8 -where the assembler but doesn't understand the --version flag.
220.9 -
220.10 -Fixes the symptom
220.11 -checking whether ld is GNU ld... no
220.12 -checking for /usr/libexec/gcc/darwin/ppc/as... /usr/libexec/gcc/darwin/ppc/as
220.13 -checking version of /usr/libexec/gcc/darwin/ppc/as...
220.14 -<PAUSES HERE AND JUST SITS THERE DOING NOTHING>
220.15 -
220.16 ---- glibc-2.3.2/configure~ Wed Feb 26 09:20:48 2003
220.17 -+++ glibc-2.3.2/configure Fri Feb 27 13:12:53 2004
220.18 -@@ -4039,7 +4039,7 @@
220.19 - # Found it, now check the version.
220.20 - echo "$as_me:$LINENO: checking version of $AS" >&5
220.21 - echo $ECHO_N "checking version of $AS... $ECHO_C" >&6
220.22 -- ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
220.23 -+ ac_prog_version=`$AS -v </dev/null 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
220.24 - case $ac_prog_version in
220.25 - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
220.26 - 2.1[3-9]*)
220.27 -
220.28 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
221.1 --- a/patches/glibc/2.6/glibc-2.3.6-fix-pr631.patch Sat Sep 22 17:25:42 2007 +0000
221.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
221.3 @@ -1,45 +0,0 @@
221.4 -From dank@kegel.com
221.5 -Wed Jun 15 09:12:43 PDT 2005
221.6 -
221.7 -Fixes
221.8 -
221.9 -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r'
221.10 -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent'
221.11 -... 53 lines deleted ...
221.12 -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r'
221.13 -collect2: ld returned 1 exit status
221.14 -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1
221.15 -
221.16 -when building glibc with --enable-static-nss.
221.17 -
221.18 -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631
221.19 -
221.20 ---- glibc-2.3.5/Makeconfig.old Wed Jun 15 08:13:12 2005
221.21 -+++ glibc-2.3.5/Makeconfig Wed Jun 15 08:13:14 2005
221.22 -@@ -510,7 +510,7 @@
221.23 -
221.24 - # The static libraries.
221.25 - ifeq (yes,$(build-static))
221.26 --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a
221.27 -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a
221.28 - else
221.29 - ifeq (yes,$(build-shared))
221.30 - # We can try to link the programs with lib*_pic.a...
221.31 ---- glibc-2.3.5/elf/Makefile.old Wed Jun 15 07:46:49 2005
221.32 -+++ glibc-2.3.5/elf/Makefile Wed Jun 15 08:14:00 2005
221.33 -@@ -120,6 +120,13 @@
221.34 - install-bin-script = ldd
221.35 - endif
221.36 -
221.37 -+ifeq (yes,$(build-static-nss))
221.38 -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss)
221.39 -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv)
221.40 -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
221.41 -+ $(resolvobjdir)/libresolv.a
221.42 -+endif
221.43 -+
221.44 - others = sprof sln
221.45 - install-bin = sprof
221.46 - others-static = sln
221.47 -
221.48 -Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
222.1 --- a/patches/glibc/2.6/glibc-2.4-i686-assembler.patch Sat Sep 22 17:25:42 2007 +0000
222.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
222.3 @@ -1,38 +0,0 @@
222.4 -2007-02-15 Khem Raj <kraj@xxxxxxxxxx>
222.5 -
222.6 - * sysdeps/unix/sysv/linux/i386/sysdep.h: Re-define __i686.
222.7 - * nptl/sysdeps/pthread/pt-initfini.c: Ditto.
222.8 -
222.9 -
222.10 -
222.11 -Index: glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h
222.12 -===================================================================
222.13 ---- glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (revision 1469)
222.14 -+++ glibc-2.4/sysdeps/unix/sysv/linux/i386/sysdep.h (working copy)
222.15 -@@ -29,6 +29,10 @@
222.16 - #include <dl-sysdep.h>
222.17 - #include <tls.h>
222.18 -
222.19 -+#if defined __i686 && defined __ASSEMBLER__
222.20 -+#undef __i686
222.21 -+#define __i686 __i686
222.22 -+#endif
222.23 -
222.24 - /* For Linux we can use the system call table in the header file
222.25 - /usr/include/asm/unistd.h
222.26 -Index: glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c
222.27 -===================================================================
222.28 ---- glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (revision 1469)
222.29 -+++ glibc-2.4/nptl/sysdeps/pthread/pt-initfini.c (working copy)
222.30 -@@ -45,6 +45,11 @@
222.31 - /* Embed an #include to pull in the alignment and .end directives. */
222.32 - asm ("\n#include \"defs.h\"");
222.33 -
222.34 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
222.35 -+asm ("\n#undef __i686");
222.36 -+asm ("\n#define __i686 __i686");
222.37 -+asm ("\n#endif");
222.38 -+
222.39 - /* The initial common code ends here. */
222.40 - asm ("\n/*@HEADER_ENDS*/");
222.41 -
223.1 --- a/patches/glibc/2.6/glibc-i386-preferred-stack-boundary.patch Sat Sep 22 17:25:42 2007 +0000
223.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
223.3 @@ -1,18 +0,0 @@
223.4 -(C) 2007 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
223.5 -License: LGPL v2.1
223.6 -
223.7 -Shut off a stupid warning: preffered-stack-boundary must be between 4 ad 12,
223.8 -and 2 is not.
223.9 -
223.10 -diff -dur glibc-2.5.orig/sysdeps/i386/Makefile glibc-2.5/sysdeps/i386/Makefile
223.11 ---- glibc-2.5.orig/sysdeps/i386/Makefile 2005-03-06 01:18:16.000000000 +0100
223.12 -+++ glibc-2.5/sysdeps/i386/Makefile 2007-05-27 17:49:37.000000000 +0200
223.13 -@@ -36,7 +36,7 @@
223.14 - ifeq ($(subdir),csu)
223.15 - sysdep-CFLAGS += -mpreferred-stack-boundary=4
223.16 - else
223.17 --sysdep-CFLAGS += -mpreferred-stack-boundary=2
223.18 -+sysdep-CFLAGS += -mpreferred-stack-boundary=4
223.19 - # Likewise, any function which calls user callbacks
223.20 - uses-callbacks += -mpreferred-stack-boundary=4
223.21 - # Likewise, any stack alignment tests
224.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
224.2 +++ b/patches/glibc/linuxthreads-2.3.6/100-glibc-linuxthreads-2.3.5-cygwin.patch Sun Sep 23 17:08:09 2007 +0000
224.3 @@ -0,0 +1,37 @@
224.4 +Fixes
224.5 +elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
224.6 +...
224.7 +when building glibc-2.3.3 on cygwin
224.8 +
224.9 +Idea from
224.10 +http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
224.11 +Basically, make glibc use .oST as suffix for 'object static'
224.12 +instead of .oS, since cygwin has trouble distinguishing .os from .oS
224.13 +(Original patch had .on, but .oST is more mnemonic for 'object static')
224.14 +
224.15 +glibc-linuxthreads-2.3.3 also requires a patch, see
224.16 +../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
224.17 +
224.18 +[ rediffed against glibc-2.3.5 ]
224.19 +
224.20 +diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
224.21 +--- glibc-2.3.5/linuxthreads/Makefile 2005-02-16 12:26:38.000000000 +0100
224.22 ++++ glibc-2.3.5-cygwin/linuxthreads/Makefile 2005-05-11 08:32:50.453125000 +0200
224.23 +@@ -159,7 +159,7 @@
224.24 + install: $(inst_libdir)/libpthread.so
224.25 + $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
224.26 + $(objpfx)libpthread.so$(libpthread.so-version) \
224.27 +- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
224.28 ++ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
224.29 + $(libprefix)pthread) \
224.30 + $(+force)
224.31 + (echo '/* GNU ld script';\
224.32 +@@ -167,7 +167,7 @@
224.33 + echo ' the static library, so try that secondarily. */';\
224.34 + cat $<; \
224.35 + echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
224.36 +- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
224.37 ++ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
224.38 + ')' \
224.39 + ) > $@.new
224.40 + mv -f $@.new $@
225.1 --- a/patches/glibc/linuxthreads-2.3.6/glibc-linuxthreads-2.3.5-cygwin.patch Sat Sep 22 17:25:42 2007 +0000
225.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
225.3 @@ -1,37 +0,0 @@
225.4 -Fixes
225.5 -elf/librtld.os: In function `process_envvars': : undefined reference to `__access'
225.6 -...
225.7 -when building glibc-2.3.3 on cygwin
225.8 -
225.9 -Idea from
225.10 -http://sources.redhat.com/ml/bug-glibc/2002-01/msg00071/glibc-2.2-cygin-shared.patch
225.11 -Basically, make glibc use .oST as suffix for 'object static'
225.12 -instead of .oS, since cygwin has trouble distinguishing .os from .oS
225.13 -(Original patch had .on, but .oST is more mnemonic for 'object static')
225.14 -
225.15 -glibc-linuxthreads-2.3.3 also requires a patch, see
225.16 -../glibc-linuxthreads-2.3.3/glibc-linuxthreads-2.3.3-cygwin.patch
225.17 -
225.18 -[ rediffed against glibc-2.3.5 ]
225.19 -
225.20 -diff -aur glibc-2.3.5/linuxthreads/Makefile glibc-2.3.5-cygwin/linuxthreads/Makefile
225.21 ---- glibc-2.3.5/linuxthreads/Makefile 2005-02-16 12:26:38.000000000 +0100
225.22 -+++ glibc-2.3.5-cygwin/linuxthreads/Makefile 2005-05-11 08:32:50.453125000 +0200
225.23 -@@ -159,7 +159,7 @@
225.24 - install: $(inst_libdir)/libpthread.so
225.25 - $(inst_libdir)/libpthread.so: $(common-objpfx)format.lds \
225.26 - $(objpfx)libpthread.so$(libpthread.so-version) \
225.27 -- $(inst_libdir)/$(patsubst %,$(libtype.oS),\
225.28 -+ $(inst_libdir)/$(patsubst %,$(libtype.oST),\
225.29 - $(libprefix)pthread) \
225.30 - $(+force)
225.31 - (echo '/* GNU ld script';\
225.32 -@@ -167,7 +167,7 @@
225.33 - echo ' the static library, so try that secondarily. */';\
225.34 - cat $<; \
225.35 - echo 'GROUP ( $(slibdir)/libpthread.so$(libpthread.so-version)' \
225.36 -- '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)pthread)'\
225.37 -+ '$(libdir)/$(patsubst %,$(libtype.oST),$(libprefix)pthread)'\
225.38 - ')' \
225.39 - ) > $@.new
225.40 - mv -f $@.new $@
226.1 --- a/patches/linux/2.4.26/01-kmap-types-cleanup.patch Sat Sep 22 17:25:42 2007 +0000
226.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
226.3 @@ -1,306 +0,0 @@
226.4 -From http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/att-1234/01-kmap-types-cleanup.patch
226.5 -See http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/1234.html
226.6 -
226.7 -From: Marc-Christian Petersen (m.c.p@wolk-project.de)
226.8 -
226.9 -> > on alpha:
226.10 -> > internal.h:19:28: asm/kmap_types.h: No such file or directory
226.11 -> Same on s390 and some other platforms.We should just get rid of
226.12 -> this problem by providing a generic kmap_types header.
226.13 -I agree on this but your patch is bogus. Please use the attached one instead.
226.14 -
226.15 -Marcello, please apply this one instead. Against 2.4.22-BK (2.4.21-bk14)
226.16 -
226.17 -[ I commented out the hunk
226.18 -#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.19 -to get this to apply to linux-2.4.26.
226.20 -- dank]
226.21 -
226.22 -diff -Naurp a/crypto/internal.h b/crypto/internal.h
226.23 ---- a/crypto/internal.h 2003-07-19 14:09:06.000000000 +0200
226.24 -+++ b/crypto/internal.h 2003-07-19 14:18:58.000000000 +0200
226.25 -@@ -14,9 +14,9 @@
226.26 - #include <linux/mm.h>
226.27 - #include <linux/highmem.h>
226.28 - #include <linux/init.h>
226.29 -+#include <linux/kmap_types.h>
226.30 - #include <asm/hardirq.h>
226.31 - #include <asm/softirq.h>
226.32 --#include <asm/kmap_types.h>
226.33 -
226.34 - extern enum km_type crypto_km_types[];
226.35 -
226.36 -diff -Naurp a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
226.37 ---- a/include/asm-i386/fixmap.h 2003-07-19 14:09:31.000000000 +0200
226.38 -+++ b/include/asm-i386/fixmap.h 2003-07-19 14:18:58.000000000 +0200
226.39 -@@ -20,7 +20,7 @@
226.40 - #include <asm/page.h>
226.41 - #ifdef CONFIG_HIGHMEM
226.42 - #include <linux/threads.h>
226.43 --#include <asm/kmap_types.h>
226.44 -+#include <linux/kmap_types.h>
226.45 - #endif
226.46 -
226.47 - /*
226.48 -diff -Naurp a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
226.49 ---- a/include/asm-i386/highmem.h 2003-07-15 10:28:54.000000000 +0200
226.50 -+++ b/include/asm-i386/highmem.h 2003-07-19 14:18:58.000000000 +0200
226.51 -@@ -23,7 +23,6 @@
226.52 - #include <linux/config.h>
226.53 - #include <linux/init.h>
226.54 - #include <linux/interrupt.h>
226.55 --#include <asm/kmap_types.h>
226.56 - #include <asm/pgtable.h>
226.57 -
226.58 - #ifdef CONFIG_DEBUG_HIGHMEM
226.59 -diff -Naurp a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h
226.60 ---- a/include/asm-i386/kmap_types.h 2003-07-19 14:09:31.000000000 +0200
226.61 -+++ b/include/asm-i386/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.62 -@@ -1,16 +0,0 @@
226.63 --#ifndef _ASM_KMAP_TYPES_H
226.64 --#define _ASM_KMAP_TYPES_H
226.65 --
226.66 --enum km_type {
226.67 -- KM_BOUNCE_READ,
226.68 -- KM_SKB_SUNRPC_DATA,
226.69 -- KM_SKB_DATA_SOFTIRQ,
226.70 -- KM_USER0,
226.71 -- KM_USER1,
226.72 -- KM_BH_IRQ,
226.73 -- KM_SOFTIRQ0,
226.74 -- KM_SOFTIRQ1,
226.75 -- KM_TYPE_NR
226.76 --};
226.77 --
226.78 --#endif
226.79 -diff -Naurp a/include/asm-m68k/kmap_types.h b/include/asm-m68k/kmap_types.h
226.80 ---- a/include/asm-m68k/kmap_types.h 2003-07-19 14:09:33.000000000 +0200
226.81 -+++ b/include/asm-m68k/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.82 -@@ -1,18 +0,0 @@
226.83 --#ifdef __KERNEL__
226.84 --#ifndef _ASM_KMAP_TYPES_H
226.85 --#define _ASM_KMAP_TYPES_H
226.86 --
226.87 --enum km_type {
226.88 -- KM_BOUNCE_READ,
226.89 -- KM_SKB_SUNRPC_DATA,
226.90 -- KM_SKB_DATA_SOFTIRQ,
226.91 -- KM_USER0,
226.92 -- KM_USER1,
226.93 -- KM_BH_IRQ,
226.94 -- KM_SOFTIRQ0,
226.95 -- KM_SOFTIRQ1,
226.96 -- KM_TYPE_NR
226.97 --};
226.98 --
226.99 --#endif
226.100 --#endif /* __KERNEL__ */
226.101 -diff -Naurp a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h
226.102 ---- a/include/asm-mips/fixmap.h 2002-09-27 23:26:03.000000000 +0200
226.103 -+++ b/include/asm-mips/fixmap.h 2003-07-19 14:18:58.000000000 +0200
226.104 -@@ -18,7 +18,7 @@
226.105 - #include <asm/page.h>
226.106 - #ifdef CONFIG_HIGHMEM
226.107 - #include <linux/threads.h>
226.108 --#include <asm/kmap_types.h>
226.109 -+#include <linux/kmap_types.h>
226.110 - #endif
226.111 -
226.112 - /*
226.113 -diff -Naurp a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
226.114 ---- a/include/asm-mips/highmem.h 2002-12-18 01:03:59.000000000 +0100
226.115 -+++ b/include/asm-mips/highmem.h 2003-07-19 14:18:58.000000000 +0200
226.116 -@@ -22,7 +22,6 @@
226.117 -
226.118 - #include <linux/init.h>
226.119 - #include <linux/interrupt.h>
226.120 --#include <asm/kmap_types.h>
226.121 - #include <asm/pgtable.h>
226.122 -
226.123 - /* undef for production */
226.124 -#diff -Naurp a/include/asm-mips/kmap_types.h b/include/asm-mips/kmap_types.h
226.125 -#--- a/include/asm-mips/kmap_types.h 2002-12-18 01:03:59.000000000 +0100
226.126 -#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.127 -#@@ -1,14 +0,0 @@
226.128 -#-#ifndef _ASM_KMAP_TYPES_H
226.129 -#-#define _ASM_KMAP_TYPES_H
226.130 -#-
226.131 -#-enum km_type {
226.132 -#- KM_BOUNCE_READ,
226.133 -#- KM_SKB_SUNRPC_DATA,
226.134 -#- KM_SKB_DATA_SOFTIRQ,
226.135 -#- KM_USER0,
226.136 -#- KM_USER1,
226.137 -#- KM_BIO_IRQ,
226.138 -#- KM_TYPE_NR
226.139 -#-};
226.140 -#-
226.141 -#-#endif
226.142 -diff -Naurp a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
226.143 ---- a/include/asm-ppc/highmem.h 2003-07-19 14:09:33.000000000 +0200
226.144 -+++ b/include/asm-ppc/highmem.h 2003-07-19 14:18:58.000000000 +0200
226.145 -@@ -24,7 +24,7 @@
226.146 -
226.147 - #include <linux/init.h>
226.148 - #include <linux/interrupt.h>
226.149 --#include <asm/kmap_types.h>
226.150 -+#include <linux/kmap_types.h>
226.151 - #include <asm/pgtable.h>
226.152 -
226.153 - /* undef for production */
226.154 -diff -Naurp a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h
226.155 ---- a/include/asm-ppc/kmap_types.h 2003-07-19 14:09:33.000000000 +0200
226.156 -+++ b/include/asm-ppc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.157 -@@ -1,18 +0,0 @@
226.158 --#ifdef __KERNEL__
226.159 --#ifndef _ASM_KMAP_TYPES_H
226.160 --#define _ASM_KMAP_TYPES_H
226.161 --
226.162 --enum km_type {
226.163 -- KM_BOUNCE_READ,
226.164 -- KM_SKB_SUNRPC_DATA,
226.165 -- KM_SKB_DATA_SOFTIRQ,
226.166 -- KM_USER0,
226.167 -- KM_USER1,
226.168 -- KM_BH_IRQ,
226.169 -- KM_SOFTIRQ0,
226.170 -- KM_SOFTIRQ1,
226.171 -- KM_TYPE_NR
226.172 --};
226.173 --
226.174 --#endif
226.175 --#endif /* __KERNEL__ */
226.176 -diff -Naurp a/include/asm-ppc64/kmap_types.h b/include/asm-ppc64/kmap_types.h
226.177 ---- a/include/asm-ppc64/kmap_types.h 2003-07-19 14:09:35.000000000 +0200
226.178 -+++ b/include/asm-ppc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.179 -@@ -1,23 +0,0 @@
226.180 --#ifdef __KERNEL__
226.181 --#ifndef _ASM_KMAP_TYPES_H
226.182 --#define _ASM_KMAP_TYPES_H
226.183 --
226.184 --enum km_type {
226.185 -- KM_BOUNCE_READ,
226.186 -- KM_SKB_SUNRPC_DATA,
226.187 -- KM_SKB_DATA_SOFTIRQ,
226.188 -- KM_USER0,
226.189 -- KM_USER1,
226.190 -- KM_BIO_SRC_IRQ,
226.191 -- KM_BIO_DST_IRQ,
226.192 -- KM_PTE0,
226.193 -- KM_PTE1,
226.194 -- KM_IRQ0,
226.195 -- KM_IRQ1,
226.196 -- KM_SOFTIRQ0,
226.197 -- KM_SOFTIRQ1,
226.198 -- KM_TYPE_NR
226.199 --};
226.200 --
226.201 --#endif
226.202 --#endif /* __KERNEL__ */
226.203 -diff -Naurp a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h
226.204 ---- a/include/asm-sparc/highmem.h 2003-07-15 10:28:56.000000000 +0200
226.205 -+++ b/include/asm-sparc/highmem.h 2003-07-19 14:18:58.000000000 +0200
226.206 -@@ -21,7 +21,7 @@
226.207 - #ifdef __KERNEL__
226.208 -
226.209 - #include <linux/interrupt.h>
226.210 --#include <asm/kmap_types.h>
226.211 -+#include <linux/kmap_types.h>
226.212 -
226.213 - /* undef for production */
226.214 - #define HIGHMEM_DEBUG 1
226.215 -diff -Naurp a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h
226.216 ---- a/include/asm-sparc/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
226.217 -+++ b/include/asm-sparc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.218 -@@ -1,16 +0,0 @@
226.219 --#ifndef _ASM_KMAP_TYPES_H
226.220 --#define _ASM_KMAP_TYPES_H
226.221 --
226.222 --enum km_type {
226.223 -- KM_BOUNCE_READ,
226.224 -- KM_SKB_SUNRPC_DATA,
226.225 -- KM_SKB_DATA_SOFTIRQ,
226.226 -- KM_USER0,
226.227 -- KM_USER1,
226.228 -- KM_BH_IRQ,
226.229 -- KM_SOFTIRQ0,
226.230 -- KM_SOFTIRQ1,
226.231 -- KM_TYPE_NR
226.232 --};
226.233 --
226.234 --#endif
226.235 -diff -Naurp a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h
226.236 ---- a/include/asm-sparc64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
226.237 -+++ b/include/asm-sparc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.238 -@@ -1,20 +0,0 @@
226.239 --#ifndef _ASM_KMAP_TYPES_H
226.240 --#define _ASM_KMAP_TYPES_H
226.241 --
226.242 --/* Dummy header just to define km_type. None of this
226.243 -- * is actually used on sparc64. -DaveM
226.244 -- */
226.245 --
226.246 --enum km_type {
226.247 -- KM_BOUNCE_READ,
226.248 -- KM_SKB_SUNRPC_DATA,
226.249 -- KM_SKB_DATA_SOFTIRQ,
226.250 -- KM_USER0,
226.251 -- KM_USER1,
226.252 -- KM_BH_IRQ,
226.253 -- KM_SOFTIRQ0,
226.254 -- KM_SOFTIRQ1,
226.255 -- KM_TYPE_NR
226.256 --};
226.257 --
226.258 --#endif
226.259 -diff -Naurp a/include/asm-x86_64/kmap_types.h b/include/asm-x86_64/kmap_types.h
226.260 ---- a/include/asm-x86_64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
226.261 -+++ b/include/asm-x86_64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.262 -@@ -1,15 +0,0 @@
226.263 --#ifndef _ASM_KMAP_TYPES_H
226.264 --#define _ASM_KMAP_TYPES_H
226.265 --
226.266 --enum km_type {
226.267 -- KM_BOUNCE_READ,
226.268 -- KM_SKB_DATA,
226.269 -- KM_SKB_DATA_SOFTIRQ,
226.270 -- KM_USER0,
226.271 -- KM_USER1,
226.272 -- KM_SOFTIRQ0,
226.273 -- KM_SOFTIRQ1,
226.274 -- KM_TYPE_NR
226.275 --};
226.276 --
226.277 --#endif
226.278 -diff -Naurp a/include/linux/highmem.h b/include/linux/highmem.h
226.279 ---- a/include/linux/highmem.h 2003-07-19 14:09:37.000000000 +0200
226.280 -+++ b/include/linux/highmem.h 2003-07-19 14:18:58.000000000 +0200
226.281 -@@ -2,6 +2,7 @@
226.282 - #define _LINUX_HIGHMEM_H
226.283 -
226.284 - #include <linux/config.h>
226.285 -+#include <linux/kmap_types.h>
226.286 - #include <asm/pgalloc.h>
226.287 -
226.288 - #ifdef CONFIG_HIGHMEM
226.289 -diff -Naurp a/include/linux/kmap_types.h b/include/linux/kmap_types.h
226.290 ---- a/include/linux/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
226.291 -+++ b/include/linux/kmap_types.h 2003-07-19 14:18:58.000000000 +0200
226.292 -@@ -0,0 +1,16 @@
226.293 -+#ifndef _LINUX_KMAP_TYPES_H
226.294 -+#define _LINUX_KMAP_TYPES_H
226.295 -+
226.296 -+enum km_type {
226.297 -+ KM_BOUNCE_READ,
226.298 -+ KM_SKB_SUNRPC_DATA,
226.299 -+ KM_SKB_DATA_SOFTIRQ,
226.300 -+ KM_USER0,
226.301 -+ KM_USER1,
226.302 -+ KM_BH_IRQ,
226.303 -+ KM_SOFTIRQ0,
226.304 -+ KM_SOFTIRQ1,
226.305 -+ KM_TYPE_NR
226.306 -+};
226.307 -+
226.308 -+#endif
226.309 -
227.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
227.2 +++ b/patches/linux/2.4.26/100-kmap-types-cleanup.patch Sun Sep 23 17:08:09 2007 +0000
227.3 @@ -0,0 +1,306 @@
227.4 +From http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/att-1234/01-kmap-types-cleanup.patch
227.5 +See http://www.uwsg.iu.edu/hypermail/linux/kernel/0307.2/1234.html
227.6 +
227.7 +From: Marc-Christian Petersen (m.c.p@wolk-project.de)
227.8 +
227.9 +> > on alpha:
227.10 +> > internal.h:19:28: asm/kmap_types.h: No such file or directory
227.11 +> Same on s390 and some other platforms.We should just get rid of
227.12 +> this problem by providing a generic kmap_types header.
227.13 +I agree on this but your patch is bogus. Please use the attached one instead.
227.14 +
227.15 +Marcello, please apply this one instead. Against 2.4.22-BK (2.4.21-bk14)
227.16 +
227.17 +[ I commented out the hunk
227.18 +#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.19 +to get this to apply to linux-2.4.26.
227.20 +- dank]
227.21 +
227.22 +diff -Naurp a/crypto/internal.h b/crypto/internal.h
227.23 +--- a/crypto/internal.h 2003-07-19 14:09:06.000000000 +0200
227.24 ++++ b/crypto/internal.h 2003-07-19 14:18:58.000000000 +0200
227.25 +@@ -14,9 +14,9 @@
227.26 + #include <linux/mm.h>
227.27 + #include <linux/highmem.h>
227.28 + #include <linux/init.h>
227.29 ++#include <linux/kmap_types.h>
227.30 + #include <asm/hardirq.h>
227.31 + #include <asm/softirq.h>
227.32 +-#include <asm/kmap_types.h>
227.33 +
227.34 + extern enum km_type crypto_km_types[];
227.35 +
227.36 +diff -Naurp a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h
227.37 +--- a/include/asm-i386/fixmap.h 2003-07-19 14:09:31.000000000 +0200
227.38 ++++ b/include/asm-i386/fixmap.h 2003-07-19 14:18:58.000000000 +0200
227.39 +@@ -20,7 +20,7 @@
227.40 + #include <asm/page.h>
227.41 + #ifdef CONFIG_HIGHMEM
227.42 + #include <linux/threads.h>
227.43 +-#include <asm/kmap_types.h>
227.44 ++#include <linux/kmap_types.h>
227.45 + #endif
227.46 +
227.47 + /*
227.48 +diff -Naurp a/include/asm-i386/highmem.h b/include/asm-i386/highmem.h
227.49 +--- a/include/asm-i386/highmem.h 2003-07-15 10:28:54.000000000 +0200
227.50 ++++ b/include/asm-i386/highmem.h 2003-07-19 14:18:58.000000000 +0200
227.51 +@@ -23,7 +23,6 @@
227.52 + #include <linux/config.h>
227.53 + #include <linux/init.h>
227.54 + #include <linux/interrupt.h>
227.55 +-#include <asm/kmap_types.h>
227.56 + #include <asm/pgtable.h>
227.57 +
227.58 + #ifdef CONFIG_DEBUG_HIGHMEM
227.59 +diff -Naurp a/include/asm-i386/kmap_types.h b/include/asm-i386/kmap_types.h
227.60 +--- a/include/asm-i386/kmap_types.h 2003-07-19 14:09:31.000000000 +0200
227.61 ++++ b/include/asm-i386/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.62 +@@ -1,16 +0,0 @@
227.63 +-#ifndef _ASM_KMAP_TYPES_H
227.64 +-#define _ASM_KMAP_TYPES_H
227.65 +-
227.66 +-enum km_type {
227.67 +- KM_BOUNCE_READ,
227.68 +- KM_SKB_SUNRPC_DATA,
227.69 +- KM_SKB_DATA_SOFTIRQ,
227.70 +- KM_USER0,
227.71 +- KM_USER1,
227.72 +- KM_BH_IRQ,
227.73 +- KM_SOFTIRQ0,
227.74 +- KM_SOFTIRQ1,
227.75 +- KM_TYPE_NR
227.76 +-};
227.77 +-
227.78 +-#endif
227.79 +diff -Naurp a/include/asm-m68k/kmap_types.h b/include/asm-m68k/kmap_types.h
227.80 +--- a/include/asm-m68k/kmap_types.h 2003-07-19 14:09:33.000000000 +0200
227.81 ++++ b/include/asm-m68k/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.82 +@@ -1,18 +0,0 @@
227.83 +-#ifdef __KERNEL__
227.84 +-#ifndef _ASM_KMAP_TYPES_H
227.85 +-#define _ASM_KMAP_TYPES_H
227.86 +-
227.87 +-enum km_type {
227.88 +- KM_BOUNCE_READ,
227.89 +- KM_SKB_SUNRPC_DATA,
227.90 +- KM_SKB_DATA_SOFTIRQ,
227.91 +- KM_USER0,
227.92 +- KM_USER1,
227.93 +- KM_BH_IRQ,
227.94 +- KM_SOFTIRQ0,
227.95 +- KM_SOFTIRQ1,
227.96 +- KM_TYPE_NR
227.97 +-};
227.98 +-
227.99 +-#endif
227.100 +-#endif /* __KERNEL__ */
227.101 +diff -Naurp a/include/asm-mips/fixmap.h b/include/asm-mips/fixmap.h
227.102 +--- a/include/asm-mips/fixmap.h 2002-09-27 23:26:03.000000000 +0200
227.103 ++++ b/include/asm-mips/fixmap.h 2003-07-19 14:18:58.000000000 +0200
227.104 +@@ -18,7 +18,7 @@
227.105 + #include <asm/page.h>
227.106 + #ifdef CONFIG_HIGHMEM
227.107 + #include <linux/threads.h>
227.108 +-#include <asm/kmap_types.h>
227.109 ++#include <linux/kmap_types.h>
227.110 + #endif
227.111 +
227.112 + /*
227.113 +diff -Naurp a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h
227.114 +--- a/include/asm-mips/highmem.h 2002-12-18 01:03:59.000000000 +0100
227.115 ++++ b/include/asm-mips/highmem.h 2003-07-19 14:18:58.000000000 +0200
227.116 +@@ -22,7 +22,6 @@
227.117 +
227.118 + #include <linux/init.h>
227.119 + #include <linux/interrupt.h>
227.120 +-#include <asm/kmap_types.h>
227.121 + #include <asm/pgtable.h>
227.122 +
227.123 + /* undef for production */
227.124 +#diff -Naurp a/include/asm-mips/kmap_types.h b/include/asm-mips/kmap_types.h
227.125 +#--- a/include/asm-mips/kmap_types.h 2002-12-18 01:03:59.000000000 +0100
227.126 +#+++ b/include/asm-mips/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.127 +#@@ -1,14 +0,0 @@
227.128 +#-#ifndef _ASM_KMAP_TYPES_H
227.129 +#-#define _ASM_KMAP_TYPES_H
227.130 +#-
227.131 +#-enum km_type {
227.132 +#- KM_BOUNCE_READ,
227.133 +#- KM_SKB_SUNRPC_DATA,
227.134 +#- KM_SKB_DATA_SOFTIRQ,
227.135 +#- KM_USER0,
227.136 +#- KM_USER1,
227.137 +#- KM_BIO_IRQ,
227.138 +#- KM_TYPE_NR
227.139 +#-};
227.140 +#-
227.141 +#-#endif
227.142 +diff -Naurp a/include/asm-ppc/highmem.h b/include/asm-ppc/highmem.h
227.143 +--- a/include/asm-ppc/highmem.h 2003-07-19 14:09:33.000000000 +0200
227.144 ++++ b/include/asm-ppc/highmem.h 2003-07-19 14:18:58.000000000 +0200
227.145 +@@ -24,7 +24,7 @@
227.146 +
227.147 + #include <linux/init.h>
227.148 + #include <linux/interrupt.h>
227.149 +-#include <asm/kmap_types.h>
227.150 ++#include <linux/kmap_types.h>
227.151 + #include <asm/pgtable.h>
227.152 +
227.153 + /* undef for production */
227.154 +diff -Naurp a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h
227.155 +--- a/include/asm-ppc/kmap_types.h 2003-07-19 14:09:33.000000000 +0200
227.156 ++++ b/include/asm-ppc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.157 +@@ -1,18 +0,0 @@
227.158 +-#ifdef __KERNEL__
227.159 +-#ifndef _ASM_KMAP_TYPES_H
227.160 +-#define _ASM_KMAP_TYPES_H
227.161 +-
227.162 +-enum km_type {
227.163 +- KM_BOUNCE_READ,
227.164 +- KM_SKB_SUNRPC_DATA,
227.165 +- KM_SKB_DATA_SOFTIRQ,
227.166 +- KM_USER0,
227.167 +- KM_USER1,
227.168 +- KM_BH_IRQ,
227.169 +- KM_SOFTIRQ0,
227.170 +- KM_SOFTIRQ1,
227.171 +- KM_TYPE_NR
227.172 +-};
227.173 +-
227.174 +-#endif
227.175 +-#endif /* __KERNEL__ */
227.176 +diff -Naurp a/include/asm-ppc64/kmap_types.h b/include/asm-ppc64/kmap_types.h
227.177 +--- a/include/asm-ppc64/kmap_types.h 2003-07-19 14:09:35.000000000 +0200
227.178 ++++ b/include/asm-ppc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.179 +@@ -1,23 +0,0 @@
227.180 +-#ifdef __KERNEL__
227.181 +-#ifndef _ASM_KMAP_TYPES_H
227.182 +-#define _ASM_KMAP_TYPES_H
227.183 +-
227.184 +-enum km_type {
227.185 +- KM_BOUNCE_READ,
227.186 +- KM_SKB_SUNRPC_DATA,
227.187 +- KM_SKB_DATA_SOFTIRQ,
227.188 +- KM_USER0,
227.189 +- KM_USER1,
227.190 +- KM_BIO_SRC_IRQ,
227.191 +- KM_BIO_DST_IRQ,
227.192 +- KM_PTE0,
227.193 +- KM_PTE1,
227.194 +- KM_IRQ0,
227.195 +- KM_IRQ1,
227.196 +- KM_SOFTIRQ0,
227.197 +- KM_SOFTIRQ1,
227.198 +- KM_TYPE_NR
227.199 +-};
227.200 +-
227.201 +-#endif
227.202 +-#endif /* __KERNEL__ */
227.203 +diff -Naurp a/include/asm-sparc/highmem.h b/include/asm-sparc/highmem.h
227.204 +--- a/include/asm-sparc/highmem.h 2003-07-15 10:28:56.000000000 +0200
227.205 ++++ b/include/asm-sparc/highmem.h 2003-07-19 14:18:58.000000000 +0200
227.206 +@@ -21,7 +21,7 @@
227.207 + #ifdef __KERNEL__
227.208 +
227.209 + #include <linux/interrupt.h>
227.210 +-#include <asm/kmap_types.h>
227.211 ++#include <linux/kmap_types.h>
227.212 +
227.213 + /* undef for production */
227.214 + #define HIGHMEM_DEBUG 1
227.215 +diff -Naurp a/include/asm-sparc/kmap_types.h b/include/asm-sparc/kmap_types.h
227.216 +--- a/include/asm-sparc/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
227.217 ++++ b/include/asm-sparc/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.218 +@@ -1,16 +0,0 @@
227.219 +-#ifndef _ASM_KMAP_TYPES_H
227.220 +-#define _ASM_KMAP_TYPES_H
227.221 +-
227.222 +-enum km_type {
227.223 +- KM_BOUNCE_READ,
227.224 +- KM_SKB_SUNRPC_DATA,
227.225 +- KM_SKB_DATA_SOFTIRQ,
227.226 +- KM_USER0,
227.227 +- KM_USER1,
227.228 +- KM_BH_IRQ,
227.229 +- KM_SOFTIRQ0,
227.230 +- KM_SOFTIRQ1,
227.231 +- KM_TYPE_NR
227.232 +-};
227.233 +-
227.234 +-#endif
227.235 +diff -Naurp a/include/asm-sparc64/kmap_types.h b/include/asm-sparc64/kmap_types.h
227.236 +--- a/include/asm-sparc64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
227.237 ++++ b/include/asm-sparc64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.238 +@@ -1,20 +0,0 @@
227.239 +-#ifndef _ASM_KMAP_TYPES_H
227.240 +-#define _ASM_KMAP_TYPES_H
227.241 +-
227.242 +-/* Dummy header just to define km_type. None of this
227.243 +- * is actually used on sparc64. -DaveM
227.244 +- */
227.245 +-
227.246 +-enum km_type {
227.247 +- KM_BOUNCE_READ,
227.248 +- KM_SKB_SUNRPC_DATA,
227.249 +- KM_SKB_DATA_SOFTIRQ,
227.250 +- KM_USER0,
227.251 +- KM_USER1,
227.252 +- KM_BH_IRQ,
227.253 +- KM_SOFTIRQ0,
227.254 +- KM_SOFTIRQ1,
227.255 +- KM_TYPE_NR
227.256 +-};
227.257 +-
227.258 +-#endif
227.259 +diff -Naurp a/include/asm-x86_64/kmap_types.h b/include/asm-x86_64/kmap_types.h
227.260 +--- a/include/asm-x86_64/kmap_types.h 2003-07-19 14:09:37.000000000 +0200
227.261 ++++ b/include/asm-x86_64/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.262 +@@ -1,15 +0,0 @@
227.263 +-#ifndef _ASM_KMAP_TYPES_H
227.264 +-#define _ASM_KMAP_TYPES_H
227.265 +-
227.266 +-enum km_type {
227.267 +- KM_BOUNCE_READ,
227.268 +- KM_SKB_DATA,
227.269 +- KM_SKB_DATA_SOFTIRQ,
227.270 +- KM_USER0,
227.271 +- KM_USER1,
227.272 +- KM_SOFTIRQ0,
227.273 +- KM_SOFTIRQ1,
227.274 +- KM_TYPE_NR
227.275 +-};
227.276 +-
227.277 +-#endif
227.278 +diff -Naurp a/include/linux/highmem.h b/include/linux/highmem.h
227.279 +--- a/include/linux/highmem.h 2003-07-19 14:09:37.000000000 +0200
227.280 ++++ b/include/linux/highmem.h 2003-07-19 14:18:58.000000000 +0200
227.281 +@@ -2,6 +2,7 @@
227.282 + #define _LINUX_HIGHMEM_H
227.283 +
227.284 + #include <linux/config.h>
227.285 ++#include <linux/kmap_types.h>
227.286 + #include <asm/pgalloc.h>
227.287 +
227.288 + #ifdef CONFIG_HIGHMEM
227.289 +diff -Naurp a/include/linux/kmap_types.h b/include/linux/kmap_types.h
227.290 +--- a/include/linux/kmap_types.h 1970-01-01 01:00:00.000000000 +0100
227.291 ++++ b/include/linux/kmap_types.h 2003-07-19 14:18:58.000000000 +0200
227.292 +@@ -0,0 +1,16 @@
227.293 ++#ifndef _LINUX_KMAP_TYPES_H
227.294 ++#define _LINUX_KMAP_TYPES_H
227.295 ++
227.296 ++enum km_type {
227.297 ++ KM_BOUNCE_READ,
227.298 ++ KM_SKB_SUNRPC_DATA,
227.299 ++ KM_SKB_DATA_SOFTIRQ,
227.300 ++ KM_USER0,
227.301 ++ KM_USER1,
227.302 ++ KM_BH_IRQ,
227.303 ++ KM_SOFTIRQ0,
227.304 ++ KM_SOFTIRQ1,
227.305 ++ KM_TYPE_NR
227.306 ++};
227.307 ++
227.308 ++#endif
227.309 +
228.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
228.2 +++ b/patches/linux/2.4.26/110-kaz-types.patch Sun Sep 23 17:08:09 2007 +0000
228.3 @@ -0,0 +1,60 @@
228.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
228.5 +
228.6 +In file included from sys/ustat.h:30,
228.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
228.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
228.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
228.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
228.11 +make[1]: *** [misc/subdir_lib] Error 2
228.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
228.13 +make: *** [all] Error 2
228.14 +
228.15 +----------- snip ---------------
228.16 +
228.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
228.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
228.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
228.20 + error: redefinition of `struct user_fpu_struct'"
228.21 +To: linux-sh@m17n.org
228.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
228.23 +
228.24 +Hi,
228.25 +
228.26 +Dan Kegel <dank@kegel.com> wrote:
228.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
228.28 +[snip]
228.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
228.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
228.31 +[snip]
228.32 +> The error reminds me of the kind of thing fixed by
228.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
228.34 +
228.35 +It seems that the definitions in asm/user.h and the above patch collide.
228.36 +I'm not sure why you need this patch, but is it needed for the problem
228.37 +about struct ustat that you pointed out in this list, isn't it?
228.38 +I found why I don't hit ustat problem - my local kernel tree includes
228.39 +the following patch, though I can't recall about it.
228.40 +
228.41 +Regards,
228.42 + kaz
228.43 +--
228.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
228.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
228.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
228.47 +@@ -141,6 +141,7 @@
228.48 +
228.49 + #endif /* __KERNEL_STRICT_NAMES */
228.50 +
228.51 ++#ifdef __KERNEL__
228.52 + /*
228.53 + * Below are truly Linux-specific types that should never collide with
228.54 + * any application/library that wants linux/types.h.
228.55 +@@ -152,5 +153,6 @@
228.56 + char f_fname[6];
228.57 + char f_fpack[6];
228.58 + };
228.59 ++#endif
228.60 +
228.61 + #endif /* _LINUX_TYPES_H */
228.62 +
228.63 +
229.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
229.2 +++ b/patches/linux/2.4.26/120-linux-2.4.21-allow-gcc-3.3-arm-lib.patch Sun Sep 23 17:08:09 2007 +0000
229.3 @@ -0,0 +1,203 @@
229.4 +Reconstructed from http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-December/018647.html
229.5 +See also http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1540
229.6 +
229.7 +Message-ID: <DDA001.8070502@de.bosch.com>
229.8 +Subject: Help cross compiling the kernel for arm.
229.9 +From: dirk.behme at de.bosch.com
229.10 +
229.11 +Aitor Garcia wrote:
229.12 +> Hello everybody,
229.13 +>
229.14 +> I am having problems cross compiling the kernel for arm.
229.15 +>
229.16 +> This is the error message I get:
229.17 +>
229.18 +> blkpg.c: In function `blk_ioctl':
229.19 +> blkpg.c:252: error: asm-specifier for variable `__r1' conflicts with asm clobber list
229.20 +> blkpg.c:252: confused by earlier errors, bailing out make[3]: *** [blkpg.o] Error 1
229.21 +> make[3]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
229.22 +> make[2]: *** [first_rule] Error 2
229.23 +> make[2]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
229.24 +> make[1]: *** [_subdir_block] Error 2
229.25 +> make[1]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers'
229.26 +> make: *** [_dir_drivers] Error 2
229.27 +>
229.28 +> These are the toolchain versions I am using:
229.29 +> host=i686-pc-linux-gnu
229.30 +> binutils_version=2.14
229.31 +> gcc_version=3.3.2
229.32 +> glibc_version=2.3.2
229.33 +> kernel_version=2.4.21
229.34 +> and applied the kernel patch for arm. 2.4.21-rmk1.
229.35 +> ...
229.36 +> I have also seen references to this bug in ARM linux
229.37 +> Developer. Patch Number = 1540. But this patch is
229.38 +> classified as discarded.
229.39 +
229.40 +You need something like 1540 to compile 2.4.21 with gcc 3.3.2. 1540 was
229.41 +discarded because of AFLAGS change.
229.42 +
229.43 +Try the attachment.
229.44 +
229.45 +Dirk
229.46 +-------------- next part --------------
229.47 +--- linux/arch/arm/lib/getuser.S.orig Mon Nov 17 07:41:51 2003
229.48 ++++ linux/arch/arm/lib/getuser.S Mon Nov 17 07:43:16 2003
229.49 +@@ -17,7 +17,7 @@
229.50 + *
229.51 + * Inputs: r0 contains the address
229.52 + * Outputs: r0 is the error code
229.53 +- * r1, r2 contains the zero-extended value
229.54 ++ * r1, ip contains the zero-extended value
229.55 + * lr corrupted
229.56 + *
229.57 + * No other registers must be altered. (see include/asm-arm/uaccess.h
229.58 +@@ -42,14 +42,14 @@ __get_user_1:
229.59 +
229.60 + .global __get_user_2
229.61 + __get_user_2:
229.62 +- bic r2, sp, #0x1f00
229.63 +- bic r2, r2, #0x00ff
229.64 +- ldr r2, [r2, #TSK_ADDR_LIMIT]
229.65 +- sub r2, r2, #2
229.66 +- cmp r0, r2
229.67 ++ bic ip, sp, #0x1f00
229.68 ++ bic ip, ip, #0x00ff
229.69 ++ ldr ip, [ip, #TSK_ADDR_LIMIT]
229.70 ++ sub ip, ip, #2
229.71 ++ cmp r0, ip
229.72 + 2: ldrlsbt r1, [r0], #1
229.73 +-3: ldrlsbt r2, [r0]
229.74 +- orrls r1, r1, r2, lsl #8
229.75 ++3: ldrlsbt ip, [r0]
229.76 ++ orrls r1, r1, ip, lsl #8
229.77 + movls r0, #0
229.78 + movls pc, lr
229.79 + b __get_user_bad
229.80 +@@ -68,20 +68,20 @@ __get_user_4:
229.81 +
229.82 + .global __get_user_8
229.83 + __get_user_8:
229.84 +- bic r2, sp, #0x1f00
229.85 +- bic r2, r2, #0x00ff
229.86 +- ldr r2, [r2, #TSK_ADDR_LIMIT]
229.87 +- sub r2, r2, #8
229.88 +- cmp r0, r2
229.89 ++ bic ip, sp, #0x1f00
229.90 ++ bic ip, ip, #0x00ff
229.91 ++ ldr ip, [ip, #TSK_ADDR_LIMIT]
229.92 ++ sub ip, ip, #8
229.93 ++ cmp r0, ip
229.94 + 5: ldrlst r1, [r0], #4
229.95 +-6: ldrlst r2, [r0]
229.96 ++6: ldrlst ip, [r0]
229.97 + movls r0, #0
229.98 + movls pc, lr
229.99 +
229.100 + /* fall through */
229.101 +
229.102 + __get_user_bad_8:
229.103 +- mov r2, #0
229.104 ++ mov ip, #0
229.105 + __get_user_bad:
229.106 + mov r1, #0
229.107 + mov r0, #-14
229.108 +--- linux/arch/arm/lib/putuser.S.orig Mon Nov 17 07:41:57 2003
229.109 ++++ linux/arch/arm/lib/putuser.S Mon Nov 17 07:42:26 2003
229.110 +@@ -16,7 +16,7 @@
229.111 + * __put_user_X
229.112 + *
229.113 + * Inputs: r0 contains the address
229.114 +- * r1, r2 contains the value
229.115 ++ * r1, ip contains the value
229.116 + * Outputs: r0 is the error code
229.117 + * lr corrupted
229.118 + *
229.119 +@@ -30,11 +30,11 @@
229.120 +
229.121 + .global __put_user_1
229.122 + __put_user_1:
229.123 +- bic r2, sp, #0x1f00
229.124 +- bic r2, r2, #0x00ff
229.125 +- ldr r2, [r2, #TSK_ADDR_LIMIT]
229.126 +- sub r2, r2, #1
229.127 +- cmp r0, r2
229.128 ++ bic ip, sp, #0x1f00
229.129 ++ bic ip, ip, #0x00ff
229.130 ++ ldr ip, [ip, #TSK_ADDR_LIMIT]
229.131 ++ sub ip, ip, #1
229.132 ++ cmp r0, ip
229.133 + 1: strlsbt r1, [r0]
229.134 + movls r0, #0
229.135 + movls pc, lr
229.136 +@@ -42,11 +42,11 @@ __put_user_1:
229.137 +
229.138 + .global __put_user_2
229.139 + __put_user_2:
229.140 +- bic r2, sp, #0x1f00
229.141 +- bic r2, r2, #0x00ff
229.142 +- ldr r2, [r2, #TSK_ADDR_LIMIT]
229.143 +- sub r2, r2, #2
229.144 +- cmp r0, r2
229.145 ++ bic ip, sp, #0x1f00
229.146 ++ bic ip, ip, #0x00ff
229.147 ++ ldr ip, [ip, #TSK_ADDR_LIMIT]
229.148 ++ sub ip, ip, #2
229.149 ++ cmp r0, ip
229.150 + 2: strlsbt r1, [r0], #1
229.151 + movls r1, r1, lsr #8
229.152 + 3: strlsbt r1, [r0]
229.153 +@@ -56,11 +56,11 @@ __put_user_2:
229.154 +
229.155 + .global __put_user_4
229.156 + __put_user_4:
229.157 +- bic r2, sp, #0x1f00
229.158 +- bic r2, r2, #0x00ff
229.159 +- ldr r2, [r2, #TSK_ADDR_LIMIT]
229.160 +- sub r2, r2, #4
229.161 +- cmp r0, r2
229.162 ++ bic ip, sp, #0x1f00
229.163 ++ bic ip, ip, #0x00ff
229.164 ++ ldr ip, [ip, #TSK_ADDR_LIMIT]
229.165 ++ sub ip, ip, #4
229.166 ++ cmp r0, ip
229.167 + 4: strlst r1, [r0]
229.168 + movls r0, #0
229.169 + movls pc, lr
229.170 +@@ -74,7 +74,7 @@ __put_user_8:
229.171 + sub ip, ip, #8
229.172 + cmp r0, ip
229.173 + 5: strlst r1, [r0], #4
229.174 +-6: strlst r2, [r0]
229.175 ++6: strlst ip, [r0]
229.176 + movls r0, #0
229.177 + movls pc, lr
229.178 +
229.179 +--- linux/include/asm-arm/uaccess.h.orig Mon Nov 17 07:41:04 2003
229.180 ++++ linux/include/asm-arm/uaccess.h Mon Nov 17 07:41:37 2003
229.181 +@@ -86,7 +86,7 @@ extern int __get_user_bad(void);
229.182 + __get_user_x(__r1, __p, __e, 1, "lr"); \
229.183 + break; \
229.184 + case 2: \
229.185 +- __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \
229.186 ++ __get_user_x(__r1, __p, __e, 2, "ip", "lr"); \
229.187 + break; \
229.188 + case 4: \
229.189 + __get_user_x(__r1, __p, __e, 4, "lr"); \
229.190 +@@ -122,13 +122,13 @@ extern int __put_user_bad(void);
229.191 + register int __e asm("r0"); \
229.192 + switch (sizeof(*(p))) { \
229.193 + case 1: \
229.194 +- __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \
229.195 ++ __put_user_x(__r1, __p, __e, 1, "ip", "lr"); \
229.196 + break; \
229.197 + case 2: \
229.198 +- __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \
229.199 ++ __put_user_x(__r1, __p, __e, 2, "ip", "lr"); \
229.200 + break; \
229.201 + case 4: \
229.202 +- __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \
229.203 ++ __put_user_x(__r1, __p, __e, 4, "ip", "lr"); \
229.204 + break; \
229.205 + case 8: \
229.206 + __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \
230.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
230.2 +++ b/patches/linux/2.4.26/130-linux-2.4.26-allow-gcc-3.4-arm-kernel.patch Sun Sep 23 17:08:09 2007 +0000
230.3 @@ -0,0 +1,23 @@
230.4 +Fixes
230.5 +semaphore.c:180:5: missing terminating " character
230.6 +semaphore.c:213:9: missing terminating " character
230.7 +make[1]: *** [semaphore.o] Error 1
230.8 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast/crosstool-dev/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/linux-2.4.26/arch/arm/kernel'
230.9 +make: *** [_dir_arch/arm/kernel] Error 2
230.10 +
230.11 +when building kernel.org 2.4.26 for arm with gcc-3.3.x
230.12 +(Note: one probably wants to apply ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
230.13 +instead of my patches when really building 2.4.26 for arm;
230.14 +my patches only include the bare minimum to get the vanilla kernel to compile.)
230.15 +
230.16 +--- linux-2.4.26/arch/arm/kernel/semaphore.c.old Mon Mar 21 06:50:38 2005
230.17 ++++ linux-2.4.26/arch/arm/kernel/semaphore.c Mon Mar 21 06:50:55 2005
230.18 +@@ -193,7 +193,7 @@
230.19 + bl __down_interruptible \n\
230.20 + mov ip, r0 \n\
230.21 + ldmfd sp!, {r0 - r3, pc}^ \n\
230.22 +-
230.23 ++ \n\
230.24 + .align 5 \n\
230.25 + .globl __down_trylock_failed \n\
230.26 + __down_trylock_failed: \n\
231.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
231.2 +++ b/patches/linux/2.4.26/140-linux-2.4.26-arm-nonofpu.patch Sun Sep 23 17:08:09 2007 +0000
231.3 @@ -0,0 +1,40 @@
231.4 +Backport of linux-2.6.8-arm-nonofpu.patch.
231.5 +Fixes error when building linux-2.4.26 kernel with gcc-3.4 on arm.
231.6 +
231.7 +/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/bin/arm-unknown-linux-gnu-gcc -D__KERNEL__ -I/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=strongarm110 -mshort-load-bytes -msoft-float -Uarm -S -o constants.h.tmp.1 getconstants.c
231.8 +cc1: error: invalid option `short-load-bytes'
231.9 +make[2]: *** [constants.h] Error 1
231.10 +make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
231.11 +make[1]: *** [dep] Error 2
231.12 +make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
231.13 +make: *** [archdep] Error 2
231.14 +
231.15 +
231.16 +--- linux-2.4.26/Makefile.old Thu Sep 30 23:21:14 2004
231.17 ++++ linux-2.4.26/Makefile Thu Sep 30 23:24:12 2004
231.18 +@@ -21,6 +21,10 @@
231.19 +
231.20 + CROSS_COMPILE =
231.21 +
231.22 ++# From linux-2.6
231.23 ++check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
231.24 ++export check_gcc
231.25 ++
231.26 + #
231.27 + # Include the make variables (CC, etc...)
231.28 + #
231.29 +--- linux-2.4.26/arch/arm/Makefile.old Thu Sep 30 23:16:49 2004
231.30 ++++ linux-2.4.26/arch/arm/Makefile Thu Sep 30 23:25:27 2004
231.31 +@@ -50,9 +50,9 @@
231.32 + tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
231.33 + tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
231.34 +
231.35 +-CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
231.36 +-CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
231.37 +-AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
231.38 ++CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
231.39 ++CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
231.40 ++AFLAGS +=$(apcs-y) $(arch-y) -msoft-float
231.41 +
231.42 + ifeq ($(CONFIG_CPU_26),y)
231.43 + PROCESSOR := armo
232.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
232.2 +++ b/patches/linux/2.4.26/150-linux-2.4.26-mkdep-xargs.patch Sun Sep 23 17:08:09 2007 +0000
232.3 @@ -0,0 +1,28 @@
232.4 +About ten times, various people have noticed that 'make dep' uses
232.5 +really, really long commandlines. This breaks sh even on linux sometimes.
232.6 +
232.7 +For 2.4, see e.g.
232.8 +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&w=2
232.9 +http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&q=p3
232.10 +http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt
232.11 +http://www.uclinux.org/pub/uClinux/archive/1728.html
232.12 +
232.13 +Fixes error when building linux kernel for some default arm configurations:
232.14 +
232.15 +scripts/mkdep -- `find /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/asm /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/linux /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/scsi /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/net /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
232.16 +/bin/sh: line 1: scripts/mkdep: Argument list too long
232.17 +make: *** [dep-files] Error 126
232.18 +
232.19 +[ For linux-2.4.26 ]
232.20 +
232.21 +--- linux-2.4.26/Makefile.old 2004-04-14 06:05:41.000000000 -0700
232.22 ++++ linux-2.4.26/Makefile 2004-09-13 21:27:39.000000000 -0700
232.23 +@@ -500,7 +500,7 @@
232.24 + ifdef CONFIG_MODVERSIONS
232.25 + $(MAKE) update-modverfile
232.26 + endif
232.27 +- scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
232.28 ++ find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep | cat > .hdepend
232.29 + scripts/mkdep -- init/*.c > .depend
232.30 +
232.31 + ifdef CONFIG_MODVERSIONS
233.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
233.2 +++ b/patches/linux/2.4.26/160-linux-2.4.26-wdt977-uaccess.patch Sun Sep 23 17:08:09 2007 +0000
233.3 @@ -0,0 +1,17 @@
233.4 +Fixes drivers/char/char.o(.text+0x178a4): In function `$a':
233.5 +: undefined reference to `get_user'
233.6 +
233.7 +Part of ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
233.8 +
233.9 +diff -urN linux-2.4.26/drivers/char/wdt977.c linux-2.4.26-vrs1/drivers/char/wdt977.c
233.10 +--- linux-2.4.26/drivers/char/wdt977.c 2002-11-28 23:53:12.000000000 +0000
233.11 ++++ linux-2.4.26-vrs1/drivers/char/wdt977.c 2004-01-14 21:32:25.000000000 +0000
233.12 +@@ -27,6 +27,7 @@
233.13 + #include <asm/io.h>
233.14 + #include <asm/system.h>
233.15 + #include <asm/mach-types.h>
233.16 ++#include <asm/uaccess.h>
233.17 +
233.18 + #define WATCHDOG_MINOR 130
233.19 +
233.20 +
234.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
234.2 +++ b/patches/linux/2.4.26/170-linux-2.4-bsd-expr.patch Sun Sep 23 17:08:09 2007 +0000
234.3 @@ -0,0 +1,25 @@
234.4 +# http://in3www.epfl.ch/~schaffne/linux-2.4-bsd-expr.patch
234.5 +The following makes it possible to compile linux 2.4.19 to 2.4.25 on Mac OS X,
234.6 +where "expr" doesn't understand the "length" construct
234.7 +(which it doesn't have to, according to SuSv3
234.8 +(see http://www.opengroup.org/onlinepubs/007904975/utilities/expr.html)
234.9 +See also http://sources.redhat.com/ml/crossgcc/2004-02/msg00131.html
234.10 +
234.11 +Fixes error
234.12 + expr: syntax error
234.13 + KERNELRELEASE "2.4.21" exceeds 64 characters
234.14 + make: *** [include/linux/version.h] Error 1
234.15 +
234.16 +
234.17 +diff -ur linux-2.4.23-old/Makefile linux-2.4.23/Makefile
234.18 +--- linux-2.4.23-old/Makefile 2003-12-09 14:27:56.000000000 +0100
234.19 ++++ linux-2.4.23/Makefile 2003-12-09 14:28:37.000000000 +0100
234.20 +@@ -353,7 +353,7 @@
234.21 + @rm -f .ver1
234.22 +
234.23 + include/linux/version.h: ./Makefile
234.24 +- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
234.25 ++ @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
234.26 + (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
234.27 + @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
234.28 + @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
235.1 --- a/patches/linux/2.4.26/kaz-types.patch Sat Sep 22 17:25:42 2007 +0000
235.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
235.3 @@ -1,60 +0,0 @@
235.4 -The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
235.5 -
235.6 -In file included from sys/ustat.h:30,
235.7 - from ../sysdeps/unix/sysv/linux/ustat.c:21:
235.8 -../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
235.9 -make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
235.10 -make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
235.11 -make[1]: *** [misc/subdir_lib] Error 2
235.12 -make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
235.13 -make: *** [all] Error 2
235.14 -
235.15 ------------ snip ---------------
235.16 -
235.17 -Date: Fri, 06 Jun 2003 08:00:00 +0900
235.18 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
235.19 -Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
235.20 - error: redefinition of `struct user_fpu_struct'"
235.21 -To: linux-sh@m17n.org
235.22 -Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
235.23 -
235.24 -Hi,
235.25 -
235.26 -Dan Kegel <dank@kegel.com> wrote:
235.27 -> When I try to build glibc-2.3.2 for sh4, it fails with the error
235.28 -[snip]
235.29 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
235.30 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
235.31 -[snip]
235.32 -> The error reminds me of the kind of thing fixed by
235.33 -> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
235.34 -
235.35 -It seems that the definitions in asm/user.h and the above patch collide.
235.36 -I'm not sure why you need this patch, but is it needed for the problem
235.37 -about struct ustat that you pointed out in this list, isn't it?
235.38 -I found why I don't hit ustat problem - my local kernel tree includes
235.39 -the following patch, though I can't recall about it.
235.40 -
235.41 -Regards,
235.42 - kaz
235.43 ---
235.44 -diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
235.45 ---- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
235.46 -+++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
235.47 -@@ -141,6 +141,7 @@
235.48 -
235.49 - #endif /* __KERNEL_STRICT_NAMES */
235.50 -
235.51 -+#ifdef __KERNEL__
235.52 - /*
235.53 - * Below are truly Linux-specific types that should never collide with
235.54 - * any application/library that wants linux/types.h.
235.55 -@@ -152,5 +153,6 @@
235.56 - char f_fname[6];
235.57 - char f_fpack[6];
235.58 - };
235.59 -+#endif
235.60 -
235.61 - #endif /* _LINUX_TYPES_H */
235.62 -
235.63 -
236.1 --- a/patches/linux/2.4.26/linux-2.4-bsd-expr.patch Sat Sep 22 17:25:42 2007 +0000
236.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
236.3 @@ -1,25 +0,0 @@
236.4 -# http://in3www.epfl.ch/~schaffne/linux-2.4-bsd-expr.patch
236.5 -The following makes it possible to compile linux 2.4.19 to 2.4.25 on Mac OS X,
236.6 -where "expr" doesn't understand the "length" construct
236.7 -(which it doesn't have to, according to SuSv3
236.8 -(see http://www.opengroup.org/onlinepubs/007904975/utilities/expr.html)
236.9 -See also http://sources.redhat.com/ml/crossgcc/2004-02/msg00131.html
236.10 -
236.11 -Fixes error
236.12 - expr: syntax error
236.13 - KERNELRELEASE "2.4.21" exceeds 64 characters
236.14 - make: *** [include/linux/version.h] Error 1
236.15 -
236.16 -
236.17 -diff -ur linux-2.4.23-old/Makefile linux-2.4.23/Makefile
236.18 ---- linux-2.4.23-old/Makefile 2003-12-09 14:27:56.000000000 +0100
236.19 -+++ linux-2.4.23/Makefile 2003-12-09 14:28:37.000000000 +0100
236.20 -@@ -353,7 +353,7 @@
236.21 - @rm -f .ver1
236.22 -
236.23 - include/linux/version.h: ./Makefile
236.24 -- @expr length "$(KERNELRELEASE)" \<= $(uts_len) > /dev/null || \
236.25 -+ @expr "$(KERNELRELEASE)" : '.*' \<= $(uts_len) > /dev/null || \
236.26 - (echo KERNELRELEASE \"$(KERNELRELEASE)\" exceeds $(uts_len) characters >&2; false)
236.27 - @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver
236.28 - @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
237.1 --- a/patches/linux/2.4.26/linux-2.4.21-allow-gcc-3.3-arm-lib.patch Sat Sep 22 17:25:42 2007 +0000
237.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
237.3 @@ -1,203 +0,0 @@
237.4 -Reconstructed from http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2003-December/018647.html
237.5 -See also http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=1540
237.6 -
237.7 -Message-ID: <DDA001.8070502@de.bosch.com>
237.8 -Subject: Help cross compiling the kernel for arm.
237.9 -From: dirk.behme at de.bosch.com
237.10 -
237.11 -Aitor Garcia wrote:
237.12 -> Hello everybody,
237.13 ->
237.14 -> I am having problems cross compiling the kernel for arm.
237.15 ->
237.16 -> This is the error message I get:
237.17 ->
237.18 -> blkpg.c: In function `blk_ioctl':
237.19 -> blkpg.c:252: error: asm-specifier for variable `__r1' conflicts with asm clobber list
237.20 -> blkpg.c:252: confused by earlier errors, bailing out make[3]: *** [blkpg.o] Error 1
237.21 -> make[3]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
237.22 -> make[2]: *** [first_rule] Error 2
237.23 -> make[2]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers/block'
237.24 -> make[1]: *** [_subdir_block] Error 2
237.25 -> make[1]: Leaving directory `/root/toolchain/kernel-arm/linux-2.4.21/drivers'
237.26 -> make: *** [_dir_drivers] Error 2
237.27 ->
237.28 -> These are the toolchain versions I am using:
237.29 -> host=i686-pc-linux-gnu
237.30 -> binutils_version=2.14
237.31 -> gcc_version=3.3.2
237.32 -> glibc_version=2.3.2
237.33 -> kernel_version=2.4.21
237.34 -> and applied the kernel patch for arm. 2.4.21-rmk1.
237.35 -> ...
237.36 -> I have also seen references to this bug in ARM linux
237.37 -> Developer. Patch Number = 1540. But this patch is
237.38 -> classified as discarded.
237.39 -
237.40 -You need something like 1540 to compile 2.4.21 with gcc 3.3.2. 1540 was
237.41 -discarded because of AFLAGS change.
237.42 -
237.43 -Try the attachment.
237.44 -
237.45 -Dirk
237.46 --------------- next part --------------
237.47 ---- linux/arch/arm/lib/getuser.S.orig Mon Nov 17 07:41:51 2003
237.48 -+++ linux/arch/arm/lib/getuser.S Mon Nov 17 07:43:16 2003
237.49 -@@ -17,7 +17,7 @@
237.50 - *
237.51 - * Inputs: r0 contains the address
237.52 - * Outputs: r0 is the error code
237.53 -- * r1, r2 contains the zero-extended value
237.54 -+ * r1, ip contains the zero-extended value
237.55 - * lr corrupted
237.56 - *
237.57 - * No other registers must be altered. (see include/asm-arm/uaccess.h
237.58 -@@ -42,14 +42,14 @@ __get_user_1:
237.59 -
237.60 - .global __get_user_2
237.61 - __get_user_2:
237.62 -- bic r2, sp, #0x1f00
237.63 -- bic r2, r2, #0x00ff
237.64 -- ldr r2, [r2, #TSK_ADDR_LIMIT]
237.65 -- sub r2, r2, #2
237.66 -- cmp r0, r2
237.67 -+ bic ip, sp, #0x1f00
237.68 -+ bic ip, ip, #0x00ff
237.69 -+ ldr ip, [ip, #TSK_ADDR_LIMIT]
237.70 -+ sub ip, ip, #2
237.71 -+ cmp r0, ip
237.72 - 2: ldrlsbt r1, [r0], #1
237.73 --3: ldrlsbt r2, [r0]
237.74 -- orrls r1, r1, r2, lsl #8
237.75 -+3: ldrlsbt ip, [r0]
237.76 -+ orrls r1, r1, ip, lsl #8
237.77 - movls r0, #0
237.78 - movls pc, lr
237.79 - b __get_user_bad
237.80 -@@ -68,20 +68,20 @@ __get_user_4:
237.81 -
237.82 - .global __get_user_8
237.83 - __get_user_8:
237.84 -- bic r2, sp, #0x1f00
237.85 -- bic r2, r2, #0x00ff
237.86 -- ldr r2, [r2, #TSK_ADDR_LIMIT]
237.87 -- sub r2, r2, #8
237.88 -- cmp r0, r2
237.89 -+ bic ip, sp, #0x1f00
237.90 -+ bic ip, ip, #0x00ff
237.91 -+ ldr ip, [ip, #TSK_ADDR_LIMIT]
237.92 -+ sub ip, ip, #8
237.93 -+ cmp r0, ip
237.94 - 5: ldrlst r1, [r0], #4
237.95 --6: ldrlst r2, [r0]
237.96 -+6: ldrlst ip, [r0]
237.97 - movls r0, #0
237.98 - movls pc, lr
237.99 -
237.100 - /* fall through */
237.101 -
237.102 - __get_user_bad_8:
237.103 -- mov r2, #0
237.104 -+ mov ip, #0
237.105 - __get_user_bad:
237.106 - mov r1, #0
237.107 - mov r0, #-14
237.108 ---- linux/arch/arm/lib/putuser.S.orig Mon Nov 17 07:41:57 2003
237.109 -+++ linux/arch/arm/lib/putuser.S Mon Nov 17 07:42:26 2003
237.110 -@@ -16,7 +16,7 @@
237.111 - * __put_user_X
237.112 - *
237.113 - * Inputs: r0 contains the address
237.114 -- * r1, r2 contains the value
237.115 -+ * r1, ip contains the value
237.116 - * Outputs: r0 is the error code
237.117 - * lr corrupted
237.118 - *
237.119 -@@ -30,11 +30,11 @@
237.120 -
237.121 - .global __put_user_1
237.122 - __put_user_1:
237.123 -- bic r2, sp, #0x1f00
237.124 -- bic r2, r2, #0x00ff
237.125 -- ldr r2, [r2, #TSK_ADDR_LIMIT]
237.126 -- sub r2, r2, #1
237.127 -- cmp r0, r2
237.128 -+ bic ip, sp, #0x1f00
237.129 -+ bic ip, ip, #0x00ff
237.130 -+ ldr ip, [ip, #TSK_ADDR_LIMIT]
237.131 -+ sub ip, ip, #1
237.132 -+ cmp r0, ip
237.133 - 1: strlsbt r1, [r0]
237.134 - movls r0, #0
237.135 - movls pc, lr
237.136 -@@ -42,11 +42,11 @@ __put_user_1:
237.137 -
237.138 - .global __put_user_2
237.139 - __put_user_2:
237.140 -- bic r2, sp, #0x1f00
237.141 -- bic r2, r2, #0x00ff
237.142 -- ldr r2, [r2, #TSK_ADDR_LIMIT]
237.143 -- sub r2, r2, #2
237.144 -- cmp r0, r2
237.145 -+ bic ip, sp, #0x1f00
237.146 -+ bic ip, ip, #0x00ff
237.147 -+ ldr ip, [ip, #TSK_ADDR_LIMIT]
237.148 -+ sub ip, ip, #2
237.149 -+ cmp r0, ip
237.150 - 2: strlsbt r1, [r0], #1
237.151 - movls r1, r1, lsr #8
237.152 - 3: strlsbt r1, [r0]
237.153 -@@ -56,11 +56,11 @@ __put_user_2:
237.154 -
237.155 - .global __put_user_4
237.156 - __put_user_4:
237.157 -- bic r2, sp, #0x1f00
237.158 -- bic r2, r2, #0x00ff
237.159 -- ldr r2, [r2, #TSK_ADDR_LIMIT]
237.160 -- sub r2, r2, #4
237.161 -- cmp r0, r2
237.162 -+ bic ip, sp, #0x1f00
237.163 -+ bic ip, ip, #0x00ff
237.164 -+ ldr ip, [ip, #TSK_ADDR_LIMIT]
237.165 -+ sub ip, ip, #4
237.166 -+ cmp r0, ip
237.167 - 4: strlst r1, [r0]
237.168 - movls r0, #0
237.169 - movls pc, lr
237.170 -@@ -74,7 +74,7 @@ __put_user_8:
237.171 - sub ip, ip, #8
237.172 - cmp r0, ip
237.173 - 5: strlst r1, [r0], #4
237.174 --6: strlst r2, [r0]
237.175 -+6: strlst ip, [r0]
237.176 - movls r0, #0
237.177 - movls pc, lr
237.178 -
237.179 ---- linux/include/asm-arm/uaccess.h.orig Mon Nov 17 07:41:04 2003
237.180 -+++ linux/include/asm-arm/uaccess.h Mon Nov 17 07:41:37 2003
237.181 -@@ -86,7 +86,7 @@ extern int __get_user_bad(void);
237.182 - __get_user_x(__r1, __p, __e, 1, "lr"); \
237.183 - break; \
237.184 - case 2: \
237.185 -- __get_user_x(__r1, __p, __e, 2, "r2", "lr"); \
237.186 -+ __get_user_x(__r1, __p, __e, 2, "ip", "lr"); \
237.187 - break; \
237.188 - case 4: \
237.189 - __get_user_x(__r1, __p, __e, 4, "lr"); \
237.190 -@@ -122,13 +122,13 @@ extern int __put_user_bad(void);
237.191 - register int __e asm("r0"); \
237.192 - switch (sizeof(*(p))) { \
237.193 - case 1: \
237.194 -- __put_user_x(__r1, __p, __e, 1, "r2", "lr"); \
237.195 -+ __put_user_x(__r1, __p, __e, 1, "ip", "lr"); \
237.196 - break; \
237.197 - case 2: \
237.198 -- __put_user_x(__r1, __p, __e, 2, "r2", "lr"); \
237.199 -+ __put_user_x(__r1, __p, __e, 2, "ip", "lr"); \
237.200 - break; \
237.201 - case 4: \
237.202 -- __put_user_x(__r1, __p, __e, 4, "r2", "lr"); \
237.203 -+ __put_user_x(__r1, __p, __e, 4, "ip", "lr"); \
237.204 - break; \
237.205 - case 8: \
237.206 - __put_user_x(__r1, __p, __e, 8, "ip", "lr"); \
238.1 --- a/patches/linux/2.4.26/linux-2.4.26-allow-gcc-3.4-arm-kernel.patch Sat Sep 22 17:25:42 2007 +0000
238.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
238.3 @@ -1,23 +0,0 @@
238.4 -Fixes
238.5 -semaphore.c:180:5: missing terminating " character
238.6 -semaphore.c:213:9: missing terminating " character
238.7 -make[1]: *** [semaphore.o] Error 1
238.8 -make[1]: Leaving directory `/home/dank/queue/jobdir.fast/crosstool-dev/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.2.5/linux-2.4.26/arch/arm/kernel'
238.9 -make: *** [_dir_arch/arm/kernel] Error 2
238.10 -
238.11 -when building kernel.org 2.4.26 for arm with gcc-3.3.x
238.12 -(Note: one probably wants to apply ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
238.13 -instead of my patches when really building 2.4.26 for arm;
238.14 -my patches only include the bare minimum to get the vanilla kernel to compile.)
238.15 -
238.16 ---- linux-2.4.26/arch/arm/kernel/semaphore.c.old Mon Mar 21 06:50:38 2005
238.17 -+++ linux-2.4.26/arch/arm/kernel/semaphore.c Mon Mar 21 06:50:55 2005
238.18 -@@ -193,7 +193,7 @@
238.19 - bl __down_interruptible \n\
238.20 - mov ip, r0 \n\
238.21 - ldmfd sp!, {r0 - r3, pc}^ \n\
238.22 --
238.23 -+ \n\
238.24 - .align 5 \n\
238.25 - .globl __down_trylock_failed \n\
238.26 - __down_trylock_failed: \n\
239.1 --- a/patches/linux/2.4.26/linux-2.4.26-arm-nonofpu.patch Sat Sep 22 17:25:42 2007 +0000
239.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
239.3 @@ -1,40 +0,0 @@
239.4 -Backport of linux-2.6.8-arm-nonofpu.patch.
239.5 -Fixes error when building linux-2.4.26 kernel with gcc-3.4 on arm.
239.6 -
239.7 -/opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/bin/arm-unknown-linux-gnu-gcc -D__KERNEL__ -I/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/include -Wall -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -fno-common -Uarm -fno-common -pipe -mapcs-32 -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=strongarm110 -mshort-load-bytes -msoft-float -Uarm -S -o constants.h.tmp.1 getconstants.c
239.8 -cc1: error: invalid option `short-load-bytes'
239.9 -make[2]: *** [constants.h] Error 1
239.10 -make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
239.11 -make[1]: *** [dep] Error 2
239.12 -make[1]: Leaving directory `/home/dank/wk/crosstool-0.28-rc37/build/arm-unknown-linux-gnu/gcc-3.4.2-glibc-2.2.5/linux-2.4.26/arch/arm/tools'
239.13 -make: *** [archdep] Error 2
239.14 -
239.15 -
239.16 ---- linux-2.4.26/Makefile.old Thu Sep 30 23:21:14 2004
239.17 -+++ linux-2.4.26/Makefile Thu Sep 30 23:24:12 2004
239.18 -@@ -21,6 +21,10 @@
239.19 -
239.20 - CROSS_COMPILE =
239.21 -
239.22 -+# From linux-2.6
239.23 -+check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
239.24 -+export check_gcc
239.25 -+
239.26 - #
239.27 - # Include the make variables (CC, etc...)
239.28 - #
239.29 ---- linux-2.4.26/arch/arm/Makefile.old Thu Sep 30 23:16:49 2004
239.30 -+++ linux-2.4.26/arch/arm/Makefile Thu Sep 30 23:25:27 2004
239.31 -@@ -50,9 +50,9 @@
239.32 - tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
239.33 - tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
239.34 -
239.35 --CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
239.36 --CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) -mshort-load-bytes -msoft-float -Uarm
239.37 --AFLAGS +=$(apcs-y) $(arch-y) -mno-fpu -msoft-float
239.38 -+CFLAGS_BOOT :=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
239.39 -+CFLAGS +=$(apcs-y) $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
239.40 -+AFLAGS +=$(apcs-y) $(arch-y) -msoft-float
239.41 -
239.42 - ifeq ($(CONFIG_CPU_26),y)
239.43 - PROCESSOR := armo
240.1 --- a/patches/linux/2.4.26/linux-2.4.26-mkdep-xargs.patch Sat Sep 22 17:25:42 2007 +0000
240.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
240.3 @@ -1,28 +0,0 @@
240.4 -About ten times, various people have noticed that 'make dep' uses
240.5 -really, really long commandlines. This breaks sh even on linux sometimes.
240.6 -
240.7 -For 2.4, see e.g.
240.8 -http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&w=2
240.9 -http://marc.theaimsgroup.com/?l=linux-kernel&m=96589814004919&q=p3
240.10 -http://www.xraylith.wisc.edu/~khan/software/gnu-win32/cygwin-to-linux-cross-howto.txt
240.11 -http://www.uclinux.org/pub/uClinux/archive/1728.html
240.12 -
240.13 -Fixes error when building linux kernel for some default arm configurations:
240.14 -
240.15 -scripts/mkdep -- `find /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/asm /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/linux /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/scsi /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/net /home/dank/wk/crosstool-0.28-rc36/build/arm-unknown-linux-gnu/gcc-3.3.4-glibc-2.3.2/linux-2.4.26/include/math-emu \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
240.16 -/bin/sh: line 1: scripts/mkdep: Argument list too long
240.17 -make: *** [dep-files] Error 126
240.18 -
240.19 -[ For linux-2.4.26 ]
240.20 -
240.21 ---- linux-2.4.26/Makefile.old 2004-04-14 06:05:41.000000000 -0700
240.22 -+++ linux-2.4.26/Makefile 2004-09-13 21:27:39.000000000 -0700
240.23 -@@ -500,7 +500,7 @@
240.24 - ifdef CONFIG_MODVERSIONS
240.25 - $(MAKE) update-modverfile
240.26 - endif
240.27 -- scripts/mkdep -- `find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
240.28 -+ find $(FINDHPATH) \( -name SCCS -o -name .svn \) -prune -o -follow -name \*.h ! -name modversions.h -print | xargs scripts/mkdep | cat > .hdepend
240.29 - scripts/mkdep -- init/*.c > .depend
240.30 -
240.31 - ifdef CONFIG_MODVERSIONS
241.1 --- a/patches/linux/2.4.26/linux-2.4.26-wdt977-uaccess.patch Sat Sep 22 17:25:42 2007 +0000
241.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
241.3 @@ -1,17 +0,0 @@
241.4 -Fixes drivers/char/char.o(.text+0x178a4): In function `$a':
241.5 -: undefined reference to `get_user'
241.6 -
241.7 -Part of ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4.26-vrs1.bz2
241.8 -
241.9 -diff -urN linux-2.4.26/drivers/char/wdt977.c linux-2.4.26-vrs1/drivers/char/wdt977.c
241.10 ---- linux-2.4.26/drivers/char/wdt977.c 2002-11-28 23:53:12.000000000 +0000
241.11 -+++ linux-2.4.26-vrs1/drivers/char/wdt977.c 2004-01-14 21:32:25.000000000 +0000
241.12 -@@ -27,6 +27,7 @@
241.13 - #include <asm/io.h>
241.14 - #include <asm/system.h>
241.15 - #include <asm/mach-types.h>
241.16 -+#include <asm/uaccess.h>
241.17 -
241.18 - #define WATCHDOG_MINOR 130
241.19 -
241.20 -
242.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
242.2 +++ b/patches/linux/2.6.11.3/100-arch_alpha_kernel_srcons.patch Sun Sep 23 17:08:09 2007 +0000
242.3 @@ -0,0 +1,134 @@
242.4 +Date: Sun, 20 Mar 2005 20:26:02 -0800
242.5 +From: Richard Henderson <rth@twiddle.net>
242.6 +To: Andrew Morton <akpm@osdl.org>
242.7 +Cc: Dan Kegel <dank@kegel.com>, jbglaw@lug-owl.de,
242.8 + linux-kernel@vger.kernel.org, torvalds@osdl.org
242.9 +Subject: Re: 2.6.11.3 build problem in arch/alpha/kernel/srcons.c with gcc-4.0
242.10 +Message-ID: <20050321042602.GA3795@twiddle.net>
242.11 +Mail-Followup-To: Andrew Morton <akpm@osdl.org>, Dan Kegel <dank@kegel.com>,
242.12 + jbglaw@lug-owl.de, linux-kernel@vger.kernel.org, torvalds@osdl.org
242.13 +References: <423E238F.3030805@kegel.com> <20050320190352.65cc1396.akpm@osdl.org>
242.14 +Mime-Version: 1.0
242.15 +Content-Type: text/plain; charset=us-ascii
242.16 +Content-Disposition: inline
242.17 +In-Reply-To: <20050320190352.65cc1396.akpm@osdl.org>
242.18 +User-Agent: Mutt/1.4.1i
242.19 +
242.20 +On Sun, Mar 20, 2005 at 07:03:52PM -0800, Andrew Morton wrote:
242.21 +> Dan Kegel <dank@kegel.com> wrote:
242.22 +> >
242.23 +> > Anyone with an alpha care to suggest a fix for this?
242.24 +> >
242.25 +> > arch/alpha/kernel/srmcons.c: In function 'srmcons_open':
242.26 +> > arch/alpha/kernel/srmcons.c:196: warning: 'srmconsp' may be used uninitialized in this function
242.27 +> > make[1]: *** [arch/alpha/kernel/srmcons.o] Error 1
242.28 +> > make: *** [arch/alpha/kernel] Error 2
242.29 +> >
242.30 +> > I get this when building the 2.6.11.3 kernel with a recent gcc-4.0 snapshot.
242.31 +> >
242.32 +>
242.33 +> It's beyond gcc's ability to figure out that the code is OK. Options would
242.34 +> be to disable -Werror, or to artificially initialise that variable.
242.35 +
242.36 +Fixed thus.
242.37 +
242.38 +Note that even with a _raw_read_trylock implementation, smp still
242.39 +doesn't work. Everything that init spawns dies immediately. I
242.40 +havn't had a chance to find out why yet...
242.41 +
242.42 +[ Note: deleted changes to smp.c, since they didn't apply cleanly
242.43 + to 2.6.11.3 (the function had moved, I guess), and they seemed unrelated.]
242.44 +
242.45 +r~
242.46 +
242.47 +
242.48 +
242.49 +You can import this changeset into BK by piping this whole message to:
242.50 +'| bk receive [path to repository]' or apply the patch as usual.
242.51 +
242.52 +===================================================================
242.53 +
242.54 +
242.55 +ChangeSet@1.2289, 2005-03-20 12:29:41-08:00, rth@kanga.twiddle.home
242.56 + [ALPHA] Elimitate two warnings from gcc4.
242.57 +
242.58 +
242.59 + smp.c | 43 -------------------------------------------
242.60 + srmcons.c | 27 ++++++++++-----------------
242.61 + 2 files changed, 10 insertions(+), 60 deletions(-)
242.62 +
242.63 +
242.64 +diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
242.65 +--- a/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
242.66 ++++ b/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
242.67 +@@ -164,29 +164,22 @@
242.68 + unsigned long flags;
242.69 + int retval = 0;
242.70 +
242.71 +- spin_lock_irqsave(&srmconsp_lock, flags);
242.72 +-
242.73 +- do {
242.74 +- if (srmconsp != NULL) {
242.75 +- *ps = srmconsp;
242.76 +- break;
242.77 +- }
242.78 ++ if (srmconsp == NULL) {
242.79 ++ spin_lock_irqsave(&srmconsp_lock, flags);
242.80 +
242.81 + srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
242.82 +- if (srmconsp == NULL) {
242.83 ++ if (srmconsp == NULL)
242.84 + retval = -ENOMEM;
242.85 +- break;
242.86 ++ else {
242.87 ++ srmconsp->tty = NULL;
242.88 ++ spin_lock_init(&srmconsp->lock);
242.89 ++ init_timer(&srmconsp->timer);
242.90 + }
242.91 +
242.92 +- srmconsp->tty = NULL;
242.93 +- spin_lock_init(&srmconsp->lock);
242.94 +- init_timer(&srmconsp->timer);
242.95 +-
242.96 +- *ps = srmconsp;
242.97 +- } while(0);
242.98 +-
242.99 +- spin_unlock_irqrestore(&srmconsp_lock, flags);
242.100 ++ spin_unlock_irqrestore(&srmconsp_lock, flags);
242.101 ++ }
242.102 +
242.103 ++ *ps = srmconsp;
242.104 + return retval;
242.105 + }
242.106 +
242.107 +
242.108 +===================================================================
242.109 +
242.110 +
242.111 +This BitKeeper patch contains the following changesets:
242.112 +1.2289
242.113 +## Wrapped with gzip_uu ##
242.114 +
242.115 +
242.116 +M'XL( $!,/D( [56[V_;-A#]+/X5!Q38FFV628KZY<!!TJ98BP9;D"&?BL)@
242.117 +M),H6+%$:2=DQIOWO)>4XSH8D1KK%-F#@>'J\]^[>V6_@6@LU\919H#?PL=%F
242.118 +MXG$E?+,N\[P2OA3&QJ^:QL;'BZ868YLY?O=YS&_;$?4C9$\ON<D6L!)*3SSB
242.119 +M!_<1LVG%Q+OZ\.OUQ=D50M,IO%]P.1=_" /3*3*-6O$JUZ?<+*I&^D9QJ6MA
242.120 +MN)\U=7^?VE.,J7V') YP&/4DPBSN,Y(3PAD1.:8LB=@>3:P:O]%YY3=J_D^4
242.121 +M$ <DH4&0!LRBL"A YT!\2I,4<#C&P9AB('1"TPDC(YQ,, 9+]G1I(?B]($X#
242.122 +M^)G""*-W\/]2>(\R^')V<?GQ["M\J,JZ--P(,.L&UES)4LXU%*JI89YES$>?
242.123 +M@82,8'2Y5Q6-7OA""'.,3AZA:?O><Y4MQKQJ%WR\%$J*:JQ5G352^YEC%&!"
242.124 +ML664!%%/+:^PCW-:I 7)XUSDE*;Q$_(= K9]<FK1E(0]HPPS6^'S2C\"6+=;
242.125 +ML#O=&::T#^*8QGU*;D@>)3BWJA?I3?Z"*G>@#RND49R&PW0_0\O-^RN)C,R\
242.126 +MNCVM2MD9U<CRUL_%EYU:7P]+32@A$644]RQ,*!TL0>B_#4'" X8@&$8D?A5+
242.127 +M7(FU*JT1[@J?S869M:I<67/,M%%=9D!W;MTLN(&?6@VE!EZM^4:#>] (Z<RR
242.128 +M':3?8:36P\<._^5S'?L.+YV3*(88?;*4@"*O+.#M'5QK^P^_75]<',%?R/-T
242.129 +M6\I9U63+6:G^U'PEWOZP2QS"OT!1\;D^.K:0<03$0;HO[W%,EY5LLQ)@-DM4
242.130 +M6@P7>;O<T8DQ&]CF'P\'^Q)D:?;WCTY<\&C(<2<S4]9"/3P? D-I"8'$7IHD
242.131 +MCNT6L9,[6DIH.PI/,_/^=H^FCI7KV737WO;X*2\Y\QW^W?A/JP#==')YJDVG
242.132 +M+=HA'SU8!H1AS!@-^X"F=LJ<AT+R8@]9"['@52QT+BKA'%2W,]-):YML(?+.
242.133 +M[HSY,90&\D9H^:,!GIF.5]4&6J&*1M7 Y08Z+8JNLB!%)S-3-M)%:]M:YZKM
242.134 +I\COL*J?5=SG*3;1=2J%3<?]?PY:?+7573PFE(L5)@+X!A'U=W,@(
242.135 +
242.136 +
242.137 +
243.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
243.2 +++ b/patches/linux/2.6.11.3/110-kaz-types.patch Sun Sep 23 17:08:09 2007 +0000
243.3 @@ -0,0 +1,60 @@
243.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
243.5 +
243.6 +In file included from sys/ustat.h:30,
243.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
243.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
243.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
243.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
243.11 +make[1]: *** [misc/subdir_lib] Error 2
243.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
243.13 +make: *** [all] Error 2
243.14 +
243.15 +----------- snip ---------------
243.16 +
243.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
243.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
243.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
243.20 + error: redefinition of `struct user_fpu_struct'"
243.21 +To: linux-sh@m17n.org
243.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
243.23 +
243.24 +Hi,
243.25 +
243.26 +Dan Kegel <dank@kegel.com> wrote:
243.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
243.28 +[snip]
243.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
243.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
243.31 +[snip]
243.32 +> The error reminds me of the kind of thing fixed by
243.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
243.34 +
243.35 +It seems that the definitions in asm/user.h and the above patch collide.
243.36 +I'm not sure why you need this patch, but is it needed for the problem
243.37 +about struct ustat that you pointed out in this list, isn't it?
243.38 +I found why I don't hit ustat problem - my local kernel tree includes
243.39 +the following patch, though I can't recall about it.
243.40 +
243.41 +Regards,
243.42 + kaz
243.43 +--
243.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
243.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
243.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
243.47 +@@ -141,6 +141,7 @@
243.48 +
243.49 + #endif /* __KERNEL_STRICT_NAMES */
243.50 +
243.51 ++#ifdef __KERNEL__
243.52 + /*
243.53 + * Below are truly Linux-specific types that should never collide with
243.54 + * any application/library that wants linux/types.h.
243.55 +@@ -152,5 +153,6 @@
243.56 + char f_fname[6];
243.57 + char f_fpack[6];
243.58 + };
243.59 ++#endif
243.60 +
243.61 + #endif /* _LINUX_TYPES_H */
243.62 +
243.63 +
244.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
244.2 +++ b/patches/linux/2.6.11.3/120-linux-2.6.11-allow-gcc-4.0-asm-i386.patch Sun Sep 23 17:08:09 2007 +0000
244.3 @@ -0,0 +1,150 @@
244.4 +Fixes
244.5 +
244.6 +In file included from include/asm/thread_info.h:16,
244.7 + from include/linux/thread_info.h:21,
244.8 + from include/linux/spinlock.h:12,
244.9 + from include/linux/capability.h:45,
244.10 + from include/linux/sched.h:7,
244.11 + from arch/i386/kernel/asm-offsets.c:7:
244.12 +include/asm/processor.h:87: error: array type has incomplete element type
244.13 +make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
244.14 +
244.15 +--- linux-2.6.11.3/include/asm-i386/processor.h.old Tue Mar 15 06:45:26 2005
244.16 ++++ linux-2.6.11.3/include/asm-i386/processor.h Tue Mar 15 06:46:45 2005
244.17 +@@ -81,6 +81,64 @@
244.18 + #define X86_VENDOR_UNKNOWN 0xff
244.19 +
244.20 + /*
244.21 ++ * Size of io_bitmap.
244.22 ++ */
244.23 ++#define IO_BITMAP_BITS 65536
244.24 ++#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
244.25 ++#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
244.26 ++#define INVALID_IO_BITMAP_OFFSET 0x8000
244.27 ++#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
244.28 ++
244.29 ++struct tss_struct {
244.30 ++ unsigned short back_link,__blh;
244.31 ++ unsigned long esp0;
244.32 ++ unsigned short ss0,__ss0h;
244.33 ++ unsigned long esp1;
244.34 ++ unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
244.35 ++ unsigned long esp2;
244.36 ++ unsigned short ss2,__ss2h;
244.37 ++ unsigned long __cr3;
244.38 ++ unsigned long eip;
244.39 ++ unsigned long eflags;
244.40 ++ unsigned long eax,ecx,edx,ebx;
244.41 ++ unsigned long esp;
244.42 ++ unsigned long ebp;
244.43 ++ unsigned long esi;
244.44 ++ unsigned long edi;
244.45 ++ unsigned short es, __esh;
244.46 ++ unsigned short cs, __csh;
244.47 ++ unsigned short ss, __ssh;
244.48 ++ unsigned short ds, __dsh;
244.49 ++ unsigned short fs, __fsh;
244.50 ++ unsigned short gs, __gsh;
244.51 ++ unsigned short ldt, __ldth;
244.52 ++ unsigned short trace, io_bitmap_base;
244.53 ++ /*
244.54 ++ * The extra 1 is there because the CPU will access an
244.55 ++ * additional byte beyond the end of the IO permission
244.56 ++ * bitmap. The extra byte must be all 1 bits, and must
244.57 ++ * be within the limit.
244.58 ++ */
244.59 ++ unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
244.60 ++ /*
244.61 ++ * Cache the current maximum and the last task that used the bitmap:
244.62 ++ */
244.63 ++ unsigned long io_bitmap_max;
244.64 ++ struct thread_struct *io_bitmap_owner;
244.65 ++ /*
244.66 ++ * pads the TSS to be cacheline-aligned (size is 0x100)
244.67 ++ */
244.68 ++ unsigned long __cacheline_filler[35];
244.69 ++ /*
244.70 ++ * .. and then another 0x100 bytes for emergency kernel stack
244.71 ++ */
244.72 ++ unsigned long stack[64];
244.73 ++} __attribute__((packed));
244.74 ++
244.75 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
244.76 ++#define ARCH_MIN_TASKALIGN 16
244.77 ++
244.78 ++/*
244.79 + * capabilities of CPUs
244.80 + */
244.81 +
244.82 +@@ -308,16 +366,6 @@
244.83 +
244.84 + #define HAVE_ARCH_PICK_MMAP_LAYOUT
244.85 +
244.86 +-/*
244.87 +- * Size of io_bitmap.
244.88 +- */
244.89 +-#define IO_BITMAP_BITS 65536
244.90 +-#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
244.91 +-#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
244.92 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
244.93 +-#define INVALID_IO_BITMAP_OFFSET 0x8000
244.94 +-#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
244.95 +-
244.96 + struct i387_fsave_struct {
244.97 + long cwd;
244.98 + long swd;
244.99 +@@ -371,54 +419,6 @@
244.100 + } mm_segment_t;
244.101 +
244.102 + struct thread_struct;
244.103 +-
244.104 +-struct tss_struct {
244.105 +- unsigned short back_link,__blh;
244.106 +- unsigned long esp0;
244.107 +- unsigned short ss0,__ss0h;
244.108 +- unsigned long esp1;
244.109 +- unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
244.110 +- unsigned long esp2;
244.111 +- unsigned short ss2,__ss2h;
244.112 +- unsigned long __cr3;
244.113 +- unsigned long eip;
244.114 +- unsigned long eflags;
244.115 +- unsigned long eax,ecx,edx,ebx;
244.116 +- unsigned long esp;
244.117 +- unsigned long ebp;
244.118 +- unsigned long esi;
244.119 +- unsigned long edi;
244.120 +- unsigned short es, __esh;
244.121 +- unsigned short cs, __csh;
244.122 +- unsigned short ss, __ssh;
244.123 +- unsigned short ds, __dsh;
244.124 +- unsigned short fs, __fsh;
244.125 +- unsigned short gs, __gsh;
244.126 +- unsigned short ldt, __ldth;
244.127 +- unsigned short trace, io_bitmap_base;
244.128 +- /*
244.129 +- * The extra 1 is there because the CPU will access an
244.130 +- * additional byte beyond the end of the IO permission
244.131 +- * bitmap. The extra byte must be all 1 bits, and must
244.132 +- * be within the limit.
244.133 +- */
244.134 +- unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
244.135 +- /*
244.136 +- * Cache the current maximum and the last task that used the bitmap:
244.137 +- */
244.138 +- unsigned long io_bitmap_max;
244.139 +- struct thread_struct *io_bitmap_owner;
244.140 +- /*
244.141 +- * pads the TSS to be cacheline-aligned (size is 0x100)
244.142 +- */
244.143 +- unsigned long __cacheline_filler[35];
244.144 +- /*
244.145 +- * .. and then another 0x100 bytes for emergency kernel stack
244.146 +- */
244.147 +- unsigned long stack[64];
244.148 +-} __attribute__((packed));
244.149 +-
244.150 +-#define ARCH_MIN_TASKALIGN 16
244.151 +
244.152 + struct thread_struct {
244.153 + /* cached TLS descriptors. */
245.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
245.2 +++ b/patches/linux/2.6.11.3/130-linux-2.6.11-allow-gcc-4.0-asm-m68k.patch Sun Sep 23 17:08:09 2007 +0000
245.3 @@ -0,0 +1,32 @@
245.4 +Fixes
245.5 +
245.6 +In file included from include/asm/setup.h:8,
245.7 + from include/asm/machdep.h:8,
245.8 + from include/asm/irq.h:6,
245.9 + from include/asm/hardirq.h:8,
245.10 + from include/linux/hardirq.h:6,
245.11 + from include/asm-generic/local.h:6,
245.12 + from include/asm/local.h:4,
245.13 + from include/linux/module.h:21,
245.14 + from init/main.c:16:
245.15 +include/asm-m68k/setup.h:365: error: array type has incomplete element type
245.16 +
245.17 +when compiling with gcc-4.0. (Affects ppc, too, for some reason.)
245.18 +
245.19 +--- linux-2.6.11.3/include/asm-m68k/setup.h.old Fri Mar 18 13:48:03 2005
245.20 ++++ linux-2.6.11.3/include/asm-m68k/setup.h Fri Mar 18 13:48:14 2005
245.21 +@@ -362,12 +362,13 @@
245.22 + #ifndef __ASSEMBLY__
245.23 + extern int m68k_num_memory; /* # of memory blocks found (and used) */
245.24 + extern int m68k_realnum_memory; /* real # of memory blocks found */
245.25 +-extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
245.26 +
245.27 + struct mem_info {
245.28 + unsigned long addr; /* physical address of memory chunk */
245.29 + unsigned long size; /* length of memory chunk (in bytes) */
245.30 + };
245.31 ++
245.32 ++extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
245.33 + #endif
245.34 +
245.35 + #endif /* __KERNEL__ */
246.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
246.2 +++ b/patches/linux/2.6.11.3/140-linux-2.6.11-allow-gcc-4.0-asm-ppc64.patch Sun Sep 23 17:08:09 2007 +0000
246.3 @@ -0,0 +1,30 @@
246.4 +Fixes
246.5 +
246.6 +In file included from include/asm/current.h:4,
246.7 + from include/linux/wait.h:27,
246.8 + from include/asm/semaphore.h:15,
246.9 + from include/linux/sched.h:19,
246.10 + from arch/ppc64/kernel/asm-offsets.c:18:
246.11 +include/asm/paca.h:25: error: array type has incomplete element type
246.12 +make[1]: *** [arch/ppc64/kernel/asm-offsets.s] Error 1
246.13 +
246.14 +when building with gcc-4.0
246.15 +
246.16 +--- linux-2.6.11.3/include/asm-ppc64/paca.h.old Fri Mar 18 13:23:40 2005
246.17 ++++ linux-2.6.11.3/include/asm-ppc64/paca.h Fri Mar 18 13:24:04 2005
246.18 +@@ -22,7 +22,6 @@
246.19 + #include <asm/iSeries/ItLpRegSave.h>
246.20 + #include <asm/mmu.h>
246.21 +
246.22 +-extern struct paca_struct paca[];
246.23 + register struct paca_struct *local_paca asm("r13");
246.24 + #define get_paca() local_paca
246.25 +
246.26 +@@ -114,5 +113,7 @@
246.27 + struct ItLpRegSave reg_save;
246.28 + #endif
246.29 + };
246.30 ++
246.31 ++extern struct paca_struct paca[];
246.32 +
246.33 + #endif /* _PPC64_PACA_H */
247.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
247.2 +++ b/patches/linux/2.6.11.3/150-linux-2.6.11-allow-gcc-4.0-asm-x86_64.patch Sun Sep 23 17:08:09 2007 +0000
247.3 @@ -0,0 +1,28 @@
247.4 +Fixes:
247.5 +
247.6 +In file included from include/linux/spinlock.h:16,
247.7 + from include/linux/capability.h:45,
247.8 + from include/linux/sched.h:7,
247.9 + from arch/x86_64/kernel/asm-offsets.c:7:
247.10 +include/asm/processor.h:79: error: array type has incomplete element type
247.11 +make[1]: *** [arch/x86_64/kernel/asm-offsets.asm] Error 1
247.12 +
247.13 +--- linux-2.6.11.3/include/asm-x86_64/processor.h.old Tue Mar 15 07:05:07 2005
247.14 ++++ linux-2.6.11.3/include/asm-x86_64/processor.h Tue Mar 15 07:09:53 2005
247.15 +@@ -179,7 +179,6 @@
247.16 + #define IO_BITMAP_BITS 65536
247.17 + #define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
247.18 + #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
247.19 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
247.20 + #define INVALID_IO_BITMAP_OFFSET 0x8000
247.21 +
247.22 + struct i387_fxsave_struct {
247.23 +@@ -222,6 +221,8 @@
247.24 + */
247.25 + unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
247.26 + } __attribute__((packed)) ____cacheline_aligned;
247.27 ++
247.28 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
247.29 +
247.30 + extern struct cpuinfo_x86 boot_cpu_data;
247.31 + DECLARE_PER_CPU(struct tss_struct,init_tss);
248.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
248.2 +++ b/patches/linux/2.6.11.3/160-linux-2.6.11-allow-gcc-4.0-i2c.patch Sun Sep 23 17:08:09 2007 +0000
248.3 @@ -0,0 +1,58 @@
248.4 +Fixes
248.5 +
248.6 +In file included from fs/compat_ioctl.c:69,
248.7 + from arch/ppc64/kernel/ioctl32.c:24:
248.8 +include/linux/i2c.h:58: error: array type has incomplete element type
248.9 +include/linux/i2c.h:197: error: array type has incomplete element type
248.10 +
248.11 +when compiling with gcc-4.0.
248.12 +
248.13 +--- linux-2.6.11.3/include/linux/i2c.h.old 2005-03-19 10:59:09.000000000 -0800
248.14 ++++ linux-2.6.11.3/include/linux/i2c.h 2005-03-19 11:01:37.000000000 -0800
248.15 +@@ -36,7 +36,22 @@
248.16 +
248.17 + /* --- General options ------------------------------------------------ */
248.18 +
248.19 +-struct i2c_msg;
248.20 ++/*
248.21 ++ * I2C Message - used for pure i2c transaction, also from /dev interface
248.22 ++ */
248.23 ++struct i2c_msg {
248.24 ++ __u16 addr; /* slave address */
248.25 ++ __u16 flags;
248.26 ++#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
248.27 ++#define I2C_M_RD 0x01
248.28 ++#define I2C_M_NOSTART 0x4000
248.29 ++#define I2C_M_REV_DIR_ADDR 0x2000
248.30 ++#define I2C_M_IGNORE_NAK 0x1000
248.31 ++#define I2C_M_NO_RD_ACK 0x0800
248.32 ++ __u16 len; /* msg length */
248.33 ++ __u8 *buf; /* pointer to msg data */
248.34 ++};
248.35 ++
248.36 + struct i2c_algorithm;
248.37 + struct i2c_adapter;
248.38 + struct i2c_client;
248.39 +@@ -379,22 +394,6 @@
248.40 + /* Return 1 if adapter supports everything we need, 0 if not. */
248.41 + extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
248.42 +
248.43 +-/*
248.44 +- * I2C Message - used for pure i2c transaction, also from /dev interface
248.45 +- */
248.46 +-struct i2c_msg {
248.47 +- __u16 addr; /* slave address */
248.48 +- __u16 flags;
248.49 +-#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
248.50 +-#define I2C_M_RD 0x01
248.51 +-#define I2C_M_NOSTART 0x4000
248.52 +-#define I2C_M_REV_DIR_ADDR 0x2000
248.53 +-#define I2C_M_IGNORE_NAK 0x1000
248.54 +-#define I2C_M_NO_RD_ACK 0x0800
248.55 +- __u16 len; /* msg length */
248.56 +- __u8 *buf; /* pointer to msg data */
248.57 +-};
248.58 +-
248.59 + /* To determine what functionality is present */
248.60 +
248.61 + #define I2C_FUNC_I2C 0x00000001
249.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
249.2 +++ b/patches/linux/2.6.11.3/170-linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch Sun Sep 23 17:08:09 2007 +0000
249.3 @@ -0,0 +1,86 @@
249.4 +
249.5 +Fixes
249.6 +
249.7 +In file included from arch/ppc/kernel/time.c:68:
249.8 +arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration
249.9 +include/linux/timex.h:236: error: previous declaration of 'time_offset' was here
249.10 +make[1]: *** [arch/ppc/kernel/time.o] Error 1
249.11 +
249.12 +when compiling with gcc-4.0
249.13 +
249.14 +Taken from
249.15 +http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11
249.16 +Also removes some obsolete externs that caused problems for Mike
249.17 +Mike's patch has a bit more stuff in it, but this was enough for me
249.18 +
249.19 +
249.20 +diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c
249.21 +--- linux-2.6.11/arch/ppc/kernel/time.c 2005-03-02 19:24:14.000000000 +0100
249.22 ++++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c 2005-03-02 19:36:26.000000000 +0100
249.23 +@@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale;
249.24 +
249.25 + extern unsigned long wall_jiffies;
249.26 +
249.27 +-static long time_offset;
249.28 ++static long ppc_time_offset;
249.29 +
249.30 + DEFINE_SPINLOCK(rtc_lock);
249.31 +
249.32 +@@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re
249.33 + xtime.tv_sec - last_rtc_update >= 659 &&
249.34 + abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
249.35 + jiffies - wall_jiffies == 1) {
249.36 +- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
249.37 ++ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0)
249.38 + last_rtc_update = xtime.tv_sec+1;
249.39 + else
249.40 + /* Try again one minute later */
249.41 +@@ -289,7 +289,7 @@ void __init time_init(void)
249.42 + unsigned old_stamp, stamp, elapsed;
249.43 +
249.44 + if (ppc_md.time_init != NULL)
249.45 +- time_offset = ppc_md.time_init();
249.46 ++ ppc_time_offset = ppc_md.time_init();
249.47 +
249.48 + if (__USE_RTC()) {
249.49 + /* 601 processor: dec counts down by 128 every 128ns */
249.50 +@@ -334,10 +334,10 @@ void __init time_init(void)
249.51 + set_dec(tb_ticks_per_jiffy);
249.52 +
249.53 + /* If platform provided a timezone (pmac), we correct the time */
249.54 +- if (time_offset) {
249.55 +- sys_tz.tz_minuteswest = -time_offset / 60;
249.56 ++ if (ppc_time_offset) {
249.57 ++ sys_tz.tz_minuteswest = -ppc_time_offset / 60;
249.58 + sys_tz.tz_dsttime = 0;
249.59 +- xtime.tv_sec -= time_offset;
249.60 ++ xtime.tv_sec -= ppc_time_offset;
249.61 + }
249.62 + set_normalized_timespec(&wall_to_monotonic,
249.63 + -xtime.tv_sec, -xtime.tv_nsec);
249.64 +diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h
249.65 +--- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:24:14.000000000 +0100
249.66 ++++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:36:26.000000000 +0100
249.67 +@@ -172,9 +172,6 @@ struct OpenPIC {
249.68 + OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
249.69 + };
249.70 +
249.71 +-extern volatile struct OpenPIC __iomem *OpenPIC;
249.72 +-
249.73 +-
249.74 + /*
249.75 + * Current Task Priority Register
249.76 + */
249.77 +diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h
249.78 +--- linux-2.6.11/include/asm-ppc/prom.h 2003-09-28 12:19:57.000000000 +0200
249.79 ++++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h 2005-03-02 19:36:26.000000000 +0100
249.80 +@@ -13,9 +13,6 @@
249.81 + typedef void *phandle;
249.82 + typedef void *ihandle;
249.83 +
249.84 +-extern char *prom_display_paths[];
249.85 +-extern unsigned int prom_num_displays;
249.86 +-
249.87 + struct address_range {
249.88 + unsigned int space;
249.89 + unsigned int address;
250.1 --- a/patches/linux/2.6.11.3/arch_alpha_kernel_srcons.patch Sat Sep 22 17:25:42 2007 +0000
250.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
250.3 @@ -1,134 +0,0 @@
250.4 -Date: Sun, 20 Mar 2005 20:26:02 -0800
250.5 -From: Richard Henderson <rth@twiddle.net>
250.6 -To: Andrew Morton <akpm@osdl.org>
250.7 -Cc: Dan Kegel <dank@kegel.com>, jbglaw@lug-owl.de,
250.8 - linux-kernel@vger.kernel.org, torvalds@osdl.org
250.9 -Subject: Re: 2.6.11.3 build problem in arch/alpha/kernel/srcons.c with gcc-4.0
250.10 -Message-ID: <20050321042602.GA3795@twiddle.net>
250.11 -Mail-Followup-To: Andrew Morton <akpm@osdl.org>, Dan Kegel <dank@kegel.com>,
250.12 - jbglaw@lug-owl.de, linux-kernel@vger.kernel.org, torvalds@osdl.org
250.13 -References: <423E238F.3030805@kegel.com> <20050320190352.65cc1396.akpm@osdl.org>
250.14 -Mime-Version: 1.0
250.15 -Content-Type: text/plain; charset=us-ascii
250.16 -Content-Disposition: inline
250.17 -In-Reply-To: <20050320190352.65cc1396.akpm@osdl.org>
250.18 -User-Agent: Mutt/1.4.1i
250.19 -
250.20 -On Sun, Mar 20, 2005 at 07:03:52PM -0800, Andrew Morton wrote:
250.21 -> Dan Kegel <dank@kegel.com> wrote:
250.22 -> >
250.23 -> > Anyone with an alpha care to suggest a fix for this?
250.24 -> >
250.25 -> > arch/alpha/kernel/srmcons.c: In function 'srmcons_open':
250.26 -> > arch/alpha/kernel/srmcons.c:196: warning: 'srmconsp' may be used uninitialized in this function
250.27 -> > make[1]: *** [arch/alpha/kernel/srmcons.o] Error 1
250.28 -> > make: *** [arch/alpha/kernel] Error 2
250.29 -> >
250.30 -> > I get this when building the 2.6.11.3 kernel with a recent gcc-4.0 snapshot.
250.31 -> >
250.32 ->
250.33 -> It's beyond gcc's ability to figure out that the code is OK. Options would
250.34 -> be to disable -Werror, or to artificially initialise that variable.
250.35 -
250.36 -Fixed thus.
250.37 -
250.38 -Note that even with a _raw_read_trylock implementation, smp still
250.39 -doesn't work. Everything that init spawns dies immediately. I
250.40 -havn't had a chance to find out why yet...
250.41 -
250.42 -[ Note: deleted changes to smp.c, since they didn't apply cleanly
250.43 - to 2.6.11.3 (the function had moved, I guess), and they seemed unrelated.]
250.44 -
250.45 -r~
250.46 -
250.47 -
250.48 -
250.49 -You can import this changeset into BK by piping this whole message to:
250.50 -'| bk receive [path to repository]' or apply the patch as usual.
250.51 -
250.52 -===================================================================
250.53 -
250.54 -
250.55 -ChangeSet@1.2289, 2005-03-20 12:29:41-08:00, rth@kanga.twiddle.home
250.56 - [ALPHA] Elimitate two warnings from gcc4.
250.57 -
250.58 -
250.59 - smp.c | 43 -------------------------------------------
250.60 - srmcons.c | 27 ++++++++++-----------------
250.61 - 2 files changed, 10 insertions(+), 60 deletions(-)
250.62 -
250.63 -
250.64 -diff -Nru a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
250.65 ---- a/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
250.66 -+++ b/arch/alpha/kernel/srmcons.c 2005-03-20 20:23:28 -08:00
250.67 -@@ -164,29 +164,22 @@
250.68 - unsigned long flags;
250.69 - int retval = 0;
250.70 -
250.71 -- spin_lock_irqsave(&srmconsp_lock, flags);
250.72 --
250.73 -- do {
250.74 -- if (srmconsp != NULL) {
250.75 -- *ps = srmconsp;
250.76 -- break;
250.77 -- }
250.78 -+ if (srmconsp == NULL) {
250.79 -+ spin_lock_irqsave(&srmconsp_lock, flags);
250.80 -
250.81 - srmconsp = kmalloc(sizeof(*srmconsp), GFP_KERNEL);
250.82 -- if (srmconsp == NULL) {
250.83 -+ if (srmconsp == NULL)
250.84 - retval = -ENOMEM;
250.85 -- break;
250.86 -+ else {
250.87 -+ srmconsp->tty = NULL;
250.88 -+ spin_lock_init(&srmconsp->lock);
250.89 -+ init_timer(&srmconsp->timer);
250.90 - }
250.91 -
250.92 -- srmconsp->tty = NULL;
250.93 -- spin_lock_init(&srmconsp->lock);
250.94 -- init_timer(&srmconsp->timer);
250.95 --
250.96 -- *ps = srmconsp;
250.97 -- } while(0);
250.98 --
250.99 -- spin_unlock_irqrestore(&srmconsp_lock, flags);
250.100 -+ spin_unlock_irqrestore(&srmconsp_lock, flags);
250.101 -+ }
250.102 -
250.103 -+ *ps = srmconsp;
250.104 - return retval;
250.105 - }
250.106 -
250.107 -
250.108 -===================================================================
250.109 -
250.110 -
250.111 -This BitKeeper patch contains the following changesets:
250.112 -1.2289
250.113 -## Wrapped with gzip_uu ##
250.114 -
250.115 -
250.116 -M'XL( $!,/D( [56[V_;-A#]+/X5!Q38FFV628KZY<!!TJ98BP9;D"&?BL)@
250.117 -M),H6+%$:2=DQIOWO)>4XSH8D1KK%-F#@>'J\]^[>V6_@6@LU\919H#?PL=%F
250.118 -MXG$E?+,N\[P2OA3&QJ^:QL;'BZ868YLY?O=YS&_;$?4C9$\ON<D6L!)*3SSB
250.119 -M!_<1LVG%Q+OZ\.OUQ=D50M,IO%]P.1=_" /3*3*-6O$JUZ?<+*I&^D9QJ6MA
250.120 -MN)\U=7^?VE.,J7V') YP&/4DPBSN,Y(3PAD1.:8LB=@>3:P:O]%YY3=J_D^4
250.121 -M$ <DH4&0!LRBL"A YT!\2I,4<#C&P9AB('1"TPDC(YQ,, 9+]G1I(?B]($X#
250.122 -M^)G""*-W\/]2>(\R^')V<?GQ["M\J,JZ--P(,.L&UES)4LXU%*JI89YES$>?
250.123 -M@82,8'2Y5Q6-7OA""'.,3AZA:?O><Y4MQKQJ%WR\%$J*:JQ5G352^YEC%&!"
250.124 -ML664!%%/+:^PCW-:I 7)XUSDE*;Q$_(= K9]<FK1E(0]HPPS6^'S2C\"6+=;
250.125 -ML#O=&::T#^*8QGU*;D@>)3BWJA?I3?Z"*G>@#RND49R&PW0_0\O-^RN)C,R\
250.126 -MNCVM2MD9U<CRUL_%EYU:7P]+32@A$644]RQ,*!TL0>B_#4'" X8@&$8D?A5+
250.127 -M7(FU*JT1[@J?S869M:I<67/,M%%=9D!W;MTLN(&?6@VE!EZM^4:#>] (Z<RR
250.128 -M':3?8:36P\<._^5S'?L.+YV3*(88?;*4@"*O+.#M'5QK^P^_75]<',%?R/-T
250.129 -M6\I9U63+6:G^U'PEWOZP2QS"OT!1\;D^.K:0<03$0;HO[W%,EY5LLQ)@-DM4
250.130 -M6@P7>;O<T8DQ&]CF'P\'^Q)D:?;WCTY<\&C(<2<S4]9"/3P? D-I"8'$7IHD
250.131 -MCNT6L9,[6DIH.PI/,_/^=H^FCI7KV737WO;X*2\Y\QW^W?A/JP#==')YJDVG
250.132 -M+=HA'SU8!H1AS!@-^X"F=LJ<AT+R8@]9"['@52QT+BKA'%2W,]-):YML(?+.
250.133 -M[HSY,90&\D9H^:,!GIF.5]4&6J&*1M7 Y08Z+8JNLB!%)S-3-M)%:]M:YZKM
250.134 -I\COL*J?5=SG*3;1=2J%3<?]?PY:?+7573PFE(L5)@+X!A'U=W,@(
250.135 -
250.136 -
250.137 -
251.1 --- a/patches/linux/2.6.11.3/kaz-types.patch Sat Sep 22 17:25:42 2007 +0000
251.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
251.3 @@ -1,60 +0,0 @@
251.4 -The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
251.5 -
251.6 -In file included from sys/ustat.h:30,
251.7 - from ../sysdeps/unix/sysv/linux/ustat.c:21:
251.8 -../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
251.9 -make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
251.10 -make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
251.11 -make[1]: *** [misc/subdir_lib] Error 2
251.12 -make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
251.13 -make: *** [all] Error 2
251.14 -
251.15 ------------ snip ---------------
251.16 -
251.17 -Date: Fri, 06 Jun 2003 08:00:00 +0900
251.18 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
251.19 -Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
251.20 - error: redefinition of `struct user_fpu_struct'"
251.21 -To: linux-sh@m17n.org
251.22 -Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
251.23 -
251.24 -Hi,
251.25 -
251.26 -Dan Kegel <dank@kegel.com> wrote:
251.27 -> When I try to build glibc-2.3.2 for sh4, it fails with the error
251.28 -[snip]
251.29 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
251.30 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
251.31 -[snip]
251.32 -> The error reminds me of the kind of thing fixed by
251.33 -> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
251.34 -
251.35 -It seems that the definitions in asm/user.h and the above patch collide.
251.36 -I'm not sure why you need this patch, but is it needed for the problem
251.37 -about struct ustat that you pointed out in this list, isn't it?
251.38 -I found why I don't hit ustat problem - my local kernel tree includes
251.39 -the following patch, though I can't recall about it.
251.40 -
251.41 -Regards,
251.42 - kaz
251.43 ---
251.44 -diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
251.45 ---- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
251.46 -+++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
251.47 -@@ -141,6 +141,7 @@
251.48 -
251.49 - #endif /* __KERNEL_STRICT_NAMES */
251.50 -
251.51 -+#ifdef __KERNEL__
251.52 - /*
251.53 - * Below are truly Linux-specific types that should never collide with
251.54 - * any application/library that wants linux/types.h.
251.55 -@@ -152,5 +153,6 @@
251.56 - char f_fname[6];
251.57 - char f_fpack[6];
251.58 - };
251.59 -+#endif
251.60 -
251.61 - #endif /* _LINUX_TYPES_H */
251.62 -
251.63 -
252.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-i386.patch Sat Sep 22 17:25:42 2007 +0000
252.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
252.3 @@ -1,150 +0,0 @@
252.4 -Fixes
252.5 -
252.6 -In file included from include/asm/thread_info.h:16,
252.7 - from include/linux/thread_info.h:21,
252.8 - from include/linux/spinlock.h:12,
252.9 - from include/linux/capability.h:45,
252.10 - from include/linux/sched.h:7,
252.11 - from arch/i386/kernel/asm-offsets.c:7:
252.12 -include/asm/processor.h:87: error: array type has incomplete element type
252.13 -make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
252.14 -
252.15 ---- linux-2.6.11.3/include/asm-i386/processor.h.old Tue Mar 15 06:45:26 2005
252.16 -+++ linux-2.6.11.3/include/asm-i386/processor.h Tue Mar 15 06:46:45 2005
252.17 -@@ -81,6 +81,64 @@
252.18 - #define X86_VENDOR_UNKNOWN 0xff
252.19 -
252.20 - /*
252.21 -+ * Size of io_bitmap.
252.22 -+ */
252.23 -+#define IO_BITMAP_BITS 65536
252.24 -+#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
252.25 -+#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
252.26 -+#define INVALID_IO_BITMAP_OFFSET 0x8000
252.27 -+#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
252.28 -+
252.29 -+struct tss_struct {
252.30 -+ unsigned short back_link,__blh;
252.31 -+ unsigned long esp0;
252.32 -+ unsigned short ss0,__ss0h;
252.33 -+ unsigned long esp1;
252.34 -+ unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
252.35 -+ unsigned long esp2;
252.36 -+ unsigned short ss2,__ss2h;
252.37 -+ unsigned long __cr3;
252.38 -+ unsigned long eip;
252.39 -+ unsigned long eflags;
252.40 -+ unsigned long eax,ecx,edx,ebx;
252.41 -+ unsigned long esp;
252.42 -+ unsigned long ebp;
252.43 -+ unsigned long esi;
252.44 -+ unsigned long edi;
252.45 -+ unsigned short es, __esh;
252.46 -+ unsigned short cs, __csh;
252.47 -+ unsigned short ss, __ssh;
252.48 -+ unsigned short ds, __dsh;
252.49 -+ unsigned short fs, __fsh;
252.50 -+ unsigned short gs, __gsh;
252.51 -+ unsigned short ldt, __ldth;
252.52 -+ unsigned short trace, io_bitmap_base;
252.53 -+ /*
252.54 -+ * The extra 1 is there because the CPU will access an
252.55 -+ * additional byte beyond the end of the IO permission
252.56 -+ * bitmap. The extra byte must be all 1 bits, and must
252.57 -+ * be within the limit.
252.58 -+ */
252.59 -+ unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
252.60 -+ /*
252.61 -+ * Cache the current maximum and the last task that used the bitmap:
252.62 -+ */
252.63 -+ unsigned long io_bitmap_max;
252.64 -+ struct thread_struct *io_bitmap_owner;
252.65 -+ /*
252.66 -+ * pads the TSS to be cacheline-aligned (size is 0x100)
252.67 -+ */
252.68 -+ unsigned long __cacheline_filler[35];
252.69 -+ /*
252.70 -+ * .. and then another 0x100 bytes for emergency kernel stack
252.71 -+ */
252.72 -+ unsigned long stack[64];
252.73 -+} __attribute__((packed));
252.74 -+
252.75 -+#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
252.76 -+#define ARCH_MIN_TASKALIGN 16
252.77 -+
252.78 -+/*
252.79 - * capabilities of CPUs
252.80 - */
252.81 -
252.82 -@@ -308,16 +366,6 @@
252.83 -
252.84 - #define HAVE_ARCH_PICK_MMAP_LAYOUT
252.85 -
252.86 --/*
252.87 -- * Size of io_bitmap.
252.88 -- */
252.89 --#define IO_BITMAP_BITS 65536
252.90 --#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
252.91 --#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
252.92 --#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
252.93 --#define INVALID_IO_BITMAP_OFFSET 0x8000
252.94 --#define INVALID_IO_BITMAP_OFFSET_LAZY 0x9000
252.95 --
252.96 - struct i387_fsave_struct {
252.97 - long cwd;
252.98 - long swd;
252.99 -@@ -371,54 +419,6 @@
252.100 - } mm_segment_t;
252.101 -
252.102 - struct thread_struct;
252.103 --
252.104 --struct tss_struct {
252.105 -- unsigned short back_link,__blh;
252.106 -- unsigned long esp0;
252.107 -- unsigned short ss0,__ss0h;
252.108 -- unsigned long esp1;
252.109 -- unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
252.110 -- unsigned long esp2;
252.111 -- unsigned short ss2,__ss2h;
252.112 -- unsigned long __cr3;
252.113 -- unsigned long eip;
252.114 -- unsigned long eflags;
252.115 -- unsigned long eax,ecx,edx,ebx;
252.116 -- unsigned long esp;
252.117 -- unsigned long ebp;
252.118 -- unsigned long esi;
252.119 -- unsigned long edi;
252.120 -- unsigned short es, __esh;
252.121 -- unsigned short cs, __csh;
252.122 -- unsigned short ss, __ssh;
252.123 -- unsigned short ds, __dsh;
252.124 -- unsigned short fs, __fsh;
252.125 -- unsigned short gs, __gsh;
252.126 -- unsigned short ldt, __ldth;
252.127 -- unsigned short trace, io_bitmap_base;
252.128 -- /*
252.129 -- * The extra 1 is there because the CPU will access an
252.130 -- * additional byte beyond the end of the IO permission
252.131 -- * bitmap. The extra byte must be all 1 bits, and must
252.132 -- * be within the limit.
252.133 -- */
252.134 -- unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
252.135 -- /*
252.136 -- * Cache the current maximum and the last task that used the bitmap:
252.137 -- */
252.138 -- unsigned long io_bitmap_max;
252.139 -- struct thread_struct *io_bitmap_owner;
252.140 -- /*
252.141 -- * pads the TSS to be cacheline-aligned (size is 0x100)
252.142 -- */
252.143 -- unsigned long __cacheline_filler[35];
252.144 -- /*
252.145 -- * .. and then another 0x100 bytes for emergency kernel stack
252.146 -- */
252.147 -- unsigned long stack[64];
252.148 --} __attribute__((packed));
252.149 --
252.150 --#define ARCH_MIN_TASKALIGN 16
252.151 -
252.152 - struct thread_struct {
252.153 - /* cached TLS descriptors. */
253.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-m68k.patch Sat Sep 22 17:25:42 2007 +0000
253.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
253.3 @@ -1,32 +0,0 @@
253.4 -Fixes
253.5 -
253.6 -In file included from include/asm/setup.h:8,
253.7 - from include/asm/machdep.h:8,
253.8 - from include/asm/irq.h:6,
253.9 - from include/asm/hardirq.h:8,
253.10 - from include/linux/hardirq.h:6,
253.11 - from include/asm-generic/local.h:6,
253.12 - from include/asm/local.h:4,
253.13 - from include/linux/module.h:21,
253.14 - from init/main.c:16:
253.15 -include/asm-m68k/setup.h:365: error: array type has incomplete element type
253.16 -
253.17 -when compiling with gcc-4.0. (Affects ppc, too, for some reason.)
253.18 -
253.19 ---- linux-2.6.11.3/include/asm-m68k/setup.h.old Fri Mar 18 13:48:03 2005
253.20 -+++ linux-2.6.11.3/include/asm-m68k/setup.h Fri Mar 18 13:48:14 2005
253.21 -@@ -362,12 +362,13 @@
253.22 - #ifndef __ASSEMBLY__
253.23 - extern int m68k_num_memory; /* # of memory blocks found (and used) */
253.24 - extern int m68k_realnum_memory; /* real # of memory blocks found */
253.25 --extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
253.26 -
253.27 - struct mem_info {
253.28 - unsigned long addr; /* physical address of memory chunk */
253.29 - unsigned long size; /* length of memory chunk (in bytes) */
253.30 - };
253.31 -+
253.32 -+extern struct mem_info m68k_memory[NUM_MEMINFO];/* memory description */
253.33 - #endif
253.34 -
253.35 - #endif /* __KERNEL__ */
254.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-ppc64.patch Sat Sep 22 17:25:42 2007 +0000
254.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
254.3 @@ -1,30 +0,0 @@
254.4 -Fixes
254.5 -
254.6 -In file included from include/asm/current.h:4,
254.7 - from include/linux/wait.h:27,
254.8 - from include/asm/semaphore.h:15,
254.9 - from include/linux/sched.h:19,
254.10 - from arch/ppc64/kernel/asm-offsets.c:18:
254.11 -include/asm/paca.h:25: error: array type has incomplete element type
254.12 -make[1]: *** [arch/ppc64/kernel/asm-offsets.s] Error 1
254.13 -
254.14 -when building with gcc-4.0
254.15 -
254.16 ---- linux-2.6.11.3/include/asm-ppc64/paca.h.old Fri Mar 18 13:23:40 2005
254.17 -+++ linux-2.6.11.3/include/asm-ppc64/paca.h Fri Mar 18 13:24:04 2005
254.18 -@@ -22,7 +22,6 @@
254.19 - #include <asm/iSeries/ItLpRegSave.h>
254.20 - #include <asm/mmu.h>
254.21 -
254.22 --extern struct paca_struct paca[];
254.23 - register struct paca_struct *local_paca asm("r13");
254.24 - #define get_paca() local_paca
254.25 -
254.26 -@@ -114,5 +113,7 @@
254.27 - struct ItLpRegSave reg_save;
254.28 - #endif
254.29 - };
254.30 -+
254.31 -+extern struct paca_struct paca[];
254.32 -
254.33 - #endif /* _PPC64_PACA_H */
255.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-asm-x86_64.patch Sat Sep 22 17:25:42 2007 +0000
255.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
255.3 @@ -1,28 +0,0 @@
255.4 -Fixes:
255.5 -
255.6 -In file included from include/linux/spinlock.h:16,
255.7 - from include/linux/capability.h:45,
255.8 - from include/linux/sched.h:7,
255.9 - from arch/x86_64/kernel/asm-offsets.c:7:
255.10 -include/asm/processor.h:79: error: array type has incomplete element type
255.11 -make[1]: *** [arch/x86_64/kernel/asm-offsets.asm] Error 1
255.12 -
255.13 ---- linux-2.6.11.3/include/asm-x86_64/processor.h.old Tue Mar 15 07:05:07 2005
255.14 -+++ linux-2.6.11.3/include/asm-x86_64/processor.h Tue Mar 15 07:09:53 2005
255.15 -@@ -179,7 +179,6 @@
255.16 - #define IO_BITMAP_BITS 65536
255.17 - #define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
255.18 - #define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
255.19 --#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
255.20 - #define INVALID_IO_BITMAP_OFFSET 0x8000
255.21 -
255.22 - struct i387_fxsave_struct {
255.23 -@@ -222,6 +221,8 @@
255.24 - */
255.25 - unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
255.26 - } __attribute__((packed)) ____cacheline_aligned;
255.27 -+
255.28 -+#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
255.29 -
255.30 - extern struct cpuinfo_x86 boot_cpu_data;
255.31 - DECLARE_PER_CPU(struct tss_struct,init_tss);
256.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-i2c.patch Sat Sep 22 17:25:42 2007 +0000
256.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
256.3 @@ -1,58 +0,0 @@
256.4 -Fixes
256.5 -
256.6 -In file included from fs/compat_ioctl.c:69,
256.7 - from arch/ppc64/kernel/ioctl32.c:24:
256.8 -include/linux/i2c.h:58: error: array type has incomplete element type
256.9 -include/linux/i2c.h:197: error: array type has incomplete element type
256.10 -
256.11 -when compiling with gcc-4.0.
256.12 -
256.13 ---- linux-2.6.11.3/include/linux/i2c.h.old 2005-03-19 10:59:09.000000000 -0800
256.14 -+++ linux-2.6.11.3/include/linux/i2c.h 2005-03-19 11:01:37.000000000 -0800
256.15 -@@ -36,7 +36,22 @@
256.16 -
256.17 - /* --- General options ------------------------------------------------ */
256.18 -
256.19 --struct i2c_msg;
256.20 -+/*
256.21 -+ * I2C Message - used for pure i2c transaction, also from /dev interface
256.22 -+ */
256.23 -+struct i2c_msg {
256.24 -+ __u16 addr; /* slave address */
256.25 -+ __u16 flags;
256.26 -+#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
256.27 -+#define I2C_M_RD 0x01
256.28 -+#define I2C_M_NOSTART 0x4000
256.29 -+#define I2C_M_REV_DIR_ADDR 0x2000
256.30 -+#define I2C_M_IGNORE_NAK 0x1000
256.31 -+#define I2C_M_NO_RD_ACK 0x0800
256.32 -+ __u16 len; /* msg length */
256.33 -+ __u8 *buf; /* pointer to msg data */
256.34 -+};
256.35 -+
256.36 - struct i2c_algorithm;
256.37 - struct i2c_adapter;
256.38 - struct i2c_client;
256.39 -@@ -379,22 +394,6 @@
256.40 - /* Return 1 if adapter supports everything we need, 0 if not. */
256.41 - extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func);
256.42 -
256.43 --/*
256.44 -- * I2C Message - used for pure i2c transaction, also from /dev interface
256.45 -- */
256.46 --struct i2c_msg {
256.47 -- __u16 addr; /* slave address */
256.48 -- __u16 flags;
256.49 --#define I2C_M_TEN 0x10 /* we have a ten bit chip address */
256.50 --#define I2C_M_RD 0x01
256.51 --#define I2C_M_NOSTART 0x4000
256.52 --#define I2C_M_REV_DIR_ADDR 0x2000
256.53 --#define I2C_M_IGNORE_NAK 0x1000
256.54 --#define I2C_M_NO_RD_ACK 0x0800
256.55 -- __u16 len; /* msg length */
256.56 -- __u8 *buf; /* pointer to msg data */
256.57 --};
256.58 --
256.59 - /* To determine what functionality is present */
256.60 -
256.61 - #define I2C_FUNC_I2C 0x00000001
257.1 --- a/patches/linux/2.6.11.3/linux-2.6.11-allow-gcc-4.0-ppc-mikpe.patch Sat Sep 22 17:25:42 2007 +0000
257.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
257.3 @@ -1,86 +0,0 @@
257.4 -
257.5 -Fixes
257.6 -
257.7 -In file included from arch/ppc/kernel/time.c:68:
257.8 -arch/ppc/kernel/time.c:92: error: static declaration of 'time_offset' follows non-static declaration
257.9 -include/linux/timex.h:236: error: previous declaration of 'time_offset' was here
257.10 -make[1]: *** [arch/ppc/kernel/time.o] Error 1
257.11 -
257.12 -when compiling with gcc-4.0
257.13 -
257.14 -Taken from
257.15 -http://user.it.uu.se/~mikpe/linux/patches/2.6/patch-gcc4-fixes-v2-2.6.11
257.16 -Also removes some obsolete externs that caused problems for Mike
257.17 -Mike's patch has a bit more stuff in it, but this was enough for me
257.18 -
257.19 -
257.20 -diff -rupN linux-2.6.11/arch/ppc/kernel/time.c linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c
257.21 ---- linux-2.6.11/arch/ppc/kernel/time.c 2005-03-02 19:24:14.000000000 +0100
257.22 -+++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/kernel/time.c 2005-03-02 19:36:26.000000000 +0100
257.23 -@@ -89,7 +89,7 @@ unsigned long tb_to_ns_scale;
257.24 -
257.25 - extern unsigned long wall_jiffies;
257.26 -
257.27 --static long time_offset;
257.28 -+static long ppc_time_offset;
257.29 -
257.30 - DEFINE_SPINLOCK(rtc_lock);
257.31 -
257.32 -@@ -172,7 +172,7 @@ void timer_interrupt(struct pt_regs * re
257.33 - xtime.tv_sec - last_rtc_update >= 659 &&
257.34 - abs((xtime.tv_nsec / 1000) - (1000000-1000000/HZ)) < 500000/HZ &&
257.35 - jiffies - wall_jiffies == 1) {
257.36 -- if (ppc_md.set_rtc_time(xtime.tv_sec+1 + time_offset) == 0)
257.37 -+ if (ppc_md.set_rtc_time(xtime.tv_sec+1 + ppc_time_offset) == 0)
257.38 - last_rtc_update = xtime.tv_sec+1;
257.39 - else
257.40 - /* Try again one minute later */
257.41 -@@ -289,7 +289,7 @@ void __init time_init(void)
257.42 - unsigned old_stamp, stamp, elapsed;
257.43 -
257.44 - if (ppc_md.time_init != NULL)
257.45 -- time_offset = ppc_md.time_init();
257.46 -+ ppc_time_offset = ppc_md.time_init();
257.47 -
257.48 - if (__USE_RTC()) {
257.49 - /* 601 processor: dec counts down by 128 every 128ns */
257.50 -@@ -334,10 +334,10 @@ void __init time_init(void)
257.51 - set_dec(tb_ticks_per_jiffy);
257.52 -
257.53 - /* If platform provided a timezone (pmac), we correct the time */
257.54 -- if (time_offset) {
257.55 -- sys_tz.tz_minuteswest = -time_offset / 60;
257.56 -+ if (ppc_time_offset) {
257.57 -+ sys_tz.tz_minuteswest = -ppc_time_offset / 60;
257.58 - sys_tz.tz_dsttime = 0;
257.59 -- xtime.tv_sec -= time_offset;
257.60 -+ xtime.tv_sec -= ppc_time_offset;
257.61 - }
257.62 - set_normalized_timespec(&wall_to_monotonic,
257.63 - -xtime.tv_sec, -xtime.tv_nsec);
257.64 -diff -rupN linux-2.6.11/arch/ppc/syslib/open_pic_defs.h linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h
257.65 ---- linux-2.6.11/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:24:14.000000000 +0100
257.66 -+++ linux-2.6.11.gcc4-fixes-v2/arch/ppc/syslib/open_pic_defs.h 2005-03-02 19:36:26.000000000 +0100
257.67 -@@ -172,9 +172,6 @@ struct OpenPIC {
257.68 - OpenPIC_Processor Processor[OPENPIC_MAX_PROCESSORS];
257.69 - };
257.70 -
257.71 --extern volatile struct OpenPIC __iomem *OpenPIC;
257.72 --
257.73 --
257.74 - /*
257.75 - * Current Task Priority Register
257.76 - */
257.77 -diff -rupN linux-2.6.11/include/asm-ppc/prom.h linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h
257.78 ---- linux-2.6.11/include/asm-ppc/prom.h 2003-09-28 12:19:57.000000000 +0200
257.79 -+++ linux-2.6.11.gcc4-fixes-v2/include/asm-ppc/prom.h 2005-03-02 19:36:26.000000000 +0100
257.80 -@@ -13,9 +13,6 @@
257.81 - typedef void *phandle;
257.82 - typedef void *ihandle;
257.83 -
257.84 --extern char *prom_display_paths[];
257.85 --extern unsigned int prom_num_displays;
257.86 --
257.87 - struct address_range {
257.88 - unsigned int space;
257.89 - unsigned int address;
258.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
258.2 +++ b/patches/linux/2.6.5/100-linux-2.6.5-x86_64-unistd.patch Sun Sep 23 17:08:09 2007 +0000
258.3 @@ -0,0 +1,80 @@
258.4 +Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
258.5 +then tabs fixed up by rediffing
258.6 +
258.7 +Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
258.8 +To: discuss@xxxxxxxxxx
258.9 +Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
258.10 +From: "David Lee" david.lee@xxxxxxxxxxxx
258.11 +Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
258.12 +
258.13 +I am getting compiler errors when trying to compile glibc 2.3.2 using
258.14 +the kernel headers from linux 2.6.5. The headers from linux 2.6.3 work
258.15 +fine.
258.16 +
258.17 +I've traced the cause of the problem to a change made in
258.18 +./include/asm-x86_64/unistd.h in the 2.6.4 release.
258.19 +
258.20 ++#ifndef __ASSEMBLY__
258.21 ++
258.22 ++#include <linux/linkage.h>
258.23 ++#include <linux/compiler.h>
258.24 ++#include <linux/types.h>
258.25 ++#include <asm/ptrace.h>
258.26 ++
258.27 ++asmlinkage long sys_ptrace(long request, long pid,
258.28 ++ unsigned long addr, long data);
258.29 ++asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
258.30 ++asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
258.31 +turn_on);
258.32 ++struct sigaction;
258.33 ++asmlinkage long sys_rt_sigaction(int sig,
258.34 ++ const struct sigaction __user *act,
258.35 ++ struct sigaction __user *oact,
258.36 ++ size_t sigsetsize);
258.37 ++
258.38 ++#endif /* __ASSEMBLY__ */
258.39 +
258.40 +Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
258.41 +including this file, which chokes the assembler with the struct
258.42 +declarations in the above #include's.
258.43 +
258.44 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
258.45 +_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
258.46 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
258.47 +_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
258.48 +instruction: `typedef struct{'
258.49 +
258.50 +There are also errors about conflicting re-declarations further along in
258.51 +the glibc build.
258.52 +
258.53 +../posix/sys/types.h:62: error: conflicting types for `dev_t'
258.54 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
258.55 +_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
258.56 +`dev_t'
258.57 +
258.58 +Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
258.59 +(defined __KERNEL__))' clears up the problem. My patch is below.
258.60 +
258.61 +dave
258.62 +
258.63 +
258.64 +--- linux-2.6.5/include/asm-x86_64/unistd.h.old 2004-04-03 19:37:36.000000000 -0800
258.65 ++++ linux-2.6.5/include/asm-x86_64/unistd.h 2004-05-05 11:07:11.000000000 -0700
258.66 +@@ -713,7 +713,7 @@
258.67 +
258.68 + #endif /* __KERNEL_SYSCALLS__ */
258.69 +
258.70 +-#ifndef __ASSEMBLY__
258.71 ++#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
258.72 +
258.73 + #include <linux/linkage.h>
258.74 + #include <linux/compiler.h>
258.75 +@@ -730,7 +730,7 @@
258.76 + struct sigaction __user *oact,
258.77 + size_t sigsetsize);
258.78 +
258.79 +-#endif /* __ASSEMBLY__ */
258.80 ++#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
258.81 +
258.82 + #endif /* __NO_STUBS */
258.83 +
259.1 --- a/patches/linux/2.6.5/linux-2.6.5-x86_64-unistd.patch Sat Sep 22 17:25:42 2007 +0000
259.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
259.3 @@ -1,80 +0,0 @@
259.4 -Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
259.5 -then tabs fixed up by rediffing
259.6 -
259.7 -Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
259.8 -To: discuss@xxxxxxxxxx
259.9 -Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
259.10 -From: "David Lee" david.lee@xxxxxxxxxxxx
259.11 -Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
259.12 -
259.13 -I am getting compiler errors when trying to compile glibc 2.3.2 using
259.14 -the kernel headers from linux 2.6.5. The headers from linux 2.6.3 work
259.15 -fine.
259.16 -
259.17 -I've traced the cause of the problem to a change made in
259.18 -./include/asm-x86_64/unistd.h in the 2.6.4 release.
259.19 -
259.20 -+#ifndef __ASSEMBLY__
259.21 -+
259.22 -+#include <linux/linkage.h>
259.23 -+#include <linux/compiler.h>
259.24 -+#include <linux/types.h>
259.25 -+#include <asm/ptrace.h>
259.26 -+
259.27 -+asmlinkage long sys_ptrace(long request, long pid,
259.28 -+ unsigned long addr, long data);
259.29 -+asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
259.30 -+asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
259.31 -turn_on);
259.32 -+struct sigaction;
259.33 -+asmlinkage long sys_rt_sigaction(int sig,
259.34 -+ const struct sigaction __user *act,
259.35 -+ struct sigaction __user *oact,
259.36 -+ size_t sigsetsize);
259.37 -+
259.38 -+#endif /* __ASSEMBLY__ */
259.39 -
259.40 -Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
259.41 -including this file, which chokes the assembler with the struct
259.42 -declarations in the above #include's.
259.43 -
259.44 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
259.45 -_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
259.46 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
259.47 -_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
259.48 -instruction: `typedef struct{'
259.49 -
259.50 -There are also errors about conflicting re-declarations further along in
259.51 -the glibc build.
259.52 -
259.53 -../posix/sys/types.h:62: error: conflicting types for `dev_t'
259.54 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
259.55 -_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
259.56 -`dev_t'
259.57 -
259.58 -Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
259.59 -(defined __KERNEL__))' clears up the problem. My patch is below.
259.60 -
259.61 -dave
259.62 -
259.63 -
259.64 ---- linux-2.6.5/include/asm-x86_64/unistd.h.old 2004-04-03 19:37:36.000000000 -0800
259.65 -+++ linux-2.6.5/include/asm-x86_64/unistd.h 2004-05-05 11:07:11.000000000 -0700
259.66 -@@ -713,7 +713,7 @@
259.67 -
259.68 - #endif /* __KERNEL_SYSCALLS__ */
259.69 -
259.70 --#ifndef __ASSEMBLY__
259.71 -+#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
259.72 -
259.73 - #include <linux/linkage.h>
259.74 - #include <linux/compiler.h>
259.75 -@@ -730,7 +730,7 @@
259.76 - struct sigaction __user *oact,
259.77 - size_t sigsetsize);
259.78 -
259.79 --#endif /* __ASSEMBLY__ */
259.80 -+#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
259.81 -
259.82 - #endif /* __NO_STUBS */
259.83 -
260.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
260.2 +++ b/patches/linux/2.6.6/100-kaz-types.patch Sun Sep 23 17:08:09 2007 +0000
260.3 @@ -0,0 +1,60 @@
260.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
260.5 +
260.6 +In file included from sys/ustat.h:30,
260.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
260.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
260.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
260.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
260.11 +make[1]: *** [misc/subdir_lib] Error 2
260.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
260.13 +make: *** [all] Error 2
260.14 +
260.15 +----------- snip ---------------
260.16 +
260.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
260.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
260.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
260.20 + error: redefinition of `struct user_fpu_struct'"
260.21 +To: linux-sh@m17n.org
260.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
260.23 +
260.24 +Hi,
260.25 +
260.26 +Dan Kegel <dank@kegel.com> wrote:
260.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
260.28 +[snip]
260.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
260.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
260.31 +[snip]
260.32 +> The error reminds me of the kind of thing fixed by
260.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
260.34 +
260.35 +It seems that the definitions in asm/user.h and the above patch collide.
260.36 +I'm not sure why you need this patch, but is it needed for the problem
260.37 +about struct ustat that you pointed out in this list, isn't it?
260.38 +I found why I don't hit ustat problem - my local kernel tree includes
260.39 +the following patch, though I can't recall about it.
260.40 +
260.41 +Regards,
260.42 + kaz
260.43 +--
260.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
260.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
260.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
260.47 +@@ -141,6 +141,7 @@
260.48 +
260.49 + #endif /* __KERNEL_STRICT_NAMES */
260.50 +
260.51 ++#ifdef __KERNEL__
260.52 + /*
260.53 + * Below are truly Linux-specific types that should never collide with
260.54 + * any application/library that wants linux/types.h.
260.55 +@@ -152,5 +153,6 @@
260.56 + char f_fname[6];
260.57 + char f_fpack[6];
260.58 + };
260.59 ++#endif
260.60 +
260.61 + #endif /* _LINUX_TYPES_H */
260.62 +
260.63 +
261.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
261.2 +++ b/patches/linux/2.6.6/110-linux-2.6.5-x86_64-unistd.patch Sun Sep 23 17:08:09 2007 +0000
261.3 @@ -0,0 +1,80 @@
261.4 +Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
261.5 +then tabs fixed up by rediffing
261.6 +
261.7 +Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
261.8 +To: discuss@xxxxxxxxxx
261.9 +Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
261.10 +From: "David Lee" david.lee@xxxxxxxxxxxx
261.11 +Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
261.12 +
261.13 +I am getting compiler errors when trying to compile glibc 2.3.2 using
261.14 +the kernel headers from linux 2.6.5. The headers from linux 2.6.3 work
261.15 +fine.
261.16 +
261.17 +I've traced the cause of the problem to a change made in
261.18 +./include/asm-x86_64/unistd.h in the 2.6.4 release.
261.19 +
261.20 ++#ifndef __ASSEMBLY__
261.21 ++
261.22 ++#include <linux/linkage.h>
261.23 ++#include <linux/compiler.h>
261.24 ++#include <linux/types.h>
261.25 ++#include <asm/ptrace.h>
261.26 ++
261.27 ++asmlinkage long sys_ptrace(long request, long pid,
261.28 ++ unsigned long addr, long data);
261.29 ++asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
261.30 ++asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
261.31 +turn_on);
261.32 ++struct sigaction;
261.33 ++asmlinkage long sys_rt_sigaction(int sig,
261.34 ++ const struct sigaction __user *act,
261.35 ++ struct sigaction __user *oact,
261.36 ++ size_t sigsetsize);
261.37 ++
261.38 ++#endif /* __ASSEMBLY__ */
261.39 +
261.40 +Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
261.41 +including this file, which chokes the assembler with the struct
261.42 +declarations in the above #include's.
261.43 +
261.44 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
261.45 +_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
261.46 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
261.47 +_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
261.48 +instruction: `typedef struct{'
261.49 +
261.50 +There are also errors about conflicting re-declarations further along in
261.51 +the glibc build.
261.52 +
261.53 +../posix/sys/types.h:62: error: conflicting types for `dev_t'
261.54 +/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
261.55 +_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
261.56 +`dev_t'
261.57 +
261.58 +Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
261.59 +(defined __KERNEL__))' clears up the problem. My patch is below.
261.60 +
261.61 +dave
261.62 +
261.63 +
261.64 +--- linux-2.6.5/include/asm-x86_64/unistd.h.old 2004-04-03 19:37:36.000000000 -0800
261.65 ++++ linux-2.6.5/include/asm-x86_64/unistd.h 2004-05-05 11:07:11.000000000 -0700
261.66 +@@ -713,7 +713,7 @@
261.67 +
261.68 + #endif /* __KERNEL_SYSCALLS__ */
261.69 +
261.70 +-#ifndef __ASSEMBLY__
261.71 ++#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
261.72 +
261.73 + #include <linux/linkage.h>
261.74 + #include <linux/compiler.h>
261.75 +@@ -730,7 +730,7 @@
261.76 + struct sigaction __user *oact,
261.77 + size_t sigsetsize);
261.78 +
261.79 +-#endif /* __ASSEMBLY__ */
261.80 ++#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
261.81 +
261.82 + #endif /* __NO_STUBS */
261.83 +
262.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
262.2 +++ b/patches/linux/2.6.6/120-linux-2.6.8-noshared-kconfig.patch Sun Sep 23 17:08:09 2007 +0000
262.3 @@ -0,0 +1,28 @@
262.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
262.5 +where shared libraries aren't easy. (There's no harm in using the
262.6 +static version of libkconfig.)
262.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
262.8 +
262.9 +
262.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
262.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
262.12 +@@ -68,8 +68,8 @@
262.13 + libkconfig-objs := zconf.tab.o
262.14 +
262.15 + host-progs := conf mconf qconf gconf
262.16 +-conf-objs := conf.o libkconfig.so
262.17 +-mconf-objs := mconf.o libkconfig.so
262.18 ++conf-objs := conf.o $(libkconfig-objs)
262.19 ++mconf-objs := mconf.o $(libkconfig-objs)
262.20 +
262.21 + ifeq ($(MAKECMDGOALS),xconfig)
262.22 + qconf-target := 1
262.23 +@@ -88,7 +88,7 @@
262.24 + gconf-objs := gconf.o kconfig_load.o
262.25 + endif
262.26 +
262.27 +-clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
262.28 ++clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
262.29 + .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
262.30 +
262.31 + # generated files seem to need this to find local include files
263.1 --- a/patches/linux/2.6.6/kaz-types.patch Sat Sep 22 17:25:42 2007 +0000
263.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
263.3 @@ -1,60 +0,0 @@
263.4 -The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
263.5 -
263.6 -In file included from sys/ustat.h:30,
263.7 - from ../sysdeps/unix/sysv/linux/ustat.c:21:
263.8 -../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
263.9 -make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
263.10 -make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
263.11 -make[1]: *** [misc/subdir_lib] Error 2
263.12 -make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
263.13 -make: *** [all] Error 2
263.14 -
263.15 ------------ snip ---------------
263.16 -
263.17 -Date: Fri, 06 Jun 2003 08:00:00 +0900
263.18 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
263.19 -Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
263.20 - error: redefinition of `struct user_fpu_struct'"
263.21 -To: linux-sh@m17n.org
263.22 -Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
263.23 -
263.24 -Hi,
263.25 -
263.26 -Dan Kegel <dank@kegel.com> wrote:
263.27 -> When I try to build glibc-2.3.2 for sh4, it fails with the error
263.28 -[snip]
263.29 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
263.30 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
263.31 -[snip]
263.32 -> The error reminds me of the kind of thing fixed by
263.33 -> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
263.34 -
263.35 -It seems that the definitions in asm/user.h and the above patch collide.
263.36 -I'm not sure why you need this patch, but is it needed for the problem
263.37 -about struct ustat that you pointed out in this list, isn't it?
263.38 -I found why I don't hit ustat problem - my local kernel tree includes
263.39 -the following patch, though I can't recall about it.
263.40 -
263.41 -Regards,
263.42 - kaz
263.43 ---
263.44 -diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
263.45 ---- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
263.46 -+++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
263.47 -@@ -141,6 +141,7 @@
263.48 -
263.49 - #endif /* __KERNEL_STRICT_NAMES */
263.50 -
263.51 -+#ifdef __KERNEL__
263.52 - /*
263.53 - * Below are truly Linux-specific types that should never collide with
263.54 - * any application/library that wants linux/types.h.
263.55 -@@ -152,5 +153,6 @@
263.56 - char f_fname[6];
263.57 - char f_fpack[6];
263.58 - };
263.59 -+#endif
263.60 -
263.61 - #endif /* _LINUX_TYPES_H */
263.62 -
263.63 -
264.1 --- a/patches/linux/2.6.6/linux-2.6.5-x86_64-unistd.patch Sat Sep 22 17:25:42 2007 +0000
264.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
264.3 @@ -1,80 +0,0 @@
264.4 -Retrieved with wget http://www.x86-64.org/lists/discuss/msg04963.html
264.5 -then tabs fixed up by rediffing
264.6 -
264.7 -Message-Id: EFF62C7EE88E71429E38641A1172F4C2077104@net.teracruz.com
264.8 -To: discuss@xxxxxxxxxx
264.9 -Subject: Compile error with glibc 2.3.2 + Linux 2.6.5 ARCH=x86_64
264.10 -From: "David Lee" david.lee@xxxxxxxxxxxx
264.11 -Date: Wed, 21 Apr 2004 15:26:04 -0500</li>
264.12 -
264.13 -I am getting compiler errors when trying to compile glibc 2.3.2 using
264.14 -the kernel headers from linux 2.6.5. The headers from linux 2.6.3 work
264.15 -fine.
264.16 -
264.17 -I've traced the cause of the problem to a change made in
264.18 -./include/asm-x86_64/unistd.h in the 2.6.4 release.
264.19 -
264.20 -+#ifndef __ASSEMBLY__
264.21 -+
264.22 -+#include <linux/linkage.h>
264.23 -+#include <linux/compiler.h>
264.24 -+#include <linux/types.h>
264.25 -+#include <asm/ptrace.h>
264.26 -+
264.27 -+asmlinkage long sys_ptrace(long request, long pid,
264.28 -+ unsigned long addr, long data);
264.29 -+asmlinkage long sys_iopl(unsigned int level, struct pt_regs regs);
264.30 -+asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int
264.31 -turn_on);
264.32 -+struct sigaction;
264.33 -+asmlinkage long sys_rt_sigaction(int sig,
264.34 -+ const struct sigaction __user *act,
264.35 -+ struct sigaction __user *oact,
264.36 -+ size_t sigsetsize);
264.37 -+
264.38 -+#endif /* __ASSEMBLY__ */
264.39 -
264.40 -Within glibc, ./sysdeps/unix/sysv/linux/x86_64/syscall.S ends up
264.41 -including this file, which chokes the assembler with the struct
264.42 -declarations in the above #include's.
264.43 -
264.44 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
264.45 -_64-linux/glibcinclude/linux/posix_types.h: Assembler messages:
264.46 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
264.47 -_64-linux/glibcinclude/linux/posix_types.h:36: Error: no such
264.48 -instruction: `typedef struct{'
264.49 -
264.50 -There are also errors about conflicting re-declarations further along in
264.51 -the glibc build.
264.52 -
264.53 -../posix/sys/types.h:62: error: conflicting types for `dev_t'
264.54 -/home/dlee/vcs/Products/Breeze/Dev/Prj/LinuxRH8/tscale2/tools/x86_64/x86
264.55 -_64-linux/glibcinclude/linux/types.h:23: error: previous declaration of
264.56 -`dev_t'
264.57 -
264.58 -Changing the '#ifndef __ASSEMBLY__' to '#if ((!defined __ASSEMBLY__) &&
264.59 -(defined __KERNEL__))' clears up the problem. My patch is below.
264.60 -
264.61 -dave
264.62 -
264.63 -
264.64 ---- linux-2.6.5/include/asm-x86_64/unistd.h.old 2004-04-03 19:37:36.000000000 -0800
264.65 -+++ linux-2.6.5/include/asm-x86_64/unistd.h 2004-05-05 11:07:11.000000000 -0700
264.66 -@@ -713,7 +713,7 @@
264.67 -
264.68 - #endif /* __KERNEL_SYSCALLS__ */
264.69 -
264.70 --#ifndef __ASSEMBLY__
264.71 -+#if ((!defined __ASSEMBLY__) && (defined __KERNEL__))
264.72 -
264.73 - #include <linux/linkage.h>
264.74 - #include <linux/compiler.h>
264.75 -@@ -730,7 +730,7 @@
264.76 - struct sigaction __user *oact,
264.77 - size_t sigsetsize);
264.78 -
264.79 --#endif /* __ASSEMBLY__ */
264.80 -+#endif /* ((!defined __ASSEMBLY__) && (defined __KERNEL__) */
264.81 -
264.82 - #endif /* __NO_STUBS */
264.83 -
265.1 --- a/patches/linux/2.6.6/linux-2.6.8-noshared-kconfig.patch Sat Sep 22 17:25:42 2007 +0000
265.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
265.3 @@ -1,28 +0,0 @@
265.4 -Lets you run 'make oldconfig' and 'make menuconfig' on systems
265.5 -where shared libraries aren't easy. (There's no harm in using the
265.6 -static version of libkconfig.)
265.7 -Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
265.8 -
265.9 -
265.10 ---- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
265.11 -+++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
265.12 -@@ -68,8 +68,8 @@
265.13 - libkconfig-objs := zconf.tab.o
265.14 -
265.15 - host-progs := conf mconf qconf gconf
265.16 --conf-objs := conf.o libkconfig.so
265.17 --mconf-objs := mconf.o libkconfig.so
265.18 -+conf-objs := conf.o $(libkconfig-objs)
265.19 -+mconf-objs := mconf.o $(libkconfig-objs)
265.20 -
265.21 - ifeq ($(MAKECMDGOALS),xconfig)
265.22 - qconf-target := 1
265.23 -@@ -88,7 +88,7 @@
265.24 - gconf-objs := gconf.o kconfig_load.o
265.25 - endif
265.26 -
265.27 --clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
265.28 -+clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
265.29 - .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
265.30 -
265.31 - # generated files seem to need this to find local include files
266.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
266.2 +++ b/patches/linux/2.6.7/100-kaz-types.patch Sun Sep 23 17:08:09 2007 +0000
266.3 @@ -0,0 +1,60 @@
266.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
266.5 +
266.6 +In file included from sys/ustat.h:30,
266.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
266.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
266.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
266.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
266.11 +make[1]: *** [misc/subdir_lib] Error 2
266.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
266.13 +make: *** [all] Error 2
266.14 +
266.15 +----------- snip ---------------
266.16 +
266.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
266.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
266.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
266.20 + error: redefinition of `struct user_fpu_struct'"
266.21 +To: linux-sh@m17n.org
266.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
266.23 +
266.24 +Hi,
266.25 +
266.26 +Dan Kegel <dank@kegel.com> wrote:
266.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
266.28 +[snip]
266.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
266.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
266.31 +[snip]
266.32 +> The error reminds me of the kind of thing fixed by
266.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
266.34 +
266.35 +It seems that the definitions in asm/user.h and the above patch collide.
266.36 +I'm not sure why you need this patch, but is it needed for the problem
266.37 +about struct ustat that you pointed out in this list, isn't it?
266.38 +I found why I don't hit ustat problem - my local kernel tree includes
266.39 +the following patch, though I can't recall about it.
266.40 +
266.41 +Regards,
266.42 + kaz
266.43 +--
266.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
266.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
266.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
266.47 +@@ -141,6 +141,7 @@
266.48 +
266.49 + #endif /* __KERNEL_STRICT_NAMES */
266.50 +
266.51 ++#ifdef __KERNEL__
266.52 + /*
266.53 + * Below are truly Linux-specific types that should never collide with
266.54 + * any application/library that wants linux/types.h.
266.55 +@@ -152,5 +153,6 @@
266.56 + char f_fname[6];
266.57 + char f_fpack[6];
266.58 + };
266.59 ++#endif
266.60 +
266.61 + #endif /* _LINUX_TYPES_H */
266.62 +
266.63 +
267.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
267.2 +++ b/patches/linux/2.6.7/110-linux-2.6.7-build_on_case_insensitive_fs-1.patch Sun Sep 23 17:08:09 2007 +0000
267.3 @@ -0,0 +1,679 @@
267.4 +Submitted By: Martin Schaffner <schaffner@gmx.li>
267.5 +Date: 2004-06-19
267.6 +Initial Package Version: 2.6.7
267.7 +Upstream Status: Not submitted
267.8 +Origin: Martin Schaffner
267.9 +Description: Enables build on case-insensitive file systems
267.10 +URL: http://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
267.11 +
267.12 +diff -ur linux-2.6.7/Makefile linux-2.6.7-mod/Makefile
267.13 +--- linux-2.6.7/Makefile Fri Jun 18 22:51:03 2004
267.14 ++++ linux-2.6.7-mod/Makefile Sat Jun 19 12:43:10 2004
267.15 +@@ -549,7 +549,7 @@
267.16 + $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
267.17 + endef
267.18 +
267.19 +-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
267.20 ++LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
267.21 +
267.22 + # Generate section listing all symbols and add it into vmlinux
267.23 + # It's a three stage process:
267.24 +@@ -575,23 +575,23 @@
267.25 + .tmp_kallsyms%.S: .tmp_vmlinux%
267.26 + $(call cmd,kallsyms)
267.27 +
267.28 +-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
267.29 ++.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
267.30 + +$(call if_changed_rule,vmlinux__)
267.31 +
267.32 +-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
267.33 ++.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
267.34 + $(call if_changed_rule,vmlinux__)
267.35 +
267.36 + endif
267.37 +
267.38 + # Finally the vmlinux rule
267.39 +
267.40 +-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
267.41 ++vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
267.42 + $(call if_changed_rule,vmlinux)
267.43 +
267.44 + # The actual objects are generated when descending,
267.45 + # make sure no implicit rule kicks in
267.46 +
267.47 +-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
267.48 ++$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
267.49 +
267.50 + # Handle descending into subdirectories listed in $(vmlinux-dirs)
267.51 +
267.52 +@@ -640,7 +640,7 @@
267.53 + # Single targets
267.54 + # ---------------------------------------------------------------------------
267.55 +
267.56 +-%.s: %.c scripts FORCE
267.57 ++%.asm: %.c scripts FORCE
267.58 + $(Q)$(MAKE) $(build)=$(@D) $@
267.59 + %.i: %.c scripts FORCE
267.60 + $(Q)$(MAKE) $(build)=$(@D) $@
267.61 +@@ -650,7 +650,7 @@
267.62 + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
267.63 + %.lst: %.c scripts FORCE
267.64 + $(Q)$(MAKE) $(build)=$(@D) $@
267.65 +-%.s: %.S scripts FORCE
267.66 ++%.asm: %.S scripts FORCE
267.67 + $(Q)$(MAKE) $(build)=$(@D) $@
267.68 + %.o: %.S scripts FORCE
267.69 + $(Q)$(MAKE) $(build)=$(@D) $@
267.70 +diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
267.71 +--- linux-2.6.7/arch/alpha/Makefile Fri Jun 18 22:51:03 2004
267.72 ++++ linux-2.6.7-mod/arch/alpha/Makefile Sat Jun 19 12:46:32 2004
267.73 +@@ -114,10 +114,10 @@
267.74 +
267.75 + prepare: include/asm-$(ARCH)/asm_offsets.h
267.76 +
267.77 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.78 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.79 + include/config/MARKER
267.80 +
267.81 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.82 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.83 + $(call filechk,gen-asm-offsets)
267.84 +
267.85 + archclean:
267.86 +diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
267.87 +--- linux-2.6.7/arch/alpha/kernel/Makefile Mon May 10 04:32:29 2004
267.88 ++++ linux-2.6.7-mod/arch/alpha/kernel/Makefile Sat Jun 19 12:46:48 2004
267.89 +@@ -2,7 +2,7 @@
267.90 + # Makefile for the linux kernel.
267.91 + #
267.92 +
267.93 +-extra-y := head.o vmlinux.lds.s
267.94 ++extra-y := head.o vmlinux.lds.asm
267.95 + EXTRA_AFLAGS := $(CFLAGS)
267.96 + EXTRA_CFLAGS := -Werror -Wno-sign-compare
267.97 +
267.98 +diff -ur linux-2.6.7/arch/arm/Makefile linux-2.6.7-mod/arch/arm/Makefile
267.99 +--- linux-2.6.7/arch/arm/Makefile Fri Jun 18 22:51:04 2004
267.100 ++++ linux-2.6.7-mod/arch/arm/Makefile Sat Jun 19 12:47:07 2004
267.101 +@@ -175,10 +175,10 @@
267.102 + i:; $(Q)$(MAKE) $(build)=$(boot) install
267.103 + zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
267.104 +
267.105 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.106 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.107 + include/asm-arm/.arch
267.108 +
267.109 +-include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
267.110 ++include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.111 + $(call filechk,gen-asm-offsets)
267.112 +
267.113 + define archhelp
267.114 +diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
267.115 +--- linux-2.6.7/arch/arm/kernel/Makefile Mon May 10 04:33:19 2004
267.116 ++++ linux-2.6.7-mod/arch/arm/kernel/Makefile Sat Jun 19 12:47:25 2004
267.117 +@@ -27,7 +27,7 @@
267.118 + head-y := head.o
267.119 + obj-$(CONFIG_DEBUG_LL) += debug.o
267.120 +
267.121 +-extra-y := $(head-y) init_task.o vmlinux.lds.s
267.122 ++extra-y := $(head-y) init_task.o vmlinux.lds.asm
267.123 +
267.124 + # Spell out some dependencies that aren't automatically figured out
267.125 + $(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
267.126 +diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
267.127 +--- linux-2.6.7/arch/arm26/Makefile Mon May 10 04:32:28 2004
267.128 ++++ linux-2.6.7-mod/arch/arm26/Makefile Sat Jun 19 12:48:24 2004
267.129 +@@ -101,10 +101,10 @@
267.130 + fi; \
267.131 + )
267.132 +
267.133 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.134 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.135 + include/config/MARKER
267.136 +
267.137 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.138 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.139 + $(call filechk,gen-asm-offsets)
267.140 +
267.141 + define archhelp
267.142 +diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
267.143 +--- linux-2.6.7/arch/arm26/kernel/Makefile Mon May 10 04:32:29 2004
267.144 ++++ linux-2.6.7-mod/arch/arm26/kernel/Makefile Sat Jun 19 12:48:30 2004
267.145 +@@ -14,5 +14,5 @@
267.146 + obj-$(CONFIG_FIQ) += fiq.o
267.147 + obj-$(CONFIG_MODULES) += armksyms.o
267.148 +
267.149 +-extra-y := init_task.o vmlinux.lds.s
267.150 ++extra-y := init_task.o vmlinux.lds.asm
267.151 +
267.152 +diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
267.153 +--- linux-2.6.7/arch/cris/Makefile Fri Jun 18 22:51:07 2004
267.154 ++++ linux-2.6.7-mod/arch/cris/Makefile Sat Jun 19 12:48:47 2004
267.155 +@@ -107,8 +107,8 @@
267.156 + @ln -sf $(SARCH) include/asm-$(ARCH)/arch
267.157 + @touch $@
267.158 +
267.159 +-arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.160 ++arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.161 + include/config/MARKER
267.162 +
267.163 +-include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
267.164 ++include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
267.165 + $(call filechk,gen-asm-offsets)
267.166 +diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
267.167 +--- linux-2.6.7/arch/cris/kernel/Makefile Fri Jun 18 22:51:09 2004
267.168 ++++ linux-2.6.7-mod/arch/cris/kernel/Makefile Sat Jun 19 12:48:53 2004
267.169 +@@ -3,7 +3,7 @@
267.170 + # Makefile for the linux kernel.
267.171 + #
267.172 +
267.173 +-extra-y := vmlinux.lds.s
267.174 ++extra-y := vmlinux.lds.asm
267.175 +
267.176 + obj-y := process.o traps.o irq.o ptrace.o setup.o \
267.177 + time.o sys_cris.o semaphore.o
267.178 +diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
267.179 +--- linux-2.6.7/arch/h8300/Makefile Fri Jun 18 22:51:09 2004
267.180 ++++ linux-2.6.7-mod/arch/h8300/Makefile Sat Jun 19 12:49:12 2004
267.181 +@@ -64,7 +64,7 @@
267.182 +
267.183 + prepare: include/asm-$(ARCH)/asm-offsets.h
267.184 +
267.185 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
267.186 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
267.187 + include/asm include/linux/version.h
267.188 + $(call filechk,gen-asm-offsets)
267.189 +
267.190 +diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
267.191 +--- linux-2.6.7/arch/h8300/kernel/Makefile Fri Jun 18 22:51:09 2004
267.192 ++++ linux-2.6.7-mod/arch/h8300/kernel/Makefile Sat Jun 19 12:49:32 2004
267.193 +@@ -2,7 +2,7 @@
267.194 + # Makefile for the linux kernel.
267.195 + #
267.196 +
267.197 +-extra-y := vmlinux.lds.s
267.198 ++extra-y := vmlinux.lds.asm
267.199 +
267.200 + obj-y := process.o traps.o ptrace.o ints.o \
267.201 + sys_h8300.o time.o semaphore.o signal.o \
267.202 +diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
267.203 +--- linux-2.6.7/arch/i386/Makefile Fri Jun 18 22:51:10 2004
267.204 ++++ linux-2.6.7-mod/arch/i386/Makefile Sat Jun 19 12:49:43 2004
267.205 +@@ -141,10 +141,10 @@
267.206 + prepare: include/asm-$(ARCH)/asm_offsets.h
267.207 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
267.208 +
267.209 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.210 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.211 + include/config/MARKER
267.212 +
267.213 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.214 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.215 + $(call filechk,gen-asm-offsets)
267.216 +
267.217 + archclean:
267.218 +diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
267.219 +--- linux-2.6.7/arch/i386/kernel/Makefile Mon May 10 04:32:02 2004
267.220 ++++ linux-2.6.7-mod/arch/i386/kernel/Makefile Sat Jun 19 12:49:54 2004
267.221 +@@ -2,7 +2,7 @@
267.222 + # Makefile for the linux kernel.
267.223 + #
267.224 +
267.225 +-extra-y := head.o init_task.o vmlinux.lds.s
267.226 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.227 +
267.228 + obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
267.229 + ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
267.230 +diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
267.231 +--- linux-2.6.7/arch/ia64/Makefile Mon May 10 04:31:59 2004
267.232 ++++ linux-2.6.7-mod/arch/ia64/Makefile Sat Jun 19 12:50:12 2004
267.233 +@@ -88,12 +88,12 @@
267.234 +
267.235 + prepare: include/asm-ia64/offsets.h
267.236 +
267.237 +-arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
267.238 ++arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
267.239 +
267.240 +-include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
267.241 ++include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
267.242 + $(call filechk,gen-asm-offsets)
267.243 +
267.244 +-arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
267.245 ++arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
267.246 +
267.247 + include/asm-ia64/.offsets.h.stamp:
267.248 + mkdir -p include/asm-ia64
267.249 +diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
267.250 +--- linux-2.6.7/arch/ia64/kernel/Makefile Fri Jun 18 22:51:13 2004
267.251 ++++ linux-2.6.7-mod/arch/ia64/kernel/Makefile Sat Jun 19 12:52:14 2004
267.252 +@@ -2,7 +2,7 @@
267.253 + # Makefile for the linux kernel.
267.254 + #
267.255 +
267.256 +-extra-y := head.o init_task.o vmlinux.lds.s
267.257 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.258 +
267.259 + obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
267.260 + irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
267.261 +@@ -21,7 +21,7 @@
267.262 + # The gate DSO image is built using a special linker script.
267.263 + targets += gate.so gate-syms.o
267.264 +
267.265 +-extra-y += gate.so gate-syms.o gate.lds.s gate.o
267.266 ++extra-y += gate.so gate-syms.o gate.lds.asm gate.o
267.267 +
267.268 + # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
267.269 + CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
267.270 +@@ -32,14 +32,14 @@
267.271 + cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
267.272 +
267.273 + GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
267.274 +-$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
267.275 ++$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
267.276 + $(call if_changed,gate)
267.277 +
267.278 + $(obj)/built-in.o: $(obj)/gate-syms.o
267.279 + $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
267.280 +
267.281 + GATECFLAGS_gate-syms.o = -r
267.282 +-$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
267.283 ++$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
267.284 + $(call if_changed,gate)
267.285 +
267.286 + # gate-data.o contains the gate DSO image as data in section .data.gate.
267.287 +diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
267.288 +--- linux-2.6.7/arch/m68k/Makefile Fri Jun 18 22:51:14 2004
267.289 ++++ linux-2.6.7-mod/arch/m68k/Makefile Sat Jun 19 12:52:30 2004
267.290 +@@ -114,10 +114,10 @@
267.291 + prepare: include/asm-$(ARCH)/offsets.h
267.292 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
267.293 +
267.294 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.295 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.296 + include/config/MARKER
267.297 +
267.298 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.299 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.300 + $(call filechk,gen-asm-offsets)
267.301 +
267.302 + archclean:
267.303 +diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
267.304 +--- linux-2.6.7/arch/m68k/kernel/Makefile Mon May 10 04:33:10 2004
267.305 ++++ linux-2.6.7-mod/arch/m68k/kernel/Makefile Sat Jun 19 12:52:35 2004
267.306 +@@ -7,7 +7,7 @@
267.307 + else
267.308 + extra-y := sun3-head.o
267.309 + endif
267.310 +-extra-y += vmlinux.lds.s
267.311 ++extra-y += vmlinux.lds.asm
267.312 +
267.313 + obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
267.314 + sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
267.315 +diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
267.316 +--- linux-2.6.7/arch/m68knommu/Makefile Mon May 10 04:32:54 2004
267.317 ++++ linux-2.6.7-mod/arch/m68knommu/Makefile Sat Jun 19 12:52:57 2004
267.318 +@@ -89,7 +89,7 @@
267.319 + head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
267.320 +
267.321 + CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
267.322 +- arch/$(ARCH)/kernel/asm-offsets.s
267.323 ++ arch/$(ARCH)/kernel/asm-offsets.asm
267.324 +
267.325 + core-y += arch/m68knommu/kernel/ \
267.326 + arch/m68knommu/mm/ \
267.327 +@@ -102,7 +102,7 @@
267.328 + archclean:
267.329 + $(call descend arch/$(ARCH)/boot, subdirclean)
267.330 +
267.331 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
267.332 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
267.333 + include/asm include/linux/version.h \
267.334 + include/config/MARKER
267.335 + $(call filechk,gen-asm-offsets)
267.336 +diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
267.337 +--- linux-2.6.7/arch/m68knommu/kernel/Makefile Mon May 10 04:32:26 2004
267.338 ++++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile Sat Jun 19 12:53:20 2004
267.339 +@@ -2,7 +2,7 @@
267.340 + # Makefile for arch/m68knommu/kernel.
267.341 + #
267.342 +
267.343 +-extra-y := vmlinux.lds.s
267.344 ++extra-y := vmlinux.lds.asm
267.345 +
267.346 + obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
267.347 + setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
267.348 +diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
267.349 +--- linux-2.6.7/arch/mips/Makefile Fri Jun 18 22:51:19 2004
267.350 ++++ linux-2.6.7-mod/arch/mips/Makefile Sat Jun 19 12:53:35 2004
267.351 +@@ -752,12 +752,12 @@
267.352 + prepare: include/asm-$(ARCH)/offset.h \
267.353 + include/asm-$(ARCH)/reg.h
267.354 +
267.355 +-arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
267.356 ++arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
267.357 + include/config/MARKER
267.358 +
267.359 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
267.360 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
267.361 + $(call filechk,gen-asm-offset.h)
267.362 +-include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
267.363 ++include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
267.364 + $(call filechk,gen-asm-reg.h)
267.365 +
267.366 + CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
267.367 +diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
267.368 +--- linux-2.6.7/arch/mips/kernel/Makefile Mon May 10 04:32:28 2004
267.369 ++++ linux-2.6.7-mod/arch/mips/kernel/Makefile Sat Jun 19 12:53:41 2004
267.370 +@@ -2,7 +2,7 @@
267.371 + # Makefile for the Linux/MIPS kernel.
267.372 + #
267.373 +
267.374 +-extra-y := head.o init_task.o vmlinux.lds.s
267.375 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.376 +
267.377 + obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
267.378 + ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
267.379 +diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
267.380 +--- linux-2.6.7/arch/parisc/Makefile Fri Jun 18 22:51:21 2004
267.381 ++++ linux-2.6.7-mod/arch/parisc/Makefile Sat Jun 19 12:53:47 2004
267.382 +@@ -88,10 +88,10 @@
267.383 +
267.384 + prepare: include/asm-parisc/offsets.h
267.385 +
267.386 +-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.387 ++arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.388 + include/config/MARKER
267.389 +
267.390 +-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
267.391 ++include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
267.392 + $(call filechk,gen-asm-offsets)
267.393 +
267.394 + CLEAN_FILES += lifimage include/asm-parisc/offsets.h
267.395 +diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
267.396 +--- linux-2.6.7/arch/parisc/kernel/Makefile Fri Jun 18 22:51:21 2004
267.397 ++++ linux-2.6.7-mod/arch/parisc/kernel/Makefile Sat Jun 19 12:53:53 2004
267.398 +@@ -4,7 +4,7 @@
267.399 +
267.400 + head-y := head.o
267.401 + head-$(CONFIG_PARISC64) := head64.o
267.402 +-extra-y := init_task.o $(head-y) vmlinux.lds.s
267.403 ++extra-y := init_task.o $(head-y) vmlinux.lds.asm
267.404 +
267.405 + AFLAGS_entry.o := -traditional
267.406 + AFLAGS_pacache.o := -traditional
267.407 +diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
267.408 +--- linux-2.6.7/arch/ppc/Makefile Fri Jun 18 22:51:22 2004
267.409 ++++ linux-2.6.7-mod/arch/ppc/Makefile Sat Jun 19 12:54:09 2004
267.410 +@@ -78,10 +78,10 @@
267.411 +
267.412 + prepare: include/asm-$(ARCH)/offsets.h checkbin
267.413 +
267.414 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.415 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.416 + include/config/MARKER
267.417 +
267.418 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.419 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.420 + $(call filechk,gen-asm-offsets)
267.421 +
267.422 + ifdef CONFIG_6xx
267.423 +@@ -104,4 +104,4 @@
267.424 + endif
267.425 +
267.426 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
267.427 +- arch/$(ARCH)/kernel/asm-offsets.s
267.428 ++ arch/$(ARCH)/kernel/asm-offsets.asm
267.429 +diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
267.430 +--- linux-2.6.7/arch/ppc/kernel/Makefile Fri Jun 18 22:51:24 2004
267.431 ++++ linux-2.6.7-mod/arch/ppc/kernel/Makefile Sat Jun 19 12:43:10 2004
267.432 +@@ -15,7 +15,7 @@
267.433 + extra-$(CONFIG_8xx) := head_8xx.o
267.434 + extra-$(CONFIG_6xx) += idle_6xx.o
267.435 + extra-$(CONFIG_POWER4) += idle_power4.o
267.436 +-extra-y += vmlinux.lds.s
267.437 ++extra-y += vmlinux.lds.asm
267.438 +
267.439 + obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
267.440 + process.o signal.o ptrace.o align.o \
267.441 +diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
267.442 +--- linux-2.6.7/arch/ppc64/Makefile Fri Jun 18 22:51:26 2004
267.443 ++++ linux-2.6.7-mod/arch/ppc64/Makefile Sat Jun 19 12:54:32 2004
267.444 +@@ -67,10 +67,10 @@
267.445 +
267.446 + prepare: include/asm-ppc64/offsets.h
267.447 +
267.448 +-arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.449 ++arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.450 + include/config/MARKER
267.451 +
267.452 +-include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
267.453 ++include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
267.454 + $(call filechk,gen-asm-offsets)
267.455 +
267.456 + define archhelp
267.457 +diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
267.458 +--- linux-2.6.7/arch/ppc64/kernel/Makefile Mon May 10 04:33:20 2004
267.459 ++++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile Sat Jun 19 12:54:39 2004
267.460 +@@ -3,7 +3,7 @@
267.461 + #
267.462 +
267.463 + EXTRA_CFLAGS += -mno-minimal-toc
267.464 +-extra-y := head.o vmlinux.lds.s
267.465 ++extra-y := head.o vmlinux.lds.asm
267.466 +
267.467 + obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \
267.468 + time.o process.o signal.o syscalls.o misc.o ptrace.o \
267.469 +diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
267.470 +--- linux-2.6.7/arch/s390/Makefile Mon May 10 04:32:02 2004
267.471 ++++ linux-2.6.7-mod/arch/s390/Makefile Sat Jun 19 12:54:46 2004
267.472 +@@ -68,10 +68,10 @@
267.473 +
267.474 + prepare: include/asm-$(ARCH)/offsets.h
267.475 +
267.476 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.477 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.478 + include/config/MARKER
267.479 +
267.480 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.481 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.482 + $(call filechk,gen-asm-offsets)
267.483 +
267.484 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
267.485 +diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
267.486 +--- linux-2.6.7/arch/s390/kernel/Makefile Mon May 10 04:33:20 2004
267.487 ++++ linux-2.6.7-mod/arch/s390/kernel/Makefile Sat Jun 19 12:54:52 2004
267.488 +@@ -10,7 +10,7 @@
267.489 +
267.490 + extra-$(CONFIG_ARCH_S390_31) += head.o
267.491 + extra-$(CONFIG_ARCH_S390X) += head64.o
267.492 +-extra-y += init_task.o vmlinux.lds.s
267.493 ++extra-y += init_task.o vmlinux.lds.asm
267.494 +
267.495 + obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
267.496 + obj-$(CONFIG_SMP) += smp.o
267.497 +diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
267.498 +--- linux-2.6.7/arch/sh/kernel/Makefile Mon May 10 04:32:39 2004
267.499 ++++ linux-2.6.7-mod/arch/sh/kernel/Makefile Sat Jun 19 12:55:33 2004
267.500 +@@ -2,7 +2,7 @@
267.501 + # Makefile for the Linux/SuperH kernel.
267.502 + #
267.503 +
267.504 +-extra-y := head.o init_task.o vmlinux.lds.s
267.505 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.506 +
267.507 + obj-y := process.o signal.o entry.o traps.o irq.o \
267.508 + ptrace.o setup.o time.o sys_sh.o semaphore.o \
267.509 +diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
267.510 +--- linux-2.6.7/arch/sparc/Makefile Fri Jun 18 22:51:29 2004
267.511 ++++ linux-2.6.7-mod/arch/sparc/Makefile Sat Jun 19 12:55:48 2004
267.512 +@@ -61,14 +61,14 @@
267.513 +
267.514 + prepare: include/asm-$(ARCH)/asm_offsets.h
267.515 +
267.516 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.517 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.518 + include/config/MARKER
267.519 +
267.520 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
267.521 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.522 + $(call filechk,gen-asm-offsets)
267.523 +
267.524 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
267.525 +- arch/$(ARCH)/kernel/asm-offsets.s \
267.526 ++ arch/$(ARCH)/kernel/asm-offsets.asm \
267.527 + arch/$(ARCH)/boot/System.map
267.528 +
267.529 + # Don't use tabs in echo arguments.
267.530 +diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
267.531 +--- linux-2.6.7/arch/sparc/kernel/Makefile Mon May 10 04:33:13 2004
267.532 ++++ linux-2.6.7-mod/arch/sparc/kernel/Makefile Sat Jun 19 12:55:52 2004
267.533 +@@ -2,7 +2,7 @@
267.534 + # Makefile for the linux kernel.
267.535 + #
267.536 +
267.537 +-extra-y := head.o init_task.o vmlinux.lds.s
267.538 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.539 +
267.540 + EXTRA_AFLAGS := -ansi
267.541 +
267.542 +diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
267.543 +--- linux-2.6.7/arch/sparc64/kernel/Makefile Mon May 10 04:32:02 2004
267.544 ++++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile Sat Jun 19 12:56:24 2004
267.545 +@@ -5,7 +5,7 @@
267.546 + EXTRA_AFLAGS := -ansi
267.547 + EXTRA_CFLAGS := -Werror
267.548 +
267.549 +-extra-y := head.o init_task.o vmlinux.lds.s
267.550 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.551 +
267.552 + obj-y := process.o setup.o cpu.o idprom.o \
267.553 + traps.o devices.o auxio.o \
267.554 +diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
267.555 +--- linux-2.6.7/arch/um/Makefile Mon May 10 04:32:52 2004
267.556 ++++ linux-2.6.7-mod/arch/um/Makefile Sat Jun 19 12:57:07 2004
267.557 +@@ -77,7 +77,7 @@
267.558 + # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
267.559 +
267.560 + LINK_TT = -static
267.561 +-LD_SCRIPT_TT := uml.lds.s
267.562 ++LD_SCRIPT_TT := uml.lds.asm
267.563 +
267.564 + ifeq ($(CONFIG_STATIC_LINK),y)
267.565 + LINK-y += $(LINK_TT)
267.566 +@@ -103,11 +103,11 @@
267.567 + -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
267.568 + -DKERNEL_STACK_SIZE=$(STACK_SIZE)
267.569 +
267.570 +-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
267.571 ++AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
267.572 +
267.573 + LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
267.574 +
267.575 +-$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
267.576 ++$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
267.577 + $(call if_changed_dep,as_s_S)
267.578 +
267.579 + linux: vmlinux $(LD_SCRIPT-y)
267.580 +@@ -122,8 +122,8 @@
267.581 + # To get a definition of F_SETSIG
267.582 + USER_CFLAGS += -D_GNU_SOURCE
267.583 +
267.584 +-CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
267.585 +- $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
267.586 ++CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
267.587 ++ $(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
267.588 +
267.589 + $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
267.590 + $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
267.591 +diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
267.592 +--- linux-2.6.7/arch/um/kernel/Makefile Mon May 10 04:32:53 2004
267.593 ++++ linux-2.6.7-mod/arch/um/kernel/Makefile Sat Jun 19 12:57:15 2004
267.594 +@@ -3,7 +3,7 @@
267.595 + # Licensed under the GPL
267.596 + #
267.597 +
267.598 +-extra-y := vmlinux.lds.s
267.599 ++extra-y := vmlinux.lds.asm
267.600 +
267.601 + obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
267.602 + helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
267.603 +diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
267.604 +--- linux-2.6.7/arch/v850/Makefile Mon May 10 04:33:21 2004
267.605 ++++ linux-2.6.7-mod/arch/v850/Makefile Sat Jun 19 12:57:59 2004
267.606 +@@ -52,12 +52,12 @@
267.607 + prepare: include/asm-$(ARCH)/asm-consts.h
267.608 +
267.609 + # Generate constants from C code for use by asm files
267.610 +-arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
267.611 ++arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
267.612 + include/config/MARKER
267.613 +
267.614 +-include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
267.615 ++include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
267.616 + $(call filechk,gen-asm-offsets)
267.617 +
267.618 + CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
267.619 +- arch/$(ARCH)/kernel/asm-consts.s \
267.620 ++ arch/$(ARCH)/kernel/asm-consts.asm \
267.621 + root_fs_image.o
267.622 +diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
267.623 +--- linux-2.6.7/arch/v850/kernel/Makefile Mon May 10 04:33:21 2004
267.624 ++++ linux-2.6.7-mod/arch/v850/kernel/Makefile Sat Jun 19 12:58:04 2004
267.625 +@@ -9,7 +9,7 @@
267.626 + # for more details.
267.627 + #
267.628 +
267.629 +-extra-y := head.o init_task.o vmlinux.lds.s
267.630 ++extra-y := head.o init_task.o vmlinux.lds.asm
267.631 +
267.632 + obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
267.633 + signal.o irq.o mach.o ptrace.o bug.o
267.634 +diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
267.635 +--- linux-2.6.7/arch/x86_64/Makefile Mon May 10 04:33:19 2004
267.636 ++++ linux-2.6.7-mod/arch/x86_64/Makefile Sat Jun 19 12:58:10 2004
267.637 +@@ -93,10 +93,10 @@
267.638 +
267.639 + prepare: include/asm-$(ARCH)/offset.h
267.640 +
267.641 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
267.642 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
267.643 + include/config/MARKER
267.644 +
267.645 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
267.646 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
267.647 + $(call filechk,gen-asm-offsets)
267.648 +
267.649 + CLEAN_FILES += include/asm-$(ARCH)/offset.h
267.650 +diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
267.651 +--- linux-2.6.7/arch/x86_64/kernel/Makefile Fri Jun 18 22:51:32 2004
267.652 ++++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile Sat Jun 19 12:58:17 2004
267.653 +@@ -2,7 +2,7 @@
267.654 + # Makefile for the linux kernel.
267.655 + #
267.656 +
267.657 +-extra-y := head.o head64.o init_task.o vmlinux.lds.s
267.658 ++extra-y := head.o head64.o init_task.o vmlinux.lds.asm
267.659 + EXTRA_AFLAGS := -traditional
267.660 + obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
267.661 + ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
267.662 +diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
267.663 +--- linux-2.6.7/scripts/Makefile.build Mon May 10 04:33:13 2004
267.664 ++++ linux-2.6.7-mod/scripts/Makefile.build Sat Jun 19 12:43:10 2004
267.665 +@@ -110,7 +110,7 @@
267.666 + quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
267.667 + cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
267.668 +
267.669 +-%.s: %.c FORCE
267.670 ++%.asm: %.c FORCE
267.671 + $(call if_changed_dep,cc_s_c)
267.672 +
267.673 + quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
267.674 +@@ -197,7 +197,7 @@
267.675 + quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
267.676 + cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
267.677 +
267.678 +-%.s: %.S FORCE
267.679 ++%.asm: %.S FORCE
267.680 + $(call if_changed_dep,as_s_S)
267.681 +
267.682 + quiet_cmd_as_o_S = AS $(quiet_modtag) $@
268.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
268.2 +++ b/patches/linux/2.6.7/120-linux-2.6.8-noshared-kconfig.patch Sun Sep 23 17:08:09 2007 +0000
268.3 @@ -0,0 +1,28 @@
268.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
268.5 +where shared libraries aren't easy. (There's no harm in using the
268.6 +static version of libkconfig.)
268.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
268.8 +
268.9 +
268.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
268.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
268.12 +@@ -68,8 +68,8 @@
268.13 + libkconfig-objs := zconf.tab.o
268.14 +
268.15 + host-progs := conf mconf qconf gconf
268.16 +-conf-objs := conf.o libkconfig.so
268.17 +-mconf-objs := mconf.o libkconfig.so
268.18 ++conf-objs := conf.o $(libkconfig-objs)
268.19 ++mconf-objs := mconf.o $(libkconfig-objs)
268.20 +
268.21 + ifeq ($(MAKECMDGOALS),xconfig)
268.22 + qconf-target := 1
268.23 +@@ -88,7 +88,7 @@
268.24 + gconf-objs := gconf.o kconfig_load.o
268.25 + endif
268.26 +
268.27 +-clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
268.28 ++clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
268.29 + .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
268.30 +
268.31 + # generated files seem to need this to find local include files
269.1 --- a/patches/linux/2.6.7/kaz-types.patch Sat Sep 22 17:25:42 2007 +0000
269.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
269.3 @@ -1,60 +0,0 @@
269.4 -The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
269.5 -
269.6 -In file included from sys/ustat.h:30,
269.7 - from ../sysdeps/unix/sysv/linux/ustat.c:21:
269.8 -../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
269.9 -make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
269.10 -make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
269.11 -make[1]: *** [misc/subdir_lib] Error 2
269.12 -make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
269.13 -make: *** [all] Error 2
269.14 -
269.15 ------------ snip ---------------
269.16 -
269.17 -Date: Fri, 06 Jun 2003 08:00:00 +0900
269.18 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
269.19 -Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
269.20 - error: redefinition of `struct user_fpu_struct'"
269.21 -To: linux-sh@m17n.org
269.22 -Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
269.23 -
269.24 -Hi,
269.25 -
269.26 -Dan Kegel <dank@kegel.com> wrote:
269.27 -> When I try to build glibc-2.3.2 for sh4, it fails with the error
269.28 -[snip]
269.29 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
269.30 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
269.31 -[snip]
269.32 -> The error reminds me of the kind of thing fixed by
269.33 -> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
269.34 -
269.35 -It seems that the definitions in asm/user.h and the above patch collide.
269.36 -I'm not sure why you need this patch, but is it needed for the problem
269.37 -about struct ustat that you pointed out in this list, isn't it?
269.38 -I found why I don't hit ustat problem - my local kernel tree includes
269.39 -the following patch, though I can't recall about it.
269.40 -
269.41 -Regards,
269.42 - kaz
269.43 ---
269.44 -diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
269.45 ---- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
269.46 -+++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
269.47 -@@ -141,6 +141,7 @@
269.48 -
269.49 - #endif /* __KERNEL_STRICT_NAMES */
269.50 -
269.51 -+#ifdef __KERNEL__
269.52 - /*
269.53 - * Below are truly Linux-specific types that should never collide with
269.54 - * any application/library that wants linux/types.h.
269.55 -@@ -152,5 +153,6 @@
269.56 - char f_fname[6];
269.57 - char f_fpack[6];
269.58 - };
269.59 -+#endif
269.60 -
269.61 - #endif /* _LINUX_TYPES_H */
269.62 -
269.63 -
270.1 --- a/patches/linux/2.6.7/linux-2.6.7-build_on_case_insensitive_fs-1.patch Sat Sep 22 17:25:42 2007 +0000
270.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
270.3 @@ -1,679 +0,0 @@
270.4 -Submitted By: Martin Schaffner <schaffner@gmx.li>
270.5 -Date: 2004-06-19
270.6 -Initial Package Version: 2.6.7
270.7 -Upstream Status: Not submitted
270.8 -Origin: Martin Schaffner
270.9 -Description: Enables build on case-insensitive file systems
270.10 -URL: http://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
270.11 -
270.12 -diff -ur linux-2.6.7/Makefile linux-2.6.7-mod/Makefile
270.13 ---- linux-2.6.7/Makefile Fri Jun 18 22:51:03 2004
270.14 -+++ linux-2.6.7-mod/Makefile Sat Jun 19 12:43:10 2004
270.15 -@@ -549,7 +549,7 @@
270.16 - $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
270.17 - endef
270.18 -
270.19 --LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
270.20 -+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
270.21 -
270.22 - # Generate section listing all symbols and add it into vmlinux
270.23 - # It's a three stage process:
270.24 -@@ -575,23 +575,23 @@
270.25 - .tmp_kallsyms%.S: .tmp_vmlinux%
270.26 - $(call cmd,kallsyms)
270.27 -
270.28 --.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
270.29 -+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
270.30 - +$(call if_changed_rule,vmlinux__)
270.31 -
270.32 --.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
270.33 -+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
270.34 - $(call if_changed_rule,vmlinux__)
270.35 -
270.36 - endif
270.37 -
270.38 - # Finally the vmlinux rule
270.39 -
270.40 --vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
270.41 -+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
270.42 - $(call if_changed_rule,vmlinux)
270.43 -
270.44 - # The actual objects are generated when descending,
270.45 - # make sure no implicit rule kicks in
270.46 -
270.47 --$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
270.48 -+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
270.49 -
270.50 - # Handle descending into subdirectories listed in $(vmlinux-dirs)
270.51 -
270.52 -@@ -640,7 +640,7 @@
270.53 - # Single targets
270.54 - # ---------------------------------------------------------------------------
270.55 -
270.56 --%.s: %.c scripts FORCE
270.57 -+%.asm: %.c scripts FORCE
270.58 - $(Q)$(MAKE) $(build)=$(@D) $@
270.59 - %.i: %.c scripts FORCE
270.60 - $(Q)$(MAKE) $(build)=$(@D) $@
270.61 -@@ -650,7 +650,7 @@
270.62 - $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
270.63 - %.lst: %.c scripts FORCE
270.64 - $(Q)$(MAKE) $(build)=$(@D) $@
270.65 --%.s: %.S scripts FORCE
270.66 -+%.asm: %.S scripts FORCE
270.67 - $(Q)$(MAKE) $(build)=$(@D) $@
270.68 - %.o: %.S scripts FORCE
270.69 - $(Q)$(MAKE) $(build)=$(@D) $@
270.70 -diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
270.71 ---- linux-2.6.7/arch/alpha/Makefile Fri Jun 18 22:51:03 2004
270.72 -+++ linux-2.6.7-mod/arch/alpha/Makefile Sat Jun 19 12:46:32 2004
270.73 -@@ -114,10 +114,10 @@
270.74 -
270.75 - prepare: include/asm-$(ARCH)/asm_offsets.h
270.76 -
270.77 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.78 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.79 - include/config/MARKER
270.80 -
270.81 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.82 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.83 - $(call filechk,gen-asm-offsets)
270.84 -
270.85 - archclean:
270.86 -diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
270.87 ---- linux-2.6.7/arch/alpha/kernel/Makefile Mon May 10 04:32:29 2004
270.88 -+++ linux-2.6.7-mod/arch/alpha/kernel/Makefile Sat Jun 19 12:46:48 2004
270.89 -@@ -2,7 +2,7 @@
270.90 - # Makefile for the linux kernel.
270.91 - #
270.92 -
270.93 --extra-y := head.o vmlinux.lds.s
270.94 -+extra-y := head.o vmlinux.lds.asm
270.95 - EXTRA_AFLAGS := $(CFLAGS)
270.96 - EXTRA_CFLAGS := -Werror -Wno-sign-compare
270.97 -
270.98 -diff -ur linux-2.6.7/arch/arm/Makefile linux-2.6.7-mod/arch/arm/Makefile
270.99 ---- linux-2.6.7/arch/arm/Makefile Fri Jun 18 22:51:04 2004
270.100 -+++ linux-2.6.7-mod/arch/arm/Makefile Sat Jun 19 12:47:07 2004
270.101 -@@ -175,10 +175,10 @@
270.102 - i:; $(Q)$(MAKE) $(build)=$(boot) install
270.103 - zi:; $(Q)$(MAKE) $(build)=$(boot) zinstall
270.104 -
270.105 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.106 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.107 - include/asm-arm/.arch
270.108 -
270.109 --include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
270.110 -+include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.111 - $(call filechk,gen-asm-offsets)
270.112 -
270.113 - define archhelp
270.114 -diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
270.115 ---- linux-2.6.7/arch/arm/kernel/Makefile Mon May 10 04:33:19 2004
270.116 -+++ linux-2.6.7-mod/arch/arm/kernel/Makefile Sat Jun 19 12:47:25 2004
270.117 -@@ -27,7 +27,7 @@
270.118 - head-y := head.o
270.119 - obj-$(CONFIG_DEBUG_LL) += debug.o
270.120 -
270.121 --extra-y := $(head-y) init_task.o vmlinux.lds.s
270.122 -+extra-y := $(head-y) init_task.o vmlinux.lds.asm
270.123 -
270.124 - # Spell out some dependencies that aren't automatically figured out
270.125 - $(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
270.126 -diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
270.127 ---- linux-2.6.7/arch/arm26/Makefile Mon May 10 04:32:28 2004
270.128 -+++ linux-2.6.7-mod/arch/arm26/Makefile Sat Jun 19 12:48:24 2004
270.129 -@@ -101,10 +101,10 @@
270.130 - fi; \
270.131 - )
270.132 -
270.133 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.134 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.135 - include/config/MARKER
270.136 -
270.137 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.138 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.139 - $(call filechk,gen-asm-offsets)
270.140 -
270.141 - define archhelp
270.142 -diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
270.143 ---- linux-2.6.7/arch/arm26/kernel/Makefile Mon May 10 04:32:29 2004
270.144 -+++ linux-2.6.7-mod/arch/arm26/kernel/Makefile Sat Jun 19 12:48:30 2004
270.145 -@@ -14,5 +14,5 @@
270.146 - obj-$(CONFIG_FIQ) += fiq.o
270.147 - obj-$(CONFIG_MODULES) += armksyms.o
270.148 -
270.149 --extra-y := init_task.o vmlinux.lds.s
270.150 -+extra-y := init_task.o vmlinux.lds.asm
270.151 -
270.152 -diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
270.153 ---- linux-2.6.7/arch/cris/Makefile Fri Jun 18 22:51:07 2004
270.154 -+++ linux-2.6.7-mod/arch/cris/Makefile Sat Jun 19 12:48:47 2004
270.155 -@@ -107,8 +107,8 @@
270.156 - @ln -sf $(SARCH) include/asm-$(ARCH)/arch
270.157 - @touch $@
270.158 -
270.159 --arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.160 -+arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.161 - include/config/MARKER
270.162 -
270.163 --include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
270.164 -+include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
270.165 - $(call filechk,gen-asm-offsets)
270.166 -diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
270.167 ---- linux-2.6.7/arch/cris/kernel/Makefile Fri Jun 18 22:51:09 2004
270.168 -+++ linux-2.6.7-mod/arch/cris/kernel/Makefile Sat Jun 19 12:48:53 2004
270.169 -@@ -3,7 +3,7 @@
270.170 - # Makefile for the linux kernel.
270.171 - #
270.172 -
270.173 --extra-y := vmlinux.lds.s
270.174 -+extra-y := vmlinux.lds.asm
270.175 -
270.176 - obj-y := process.o traps.o irq.o ptrace.o setup.o \
270.177 - time.o sys_cris.o semaphore.o
270.178 -diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
270.179 ---- linux-2.6.7/arch/h8300/Makefile Fri Jun 18 22:51:09 2004
270.180 -+++ linux-2.6.7-mod/arch/h8300/Makefile Sat Jun 19 12:49:12 2004
270.181 -@@ -64,7 +64,7 @@
270.182 -
270.183 - prepare: include/asm-$(ARCH)/asm-offsets.h
270.184 -
270.185 --include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
270.186 -+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
270.187 - include/asm include/linux/version.h
270.188 - $(call filechk,gen-asm-offsets)
270.189 -
270.190 -diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
270.191 ---- linux-2.6.7/arch/h8300/kernel/Makefile Fri Jun 18 22:51:09 2004
270.192 -+++ linux-2.6.7-mod/arch/h8300/kernel/Makefile Sat Jun 19 12:49:32 2004
270.193 -@@ -2,7 +2,7 @@
270.194 - # Makefile for the linux kernel.
270.195 - #
270.196 -
270.197 --extra-y := vmlinux.lds.s
270.198 -+extra-y := vmlinux.lds.asm
270.199 -
270.200 - obj-y := process.o traps.o ptrace.o ints.o \
270.201 - sys_h8300.o time.o semaphore.o signal.o \
270.202 -diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
270.203 ---- linux-2.6.7/arch/i386/Makefile Fri Jun 18 22:51:10 2004
270.204 -+++ linux-2.6.7-mod/arch/i386/Makefile Sat Jun 19 12:49:43 2004
270.205 -@@ -141,10 +141,10 @@
270.206 - prepare: include/asm-$(ARCH)/asm_offsets.h
270.207 - CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
270.208 -
270.209 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.210 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.211 - include/config/MARKER
270.212 -
270.213 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.214 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.215 - $(call filechk,gen-asm-offsets)
270.216 -
270.217 - archclean:
270.218 -diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
270.219 ---- linux-2.6.7/arch/i386/kernel/Makefile Mon May 10 04:32:02 2004
270.220 -+++ linux-2.6.7-mod/arch/i386/kernel/Makefile Sat Jun 19 12:49:54 2004
270.221 -@@ -2,7 +2,7 @@
270.222 - # Makefile for the linux kernel.
270.223 - #
270.224 -
270.225 --extra-y := head.o init_task.o vmlinux.lds.s
270.226 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.227 -
270.228 - obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
270.229 - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
270.230 -diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
270.231 ---- linux-2.6.7/arch/ia64/Makefile Mon May 10 04:31:59 2004
270.232 -+++ linux-2.6.7-mod/arch/ia64/Makefile Sat Jun 19 12:50:12 2004
270.233 -@@ -88,12 +88,12 @@
270.234 -
270.235 - prepare: include/asm-ia64/offsets.h
270.236 -
270.237 --arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
270.238 -+arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
270.239 -
270.240 --include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
270.241 -+include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
270.242 - $(call filechk,gen-asm-offsets)
270.243 -
270.244 --arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
270.245 -+arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
270.246 -
270.247 - include/asm-ia64/.offsets.h.stamp:
270.248 - mkdir -p include/asm-ia64
270.249 -diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
270.250 ---- linux-2.6.7/arch/ia64/kernel/Makefile Fri Jun 18 22:51:13 2004
270.251 -+++ linux-2.6.7-mod/arch/ia64/kernel/Makefile Sat Jun 19 12:52:14 2004
270.252 -@@ -2,7 +2,7 @@
270.253 - # Makefile for the linux kernel.
270.254 - #
270.255 -
270.256 --extra-y := head.o init_task.o vmlinux.lds.s
270.257 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.258 -
270.259 - obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
270.260 - irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
270.261 -@@ -21,7 +21,7 @@
270.262 - # The gate DSO image is built using a special linker script.
270.263 - targets += gate.so gate-syms.o
270.264 -
270.265 --extra-y += gate.so gate-syms.o gate.lds.s gate.o
270.266 -+extra-y += gate.so gate-syms.o gate.lds.asm gate.o
270.267 -
270.268 - # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
270.269 - CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
270.270 -@@ -32,14 +32,14 @@
270.271 - cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
270.272 -
270.273 - GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
270.274 --$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
270.275 -+$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
270.276 - $(call if_changed,gate)
270.277 -
270.278 - $(obj)/built-in.o: $(obj)/gate-syms.o
270.279 - $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
270.280 -
270.281 - GATECFLAGS_gate-syms.o = -r
270.282 --$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
270.283 -+$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
270.284 - $(call if_changed,gate)
270.285 -
270.286 - # gate-data.o contains the gate DSO image as data in section .data.gate.
270.287 -diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
270.288 ---- linux-2.6.7/arch/m68k/Makefile Fri Jun 18 22:51:14 2004
270.289 -+++ linux-2.6.7-mod/arch/m68k/Makefile Sat Jun 19 12:52:30 2004
270.290 -@@ -114,10 +114,10 @@
270.291 - prepare: include/asm-$(ARCH)/offsets.h
270.292 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h
270.293 -
270.294 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.295 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.296 - include/config/MARKER
270.297 -
270.298 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.299 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.300 - $(call filechk,gen-asm-offsets)
270.301 -
270.302 - archclean:
270.303 -diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
270.304 ---- linux-2.6.7/arch/m68k/kernel/Makefile Mon May 10 04:33:10 2004
270.305 -+++ linux-2.6.7-mod/arch/m68k/kernel/Makefile Sat Jun 19 12:52:35 2004
270.306 -@@ -7,7 +7,7 @@
270.307 - else
270.308 - extra-y := sun3-head.o
270.309 - endif
270.310 --extra-y += vmlinux.lds.s
270.311 -+extra-y += vmlinux.lds.asm
270.312 -
270.313 - obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
270.314 - sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
270.315 -diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
270.316 ---- linux-2.6.7/arch/m68knommu/Makefile Mon May 10 04:32:54 2004
270.317 -+++ linux-2.6.7-mod/arch/m68knommu/Makefile Sat Jun 19 12:52:57 2004
270.318 -@@ -89,7 +89,7 @@
270.319 - head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
270.320 -
270.321 - CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
270.322 -- arch/$(ARCH)/kernel/asm-offsets.s
270.323 -+ arch/$(ARCH)/kernel/asm-offsets.asm
270.324 -
270.325 - core-y += arch/m68knommu/kernel/ \
270.326 - arch/m68knommu/mm/ \
270.327 -@@ -102,7 +102,7 @@
270.328 - archclean:
270.329 - $(call descend arch/$(ARCH)/boot, subdirclean)
270.330 -
270.331 --include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
270.332 -+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
270.333 - include/asm include/linux/version.h \
270.334 - include/config/MARKER
270.335 - $(call filechk,gen-asm-offsets)
270.336 -diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
270.337 ---- linux-2.6.7/arch/m68knommu/kernel/Makefile Mon May 10 04:32:26 2004
270.338 -+++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile Sat Jun 19 12:53:20 2004
270.339 -@@ -2,7 +2,7 @@
270.340 - # Makefile for arch/m68knommu/kernel.
270.341 - #
270.342 -
270.343 --extra-y := vmlinux.lds.s
270.344 -+extra-y := vmlinux.lds.asm
270.345 -
270.346 - obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
270.347 - setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
270.348 -diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
270.349 ---- linux-2.6.7/arch/mips/Makefile Fri Jun 18 22:51:19 2004
270.350 -+++ linux-2.6.7-mod/arch/mips/Makefile Sat Jun 19 12:53:35 2004
270.351 -@@ -752,12 +752,12 @@
270.352 - prepare: include/asm-$(ARCH)/offset.h \
270.353 - include/asm-$(ARCH)/reg.h
270.354 -
270.355 --arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
270.356 -+arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
270.357 - include/config/MARKER
270.358 -
270.359 --include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
270.360 -+include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
270.361 - $(call filechk,gen-asm-offset.h)
270.362 --include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
270.363 -+include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
270.364 - $(call filechk,gen-asm-reg.h)
270.365 -
270.366 - CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
270.367 -diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
270.368 ---- linux-2.6.7/arch/mips/kernel/Makefile Mon May 10 04:32:28 2004
270.369 -+++ linux-2.6.7-mod/arch/mips/kernel/Makefile Sat Jun 19 12:53:41 2004
270.370 -@@ -2,7 +2,7 @@
270.371 - # Makefile for the Linux/MIPS kernel.
270.372 - #
270.373 -
270.374 --extra-y := head.o init_task.o vmlinux.lds.s
270.375 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.376 -
270.377 - obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
270.378 - ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
270.379 -diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
270.380 ---- linux-2.6.7/arch/parisc/Makefile Fri Jun 18 22:51:21 2004
270.381 -+++ linux-2.6.7-mod/arch/parisc/Makefile Sat Jun 19 12:53:47 2004
270.382 -@@ -88,10 +88,10 @@
270.383 -
270.384 - prepare: include/asm-parisc/offsets.h
270.385 -
270.386 --arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.387 -+arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.388 - include/config/MARKER
270.389 -
270.390 --include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
270.391 -+include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
270.392 - $(call filechk,gen-asm-offsets)
270.393 -
270.394 - CLEAN_FILES += lifimage include/asm-parisc/offsets.h
270.395 -diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
270.396 ---- linux-2.6.7/arch/parisc/kernel/Makefile Fri Jun 18 22:51:21 2004
270.397 -+++ linux-2.6.7-mod/arch/parisc/kernel/Makefile Sat Jun 19 12:53:53 2004
270.398 -@@ -4,7 +4,7 @@
270.399 -
270.400 - head-y := head.o
270.401 - head-$(CONFIG_PARISC64) := head64.o
270.402 --extra-y := init_task.o $(head-y) vmlinux.lds.s
270.403 -+extra-y := init_task.o $(head-y) vmlinux.lds.asm
270.404 -
270.405 - AFLAGS_entry.o := -traditional
270.406 - AFLAGS_pacache.o := -traditional
270.407 -diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
270.408 ---- linux-2.6.7/arch/ppc/Makefile Fri Jun 18 22:51:22 2004
270.409 -+++ linux-2.6.7-mod/arch/ppc/Makefile Sat Jun 19 12:54:09 2004
270.410 -@@ -78,10 +78,10 @@
270.411 -
270.412 - prepare: include/asm-$(ARCH)/offsets.h checkbin
270.413 -
270.414 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.415 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.416 - include/config/MARKER
270.417 -
270.418 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.419 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.420 - $(call filechk,gen-asm-offsets)
270.421 -
270.422 - ifdef CONFIG_6xx
270.423 -@@ -104,4 +104,4 @@
270.424 - endif
270.425 -
270.426 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
270.427 -- arch/$(ARCH)/kernel/asm-offsets.s
270.428 -+ arch/$(ARCH)/kernel/asm-offsets.asm
270.429 -diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
270.430 ---- linux-2.6.7/arch/ppc/kernel/Makefile Fri Jun 18 22:51:24 2004
270.431 -+++ linux-2.6.7-mod/arch/ppc/kernel/Makefile Sat Jun 19 12:43:10 2004
270.432 -@@ -15,7 +15,7 @@
270.433 - extra-$(CONFIG_8xx) := head_8xx.o
270.434 - extra-$(CONFIG_6xx) += idle_6xx.o
270.435 - extra-$(CONFIG_POWER4) += idle_power4.o
270.436 --extra-y += vmlinux.lds.s
270.437 -+extra-y += vmlinux.lds.asm
270.438 -
270.439 - obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
270.440 - process.o signal.o ptrace.o align.o \
270.441 -diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
270.442 ---- linux-2.6.7/arch/ppc64/Makefile Fri Jun 18 22:51:26 2004
270.443 -+++ linux-2.6.7-mod/arch/ppc64/Makefile Sat Jun 19 12:54:32 2004
270.444 -@@ -67,10 +67,10 @@
270.445 -
270.446 - prepare: include/asm-ppc64/offsets.h
270.447 -
270.448 --arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.449 -+arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.450 - include/config/MARKER
270.451 -
270.452 --include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
270.453 -+include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
270.454 - $(call filechk,gen-asm-offsets)
270.455 -
270.456 - define archhelp
270.457 -diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
270.458 ---- linux-2.6.7/arch/ppc64/kernel/Makefile Mon May 10 04:33:20 2004
270.459 -+++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile Sat Jun 19 12:54:39 2004
270.460 -@@ -3,7 +3,7 @@
270.461 - #
270.462 -
270.463 - EXTRA_CFLAGS += -mno-minimal-toc
270.464 --extra-y := head.o vmlinux.lds.s
270.465 -+extra-y := head.o vmlinux.lds.asm
270.466 -
270.467 - obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \
270.468 - time.o process.o signal.o syscalls.o misc.o ptrace.o \
270.469 -diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
270.470 ---- linux-2.6.7/arch/s390/Makefile Mon May 10 04:32:02 2004
270.471 -+++ linux-2.6.7-mod/arch/s390/Makefile Sat Jun 19 12:54:46 2004
270.472 -@@ -68,10 +68,10 @@
270.473 -
270.474 - prepare: include/asm-$(ARCH)/offsets.h
270.475 -
270.476 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.477 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.478 - include/config/MARKER
270.479 -
270.480 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.481 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.482 - $(call filechk,gen-asm-offsets)
270.483 -
270.484 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h
270.485 -diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
270.486 ---- linux-2.6.7/arch/s390/kernel/Makefile Mon May 10 04:33:20 2004
270.487 -+++ linux-2.6.7-mod/arch/s390/kernel/Makefile Sat Jun 19 12:54:52 2004
270.488 -@@ -10,7 +10,7 @@
270.489 -
270.490 - extra-$(CONFIG_ARCH_S390_31) += head.o
270.491 - extra-$(CONFIG_ARCH_S390X) += head64.o
270.492 --extra-y += init_task.o vmlinux.lds.s
270.493 -+extra-y += init_task.o vmlinux.lds.asm
270.494 -
270.495 - obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
270.496 - obj-$(CONFIG_SMP) += smp.o
270.497 -diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
270.498 ---- linux-2.6.7/arch/sh/kernel/Makefile Mon May 10 04:32:39 2004
270.499 -+++ linux-2.6.7-mod/arch/sh/kernel/Makefile Sat Jun 19 12:55:33 2004
270.500 -@@ -2,7 +2,7 @@
270.501 - # Makefile for the Linux/SuperH kernel.
270.502 - #
270.503 -
270.504 --extra-y := head.o init_task.o vmlinux.lds.s
270.505 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.506 -
270.507 - obj-y := process.o signal.o entry.o traps.o irq.o \
270.508 - ptrace.o setup.o time.o sys_sh.o semaphore.o \
270.509 -diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
270.510 ---- linux-2.6.7/arch/sparc/Makefile Fri Jun 18 22:51:29 2004
270.511 -+++ linux-2.6.7-mod/arch/sparc/Makefile Sat Jun 19 12:55:48 2004
270.512 -@@ -61,14 +61,14 @@
270.513 -
270.514 - prepare: include/asm-$(ARCH)/asm_offsets.h
270.515 -
270.516 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.517 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.518 - include/config/MARKER
270.519 -
270.520 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
270.521 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.522 - $(call filechk,gen-asm-offsets)
270.523 -
270.524 - CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
270.525 -- arch/$(ARCH)/kernel/asm-offsets.s \
270.526 -+ arch/$(ARCH)/kernel/asm-offsets.asm \
270.527 - arch/$(ARCH)/boot/System.map
270.528 -
270.529 - # Don't use tabs in echo arguments.
270.530 -diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
270.531 ---- linux-2.6.7/arch/sparc/kernel/Makefile Mon May 10 04:33:13 2004
270.532 -+++ linux-2.6.7-mod/arch/sparc/kernel/Makefile Sat Jun 19 12:55:52 2004
270.533 -@@ -2,7 +2,7 @@
270.534 - # Makefile for the linux kernel.
270.535 - #
270.536 -
270.537 --extra-y := head.o init_task.o vmlinux.lds.s
270.538 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.539 -
270.540 - EXTRA_AFLAGS := -ansi
270.541 -
270.542 -diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
270.543 ---- linux-2.6.7/arch/sparc64/kernel/Makefile Mon May 10 04:32:02 2004
270.544 -+++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile Sat Jun 19 12:56:24 2004
270.545 -@@ -5,7 +5,7 @@
270.546 - EXTRA_AFLAGS := -ansi
270.547 - EXTRA_CFLAGS := -Werror
270.548 -
270.549 --extra-y := head.o init_task.o vmlinux.lds.s
270.550 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.551 -
270.552 - obj-y := process.o setup.o cpu.o idprom.o \
270.553 - traps.o devices.o auxio.o \
270.554 -diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
270.555 ---- linux-2.6.7/arch/um/Makefile Mon May 10 04:32:52 2004
270.556 -+++ linux-2.6.7-mod/arch/um/Makefile Sat Jun 19 12:57:07 2004
270.557 -@@ -77,7 +77,7 @@
270.558 - # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
270.559 -
270.560 - LINK_TT = -static
270.561 --LD_SCRIPT_TT := uml.lds.s
270.562 -+LD_SCRIPT_TT := uml.lds.asm
270.563 -
270.564 - ifeq ($(CONFIG_STATIC_LINK),y)
270.565 - LINK-y += $(LINK_TT)
270.566 -@@ -103,11 +103,11 @@
270.567 - -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
270.568 - -DKERNEL_STACK_SIZE=$(STACK_SIZE)
270.569 -
270.570 --AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
270.571 -+AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
270.572 -
270.573 - LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
270.574 -
270.575 --$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
270.576 -+$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
270.577 - $(call if_changed_dep,as_s_S)
270.578 -
270.579 - linux: vmlinux $(LD_SCRIPT-y)
270.580 -@@ -122,8 +122,8 @@
270.581 - # To get a definition of F_SETSIG
270.582 - USER_CFLAGS += -D_GNU_SOURCE
270.583 -
270.584 --CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
270.585 -- $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
270.586 -+CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
270.587 -+ $(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
270.588 -
270.589 - $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
270.590 - $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
270.591 -diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
270.592 ---- linux-2.6.7/arch/um/kernel/Makefile Mon May 10 04:32:53 2004
270.593 -+++ linux-2.6.7-mod/arch/um/kernel/Makefile Sat Jun 19 12:57:15 2004
270.594 -@@ -3,7 +3,7 @@
270.595 - # Licensed under the GPL
270.596 - #
270.597 -
270.598 --extra-y := vmlinux.lds.s
270.599 -+extra-y := vmlinux.lds.asm
270.600 -
270.601 - obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
270.602 - helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
270.603 -diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
270.604 ---- linux-2.6.7/arch/v850/Makefile Mon May 10 04:33:21 2004
270.605 -+++ linux-2.6.7-mod/arch/v850/Makefile Sat Jun 19 12:57:59 2004
270.606 -@@ -52,12 +52,12 @@
270.607 - prepare: include/asm-$(ARCH)/asm-consts.h
270.608 -
270.609 - # Generate constants from C code for use by asm files
270.610 --arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
270.611 -+arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
270.612 - include/config/MARKER
270.613 -
270.614 --include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
270.615 -+include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
270.616 - $(call filechk,gen-asm-offsets)
270.617 -
270.618 - CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
270.619 -- arch/$(ARCH)/kernel/asm-consts.s \
270.620 -+ arch/$(ARCH)/kernel/asm-consts.asm \
270.621 - root_fs_image.o
270.622 -diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
270.623 ---- linux-2.6.7/arch/v850/kernel/Makefile Mon May 10 04:33:21 2004
270.624 -+++ linux-2.6.7-mod/arch/v850/kernel/Makefile Sat Jun 19 12:58:04 2004
270.625 -@@ -9,7 +9,7 @@
270.626 - # for more details.
270.627 - #
270.628 -
270.629 --extra-y := head.o init_task.o vmlinux.lds.s
270.630 -+extra-y := head.o init_task.o vmlinux.lds.asm
270.631 -
270.632 - obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
270.633 - signal.o irq.o mach.o ptrace.o bug.o
270.634 -diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
270.635 ---- linux-2.6.7/arch/x86_64/Makefile Mon May 10 04:33:19 2004
270.636 -+++ linux-2.6.7-mod/arch/x86_64/Makefile Sat Jun 19 12:58:10 2004
270.637 -@@ -93,10 +93,10 @@
270.638 -
270.639 - prepare: include/asm-$(ARCH)/offset.h
270.640 -
270.641 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
270.642 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
270.643 - include/config/MARKER
270.644 -
270.645 --include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
270.646 -+include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
270.647 - $(call filechk,gen-asm-offsets)
270.648 -
270.649 - CLEAN_FILES += include/asm-$(ARCH)/offset.h
270.650 -diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
270.651 ---- linux-2.6.7/arch/x86_64/kernel/Makefile Fri Jun 18 22:51:32 2004
270.652 -+++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile Sat Jun 19 12:58:17 2004
270.653 -@@ -2,7 +2,7 @@
270.654 - # Makefile for the linux kernel.
270.655 - #
270.656 -
270.657 --extra-y := head.o head64.o init_task.o vmlinux.lds.s
270.658 -+extra-y := head.o head64.o init_task.o vmlinux.lds.asm
270.659 - EXTRA_AFLAGS := -traditional
270.660 - obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
270.661 - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
270.662 -diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
270.663 ---- linux-2.6.7/scripts/Makefile.build Mon May 10 04:33:13 2004
270.664 -+++ linux-2.6.7-mod/scripts/Makefile.build Sat Jun 19 12:43:10 2004
270.665 -@@ -110,7 +110,7 @@
270.666 - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
270.667 - cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
270.668 -
270.669 --%.s: %.c FORCE
270.670 -+%.asm: %.c FORCE
270.671 - $(call if_changed_dep,cc_s_c)
270.672 -
270.673 - quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
270.674 -@@ -197,7 +197,7 @@
270.675 - quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
270.676 - cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
270.677 -
270.678 --%.s: %.S FORCE
270.679 -+%.asm: %.S FORCE
270.680 - $(call if_changed_dep,as_s_S)
270.681 -
270.682 - quiet_cmd_as_o_S = AS $(quiet_modtag) $@
271.1 --- a/patches/linux/2.6.7/linux-2.6.8-noshared-kconfig.patch Sat Sep 22 17:25:42 2007 +0000
271.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
271.3 @@ -1,28 +0,0 @@
271.4 -Lets you run 'make oldconfig' and 'make menuconfig' on systems
271.5 -where shared libraries aren't easy. (There's no harm in using the
271.6 -static version of libkconfig.)
271.7 -Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
271.8 -
271.9 -
271.10 ---- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
271.11 -+++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
271.12 -@@ -68,8 +68,8 @@
271.13 - libkconfig-objs := zconf.tab.o
271.14 -
271.15 - host-progs := conf mconf qconf gconf
271.16 --conf-objs := conf.o libkconfig.so
271.17 --mconf-objs := mconf.o libkconfig.so
271.18 -+conf-objs := conf.o $(libkconfig-objs)
271.19 -+mconf-objs := mconf.o $(libkconfig-objs)
271.20 -
271.21 - ifeq ($(MAKECMDGOALS),xconfig)
271.22 - qconf-target := 1
271.23 -@@ -88,7 +88,7 @@
271.24 - gconf-objs := gconf.o kconfig_load.o
271.25 - endif
271.26 -
271.27 --clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
271.28 -+clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
271.29 - .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
271.30 -
271.31 - # generated files seem to need this to find local include files
272.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
272.2 +++ b/patches/linux/2.6.8/100-kaz-types.patch Sun Sep 23 17:08:09 2007 +0000
272.3 @@ -0,0 +1,60 @@
272.4 +The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
272.5 +
272.6 +In file included from sys/ustat.h:30,
272.7 + from ../sysdeps/unix/sysv/linux/ustat.c:21:
272.8 +../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
272.9 +make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
272.10 +make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
272.11 +make[1]: *** [misc/subdir_lib] Error 2
272.12 +make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
272.13 +make: *** [all] Error 2
272.14 +
272.15 +----------- snip ---------------
272.16 +
272.17 +Date: Fri, 06 Jun 2003 08:00:00 +0900
272.18 +From: kaz Kojima <kkojima@rr.iij4u.or.jp>
272.19 +Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
272.20 + error: redefinition of `struct user_fpu_struct'"
272.21 +To: linux-sh@m17n.org
272.22 +Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
272.23 +
272.24 +Hi,
272.25 +
272.26 +Dan Kegel <dank@kegel.com> wrote:
272.27 +> When I try to build glibc-2.3.2 for sh4, it fails with the error
272.28 +[snip]
272.29 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
272.30 +> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
272.31 +[snip]
272.32 +> The error reminds me of the kind of thing fixed by
272.33 +> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
272.34 +
272.35 +It seems that the definitions in asm/user.h and the above patch collide.
272.36 +I'm not sure why you need this patch, but is it needed for the problem
272.37 +about struct ustat that you pointed out in this list, isn't it?
272.38 +I found why I don't hit ustat problem - my local kernel tree includes
272.39 +the following patch, though I can't recall about it.
272.40 +
272.41 +Regards,
272.42 + kaz
272.43 +--
272.44 +diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
272.45 +--- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
272.46 ++++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
272.47 +@@ -141,6 +141,7 @@
272.48 +
272.49 + #endif /* __KERNEL_STRICT_NAMES */
272.50 +
272.51 ++#ifdef __KERNEL__
272.52 + /*
272.53 + * Below are truly Linux-specific types that should never collide with
272.54 + * any application/library that wants linux/types.h.
272.55 +@@ -152,5 +153,6 @@
272.56 + char f_fname[6];
272.57 + char f_fpack[6];
272.58 + };
272.59 ++#endif
272.60 +
272.61 + #endif /* _LINUX_TYPES_H */
272.62 +
272.63 +
273.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
273.2 +++ b/patches/linux/2.6.8/110-linux-2.6.8-allow-gcc-4.0-asm-i386.patch Sun Sep 23 17:08:09 2007 +0000
273.3 @@ -0,0 +1,138 @@
273.4 +Fixes
273.5 +
273.6 +In file included from include/asm/thread_info.h:16,
273.7 + from include/linux/thread_info.h:21,
273.8 + from include/linux/spinlock.h:12,
273.9 + from include/linux/capability.h:45,
273.10 + from include/linux/sched.h:7,
273.11 + from arch/i386/kernel/asm-offsets.c:7:
273.12 +include/asm/processor.h:87: error: array type has incomplete element type
273.13 +make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
273.14 +
273.15 +--- linux-2.6.8/include/asm-i386/processor.h.old Tue Mar 15 00:14:42 2005
273.16 ++++ linux-2.6.8/include/asm-i386/processor.h Tue Mar 15 00:18:45 2005
273.17 +@@ -79,6 +79,58 @@
273.18 + #define X86_VENDOR_UNKNOWN 0xff
273.19 +
273.20 + /*
273.21 ++ * Size of io_bitmap.
273.22 ++ */
273.23 ++#define IO_BITMAP_BITS 65536
273.24 ++#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
273.25 ++#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
273.26 ++#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
273.27 ++#define INVALID_IO_BITMAP_OFFSET 0x8000
273.28 ++
273.29 ++struct tss_struct {
273.30 ++ unsigned short back_link,__blh;
273.31 ++ unsigned long esp0;
273.32 ++ unsigned short ss0,__ss0h;
273.33 ++ unsigned long esp1;
273.34 ++ unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
273.35 ++ unsigned long esp2;
273.36 ++ unsigned short ss2,__ss2h;
273.37 ++ unsigned long __cr3;
273.38 ++ unsigned long eip;
273.39 ++ unsigned long eflags;
273.40 ++ unsigned long eax,ecx,edx,ebx;
273.41 ++ unsigned long esp;
273.42 ++ unsigned long ebp;
273.43 ++ unsigned long esi;
273.44 ++ unsigned long edi;
273.45 ++ unsigned short es, __esh;
273.46 ++ unsigned short cs, __csh;
273.47 ++ unsigned short ss, __ssh;
273.48 ++ unsigned short ds, __dsh;
273.49 ++ unsigned short fs, __fsh;
273.50 ++ unsigned short gs, __gsh;
273.51 ++ unsigned short ldt, __ldth;
273.52 ++ unsigned short trace, io_bitmap_base;
273.53 ++ /*
273.54 ++ * The extra 1 is there because the CPU will access an
273.55 ++ * additional byte beyond the end of the IO permission
273.56 ++ * bitmap. The extra byte must be all 1 bits, and must
273.57 ++ * be within the limit.
273.58 ++ */
273.59 ++ unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
273.60 ++ /*
273.61 ++ * pads the TSS to be cacheline-aligned (size is 0x100)
273.62 ++ */
273.63 ++ unsigned long __cacheline_filler[37];
273.64 ++ /*
273.65 ++ * .. and then another 0x100 bytes for emergency kernel stack
273.66 ++ */
273.67 ++ unsigned long stack[64];
273.68 ++} __attribute__((packed));
273.69 ++
273.70 ++#define ARCH_MIN_TASKALIGN 16
273.71 ++
273.72 ++/*
273.73 + * capabilities of CPUs
273.74 + */
273.75 +
273.76 +@@ -296,15 +348,6 @@
273.77 + */
273.78 + #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
273.79 +
273.80 +-/*
273.81 +- * Size of io_bitmap.
273.82 +- */
273.83 +-#define IO_BITMAP_BITS 65536
273.84 +-#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
273.85 +-#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
273.86 +-#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
273.87 +-#define INVALID_IO_BITMAP_OFFSET 0x8000
273.88 +-
273.89 + struct i387_fsave_struct {
273.90 + long cwd;
273.91 + long swd;
273.92 +@@ -356,49 +399,6 @@
273.93 + typedef struct {
273.94 + unsigned long seg;
273.95 + } mm_segment_t;
273.96 +-
273.97 +-struct tss_struct {
273.98 +- unsigned short back_link,__blh;
273.99 +- unsigned long esp0;
273.100 +- unsigned short ss0,__ss0h;
273.101 +- unsigned long esp1;
273.102 +- unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
273.103 +- unsigned long esp2;
273.104 +- unsigned short ss2,__ss2h;
273.105 +- unsigned long __cr3;
273.106 +- unsigned long eip;
273.107 +- unsigned long eflags;
273.108 +- unsigned long eax,ecx,edx,ebx;
273.109 +- unsigned long esp;
273.110 +- unsigned long ebp;
273.111 +- unsigned long esi;
273.112 +- unsigned long edi;
273.113 +- unsigned short es, __esh;
273.114 +- unsigned short cs, __csh;
273.115 +- unsigned short ss, __ssh;
273.116 +- unsigned short ds, __dsh;
273.117 +- unsigned short fs, __fsh;
273.118 +- unsigned short gs, __gsh;
273.119 +- unsigned short ldt, __ldth;
273.120 +- unsigned short trace, io_bitmap_base;
273.121 +- /*
273.122 +- * The extra 1 is there because the CPU will access an
273.123 +- * additional byte beyond the end of the IO permission
273.124 +- * bitmap. The extra byte must be all 1 bits, and must
273.125 +- * be within the limit.
273.126 +- */
273.127 +- unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
273.128 +- /*
273.129 +- * pads the TSS to be cacheline-aligned (size is 0x100)
273.130 +- */
273.131 +- unsigned long __cacheline_filler[37];
273.132 +- /*
273.133 +- * .. and then another 0x100 bytes for emergency kernel stack
273.134 +- */
273.135 +- unsigned long stack[64];
273.136 +-} __attribute__((packed));
273.137 +-
273.138 +-#define ARCH_MIN_TASKALIGN 16
273.139 +
273.140 + struct thread_struct {
273.141 + /* cached TLS descriptors. */
274.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
274.2 +++ b/patches/linux/2.6.8/120-linux-2.6.8-arm-nonofpu.patch Sun Sep 23 17:08:09 2007 +0000
274.3 @@ -0,0 +1,50 @@
274.4 +http://www.spinics.net/lists/arm/msg08012.html
274.5 +
274.6 +To: Dimitry Andric <dimitry@xxxxxxxxxx>
274.7 +Subject: Re: Kernel Compile Error: use of old and new-style options to set FPU type
274.8 +From: Marc Britten <maillists@xxxxxxxxxxxxxxxxx>
274.9 +Date: Wed, 16 Jun 2004 03:03:15 -0400
274.10 +Cc: linux-arm@xxxxxxxxxxxxxxxxxxxxxx
274.11 +In-reply-to: <1525495613.20040615202902@andric.com>
274.12 +
274.13 +Dimitry Andric wrote:
274.14 +
274.15 +>>Assembler messages:
274.16 +>>Error: use of old and new-style options to set FPU type
274.17 +> Try removing -Wa,-mno-fpu from CFLAGS (and possibly AFLAGS, but I'm
274.18 +> not sure, depends on what your compiler generates by default) in
274.19 +> arch/arm/Makefile.
274.20 +
274.21 +Just to let people know, this was successful.
274.22 +
274.23 +Thanks,
274.24 +
274.25 +Marc Britten
274.26 +
274.27 +--------
274.28 +
274.29 +Fixes error
274.30 +
274.31 +...
274.32 +make -f scripts/Makefile.build obj=scripts/mod
274.33 + /opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/arm-unknown-linux-gnu-gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mlittle-endian -mapcs-32 -malignment-traps -msoft-float -Wa,-mno-fpu -Uarm -Os -Wdeclaration-after-statement -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o scripts/mod/empty.o scripts/mod/empty.c
274.34 +Assembler messages:
274.35 +Error: use of old and new-style options to set FPU type
274.36 +make[2]: *** [scripts/mod/empty.o] Error 1
274.37 +make[1]: *** [scripts/mod] Error 2
274.38 +make: *** [scripts] Error 2
274.39 +
274.40 +
274.41 +--- linux-2.6.8/arch/arm/Makefile.old 2004-09-01 21:27:07.000000000 -0700
274.42 ++++ linux-2.6.8/arch/arm/Makefile 2004-09-01 21:27:31.000000000 -0700
274.43 +@@ -55,8 +55,8 @@
274.44 + tune-$(CONFIG_CPU_V6) :=-mtune=strongarm
274.45 +
274.46 + # Need -Uarm for gcc < 3.x
274.47 +-CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Wa,-mno-fpu -Uarm
274.48 +-AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
274.49 ++CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
274.50 ++AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
274.51 +
274.52 + CHECK := $(CHECK) -D__arm__=1
274.53 +
275.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
275.2 +++ b/patches/linux/2.6.8/130-linux-2.6.8-build_on_case_insensitive_fs.patch Sun Sep 23 17:08:09 2007 +0000
275.3 @@ -0,0 +1,725 @@
275.4 +Submitted By: Martin Schaffner <schaffner@gmx.li>
275.5 +Date: 2004-06-19
275.6 +Initial Package Version: 2.6.7
275.7 +Upstream Status: Not submitted
275.8 +Origin: Martin Schaffner
275.9 +Description: Enables build on case-insensitive file systems
275.10 +URL: xxxhttp://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
275.11 +--- Rediffed against 2.6.8 by dank@kegel.com
275.12 +--- plus a few missing hunks added to fix sparc32 build
275.13 +
275.14 +--- linux-2.6.8/Makefile.orig 2004-08-13 22:37:25.000000000 -0700
275.15 ++++ linux-2.6.8/Makefile 2004-09-01 21:39:39.000000000 -0700
275.16 +@@ -540,7 +540,7 @@
275.17 +
275.18 + do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2)
275.19 +
275.20 +-LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
275.21 ++LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
275.22 +
275.23 + # Generate section listing all symbols and add it into vmlinux
275.24 + # It's a three stage process:
275.25 +@@ -584,13 +584,13 @@
275.26 + .tmp_kallsyms%.S: .tmp_vmlinux%
275.27 + $(call cmd,kallsyms)
275.28 +
275.29 +-.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
275.30 ++.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
275.31 + $(call if_changed_rule,vmlinux__)
275.32 +
275.33 +-.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
275.34 ++.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
275.35 + $(call if_changed_rule,vmlinux__)
275.36 +
275.37 +-.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
275.38 ++.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
275.39 + $(call if_changed_rule,vmlinux__)
275.40 +
275.41 + endif
275.42 +@@ -603,13 +603,13 @@
275.43 + $(rule_verify_kallsyms)
275.44 + endef
275.45 +
275.46 +-vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
275.47 ++vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
275.48 + $(call if_changed_rule,vmlinux)
275.49 +
275.50 + # The actual objects are generated when descending,
275.51 + # make sure no implicit rule kicks in
275.52 +
275.53 +-$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
275.54 ++$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
275.55 +
275.56 + # Handle descending into subdirectories listed in $(vmlinux-dirs)
275.57 + # Preset locale variables to speed up the build process. Limit locale
275.58 +@@ -672,7 +672,7 @@
275.59 + # Single targets
275.60 + # ---------------------------------------------------------------------------
275.61 +
275.62 +-%.s: %.c scripts FORCE
275.63 ++%.asm: %.c scripts FORCE
275.64 + $(Q)$(MAKE) $(build)=$(@D) $@
275.65 + %.i: %.c scripts FORCE
275.66 + $(Q)$(MAKE) $(build)=$(@D) $@
275.67 +@@ -682,7 +682,7 @@
275.68 + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
275.69 + %.lst: %.c scripts FORCE
275.70 + $(Q)$(MAKE) $(build)=$(@D) $@
275.71 +-%.s: %.S scripts FORCE
275.72 ++%.asm: %.S scripts FORCE
275.73 + $(Q)$(MAKE) $(build)=$(@D) $@
275.74 + %.o: %.S scripts FORCE
275.75 + $(Q)$(MAKE) $(build)=$(@D) $@
275.76 +diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
275.77 +--- linux-2.6.7/arch/alpha/Makefile Fri Jun 18 22:51:03 2004
275.78 ++++ linux-2.6.7-mod/arch/alpha/Makefile Sat Jun 19 12:46:32 2004
275.79 +@@ -114,10 +114,10 @@
275.80 +
275.81 + prepare: include/asm-$(ARCH)/asm_offsets.h
275.82 +
275.83 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.84 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.85 + include/config/MARKER
275.86 +
275.87 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.88 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.89 + $(call filechk,gen-asm-offsets)
275.90 +
275.91 + archclean:
275.92 +diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
275.93 +--- linux-2.6.7/arch/alpha/kernel/Makefile Mon May 10 04:32:29 2004
275.94 ++++ linux-2.6.7-mod/arch/alpha/kernel/Makefile Sat Jun 19 12:46:48 2004
275.95 +@@ -2,7 +2,7 @@
275.96 + # Makefile for the linux kernel.
275.97 + #
275.98 +
275.99 +-extra-y := head.o vmlinux.lds.s
275.100 ++extra-y := head.o vmlinux.lds.asm
275.101 + EXTRA_AFLAGS := $(CFLAGS)
275.102 + EXTRA_CFLAGS := -Werror -Wno-sign-compare
275.103 +
275.104 +--- linux-2.6.8/arch/arm/Makefile.orig 2004-08-13 22:36:56.000000000 -0700
275.105 ++++ linux-2.6.8/arch/arm/Makefile 2004-09-01 21:40:21.000000000 -0700
275.106 +@@ -176,10 +176,10 @@
275.107 + bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
275.108 + i zi:; $(Q)$(MAKE) $(build)=$(boot) $@
275.109 +
275.110 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.111 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.112 + include/asm-arm/.arch
275.113 +
275.114 +-include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
275.115 ++include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.116 + $(call filechk,gen-asm-offsets)
275.117 +
275.118 + define archhelp
275.119 +diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
275.120 +--- linux-2.6.7/arch/arm/kernel/Makefile Mon May 10 04:33:19 2004
275.121 ++++ linux-2.6.7-mod/arch/arm/kernel/Makefile Sat Jun 19 12:47:25 2004
275.122 +@@ -27,7 +27,7 @@
275.123 + head-y := head.o
275.124 + obj-$(CONFIG_DEBUG_LL) += debug.o
275.125 +
275.126 +-extra-y := $(head-y) init_task.o vmlinux.lds.s
275.127 ++extra-y := $(head-y) init_task.o vmlinux.lds.asm
275.128 +
275.129 + # Spell out some dependencies that aren't automatically figured out
275.130 + $(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
275.131 +diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
275.132 +--- linux-2.6.7/arch/arm26/Makefile Mon May 10 04:32:28 2004
275.133 ++++ linux-2.6.7-mod/arch/arm26/Makefile Sat Jun 19 12:48:24 2004
275.134 +@@ -101,10 +101,10 @@
275.135 + fi; \
275.136 + )
275.137 +
275.138 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.139 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.140 + include/config/MARKER
275.141 +
275.142 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.143 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.144 + $(call filechk,gen-asm-offsets)
275.145 +
275.146 + define archhelp
275.147 +diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
275.148 +--- linux-2.6.7/arch/arm26/kernel/Makefile Mon May 10 04:32:29 2004
275.149 ++++ linux-2.6.7-mod/arch/arm26/kernel/Makefile Sat Jun 19 12:48:30 2004
275.150 +@@ -14,5 +14,5 @@
275.151 + obj-$(CONFIG_FIQ) += fiq.o
275.152 + obj-$(CONFIG_MODULES) += armksyms.o
275.153 +
275.154 +-extra-y := init_task.o vmlinux.lds.s
275.155 ++extra-y := init_task.o vmlinux.lds.asm
275.156 +
275.157 +diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
275.158 +--- linux-2.6.7/arch/cris/Makefile Fri Jun 18 22:51:07 2004
275.159 ++++ linux-2.6.7-mod/arch/cris/Makefile Sat Jun 19 12:48:47 2004
275.160 +@@ -107,8 +107,8 @@
275.161 + @ln -sf $(SARCH) include/asm-$(ARCH)/arch
275.162 + @touch $@
275.163 +
275.164 +-arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.165 ++arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.166 + include/config/MARKER
275.167 +
275.168 +-include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
275.169 ++include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
275.170 + $(call filechk,gen-asm-offsets)
275.171 +diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
275.172 +--- linux-2.6.7/arch/cris/kernel/Makefile Fri Jun 18 22:51:09 2004
275.173 ++++ linux-2.6.7-mod/arch/cris/kernel/Makefile Sat Jun 19 12:48:53 2004
275.174 +@@ -3,7 +3,7 @@
275.175 + # Makefile for the linux kernel.
275.176 + #
275.177 +
275.178 +-extra-y := vmlinux.lds.s
275.179 ++extra-y := vmlinux.lds.asm
275.180 +
275.181 + obj-y := process.o traps.o irq.o ptrace.o setup.o \
275.182 + time.o sys_cris.o semaphore.o
275.183 +diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
275.184 +--- linux-2.6.7/arch/h8300/Makefile Fri Jun 18 22:51:09 2004
275.185 ++++ linux-2.6.7-mod/arch/h8300/Makefile Sat Jun 19 12:49:12 2004
275.186 +@@ -64,7 +64,7 @@
275.187 +
275.188 + prepare: include/asm-$(ARCH)/asm-offsets.h
275.189 +
275.190 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
275.191 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
275.192 + include/asm include/linux/version.h
275.193 + $(call filechk,gen-asm-offsets)
275.194 +
275.195 +diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
275.196 +--- linux-2.6.7/arch/h8300/kernel/Makefile Fri Jun 18 22:51:09 2004
275.197 ++++ linux-2.6.7-mod/arch/h8300/kernel/Makefile Sat Jun 19 12:49:32 2004
275.198 +@@ -2,7 +2,7 @@
275.199 + # Makefile for the linux kernel.
275.200 + #
275.201 +
275.202 +-extra-y := vmlinux.lds.s
275.203 ++extra-y := vmlinux.lds.asm
275.204 +
275.205 + obj-y := process.o traps.o ptrace.o ints.o \
275.206 + sys_h8300.o time.o semaphore.o signal.o \
275.207 +diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
275.208 +--- linux-2.6.7/arch/i386/Makefile Fri Jun 18 22:51:10 2004
275.209 ++++ linux-2.6.7-mod/arch/i386/Makefile Sat Jun 19 12:49:43 2004
275.210 +@@ -141,10 +141,10 @@
275.211 + prepare: include/asm-$(ARCH)/asm_offsets.h
275.212 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
275.213 +
275.214 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.215 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.216 + include/config/MARKER
275.217 +
275.218 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.219 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.220 + $(call filechk,gen-asm-offsets)
275.221 +
275.222 + archclean:
275.223 +diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
275.224 +--- linux-2.6.7/arch/i386/kernel/Makefile Mon May 10 04:32:02 2004
275.225 ++++ linux-2.6.7-mod/arch/i386/kernel/Makefile Sat Jun 19 12:49:54 2004
275.226 +@@ -2,7 +2,7 @@
275.227 + # Makefile for the linux kernel.
275.228 + #
275.229 +
275.230 +-extra-y := head.o init_task.o vmlinux.lds.s
275.231 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.232 +
275.233 + obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
275.234 + ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
275.235 +diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
275.236 +--- linux-2.6.7/arch/ia64/Makefile Mon May 10 04:31:59 2004
275.237 ++++ linux-2.6.7-mod/arch/ia64/Makefile Sat Jun 19 12:50:12 2004
275.238 +@@ -88,12 +88,12 @@
275.239 +
275.240 + prepare: include/asm-ia64/offsets.h
275.241 +
275.242 +-arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
275.243 ++arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
275.244 +
275.245 +-include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
275.246 ++include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
275.247 + $(call filechk,gen-asm-offsets)
275.248 +
275.249 +-arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
275.250 ++arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
275.251 +
275.252 + include/asm-ia64/.offsets.h.stamp:
275.253 + mkdir -p include/asm-ia64
275.254 +diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
275.255 +--- linux-2.6.7/arch/ia64/kernel/Makefile Fri Jun 18 22:51:13 2004
275.256 ++++ linux-2.6.7-mod/arch/ia64/kernel/Makefile Sat Jun 19 12:52:14 2004
275.257 +@@ -2,7 +2,7 @@
275.258 + # Makefile for the linux kernel.
275.259 + #
275.260 +
275.261 +-extra-y := head.o init_task.o vmlinux.lds.s
275.262 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.263 +
275.264 + obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
275.265 + irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
275.266 +@@ -21,7 +21,7 @@
275.267 + # The gate DSO image is built using a special linker script.
275.268 + targets += gate.so gate-syms.o
275.269 +
275.270 +-extra-y += gate.so gate-syms.o gate.lds.s gate.o
275.271 ++extra-y += gate.so gate-syms.o gate.lds.asm gate.o
275.272 +
275.273 + # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
275.274 + CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
275.275 +@@ -32,14 +32,14 @@
275.276 + cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
275.277 +
275.278 + GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
275.279 +-$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
275.280 ++$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
275.281 + $(call if_changed,gate)
275.282 +
275.283 + $(obj)/built-in.o: $(obj)/gate-syms.o
275.284 + $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
275.285 +
275.286 + GATECFLAGS_gate-syms.o = -r
275.287 +-$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
275.288 ++$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
275.289 + $(call if_changed,gate)
275.290 +
275.291 + # gate-data.o contains the gate DSO image as data in section .data.gate.
275.292 +diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
275.293 +--- linux-2.6.7/arch/m68k/Makefile Fri Jun 18 22:51:14 2004
275.294 ++++ linux-2.6.7-mod/arch/m68k/Makefile Sat Jun 19 12:52:30 2004
275.295 +@@ -114,10 +114,10 @@
275.296 + prepare: include/asm-$(ARCH)/offsets.h
275.297 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
275.298 +
275.299 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.300 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.301 + include/config/MARKER
275.302 +
275.303 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.304 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.305 + $(call filechk,gen-asm-offsets)
275.306 +
275.307 + archclean:
275.308 +diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
275.309 +--- linux-2.6.7/arch/m68k/kernel/Makefile Mon May 10 04:33:10 2004
275.310 ++++ linux-2.6.7-mod/arch/m68k/kernel/Makefile Sat Jun 19 12:52:35 2004
275.311 +@@ -7,7 +7,7 @@
275.312 + else
275.313 + extra-y := sun3-head.o
275.314 + endif
275.315 +-extra-y += vmlinux.lds.s
275.316 ++extra-y += vmlinux.lds.asm
275.317 +
275.318 + obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
275.319 + sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
275.320 +diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
275.321 +--- linux-2.6.7/arch/m68knommu/Makefile Mon May 10 04:32:54 2004
275.322 ++++ linux-2.6.7-mod/arch/m68knommu/Makefile Sat Jun 19 12:52:57 2004
275.323 +@@ -89,7 +89,7 @@
275.324 + head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
275.325 +
275.326 + CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
275.327 +- arch/$(ARCH)/kernel/asm-offsets.s
275.328 ++ arch/$(ARCH)/kernel/asm-offsets.asm
275.329 +
275.330 + core-y += arch/m68knommu/kernel/ \
275.331 + arch/m68knommu/mm/ \
275.332 +@@ -102,7 +102,7 @@
275.333 + archclean:
275.334 + $(call descend arch/$(ARCH)/boot, subdirclean)
275.335 +
275.336 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
275.337 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
275.338 + include/asm include/linux/version.h \
275.339 + include/config/MARKER
275.340 + $(call filechk,gen-asm-offsets)
275.341 +diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
275.342 +--- linux-2.6.7/arch/m68knommu/kernel/Makefile Mon May 10 04:32:26 2004
275.343 ++++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile Sat Jun 19 12:53:20 2004
275.344 +@@ -2,7 +2,7 @@
275.345 + # Makefile for arch/m68knommu/kernel.
275.346 + #
275.347 +
275.348 +-extra-y := vmlinux.lds.s
275.349 ++extra-y := vmlinux.lds.asm
275.350 +
275.351 + obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
275.352 + setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
275.353 +diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
275.354 +--- linux-2.6.7/arch/mips/Makefile Fri Jun 18 22:51:19 2004
275.355 ++++ linux-2.6.7-mod/arch/mips/Makefile Sat Jun 19 12:53:35 2004
275.356 +@@ -752,12 +752,12 @@
275.357 + prepare: include/asm-$(ARCH)/offset.h \
275.358 + include/asm-$(ARCH)/reg.h
275.359 +
275.360 +-arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
275.361 ++arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
275.362 + include/config/MARKER
275.363 +
275.364 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
275.365 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
275.366 + $(call filechk,gen-asm-offset.h)
275.367 +-include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
275.368 ++include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
275.369 + $(call filechk,gen-asm-reg.h)
275.370 +
275.371 + CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
275.372 +diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
275.373 +--- linux-2.6.7/arch/mips/kernel/Makefile Mon May 10 04:32:28 2004
275.374 ++++ linux-2.6.7-mod/arch/mips/kernel/Makefile Sat Jun 19 12:53:41 2004
275.375 +@@ -2,7 +2,7 @@
275.376 + # Makefile for the Linux/MIPS kernel.
275.377 + #
275.378 +
275.379 +-extra-y := head.o init_task.o vmlinux.lds.s
275.380 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.381 +
275.382 + obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
275.383 + ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
275.384 +diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
275.385 +--- linux-2.6.7/arch/parisc/Makefile Fri Jun 18 22:51:21 2004
275.386 ++++ linux-2.6.7-mod/arch/parisc/Makefile Sat Jun 19 12:53:47 2004
275.387 +@@ -88,10 +88,10 @@
275.388 +
275.389 + prepare: include/asm-parisc/offsets.h
275.390 +
275.391 +-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.392 ++arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.393 + include/config/MARKER
275.394 +
275.395 +-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
275.396 ++include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
275.397 + $(call filechk,gen-asm-offsets)
275.398 +
275.399 + CLEAN_FILES += lifimage include/asm-parisc/offsets.h
275.400 +diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
275.401 +--- linux-2.6.7/arch/parisc/kernel/Makefile Fri Jun 18 22:51:21 2004
275.402 ++++ linux-2.6.7-mod/arch/parisc/kernel/Makefile Sat Jun 19 12:53:53 2004
275.403 +@@ -4,7 +4,7 @@
275.404 +
275.405 + head-y := head.o
275.406 + head-$(CONFIG_PARISC64) := head64.o
275.407 +-extra-y := init_task.o $(head-y) vmlinux.lds.s
275.408 ++extra-y := init_task.o $(head-y) vmlinux.lds.asm
275.409 +
275.410 + AFLAGS_entry.o := -traditional
275.411 + AFLAGS_pacache.o := -traditional
275.412 +diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
275.413 +--- linux-2.6.7/arch/ppc/Makefile Fri Jun 18 22:51:22 2004
275.414 ++++ linux-2.6.7-mod/arch/ppc/Makefile Sat Jun 19 12:54:09 2004
275.415 +@@ -78,10 +78,10 @@
275.416 +
275.417 + prepare: include/asm-$(ARCH)/offsets.h checkbin
275.418 +
275.419 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.420 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.421 + include/config/MARKER
275.422 +
275.423 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.424 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.425 + $(call filechk,gen-asm-offsets)
275.426 +
275.427 + ifdef CONFIG_6xx
275.428 +@@ -104,4 +104,4 @@
275.429 + endif
275.430 +
275.431 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
275.432 +- arch/$(ARCH)/kernel/asm-offsets.s
275.433 ++ arch/$(ARCH)/kernel/asm-offsets.asm
275.434 +diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
275.435 +--- linux-2.6.7/arch/ppc/kernel/Makefile Fri Jun 18 22:51:24 2004
275.436 ++++ linux-2.6.7-mod/arch/ppc/kernel/Makefile Sat Jun 19 12:43:10 2004
275.437 +@@ -15,7 +15,7 @@
275.438 + extra-$(CONFIG_8xx) := head_8xx.o
275.439 + extra-$(CONFIG_6xx) += idle_6xx.o
275.440 + extra-$(CONFIG_POWER4) += idle_power4.o
275.441 +-extra-y += vmlinux.lds.s
275.442 ++extra-y += vmlinux.lds.asm
275.443 +
275.444 + obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
275.445 + process.o signal.o ptrace.o align.o \
275.446 +diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
275.447 +--- linux-2.6.7/arch/ppc64/Makefile Fri Jun 18 22:51:26 2004
275.448 ++++ linux-2.6.7-mod/arch/ppc64/Makefile Sat Jun 19 12:54:32 2004
275.449 +@@ -67,10 +67,10 @@
275.450 +
275.451 + prepare: include/asm-ppc64/offsets.h
275.452 +
275.453 +-arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.454 ++arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.455 + include/config/MARKER
275.456 +
275.457 +-include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
275.458 ++include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
275.459 + $(call filechk,gen-asm-offsets)
275.460 +
275.461 + define archhelp
275.462 +diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
275.463 +--- linux-2.6.7/arch/ppc64/kernel/Makefile Mon May 10 04:33:20 2004
275.464 ++++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile Sat Jun 19 12:54:39 2004
275.465 +@@ -3,7 +3,7 @@
275.466 + #
275.467 +
275.468 + EXTRA_CFLAGS += -mno-minimal-toc
275.469 +-extra-y := head.o vmlinux.lds.s
275.470 ++extra-y := head.o vmlinux.lds.asm
275.471 +
275.472 + obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \
275.473 + time.o process.o signal.o syscalls.o misc.o ptrace.o \
275.474 +diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
275.475 +--- linux-2.6.7/arch/s390/Makefile Mon May 10 04:32:02 2004
275.476 ++++ linux-2.6.7-mod/arch/s390/Makefile Sat Jun 19 12:54:46 2004
275.477 +@@ -68,10 +68,10 @@
275.478 +
275.479 + prepare: include/asm-$(ARCH)/offsets.h
275.480 +
275.481 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.482 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.483 + include/config/MARKER
275.484 +
275.485 +-include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.486 ++include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.487 + $(call filechk,gen-asm-offsets)
275.488 +
275.489 + CLEAN_FILES += include/asm-$(ARCH)/offsets.h
275.490 +diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
275.491 +--- linux-2.6.7/arch/s390/kernel/Makefile Mon May 10 04:33:20 2004
275.492 ++++ linux-2.6.7-mod/arch/s390/kernel/Makefile Sat Jun 19 12:54:52 2004
275.493 +@@ -10,7 +10,7 @@
275.494 +
275.495 + extra-$(CONFIG_ARCH_S390_31) += head.o
275.496 + extra-$(CONFIG_ARCH_S390X) += head64.o
275.497 +-extra-y += init_task.o vmlinux.lds.s
275.498 ++extra-y += init_task.o vmlinux.lds.asm
275.499 +
275.500 + obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
275.501 + obj-$(CONFIG_SMP) += smp.o
275.502 +diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
275.503 +--- linux-2.6.7/arch/sh/kernel/Makefile Mon May 10 04:32:39 2004
275.504 ++++ linux-2.6.7-mod/arch/sh/kernel/Makefile Sat Jun 19 12:55:33 2004
275.505 +@@ -2,7 +2,7 @@
275.506 + # Makefile for the Linux/SuperH kernel.
275.507 + #
275.508 +
275.509 +-extra-y := head.o init_task.o vmlinux.lds.s
275.510 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.511 +
275.512 + obj-y := process.o signal.o entry.o traps.o irq.o \
275.513 + ptrace.o setup.o time.o sys_sh.o semaphore.o \
275.514 +diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
275.515 +--- linux-2.6.7/arch/sparc/Makefile Fri Jun 18 22:51:29 2004
275.516 ++++ linux-2.6.7-mod/arch/sparc/Makefile Sat Jun 19 12:55:48 2004
275.517 +@@ -61,14 +61,14 @@
275.518 +
275.519 + prepare: include/asm-$(ARCH)/asm_offsets.h
275.520 +
275.521 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.522 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.523 + include/config/MARKER
275.524 +
275.525 +-include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
275.526 ++include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.527 + $(call filechk,gen-asm-offsets)
275.528 +
275.529 + CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
275.530 +- arch/$(ARCH)/kernel/asm-offsets.s \
275.531 ++ arch/$(ARCH)/kernel/asm-offsets.asm \
275.532 + arch/$(ARCH)/boot/System.map
275.533 +
275.534 + # Don't use tabs in echo arguments.
275.535 +diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
275.536 +--- linux-2.6.7/arch/sparc/kernel/Makefile Mon May 10 04:33:13 2004
275.537 ++++ linux-2.6.7-mod/arch/sparc/kernel/Makefile Sat Jun 19 12:55:52 2004
275.538 +@@ -2,7 +2,7 @@
275.539 + # Makefile for the linux kernel.
275.540 + #
275.541 +
275.542 +-extra-y := head.o init_task.o vmlinux.lds.s
275.543 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.544 +
275.545 + EXTRA_AFLAGS := -ansi
275.546 +
275.547 +diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
275.548 +--- linux-2.6.7/arch/sparc64/kernel/Makefile Mon May 10 04:32:02 2004
275.549 ++++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile Sat Jun 19 12:56:24 2004
275.550 +@@ -5,7 +5,7 @@
275.551 + EXTRA_AFLAGS := -ansi
275.552 + EXTRA_CFLAGS := -Werror
275.553 +
275.554 +-extra-y := head.o init_task.o vmlinux.lds.s
275.555 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.556 +
275.557 + obj-y := process.o setup.o cpu.o idprom.o \
275.558 + traps.o devices.o auxio.o \
275.559 +diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
275.560 +--- linux-2.6.7/arch/um/Makefile Mon May 10 04:32:52 2004
275.561 ++++ linux-2.6.7-mod/arch/um/Makefile Sat Jun 19 12:57:07 2004
275.562 +@@ -77,7 +77,7 @@
275.563 + # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
275.564 +
275.565 + LINK_TT = -static
275.566 +-LD_SCRIPT_TT := uml.lds.s
275.567 ++LD_SCRIPT_TT := uml.lds.asm
275.568 +
275.569 + ifeq ($(CONFIG_STATIC_LINK),y)
275.570 + LINK-y += $(LINK_TT)
275.571 +@@ -103,11 +103,11 @@
275.572 + -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
275.573 + -DKERNEL_STACK_SIZE=$(STACK_SIZE)
275.574 +
275.575 +-AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
275.576 ++AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
275.577 +
275.578 + LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
275.579 +
275.580 +-$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
275.581 ++$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
275.582 + $(call if_changed_dep,as_s_S)
275.583 +
275.584 + linux: vmlinux $(LD_SCRIPT-y)
275.585 +@@ -122,8 +122,8 @@
275.586 + # To get a definition of F_SETSIG
275.587 + USER_CFLAGS += -D_GNU_SOURCE
275.588 +
275.589 +-CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
275.590 +- $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
275.591 ++CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
275.592 ++ $(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
275.593 +
275.594 + $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
275.595 + $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
275.596 +diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
275.597 +--- linux-2.6.7/arch/um/kernel/Makefile Mon May 10 04:32:53 2004
275.598 ++++ linux-2.6.7-mod/arch/um/kernel/Makefile Sat Jun 19 12:57:15 2004
275.599 +@@ -3,7 +3,7 @@
275.600 + # Licensed under the GPL
275.601 + #
275.602 +
275.603 +-extra-y := vmlinux.lds.s
275.604 ++extra-y := vmlinux.lds.asm
275.605 +
275.606 + obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
275.607 + helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
275.608 +diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
275.609 +--- linux-2.6.7/arch/v850/Makefile Mon May 10 04:33:21 2004
275.610 ++++ linux-2.6.7-mod/arch/v850/Makefile Sat Jun 19 12:57:59 2004
275.611 +@@ -52,12 +52,12 @@
275.612 + prepare: include/asm-$(ARCH)/asm-consts.h
275.613 +
275.614 + # Generate constants from C code for use by asm files
275.615 +-arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
275.616 ++arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
275.617 + include/config/MARKER
275.618 +
275.619 +-include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
275.620 ++include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
275.621 + $(call filechk,gen-asm-offsets)
275.622 +
275.623 + CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
275.624 +- arch/$(ARCH)/kernel/asm-consts.s \
275.625 ++ arch/$(ARCH)/kernel/asm-consts.asm \
275.626 + root_fs_image.o
275.627 +diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
275.628 +--- linux-2.6.7/arch/v850/kernel/Makefile Mon May 10 04:33:21 2004
275.629 ++++ linux-2.6.7-mod/arch/v850/kernel/Makefile Sat Jun 19 12:58:04 2004
275.630 +@@ -9,7 +9,7 @@
275.631 + # for more details.
275.632 + #
275.633 +
275.634 +-extra-y := head.o init_task.o vmlinux.lds.s
275.635 ++extra-y := head.o init_task.o vmlinux.lds.asm
275.636 +
275.637 + obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
275.638 + signal.o irq.o mach.o ptrace.o bug.o
275.639 +diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
275.640 +--- linux-2.6.7/arch/x86_64/Makefile Mon May 10 04:33:19 2004
275.641 ++++ linux-2.6.7-mod/arch/x86_64/Makefile Sat Jun 19 12:58:10 2004
275.642 +@@ -93,10 +93,10 @@
275.643 +
275.644 + prepare: include/asm-$(ARCH)/offset.h
275.645 +
275.646 +-arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
275.647 ++arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
275.648 + include/config/MARKER
275.649 +
275.650 +-include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
275.651 ++include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
275.652 + $(call filechk,gen-asm-offsets)
275.653 +
275.654 + CLEAN_FILES += include/asm-$(ARCH)/offset.h
275.655 +diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
275.656 +--- linux-2.6.7/arch/x86_64/kernel/Makefile Fri Jun 18 22:51:32 2004
275.657 ++++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile Sat Jun 19 12:58:17 2004
275.658 +@@ -2,7 +2,7 @@
275.659 + # Makefile for the linux kernel.
275.660 + #
275.661 +
275.662 +-extra-y := head.o head64.o init_task.o vmlinux.lds.s
275.663 ++extra-y := head.o head64.o init_task.o vmlinux.lds.asm
275.664 + EXTRA_AFLAGS := -traditional
275.665 + obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
275.666 + ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
275.667 +diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
275.668 +--- linux-2.6.7/scripts/Makefile.build Mon May 10 04:33:13 2004
275.669 ++++ linux-2.6.7-mod/scripts/Makefile.build Sat Jun 19 12:43:10 2004
275.670 +@@ -110,7 +110,7 @@
275.671 + quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
275.672 + cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
275.673 +
275.674 +-%.s: %.c FORCE
275.675 ++%.asm: %.c FORCE
275.676 + $(call if_changed_dep,cc_s_c)
275.677 +
275.678 + quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
275.679 +@@ -197,7 +197,7 @@
275.680 + quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
275.681 + cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
275.682 +
275.683 +-%.s: %.S FORCE
275.684 ++%.asm: %.S FORCE
275.685 + $(call if_changed_dep,as_s_S)
275.686 +
275.687 + quiet_cmd_as_o_S = AS $(quiet_modtag) $@
275.688 +--- linux-2.6.8/arch/sparc/boot/Makefile.old 2004-09-21 21:46:18.000000000 -0700
275.689 ++++ linux-2.6.8/arch/sparc/boot/Makefile 2004-09-21 21:52:35.000000000 -0700
275.690 +@@ -19,7 +19,7 @@
275.691 +
275.692 + BTOBJS := $(HEAD_Y) $(INIT_Y)
275.693 + BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
275.694 +-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
275.695 ++LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.asm $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
275.696 +
275.697 + # Actual linking
275.698 + $(obj)/image: $(obj)/btfix.o FORCE
275.699 +--- linux-2.6.8/arch/sh64/Makefile.old 2004-09-21 21:46:18.000000000 -0700
275.700 ++++ linux-2.6.8/arch/sh64/Makefile 2004-09-21 21:54:31.000000000 -0700
275.701 +@@ -71,7 +71,7 @@
275.702 +
275.703 + prepare: include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h
275.704 +
275.705 +-include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
275.706 ++include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
275.707 + include/asm include/linux/version.h
275.708 + $(call filechk,gen-asm-offsets)
275.709 +
275.710 +--- linux-2.6.8/arch/sh64/boot/compressed/Makefile.old 2004-09-21 21:46:18.000000000 -0700
275.711 ++++ linux-2.6.8/arch/sh64/boot/compressed/Makefile 2004-09-21 21:54:41.000000000 -0700
275.712 +@@ -25,7 +25,7 @@
275.713 + ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
275.714 +
275.715 + LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
275.716 +- -T $(obj)/../../kernel/vmlinux.lds.s \
275.717 ++ -T $(obj)/../../kernel/vmlinux.lds.asm \
275.718 + --no-warn-mismatch
275.719 +
275.720 + $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
275.721 +@@ -41,6 +41,6 @@
275.722 + LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
275.723 + OBJCOPYFLAGS += -R .empty_zero_page
275.724 +
275.725 +-$(obj)/piggy.o: $(obj)/vmlinux.lds.s $(obj)/vmlinux.bin.gz FORCE
275.726 ++$(obj)/piggy.o: $(obj)/vmlinux.lds.asm $(obj)/vmlinux.bin.gz FORCE
275.727 + $(call if_changed,ld)
275.728 +
276.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
276.2 +++ b/patches/linux/2.6.8/140-linux-2.6.8-m68k-kludge.patch Sun Sep 23 17:08:09 2007 +0000
276.3 @@ -0,0 +1,285 @@
276.4 +[ This patch not accepted into kernel for now - it touches the core too much -
276.5 + but it's ok for crosstool since we just want to check whether toolchain is ok,
276.6 + I think. I had to rediff the sched.h changes with -U5 to get them to
276.7 + apply properly -- patch got confused with just three lines of context?! -dank ]
276.8 +
276.9 +Date: Sun, 5 Sep 2004 12:41:08 +0200 (CEST)
276.10 +From: Geert Uytterhoeven <geert@linux-m68k.org>
276.11 +Sender: geert@linux-m68k.org
276.12 +To: Dan Kegel <dank@kegel.com>
276.13 +cc: Roman Zippel <zippel@linux-m68k.org>,
276.14 + Matthias Urlichs <smurf@smurf.noris.de>,
276.15 + Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
276.16 + Linux/m68k <linux-m68k@lists.linux-m68k.org>
276.17 +Subject: Re: Getting kernel.org kernel to build for m68k?
276.18 +In-Reply-To: <Pine.GSO.4.58.0409011029390.15681@waterleaf.sonytel.be>
276.19 +Message-ID: <Pine.LNX.4.58.0409051224020.30282@anakin>
276.20 +
276.21 +On Wed, 1 Sep 2004, Geert Uytterhoeven wrote:
276.22 +> On Tue, 31 Aug 2004, Dan Kegel wrote:
276.23 +> > I noticed today that Linus's m68k kernel can't be built (at least with gcc-3.4.1).
276.24 +> >
276.25 +> > The first problem I ran into,
276.26 +> > CC arch/m68k/kernel/asm-offsets.s
276.27 +> > In file included from include/linux/spinlock.h:12,
276.28 +> > from include/linux/capability.h:45,
276.29 +> > from include/linux/sched.h:7,
276.30 +> > from arch/m68k/kernel/asm-offsets.c:12:
276.31 +> > include/linux/thread_info.h:30: error: parse error before '{' token
276.32 +> > is solved already in the m68k tree.
276.33 +> > (In particular,
276.34 +> > the #ifndef __HAVE_THREAD_FUNCTIONS ... #endif in
276.35 +> > http://linux-m68k-cvs.apia.dhs.org/c/cvsweb/linux/include/linux/thread_info.h?rev=1.5;content-type=text%2Fplain
276.36 +> > probably solves it.)
276.37 +> > There are other problems after that.
276.38 +>
276.39 +> Roman Zippel changed the threading stuff on m68k. Since it would affect other
276.40 +> architectures, I never submitted it on my own.
276.41 +>
276.42 +> In short, we never really compile this code, since the m68k tree doesn't use it
276.43 +> anymore. And yes, it even fails with older compiler versions, like 2.95.2.
276.44 +
276.45 +The second part doesn't seem to be true: the code is used. And it does compile
276.46 +after applying the fixes below, even with gcc 3.4.1.
276.47 +
276.48 +> > Any chance you could spend a bit of time sending Linus enough
276.49 +> > patches for his kernel to build for m68k, if not run?
276.50 +>
276.51 +> I'll make sure a plain kernel.org kernel can build an m68k kernel.
276.52 +
276.53 +The patch below makes the plain kernel.org 2.6.8.1 compile for m68k,
276.54 +using gcc 2.95.2 or 3.3.3 (3.4.1 needs a few more changes in random
276.55 +places). The resulting kernel (I booted the gcc 2.95.2 case) works fine on my
276.56 +Amiga.
276.57 +
276.58 +It's more or less the patch created by Matthias Urlichs last year, so
276.59 +the credits are his:
276.60 +
276.61 +| This change implements a reasonable compromise between the task_info->flags
276.62 +| variable in other ports, which is too much work in the syscall path on m68k,
276.63 +| and moving the whole structure to thread_struct, which is way too intrusive
276.64 +| on other ports.
276.65 +
276.66 +The patch does affect generic code a bit, but the collateral damage is
276.67 +kept to a minimum.
276.68 +
276.69 +We can still keep Roman's thread info abstractions[*] in Linux/m68k CVS, but
276.70 +I'd really like the plain kernel.org kernel to be in a working state as well.
276.71 +That way more people may do cross-compile tests for m68k.
276.72 +
276.73 +Hence if no one objects, I'll submit the patch to Andrew and Linus.
276.74 +
276.75 +All comments are welcome!
276.76 +
276.77 +--- linux-2.6.8.1/arch/m68k/kernel/asm-offsets.c 2004-04-28 15:48:59.000000000 +0200
276.78 ++++ linux-m68k-2.6.8.1/arch/m68k/kernel/asm-offsets.c 2004-09-05 12:04:00.000000000 +0200
276.79 +@@ -31,6 +31,7 @@ int main(void)
276.80 + DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
276.81 + DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
276.82 + DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
276.83 ++ DEFINE(TASK_TINFO, offsetof(struct task_struct, thread_info));
276.84 + DEFINE(TASK_MM, offsetof(struct task_struct, mm));
276.85 + DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
276.86 +
276.87 +@@ -45,6 +46,9 @@ int main(void)
276.88 + DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
276.89 + DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
276.90 +
276.91 ++ /* offsets into the thread_info struct */
276.92 ++ DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
276.93 ++
276.94 + /* offsets into the pt_regs */
276.95 + DEFINE(PT_D0, offsetof(struct pt_regs, d0));
276.96 + DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0));
276.97 +--- linux-2.6.8.1/arch/m68k/kernel/entry.S 2004-05-24 11:13:22.000000000 +0200
276.98 ++++ linux-m68k-2.6.8.1/arch/m68k/kernel/entry.S 2004-09-02 20:13:12.000000000 +0200
276.99 +@@ -134,13 +134,13 @@ ENTRY(system_call)
276.100 +
276.101 + syscall_exit_work:
276.102 + btst #5,%sp@(PT_SR) | check if returning to kernel
276.103 +- bnes 1b | if so, skip resched, signals
276.104 ++ bnes 1b | if so, skip everything
276.105 + tstw %d0
276.106 +- jeq do_signal_return
276.107 ++ jeq do_signal_return | jump if only sig_pending or notify_resume
276.108 + tstb %d0
276.109 +- jne do_delayed_trace
276.110 ++ jne do_delayed_trace | jump if delayed_trace
276.111 +
276.112 +- pea resume_userspace
276.113 ++ pea resume_userspace | need_resched is set
276.114 + jmp schedule
276.115 +
276.116 + ret_from_exception:
276.117 +@@ -223,10 +223,14 @@ ENTRY(nmi_handler)
276.118 + */
276.119 + inthandler:
276.120 + SAVE_ALL_INT
276.121 +- GET_CURRENT(%d0)
276.122 +- addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
276.123 +- | put exception # in d0
276.124 +- bfextu %sp@(PT_VECTOR){#4,#10},%d0
276.125 ++ /* GET_CURRENT(%d0) */
276.126 ++ movel %sp,%d0
276.127 ++ andw #-THREAD_SIZE,%d0
276.128 ++ movel %d0,%a1
276.129 ++ addqb #1,%a1@(TINFO_PREEMPT+2)
276.130 ++ movel %a1@,%curptr
276.131 ++
276.132 ++ bfextu %sp@(PT_VECTOR){#4,#10},%d0 | put exception # in d0
276.133 +
276.134 + movel %sp,%sp@-
276.135 + movel %d0,%sp@- | put vector # on stack
276.136 +@@ -243,7 +247,8 @@ inthandler:
276.137 + 3: addql #8,%sp | pop parameters off stack
276.138 +
276.139 + ret_from_interrupt:
276.140 +- subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
276.141 ++ movel %curptr@(TASK_TINFO),%a1
276.142 ++ subqb #1,%a1@(TINFO_PREEMPT+2)
276.143 + jeq 1f
276.144 + 2:
276.145 + RESTORE_ALL
276.146 +--- linux-2.6.8.1/include/asm-m68k/processor.h 2004-04-28 15:49:03.000000000 +0200
276.147 ++++ linux-m68k-2.6.8.1/include/asm-m68k/processor.h 2004-09-02 20:29:32.000000000 +0200
276.148 +@@ -84,7 +84,6 @@ struct thread_struct {
276.149 + ksp: sizeof(init_stack) + (unsigned long) init_stack, \
276.150 + sr: PS_S, \
276.151 + fs: __KERNEL_DS, \
276.152 +- info: INIT_THREAD_INFO(init_task) \
276.153 + }
276.154 +
276.155 + /*
276.156 +--- linux-2.6.8.1/include/asm-m68k/thread_info.h 2004-05-24 11:13:53.000000000 +0200
276.157 ++++ linux-m68k-2.6.8.1/include/asm-m68k/thread_info.h 2004-09-05 12:19:47.000000000 +0200
276.158 +@@ -6,7 +6,7 @@
276.159 + #include <asm/page.h>
276.160 +
276.161 + struct thread_info {
276.162 +- struct task_struct *task; /* main task structure */
276.163 ++ struct task_struct *task; /* main task structure, must be first! */
276.164 + struct exec_domain *exec_domain; /* execution domain */
276.165 + __s32 preempt_count; /* 0 => preemptable, <0 => BUG */
276.166 + __u32 cpu; /* should always be 0 on m68k */
276.167 +@@ -21,7 +21,8 @@ struct thread_info {
276.168 + { \
276.169 + .task = &tsk, \
276.170 + .exec_domain = &default_exec_domain, \
276.171 +- .restart_block = { \
276.172 ++ .preempt_count = 1, \
276.173 ++ .restart_block = { \
276.174 + .fn = do_no_restart_syscall, \
276.175 + }, \
276.176 + }
276.177 +@@ -35,10 +36,11 @@ struct thread_info {
276.178 + #define free_thread_info(ti) free_pages((unsigned long)(ti),1)
276.179 + #endif /* PAGE_SHIFT == 13 */
276.180 +
276.181 +-//#define init_thread_info (init_task.thread.info)
276.182 ++#define init_thread_info (init_thread_union.thread_info)
276.183 + #define init_stack (init_thread_union.stack)
276.184 +
276.185 +-#define current_thread_info() (current->thread_info)
276.186 ++register __u32 current_thread_info_reg asm("sp");
276.187 ++#define current_thread_info() ((struct thread_info *)(current_thread_info_reg & ~0x1fff))
276.188 +
276.189 +
276.190 + #define __HAVE_THREAD_FUNCTIONS
276.191 +@@ -91,8 +93,12 @@ extern int thread_flag_fixme(void);
276.192 + })
276.193 +
276.194 + #define __get_set_tsk_thread_flag(tsk, flag, val) ({ \
276.195 +- int __res = __get_tsk_thread_flag(tsk, flag); \
276.196 ++ int __res; \
276.197 ++ unsigned long __flags; \
276.198 ++ local_irq_save(__flags); \
276.199 ++ __res = __get_tsk_thread_flag(tsk, flag); \
276.200 + __set_tsk_thread_flag(tsk, flag, val); \
276.201 ++ local_irq_restore(__flags); \
276.202 + __res; \
276.203 + })
276.204 +
276.205 +@@ -105,7 +111,4 @@ extern int thread_flag_fixme(void);
276.206 + #define clear_thread_flag(flag) clear_tsk_thread_flag(current, flag)
276.207 + #define test_thread_flag(flag) test_tsk_thread_flag(current, flag)
276.208 +
276.209 +-#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
276.210 +-#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
276.211 +-
276.212 + #endif /* _ASM_M68K_THREAD_INFO_H */
276.213 +--- linux-2.6.8/include/linux/sched.h.old 2004-09-13 21:48:58.000000000 -0700
276.214 ++++ linux-2.6.8/include/linux/sched.h 2004-09-13 21:50:26.000000000 -0700
276.215 +@@ -975,10 +975,11 @@
276.216 + task_unlock(task);
276.217 +
276.218 + return mm;
276.219 + }
276.220 +
276.221 ++#ifndef __HAVE_THREAD_FUNCTIONS
276.222 +
276.223 + /* set thread flags in other task's structures
276.224 + * - see asm/thread_info.h for TIF_xxxx flags available
276.225 + */
276.226 + static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
276.227 +@@ -1004,10 +1005,12 @@
276.228 + static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
276.229 + {
276.230 + return test_ti_thread_flag(tsk->thread_info,flag);
276.231 + }
276.232 +
276.233 ++#endif /* __HAVE_THREAD_FUNCTIONS */
276.234 ++
276.235 + static inline void set_tsk_need_resched(struct task_struct *tsk)
276.236 + {
276.237 + set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
276.238 + }
276.239 +
276.240 +--- linux-2.6.8.1/include/linux/thread_info.h 2004-04-27 20:42:22.000000000 +0200
276.241 ++++ linux-m68k-2.6.8.1/include/linux/thread_info.h 2004-09-04 21:24:36.000000000 +0200
276.242 +@@ -21,6 +21,7 @@ extern long do_no_restart_syscall(struct
276.243 + #include <asm/thread_info.h>
276.244 +
276.245 + #ifdef __KERNEL__
276.246 ++#ifndef __HAVE_THREAD_FUNCTIONS
276.247 +
276.248 + /*
276.249 + * flag set/clear/test wrappers
276.250 +@@ -77,16 +78,11 @@ static inline int test_ti_thread_flag(st
276.251 + return test_bit(flag,&ti->flags);
276.252 + }
276.253 +
276.254 +-static inline void set_need_resched(void)
276.255 +-{
276.256 +- set_thread_flag(TIF_NEED_RESCHED);
276.257 +-}
276.258 ++#endif /* __HAVE_THREAD_FUNCTIONS */
276.259 +
276.260 +-static inline void clear_need_resched(void)
276.261 +-{
276.262 +- clear_thread_flag(TIF_NEED_RESCHED);
276.263 +-}
276.264 ++#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
276.265 ++#define clear_need_resched(void) clear_thread_flag(TIF_NEED_RESCHED)
276.266 +
276.267 +-#endif
276.268 ++#endif /* __KERNEL__ */
276.269 +
276.270 + #endif /* _LINUX_THREAD_INFO_H */
276.271 +
276.272 +Gr{oetje,eeting}s,
276.273 +
276.274 + Geert
276.275 +
276.276 +[*] For reference:
276.277 +
276.278 + http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/156-thread_info.diff
276.279 +
276.280 +--
276.281 +Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
276.282 +
276.283 +In personal conversations with technical people, I call myself a hacker. But
276.284 +when I'm talking to journalists I just say "programmer" or something like that.
276.285 + -- Linus Torvalds
276.286 +
276.287 +
276.288 +
277.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
277.2 +++ b/patches/linux/2.6.8/150-linux-2.6.8-noshared-kconfig.patch Sun Sep 23 17:08:09 2007 +0000
277.3 @@ -0,0 +1,28 @@
277.4 +Lets you run 'make oldconfig' and 'make menuconfig' on systems
277.5 +where shared libraries aren't easy. (There's no harm in using the
277.6 +static version of libkconfig.)
277.7 +Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
277.8 +
277.9 +
277.10 +--- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
277.11 ++++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
277.12 +@@ -68,8 +68,8 @@
277.13 + libkconfig-objs := zconf.tab.o
277.14 +
277.15 + host-progs := conf mconf qconf gconf
277.16 +-conf-objs := conf.o libkconfig.so
277.17 +-mconf-objs := mconf.o libkconfig.so
277.18 ++conf-objs := conf.o $(libkconfig-objs)
277.19 ++mconf-objs := mconf.o $(libkconfig-objs)
277.20 +
277.21 + ifeq ($(MAKECMDGOALS),xconfig)
277.22 + qconf-target := 1
277.23 +@@ -88,7 +88,7 @@
277.24 + gconf-objs := gconf.o kconfig_load.o
277.25 + endif
277.26 +
277.27 +-clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
277.28 ++clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
277.29 + .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
277.30 +
277.31 + # generated files seem to need this to find local include files
278.1 --- a/patches/linux/2.6.8/kaz-types.patch Sat Sep 22 17:25:42 2007 +0000
278.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
278.3 @@ -1,60 +0,0 @@
278.4 -The following fixes an error that occurs when building glibc-2.3.2 (but not glibc-2.2.5) for sh4:
278.5 -
278.6 -In file included from sys/ustat.h:30,
278.7 - from ../sysdeps/unix/sysv/linux/ustat.c:21:
278.8 -../sysdeps/generic/bits/ustat.h:26: error: redefinition of `struct ustat'
278.9 -make[2]: *** [/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/build-glibc/misc/ustat.o] Error 1
278.10 -make[2]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2/misc'
278.11 -make[1]: *** [misc/subdir_lib] Error 2
278.12 -make[1]: Leaving directory `/home3/dank/crosstool-0.7/build/sh4-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/glibc-2.3.2'
278.13 -make: *** [all] Error 2
278.14 -
278.15 ------------ snip ---------------
278.16 -
278.17 -Date: Fri, 06 Jun 2003 08:00:00 +0900
278.18 -From: kaz Kojima <kkojima@rr.iij4u.or.jp>
278.19 -Subject: [linux-sh:02770] Re: Compiling glibc-2.3.2 for sh4 fails with "include/asm/user.h:32:
278.20 - error: redefinition of `struct user_fpu_struct'"
278.21 -To: linux-sh@m17n.org
278.22 -Message-Id: <200306052250.h55Moeb08707@r-rr.iij4u.or.jp>
278.23 -
278.24 -Hi,
278.25 -
278.26 -Dan Kegel <dank@kegel.com> wrote:
278.27 -> When I try to build glibc-2.3.2 for sh4, it fails with the error
278.28 -[snip]
278.29 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:32: error: redefinition of `struct user_fpu_struct'
278.30 -> /home3/dank/crosstool-0.3/result/sh4-linux/gcc-3.3-glibc-2.3.2/sh4-linux/include/asm/user.h:39: error: redefinition of `struct user'
278.31 -[snip]
278.32 -> The error reminds me of the kind of thing fixed by
278.33 -> http://www.kegel.com/crossgcc/crosstool-0.4/glibc-2.3.2-patches/sh-user.patch
278.34 -
278.35 -It seems that the definitions in asm/user.h and the above patch collide.
278.36 -I'm not sure why you need this patch, but is it needed for the problem
278.37 -about struct ustat that you pointed out in this list, isn't it?
278.38 -I found why I don't hit ustat problem - my local kernel tree includes
278.39 -the following patch, though I can't recall about it.
278.40 -
278.41 -Regards,
278.42 - kaz
278.43 ---
278.44 -diff -u linux-2.5.69-sf-orig/include/linux/types.h /usr/local/sh4-unknown-linux-gnu/include/linux/types.h
278.45 ---- linux-2.5.69-sf-orig/include/linux/types.h Wed Mar 5 12:29:34 2003
278.46 -+++ sh4-unknown-linux-gnu/include/linux/types.h Sat Apr 19 10:05:52 2003
278.47 -@@ -141,6 +141,7 @@
278.48 -
278.49 - #endif /* __KERNEL_STRICT_NAMES */
278.50 -
278.51 -+#ifdef __KERNEL__
278.52 - /*
278.53 - * Below are truly Linux-specific types that should never collide with
278.54 - * any application/library that wants linux/types.h.
278.55 -@@ -152,5 +153,6 @@
278.56 - char f_fname[6];
278.57 - char f_fpack[6];
278.58 - };
278.59 -+#endif
278.60 -
278.61 - #endif /* _LINUX_TYPES_H */
278.62 -
278.63 -
279.1 --- a/patches/linux/2.6.8/linux-2.6.8-allow-gcc-4.0-asm-i386.patch Sat Sep 22 17:25:42 2007 +0000
279.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
279.3 @@ -1,138 +0,0 @@
279.4 -Fixes
279.5 -
279.6 -In file included from include/asm/thread_info.h:16,
279.7 - from include/linux/thread_info.h:21,
279.8 - from include/linux/spinlock.h:12,
279.9 - from include/linux/capability.h:45,
279.10 - from include/linux/sched.h:7,
279.11 - from arch/i386/kernel/asm-offsets.c:7:
279.12 -include/asm/processor.h:87: error: array type has incomplete element type
279.13 -make[1]: *** [arch/i386/kernel/asm-offsets.asm] Error 1
279.14 -
279.15 ---- linux-2.6.8/include/asm-i386/processor.h.old Tue Mar 15 00:14:42 2005
279.16 -+++ linux-2.6.8/include/asm-i386/processor.h Tue Mar 15 00:18:45 2005
279.17 -@@ -79,6 +79,58 @@
279.18 - #define X86_VENDOR_UNKNOWN 0xff
279.19 -
279.20 - /*
279.21 -+ * Size of io_bitmap.
279.22 -+ */
279.23 -+#define IO_BITMAP_BITS 65536
279.24 -+#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
279.25 -+#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
279.26 -+#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
279.27 -+#define INVALID_IO_BITMAP_OFFSET 0x8000
279.28 -+
279.29 -+struct tss_struct {
279.30 -+ unsigned short back_link,__blh;
279.31 -+ unsigned long esp0;
279.32 -+ unsigned short ss0,__ss0h;
279.33 -+ unsigned long esp1;
279.34 -+ unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
279.35 -+ unsigned long esp2;
279.36 -+ unsigned short ss2,__ss2h;
279.37 -+ unsigned long __cr3;
279.38 -+ unsigned long eip;
279.39 -+ unsigned long eflags;
279.40 -+ unsigned long eax,ecx,edx,ebx;
279.41 -+ unsigned long esp;
279.42 -+ unsigned long ebp;
279.43 -+ unsigned long esi;
279.44 -+ unsigned long edi;
279.45 -+ unsigned short es, __esh;
279.46 -+ unsigned short cs, __csh;
279.47 -+ unsigned short ss, __ssh;
279.48 -+ unsigned short ds, __dsh;
279.49 -+ unsigned short fs, __fsh;
279.50 -+ unsigned short gs, __gsh;
279.51 -+ unsigned short ldt, __ldth;
279.52 -+ unsigned short trace, io_bitmap_base;
279.53 -+ /*
279.54 -+ * The extra 1 is there because the CPU will access an
279.55 -+ * additional byte beyond the end of the IO permission
279.56 -+ * bitmap. The extra byte must be all 1 bits, and must
279.57 -+ * be within the limit.
279.58 -+ */
279.59 -+ unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
279.60 -+ /*
279.61 -+ * pads the TSS to be cacheline-aligned (size is 0x100)
279.62 -+ */
279.63 -+ unsigned long __cacheline_filler[37];
279.64 -+ /*
279.65 -+ * .. and then another 0x100 bytes for emergency kernel stack
279.66 -+ */
279.67 -+ unsigned long stack[64];
279.68 -+} __attribute__((packed));
279.69 -+
279.70 -+#define ARCH_MIN_TASKALIGN 16
279.71 -+
279.72 -+/*
279.73 - * capabilities of CPUs
279.74 - */
279.75 -
279.76 -@@ -296,15 +348,6 @@
279.77 - */
279.78 - #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3))
279.79 -
279.80 --/*
279.81 -- * Size of io_bitmap.
279.82 -- */
279.83 --#define IO_BITMAP_BITS 65536
279.84 --#define IO_BITMAP_BYTES (IO_BITMAP_BITS/8)
279.85 --#define IO_BITMAP_LONGS (IO_BITMAP_BYTES/sizeof(long))
279.86 --#define IO_BITMAP_OFFSET offsetof(struct tss_struct,io_bitmap)
279.87 --#define INVALID_IO_BITMAP_OFFSET 0x8000
279.88 --
279.89 - struct i387_fsave_struct {
279.90 - long cwd;
279.91 - long swd;
279.92 -@@ -356,49 +399,6 @@
279.93 - typedef struct {
279.94 - unsigned long seg;
279.95 - } mm_segment_t;
279.96 --
279.97 --struct tss_struct {
279.98 -- unsigned short back_link,__blh;
279.99 -- unsigned long esp0;
279.100 -- unsigned short ss0,__ss0h;
279.101 -- unsigned long esp1;
279.102 -- unsigned short ss1,__ss1h; /* ss1 is used to cache MSR_IA32_SYSENTER_CS */
279.103 -- unsigned long esp2;
279.104 -- unsigned short ss2,__ss2h;
279.105 -- unsigned long __cr3;
279.106 -- unsigned long eip;
279.107 -- unsigned long eflags;
279.108 -- unsigned long eax,ecx,edx,ebx;
279.109 -- unsigned long esp;
279.110 -- unsigned long ebp;
279.111 -- unsigned long esi;
279.112 -- unsigned long edi;
279.113 -- unsigned short es, __esh;
279.114 -- unsigned short cs, __csh;
279.115 -- unsigned short ss, __ssh;
279.116 -- unsigned short ds, __dsh;
279.117 -- unsigned short fs, __fsh;
279.118 -- unsigned short gs, __gsh;
279.119 -- unsigned short ldt, __ldth;
279.120 -- unsigned short trace, io_bitmap_base;
279.121 -- /*
279.122 -- * The extra 1 is there because the CPU will access an
279.123 -- * additional byte beyond the end of the IO permission
279.124 -- * bitmap. The extra byte must be all 1 bits, and must
279.125 -- * be within the limit.
279.126 -- */
279.127 -- unsigned long io_bitmap[IO_BITMAP_LONGS + 1];
279.128 -- /*
279.129 -- * pads the TSS to be cacheline-aligned (size is 0x100)
279.130 -- */
279.131 -- unsigned long __cacheline_filler[37];
279.132 -- /*
279.133 -- * .. and then another 0x100 bytes for emergency kernel stack
279.134 -- */
279.135 -- unsigned long stack[64];
279.136 --} __attribute__((packed));
279.137 --
279.138 --#define ARCH_MIN_TASKALIGN 16
279.139 -
279.140 - struct thread_struct {
279.141 - /* cached TLS descriptors. */
280.1 --- a/patches/linux/2.6.8/linux-2.6.8-arm-nonofpu.patch Sat Sep 22 17:25:42 2007 +0000
280.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
280.3 @@ -1,50 +0,0 @@
280.4 -http://www.spinics.net/lists/arm/msg08012.html
280.5 -
280.6 -To: Dimitry Andric <dimitry@xxxxxxxxxx>
280.7 -Subject: Re: Kernel Compile Error: use of old and new-style options to set FPU type
280.8 -From: Marc Britten <maillists@xxxxxxxxxxxxxxxxx>
280.9 -Date: Wed, 16 Jun 2004 03:03:15 -0400
280.10 -Cc: linux-arm@xxxxxxxxxxxxxxxxxxxxxx
280.11 -In-reply-to: <1525495613.20040615202902@andric.com>
280.12 -
280.13 -Dimitry Andric wrote:
280.14 -
280.15 ->>Assembler messages:
280.16 ->>Error: use of old and new-style options to set FPU type
280.17 -> Try removing -Wa,-mno-fpu from CFLAGS (and possibly AFLAGS, but I'm
280.18 -> not sure, depends on what your compiler generates by default) in
280.19 -> arch/arm/Makefile.
280.20 -
280.21 -Just to let people know, this was successful.
280.22 -
280.23 -Thanks,
280.24 -
280.25 -Marc Britten
280.26 -
280.27 ---------
280.28 -
280.29 -Fixes error
280.30 -
280.31 -...
280.32 -make -f scripts/Makefile.build obj=scripts/mod
280.33 - /opt/crosstool/arm-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.3/bin/arm-unknown-linux-gnu-gcc -Wp,-MD,scripts/mod/.empty.o.d -nostdinc -iwithprefix include -D__KERNEL__ -Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mlittle-endian -mapcs-32 -malignment-traps -msoft-float -Wa,-mno-fpu -Uarm -Os -Wdeclaration-after-statement -DKBUILD_BASENAME=empty -DKBUILD_MODNAME=empty -c -o scripts/mod/empty.o scripts/mod/empty.c
280.34 -Assembler messages:
280.35 -Error: use of old and new-style options to set FPU type
280.36 -make[2]: *** [scripts/mod/empty.o] Error 1
280.37 -make[1]: *** [scripts/mod] Error 2
280.38 -make: *** [scripts] Error 2
280.39 -
280.40 -
280.41 ---- linux-2.6.8/arch/arm/Makefile.old 2004-09-01 21:27:07.000000000 -0700
280.42 -+++ linux-2.6.8/arch/arm/Makefile 2004-09-01 21:27:31.000000000 -0700
280.43 -@@ -55,8 +55,8 @@
280.44 - tune-$(CONFIG_CPU_V6) :=-mtune=strongarm
280.45 -
280.46 - # Need -Uarm for gcc < 3.x
280.47 --CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Wa,-mno-fpu -Uarm
280.48 --AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
280.49 -+CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
280.50 -+AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
280.51 -
280.52 - CHECK := $(CHECK) -D__arm__=1
280.53 -
281.1 --- a/patches/linux/2.6.8/linux-2.6.8-build_on_case_insensitive_fs.patch Sat Sep 22 17:25:42 2007 +0000
281.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
281.3 @@ -1,725 +0,0 @@
281.4 -Submitted By: Martin Schaffner <schaffner@gmx.li>
281.5 -Date: 2004-06-19
281.6 -Initial Package Version: 2.6.7
281.7 -Upstream Status: Not submitted
281.8 -Origin: Martin Schaffner
281.9 -Description: Enables build on case-insensitive file systems
281.10 -URL: xxxhttp://mirror.vtx.ch/lfs/patches/downloads/linux/linux-2.6.7-build_on_case_insensitive_fs-1.patch
281.11 ---- Rediffed against 2.6.8 by dank@kegel.com
281.12 ---- plus a few missing hunks added to fix sparc32 build
281.13 -
281.14 ---- linux-2.6.8/Makefile.orig 2004-08-13 22:37:25.000000000 -0700
281.15 -+++ linux-2.6.8/Makefile 2004-09-01 21:39:39.000000000 -0700
281.16 -@@ -540,7 +540,7 @@
281.17 -
281.18 - do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2)
281.19 -
281.20 --LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s
281.21 -+LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.asm
281.22 -
281.23 - # Generate section listing all symbols and add it into vmlinux
281.24 - # It's a three stage process:
281.25 -@@ -584,13 +584,13 @@
281.26 - .tmp_kallsyms%.S: .tmp_vmlinux%
281.27 - $(call cmd,kallsyms)
281.28 -
281.29 --.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
281.30 -+.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
281.31 - $(call if_changed_rule,vmlinux__)
281.32 -
281.33 --.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
281.34 -+.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
281.35 - $(call if_changed_rule,vmlinux__)
281.36 -
281.37 --.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
281.38 -+.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
281.39 - $(call if_changed_rule,vmlinux__)
281.40 -
281.41 - endif
281.42 -@@ -603,13 +603,13 @@
281.43 - $(rule_verify_kallsyms)
281.44 - endef
281.45 -
281.46 --vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
281.47 -+vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.asm FORCE
281.48 - $(call if_changed_rule,vmlinux)
281.49 -
281.50 - # The actual objects are generated when descending,
281.51 - # make sure no implicit rule kicks in
281.52 -
281.53 --$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ;
281.54 -+$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.asm: $(vmlinux-dirs) ;
281.55 -
281.56 - # Handle descending into subdirectories listed in $(vmlinux-dirs)
281.57 - # Preset locale variables to speed up the build process. Limit locale
281.58 -@@ -672,7 +672,7 @@
281.59 - # Single targets
281.60 - # ---------------------------------------------------------------------------
281.61 -
281.62 --%.s: %.c scripts FORCE
281.63 -+%.asm: %.c scripts FORCE
281.64 - $(Q)$(MAKE) $(build)=$(@D) $@
281.65 - %.i: %.c scripts FORCE
281.66 - $(Q)$(MAKE) $(build)=$(@D) $@
281.67 -@@ -682,7 +682,7 @@
281.68 - $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D)
281.69 - %.lst: %.c scripts FORCE
281.70 - $(Q)$(MAKE) $(build)=$(@D) $@
281.71 --%.s: %.S scripts FORCE
281.72 -+%.asm: %.S scripts FORCE
281.73 - $(Q)$(MAKE) $(build)=$(@D) $@
281.74 - %.o: %.S scripts FORCE
281.75 - $(Q)$(MAKE) $(build)=$(@D) $@
281.76 -diff -ur linux-2.6.7/arch/alpha/Makefile linux-2.6.7-mod/arch/alpha/Makefile
281.77 ---- linux-2.6.7/arch/alpha/Makefile Fri Jun 18 22:51:03 2004
281.78 -+++ linux-2.6.7-mod/arch/alpha/Makefile Sat Jun 19 12:46:32 2004
281.79 -@@ -114,10 +114,10 @@
281.80 -
281.81 - prepare: include/asm-$(ARCH)/asm_offsets.h
281.82 -
281.83 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.84 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.85 - include/config/MARKER
281.86 -
281.87 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.88 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.89 - $(call filechk,gen-asm-offsets)
281.90 -
281.91 - archclean:
281.92 -diff -ur linux-2.6.7/arch/alpha/kernel/Makefile linux-2.6.7-mod/arch/alpha/kernel/Makefile
281.93 ---- linux-2.6.7/arch/alpha/kernel/Makefile Mon May 10 04:32:29 2004
281.94 -+++ linux-2.6.7-mod/arch/alpha/kernel/Makefile Sat Jun 19 12:46:48 2004
281.95 -@@ -2,7 +2,7 @@
281.96 - # Makefile for the linux kernel.
281.97 - #
281.98 -
281.99 --extra-y := head.o vmlinux.lds.s
281.100 -+extra-y := head.o vmlinux.lds.asm
281.101 - EXTRA_AFLAGS := $(CFLAGS)
281.102 - EXTRA_CFLAGS := -Werror -Wno-sign-compare
281.103 -
281.104 ---- linux-2.6.8/arch/arm/Makefile.orig 2004-08-13 22:36:56.000000000 -0700
281.105 -+++ linux-2.6.8/arch/arm/Makefile 2004-09-01 21:40:21.000000000 -0700
281.106 -@@ -176,10 +176,10 @@
281.107 - bp:; $(Q)$(MAKE) $(build)=$(boot) $(boot)/bootpImage
281.108 - i zi:; $(Q)$(MAKE) $(build)=$(boot) $@
281.109 -
281.110 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.111 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.112 - include/asm-arm/.arch
281.113 -
281.114 --include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.s
281.115 -+include/asm-$(ARCH)/constants.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.116 - $(call filechk,gen-asm-offsets)
281.117 -
281.118 - define archhelp
281.119 -diff -ur linux-2.6.7/arch/arm/kernel/Makefile linux-2.6.7-mod/arch/arm/kernel/Makefile
281.120 ---- linux-2.6.7/arch/arm/kernel/Makefile Mon May 10 04:33:19 2004
281.121 -+++ linux-2.6.7-mod/arch/arm/kernel/Makefile Sat Jun 19 12:47:25 2004
281.122 -@@ -27,7 +27,7 @@
281.123 - head-y := head.o
281.124 - obj-$(CONFIG_DEBUG_LL) += debug.o
281.125 -
281.126 --extra-y := $(head-y) init_task.o vmlinux.lds.s
281.127 -+extra-y := $(head-y) init_task.o vmlinux.lds.asm
281.128 -
281.129 - # Spell out some dependencies that aren't automatically figured out
281.130 - $(obj)/entry-armv.o: $(obj)/entry-header.S include/asm-arm/constants.h
281.131 -diff -ur linux-2.6.7/arch/arm26/Makefile linux-2.6.7-mod/arch/arm26/Makefile
281.132 ---- linux-2.6.7/arch/arm26/Makefile Mon May 10 04:32:28 2004
281.133 -+++ linux-2.6.7-mod/arch/arm26/Makefile Sat Jun 19 12:48:24 2004
281.134 -@@ -101,10 +101,10 @@
281.135 - fi; \
281.136 - )
281.137 -
281.138 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.139 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.140 - include/config/MARKER
281.141 -
281.142 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.143 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.144 - $(call filechk,gen-asm-offsets)
281.145 -
281.146 - define archhelp
281.147 -diff -ur linux-2.6.7/arch/arm26/kernel/Makefile linux-2.6.7-mod/arch/arm26/kernel/Makefile
281.148 ---- linux-2.6.7/arch/arm26/kernel/Makefile Mon May 10 04:32:29 2004
281.149 -+++ linux-2.6.7-mod/arch/arm26/kernel/Makefile Sat Jun 19 12:48:30 2004
281.150 -@@ -14,5 +14,5 @@
281.151 - obj-$(CONFIG_FIQ) += fiq.o
281.152 - obj-$(CONFIG_MODULES) += armksyms.o
281.153 -
281.154 --extra-y := init_task.o vmlinux.lds.s
281.155 -+extra-y := init_task.o vmlinux.lds.asm
281.156 -
281.157 -diff -ur linux-2.6.7/arch/cris/Makefile linux-2.6.7-mod/arch/cris/Makefile
281.158 ---- linux-2.6.7/arch/cris/Makefile Fri Jun 18 22:51:07 2004
281.159 -+++ linux-2.6.7-mod/arch/cris/Makefile Sat Jun 19 12:48:47 2004
281.160 -@@ -107,8 +107,8 @@
281.161 - @ln -sf $(SARCH) include/asm-$(ARCH)/arch
281.162 - @touch $@
281.163 -
281.164 --arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.165 -+arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.166 - include/config/MARKER
281.167 -
281.168 --include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.s
281.169 -+include/asm-$(ARCH)/$(SARCH)/offset.h: arch/$(ARCH)/$(SARCH)/kernel/asm-offsets.asm
281.170 - $(call filechk,gen-asm-offsets)
281.171 -diff -ur linux-2.6.7/arch/cris/kernel/Makefile linux-2.6.7-mod/arch/cris/kernel/Makefile
281.172 ---- linux-2.6.7/arch/cris/kernel/Makefile Fri Jun 18 22:51:09 2004
281.173 -+++ linux-2.6.7-mod/arch/cris/kernel/Makefile Sat Jun 19 12:48:53 2004
281.174 -@@ -3,7 +3,7 @@
281.175 - # Makefile for the linux kernel.
281.176 - #
281.177 -
281.178 --extra-y := vmlinux.lds.s
281.179 -+extra-y := vmlinux.lds.asm
281.180 -
281.181 - obj-y := process.o traps.o irq.o ptrace.o setup.o \
281.182 - time.o sys_cris.o semaphore.o
281.183 -diff -ur linux-2.6.7/arch/h8300/Makefile linux-2.6.7-mod/arch/h8300/Makefile
281.184 ---- linux-2.6.7/arch/h8300/Makefile Fri Jun 18 22:51:09 2004
281.185 -+++ linux-2.6.7-mod/arch/h8300/Makefile Sat Jun 19 12:49:12 2004
281.186 -@@ -64,7 +64,7 @@
281.187 -
281.188 - prepare: include/asm-$(ARCH)/asm-offsets.h
281.189 -
281.190 --include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
281.191 -+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
281.192 - include/asm include/linux/version.h
281.193 - $(call filechk,gen-asm-offsets)
281.194 -
281.195 -diff -ur linux-2.6.7/arch/h8300/kernel/Makefile linux-2.6.7-mod/arch/h8300/kernel/Makefile
281.196 ---- linux-2.6.7/arch/h8300/kernel/Makefile Fri Jun 18 22:51:09 2004
281.197 -+++ linux-2.6.7-mod/arch/h8300/kernel/Makefile Sat Jun 19 12:49:32 2004
281.198 -@@ -2,7 +2,7 @@
281.199 - # Makefile for the linux kernel.
281.200 - #
281.201 -
281.202 --extra-y := vmlinux.lds.s
281.203 -+extra-y := vmlinux.lds.asm
281.204 -
281.205 - obj-y := process.o traps.o ptrace.o ints.o \
281.206 - sys_h8300.o time.o semaphore.o signal.o \
281.207 -diff -ur linux-2.6.7/arch/i386/Makefile linux-2.6.7-mod/arch/i386/Makefile
281.208 ---- linux-2.6.7/arch/i386/Makefile Fri Jun 18 22:51:10 2004
281.209 -+++ linux-2.6.7-mod/arch/i386/Makefile Sat Jun 19 12:49:43 2004
281.210 -@@ -141,10 +141,10 @@
281.211 - prepare: include/asm-$(ARCH)/asm_offsets.h
281.212 - CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h
281.213 -
281.214 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.215 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.216 - include/config/MARKER
281.217 -
281.218 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.219 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.220 - $(call filechk,gen-asm-offsets)
281.221 -
281.222 - archclean:
281.223 -diff -ur linux-2.6.7/arch/i386/kernel/Makefile linux-2.6.7-mod/arch/i386/kernel/Makefile
281.224 ---- linux-2.6.7/arch/i386/kernel/Makefile Mon May 10 04:32:02 2004
281.225 -+++ linux-2.6.7-mod/arch/i386/kernel/Makefile Sat Jun 19 12:49:54 2004
281.226 -@@ -2,7 +2,7 @@
281.227 - # Makefile for the linux kernel.
281.228 - #
281.229 -
281.230 --extra-y := head.o init_task.o vmlinux.lds.s
281.231 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.232 -
281.233 - obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \
281.234 - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_i386.o \
281.235 -diff -ur linux-2.6.7/arch/ia64/Makefile linux-2.6.7-mod/arch/ia64/Makefile
281.236 ---- linux-2.6.7/arch/ia64/Makefile Mon May 10 04:31:59 2004
281.237 -+++ linux-2.6.7-mod/arch/ia64/Makefile Sat Jun 19 12:50:12 2004
281.238 -@@ -88,12 +88,12 @@
281.239 -
281.240 - prepare: include/asm-ia64/offsets.h
281.241 -
281.242 --arch/ia64/kernel/asm-offsets.s: include/asm include/linux/version.h include/config/MARKER
281.243 -+arch/ia64/kernel/asm-offsets.asm: include/asm include/linux/version.h include/config/MARKER
281.244 -
281.245 --include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.s
281.246 -+include/asm-ia64/offsets.h: arch/ia64/kernel/asm-offsets.asm
281.247 - $(call filechk,gen-asm-offsets)
281.248 -
281.249 --arch/ia64/kernel/asm-offsets.s: include/asm-ia64/.offsets.h.stamp
281.250 -+arch/ia64/kernel/asm-offsets.asm: include/asm-ia64/.offsets.h.stamp
281.251 -
281.252 - include/asm-ia64/.offsets.h.stamp:
281.253 - mkdir -p include/asm-ia64
281.254 -diff -ur linux-2.6.7/arch/ia64/kernel/Makefile linux-2.6.7-mod/arch/ia64/kernel/Makefile
281.255 ---- linux-2.6.7/arch/ia64/kernel/Makefile Fri Jun 18 22:51:13 2004
281.256 -+++ linux-2.6.7-mod/arch/ia64/kernel/Makefile Sat Jun 19 12:52:14 2004
281.257 -@@ -2,7 +2,7 @@
281.258 - # Makefile for the linux kernel.
281.259 - #
281.260 -
281.261 --extra-y := head.o init_task.o vmlinux.lds.s
281.262 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.263 -
281.264 - obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \
281.265 - irq_lsapic.o ivt.o machvec.o pal.o patch.o process.o perfmon.o ptrace.o sal.o \
281.266 -@@ -21,7 +21,7 @@
281.267 - # The gate DSO image is built using a special linker script.
281.268 - targets += gate.so gate-syms.o
281.269 -
281.270 --extra-y += gate.so gate-syms.o gate.lds.s gate.o
281.271 -+extra-y += gate.so gate-syms.o gate.lds.asm gate.o
281.272 -
281.273 - # fp_emulate() expects f2-f5,f16-f31 to contain the user-level state.
281.274 - CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
281.275 -@@ -32,14 +32,14 @@
281.276 - cmd_gate = $(CC) -nostdlib $(GATECFLAGS_$(@F)) -Wl,-T,$(filter-out FORCE,$^) -o $@
281.277 -
281.278 - GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1
281.279 --$(obj)/gate.so: $(obj)/gate.lds.s $(obj)/gate.o FORCE
281.280 -+$(obj)/gate.so: $(obj)/gate.lds.asm $(obj)/gate.o FORCE
281.281 - $(call if_changed,gate)
281.282 -
281.283 - $(obj)/built-in.o: $(obj)/gate-syms.o
281.284 - $(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o
281.285 -
281.286 - GATECFLAGS_gate-syms.o = -r
281.287 --$(obj)/gate-syms.o: $(src)/gate.lds.s $(obj)/gate.o FORCE
281.288 -+$(obj)/gate-syms.o: $(src)/gate.lds.asm $(obj)/gate.o FORCE
281.289 - $(call if_changed,gate)
281.290 -
281.291 - # gate-data.o contains the gate DSO image as data in section .data.gate.
281.292 -diff -ur linux-2.6.7/arch/m68k/Makefile linux-2.6.7-mod/arch/m68k/Makefile
281.293 ---- linux-2.6.7/arch/m68k/Makefile Fri Jun 18 22:51:14 2004
281.294 -+++ linux-2.6.7-mod/arch/m68k/Makefile Sat Jun 19 12:52:30 2004
281.295 -@@ -114,10 +114,10 @@
281.296 - prepare: include/asm-$(ARCH)/offsets.h
281.297 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h
281.298 -
281.299 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.300 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.301 - include/config/MARKER
281.302 -
281.303 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.304 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.305 - $(call filechk,gen-asm-offsets)
281.306 -
281.307 - archclean:
281.308 -diff -ur linux-2.6.7/arch/m68k/kernel/Makefile linux-2.6.7-mod/arch/m68k/kernel/Makefile
281.309 ---- linux-2.6.7/arch/m68k/kernel/Makefile Mon May 10 04:33:10 2004
281.310 -+++ linux-2.6.7-mod/arch/m68k/kernel/Makefile Sat Jun 19 12:52:35 2004
281.311 -@@ -7,7 +7,7 @@
281.312 - else
281.313 - extra-y := sun3-head.o
281.314 - endif
281.315 --extra-y += vmlinux.lds.s
281.316 -+extra-y += vmlinux.lds.asm
281.317 -
281.318 - obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
281.319 - sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
281.320 -diff -ur linux-2.6.7/arch/m68knommu/Makefile linux-2.6.7-mod/arch/m68knommu/Makefile
281.321 ---- linux-2.6.7/arch/m68knommu/Makefile Mon May 10 04:32:54 2004
281.322 -+++ linux-2.6.7-mod/arch/m68knommu/Makefile Sat Jun 19 12:52:57 2004
281.323 -@@ -89,7 +89,7 @@
281.324 - head-y := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
281.325 -
281.326 - CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h \
281.327 -- arch/$(ARCH)/kernel/asm-offsets.s
281.328 -+ arch/$(ARCH)/kernel/asm-offsets.asm
281.329 -
281.330 - core-y += arch/m68knommu/kernel/ \
281.331 - arch/m68knommu/mm/ \
281.332 -@@ -102,7 +102,7 @@
281.333 - archclean:
281.334 - $(call descend arch/$(ARCH)/boot, subdirclean)
281.335 -
281.336 --include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
281.337 -+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
281.338 - include/asm include/linux/version.h \
281.339 - include/config/MARKER
281.340 - $(call filechk,gen-asm-offsets)
281.341 -diff -ur linux-2.6.7/arch/m68knommu/kernel/Makefile linux-2.6.7-mod/arch/m68knommu/kernel/Makefile
281.342 ---- linux-2.6.7/arch/m68knommu/kernel/Makefile Mon May 10 04:32:26 2004
281.343 -+++ linux-2.6.7-mod/arch/m68knommu/kernel/Makefile Sat Jun 19 12:53:20 2004
281.344 -@@ -2,7 +2,7 @@
281.345 - # Makefile for arch/m68knommu/kernel.
281.346 - #
281.347 -
281.348 --extra-y := vmlinux.lds.s
281.349 -+extra-y := vmlinux.lds.asm
281.350 -
281.351 - obj-y += dma.o entry.o init_task.o m68k_ksyms.o process.o ptrace.o semaphore.o \
281.352 - setup.o signal.o syscalltable.o sys_m68k.o time.o traps.o
281.353 -diff -ur linux-2.6.7/arch/mips/Makefile linux-2.6.7-mod/arch/mips/Makefile
281.354 ---- linux-2.6.7/arch/mips/Makefile Fri Jun 18 22:51:19 2004
281.355 -+++ linux-2.6.7-mod/arch/mips/Makefile Sat Jun 19 12:53:35 2004
281.356 -@@ -752,12 +752,12 @@
281.357 - prepare: include/asm-$(ARCH)/offset.h \
281.358 - include/asm-$(ARCH)/reg.h
281.359 -
281.360 --arch/$(ARCH)/kernel/offset.s: include/asm include/linux/version.h \
281.361 -+arch/$(ARCH)/kernel/offset.asm: include/asm include/linux/version.h \
281.362 - include/config/MARKER
281.363 -
281.364 --include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.s
281.365 -+include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/offset.asm
281.366 - $(call filechk,gen-asm-offset.h)
281.367 --include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.s
281.368 -+include/asm-$(ARCH)/reg.h: arch/$(ARCH)/kernel/reg.asm
281.369 - $(call filechk,gen-asm-reg.h)
281.370 -
281.371 - CLEAN_FILES += include/asm-$(ARCH)/offset.h.tmp \
281.372 -diff -ur linux-2.6.7/arch/mips/kernel/Makefile linux-2.6.7-mod/arch/mips/kernel/Makefile
281.373 ---- linux-2.6.7/arch/mips/kernel/Makefile Mon May 10 04:32:28 2004
281.374 -+++ linux-2.6.7-mod/arch/mips/kernel/Makefile Sat Jun 19 12:53:41 2004
281.375 -@@ -2,7 +2,7 @@
281.376 - # Makefile for the Linux/MIPS kernel.
281.377 - #
281.378 -
281.379 --extra-y := head.o init_task.o vmlinux.lds.s
281.380 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.381 -
281.382 - obj-y += cpu-probe.o branch.o entry.o genex.o irq.o process.o \
281.383 - ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
281.384 -diff -ur linux-2.6.7/arch/parisc/Makefile linux-2.6.7-mod/arch/parisc/Makefile
281.385 ---- linux-2.6.7/arch/parisc/Makefile Fri Jun 18 22:51:21 2004
281.386 -+++ linux-2.6.7-mod/arch/parisc/Makefile Sat Jun 19 12:53:47 2004
281.387 -@@ -88,10 +88,10 @@
281.388 -
281.389 - prepare: include/asm-parisc/offsets.h
281.390 -
281.391 --arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.392 -+arch/parisc/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.393 - include/config/MARKER
281.394 -
281.395 --include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
281.396 -+include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.asm
281.397 - $(call filechk,gen-asm-offsets)
281.398 -
281.399 - CLEAN_FILES += lifimage include/asm-parisc/offsets.h
281.400 -diff -ur linux-2.6.7/arch/parisc/kernel/Makefile linux-2.6.7-mod/arch/parisc/kernel/Makefile
281.401 ---- linux-2.6.7/arch/parisc/kernel/Makefile Fri Jun 18 22:51:21 2004
281.402 -+++ linux-2.6.7-mod/arch/parisc/kernel/Makefile Sat Jun 19 12:53:53 2004
281.403 -@@ -4,7 +4,7 @@
281.404 -
281.405 - head-y := head.o
281.406 - head-$(CONFIG_PARISC64) := head64.o
281.407 --extra-y := init_task.o $(head-y) vmlinux.lds.s
281.408 -+extra-y := init_task.o $(head-y) vmlinux.lds.asm
281.409 -
281.410 - AFLAGS_entry.o := -traditional
281.411 - AFLAGS_pacache.o := -traditional
281.412 -diff -ur linux-2.6.7/arch/ppc/Makefile linux-2.6.7-mod/arch/ppc/Makefile
281.413 ---- linux-2.6.7/arch/ppc/Makefile Fri Jun 18 22:51:22 2004
281.414 -+++ linux-2.6.7-mod/arch/ppc/Makefile Sat Jun 19 12:54:09 2004
281.415 -@@ -78,10 +78,10 @@
281.416 -
281.417 - prepare: include/asm-$(ARCH)/offsets.h checkbin
281.418 -
281.419 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.420 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.421 - include/config/MARKER
281.422 -
281.423 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.424 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.425 - $(call filechk,gen-asm-offsets)
281.426 -
281.427 - ifdef CONFIG_6xx
281.428 -@@ -104,4 +104,4 @@
281.429 - endif
281.430 -
281.431 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h \
281.432 -- arch/$(ARCH)/kernel/asm-offsets.s
281.433 -+ arch/$(ARCH)/kernel/asm-offsets.asm
281.434 -diff -ur linux-2.6.7/arch/ppc/kernel/Makefile linux-2.6.7-mod/arch/ppc/kernel/Makefile
281.435 ---- linux-2.6.7/arch/ppc/kernel/Makefile Fri Jun 18 22:51:24 2004
281.436 -+++ linux-2.6.7-mod/arch/ppc/kernel/Makefile Sat Jun 19 12:43:10 2004
281.437 -@@ -15,7 +15,7 @@
281.438 - extra-$(CONFIG_8xx) := head_8xx.o
281.439 - extra-$(CONFIG_6xx) += idle_6xx.o
281.440 - extra-$(CONFIG_POWER4) += idle_power4.o
281.441 --extra-y += vmlinux.lds.s
281.442 -+extra-y += vmlinux.lds.asm
281.443 -
281.444 - obj-y := entry.o traps.o irq.o idle.o time.o misc.o \
281.445 - process.o signal.o ptrace.o align.o \
281.446 -diff -ur linux-2.6.7/arch/ppc64/Makefile linux-2.6.7-mod/arch/ppc64/Makefile
281.447 ---- linux-2.6.7/arch/ppc64/Makefile Fri Jun 18 22:51:26 2004
281.448 -+++ linux-2.6.7-mod/arch/ppc64/Makefile Sat Jun 19 12:54:32 2004
281.449 -@@ -67,10 +67,10 @@
281.450 -
281.451 - prepare: include/asm-ppc64/offsets.h
281.452 -
281.453 --arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.454 -+arch/ppc64/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.455 - include/config/MARKER
281.456 -
281.457 --include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
281.458 -+include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.asm
281.459 - $(call filechk,gen-asm-offsets)
281.460 -
281.461 - define archhelp
281.462 -diff -ur linux-2.6.7/arch/ppc64/kernel/Makefile linux-2.6.7-mod/arch/ppc64/kernel/Makefile
281.463 ---- linux-2.6.7/arch/ppc64/kernel/Makefile Mon May 10 04:33:20 2004
281.464 -+++ linux-2.6.7-mod/arch/ppc64/kernel/Makefile Sat Jun 19 12:54:39 2004
281.465 -@@ -3,7 +3,7 @@
281.466 - #
281.467 -
281.468 - EXTRA_CFLAGS += -mno-minimal-toc
281.469 --extra-y := head.o vmlinux.lds.s
281.470 -+extra-y := head.o vmlinux.lds.asm
281.471 -
281.472 - obj-y := setup.o entry.o traps.o irq.o idle.o dma.o \
281.473 - time.o process.o signal.o syscalls.o misc.o ptrace.o \
281.474 -diff -ur linux-2.6.7/arch/s390/Makefile linux-2.6.7-mod/arch/s390/Makefile
281.475 ---- linux-2.6.7/arch/s390/Makefile Mon May 10 04:32:02 2004
281.476 -+++ linux-2.6.7-mod/arch/s390/Makefile Sat Jun 19 12:54:46 2004
281.477 -@@ -68,10 +68,10 @@
281.478 -
281.479 - prepare: include/asm-$(ARCH)/offsets.h
281.480 -
281.481 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.482 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.483 - include/config/MARKER
281.484 -
281.485 --include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.486 -+include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.487 - $(call filechk,gen-asm-offsets)
281.488 -
281.489 - CLEAN_FILES += include/asm-$(ARCH)/offsets.h
281.490 -diff -ur linux-2.6.7/arch/s390/kernel/Makefile linux-2.6.7-mod/arch/s390/kernel/Makefile
281.491 ---- linux-2.6.7/arch/s390/kernel/Makefile Mon May 10 04:33:20 2004
281.492 -+++ linux-2.6.7-mod/arch/s390/kernel/Makefile Sat Jun 19 12:54:52 2004
281.493 -@@ -10,7 +10,7 @@
281.494 -
281.495 - extra-$(CONFIG_ARCH_S390_31) += head.o
281.496 - extra-$(CONFIG_ARCH_S390X) += head64.o
281.497 --extra-y += init_task.o vmlinux.lds.s
281.498 -+extra-y += init_task.o vmlinux.lds.asm
281.499 -
281.500 - obj-$(CONFIG_MODULES) += s390_ksyms.o module.o
281.501 - obj-$(CONFIG_SMP) += smp.o
281.502 -diff -ur linux-2.6.7/arch/sh/kernel/Makefile linux-2.6.7-mod/arch/sh/kernel/Makefile
281.503 ---- linux-2.6.7/arch/sh/kernel/Makefile Mon May 10 04:32:39 2004
281.504 -+++ linux-2.6.7-mod/arch/sh/kernel/Makefile Sat Jun 19 12:55:33 2004
281.505 -@@ -2,7 +2,7 @@
281.506 - # Makefile for the Linux/SuperH kernel.
281.507 - #
281.508 -
281.509 --extra-y := head.o init_task.o vmlinux.lds.s
281.510 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.511 -
281.512 - obj-y := process.o signal.o entry.o traps.o irq.o \
281.513 - ptrace.o setup.o time.o sys_sh.o semaphore.o \
281.514 -diff -ur linux-2.6.7/arch/sparc/Makefile linux-2.6.7-mod/arch/sparc/Makefile
281.515 ---- linux-2.6.7/arch/sparc/Makefile Fri Jun 18 22:51:29 2004
281.516 -+++ linux-2.6.7-mod/arch/sparc/Makefile Sat Jun 19 12:55:48 2004
281.517 -@@ -61,14 +61,14 @@
281.518 -
281.519 - prepare: include/asm-$(ARCH)/asm_offsets.h
281.520 -
281.521 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.522 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.523 - include/config/MARKER
281.524 -
281.525 --include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
281.526 -+include/asm-$(ARCH)/asm_offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.527 - $(call filechk,gen-asm-offsets)
281.528 -
281.529 - CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h \
281.530 -- arch/$(ARCH)/kernel/asm-offsets.s \
281.531 -+ arch/$(ARCH)/kernel/asm-offsets.asm \
281.532 - arch/$(ARCH)/boot/System.map
281.533 -
281.534 - # Don't use tabs in echo arguments.
281.535 -diff -ur linux-2.6.7/arch/sparc/kernel/Makefile linux-2.6.7-mod/arch/sparc/kernel/Makefile
281.536 ---- linux-2.6.7/arch/sparc/kernel/Makefile Mon May 10 04:33:13 2004
281.537 -+++ linux-2.6.7-mod/arch/sparc/kernel/Makefile Sat Jun 19 12:55:52 2004
281.538 -@@ -2,7 +2,7 @@
281.539 - # Makefile for the linux kernel.
281.540 - #
281.541 -
281.542 --extra-y := head.o init_task.o vmlinux.lds.s
281.543 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.544 -
281.545 - EXTRA_AFLAGS := -ansi
281.546 -
281.547 -diff -ur linux-2.6.7/arch/sparc64/kernel/Makefile linux-2.6.7-mod/arch/sparc64/kernel/Makefile
281.548 ---- linux-2.6.7/arch/sparc64/kernel/Makefile Mon May 10 04:32:02 2004
281.549 -+++ linux-2.6.7-mod/arch/sparc64/kernel/Makefile Sat Jun 19 12:56:24 2004
281.550 -@@ -5,7 +5,7 @@
281.551 - EXTRA_AFLAGS := -ansi
281.552 - EXTRA_CFLAGS := -Werror
281.553 -
281.554 --extra-y := head.o init_task.o vmlinux.lds.s
281.555 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.556 -
281.557 - obj-y := process.o setup.o cpu.o idprom.o \
281.558 - traps.o devices.o auxio.o \
281.559 -diff -ur linux-2.6.7/arch/um/Makefile linux-2.6.7-mod/arch/um/Makefile
281.560 ---- linux-2.6.7/arch/um/Makefile Mon May 10 04:32:52 2004
281.561 -+++ linux-2.6.7-mod/arch/um/Makefile Sat Jun 19 12:57:07 2004
281.562 -@@ -77,7 +77,7 @@
281.563 - # CONFIG_MODE_SKAS + CONFIG_STATIC_LINK case.
281.564 -
281.565 - LINK_TT = -static
281.566 --LD_SCRIPT_TT := uml.lds.s
281.567 -+LD_SCRIPT_TT := uml.lds.asm
281.568 -
281.569 - ifeq ($(CONFIG_STATIC_LINK),y)
281.570 - LINK-y += $(LINK_TT)
281.571 -@@ -103,11 +103,11 @@
281.572 - -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
281.573 - -DKERNEL_STACK_SIZE=$(STACK_SIZE)
281.574 -
281.575 --AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
281.576 -+AFLAGS_$(LD_SCRIPT-y:.asm=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
281.577 -
281.578 - LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
281.579 -
281.580 --$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
281.581 -+$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.asm=.S) scripts FORCE
281.582 - $(call if_changed_dep,as_s_S)
281.583 -
281.584 - linux: vmlinux $(LD_SCRIPT-y)
281.585 -@@ -122,8 +122,8 @@
281.586 - # To get a definition of F_SETSIG
281.587 - USER_CFLAGS += -D_GNU_SOURCE
281.588 -
281.589 --CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
281.590 -- $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
281.591 -+CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.asm \
281.592 -+ $(ARCH_DIR)/dyn_link.ld.asm $(GEN_HEADERS)
281.593 -
281.594 - $(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
281.595 - $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
281.596 -diff -ur linux-2.6.7/arch/um/kernel/Makefile linux-2.6.7-mod/arch/um/kernel/Makefile
281.597 ---- linux-2.6.7/arch/um/kernel/Makefile Mon May 10 04:32:53 2004
281.598 -+++ linux-2.6.7-mod/arch/um/kernel/Makefile Sat Jun 19 12:57:15 2004
281.599 -@@ -3,7 +3,7 @@
281.600 - # Licensed under the GPL
281.601 - #
281.602 -
281.603 --extra-y := vmlinux.lds.s
281.604 -+extra-y := vmlinux.lds.asm
281.605 -
281.606 - obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
281.607 - helper.o init_task.o irq.o irq_user.o ksyms.o mem.o mem_user.o \
281.608 -diff -ur linux-2.6.7/arch/v850/Makefile linux-2.6.7-mod/arch/v850/Makefile
281.609 ---- linux-2.6.7/arch/v850/Makefile Mon May 10 04:33:21 2004
281.610 -+++ linux-2.6.7-mod/arch/v850/Makefile Sat Jun 19 12:57:59 2004
281.611 -@@ -52,12 +52,12 @@
281.612 - prepare: include/asm-$(ARCH)/asm-consts.h
281.613 -
281.614 - # Generate constants from C code for use by asm files
281.615 --arch/$(ARCH)/kernel/asm-consts.s: include/asm include/linux/version.h \
281.616 -+arch/$(ARCH)/kernel/asm-consts.asm: include/asm include/linux/version.h \
281.617 - include/config/MARKER
281.618 -
281.619 --include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.s
281.620 -+include/asm-$(ARCH)/asm-consts.h: arch/$(ARCH)/kernel/asm-consts.asm
281.621 - $(call filechk,gen-asm-offsets)
281.622 -
281.623 - CLEAN_FILES += include/asm-$(ARCH)/asm-consts.h \
281.624 -- arch/$(ARCH)/kernel/asm-consts.s \
281.625 -+ arch/$(ARCH)/kernel/asm-consts.asm \
281.626 - root_fs_image.o
281.627 -diff -ur linux-2.6.7/arch/v850/kernel/Makefile linux-2.6.7-mod/arch/v850/kernel/Makefile
281.628 ---- linux-2.6.7/arch/v850/kernel/Makefile Mon May 10 04:33:21 2004
281.629 -+++ linux-2.6.7-mod/arch/v850/kernel/Makefile Sat Jun 19 12:58:04 2004
281.630 -@@ -9,7 +9,7 @@
281.631 - # for more details.
281.632 - #
281.633 -
281.634 --extra-y := head.o init_task.o vmlinux.lds.s
281.635 -+extra-y := head.o init_task.o vmlinux.lds.asm
281.636 -
281.637 - obj-y += intv.o entry.o process.o syscalls.o time.o semaphore.o setup.o \
281.638 - signal.o irq.o mach.o ptrace.o bug.o
281.639 -diff -ur linux-2.6.7/arch/x86_64/Makefile linux-2.6.7-mod/arch/x86_64/Makefile
281.640 ---- linux-2.6.7/arch/x86_64/Makefile Mon May 10 04:33:19 2004
281.641 -+++ linux-2.6.7-mod/arch/x86_64/Makefile Sat Jun 19 12:58:10 2004
281.642 -@@ -93,10 +93,10 @@
281.643 -
281.644 - prepare: include/asm-$(ARCH)/offset.h
281.645 -
281.646 --arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
281.647 -+arch/$(ARCH)/kernel/asm-offsets.asm: include/asm include/linux/version.h \
281.648 - include/config/MARKER
281.649 -
281.650 --include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.s
281.651 -+include/asm-$(ARCH)/offset.h: arch/$(ARCH)/kernel/asm-offsets.asm
281.652 - $(call filechk,gen-asm-offsets)
281.653 -
281.654 - CLEAN_FILES += include/asm-$(ARCH)/offset.h
281.655 -diff -ur linux-2.6.7/arch/x86_64/kernel/Makefile linux-2.6.7-mod/arch/x86_64/kernel/Makefile
281.656 ---- linux-2.6.7/arch/x86_64/kernel/Makefile Fri Jun 18 22:51:32 2004
281.657 -+++ linux-2.6.7-mod/arch/x86_64/kernel/Makefile Sat Jun 19 12:58:17 2004
281.658 -@@ -2,7 +2,7 @@
281.659 - # Makefile for the linux kernel.
281.660 - #
281.661 -
281.662 --extra-y := head.o head64.o init_task.o vmlinux.lds.s
281.663 -+extra-y := head.o head64.o init_task.o vmlinux.lds.asm
281.664 - EXTRA_AFLAGS := -traditional
281.665 - obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \
281.666 - ptrace.o i8259.o ioport.o ldt.o setup.o time.o sys_x86_64.o \
281.667 -diff -ur linux-2.6.7/scripts/Makefile.build linux-2.6.7-mod/scripts/Makefile.build
281.668 ---- linux-2.6.7/scripts/Makefile.build Mon May 10 04:33:13 2004
281.669 -+++ linux-2.6.7-mod/scripts/Makefile.build Sat Jun 19 12:43:10 2004
281.670 -@@ -110,7 +110,7 @@
281.671 - quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
281.672 - cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $<
281.673 -
281.674 --%.s: %.c FORCE
281.675 -+%.asm: %.c FORCE
281.676 - $(call if_changed_dep,cc_s_c)
281.677 -
281.678 - quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@
281.679 -@@ -197,7 +197,7 @@
281.680 - quiet_cmd_as_s_S = CPP $(quiet_modtag) $@
281.681 - cmd_as_s_S = $(CPP) $(a_flags) -o $@ $<
281.682 -
281.683 --%.s: %.S FORCE
281.684 -+%.asm: %.S FORCE
281.685 - $(call if_changed_dep,as_s_S)
281.686 -
281.687 - quiet_cmd_as_o_S = AS $(quiet_modtag) $@
281.688 ---- linux-2.6.8/arch/sparc/boot/Makefile.old 2004-09-21 21:46:18.000000000 -0700
281.689 -+++ linux-2.6.8/arch/sparc/boot/Makefile 2004-09-21 21:52:35.000000000 -0700
281.690 -@@ -19,7 +19,7 @@
281.691 -
281.692 - BTOBJS := $(HEAD_Y) $(INIT_Y)
281.693 - BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
281.694 --LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
281.695 -+LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.asm $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
281.696 -
281.697 - # Actual linking
281.698 - $(obj)/image: $(obj)/btfix.o FORCE
281.699 ---- linux-2.6.8/arch/sh64/Makefile.old 2004-09-21 21:46:18.000000000 -0700
281.700 -+++ linux-2.6.8/arch/sh64/Makefile 2004-09-21 21:54:31.000000000 -0700
281.701 -@@ -71,7 +71,7 @@
281.702 -
281.703 - prepare: include/asm-$(ARCH)/asm-offsets.h arch/$(ARCH)/lib/syscalltab.h
281.704 -
281.705 --include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
281.706 -+include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.asm \
281.707 - include/asm include/linux/version.h
281.708 - $(call filechk,gen-asm-offsets)
281.709 -
281.710 ---- linux-2.6.8/arch/sh64/boot/compressed/Makefile.old 2004-09-21 21:46:18.000000000 -0700
281.711 -+++ linux-2.6.8/arch/sh64/boot/compressed/Makefile 2004-09-21 21:54:41.000000000 -0700
281.712 -@@ -25,7 +25,7 @@
281.713 - ZIMAGE_OFFSET = $(shell printf "0x%8x" $$[$(CONFIG_MEMORY_START)+0x400000+0x10000])
281.714 -
281.715 - LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \
281.716 -- -T $(obj)/../../kernel/vmlinux.lds.s \
281.717 -+ -T $(obj)/../../kernel/vmlinux.lds.asm \
281.718 - --no-warn-mismatch
281.719 -
281.720 - $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE
281.721 -@@ -41,6 +41,6 @@
281.722 - LDFLAGS_piggy.o := -r --format binary --oformat elf32-sh64-linux -T
281.723 - OBJCOPYFLAGS += -R .empty_zero_page
281.724 -
281.725 --$(obj)/piggy.o: $(obj)/vmlinux.lds.s $(obj)/vmlinux.bin.gz FORCE
281.726 -+$(obj)/piggy.o: $(obj)/vmlinux.lds.asm $(obj)/vmlinux.bin.gz FORCE
281.727 - $(call if_changed,ld)
281.728 -
282.1 --- a/patches/linux/2.6.8/linux-2.6.8-m68k-kludge.patch Sat Sep 22 17:25:42 2007 +0000
282.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
282.3 @@ -1,285 +0,0 @@
282.4 -[ This patch not accepted into kernel for now - it touches the core too much -
282.5 - but it's ok for crosstool since we just want to check whether toolchain is ok,
282.6 - I think. I had to rediff the sched.h changes with -U5 to get them to
282.7 - apply properly -- patch got confused with just three lines of context?! -dank ]
282.8 -
282.9 -Date: Sun, 5 Sep 2004 12:41:08 +0200 (CEST)
282.10 -From: Geert Uytterhoeven <geert@linux-m68k.org>
282.11 -Sender: geert@linux-m68k.org
282.12 -To: Dan Kegel <dank@kegel.com>
282.13 -cc: Roman Zippel <zippel@linux-m68k.org>,
282.14 - Matthias Urlichs <smurf@smurf.noris.de>,
282.15 - Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
282.16 - Linux/m68k <linux-m68k@lists.linux-m68k.org>
282.17 -Subject: Re: Getting kernel.org kernel to build for m68k?
282.18 -In-Reply-To: <Pine.GSO.4.58.0409011029390.15681@waterleaf.sonytel.be>
282.19 -Message-ID: <Pine.LNX.4.58.0409051224020.30282@anakin>
282.20 -
282.21 -On Wed, 1 Sep 2004, Geert Uytterhoeven wrote:
282.22 -> On Tue, 31 Aug 2004, Dan Kegel wrote:
282.23 -> > I noticed today that Linus's m68k kernel can't be built (at least with gcc-3.4.1).
282.24 -> >
282.25 -> > The first problem I ran into,
282.26 -> > CC arch/m68k/kernel/asm-offsets.s
282.27 -> > In file included from include/linux/spinlock.h:12,
282.28 -> > from include/linux/capability.h:45,
282.29 -> > from include/linux/sched.h:7,
282.30 -> > from arch/m68k/kernel/asm-offsets.c:12:
282.31 -> > include/linux/thread_info.h:30: error: parse error before '{' token
282.32 -> > is solved already in the m68k tree.
282.33 -> > (In particular,
282.34 -> > the #ifndef __HAVE_THREAD_FUNCTIONS ... #endif in
282.35 -> > http://linux-m68k-cvs.apia.dhs.org/c/cvsweb/linux/include/linux/thread_info.h?rev=1.5;content-type=text%2Fplain
282.36 -> > probably solves it.)
282.37 -> > There are other problems after that.
282.38 ->
282.39 -> Roman Zippel changed the threading stuff on m68k. Since it would affect other
282.40 -> architectures, I never submitted it on my own.
282.41 ->
282.42 -> In short, we never really compile this code, since the m68k tree doesn't use it
282.43 -> anymore. And yes, it even fails with older compiler versions, like 2.95.2.
282.44 -
282.45 -The second part doesn't seem to be true: the code is used. And it does compile
282.46 -after applying the fixes below, even with gcc 3.4.1.
282.47 -
282.48 -> > Any chance you could spend a bit of time sending Linus enough
282.49 -> > patches for his kernel to build for m68k, if not run?
282.50 ->
282.51 -> I'll make sure a plain kernel.org kernel can build an m68k kernel.
282.52 -
282.53 -The patch below makes the plain kernel.org 2.6.8.1 compile for m68k,
282.54 -using gcc 2.95.2 or 3.3.3 (3.4.1 needs a few more changes in random
282.55 -places). The resulting kernel (I booted the gcc 2.95.2 case) works fine on my
282.56 -Amiga.
282.57 -
282.58 -It's more or less the patch created by Matthias Urlichs last year, so
282.59 -the credits are his:
282.60 -
282.61 -| This change implements a reasonable compromise between the task_info->flags
282.62 -| variable in other ports, which is too much work in the syscall path on m68k,
282.63 -| and moving the whole structure to thread_struct, which is way too intrusive
282.64 -| on other ports.
282.65 -
282.66 -The patch does affect generic code a bit, but the collateral damage is
282.67 -kept to a minimum.
282.68 -
282.69 -We can still keep Roman's thread info abstractions[*] in Linux/m68k CVS, but
282.70 -I'd really like the plain kernel.org kernel to be in a working state as well.
282.71 -That way more people may do cross-compile tests for m68k.
282.72 -
282.73 -Hence if no one objects, I'll submit the patch to Andrew and Linus.
282.74 -
282.75 -All comments are welcome!
282.76 -
282.77 ---- linux-2.6.8.1/arch/m68k/kernel/asm-offsets.c 2004-04-28 15:48:59.000000000 +0200
282.78 -+++ linux-m68k-2.6.8.1/arch/m68k/kernel/asm-offsets.c 2004-09-05 12:04:00.000000000 +0200
282.79 -@@ -31,6 +31,7 @@ int main(void)
282.80 - DEFINE(TASK_SIGPENDING, offsetof(struct task_struct, thread.work.sigpending));
282.81 - DEFINE(TASK_NOTIFY_RESUME, offsetof(struct task_struct, thread.work.notify_resume));
282.82 - DEFINE(TASK_THREAD, offsetof(struct task_struct, thread));
282.83 -+ DEFINE(TASK_TINFO, offsetof(struct task_struct, thread_info));
282.84 - DEFINE(TASK_MM, offsetof(struct task_struct, mm));
282.85 - DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
282.86 -
282.87 -@@ -45,6 +46,9 @@ int main(void)
282.88 - DEFINE(THREAD_FPCNTL, offsetof(struct thread_struct, fpcntl));
282.89 - DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));
282.90 -
282.91 -+ /* offsets into the thread_info struct */
282.92 -+ DEFINE(TINFO_PREEMPT, offsetof(struct thread_info, preempt_count));
282.93 -+
282.94 - /* offsets into the pt_regs */
282.95 - DEFINE(PT_D0, offsetof(struct pt_regs, d0));
282.96 - DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0));
282.97 ---- linux-2.6.8.1/arch/m68k/kernel/entry.S 2004-05-24 11:13:22.000000000 +0200
282.98 -+++ linux-m68k-2.6.8.1/arch/m68k/kernel/entry.S 2004-09-02 20:13:12.000000000 +0200
282.99 -@@ -134,13 +134,13 @@ ENTRY(system_call)
282.100 -
282.101 - syscall_exit_work:
282.102 - btst #5,%sp@(PT_SR) | check if returning to kernel
282.103 -- bnes 1b | if so, skip resched, signals
282.104 -+ bnes 1b | if so, skip everything
282.105 - tstw %d0
282.106 -- jeq do_signal_return
282.107 -+ jeq do_signal_return | jump if only sig_pending or notify_resume
282.108 - tstb %d0
282.109 -- jne do_delayed_trace
282.110 -+ jne do_delayed_trace | jump if delayed_trace
282.111 -
282.112 -- pea resume_userspace
282.113 -+ pea resume_userspace | need_resched is set
282.114 - jmp schedule
282.115 -
282.116 - ret_from_exception:
282.117 -@@ -223,10 +223,14 @@ ENTRY(nmi_handler)
282.118 - */
282.119 - inthandler:
282.120 - SAVE_ALL_INT
282.121 -- GET_CURRENT(%d0)
282.122 -- addqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
282.123 -- | put exception # in d0
282.124 -- bfextu %sp@(PT_VECTOR){#4,#10},%d0
282.125 -+ /* GET_CURRENT(%d0) */
282.126 -+ movel %sp,%d0
282.127 -+ andw #-THREAD_SIZE,%d0
282.128 -+ movel %d0,%a1
282.129 -+ addqb #1,%a1@(TINFO_PREEMPT+2)
282.130 -+ movel %a1@,%curptr
282.131 -+
282.132 -+ bfextu %sp@(PT_VECTOR){#4,#10},%d0 | put exception # in d0
282.133 -
282.134 - movel %sp,%sp@-
282.135 - movel %d0,%sp@- | put vector # on stack
282.136 -@@ -243,7 +247,8 @@ inthandler:
282.137 - 3: addql #8,%sp | pop parameters off stack
282.138 -
282.139 - ret_from_interrupt:
282.140 -- subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+2)
282.141 -+ movel %curptr@(TASK_TINFO),%a1
282.142 -+ subqb #1,%a1@(TINFO_PREEMPT+2)
282.143 - jeq 1f
282.144 - 2:
282.145 - RESTORE_ALL
282.146 ---- linux-2.6.8.1/include/asm-m68k/processor.h 2004-04-28 15:49:03.000000000 +0200
282.147 -+++ linux-m68k-2.6.8.1/include/asm-m68k/processor.h 2004-09-02 20:29:32.000000000 +0200
282.148 -@@ -84,7 +84,6 @@ struct thread_struct {
282.149 - ksp: sizeof(init_stack) + (unsigned long) init_stack, \
282.150 - sr: PS_S, \
282.151 - fs: __KERNEL_DS, \
282.152 -- info: INIT_THREAD_INFO(init_task) \
282.153 - }
282.154 -
282.155 - /*
282.156 ---- linux-2.6.8.1/include/asm-m68k/thread_info.h 2004-05-24 11:13:53.000000000 +0200
282.157 -+++ linux-m68k-2.6.8.1/include/asm-m68k/thread_info.h 2004-09-05 12:19:47.000000000 +0200
282.158 -@@ -6,7 +6,7 @@
282.159 - #include <asm/page.h>
282.160 -
282.161 - struct thread_info {
282.162 -- struct task_struct *task; /* main task structure */
282.163 -+ struct task_struct *task; /* main task structure, must be first! */
282.164 - struct exec_domain *exec_domain; /* execution domain */
282.165 - __s32 preempt_count; /* 0 => preemptable, <0 => BUG */
282.166 - __u32 cpu; /* should always be 0 on m68k */
282.167 -@@ -21,7 +21,8 @@ struct thread_info {
282.168 - { \
282.169 - .task = &tsk, \
282.170 - .exec_domain = &default_exec_domain, \
282.171 -- .restart_block = { \
282.172 -+ .preempt_count = 1, \
282.173 -+ .restart_block = { \
282.174 - .fn = do_no_restart_syscall, \
282.175 - }, \
282.176 - }
282.177 -@@ -35,10 +36,11 @@ struct thread_info {
282.178 - #define free_thread_info(ti) free_pages((unsigned long)(ti),1)
282.179 - #endif /* PAGE_SHIFT == 13 */
282.180 -
282.181 --//#define init_thread_info (init_task.thread.info)
282.182 -+#define init_thread_info (init_thread_union.thread_info)
282.183 - #define init_stack (init_thread_union.stack)
282.184 -
282.185 --#define current_thread_info() (current->thread_info)
282.186 -+register __u32 current_thread_info_reg asm("sp");
282.187 -+#define current_thread_info() ((struct thread_info *)(current_thread_info_reg & ~0x1fff))
282.188 -
282.189 -
282.190 - #define __HAVE_THREAD_FUNCTIONS
282.191 -@@ -91,8 +93,12 @@ extern int thread_flag_fixme(void);
282.192 - })
282.193 -
282.194 - #define __get_set_tsk_thread_flag(tsk, flag, val) ({ \
282.195 -- int __res = __get_tsk_thread_flag(tsk, flag); \
282.196 -+ int __res; \
282.197 -+ unsigned long __flags; \
282.198 -+ local_irq_save(__flags); \
282.199 -+ __res = __get_tsk_thread_flag(tsk, flag); \
282.200 - __set_tsk_thread_flag(tsk, flag, val); \
282.201 -+ local_irq_restore(__flags); \
282.202 - __res; \
282.203 - })
282.204 -
282.205 -@@ -105,7 +111,4 @@ extern int thread_flag_fixme(void);
282.206 - #define clear_thread_flag(flag) clear_tsk_thread_flag(current, flag)
282.207 - #define test_thread_flag(flag) test_tsk_thread_flag(current, flag)
282.208 -
282.209 --#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
282.210 --#define clear_need_resched() clear_thread_flag(TIF_NEED_RESCHED)
282.211 --
282.212 - #endif /* _ASM_M68K_THREAD_INFO_H */
282.213 ---- linux-2.6.8/include/linux/sched.h.old 2004-09-13 21:48:58.000000000 -0700
282.214 -+++ linux-2.6.8/include/linux/sched.h 2004-09-13 21:50:26.000000000 -0700
282.215 -@@ -975,10 +975,11 @@
282.216 - task_unlock(task);
282.217 -
282.218 - return mm;
282.219 - }
282.220 -
282.221 -+#ifndef __HAVE_THREAD_FUNCTIONS
282.222 -
282.223 - /* set thread flags in other task's structures
282.224 - * - see asm/thread_info.h for TIF_xxxx flags available
282.225 - */
282.226 - static inline void set_tsk_thread_flag(struct task_struct *tsk, int flag)
282.227 -@@ -1004,10 +1005,12 @@
282.228 - static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
282.229 - {
282.230 - return test_ti_thread_flag(tsk->thread_info,flag);
282.231 - }
282.232 -
282.233 -+#endif /* __HAVE_THREAD_FUNCTIONS */
282.234 -+
282.235 - static inline void set_tsk_need_resched(struct task_struct *tsk)
282.236 - {
282.237 - set_tsk_thread_flag(tsk,TIF_NEED_RESCHED);
282.238 - }
282.239 -
282.240 ---- linux-2.6.8.1/include/linux/thread_info.h 2004-04-27 20:42:22.000000000 +0200
282.241 -+++ linux-m68k-2.6.8.1/include/linux/thread_info.h 2004-09-04 21:24:36.000000000 +0200
282.242 -@@ -21,6 +21,7 @@ extern long do_no_restart_syscall(struct
282.243 - #include <asm/thread_info.h>
282.244 -
282.245 - #ifdef __KERNEL__
282.246 -+#ifndef __HAVE_THREAD_FUNCTIONS
282.247 -
282.248 - /*
282.249 - * flag set/clear/test wrappers
282.250 -@@ -77,16 +78,11 @@ static inline int test_ti_thread_flag(st
282.251 - return test_bit(flag,&ti->flags);
282.252 - }
282.253 -
282.254 --static inline void set_need_resched(void)
282.255 --{
282.256 -- set_thread_flag(TIF_NEED_RESCHED);
282.257 --}
282.258 -+#endif /* __HAVE_THREAD_FUNCTIONS */
282.259 -
282.260 --static inline void clear_need_resched(void)
282.261 --{
282.262 -- clear_thread_flag(TIF_NEED_RESCHED);
282.263 --}
282.264 -+#define set_need_resched() set_thread_flag(TIF_NEED_RESCHED)
282.265 -+#define clear_need_resched(void) clear_thread_flag(TIF_NEED_RESCHED)
282.266 -
282.267 --#endif
282.268 -+#endif /* __KERNEL__ */
282.269 -
282.270 - #endif /* _LINUX_THREAD_INFO_H */
282.271 -
282.272 -Gr{oetje,eeting}s,
282.273 -
282.274 - Geert
282.275 -
282.276 -[*] For reference:
282.277 -
282.278 - http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-2.6.x-merging/POSTPONED/156-thread_info.diff
282.279 -
282.280 ---
282.281 -Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
282.282 -
282.283 -In personal conversations with technical people, I call myself a hacker. But
282.284 -when I'm talking to journalists I just say "programmer" or something like that.
282.285 - -- Linus Torvalds
282.286 -
282.287 -
282.288 -
283.1 --- a/patches/linux/2.6.8/linux-2.6.8-noshared-kconfig.patch Sat Sep 22 17:25:42 2007 +0000
283.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
283.3 @@ -1,28 +0,0 @@
283.4 -Lets you run 'make oldconfig' and 'make menuconfig' on systems
283.5 -where shared libraries aren't easy. (There's no harm in using the
283.6 -static version of libkconfig.)
283.7 -Idea mentioned by Bertrand Marquis, but this patch is a bit simpler than his.
283.8 -
283.9 -
283.10 ---- linux-2.6.8.1/scripts/kconfig/Makefile.old 2004-09-09 20:30:25.000000000 -0700
283.11 -+++ linux-2.6.8.1/scripts/kconfig/Makefile 2004-09-09 20:47:51.000000000 -0700
283.12 -@@ -68,8 +68,8 @@
283.13 - libkconfig-objs := zconf.tab.o
283.14 -
283.15 - host-progs := conf mconf qconf gconf
283.16 --conf-objs := conf.o libkconfig.so
283.17 --mconf-objs := mconf.o libkconfig.so
283.18 -+conf-objs := conf.o $(libkconfig-objs)
283.19 -+mconf-objs := mconf.o $(libkconfig-objs)
283.20 -
283.21 - ifeq ($(MAKECMDGOALS),xconfig)
283.22 - qconf-target := 1
283.23 -@@ -88,7 +88,7 @@
283.24 - gconf-objs := gconf.o kconfig_load.o
283.25 - endif
283.26 -
283.27 --clean-files := libkconfig.so lkc_defs.h qconf.moc .tmp_qtcheck \
283.28 -+clean-files := $(libkconfig-objs) lkc_defs.h qconf.moc .tmp_qtcheck \
283.29 - .tmp_gtkcheck zconf.tab.c zconf.tab.h lex.zconf.c
283.30 -
283.31 - # generated files seem to need this to find local include files
284.1 --- a/scripts/crosstool.sh Sat Sep 22 17:25:42 2007 +0000
284.2 +++ b/scripts/crosstool.sh Sun Sep 23 17:08:09 2007 +0000
284.3 @@ -42,22 +42,6 @@
284.4 unset MAKEFLAGS
284.5 export MAKEFLAGS
284.6
284.7 -# Enable known ordering of files in directory listings:
284.8 -CT_Test "crosstool-NG might not work as expected with LANG=\"${LANG}\"" -n "${LANG}"
284.9 -case "${LC_COLLATE},${LC_ALL}" in
284.10 - # These four combinations are known to sort files in the correct order:
284.11 - fr_FR*,) ;;
284.12 - en_US*,) ;;
284.13 - *,fr_FR*) ;;
284.14 - *,en_US*) ;;
284.15 - # Anything else is destined to be borked if not gracefuly handled:
284.16 - *) CT_DoLog WARN "Either LC_COLLATE=\"${LC_COLLATE}\" or LC_ALL=\"${LC_ALL}\" is not supported."
284.17 - export LC_ALL=`locale -a |egrep "^(fr_FR|en_US)" |head -n 1`
284.18 - CT_TestOrAbort "Neither en_US* nor fr_FR* locales found on your system." -n "${LC_ALL}"
284.19 - CT_DoLog WARN "Forcing to known working LC_ALL=\"${LC_ALL}\"."
284.20 - ;;
284.21 -esac
284.22 -
284.23 # Other environment sanity checks
284.24 CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"
284.25 CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"