config: rip-out versions marked as OBSOLETE

This commit is contained in:
Yann E. MORIN" 2009-10-28 18:55:40 +01:00
parent 288173ce56
commit 4fb0c302e0
116 changed files with 0 additions and 27265 deletions
config
patches
binutils
gcc
gdb
uClibc/0.9.28.1

@ -91,16 +91,6 @@ config BINUTILS_V_2_16_1
bool
prompt "2.16.1"
config BINUTILS_V_2_15
bool
prompt "2.15 (OBSOLETE)"
depends on OBSOLETE
config BINUTILS_V_2_14
bool
prompt "2.14 (OBSOLETE)"
depends on OBSOLETE
endchoice
config BINUTILS_VERSION
@ -124,8 +114,6 @@ config BINUTILS_VERSION
default "2.18" if BINUTILS_V_2_18
default "2.17" if BINUTILS_V_2_17
default "2.16.1" if BINUTILS_V_2_16_1
default "2.15" if BINUTILS_V_2_15
default "2.14" if BINUTILS_V_2_14
config BINUTILS_EXTRA_CONFIG
string

@ -83,55 +83,15 @@ config CC_V_4_1_2
bool
prompt "4.1.2"
config CC_V_4_1_1
bool
prompt "4.1.1 (OBSOLETE)"
depends on OBSOLETE
config CC_V_4_1_0
bool
prompt "4.1.0 (OBSOLETE)"
depends on OBSOLETE
config CC_V_4_0_4
bool
prompt "4.0.4"
config CC_V_4_0_3
bool
prompt "4.0.3 (OBSOLETE)"
depends on OBSOLETE
config CC_V_4_0_2
bool
prompt "4.0.2 (OBSOLETE)"
depends on OBSOLETE
config CC_V_4_0_1
bool
prompt "4.0.1 (OBSOLETE)"
depends on OBSOLETE
config CC_V_4_0_0
bool
prompt "4.0.0 (OBSOLETE)"
depends on OBSOLETE
config CC_V_3_4_6
bool
prompt "3.4.6 (OBSOLETE)"
depends on OBSOLETE
config CC_V_3_3_6
bool
prompt "3.3.6 (OBSOLETE)"
depends on OBSOLETE
config CC_V_3_2_3
bool
prompt "3.2.3 (OBSOLETE)"
depends on OBSOLETE
endchoice
config CC_GCC_4_3_or_later
@ -161,16 +121,8 @@ config CC_VERSION
default "4.2.1" if CC_V_4_2_1
default "4.2.0" if CC_V_4_2_0
default "4.1.2" if CC_V_4_1_2
default "4.1.1" if CC_V_4_1_1
default "4.1.0" if CC_V_4_1_0
default "4.0.4" if CC_V_4_0_4
default "4.0.3" if CC_V_4_0_3
default "4.0.2" if CC_V_4_0_2
default "4.0.1" if CC_V_4_0_1
default "4.0.0" if CC_V_4_0_0
default "3.4.6" if CC_V_3_4_6
default "3.3.6" if CC_V_3_3_6
default "3.2.3" if CC_V_3_2_3
config CC_CXA_ATEXIT
bool

@ -13,11 +13,6 @@ config DMALLOC_V_5_5_2
bool
prompt "5.5.2"
config DMALLOC_V_5_4_3
bool
prompt "5.4.3 (OBSOLETE)"
depends on OBSOLETE
endchoice
config DMALLOC_VERSION
@ -25,4 +20,3 @@ config DMALLOC_VERSION
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "5.5.2" if DMALLOC_V_5_5_2
default "5.4.3" if DMALLOC_V_5_4_3

@ -117,16 +117,6 @@ config GDB_V_6_6
bool
prompt "6.6"
config GDB_V_6_5
bool
prompt "6.5 (OBSOLETE)"
depends on OBSOLETE
config GDB_V_6_4
bool
prompt "6.4 (OBSOLETE)"
depends on OBSOLETE
config GDB_V_snapshot
bool
prompt "snapshot (EXPERIMENTAL)"
@ -143,8 +133,6 @@ config GDB_VERSION
default "6.7.1" if GDB_V_6_7_1
default "6.7" if GDB_V_6_7
default "6.6" if GDB_V_6_6
default "6.5" if GDB_V_6_5
default "6.4" if GDB_V_6_4
default "snapshot" if GDB_V_snapshot
if GDB_NATIVE

@ -25,16 +25,6 @@ config STRACE_V_4_5_15
bool
prompt "4.5.15"
config STRACE_V_4_5_14
bool
prompt "4.5.14 (OBSOLETE)"
depends on OBSOLETE
config STRACE_V_4_5
bool
prompt "4.5 (OBSOLETE)"
depends on OBSOLETE
endchoice
config STRACE_VERSION
@ -45,5 +35,3 @@ config STRACE_VERSION
default "4.5.17" if STRACE_V_4_5_17
default "4.5.16" if STRACE_V_4_5_16
default "4.5.15" if STRACE_V_4_5_15
default "4.5.14" if STRACE_V_4_5_14
default "4.5" if STRACE_V_4_5

@ -90,51 +90,6 @@ config KERNEL_V_2_6_27_35
bool
prompt "2.6.27.35 (long-term stable)"
config KERNEL_V_2_6_26_8
bool
prompt "2.6.26.8 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_25_20
bool
prompt "2.6.25.20 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_24_7
bool
prompt "2.6.24.7 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_23_17
bool
prompt "2.6.23.17 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_22_19
bool
prompt "2.6.22.19 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_21_7
bool
prompt "2.6.21.7 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_20_21
bool
prompt "2.6.20.21 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_19_7
bool
prompt "2.6.19.7 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_2_6_18_8
bool
prompt "2.6.18.8 (OBSOLETE)"
depends on OBSOLETE
config KERNEL_V_select
bool
prompt "Other version (EXPERIMENTAL)"
@ -159,18 +114,8 @@ config KERNEL_VERSION
default "2.6.30.1" if KERNEL_V_2_6_30_1
default "2.6.30" if KERNEL_V_2_6_30
default "2.6.29.6" if KERNEL_V_2_6_29_6
default "2.6.29" if KERNEL_V_2_6_29
default "2.6.28.10" if KERNEL_V_2_6_28_10
default "2.6.27.35" if KERNEL_V_2_6_27_35
default "2.6.26.8" if KERNEL_V_2_6_26_8
default "2.6.25.20" if KERNEL_V_2_6_25_20
default "2.6.24.7" if KERNEL_V_2_6_24_7
default "2.6.23.17" if KERNEL_V_2_6_23_17
default "2.6.22.19" if KERNEL_V_2_6_22_19
default "2.6.21.7" if KERNEL_V_2_6_21_7
default "2.6.20.21" if KERNEL_V_2_6_20_21
default "2.6.19.7" if KERNEL_V_2_6_19_7
default "2.6.18.8" if KERNEL_V_2_6_18_8
help
Enter here the kernel version you want to use, if it is
not listed above. Something like V.P.S or V.P.S.E, where:

@ -32,21 +32,6 @@ config LIBC_V_0_9_28_3
bool
prompt "0.9.28.3"
config LIBC_V_0_9_28_2
bool
prompt "0.9.28.2 (OBSOLETE)"
depends on OBSOLETE
config LIBC_V_0_9_28_1
bool
prompt "0.9.28.1 (OBSOLETE)"
depends on OBSOLETE
config LIBC_V_0_9_28
bool
prompt "0.9.28 (OBSOLETE)"
depends on OBSOLETE
config LIBC_V_snapshot
bool
prompt "latest snapshot (EXPERIMENTAL)"
@ -68,9 +53,6 @@ config LIBC_VERSION
default "0.9.30" if LIBC_V_0_9_30
default "0.9.29" if LIBC_V_0_9_29
default "0.9.28.3" if LIBC_V_0_9_28_3
default "0.9.28.2" if LIBC_V_0_9_28_2
default "0.9.28.1" if LIBC_V_0_9_28_1
default "0.9.28" if LIBC_V_0_9_28
default "snapshot" if LIBC_V_snapshot
config LIBC_UCLIBC_0_9_30_or_later

@ -1,38 +0,0 @@
Message-Id: <200307311239.h6VCdNe27056@r-rr.iij4u.or.jp>
To: dank@kegel.com
Cc: kkojima@rr.iij4u.or.jp
Subject: Re: Writing PIC version of __udivsi3_i4? (was: Re: "make tests" fails
with "libc.so: text relocations used" in glibc-2.3.2 for sh4)
In-Reply-To: Your message of "Wed, 30 Jul 2003 21:55:54 -0700"
<3F28A15A.5010400@kegel.com>
References: <3F28A15A.5010400@kegel.com>
Date: Thu, 31 Jul 2003 21:47:38 +0900
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
Dan Kegel <dank@kegel.com> wrote:
>> I'll give binutils-2.14.90.0.5 a shot, then.
>
> No joy - same problem. Guess I'll take this up on binutils and/or libc-alpha.
Please try the patch below, though it's a diff against the current
binutils CVS.
Regards,
kaz
--
diff -u3p ORIG/src/bfd/elf32-sh.c LOCAL/src/bfd/elf32-sh.c
--- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
+++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
@@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
sreloc, 2))
return FALSE;
}
+#if 0
if (sec->flags & SEC_READONLY)
info->flags |= DF_TEXTREL;
+#endif
elf_section_data (sec)->sreloc = sreloc;
}

@ -1,38 +0,0 @@
diff -durN binutils-2.14.orig/gas/config/tc-i386.c binutils-2.14/gas/config/tc-i386.c
--- binutils-2.14.orig/gas/config/tc-i386.c 2003-01-29 11:05:52.000000000 +0100
+++ binutils-2.14/gas/config/tc-i386.c 2008-09-22 08:54:50.000000000 +0200
@@ -189,15 +189,10 @@
const char extra_symbol_chars[] = "*%-([";
#endif
-#if (defined (TE_I386AIX) \
- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
- && !defined (TE_LINUX) \
- && !defined (TE_FreeBSD) \
- && !defined (TE_NetBSD)))
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. */
-const char comment_chars[] = "#/";
-#define PREFIX_SEPARATOR '\\'
+const char comment_chars[] = "#";
+#define PREFIX_SEPARATOR '/'
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
@@ -207,16 +202,7 @@
#NO_APP at the beginning of its output.
Also note that comments started like this one will always work if
'/' isn't otherwise defined. */
-const char line_comment_chars[] = "#";
-
-#else
-/* Putting '/' here makes it impossible to use the divide operator.
- However, we need it for compatibility with SVR4 systems. */
-const char comment_chars[] = "#";
-#define PREFIX_SEPARATOR '/'
-
const char line_comment_chars[] = "/#";
-#endif
const char line_separator_chars[] = ";";

@ -1,38 +0,0 @@
diff -durN binutils-2.15.orig/gas/config/tc-i386.c binutils-2.15/gas/config/tc-i386.c
--- binutils-2.15.orig/gas/config/tc-i386.c 2004-05-17 21:36:09.000000000 +0200
+++ binutils-2.15/gas/config/tc-i386.c 2008-09-22 08:57:14.000000000 +0200
@@ -185,15 +185,10 @@
const char extra_symbol_chars[] = "*%-([";
#endif
-#if (defined (TE_I386AIX) \
- || ((defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) \
- && !defined (TE_LINUX) \
- && !defined (TE_FreeBSD) \
- && !defined (TE_NetBSD)))
/* This array holds the chars that always start a comment. If the
pre-processor is disabled, these aren't very useful. */
-const char comment_chars[] = "#/";
-#define PREFIX_SEPARATOR '\\'
+const char comment_chars[] = "#";
+#define PREFIX_SEPARATOR '/'
/* This array holds the chars that only start a comment at the beginning of
a line. If the line seems to have the form '# 123 filename'
@@ -203,16 +198,7 @@
#NO_APP at the beginning of its output.
Also note that comments started like this one will always work if
'/' isn't otherwise defined. */
-const char line_comment_chars[] = "#";
-
-#else
-/* Putting '/' here makes it impossible to use the divide operator.
- However, we need it for compatibility with SVR4 systems. */
-const char comment_chars[] = "#";
-#define PREFIX_SEPARATOR '/'
-
const char line_comment_chars[] = "/#";
-#endif
const char line_separator_chars[] = ";";

@ -1,144 +0,0 @@
diff -uNr binutils-2.15-pristine/bfd/configure binutils-2.15/bfd/configure
--- binutils-2.15-pristine/bfd/configure 2004-05-17 12:35:57.000000000 -0700
+++ binutils-2.15/bfd/configure 2004-07-19 16:36:19.000000000 -0700
@@ -1009,7 +1009,7 @@
bfd_version_string="\"${VERSION}\""
if test x${is_release} = x; then
bfd_version_date=`sed -n -e 's/.*DATE //p' < ${srcdir}/version.h`
- bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+ bfd_version_string="\"${VERSION} ${bfd_version_date} uClibc\""
fi
diff -uNr binutils-2.15-pristine/bfd/elf32-arm.h binutils-2.15/bfd/elf32-arm.h
--- binutils-2.15-pristine/bfd/elf32-arm.h 2004-05-17 12:35:58.000000000 -0700
+++ binutils-2.15/bfd/elf32-arm.h 2004-07-19 16:37:06.000000000 -0700
@@ -124,7 +124,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
#ifdef FOUR_WORD_PLT
diff -uNr binutils-2.15-pristine/bfd/elf32-cris.c binutils-2.15/bfd/elf32-cris.c
--- binutils-2.15-pristine/bfd/elf32-cris.c 2004-05-17 12:35:58.000000000 -0700
+++ binutils-2.15/bfd/elf32-cris.c 2004-07-19 16:49:59.000000000 -0700
@@ -536,7 +536,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
diff -uNr binutils-2.15-pristine/bfd/elf32-frv.c binutils-2.15/bfd/elf32-frv.c
--- binutils-2.15-pristine/bfd/elf32-frv.c 2004-05-17 12:35:58.000000000 -0700
+++ binutils-2.15/bfd/elf32-frv.c 2004-07-19 16:49:59.000000000 -0700
@@ -2913,7 +2913,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
#define DEFAULT_STACK_SIZE 0x20000
diff -uNr binutils-2.15-pristine/bfd/elf32-hppa.c binutils-2.15/bfd/elf32-hppa.c
--- binutils-2.15-pristine/bfd/elf32-hppa.c 2004-05-17 12:35:58.000000000 -0700
+++ binutils-2.15/bfd/elf32-hppa.c 2004-07-19 16:49:59.000000000 -0700
@@ -115,7 +115,7 @@
#define PLT_ENTRY_SIZE 8
#define GOT_ENTRY_SIZE 4
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
static const bfd_byte plt_stub[] =
{
diff -uNr binutils-2.15-pristine/bfd/elf32-ppc.c binutils-2.15/bfd/elf32-ppc.c
--- binutils-2.15-pristine/bfd/elf32-ppc.c 2004-05-17 12:35:59.000000000 -0700
+++ binutils-2.15/bfd/elf32-ppc.c 2004-07-19 16:49:59.000000000 -0700
@@ -49,7 +49,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
#define PLT_ENTRY_SIZE 12
diff -uNr binutils-2.15-pristine/bfd/elf32-s390.c binutils-2.15/bfd/elf32-s390.c
--- binutils-2.15-pristine/bfd/elf32-s390.c 2004-05-17 12:35:59.000000000 -0700
+++ binutils-2.15/bfd/elf32-s390.c 2004-07-19 16:49:59.000000000 -0700
@@ -452,7 +452,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -uNr binutils-2.15-pristine/bfd/elf32-sparc.c binutils-2.15/bfd/elf32-sparc.c
--- binutils-2.15-pristine/bfd/elf32-sparc.c 2004-05-17 12:36:00.000000000 -0700
+++ binutils-2.15/bfd/elf32-sparc.c 2004-07-19 16:49:59.000000000 -0700
@@ -536,7 +536,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The nop opcode we use. */
diff -uNr binutils-2.15-pristine/bfd/elf64-ppc.c binutils-2.15/bfd/elf64-ppc.c
--- binutils-2.15-pristine/bfd/elf64-ppc.c 2004-05-17 12:36:01.000000000 -0700
+++ binutils-2.15/bfd/elf64-ppc.c 2004-07-19 16:49:59.000000000 -0700
@@ -99,7 +99,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* The size in bytes of an entry in the procedure linkage table. */
#define PLT_ENTRY_SIZE 24
diff -uNr binutils-2.15-pristine/bfd/elf64-s390.c binutils-2.15/bfd/elf64-s390.c
--- binutils-2.15-pristine/bfd/elf64-s390.c 2004-05-17 12:36:01.000000000 -0700
+++ binutils-2.15/bfd/elf64-s390.c 2004-07-19 16:49:59.000000000 -0700
@@ -473,7 +473,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff -uNr binutils-2.15-pristine/bfd/elf-m10300.c binutils-2.15/bfd/elf-m10300.c
--- binutils-2.15-pristine/bfd/elf-m10300.c 2004-05-17 12:35:57.000000000 -0700
+++ binutils-2.15/bfd/elf-m10300.c 2004-07-19 16:49:59.000000000 -0700
@@ -4026,7 +4026,7 @@
/* The name of the dynamic interpreter. This is put in the .interp
section. */
-#define ELF_DYNAMIC_INTERPRETER "/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
/* Create dynamic sections when linking against a dynamic object. */
diff -uNr binutils-2.15-pristine/bfd/elfxx-ia64.c binutils-2.15/bfd/elfxx-ia64.c
--- binutils-2.15-pristine/bfd/elfxx-ia64.c 2004-05-17 12:36:02.000000000 -0700
+++ binutils-2.15/bfd/elfxx-ia64.c 2004-07-19 16:49:59.000000000 -0700
@@ -643,7 +643,7 @@
0x60, 0x00, 0x80, 0x00 /* br.few b6;; */
};
-#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define ELF_DYNAMIC_INTERPRETER "/lib/ld-uClibc.so.0"
static const bfd_byte oor_brl[16] =
{

@ -1,692 +0,0 @@
diff -urN binutils-2.15-dist/bfd/config.bfd binutils-2.15/bfd/config.bfd
--- binutils-2.15-dist/bfd/config.bfd 2004-05-17 14:35:56.000000000 -0500
+++ binutils-2.15/bfd/config.bfd 2004-08-04 12:01:44.000000000 -0500
@@ -126,7 +126,7 @@
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
;;
- alpha*-*-linux-gnu* | alpha*-*-elf*)
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
;;
@@ -136,7 +136,7 @@
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_ia64_little_vec
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
;;
@@ -213,7 +213,7 @@
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- armeb-*-elf | arm*b-*-linux-gnu*)
+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*)
targ_defvec=bfd_elf32_bigarm_vec
targ_selvecs=bfd_elf32_littlearm_vec
;;
@@ -221,7 +221,7 @@
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \
arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
@@ -360,7 +360,7 @@
;;
#ifdef BFD64
- hppa*64*-*-linux-gnu*)
+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*)
targ_defvec=bfd_elf64_hppa_linux_vec
targ_selvecs=bfd_elf64_hppa_vec
;;
@@ -371,7 +371,7 @@
;;
#endif
- hppa*-*-linux-gnu* | hppa*-*-netbsd*)
+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
@@ -494,7 +494,7 @@
targ_selvecs=bfd_elf32_i386_vec
targ_underscore=yes
;;
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
targ64_selvecs=bfd_elf64_x86_64_vec
@@ -508,7 +508,7 @@
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
;;
- x86_64-*-linux-gnu*)
+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
;;
@@ -683,7 +683,7 @@
targ_selvecs=bfd_elf32_m68k_vec
targ_underscore=yes
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68klinux_vec
;;
@@ -955,7 +955,8 @@
;;
#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \
+ powerpc-*-rtems* | \
powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
@@ -987,8 +988,8 @@
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
;;
powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \
- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\
- powerpcle-*-rtems*)
+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\
+ powerpcle-*-vxworks* | powerpcle-*-rtems*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
@@ -1149,7 +1150,7 @@
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
targ_underscore=yes
;;
- sparc-*-linux-gnu*)
+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec"
;;
@@ -1196,7 +1197,7 @@
targ_defvec=sunos_big_vec
targ_underscore=yes
;;
- sparc64-*-linux-gnu*)
+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
;;
@@ -1265,7 +1266,7 @@
targ_underscore=yes
;;
- vax-*-linux-gnu*)
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
targ_defvec=bfd_elf32_vax_vec
;;
diff -urN binutils-2.15-dist/bfd/configure binutils-2.15/bfd/configure
--- binutils-2.15-dist/bfd/configure 2004-05-17 14:35:57.000000000 -0500
+++ binutils-2.15/bfd/configure 2004-08-04 12:01:44.000000000 -0500
@@ -1699,6 +1699,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
@@ -5278,7 +5283,7 @@
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
- alpha*-*-linux-gnu*)
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
@@ -5338,7 +5343,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386mach3.h"'
;;
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
;;
@@ -5376,7 +5381,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/hp300bsd.h"'
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m68klinux.h"'
;;
@@ -5477,7 +5482,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
;;
- vax-*-linux-gnu*)
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxlinux.h"'
;;
diff -urN binutils-2.15-dist/bfd/configure.in binutils-2.15/bfd/configure.in
--- binutils-2.15-dist/bfd/configure.in 2004-05-17 14:35:57.000000000 -0500
+++ binutils-2.15/bfd/configure.in 2004-08-04 12:01:44.000000000 -0500
@@ -178,7 +178,7 @@
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
COREFILE=''
;;
- alpha*-*-linux-gnu*)
+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/alphalinux.h"'
;;
@@ -259,7 +259,7 @@
TRAD_HEADER='"hosts/i386mach3.h"'
;;
changequote(,)dnl
- i[3-7]86-*-linux-gnu*)
+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*)
changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386linux.h"'
@@ -300,7 +300,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/hp300bsd.h"'
;;
- m68*-*-linux-gnu*)
+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/m68klinux.h"'
;;
@@ -385,7 +385,7 @@
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxult2.h"'
;;
- vax-*-linux-gnu*)
+ vax-*-linux-gnu* | vax-*-linux-uclibc*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxlinux.h"'
;;
diff -urN binutils-2.15-dist/binutils/configure binutils-2.15/binutils/configure
--- binutils-2.15-dist/binutils/configure 2004-01-02 11:08:04.000000000 -0600
+++ binutils-2.15/binutils/configure 2004-08-04 12:01:44.000000000 -0500
@@ -1585,6 +1585,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff -urN binutils-2.15-dist/configure binutils-2.15/configure
--- binutils-2.15-dist/configure 2004-05-17 14:36:20.000000000 -0500
+++ binutils-2.15/configure 2004-08-04 12:01:44.000000000 -0500
@@ -1288,6 +1288,18 @@
i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ i[3456789]86-*-linux-uclibc*)
+ # This section makes it possible to build newlib natively on linux.
+ # If we are using a cross compiler then don't configure newlib.
+ if test x${is_cross_compiler} != xno ; then
+ noconfigdirs="$noconfigdirs target-newlib"
+ fi
+ noconfigdirs="$noconfigdirs target-libgloss"
+ # If we are not using a cross compiler, do configure newlib.
+ # Note however, that newlib will only be configured in this situation
+ # if the --with-newlib option has been given, because otherwise
+ # 'target-newlib' will appear in skipdirs.
+ ;;
i[3456789]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
diff -urN binutils-2.15-dist/configure.in binutils-2.15/configure.in
--- binutils-2.15-dist/configure.in 2004-05-17 14:40:54.000000000 -0500
+++ binutils-2.15/configure.in 2004-08-04 12:01:44.000000000 -0500
@@ -521,6 +521,18 @@
i[[3456789]]86-*-freebsd* | i[[3456789]]86-*-kfreebsd*-gnu)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
+ i[[3456789]]86-*-linux-uclibc*)
+ # This section makes it possible to build newlib natively on linux.
+ # If we are using a cross compiler then don't configure newlib.
+ if test x${is_cross_compiler} != xno ; then
+ noconfigdirs="$noconfigdirs target-newlib"
+ fi
+ noconfigdirs="$noconfigdirs target-libgloss"
+ # If we are not using a cross compiler, do configure newlib.
+ # Note however, that newlib will only be configured in this situation
+ # if the --with-newlib option has been given, because otherwise
+ # 'target-newlib' will appear in skipdirs.
+ ;;
i[[3456789]]86-*-linux*)
# The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's
# not build java stuff by default.
diff -urN binutils-2.15-dist/gas/configure binutils-2.15/gas/configure
--- binutils-2.15-dist/gas/configure 2004-05-17 14:36:07.000000000 -0500
+++ binutils-2.15/gas/configure 2004-08-04 12:07:50.000000000 -0500
@@ -3400,6 +3400,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
@@ -4224,6 +4229,7 @@
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
alpha*-*-openbsd*) fmt=elf em=obsd ;;
@@ -4240,6 +4246,7 @@
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
arm*-*-linux-gnu*) fmt=elf em=linux ;;
+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
arm*-*-uclinux*) fmt=elf em=linux ;;
arm-*-netbsdelf*) fmt=elf em=nbsd ;;
arm-*-*n*bsd*) fmt=aout em=nbsd ;;
@@ -4253,6 +4260,7 @@
avr-*-*) fmt=elf ;;
cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
cris-*-*) fmt=multi bfd_gas=yes ;;
d10v-*-*) fmt=elf ;;
@@ -4310,7 +4318,9 @@
i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
x86_64-*-linux-gnu*) fmt=elf em=linux ;;
+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
i386-*-sysv[45]*) fmt=elf ;;
i386-*-solaris*) fmt=elf ;;
@@ -4370,6 +4380,7 @@
ia64-*-elf*) fmt=elf ;;
ia64-*-aix*) fmt=elf em=ia64aix ;;
ia64-*-linux-gnu*) fmt=elf em=linux ;;
+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
ia64-*-hpux*) fmt=elf em=hpux ;;
ia64-*-netbsd*) fmt=elf em=nbsd ;;
@@ -4397,6 +4408,7 @@
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
m68k-*-uclinux*) fmt=elf ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
@@ -4459,6 +4471,7 @@
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
+ ppc-*-linux-uclibc* | \
ppc-*-linux-gnu*) fmt=elf em=linux
case "$endian" in
big) ;;
@@ -4486,7 +4499,9 @@
ppc-*-kaos*) fmt=elf ;;
s390x-*-linux-gnu*) fmt=elf em=linux ;;
+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
s390-*-linux-gnu*) fmt=elf em=linux ;;
+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
sh*-*-linux*) fmt=elf em=linux
case ${cpu} in
@@ -4519,6 +4534,7 @@
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
sparc-*-linux-gnu*) fmt=elf em=linux ;;
+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf) fmt=elf ;;
diff -urN binutils-2.15-dist/gas/configure.in binutils-2.15/gas/configure.in
--- binutils-2.15-dist/gas/configure.in 2004-05-17 14:36:07.000000000 -0500
+++ binutils-2.15/gas/configure.in 2004-08-04 12:07:21.000000000 -0500
@@ -194,6 +194,7 @@
alpha*-*-osf*) fmt=ecoff ;;
alpha*-*-linuxecoff*) fmt=ecoff ;;
alpha*-*-linux-gnu*) fmt=elf em=linux ;;
+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;;
alpha*-*-netbsd*) fmt=elf em=nbsd ;;
alpha*-*-openbsd*) fmt=elf em=obsd ;;
@@ -210,6 +211,7 @@
arm*-*-conix*) fmt=elf ;;
arm-*-linux*aout*) fmt=aout em=linux ;;
arm*-*-linux-gnu*) fmt=elf em=linux ;;
+ arm*-*-linux-uclibc*) fmt=elf em=linux ;;
arm*-*-uclinux*) fmt=elf em=linux ;;
arm-*-netbsdelf*) fmt=elf em=nbsd ;;
arm-*-*n*bsd*) fmt=aout em=nbsd ;;
@@ -223,6 +225,7 @@
avr-*-*) fmt=elf ;;
cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;;
+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;;
cris-*-*) fmt=multi bfd_gas=yes ;;
d10v-*-*) fmt=elf ;;
@@ -280,7 +283,9 @@
i386-*-linux*oldld) fmt=aout em=linux ;;
i386-*-linux*coff*) fmt=coff em=linux ;;
i386-*-linux-gnu*) fmt=elf em=linux ;;
+ i386-*-linux-uclibc*) fmt=elf em=linux ;;
x86_64-*-linux-gnu*) fmt=elf em=linux ;;
+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;;
i386-*-lynxos*) fmt=coff em=lynx ;;
changequote(,)dnl
i386-*-sysv[45]*) fmt=elf ;;
@@ -333,6 +338,7 @@
ia64-*-elf*) fmt=elf ;;
ia64-*-aix*) fmt=elf em=ia64aix ;;
ia64-*-linux-gnu*) fmt=elf em=linux ;;
+ ia64-*-linux-uclibc*) fmt=elf em=linux ;;
ia64-*-hpux*) fmt=elf em=hpux ;;
ia64-*-netbsd*) fmt=elf em=nbsd ;;
@@ -360,6 +366,7 @@
m68k-*-hpux*) fmt=hp300 em=hp300 ;;
m68k-*-linux*aout*) fmt=aout em=linux ;;
m68k-*-linux-gnu*) fmt=elf em=linux ;;
+ m68k-*-linux-uclibc*) fmt=elf em=linux ;;
m68k-*-uclinux*) fmt=elf ;;
m68k-*-gnu*) fmt=elf ;;
m68k-*-lynxos*) fmt=coff em=lynx ;;
@@ -419,6 +426,7 @@
ppc-*-beos*) fmt=coff ;;
ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;;
ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;;
+ ppc-*-linux-uclibc* | \
ppc-*-linux-gnu*) fmt=elf em=linux
case "$endian" in
big) ;;
@@ -439,7 +447,9 @@
ppc-*-kaos*) fmt=elf ;;
s390x-*-linux-gnu*) fmt=elf em=linux ;;
+ s390x-*-linux-uclibc*) fmt=elf em=linux ;;
s390-*-linux-gnu*) fmt=elf em=linux ;;
+ s390-*-linux-uclibc*) fmt=elf em=linux ;;
sh*-*-linux*) fmt=elf em=linux
case ${cpu} in
@@ -472,6 +482,7 @@
sparc-*-coff) fmt=coff ;;
sparc-*-linux*aout*) fmt=aout em=linux ;;
sparc-*-linux-gnu*) fmt=elf em=linux ;;
+ sparc-*-linux-uclibc*) fmt=elf em=linux ;;
sparc-*-lynxos*) fmt=coff em=lynx ;;
sparc-fujitsu-none) fmt=aout ;;
sparc-*-elf) fmt=elf ;;
diff -urN binutils-2.15-dist/gprof/configure binutils-2.15/gprof/configure
--- binutils-2.15-dist/gprof/configure 2003-08-26 12:19:19.000000000 -0500
+++ binutils-2.15/gprof/configure 2004-08-04 12:01:45.000000000 -0500
@@ -1581,6 +1581,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff -urN binutils-2.15-dist/ld/configure binutils-2.15/ld/configure
--- binutils-2.15-dist/ld/configure 2003-04-24 07:36:07.000000000 -0500
+++ binutils-2.15/ld/configure 2004-08-04 12:01:45.000000000 -0500
@@ -1589,6 +1589,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
diff -urN binutils-2.15-dist/ld/configure.tgt binutils-2.15/ld/configure.tgt
--- binutils-2.15-dist/ld/configure.tgt 2004-05-17 14:36:15.000000000 -0500
+++ binutils-2.15/ld/configure.tgt 2004-08-04 12:01:45.000000000 -0500
@@ -30,6 +30,7 @@
targ_extra_emuls="criself crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
cris-*-linux-gnu*) targ_emul=crislinux ;;
+cris-*-linux-uclibc*) targ_emul=crislinux ;;
cris-*-*) targ_emul=criself
targ_extra_emuls="crisaout crislinux"
targ_extra_libpath=$targ_extra_emuls ;;
@@ -59,14 +60,16 @@
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'`
tdir_sun4=sparc-sun-sunos4
;;
-sparc64-*-linux-gnu*) targ_emul=elf64_sparc
+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \
+ targ_emul=elf64_sparc
targ_extra_emuls="elf32_sparc sparclinux sun4"
targ_extra_libpath=elf32_sparc
tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'`
tdir_sparclinux=${tdir_elf32_sparc}aout
tdir_sun4=sparc-sun-sunos4
;;
-sparc*-*-linux-gnu*) targ_emul=elf32_sparc
+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \
+ targ_emul=elf32_sparc
targ_extra_emuls="sparclinux elf64_sparc sun4"
targ_extra_libpath=elf64_sparc
tdir_sparclinux=${targ_alias}aout
@@ -118,7 +121,9 @@
m32r*le-*-elf*) targ_emul=m32rlelf ;;
m32r*-*-elf*) targ_emul=m32relf ;;
m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;;
+m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;;
m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;;
+m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;;
m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf
targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;;
m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf
@@ -128,7 +133,7 @@
m68*-ericsson-ose) targ_emul=sun3 ;;
m68*-apple-aux*) targ_emul=m68kaux ;;
*-tandem-none) targ_emul=st2000 ;;
-i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;;
+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;;
i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;;
i[3-7]86-*-vsta) targ_emul=vsta ;;
i[3-7]86-go32-rtems*) targ_emul=i386go32 ;;
@@ -152,14 +157,16 @@
tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'`
;;
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
-i[3-7]86-*-linux-gnu*) targ_emul=elf_i386
+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \
+ targ_emul=elf_i386
targ_extra_emuls=i386linux
if test x${want64} = xtrue; then
targ_extra_emuls="$targ_extra_emuls elf_x86_64"
fi
tdir_i386linux=${targ_alias}aout
;;
-x86_64-*-linux-gnu*) targ_emul=elf_x86_64
+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \
+ targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
targ_extra_libpath=elf_i386
tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'`
@@ -259,10 +266,13 @@
arm9e-*-elf) targ_emul=armelf ;;
arm-*-oabi) targ_emul=armelf_oabi ;;
arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
arm*-*-conix*) targ_emul=armelf ;;
-thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \
+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
strongarm-*-coff) targ_emul=armcoff ;;
strongarm-*-elf) targ_emul=armelf ;;
strongarm-*-kaos*) targ_emul=armelf ;;
@@ -364,7 +374,8 @@
targ_extra_emuls=m68kelf
tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'`
;;
-m68k-*-linux-gnu*) targ_emul=m68kelf
+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \
+ targ_emul=m68kelf
targ_extra_emuls=m68klinux
tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'`
;;
@@ -381,9 +392,9 @@
m68*-*-psos*) targ_emul=m68kpsos ;;
m68*-*-rtemscoff*) targ_emul=m68kcoff ;;
m68*-*-rtems*) targ_emul=m68kelf ;;
-hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;;
+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;;
hppa*64*-*) targ_emul=elf64hppa ;;
-hppa*-*-linux-gnu*) targ_emul=hppalinux ;;
+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;;
hppa*-*-*elf*) targ_emul=hppaelf ;;
hppa*-*-lites*) targ_emul=hppaelf ;;
hppa*-*-netbsd*) targ_emul=hppanbsd ;;
@@ -396,6 +407,7 @@
targ_emul=vaxnbsd
targ_extra_emuls=elf32vax ;;
vax-*-linux-gnu*) targ_emul=elf32vax ;;
+vax-*-linux-uclibc*) targ_emul=elf32vax ;;
mips*-*-pe) targ_emul=mipspe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
@@ -429,16 +441,16 @@
mips*-*-vxworks*) targ_emul=elf32ebmip
targ_extra_emuls="elf32elmip" ;;
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32
+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
;;
-mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32
+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
;;
-mips*el-*-linux-gnu*) targ_emul=elf32ltsmip
+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
;;
-mips*-*-linux-gnu*) targ_emul=elf32btsmip
+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip
targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
;;
mips*-*-lnews*) targ_emul=mipslnews ;;
@@ -461,6 +473,10 @@
alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha
tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
;;
+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha
+ # The following needs to be checked...
+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'`
+ ;;
alpha*-*-osf*) targ_emul=alpha ;;
alpha*-*-gnu*) targ_emul=elf64alpha ;;
alpha*-*-netware*) targ_emul=alpha ;;
diff -urN binutils-2.15-dist/libtool.m4 binutils-2.15/libtool.m4
--- binutils-2.15-dist/libtool.m4 2003-04-10 22:58:39.000000000 -0500
+++ binutils-2.15/libtool.m4 2004-08-04 12:01:45.000000000 -0500
@@ -645,6 +645,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
diff -urN binutils-2.15-dist/ltconfig binutils-2.15/ltconfig
--- binutils-2.15-dist/ltconfig 2003-10-03 23:54:47.000000000 -0500
+++ binutils-2.15/ltconfig 2004-08-04 12:01:45.000000000 -0500
@@ -603,6 +603,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
linux-gnu*) ;;
+linux-uclibc*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1259,6 +1260,24 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
diff -urN binutils-2.15-dist/opcodes/configure binutils-2.15/opcodes/configure
--- binutils-2.15-dist/opcodes/configure 2003-08-05 04:39:31.000000000 -0500
+++ binutils-2.15/opcodes/configure 2004-08-04 12:01:45.000000000 -0500
@@ -1700,6 +1700,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'

@ -1,32 +0,0 @@
diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am
--- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500
+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600
@@ -55,10 +55,10 @@
MKDOC = chew$(EXEEXT_FOR_BUILD)
$(MKDOC): chew.o
- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h
diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in
--- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500
+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600
@@ -469,10 +469,10 @@
$(MKDOC): chew.o
- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS)
+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS)
chew.o: chew.c
- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c
+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
protos: libbfd.h libcoff.h bfd.h

@ -1,26 +0,0 @@
--- binutils/bfd/elf32-mips.c~
+++ binutils/bfd/elf32-mips.c
@@ -1611,7 +1611,9 @@
/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
page sizes of up to that limit, so we need to respect it. */
-#define ELF_MAXPAGESIZE 0x10000
+/*#define ELF_MAXPAGESIZE 0x10000*/
+/* Use 4K to shrink the elf header. NOT for general use! */
+#define ELF_MAXPAGESIZE 0x1000
#define elf32_bed elf32_tradbed
/* Include the target file again for this target. */
--- binutils/bfd/elfn32-mips.c~
+++ binutils/bfd/elfn32-mips.c
@@ -1976,7 +1976,9 @@
/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
page sizes of up to that limit, so we need to respect it. */
-#define ELF_MAXPAGESIZE 0x10000
+/*#define ELF_MAXPAGESIZE 0x10000*/
+/* Use 4K to shrink the elf header. NOT for general use! */
+#define ELF_MAXPAGESIZE 0x1000
#define elf32_bed elf32_tradbed
/* Include the target file again for this target. */

@ -1,63 +0,0 @@
http://sources.redhat.com/ml/binutils/2004-06/msg00010.html
--- binutils-2.15.90.0.3-old/bfd/elf32-arm.h 2004-04-12 14:56:33.000000000 -0500
+++ binutils-2.15.90.0.3/bfd/elf32-arm.h 2004-09-03 06:56:40.000000000 -0500
@@ -87,6 +87,8 @@
#endif
static bfd_boolean allocate_dynrelocs
PARAMS ((struct elf_link_hash_entry *h, PTR inf));
+static bfd_boolean elf32_arm_readonly_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
static bfd_boolean create_got_section
PARAMS ((bfd * dynobj, struct bfd_link_info * info));
static bfd_boolean elf32_arm_create_dynamic_sections
@@ -3531,6 +3533,37 @@
return TRUE;
}
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static bfd_boolean
+elf32_arm_readonly_dynrelocs (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied *p;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+ for (p = eh->relocs_copied; p != NULL; p = p->next)
+ {
+ asection *s = p->section;
+
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ {
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ info->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return FALSE;
+ }
+ }
+ return TRUE;
+}
+
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -3740,6 +3773,12 @@
return FALSE;
}
+ /* If any dynamic relocs apply to a read-only section,
+ then we need a DT_TEXTREL entry. */
+ if ((info->flags & DF_TEXTREL) == 0)
+ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs,
+ (PTR) info);
+
if ((info->flags & DF_TEXTREL) != 0)
{
if (!add_dynamic_entry (DT_TEXTREL, 0))

@ -1,24 +0,0 @@
Signed-off-by: dank@kegel.com
Raising the size of the hash table is a noticable win when linking
at least one large app.
There was a patch,
http://sources.redhat.com/ml/binutils/2004-06/msg00165.html
to do this dynamically. No idea why that didn't make it in.
So this tiny change to raise the default size is just
a stopgap for now.
--- binutils-2.15/bfd/hash.c.old 2003-12-01 01:33:01.000000000 -0500
+++ binutils-2.15/bfd/hash.c 2006-03-01 16:26:26.701991000 -0500
@@ -295,7 +295,7 @@
*/
/* The default number of entries to use when creating a hash table. */
-#define DEFAULT_SIZE (4051)
+#define DEFAULT_SIZE (32749)
/* Create a new hash table, given a number of entries. */

@ -1,75 +0,0 @@
Fix found here: http://www.freelists.org/archives/openbeos/11-2005/msg00090.html
Fixes:
In file included from ./targ-cpu.h:1,
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,
from ./obj-format.h:1,
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,
from ./targ-env.h:1,
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,
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:
/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
make[3]: *** [app.o] Error 1
make[3]: Leaving directory `/home/dank/crosstool-new/build/i686-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-binutils/gas'
when building binutils-2.15 with gcc-4.0
diff -ur binutils-2.15.old/gas/as.h binutils-2.15/gas/as.h
--- binutils-2.15.old/gas/as.h 2003-11-22 18:14:21.000000000 -0800
+++ binutils-2.15/gas/as.h 2006-02-14 22:05:35.000000000 -0800
@@ -605,7 +605,26 @@
struct expressionS;
struct fix;
typedef struct symbol symbolS;
-struct relax_type;
+
+/* JF moved this here from as.h under the theory that nobody except MACHINE.c
+ and write.c care about it anyway. */
+/* [zooey]: the above no longer holds with gcc4, as it keeps bugging about
+ incomplete element types in arrays, if relax_type isn't defined
+ here. So I moved the definition back from tc.h to here. */
+struct relax_type
+{
+ /* Forward reach. Signed number. > 0. */
+ long rlx_forward;
+ /* Backward reach. Signed number. < 0. */
+ long rlx_backward;
+
+ /* Bytes length of this address. */
+ unsigned char rlx_length;
+
+ /* Next longer relax-state. 0 means there is no 'next' relax-state. */
+ relax_substateT rlx_more;
+};
+
typedef struct frag fragS;
#ifdef BFD_ASSEMBLER
diff -ur binutils-2.15.old/gas/tc.h binutils-2.15/gas/tc.h
--- binutils-2.15.old/gas/tc.h 2003-12-03 15:39:38.000000000 -0800
+++ binutils-2.15/gas/tc.h 2006-02-14 22:03:35.000000000 -0800
@@ -24,23 +24,6 @@
extern const pseudo_typeS md_pseudo_table[];
-/* JF moved this here from as.h under the theory that nobody except MACHINE.c
- and write.c care about it anyway. */
-
-struct relax_type
-{
- /* Forward reach. Signed number. > 0. */
- long rlx_forward;
- /* Backward reach. Signed number. < 0. */
- long rlx_backward;
-
- /* Bytes length of this address. */
- unsigned char rlx_length;
-
- /* Next longer relax-state. 0 means there is no 'next' relax-state. */
- relax_substateT rlx_more;
-};
-
typedef struct relax_type relax_typeS;
extern const int md_reloc_size; /* Size of a relocation record */

@ -1,40 +0,0 @@
Make psignal prototype in libiberty match that in glibc.
Fixes:
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c: In function `psignal':
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `signo' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:563: argument `message' doesn't match prototype
/usr/include/signal.h:131: prototype declaration
gcc-2.95.3-glibc-2.1.3/binutils-2.15/libiberty/strsignal.c:568: warning: comparison between signed and unsigned
mprotect... make[1]: *** [strsignal.o] Error 1
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'
make: *** [all-libiberty] Error 2
when building on red hat 7.1
though it's a bit of a mystery why libiberty's psignal is being compiled at
all, since red hat 7.1's glibc supports psignal (hence the error message)
--- binutils-2.15/libiberty/strsignal.c.old 2005-04-18 13:57:40.000000000 -0700
+++ binutils-2.15/libiberty/strsignal.c 2005-04-18 13:59:09.000000000 -0700
@@ -544,7 +544,7 @@
/*
-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+@deftypefn Supplemental void psignal (int @var{signo}, const char *@var{message})
Print @var{message} to the standard error, followed by a colon,
followed by the description of the signal specified by @var{signo},
@@ -557,9 +557,7 @@
#ifndef HAVE_PSIGNAL
void
-psignal (signo, message)
- unsigned signo;
- char *message;
+psignal (int signo, const char *message)
{
if (signal_names == NULL)
{

@ -1,22 +0,0 @@
See http://sources.redhat.com/ml/binutils/2004-06/msg00114.html
--- src/bfd/elflink.c.org 2004-07-05 09:11:42.920597000 -0400
+++ src/bfd/elflink.c 2004-07-05 09:12:59.240847000 -0400
@@ -2700,7 +2700,7 @@
return vdiff > 0 ? 1 : -1;
else
{
- long sdiff = h1->root.u.def.section - h2->root.u.def.section;
+ long sdiff = h1->root.u.def.section->id - h2->root.u.def.section->id;
if (sdiff != 0)
return sdiff > 0 ? 1 : -1;
}
@@ -3954,7 +3954,7 @@
i = idx + 1;
else
{
- long sdiff = slook - h->root.u.def.section;
+ long sdiff = slook->id - h->root.u.def.section->id;
if (sdiff < 0)
j = idx;
else if (sdiff > 0)

@ -1,45 +0,0 @@
Grabbed with
wget 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/opcodes/ppc-opc.c.diff?r1=1.70&r2=1.71&cvsroot=src'
See
http://mail.gnu.org/archive/html/bug-binutils/2004-05/msg00071.html
and
http://sources.redhat.com/ml/binutils-cvs/2004-05/msg00111.html
This fixes problems like
{standard input}: Assembler messages:
{standard input}:1: Error: Unrecognized opcode: `dssall'
which show up in binutils-2.15 when building the Linux kernel,
or possibly failed compilations when building setjmp/longjmp in glibc.
An alternative fix would be to pass -many to the assembler.
A patch to do that for glibc is at
wget 'http://sources.redhat.com/cgi-bin/get-raw-msg?listname=libc-alpha&date=2004-05&msgid=40B36E8C.9030609%40us.ibm.com'
Yet another, better, fix would be for gcc to generate assembly
that told the assembler which processor type to use.
Presumably the Linux kernel sources would need a fix, too.
Probably better to just fix binutils to accept sources that it used to.
===================================================================
RCS file: /cvs/src/src/opcodes/ppc-opc.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- src/opcodes/ppc-opc.c 2004/05/05 13:43:36 1.70
+++ src/opcodes/ppc-opc.c 2004/05/19 05:11:48 1.71
@@ -1004,8 +1004,13 @@
/* If only one bit of the FXM field is set, we can use the new form
of the instruction, which is faster. Unlike the Power4 branch hint
- encoding, this is not backward compatible. */
- else if ((dialect & PPC_OPCODE_POWER4) != 0 && (value & -value) == value)
+ encoding, this is not backward compatible. Do not generate the
+ new form unless -mpower4 has been given, or -many and the two
+ operand form of mfcr was used. */
+ else if ((value & -value) == value
+ && ((dialect & PPC_OPCODE_POWER4) != 0
+ || ((dialect & PPC_OPCODE_ANY) != 0
+ && (insn & (0x3ff << 1)) == 19 << 1)))
insn |= 1 << 20;
/* Any other value on mfcr is an error. */

@ -1,51 +0,0 @@
From http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/gas/config/tc-arm.c.diff?r1=1.168&r2=1.169&cvsroot=src
See also http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2004-July/023128.html,
"[CRITICAL PATCH] 2.6: fix silent build error]"
Revision 1.169, Fri Jul 2 11:12:29 2004 UTC (19 hours, 4 minutes ago) by nickc
Branch: MAIN
CVS Tags: binutils_latest_snapshot, HEAD
Changes since 1.168: +14 -1 lines
(md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
from undefined symbols.
Always consider this fixup to have been processed as a reloc cannot be
generated for it.
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -r1.168 -r1.169
--- src/gas/config/tc-arm.c 2004/04/30 10:51:12 1.168
+++ src/gas/config/tc-arm.c 2004/07/02 11:12:29 1.169
@@ -12186,6 +12186,20 @@
switch (fixP->fx_r_type)
{
case BFD_RELOC_ARM_IMMEDIATE:
+ /* We claim that this fixup has been processed here,
+ even if in fact we generate an error because we do
+ not have a reloc for it, so tc_gen_reloc will reject it. */
+ fixP->fx_done = 1;
+
+ if (fixP->fx_addsy
+ && ! S_IS_DEFINED (fixP->fx_addsy))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("undefined symbol %s used as an immediate value"),
+ S_GET_NAME (fixP->fx_addsy));
+ break;
+ }
+
newimm = validate_immediate (value);
temp = md_chars_to_number (buf, INSN_SIZE);
@@ -12202,7 +12216,6 @@
newimm |= (temp & 0xfffff000);
md_number_to_chars (buf, (valueT) newimm, INSN_SIZE);
- fixP->fx_done = 1;
break;
case BFD_RELOC_ARM_ADRL_IMMEDIATE:

@ -1,101 +0,0 @@
Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
Fixes
localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
Paths adjusted to match crosstool's patcher.
Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
From: Andreas Schwab <schwab at suse dot de>
To: Nathan Sidwell <nathan at codesourcery dot com>
Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
Date: Fri, 23 Apr 2004 22:27:19 +0200
Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
Nathan Sidwell <nathan@codesourcery.com> writes:
> Index: read.c
> ===================================================================
> RCS file: /cvs/src/src/gas/read.c,v
> retrieving revision 1.76
> diff -c -3 -p -r1.76 read.c
> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
> --- read.c 18 Mar 2004 09:56:05 -0000
> *************** read_a_source_file (char *name)
> *** 1053,1059 ****
> #endif
> input_line_pointer--;
> /* Report unknown char as ignored. */
> ! ignore_rest_of_line ();
> }
>
> #ifdef md_after_pass_hook
> --- 1053,1059 ----
> #endif
> input_line_pointer--;
> /* Report unknown char as ignored. */
> ! demand_empty_rest_of_line ();
> }
>
> #ifdef md_after_pass_hook
This means that the unknown character is no longer ignored, despite the
comment. As a side effect a line starting with a line comment character
not followed by APP in NO_APP mode now triggers an error instead of just a
warning, breaking builds of glibc on m68k-linux. Earlier in
read_a_source_file where #APP is handled there is another comment that
claims that unknown comments are ignored, when in fact they aren't (only
the initial line comment character is skipped).
Note that the presence of #APP will mess up the line counters, but
that appears to be difficult to fix.
Andreas.
2004-04-23 Andreas Schwab <schwab@suse.de>
* read.c (read_a_source_file): Ignore unknown text after line
comment character. Fix misleading comment.
--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
+++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
@@ -1,6 +1,6 @@
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -950,10 +950,14 @@ read_a_source_file (char *name)
unsigned int new_length;
char *tmp_buf = 0;
- bump_line_counters ();
s = input_line_pointer;
if (strncmp (s, "APP\n", 4))
- continue; /* We ignore it */
+ {
+ /* We ignore it */
+ ignore_rest_of_line ();
+ continue;
+ }
+ bump_line_counters ();
s += 4;
sb_new (&sbuf);
@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
continue;
#endif
input_line_pointer--;
- /* Report unknown char as ignored. */
+ /* Report unknown char as error. */
demand_empty_rest_of_line ();
}
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."

@ -1,22 +0,0 @@
--- binutils-2.15/configure.old 2004-07-21 21:36:47.000000000 -0700
+++ binutils-2.15/configure 2004-07-21 21:37:08.000000000 -0700
@@ -999,7 +999,7 @@
# Some tools are only suitable for building in a "native" situation.
# Remove these if host!=target.
-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"
+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"
# Similarly, some are only suitable for cross toolchains.
# Remove these if host=target.
--- binutils-2.15/configure.in.old 2004-07-21 21:37:19.000000000 -0700
+++ binutils-2.15/configure.in 2004-07-21 21:37:34.000000000 -0700
@@ -236,7 +236,7 @@
# Some tools are only suitable for building in a "native" situation.
# Remove these if host!=target.
-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"
+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"
# Similarly, some are only suitable for cross toolchains.
# Remove these if host=target.

@ -1,192 +0,0 @@
See
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15247
Fixes spurious error
/tmp/ccvNi4ou.s: Assembler messages:
/tmp/ccvNi4ou.s:2310: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
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
when compiling glibc's dosincos.c with gcc-3.4.0
===================================================================
RCS file: /cvs/src/src/opcodes/sparc-opc.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- src/opcodes/sparc-opc.c 2004/01/18 23:46:32 1.9
+++ src/opcodes/sparc-opc.c 2004/04/20 10:23:51 1.10
@@ -1273,110 +1273,72 @@
#define FM_DF 2 /* v9 */
#define FM_QF 3 /* v9 */
-#define fmovicc(opcode, fpsize, cond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags, v9 }
-
-#define fmovfcc(opcode, fpsize, fcond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags, v9 }, \
-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags, v9 }
+#define fmoviccx(opcode, fpsize, args, cond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags, v9 }
+
+#define fmovfccx(opcode, fpsize, args, fcond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags, v9 }, \
+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags, v9 }
/* FIXME: use fmovicc/fmovfcc? */ /* v9 */
-#define fmovcc(opcode, fpsize, cond, fcond, flags) /* v9 */ \
-{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8,f,g", flags | F_FLOAT, v9 }, \
-{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9,f,g", flags | F_FLOAT, v9 }
-
-/* v9 */ fmovcc ("fmovda", FM_DF, CONDA, FCONDA, 0),
-/* v9 */ fmovcc ("fmovqa", FM_QF, CONDA, FCONDA, 0),
-/* v9 */ fmovcc ("fmovsa", FM_SF, CONDA, FCONDA, 0),
-/* v9 */ fmovicc ("fmovdcc", FM_DF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovqcc", FM_QF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovscc", FM_SF, CONDCC, 0),
-/* v9 */ fmovicc ("fmovdcs", FM_DF, CONDCS, 0),
-/* v9 */ fmovicc ("fmovqcs", FM_QF, CONDCS, 0),
-/* v9 */ fmovicc ("fmovscs", FM_SF, CONDCS, 0),
-/* v9 */ fmovcc ("fmovde", FM_DF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovqe", FM_QF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovse", FM_SF, CONDE, FCONDE, 0),
-/* v9 */ fmovcc ("fmovdg", FM_DF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovqg", FM_QF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovsg", FM_SF, CONDG, FCONDG, 0),
-/* v9 */ fmovcc ("fmovdge", FM_DF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovcc ("fmovqge", FM_QF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovcc ("fmovsge", FM_SF, CONDGE, FCONDGE, 0),
-/* v9 */ fmovicc ("fmovdgeu", FM_DF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovqgeu", FM_QF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovsgeu", FM_SF, CONDGEU, F_ALIAS),
-/* v9 */ fmovicc ("fmovdgu", FM_DF, CONDGU, 0),
-/* v9 */ fmovicc ("fmovqgu", FM_QF, CONDGU, 0),
-/* v9 */ fmovicc ("fmovsgu", FM_SF, CONDGU, 0),
-/* v9 */ fmovcc ("fmovdl", FM_DF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovql", FM_QF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovsl", FM_SF, CONDL, FCONDL, 0),
-/* v9 */ fmovcc ("fmovdle", FM_DF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovcc ("fmovqle", FM_QF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovcc ("fmovsle", FM_SF, CONDLE, FCONDLE, 0),
-/* v9 */ fmovicc ("fmovdleu", FM_DF, CONDLEU, 0),
-/* v9 */ fmovicc ("fmovqleu", FM_QF, CONDLEU, 0),
-/* v9 */ fmovicc ("fmovsleu", FM_SF, CONDLEU, 0),
-/* v9 */ fmovfcc ("fmovdlg", FM_DF, FCONDLG, 0),
-/* v9 */ fmovfcc ("fmovqlg", FM_QF, FCONDLG, 0),
-/* v9 */ fmovfcc ("fmovslg", FM_SF, FCONDLG, 0),
-/* v9 */ fmovicc ("fmovdlu", FM_DF, CONDLU, F_ALIAS),
-/* v9 */ fmovicc ("fmovqlu", FM_QF, CONDLU, F_ALIAS),
-/* v9 */ fmovicc ("fmovslu", FM_SF, CONDLU, F_ALIAS),
-/* v9 */ fmovcc ("fmovdn", FM_DF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovqn", FM_QF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovsn", FM_SF, CONDN, FCONDN, 0),
-/* v9 */ fmovcc ("fmovdne", FM_DF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovcc ("fmovqne", FM_QF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovcc ("fmovsne", FM_SF, CONDNE, FCONDNE, 0),
-/* v9 */ fmovicc ("fmovdneg", FM_DF, CONDNEG, 0),
-/* v9 */ fmovicc ("fmovqneg", FM_QF, CONDNEG, 0),
-/* v9 */ fmovicc ("fmovsneg", FM_SF, CONDNEG, 0),
-/* v9 */ fmovcc ("fmovdnz", FM_DF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovqnz", FM_QF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovsnz", FM_SF, CONDNZ, FCONDNZ, F_ALIAS),
-/* v9 */ fmovfcc ("fmovdo", FM_DF, FCONDO, 0),
-/* v9 */ fmovfcc ("fmovqo", FM_QF, FCONDO, 0),
-/* v9 */ fmovfcc ("fmovso", FM_SF, FCONDO, 0),
-/* v9 */ fmovicc ("fmovdpos", FM_DF, CONDPOS, 0),
-/* v9 */ fmovicc ("fmovqpos", FM_QF, CONDPOS, 0),
-/* v9 */ fmovicc ("fmovspos", FM_SF, CONDPOS, 0),
-/* v9 */ fmovfcc ("fmovdu", FM_DF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovqu", FM_QF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovsu", FM_SF, FCONDU, 0),
-/* v9 */ fmovfcc ("fmovdue", FM_DF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovque", FM_QF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovsue", FM_SF, FCONDUE, 0),
-/* v9 */ fmovfcc ("fmovdug", FM_DF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovqug", FM_QF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovsug", FM_SF, FCONDUG, 0),
-/* v9 */ fmovfcc ("fmovduge", FM_DF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovquge", FM_QF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovsuge", FM_SF, FCONDUGE, 0),
-/* v9 */ fmovfcc ("fmovdul", FM_DF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovqul", FM_QF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovsul", FM_SF, FCONDUL, 0),
-/* v9 */ fmovfcc ("fmovdule", FM_DF, FCONDULE, 0),
-/* v9 */ fmovfcc ("fmovqule", FM_QF, FCONDULE, 0),
-/* v9 */ fmovfcc ("fmovsule", FM_SF, FCONDULE, 0),
-/* v9 */ fmovicc ("fmovdvc", FM_DF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovqvc", FM_QF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovsvc", FM_SF, CONDVC, 0),
-/* v9 */ fmovicc ("fmovdvs", FM_DF, CONDVS, 0),
-/* v9 */ fmovicc ("fmovqvs", FM_QF, CONDVS, 0),
-/* v9 */ fmovicc ("fmovsvs", FM_SF, CONDVS, 0),
-/* v9 */ fmovcc ("fmovdz", FM_DF, CONDZ, FCONDZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovqz", FM_QF, CONDZ, FCONDZ, F_ALIAS),
-/* v9 */ fmovcc ("fmovsz", FM_SF, CONDZ, FCONDZ, F_ALIAS),
-
+#define fmovccx(opcode, fpsize, args, cond, fcond, flags) /* v9 */ \
+{ opcode, F3F(2, 0x35, 0x100+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x100+fpsize))|MCOND(~cond,~0), "z," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x000+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x000+fpsize))|MCOND(~fcond,~0), "6," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x180+fpsize)|MCOND(cond,0), F3F(~2, ~0x35, ~(0x180+fpsize))|MCOND(~cond,~0), "Z," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x040+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x040+fpsize))|MCOND(~fcond,~0), "7," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x080+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x080+fpsize))|MCOND(~fcond,~0), "8," args, flags | F_FLOAT, v9 }, \
+{ opcode, F3F(2, 0x35, 0x0c0+fpsize)|MCOND(fcond,0), F3F(~2, ~0x35, ~(0x0c0+fpsize))|MCOND(~fcond,~0), "9," args, flags | F_FLOAT, v9 }
+
+#define fmovicc(suffix, cond, flags) /* v9 */ \
+fmoviccx("fmovd" suffix, FM_DF, "B,H", cond, flags), \
+fmoviccx("fmovq" suffix, FM_QF, "R,J", cond, flags), \
+fmoviccx("fmovs" suffix, FM_SF, "f,g", cond, flags)
+
+#define fmovfcc(suffix, fcond, flags) /* v9 */ \
+fmovfccx("fmovd" suffix, FM_DF, "B,H", fcond, flags), \
+fmovfccx("fmovq" suffix, FM_QF, "R,J", fcond, flags), \
+fmovfccx("fmovs" suffix, FM_SF, "f,g", fcond, flags)
+
+#define fmovcc(suffix, cond, fcond, flags) /* v9 */ \
+fmovccx("fmovd" suffix, FM_DF, "B,H", cond, fcond, flags), \
+fmovccx("fmovq" suffix, FM_QF, "R,J", cond, fcond, flags), \
+fmovccx("fmovs" suffix, FM_SF, "f,g", cond, fcond, flags)
+
+/* v9 */ fmovcc ("a", CONDA, FCONDA, 0),
+/* v9 */ fmovicc ("cc", CONDCC, 0),
+/* v9 */ fmovicc ("cs", CONDCS, 0),
+/* v9 */ fmovcc ("e", CONDE, FCONDE, 0),
+/* v9 */ fmovcc ("g", CONDG, FCONDG, 0),
+/* v9 */ fmovcc ("ge", CONDGE, FCONDGE, 0),
+/* v9 */ fmovicc ("geu", CONDGEU, F_ALIAS),
+/* v9 */ fmovicc ("gu", CONDGU, 0),
+/* v9 */ fmovcc ("l", CONDL, FCONDL, 0),
+/* v9 */ fmovcc ("le", CONDLE, FCONDLE, 0),
+/* v9 */ fmovicc ("leu", CONDLEU, 0),
+/* v9 */ fmovfcc ("lg", FCONDLG, 0),
+/* v9 */ fmovicc ("lu", CONDLU, F_ALIAS),
+/* v9 */ fmovcc ("n", CONDN, FCONDN, 0),
+/* v9 */ fmovcc ("ne", CONDNE, FCONDNE, 0),
+/* v9 */ fmovicc ("neg", CONDNEG, 0),
+/* v9 */ fmovcc ("nz", CONDNZ, FCONDNZ, F_ALIAS),
+/* v9 */ fmovfcc ("o", FCONDO, 0),
+/* v9 */ fmovicc ("pos", CONDPOS, 0),
+/* v9 */ fmovfcc ("u", FCONDU, 0),
+/* v9 */ fmovfcc ("ue", FCONDUE, 0),
+/* v9 */ fmovfcc ("ug", FCONDUG, 0),
+/* v9 */ fmovfcc ("uge", FCONDUGE, 0),
+/* v9 */ fmovfcc ("ul", FCONDUL, 0),
+/* v9 */ fmovfcc ("ule", FCONDULE, 0),
+/* v9 */ fmovicc ("vc", CONDVC, 0),
+/* v9 */ fmovicc ("vs", CONDVS, 0),
+/* v9 */ fmovcc ("z", CONDZ, FCONDZ, F_ALIAS),
+
+#undef fmoviccx /* v9 */
+#undef fmovfccx /* v9 */
+#undef fmovccx /* v9 */
#undef fmovicc /* v9 */
#undef fmovfcc /* v9 */
#undef fmovcc /* v9 */

@ -1,677 +0,0 @@
Signed-off-by: dank@kegel.com
Fixes ld speed issue.
See http://weblogs.mozillazine.org/roc/archives/2005/02/optimizing_gnu.html
See thread "Re: optimizations for 3x speedup in ld",
http://sources.redhat.com/ml/binutils/2005-03/msg00847.html
Wildcard section matching enhancement, backported from the binutils CVS tree.
Here's the CVS log comment from the original change to ldlang.c:
revision 1.177
date: 2005/04/06 15:33:02; author: jakub; state: Exp; lines: +438 -51
2005-04-06 Jakub Jelinek <jakub@redhat.com>
* ldlang.c: Formatting.
(walk_wild_consider_section): Remember return value from wildcardp.
(is_simple_wild): Use strcspn instead of 2 strpbrk calls and strlen.
(wild_spec_can_overlap): Use strcspn instead of strpbrk and strlen.
2005-04-06 Robert O'Callahan <rocallahan@novell.com>
* ld.h (lean_section_userdata_type): Remove.
(fat_section_userdata_type): Remove file field.
(SECTION_USERDATA_SIZE): Remove.
* ldlang.c (init_os): Eliminate initialization of unused
lean_section_userdata_type.
* ldlang.h (callback_t, walk_wild_section_handler_t): New
typedefs.
(struct lang_wild_statement_struct): Add walk_wild_section_handler
and handler_data fields.
* ldlang.c (callback_t): Removed.
(walk_wild_consider_section, walk_wild_section_general,
section_iterator_callback, find_section, is_simple_wild,
match_simple_wild, walk_wild_section_specs1_wild0,
walk_wild_section_specs1_wild1, walk_wild_section_specs2_wild1,
walk_wild_section_specs3_wild2, walk_wild_section_specs4_wild2,
wild_spec_can_overlap, analyze_walk_wild_section_handler): New
functions.
(lang_add_wild): Call analyze_walk_wild_section_handler.
(walk_wild_section): Renamed to walk_wild_section_general and
created a wrapper function.
(section_iterator_callback_data): New typedef.
Note that bfd_get_section_by_name_if didn't exist in 2.15, so it was backported
as well.
--- binutils-2.15/bfd/bfd-in2.h.old 2004-05-17 15:35:56.000000000 -0400
+++ binutils-2.15/bfd/bfd-in2.h 2006-02-09 11:54:45.989940000 -0500
@@ -1425,6 +1425,10 @@
asection *bfd_get_section_by_name (bfd *abfd, const char *name);
+asection *bfd_get_section_by_name_if (bfd *abfd, const char *name,
+ bfd_boolean (*operation) (bfd *, asection *, void *),
+ void *user_storage);
+
char *bfd_get_unique_section_name
(bfd *abfd, const char *templat, int *count);
--- binutils-2.15/bfd/section.c.old 2003-12-01 01:33:01.000000000 -0500
+++ binutils-2.15/bfd/section.c 2006-01-23 14:16:54.768993000 -0500
@@ -801,6 +801,57 @@
/*
FUNCTION
+ bfd_get_section_by_name_if
+
+SYNOPSIS
+ asection *bfd_get_section_by_name_if
+ (bfd *abfd,
+ const char *name,
+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
+ void *obj);
+
+DESCRIPTION
+ Call the provided function @var{func} for each section
+ attached to the BFD @var{abfd} whose name matches @var{name},
+ passing @var{obj} as an argument. The function will be called
+ as if by
+
+| func (abfd, the_section, obj);
+
+ It returns the first section for which @var{func} returns true,
+ otherwise <<NULL>>.
+
+*/
+
+asection *
+bfd_get_section_by_name_if (bfd *abfd, const char *name,
+ bfd_boolean (*operation) (bfd *,
+ asection *,
+ void *),
+ void *user_storage)
+{
+ struct section_hash_entry *sh;
+ unsigned long hash;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE);
+ if (sh == NULL)
+ return NULL;
+
+ hash = sh->root.hash;
+ do
+ {
+ if ((*operation) (abfd, &sh->section, user_storage))
+ return &sh->section;
+ sh = (struct section_hash_entry *) sh->root.next;
+ }
+ while (sh != NULL && sh->root.hash == hash
+ && strcmp (sh->root.string, name) == 0);
+
+ return NULL;
+}
+
+/*
+FUNCTION
bfd_get_unique_section_name
SYNOPSIS
--- binutils-2.15/ld/ldlang.c.old 2004-05-17 15:36:16.000000000 -0400
+++ binutils-2.15/ld/ldlang.c 2006-01-23 13:40:12.745499000 -0500
@@ -81,9 +81,6 @@
static void lang_record_phdrs (void);
static void lang_do_version_exports_section (void);
-typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
- asection *, lang_input_statement_type *, void *);
-
/* Exported variables. */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type lang_output_section_statement;
@@ -138,21 +135,71 @@
/* Generic traversal routines for finding matching sections. */
+/* Try processing a section against a wildcard. This just calls
+ the callback unless the filename exclusion list is present
+ and excludes the file. It's hardly ever present so this
+ function is very fast. */
+
+static void
+walk_wild_consider_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ asection *s,
+ struct wildcard_list *sec,
+ callback_t callback,
+ void *data)
+{
+ bfd_boolean skip = FALSE;
+ struct name_list *list_tmp;
+
+ /* Don't process sections from files which were
+ excluded. */
+ for (list_tmp = sec->spec.exclude_name_list;
+ list_tmp;
+ list_tmp = list_tmp->next)
+ {
+ bfd_boolean is_wildcard = wildcardp (list_tmp->name);
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
+ else
+ skip = strcmp (list_tmp->name, file->filename) == 0;
+
+ /* If this file is part of an archive, and the archive is
+ excluded, exclude this file. */
+ if (! skip && file->the_bfd != NULL
+ && file->the_bfd->my_archive != NULL
+ && file->the_bfd->my_archive->filename != NULL)
+ {
+ if (is_wildcard)
+ skip = fnmatch (list_tmp->name,
+ file->the_bfd->my_archive->filename,
+ 0) == 0;
+ else
+ skip = strcmp (list_tmp->name,
+ file->the_bfd->my_archive->filename) == 0;
+ }
+
+ if (skip)
+ break;
+ }
+
+ if (!skip)
+ (*callback) (ptr, sec, s, file, data);
+}
+
+/* Lowest common denominator routine that can handle everything correctly,
+ but slowly. */
+
static void
-walk_wild_section (lang_wild_statement_type *ptr,
- lang_input_statement_type *file,
- callback_t callback,
- void *data)
+walk_wild_section_general (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
{
asection *s;
-
- if (file->just_syms_flag)
- return;
+ struct wildcard_list *sec;
for (s = file->the_bfd->sections; s != NULL; s = s->next)
{
- struct wildcard_list *sec;
-
sec = ptr->section_list;
if (sec == NULL)
(*callback) (ptr, sec, s, file, data);
@@ -160,39 +207,8 @@
while (sec != NULL)
{
bfd_boolean skip = FALSE;
- struct name_list *list_tmp;
-
- /* Don't process sections from files which were
- excluded. */
- for (list_tmp = sec->spec.exclude_name_list;
- list_tmp;
- list_tmp = list_tmp->next)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
- else
- skip = strcmp (list_tmp->name, file->filename) == 0;
-
- /* If this file is part of an archive, and the archive is
- excluded, exclude this file. */
- if (! skip && file->the_bfd != NULL
- && file->the_bfd->my_archive != NULL
- && file->the_bfd->my_archive->filename != NULL)
- {
- if (wildcardp (list_tmp->name))
- skip = fnmatch (list_tmp->name,
- file->the_bfd->my_archive->filename,
- 0) == 0;
- else
- skip = strcmp (list_tmp->name,
- file->the_bfd->my_archive->filename) == 0;
- }
-
- if (skip)
- break;
- }
- if (!skip && sec->spec.name != NULL)
+ if (sec->spec.name != NULL)
{
const char *sname = bfd_get_section_name (file->the_bfd, s);
@@ -203,13 +219,381 @@
}
if (!skip)
- (*callback) (ptr, sec, s, file, data);
+ walk_wild_consider_section (ptr, file, s, sec, callback, data);
sec = sec->next;
}
}
}
+/* Routines to find a single section given its name. If there's more
+ than one section with that name, we report that. */
+
+typedef struct
+{
+ asection *found_section;
+ bfd_boolean multiple_sections_found;
+} section_iterator_callback_data;
+
+static bfd_boolean
+section_iterator_callback (bfd *bfd ATTRIBUTE_UNUSED, asection *s, void *data)
+{
+ section_iterator_callback_data *d = data;
+
+ if (d->found_section != NULL)
+ {
+ d->multiple_sections_found = TRUE;
+ return TRUE;
+ }
+
+ d->found_section = s;
+ return FALSE;
+}
+
+static asection *
+find_section (lang_input_statement_type *file,
+ struct wildcard_list *sec,
+ bfd_boolean *multiple_sections_found)
+{
+ section_iterator_callback_data cb_data = { NULL, FALSE };
+
+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
+ section_iterator_callback, &cb_data);
+ *multiple_sections_found = cb_data.multiple_sections_found;
+ return cb_data.found_section;
+}
+
+/* Code for handling simple wildcards without going through fnmatch,
+ which can be expensive because of charset translations etc. */
+
+/* A simple wild is a literal string followed by a single '*',
+ where the literal part is at least 4 characters long. */
+
+static bfd_boolean
+is_simple_wild (const char *name)
+{
+ size_t len = strcspn (name, "*?[");
+ return len >= 4 && name[len] == '*' && name[len + 1] == '\0';
+}
+
+static bfd_boolean
+match_simple_wild (const char *pattern, const char *name)
+{
+ /* The first four characters of the pattern are guaranteed valid
+ non-wildcard characters. So we can go faster. */
+ if (pattern[0] != name[0] || pattern[1] != name[1]
+ || pattern[2] != name[2] || pattern[3] != name[3])
+ return FALSE;
+
+ pattern += 4;
+ name += 4;
+ while (*pattern != '*')
+ if (*name++ != *pattern++)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Specialized, optimized routines for handling different kinds of
+ wildcards */
+
+static void
+walk_wild_section_specs1_wild0 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ /* We can just do a hash lookup for the section with the right name.
+ But if that lookup discovers more than one section with the name
+ (should be rare), we fall back to the general algorithm because
+ we would otherwise have to sort the sections to make sure they
+ get processed in the bfd's order. */
+ bfd_boolean multiple_sections_found;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ walk_wild_section_general (ptr, file, callback, data);
+ else if (s0)
+ walk_wild_consider_section (ptr, file, s0, sec0, callback, data);
+}
+
+static void
+walk_wild_section_specs1_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *wildsec0 = ptr->handler_data[0];
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec0->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec0, callback, data);
+ }
+}
+
+static void
+walk_wild_section_specs2_wild1 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ /* Note that if the section was not found, s0 is NULL and
+ we'll simply never succeed the s == s0 test below. */
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ /* Recall that in this code path, a section cannot satisfy more
+ than one spec, so if s == s0 then it cannot match
+ wildspec1. */
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback,
+ data);
+ }
+ }
+}
+
+static void
+walk_wild_section_specs3_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *wildsec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found);
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec1->spec.name, sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec1, callback, data);
+ else
+ {
+ skip = !match_simple_wild (wildsec2->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section_specs4_wild2 (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ asection *s;
+ struct wildcard_list *sec0 = ptr->handler_data[0];
+ struct wildcard_list *sec1 = ptr->handler_data[1];
+ struct wildcard_list *wildsec2 = ptr->handler_data[2];
+ struct wildcard_list *wildsec3 = ptr->handler_data[3];
+ bfd_boolean multiple_sections_found;
+ asection *s0 = find_section (file, sec0, &multiple_sections_found), *s1;
+
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ s1 = find_section (file, sec1, &multiple_sections_found);
+ if (multiple_sections_found)
+ {
+ walk_wild_section_general (ptr, file, callback, data);
+ return;
+ }
+
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ {
+ if (s == s0)
+ walk_wild_consider_section (ptr, file, s, sec0, callback, data);
+ else
+ if (s == s1)
+ walk_wild_consider_section (ptr, file, s, sec1, callback, data);
+ else
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
+ bfd_boolean skip = !match_simple_wild (wildsec2->spec.name,
+ sname);
+
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec2, callback,
+ data);
+ else
+ {
+ skip = !match_simple_wild (wildsec3->spec.name, sname);
+ if (!skip)
+ walk_wild_consider_section (ptr, file, s, wildsec3,
+ callback, data);
+ }
+ }
+ }
+}
+
+static void
+walk_wild_section (lang_wild_statement_type *ptr,
+ lang_input_statement_type *file,
+ callback_t callback,
+ void *data)
+{
+ if (file->just_syms_flag)
+ return;
+
+ (*ptr->walk_wild_section_handler) (ptr, file, callback, data);
+}
+
+/* Returns TRUE when name1 is a wildcard spec that might match
+ something name2 can match. We're conservative: we return FALSE
+ only if the prefixes of name1 and name2 are different up to the
+ first wildcard character. */
+
+static bfd_boolean
+wild_spec_can_overlap (const char *name1, const char *name2)
+{
+ size_t prefix1_len = strcspn (name1, "?*[");
+ size_t prefix2_len = strcspn (name2, "?*[");
+ size_t min_prefix_len;
+
+ /* Note that if there is no wildcard character, then we treat the
+ terminating 0 as part of the prefix. Thus ".text" won't match
+ ".text." or ".text.*", for example. */
+ if (name1[prefix1_len] == '\0')
+ prefix1_len++;
+ if (name2[prefix2_len] == '\0')
+ prefix2_len++;
+
+ min_prefix_len = prefix1_len < prefix2_len ? prefix1_len : prefix2_len;
+
+ return memcmp (name1, name2, min_prefix_len) == 0;
+}
+
+/* Select specialized code to handle various kinds of wildcard
+ statements. */
+
+static void
+analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
+{
+ int sec_count = 0;
+ int wild_name_count = 0;
+ struct wildcard_list *sec;
+ int signature;
+ int data_counter;
+
+ ptr->walk_wild_section_handler = walk_wild_section_general;
+
+ /* Count how many wildcard_specs there are, and how many of those
+ actually use wildcards in the name. Also, bail out if any of the
+ wildcard names are NULL. (Can this actually happen?
+ walk_wild_section used to test for it.) And bail out if any
+ of the wildcards are more complex than a simple string
+ ending in a single '*'. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ ++sec_count;
+ if (sec->spec.name == NULL)
+ return;
+ if (wildcardp (sec->spec.name))
+ {
+ ++wild_name_count;
+ if (!is_simple_wild (sec->spec.name))
+ return;
+ }
+ }
+
+ /* The zero-spec case would be easy to optimize but it doesn't
+ happen in practice. Likewise, more than 4 specs doesn't
+ happen in practice. */
+ if (sec_count == 0 || sec_count > 4)
+ return;
+
+ /* Check that no two specs can match the same section. */
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ {
+ struct wildcard_list *sec2;
+ for (sec2 = sec->next; sec2 != NULL; sec2 = sec2->next)
+ {
+ if (wild_spec_can_overlap (sec->spec.name, sec2->spec.name))
+ return;
+ }
+ }
+
+ signature = (sec_count << 8) + wild_name_count;
+ switch (signature)
+ {
+ case 0x0100:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild0;
+ break;
+ case 0x0101:
+ ptr->walk_wild_section_handler = walk_wild_section_specs1_wild1;
+ break;
+ case 0x0201:
+ ptr->walk_wild_section_handler = walk_wild_section_specs2_wild1;
+ break;
+ case 0x0302:
+ ptr->walk_wild_section_handler = walk_wild_section_specs3_wild2;
+ break;
+ case 0x0402:
+ ptr->walk_wild_section_handler = walk_wild_section_specs4_wild2;
+ break;
+ default:
+ return;
+ }
+
+ /* Now fill the data array with pointers to the specs, first the
+ specs with non-wildcard names, then the specs with wildcard
+ names. It's OK to process the specs in different order from the
+ given order, because we've already determined that no section
+ will match more than one spec. */
+ data_counter = 0;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (!wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+ for (sec = ptr->section_list; sec != NULL; sec = sec->next)
+ if (wildcardp (sec->spec.name))
+ ptr->handler_data[data_counter++] = sec;
+}
+
/* Handle a wild statement for a single file F. */
static void
@@ -4353,6 +4737,7 @@
new->section_list = section_list;
new->keep_sections = keep_sections;
lang_list_init (&new->children);
+ analyze_walk_wild_section_handler (new);
}
void
--- binutils-2.15/ld/ldlang.h.old 2004-05-17 15:36:16.000000000 -0400
+++ binutils-2.15/ld/ldlang.h 2006-01-23 13:32:33.653292000 -0500
@@ -295,7 +295,17 @@
union lang_statement_union *file;
} lang_afile_asection_pair_statement_type;
-typedef struct lang_wild_statement_struct
+typedef struct lang_wild_statement_struct lang_wild_statement_type;
+
+typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
+ asection *, lang_input_statement_type *, void *);
+
+typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
+ lang_input_statement_type *,
+ callback_t callback,
+ void *data);
+
+struct lang_wild_statement_struct
{
lang_statement_header_type header;
const char *filename;
@@ -303,7 +313,10 @@
struct wildcard_list *section_list;
bfd_boolean keep_sections;
lang_statement_list_type children;
-} lang_wild_statement_type;
+
+ walk_wild_section_handler_t walk_wild_section_handler;
+ struct wildcard_list *handler_data[4];
+};
typedef struct lang_address_statement_struct
{

@ -1,33 +0,0 @@
Signed-off-by: dank@kegel.com
See http://sourceware.org/ml/binutils/2005-12/msg00270.html
http://sourceware.org/ml/binutils-cvs/2005-12/msg00139.html
STABS hash table size change, backported from the binutils CVS tree. Here's
the CVS log comment for the original change:
revision 1.25
date: 2005/12/29 10:29:23; author: nickc; state: Exp; lines: +2 -3
(_bfd_link_section_stabs): Use bfd_hash_table_init rather than
bfd_hash_table_init_n(...,251) so that the size of the hash table can be
controlled by the user.
Note that tunable hash table size changes were added after 2.15. The effect
of this change is to make bfd use its default hash table size for the stabs
hash as well.
--- binutils-2.15/bfd/stabs.c.old 2004-05-17 15:36:04.000000000 -0400
+++ binutils-2.15/bfd/stabs.c 2006-02-09 15:21:56.567014000 -0500
@@ -241,9 +241,8 @@
goto error_return;
/* Make sure the first byte is zero. */
(void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE);
- if (! bfd_hash_table_init_n (&sinfo->includes.root,
- stab_link_includes_newfunc,
- 251))
+ if (! bfd_hash_table_init (&sinfo->includes.root,
+ stab_link_includes_newfunc))
goto error_return;
sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
sinfo->stabstr->flags |= SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;

@ -1,42 +0,0 @@
Message-ID: <000801c48f60$cec16630$9103a8c0@ULOC5012>
From: "Michael Geiger" <mcgege@gmx.de>
To: <dank@kegel.com>
Subject: Patch for cross compiling s/390 kernel on linux host
Date: Tue, 31 Aug 2004 15:45:41 +0200
Dear Dan,
I had big problems compiling a kernel for s/390 on my linux host - I tried
different chains from crosstool-0.28-rc34 and finally succeded with
gcc-3.3.4-glibc-2.3.2 after applying another patch to binutils-2.15
(attached).
All compilations of the different kernel versions I tried stopped with
"Invalid .insn format" somewhere. I checked the recent cvs version of
binutils and applied the latest diff to gas/config/tc-s390.c and that solved
it.
Greetings
Michael Geiger
diff -u -r1.39 -r1.40
--- src/gas/config/tc-s390.c 2004/05/06 11:01:48 1.39
+++ src/gas/config/tc-s390.c 2004/06/15 12:38:08 1.40
@@ -1596,13 +1596,13 @@
if (exp.X_op == O_constant)
{
if ( ( opformat->oplen == 6
- && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 48))
|| ( opformat->oplen == 4
- && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 32))
|| ( opformat->oplen == 2
- && exp.X_add_number >= 0
+ && (addressT) exp.X_add_number >= 0
&& (addressT) exp.X_add_number < (1ULL << 16)))
md_number_to_chars (insn, exp.X_add_number, opformat->oplen);
else

@ -1,647 +0,0 @@
--------- snip -------
Downloaded from ftp://ftp.linux.org.uk/pub/armlinux/toolchain/src-2.95.3/gcc-2.95.3.diff.bz2
Not sure what it fixes, but this appears to be The Patch used with gcc-2.95.3 on arm.
--------- snip -------
diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.c gcc-2.95.3/gcc/config/arm/arm.c
--- gcc-2.95.3-orig/gcc/config/arm/arm.c Thu Jan 25 15:03:24 2001
+++ gcc-2.95.3/gcc/config/arm/arm.c Fri Jul 20 19:39:11 2001
@@ -1529,27 +1529,34 @@
return gen_rtx_PLUS (Pmode, base, offset);
}
else if (GET_CODE (orig) == LABEL_REF)
- current_function_uses_pic_offset_table = 1;
-
- return orig;
-}
+ {
+ current_function_uses_pic_offset_table = 1;
-static rtx pic_rtx;
+ if (NEED_PLT_GOT)
+ {
+ rtx pic_ref, address = gen_reg_rtx (Pmode);
+
+ emit_insn (gen_pic_load_addr (address, orig));
+ pic_ref = gen_rtx_PLUS (Pmode, pic_offset_table_rtx,
+ address);
+ emit_move_insn (address, pic_ref);
+ return address;
+ }
+ }
-int
-is_pic(x)
- rtx x;
-{
- if (x == pic_rtx)
- return 1;
- return 0;
+ return orig;
}
+/* Generate code to load the PIC register. PROLOGUE is true if
+ called from arm_expand_prologue (in which case we want the
+ generated insns at the start of the function); false if called
+ by an exception receiver that needs the PIC register reloaded
+ (in which case the insns are just dumped at the current location). */
void
-arm_finalize_pic ()
+arm_finalize_pic (int prologue)
{
#ifndef AOF_ASSEMBLER
- rtx l1, pic_tmp, pic_tmp2, seq;
+ rtx l1, pic_tmp, pic_tmp2, seq, pic_rtx;
rtx global_offset_table;
if (current_function_uses_pic_offset_table == 0)
@@ -1578,7 +1585,10 @@
seq = gen_sequence ();
end_sequence ();
- emit_insn_after (seq, get_insns ());
+ if (prologue)
+ emit_insn_after (seq, get_insns ());
+ else
+ emit_insn (seq);
/* Need to emit this whether or not we obey regdecls,
since setjmp/longjmp can cause life info to screw up. */
@@ -5327,7 +5337,13 @@
if (frame_pointer_needed)
live_regs += 4;
- if (live_regs)
+ if (live_regs == 1 && regs_ever_live[LR_REGNUM]
+ && ! lr_save_eliminated && ! really_return)
+ {
+ output_asm_insn (reverse ? "ldr%?%D0\t%|lr, [%|sp}, #4"
+ : "ldr%?%d0\t%|lr, [%|sp], #4", &operand);
+ }
+ else if (live_regs)
{
if (lr_save_eliminated || ! regs_ever_live[14])
live_regs++;
@@ -5446,7 +5462,7 @@
rtx x;
length = strlen (name);
- alignlength = (length + 1) + 3 & ~3;
+ alignlength = ((length + 1) + 3) & ~3;
ASM_OUTPUT_ASCII (stream, name, length + 1);
ASM_OUTPUT_ALIGN (stream, 2);
@@ -5838,6 +5854,9 @@
int store_arg_regs = 0;
int volatile_func = (optimize > 0
&& TREE_THIS_VOLATILE (current_function_decl));
+ rtx ip_rtx;
+ int fp_offset = 0;
+ rtx insn;
/* Naked functions don't have prologues. */
if (arm_naked_function_p (current_function_decl))
@@ -5859,11 +5878,59 @@
live_regs_mask |= 0x4000;
}
+ ip_rtx = gen_rtx_REG (SImode, IP_REGNUM);
+
if (frame_pointer_needed)
{
+ if (current_function_needs_context)
+ {
+ /* The Static chain register is the same as the IP register
+ used as a scratch register during stack frame creation.
+ To get around this need to find somewhere to store IP
+ whilst the frame is being created. We try the following
+ places in order:
+
+ 1. An unused argument register.
+ 2. A slot on the stack above the frame. (This only
+ works if the function is not a varargs function).
+
+ If neither of these places is available, we abort (for now). */
+ if (regs_ever_live[3] == 0)
+ {
+ insn = gen_rtx_REG (SImode, 3);
+ insn = gen_rtx_SET (SImode, insn, ip_rtx);
+ insn = emit_insn (insn);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else if (current_function_pretend_args_size == 0)
+ {
+ insn = gen_rtx_PRE_DEC (SImode, stack_pointer_rtx);
+ insn = gen_rtx_MEM (SImode, insn);
+ insn = gen_rtx_SET (VOIDmode, insn, ip_rtx);
+ insn = emit_insn (insn);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ fp_offset = 4;
+ }
+ else
+ /* FIXME - the way to handle this situation is to allow
+ the pretend args to be dumped onto the stack, then
+ reuse r3 to save IP. This would involve moving the
+ copying os SP into IP until after the pretend args
+ have been dumped, but this is not too hard. */
+ error ("Unable to find a temporary location for static chanin register");
+ }
+
live_regs_mask |= 0xD800;
- emit_insn (gen_movsi (gen_rtx_REG (SImode, 12),
- stack_pointer_rtx));
+ if (fp_offset)
+ {
+ insn = gen_rtx_PLUS (SImode, stack_pointer_rtx, GEN_INT (fp_offset));
+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
+ }
+ else
+ insn = gen_movsi (ip_rtx, stack_pointer_rtx);
+
+ insn = emit_insn (insn);
+ RTX_FRAME_RELATED_P (insn) = 1;
}
if (current_function_pretend_args_size)
@@ -5927,9 +5994,31 @@
}
if (frame_pointer_needed)
- emit_insn (gen_addsi3 (hard_frame_pointer_rtx, gen_rtx_REG (SImode, 12),
- (GEN_INT
- (-(4 + current_function_pretend_args_size)))));
+ {
+ insn = GEN_INT (-(4 + current_function_pretend_args_size + fp_offset));
+ insn = emit_insn (gen_addsi3 (hard_frame_pointer_rtx, ip_rtx, insn));
+ RTX_FRAME_RELATED_P (insn) = 1;
+
+ if (current_function_needs_context)
+ {
+ /* Recover the static chain register. */
+ if (regs_ever_live [3] == 0)
+ {
+ insn = gen_rtx_REG (SImode, 3);
+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
+ insn = emit_insn (insn);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else /* if (current_function_pretend_args_size == 0) */
+ {
+ insn = gen_rtx_PLUS (SImode, hard_frame_pointer_rtx, GEN_INT (4));
+ insn = gen_rtx_MEM (SImode, insn);
+ insn = gen_rtx_SET (SImode, ip_rtx, insn);
+ insn = emit_insn (insn);
+ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+ }
if (amount != const0_rtx)
{
diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.h gcc-2.95.3/gcc/config/arm/arm.h
--- gcc-2.95.3-orig/gcc/config/arm/arm.h Thu Jan 25 15:03:26 2001
+++ gcc-2.95.3/gcc/config/arm/arm.h Fri Jul 20 19:39:11 2001
@@ -601,14 +601,20 @@
(TREE_CODE (EXP) == STRING_CST \
&& (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN))
+#ifndef STRUCTURE_SIZE_BOUNDARY
/* Every structures size must be a multiple of 32 bits. */
/* This is for compatibility with ARMCC. ARM SDT Reference Manual
(ARM DUI 0020D) page 2-20 says "Structures are aligned on word
boundaries". */
-#ifndef STRUCTURE_SIZE_BOUNDARY
-#define STRUCTURE_SIZE_BOUNDARY 32
+/* Setting this to 32 produces more efficient code, but the value set in previous
+ versions of this toolchain was 8, which produces more compact structures. The
+ command line option -mstructure_size_boundary=<n> can be used to change this
+ value. */
+#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
#endif
+extern int arm_structure_size_boundary;
+
/* Used when parsing command line option -mstructure_size_boundary. */
extern const char * structure_size_string;
@@ -768,6 +774,9 @@
/* Specify the registers used for certain standard purposes.
The values of these macros are register numbers. */
+/* Register which holds return address from a subroutine call. */
+#define LR_REGNUM 14
+
/* Define this if the program counter is overloaded on a register. */
#define PC_REGNUM 15
@@ -777,6 +786,9 @@
/* Base register for access to local variables of the function. */
#define FRAME_POINTER_REGNUM 25
+/* Scratch register - used in all kinds of places, eg trampolines. */
+#define IP_REGNUM 12
+
/* Define this to be where the real frame pointer is if it is not possible to
work out the offset between the frame pointer and the automatic variables
until after register allocation has taken place. FRAME_POINTER_REGNUM
@@ -798,7 +810,7 @@
/* The native (Norcroft) Pascal compiler for the ARM passes the static chain
as an invisible last argument (possible since varargs don't exist in
Pascal), so the following is not true. */
-#define STATIC_CHAIN_REGNUM 8
+#define STATIC_CHAIN_REGNUM 12
/* Register in which address to store a structure value
is passed to a function. */
@@ -1248,7 +1260,12 @@
{ \
int volatile_func = arm_volatile_func (); \
if ((FROM) == ARG_POINTER_REGNUM && (TO) == HARD_FRAME_POINTER_REGNUM)\
- (OFFSET) = 0; \
+ { \
+ if (! current_function_needs_context || ! frame_pointer_needed) \
+ (OFFSET) = 0; \
+ else \
+ (OFFSET) = 4; \
+ } \
else if ((FROM) == FRAME_POINTER_REGNUM \
&& (TO) == STACK_POINTER_REGNUM) \
(OFFSET) = (current_function_outgoing_args_size \
@@ -1379,8 +1396,10 @@
On the ARM, allow any integer (invalid ones are removed later by insn
patterns), nice doubles and symbol_refs which refer to the function's
- constant pool XXX. */
-#define LEGITIMATE_CONSTANT_P(X) (! label_mentioned_p (X))
+ constant pool XXX.
+
+ When generating PIC code, allow anything. */
+#define LEGITIMATE_CONSTANT_P(X) (flag_pic || ! label_mentioned_p (X))
/* Symbols in the text segment can be accessed without indirecting via the
constant pool; it may take an extra binary operation, but this is still
@@ -1496,9 +1515,8 @@
&& INTVAL (op) <= 31) \
goto LABEL; \
} \
- /* NASTY: Since this limits the addressing of unsigned byte loads */ \
range = ((MODE) == HImode || (MODE) == QImode) \
- ? (arm_arch4 ? 256 : 4095) : 4096; \
+ ? (((MODE) == HImode && arm_arch4) ? 256 : 4095) : 4096; \
if (code == CONST_INT && INTVAL (INDEX) < range \
&& INTVAL (INDEX) > -range) \
goto LABEL; \
@@ -1812,14 +1830,15 @@
data addresses in memory. */
#define PIC_OFFSET_TABLE_REGNUM arm_pic_register
-#define FINALIZE_PIC arm_finalize_pic ()
+#define FINALIZE_PIC arm_finalize_pic (1)
-/* We can't directly access anything that contains a symbol,
+/* We can't directly access anything that contains a symbol or label,
nor can we indirect via the constant pool. */
#define LEGITIMATE_PIC_OPERAND_P(X) \
- (! symbol_mentioned_p (X) \
+ (! symbol_mentioned_p (X) && ! label_mentioned_p (X) \
&& (! CONSTANT_POOL_ADDRESS_P (X) \
- || ! symbol_mentioned_p (get_pool_constant (X))))
+ || (! symbol_mentioned_p (get_pool_constant (X))) \
+ && (! label_mentioned_p (get_pool_constant (X)))))
/* We need to know when we are making a constant pool; this determines
whether data needs to be in the GOT or can be referenced via a GOT
@@ -2046,17 +2065,9 @@
else output_addr_const(STREAM, X); \
}
-/* Handles PIC addr specially */
#define OUTPUT_INT_ADDR_CONST(STREAM,X) \
{ \
- if (flag_pic && GET_CODE(X) == CONST && is_pic(X)) \
- { \
- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 0), 0)); \
- fputs(" - (", STREAM); \
- output_addr_const(STREAM, XEXP (XEXP (XEXP (X, 0), 1), 0)); \
- fputs(")", STREAM); \
- } \
- else output_addr_const(STREAM, X); \
+ output_addr_const(STREAM, X); \
\
/* Mark symbols as position independent. We only do this in the \
.text segment, not in the .data segment. */ \
@@ -2170,8 +2181,7 @@
int arm_return_in_memory PROTO ((Tree));
int legitimate_pic_operand_p PROTO ((Rtx));
Rtx legitimize_pic_address PROTO ((Rtx, Mmode, Rtx));
-int is_pic PROTO ((Rtx));
-void arm_finalize_pic PROTO ((void));
+void arm_finalize_pic PROTO ((int));
int arm_rtx_costs RTX_CODE_PROTO ((Rtx, Rcode));
int arm_adjust_cost PROTO ((Rtx, Rtx, Rtx, int));
int const_double_rtx_ok_for_fpu PROTO ((Rtx));
diff -urN gcc-2.95.3-orig/gcc/config/arm/arm.md gcc-2.95.3/gcc/config/arm/arm.md
--- gcc-2.95.3-orig/gcc/config/arm/arm.md Thu Jan 25 15:03:27 2001
+++ gcc-2.95.3/gcc/config/arm/arm.md Fri Jul 20 19:39:11 2001
@@ -2629,7 +2629,8 @@
: preserve_subexpressions_p ()));
DONE;
}
- if (CONSTANT_P (operands[1]) && flag_pic)
+ if ((CONSTANT_P (operands[1]) || symbol_mentioned_p (operands[1])
+ || label_mentioned_p (operands[1])) && flag_pic)
operands[1] = legitimize_pic_address (operands[1], SImode,
((reload_in_progress
|| reload_completed)
@@ -2721,6 +2722,15 @@
return \"add%?\\t%0, %|pc, %0\";
")
+(define_expand "builtin_setjmp_receiver"
+ [(label_ref (match_operand 0 "" ""))]
+ "flag_pic"
+ "
+{
+ arm_finalize_pic (0);
+ DONE;
+}")
+
;; If copying one reg to another we can set the condition codes according to
;; its value. Such a move is common after a return from subroutine and the
;; result is being tested against zero.
@@ -6184,15 +6194,20 @@
abort ();
return \"\";
}
- strcpy (pattern, \"stmfd\\t%m0!, {%1\");
- for (i = 1; i < XVECLEN (operands[2], 0); i++)
+ if (XVECLEN (operands[2], 0) > 1)
{
- strcat (pattern, \", %|\");
- strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
+ strcpy (pattern, \"stmfd\\t%m0!, {%1\");
+ for (i = 1; i < XVECLEN (operands[2], 0); i++)
+ {
+ strcat (pattern, \", %|\");
+ strcat (pattern, reg_names[REGNO (XEXP (XVECEXP (operands[2], 0, i),
0))]);
+ }
+ strcat (pattern, \"}\");
+ output_asm_insn (pattern, operands);
}
- strcat (pattern, \"}\");
- output_asm_insn (pattern, operands);
+ else
+ output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
return \"\";
}"
[(set_attr "type" "store4")])
diff -urN gcc-2.95.3-orig/gcc/config/arm/elf.h gcc-2.95.3/gcc/config/arm/elf.h
--- gcc-2.95.3-orig/gcc/config/arm/elf.h Mon May 31 10:21:53 1999
+++ gcc-2.95.3/gcc/config/arm/elf.h Fri Jul 20 19:39:11 2001
@@ -167,15 +167,6 @@
#define MULTILIB_DEFAULTS { "mlittle-endian", "msoft-float", "mapcs-32", "mno-thumb-interwork" }
#endif
-/* Setting this to 32 produces more efficient code, but the value set in previous
- versions of this toolchain was 8, which produces more compact structures. The
- command line option -mstructure_size_boundary=<n> can be used to change this
- value. */
-#undef STRUCTURE_SIZE_BOUNDARY
-#define STRUCTURE_SIZE_BOUNDARY arm_structure_size_boundary
-
-extern int arm_structure_size_boundary;
-
/* A C expression whose value is nonzero if IDENTIFIER with arguments ARGS
is a valid machine specific attribute for DECL.
The attributes in ATTRIBUTES have previously been assigned to DECL. */
diff -urN gcc-2.95.3-orig/gcc/config/arm/linux-gas.h gcc-2.95.3/gcc/config/arm/linux-gas.h
--- gcc-2.95.3-orig/gcc/config/arm/linux-gas.h Mon Feb 22 17:47:57 1999
+++ gcc-2.95.3/gcc/config/arm/linux-gas.h Fri Jul 20 19:39:11 2001
@@ -1,6 +1,6 @@
/* Definitions of target machine for GNU compiler.
ARM Linux-based GNU systems version.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Russell King <rmk92@ecs.soton.ac.uk>.
This file is part of GNU CC.
@@ -79,5 +79,7 @@
register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
register unsigned long _end __asm ("a2") = (unsigned long) (END); \
register unsigned long _flg __asm ("a3") = 0; \
- __asm __volatile ("swi 0x9f0002"); \
+ __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
}
diff -urN gcc-2.95.3-orig/gcc/config/arm/t-linux gcc-2.95.3/gcc/config/arm/t-linux
--- gcc-2.95.3-orig/gcc/config/arm/t-linux Fri Mar 26 16:30:20 1999
+++ gcc-2.95.3/gcc/config/arm/t-linux Fri Jul 20 20:46:19 2001
@@ -1,6 +1,6 @@
# Just for these, we omit the frame pointer since it makes such a big
# difference. It is then pointless adding debugging.
-TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
+TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
LIBGCC2_DEBUG_CFLAGS = -g0
# Don't build enquire
diff -urN gcc-2.95.3-orig/gcc/final.c gcc-2.95.3/gcc/final.c
--- gcc-2.95.3-orig/gcc/final.c Mon Mar 12 13:07:59 2001
+++ gcc-2.95.3/gcc/final.c Fri Jul 20 19:39:11 2001
@@ -3652,8 +3652,9 @@
output_addr_const (file, XEXP (x, 0));
fprintf (file, "-");
- if (GET_CODE (XEXP (x, 1)) == CONST_INT
- && INTVAL (XEXP (x, 1)) < 0)
+ if ((GET_CODE (XEXP (x, 1)) == CONST_INT
+ && INTVAL (XEXP (x, 1)) < 0)
+ || GET_CODE (XEXP (x, 1)) != CONST_INT)
{
fprintf (file, ASM_OPEN_PAREN);
output_addr_const (file, XEXP (x, 1));
diff -urN gcc-2.95.3-orig/gcc/function.c gcc-2.95.3/gcc/function.c
--- gcc-2.95.3-orig/gcc/function.c Thu Jan 25 15:03:15 2001
+++ gcc-2.95.3/gcc/function.c Fri Jul 20 19:39:10 2001
@@ -3053,6 +3053,105 @@
extracted by usage MEM with narrower mode. */
static rtx purge_addressof_replacements;
+/* Return 1 if X and Y are identical-looking rtx's.
+ This is the Lisp function EQUAL for rtx arguments. */
+
+int
+rtx_equal_for_addressof_p (x, y)
+ rtx x, y;
+{
+ register int i;
+ register int j;
+ register enum rtx_code code;
+ register char *fmt;
+
+ if (x == y)
+ return 1;
+ if (x == 0 || y == 0)
+ return 0;
+
+ code = GET_CODE (x);
+ /* Rtx's of different codes cannot be equal. */
+ if (code != GET_CODE (y))
+ return 0;
+
+ /* (MULT:SI x y) and (MULT:HI x y) are NOT equivalent.
+ (REG:SI x) and (REG:HI x) are NOT equivalent.
+ But (MEM:SI x) and (MEM:HI x) are equivalent for our purposes. */
+
+ if (code != MEM && (GET_MODE (x) != GET_MODE (y)))
+ return 0;
+
+ /* REG, LABEL_REF, and SYMBOL_REF can be compared nonrecursively. */
+
+ if (code == REG)
+ return REGNO (x) == REGNO (y);
+ else if (code == LABEL_REF)
+ return XEXP (x, 0) == XEXP (y, 0);
+ else if (code == SYMBOL_REF)
+ return XSTR (x, 0) == XSTR (y, 0);
+ else if (code == SCRATCH || code == CONST_DOUBLE)
+ return 0;
+
+ /* Compare the elements. If any pair of corresponding elements
+ fail to match, return 0 for the whole things. */
+
+ fmt = GET_RTX_FORMAT (code);
+ for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
+ {
+ switch (fmt[i])
+ {
+ case 'w':
+ if (XWINT (x, i) != XWINT (y, i))
+ return 0;
+ break;
+
+ case 'n':
+ case 'i':
+ if (XINT (x, i) != XINT (y, i))
+ return 0;
+ break;
+
+ case 'V':
+ case 'E':
+ /* Two vectors must have the same length. */
+ if (XVECLEN (x, i) != XVECLEN (y, i))
+ return 0;
+
+ /* And the corresponding elements must match. */
+ for (j = 0; j < XVECLEN (x, i); j++)
+ if (rtx_equal_p (XVECEXP (x, i, j), XVECEXP (y, i, j)) == 0)
+ return 0;
+ break;
+
+ case 'e':
+ if (rtx_equal_p (XEXP (x, i), XEXP (y, i)) == 0)
+ return 0;
+ break;
+
+ case 'S':
+ case 's':
+ if (strcmp (XSTR (x, i), XSTR (y, i)))
+ return 0;
+ break;
+
+ case 'u':
+ /* These are just backpointers, so they don't matter. */
+ break;
+
+ case '0':
+ break;
+
+ /* It is believed that rtx's at this level will never
+ contain anything but integers and other rtx's,
+ except for within LABEL_REFs and SYMBOL_REFs. */
+ default:
+ abort ();
+ }
+ }
+ return 1;
+}
+
/* Helper function for purge_addressof. See if the rtx expression at *LOC
in INSN needs to be changed. If FORCE, always put any ADDRESSOFs into
the stack. */
@@ -3133,7 +3232,7 @@
for (tem = purge_bitfield_addressof_replacements;
tem != NULL_RTX;
tem = XEXP (XEXP (tem, 1), 1))
- if (rtx_equal_p (x, XEXP (tem, 0)))
+ if (rtx_equal_for_addressof_p (x, XEXP (tem, 0)))
{
*loc = XEXP (XEXP (tem, 1), 0);
return;
@@ -3143,7 +3242,7 @@
for (tem = purge_addressof_replacements;
tem != NULL_RTX;
tem = XEXP (XEXP (tem, 1), 1))
- if (rtx_equal_p (XEXP (x, 0), XEXP (tem, 0)))
+ if (rtx_equal_for_addressof_p (XEXP (x, 0), XEXP (tem, 0)))
{
rtx z = XEXP (XEXP (tem, 1), 0);
diff -urN gcc-2.95.3-orig/gcc/jump.c gcc-2.95.3/gcc/jump.c
--- gcc-2.95.3-orig/gcc/jump.c Thu Oct 21 08:24:03 1999
+++ gcc-2.95.3/gcc/jump.c Fri Jul 20 19:39:10 2001
@@ -115,7 +115,7 @@
static rtx delete_unreferenced_labels PROTO((rtx));
static void delete_noop_moves PROTO((rtx));
static int calculate_can_reach_end PROTO((rtx, int, int));
-static int duplicate_loop_exit_test PROTO((rtx));
+static int duplicate_loop_exit_test PROTO((rtx, int));
static void find_cross_jump PROTO((rtx, rtx, int, rtx *, rtx *));
static void do_cross_jump PROTO((rtx, rtx, rtx));
static int jump_back_p PROTO((rtx, rtx));
@@ -338,7 +338,7 @@
&& simplejump_p (temp1))
{
temp = PREV_INSN (insn);
- if (duplicate_loop_exit_test (insn))
+ if (duplicate_loop_exit_test (insn, after_regscan))
{
changed = 1;
next = NEXT_INSN (temp);
@@ -2548,8 +2548,9 @@
values of regno_first_uid and regno_last_uid. */
static int
-duplicate_loop_exit_test (loop_start)
+duplicate_loop_exit_test (loop_start, after_regscan)
rtx loop_start;
+ int after_regscan;
{
rtx insn, set, reg, p, link;
rtx copy = 0, first_copy = 0;
@@ -2662,6 +2663,9 @@
reg_map[REGNO (reg)] = gen_reg_rtx (GET_MODE (reg));
}
}
+
+ if (after_regscan)
+ reg_scan_update (exitcode, lastexit, max_reg);
/* Now copy each insn. */
for (insn = exitcode; insn != lastexit; insn = NEXT_INSN (insn))
diff -urN gcc-2.95.3-orig/gcc/varasm.c gcc-2.95.3/gcc/varasm.c
--- gcc-2.95.3-orig/gcc/varasm.c Mon Feb 19 15:02:02 2001
+++ gcc-2.95.3/gcc/varasm.c Fri Jul 20 19:39:11 2001
@@ -3286,7 +3286,10 @@
value->un.addr.offset = - INTVAL (XEXP (x, 1));
}
else
- abort ();
+ {
+ value->un.addr.base = x;
+ value->un.addr.offset = 0;
+ }
break;
default:

@ -1,35 +0,0 @@
# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.3&r2=1.4
# Should fix error
# Configuration powerpc-host_apple-darwin7.3.0 not supported
# when configuring gcc-2.95 on Mac OS X for i686 target
# Also create xm-darwin.h, seems to be required, else we get the error
# In file included from .../gcc-2.95.3/gcc/gencheck.c:21:
# hconfig.h:11:30: rs6000/xm-darwin.h: No such file or directory
# make[1]: *** [gencheck.o] Error 1
--- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
+++ gcc-2.95.3/gcc/configure 2004-03-24 17:14:38.000000000 -0800
@@ -5079,6 +5079,10 @@
tmake_file=rs6000/t-beos
xmake_file=rs6000/x-beos
;;
+ powerpc-*-darwin*)
+ xm_file="rs6000/xm-rs6000.h rs6000/xm-darwin.h"
+ xmake_file=rs6000/x-darwin
+ ;;
powerpc-*-sysv* | powerpc-*-elf*)
tm_file=rs6000/sysv4.h
xm_file="xm-siglist.h rs6000/xm-sysv4.h"
--- /dev/null 2003-01-30 02:24:37.000000000 -0800
+++ gcc-3.0.4/gcc/config/rs6000/xm-darwin.h 2000-11-20 19:02:09.000000000 -0800
@@ -0,0 +1,9 @@
+/* Undo the USG definition in xm-rs6000.h, Darwin is a BSD flavor. */
+
+#undef USG
+
+/* Override the usual setting, since Apple's GCC has lame bugs and
+ can't handle the initializers. Someday the bugs will be fixed and
+ we can get rid of this silliness. */
+
+#define HAVE_DESIGNATED_INITIALIZERS 0

@ -1,39 +0,0 @@
# Taken from http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config.gcc.diff?r1=1.91&r2=1.92
# Should fix error
# Configuration x86_64-host_unknown-linux-gnu not supported
# when configuring gcc-2.95 on x86_64 build for i686 target
# It's a bit silly, since tm_file refers to files that don't exist,
# but as long as x86_64 is just the build machine, that doesn't matter.
--- gcc-2.95.3/gcc/configure.old 2004-03-24 12:17:44.000000000 -0800
+++ gcc-2.95.3/gcc/configure 2004-03-24 12:19:30.000000000 -0800
@@ -2929,6 +2929,9 @@
i[34567]86-*-*)
cpu_type=i386
;;
+ x86_64-*-*)
+ cpu_type=i386
+ ;;
hppa*-*-*)
cpu_type=pa
;;
@@ -3643,6 +3646,19 @@
thread_file='posix'
fi
;;
+ x86_64-*-linux*)
+ xmake_file=x-linux
+ tm_file="i386/biarch64.h i386/i386.h i386/att.h linux.h i386/x86-64.h \
+ i386/linux64.h"
+ tmake_file="t-slibgcc-elf-ver t-linux i386/t-crtstuff"
+ extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
+ gnu_ld=yes
+ float_format=i386
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ fi
+ ;;
+
i[34567]86-*-gnu*)
float_format=i386
;;

File diff suppressed because it is too large Load Diff

@ -1,31 +0,0 @@
[See also http://gcc.gnu.org/ml/libstdc++/2001-11/msg00133.html ]
Date: Fri, 16 Nov 2001 16:06:22 -0500
From: Phil Edwards <pedwards at disaster dot jaj dot com>
To: gcc-patches at gcc dot gnu dot org
Subject: [libstdc++ trunk & 3.0] Fix deque memory leak
Message-ID: <20011116160622.A23094@disaster.jaj.com>
As discussed on the libstdc++ mailing list. Tested on i686/linux.
2001-11-16 Paolo Carlini <pcarlini@unitus.it>
* include/bits/stl_deque.h (deque::erase()): Fix memory leak.
[rediffed against 2.95.3 -- dank]
--- gcc-2.95.3/libstdc++/stl/stl_deque.h.old 2001-01-01 09:48:22.000000000 -0800
+++ gcc-2.95.3/libstdc++/stl/stl_deque.h 2006-02-18 15:24:17.000000000 -0800
@@ -1052,7 +1052,7 @@
copy_backward(_M_start, __first, __last);
iterator __new_start = _M_start + __n;
destroy(_M_start, __new_start);
- _M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+ _M_destroy_nodes(_M_start._M_node, __new_start._M_node); /* fixed per http://gcc.gnu.org/ml/libstdc++/2001-11/msg00139.html */
_M_start = __new_start;
}
else {

@ -1,33 +0,0 @@
[ Building gcc-2.95.3 on cygwin yields a compiler that sticks a .exe
on the end of every executable, even if they're linux executable.
This is highly annoying, and causes glibc build failures that look like this:
mv: `.../bin/makedb.new' and `.../bin/makedb' are the same file
make[2]: *** [.../bin/makedb] Error 1
make[2]: Leaving directory `.../gcc-2.95.3-glibc-2.1.3/glibc-2.1.3/db2'
The mainline solves this with http://gcc.gnu.org/ml/gcc-cvs/2001-04/msg00440.html,
but that doesn't apply cleanly to gcc-2.95.3.
So, I'm using
http://www.uclinux.org/pub/uClinux/uclinux-elf-tools/tools-20030314/gcc-2.95.3-cygwin-020611.patch
This is the only patch in crosstool that *isn't* suitable for the mainline.
I can live with this patch simply because crosstool does not build
compilers that target cygwin or VAX/VMS.
If that ever changes, I might need to try applying the real patch.
]
#
# This patch can be found at http://www.uclinux.org/pub/uClinux/m68k-elf-tools/
#
--- gcc-2.95.3/gcc/config/i386/xm-cygwin.h 1999-04-22 16:40:56.000000000 +0200
+++ gcc-2.95.3-cygwin/gcc/config/i386/xm-cygwin.h 2002-06-11 08:23:18.000000000 +0200
@@ -19,7 +19,6 @@
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#define EXECUTABLE_SUFFIX ".exe"
#define NO_SYS_SIGLIST 1
/* We support both "/" and "\" since everybody tests both but we

@ -1,44 +0,0 @@
#
# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
#
# Error:
#
# creating libintl.h
# Configuring etc...
# loading cache ../config.cache
# checking for a BSD compatible install... (cached) /usr/bin/install -c
# creating ./config.status
# creating Makefile
# trap: usage: trap [-lp] [[arg] signal_spec ...]
#
# Description:
#
# non-posix conform usage of trap causes bash >= 3.0 to fail
# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
#
# Status:
#
# fixed in gcc >= 3.3.5
# backport of gcc-3.3.5 fix
#
diff -ruN gcc-2.95.3-orig/configure gcc-2.95.3/configure
--- gcc-2.95.3-orig/configure 1999-04-02 16:17:40.000000000 +0200
+++ gcc-2.95.3/configure 2005-04-20 18:25:45.030488235 +0200
@@ -687,7 +687,7 @@
if test -f skip-this-dir; then
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
- trap 0
+ trap '' 0
rm -f Makefile* ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
# Execute the final clean-up actions
${config_shell} skip-this-dir
@@ -1599,7 +1599,7 @@
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
-trap 0
+trap '' 0
exit 0

@ -1,28 +0,0 @@
See http://gcc.gnu.org/PR3106
Backported from gcc-3.0.x
Fixes error
.../binutils-2.11.2/libiberty/strerror.c:468: error: conflicting types for `sys_nerr'
/usr/include/stdio.h:258: error: previous declaration of `sys_nerr'
make[1]: *** [strerror.o] Error 1
make: *** [all-libiberty] Error 2
on Mac OS X.
--- gcc-2.95.3/libiberty/strerror.c.old 2004-03-24 16:23:19.000000000 -0800
+++ gcc-2.95.3/libiberty/strerror.c 2004-03-24 16:23:48.000000000 -0800
@@ -13,6 +13,7 @@
incompatible with our later declaration, perhaps by using const
attributes. So we hide the declaration in errno.h (if any) using a
macro. */
+#define sys_nerr sys_nerr__
#define sys_errlist sys_errlist__
#endif
@@ -20,6 +21,7 @@
#include <errno.h>
#ifdef HAVE_SYS_ERRLIST
+#undef sys_nerr
#undef sys_errlist
#endif

@ -1,28 +0,0 @@
This fixes the error
In file included from gthr-default.h:1,
from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/gthr.h:98,
from /build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/gcc-2.95.3/gcc/libgcc2.c:3034:
/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
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/build/arm-unknown-linux-gnu/gcc-2.95.3-glibc-2.2.2/build-gcc-core/gcc'
in what I think is a nicer way than the patch used by the arm team,
i.e. "perl -pi -e 's/^(TARGET_LIBGCC2_CFLAGS.*)/$1 -Dinhibit_libc -D__gthr_posix_h/' gcc/config/arm/t-linux"
which seems a bit of a kludge.
--- gcc-2.95.3/gcc/configure.old Fri Mar 16 06:13:48 2001
+++ gcc-2.95.3/gcc/configure Sun Jun 8 13:02:20 2003
@@ -853,9 +853,9 @@
# Check whether --enable-threads or --disable-threads was given.
if test "${enable_threads+set}" = set; then
enableval="$enable_threads"
- if test x$enable_threads = xno; then
- enable_threads=''
-fi
+ #if test x$enable_threads = xno; then
+ #enable_threads=''
+ #fi
else
enable_threads=''
fi

@ -1,72 +0,0 @@
When configuring a s390->s390 or cris->cris crosscompiler
(ok, I haven't hit this yet, but one of these days I'll get me an account
on an s390, and then I'll need this patch :-), you'll get the
following error:
+ /build/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/gcc-3.3/configure
--target=s390-unknown-linux-gnu --host=s390-host_unknown-linux-gnu
--prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2
--enable-languages=c
--with-local-prefix=/result/s390-unknown-linux-gnu/gcc-3.3-glibc-2.3.2/s390-
unknown-linux-gnu --enable-threads=no --without-headers --with-newlib
--disable-shared
...
*** --with-headers is only supported when cross compiling
This error pops up only when you're using Daniel Jacobowitz's technique
of slightly changing the target and host tuples to make them different
enough to force gcc's build system to not try to pull in system libraries
or headers. This technique is needed e.g. to build an x86 -> x86
cross-compiler.
(The LFS developers ran into the same bug that prompted me to use
this technique; they point people who run into it to
http://linuxfromscratch.org/~greg/pure_lfs.txt, which is a different
way of avoiding this problem. I think the tuple tweak is the way to go, though.)
config-patches@gnu.org rejected this patch, on the grounds that there
is only one vendor of each of those two architectures, so the
canonicalization is by definition correct. When I pointed out the
difficulty this causes for people building s390 -> s390 or
cris -> cris compilers that are incompatible with the system
libraries and thus must be built like cross-compilers, he grumped and said
"autoconf should let you specify a cross-compiler in some other way than
comparing tuple strings".
--- gcc-3.3/config.sub.old Sun Jun 8 20:38:47 2003
+++ gcc-3.3/config.sub Sun Jun 8 20:40:34 2003
@@ -433,9 +433,12 @@
crds | unos)
basic_machine=m68k-crds
;;
- cris | cris-* | etrax*)
+ cris | etrax*)
basic_machine=cris-axis
;;
+ cris-*)
+ basic_machine=cris-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -820,11 +823,17 @@
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
- s390 | s390-*)
+ s390)
basic_machine=s390-ibm
;;
- s390x | s390x-*)
+ s390-*)
+ basic_machine=s390-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ s390x)
basic_machine=s390x-ibm
+ ;;
+ s390x-*)
+ basic_machine=s390x-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
sa29200)
basic_machine=a29k-amd

@ -1,105 +0,0 @@
# See http://gcc.gnu.org/PR7383, http://www.kegel.com/xgcc3/ppc405erratum77.html
# Fixed in gcc-3.3
diff -aur gcc-20020722.orig/gcc/config/rs6000/rs6000.h gcc-20020722/gcc/config/rs6000/rs6000.h
--- gcc-20020722.orig/gcc/config/rs6000/rs6000.h Thu Jul 25 09:32:21 2002
+++ gcc-20020722/gcc/config/rs6000/rs6000.h Thu Jul 25 09:34:45 2002
@@ -66,7 +66,7 @@
%{mcpu=rsc1: -D_ARCH_PWR} \
%{mcpu=401: -D_ARCH_PPC} \
%{mcpu=403: -D_ARCH_PPC} \
-%{mcpu=405: -D_ARCH_PPC} \
+%{mcpu=405: -D_ARCH_PPC -D__PPC405__} \
%{mcpu=505: -D_ARCH_PPC} \
%{mcpu=601: -D_ARCH_PPC -D_ARCH_PWR} \
%{mcpu=602: -D_ARCH_PPC} \
diff -aur gcc-20020722.orig/libjava/sysdep/powerpc/locks.h gcc-20020722/libjava/sysdep/powerpc/locks.h
--- gcc-20020722.orig/libjava/sysdep/powerpc/locks.h Thu Jul 25 09:32:30 2002
+++ gcc-20020722/libjava/sysdep/powerpc/locks.h Thu Jul 25 11:39:13 2002
@@ -11,6 +11,17 @@
#ifndef __SYSDEP_LOCKS_H__
#define __SYSDEP_LOCKS_H__
+#ifdef __PPC405__
+// workaround for PPC405 erratum #77 - 07/18/02 JRO, dank, NN. References:
+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
+// http://www.kegel.com/xgcc3/ppc405erratum77.html
+// FIXME: using dbct instead of sync would be faster
+#define __LIBGCJ_PPC405_ERR77_SYNC "sync \n\t"
+#else
+#define __LIBGCJ_PPC405_ERR77_SYNC
+#endif
+
typedef size_t obj_addr_t; /* Integer type big enough for object */
/* address. */
@@ -25,6 +36,7 @@
"0: lwarx %0,0,%1 ;"
" xor. %0,%3,%0;"
" bne 1f;"
+ __LIBGCJ_PPC405_ERR77_SYNC
" stwcx. %2,0,%1;"
" bne- 0b;"
"1: "
@@ -58,6 +70,7 @@
"0: lwarx %0,0,%1 ;"
" xor. %0,%3,%0;"
" bne 1f;"
+ __LIBGCJ_PPC405_ERR77_SYNC
" stwcx. %2,0,%1;"
" bne- 0b;"
"1: "
diff -aur gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h
--- gcc-20020722.orig/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:32:31 2002
+++ gcc-20020722/libstdc++-v3/config/cpu/powerpc/bits/atomicity.h Thu Jul 25 09:34:45 2002
@@ -32,6 +32,17 @@
typedef int _Atomic_word;
+#ifdef __PPC405__
+// workaround for PPC405 erratum #77 - 07/18/02 JRO & dank. References:
+// http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
+// http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
+// http://www.kegel.com/xgcc3/ppc405erratum77.html
+// FIXME: using dbct instead of sync would be faster
+#define __LIBSTDCPP_PPC405_ERR77_SYNC "sync \n\t"
+#else
+#define __LIBSTDCPP_PPC405_ERR77_SYNC
+#endif
+
static inline _Atomic_word
__attribute__ ((__unused__))
__exchange_and_add (volatile _Atomic_word* __mem, int __val)
@@ -42,6 +53,7 @@
"0:\t"
"lwarx %0,0,%2 \n\t"
"add%I3 %1,%0,%3 \n\t"
+ __LIBSTDCPP_PPC405_ERR77_SYNC
"stwcx. %1,0,%2 \n\t"
"bne- 0b \n\t"
"/* End exchange & add */"
@@ -61,6 +73,7 @@
"0:\t"
"lwarx %0,0,%1 \n\t"
"add%I2 %0,%0,%2 \n\t"
+ __LIBSTDCPP_PPC405_ERR77_SYNC
"stwcx. %0,0,%1 \n\t"
"bne- 0b \n\t"
"/* End atomic add */"
@@ -78,6 +91,7 @@
"/* Inline always swap */\n"
"0:\t"
"lwarx %0,0,%1 \n\t"
+ __LIBSTDCPP_PPC405_ERR77_SYNC
"stwcx. %2,0,%1 \n\t"
"bne- 0b \n\t"
"/* End always swap */"
@@ -98,6 +112,7 @@
"lwarx %0,0,%1 \n\t"
"cmpwi %0,0 \n\t"
"bne- 1f \n\t"
+ __LIBSTDCPP_PPC405_ERR77_SYNC
"stwcx. %2,0,%1 \n\t"
"bne- 0b \n"
"1:\n\t"

File diff suppressed because it is too large Load Diff

@ -1,98 +0,0 @@
g++ testsuite fixes for cross-compilers, Dan Kegel, Ixia Communications, 12 July 2003
The first hunk fixes the error
/testsuite_flags: /testsuite_flags: No such file or directory
while executing
"exec sh ${odir_v3}/testsuite_flags --build-includes"
(procedure "g++_include_flags" line 21)
invoked from within
"g++_include_flags [get_multilibs] "
(procedure "g++_init" line 63)
invoked from within
"${tool}_init $test_file_name"
(procedure "runtest" line 19)
invoked from within
"runtest $test_name"
("foreach" body line 42)
invoked from within
...
make[1]: [check-g++] Error 1 (ignored)
The fix isn't especially pretty, but it worked for me, and can't hurt the
more common native compiler case. Maybe someone who knows the code better
can come up with a better fix.
The second hunk fixes the error
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
when trying to compile g++ testcases (!); setting up
the shared library environment when running crosstests of g++
should either be done by a special board file, or by
setting up a remote chroot environment (see http://kegel.com/crosstool),
not by blithely setting LD_LIBRARY_PATH on the local system.
--- gcc-3.2.3/gcc/testsuite/lib/g++.exp.old Fri Jul 11 15:42:47 2003
+++ gcc-3.2.3/gcc/testsuite/lib/g++.exp Sat Jul 12 12:57:07 2003
@@ -72,6 +72,8 @@
#
proc g++_include_flags { paths } {
global srcdir
+ global objdir
+ global target_triplet
global HAVE_LIBSTDCXX_V3
global TESTING_IN_BUILD_TREE
@@ -90,6 +92,20 @@
if { ${HAVE_LIBSTDCXX_V3} } {
set odir_v3 [lookfor_file ${gccpath} libstdc++-v3]
+ if { $odir_v3 == "" } {
+ verbose "g++_include_flags: couldn't find libstdc++-v3 on first try, now looking in build directory $objdir"
+ # first assume no multilibs
+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
+ }
+ if { $odir_v3 == "" } {
+ verbose "g++_include_flags: couldn't find libstdc++-v3 on second try, trying multilib"
+ # assume multilib only one level deep
+ set multisub [file tail $gccpath]
+ set odir_v3 [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
+ }
+ if { $odir_v3 == "" } {
+ error "Can't find libstdc++-v3"
+ }
append flags [exec sh ${odir_v3}/testsuite_flags --build-includes]
} else {
set odir_v2 [lookfor_file ${gccpath} libstdc++]
@@ -192,16 +192,20 @@
}
}
- # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
- # (for the 64-bit ABI). The right way to do this would be to modify
- # unix.exp -- but that's not an option since it's part of DejaGNU
- # proper, so we do it here. We really only need to do
- # this on IRIX, but it shouldn't hurt to do it anywhere else.
- setenv LD_LIBRARY_PATH $ld_library_path
- setenv SHLIB_PATH $ld_library_path
- setenv LD_LIBRARYN32_PATH $ld_library_path
- setenv LD_LIBRARY64_PATH $ld_library_path
+ if {![is_remote target]} {
+ # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
+ # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
+ # (for the 64-bit ABI). The right way to do this would be to modify
+ # unix.exp -- but that's not an option since it's part of DejaGNU
+ # proper, so we do it here. We really only need to do
+ # this on IRIX, but it shouldn't hurt to do it anywhere else.
+
+ # Doing this causes us to be unable to run cross-compilers.
+ setenv LD_LIBRARY_PATH $ld_library_path
+ setenv SHLIB_PATH $ld_library_path
+ setenv LD_LIBRARYN32_PATH $ld_library_path
+ setenv LD_LIBRARY64_PATH $ld_library_path
+ }
return "$flags"
}

File diff suppressed because it is too large Load Diff

@ -1,54 +0,0 @@
Based on gcc-3.4.0/gcc-3.3.3h-ppc-asm-spec.patch
Fixes the following errors when building gcc for ppc7450:
/tmp/ccYph3gd.s: Assembler messages:
/tmp/ccYph3gd.s:3823: Error: Unrecognized opcode: `mfvrsave'
/tmp/ccYph3gd.s:3857: Error: Unrecognized opcode: `stvx'
/tmp/ccYph3gd.s:4026: Error: Unrecognized opcode: `lvx'
/tmp/ccYph3gd.s:4027: Error: Unrecognized opcode: `mtvrsave'
make[2]: *** [libgcc/./unwind-dw2.o] Error 1
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'
make[1]: *** [stmp-multilib] Error 2
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'
make: *** [all-gcc] Error 2
Note that the "-mcpu=7450" option must appear on the "gcc" command line in
order for "-maltivec" to be passed to the assembler. Or, "-maltivec" itself
may be passed to the "gcc" command.
Contributed by Tom Warzeka <waz@quahog.npt.nuwc.navy.mil>
===================================================================
--- gcc-3.2.3/gcc/config/rs6000/rs6000.h~ 2003-03-29 07:39:20.000000000 -0500
+++ gcc-3.2.3/gcc/config/rs6000/rs6000.h 2004-08-23 16:33:21.000000000 -0400
@@ -77,8 +77,8 @@
%{mcpu=604e: -D_ARCH_PPC} \
%{mcpu=620: -D_ARCH_PPC} \
%{mcpu=740: -D_ARCH_PPC} \
-%{mcpu=7400: -D_ARCH_PPC} \
-%{mcpu=7450: -D_ARCH_PPC} \
+%{mcpu=7400: -D_ARCH_PPC -D__ALTIVEC__} \
+%{mcpu=7450: -D_ARCH_PPC -D__ALTIVEC__} \
%{mcpu=750: -D_ARCH_PPC} \
%{mcpu=801: -D_ARCH_PPC} \
%{mcpu=821: -D_ARCH_PPC} \
@@ -117,14 +117,15 @@
%{mcpu=604e: -mppc} \
%{mcpu=620: -mppc} \
%{mcpu=740: -mppc} \
-%{mcpu=7400: -mppc} \
-%{mcpu=7450: -mppc} \
+%{mcpu=7400: -mppc -maltivec} \
+%{mcpu=7450: -mppc -maltivec} \
%{mcpu=750: -mppc} \
%{mcpu=801: -mppc} \
%{mcpu=821: -mppc} \
%{mcpu=823: -mppc} \
%{mcpu=860: -mppc} \
-%{maltivec: -maltivec}"
+%{maltivec: -maltivec} \
+-many"
#define CPP_DEFAULT_SPEC ""

@ -1,45 +0,0 @@
#
# Submitted-By: Marc Kleine-Budde <mkl@pengutronix.de>, 2005-04-20
#
# Error:
#
# creating libintl.h
# Configuring etc...
# loading cache ../config.cache
# checking for a BSD compatible install... (cached) /usr/bin/install -c
# creating ./config.status
# creating Makefile
# trap: usage: trap [-lp] [[arg] signal_spec ...]
#
# Description:
#
# non-posix conform usage of trap causes bash >= 3.0 to fail
#
# e.g.: http://sourceware.org/ml/crossgcc/2004-12/msg00132.html
#
# Status:
#
# fixed in gcc >= 3.3.5
# backport of gcc-3.3.5 fix
#
diff -ruN gcc-3.2.3-orig/configure gcc-3.2.3/configure
--- gcc-3.2.3-orig/configure 2002-06-24 18:14:28.000000000 +0200
+++ gcc-3.2.3/configure 2005-04-20 18:42:49.000000000 +0200
@@ -697,7 +697,7 @@
if test -f skip-this-dir; then
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
- trap 0
+ trap '' 0
rm -rf Makefile* ${tmpdir}
# Execute the final clean-up actions
${config_shell} skip-this-dir
@@ -1615,7 +1615,7 @@
# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
# and reset the trap handler.
rm -rf ${tmpdir}
-trap 0
+trap '' 0
exit 0

@ -1,54 +0,0 @@
Without this patch, the command
RUNTESTFLAGS=--target=powerpc-750-linux-gnu -v -v -v -v make check-target-libstdc++-v3
fails in two ways:
1. the -L option meant to locate the testsuite directory is incorrect, and
2. the wrong compiler is invoked, causing all sorts of havoc, not least of which
is the native compiler is invoked when we really wanted to invoke the cross-compiler
we just built.
Here's an example log of the problem in action. Every testcase fails, this shows just one:
-------------
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
compiler exited with status 1
output is:
/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
/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
/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
/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
/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
...
FAIL: 20_util/binders.cc (test for excess errors)
WARNING: 20_util/binders.cc compilation failed to produce executable
-------------
And here's the patch. I'm not happy with it, and it probably gets some cases wrong,
but it seems to work for the common native case and for my cross-compiler case.
--- gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp.old Sun Jul 13 10:42:01 2003
+++ gcc-3.3/libstdc++-v3/testsuite/lib/libstdc++-v3-dg.exp Sun Jul 13 11:39:54 2003
@@ -46,8 +46,23 @@
global gluefile wrap_flags
global ld_library_path
global tool_root_dir
+ global target_triplet
set blddir [lookfor_file [get_multilibs] libstdc++-v3]
+ if { $blddir == "" } {
+ set multilibs [get_multilibs]
+ # FIXME: assume multilib only one level deep
+ set multisub [file tail $multilibs]
+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3 in $multilibs, trying $objdir"
+ set blddir [lookfor_file ${objdir} "$target_triplet/$multisub/libstdc++-v3"]
+ }
+ if { $blddir == "" } {
+ verbose "libstdc++-v3-init: couldn't find libstdc++-v3, trying $objdir without multilibs"
+ set blddir [lookfor_file ${objdir} "$target_triplet/libstdc++-v3"]
+ }
+ if { $blddir == "" } {
+ error "Can't find libstdc++-v3"
+ }
# By default, we assume we want to run program images.
global dg-do-what-default

File diff suppressed because it is too large Load Diff

@ -1,16 +0,0 @@
http://mirror.sh-linux.org/rpm-2003/SRPMS/gcc-3.2.3-3.src.rpm contains the following patches:
gcc-20030210-sh-linux-1.patch
gcc-3.2.3-libffi-1.patch
gcc-3.2.3-sh-linux-dwarf2-1.patch (*not* applied by the spec file, it's in there by accident)
gcc-3.2.3-libffi-1.patch was needed just to build, I think.
After that was applied, sh4 gcc seemed to compile fine, but c++ programs
failed to execute because libstdc++.so.5 was built without version
info. This was caused directly by libstdc++-v3/configure setting
SYMVER_MAP=config/linker-map.dummy because it sees that
no libgcc_s.so was generated; configure says
checking for shared libgcc... no.
Applying gcc-20030210-sh-linux-1.patch in hopes it makes those problems go away.

@ -1,739 +0,0 @@
Summary: The GNU Compiler Collection for SuperH.
%define GCC_VERSION 3.2.3
%define arch_list sh3-linux sh3eb-linux sh4-linux sh4eb-linux
%define TARGET_LIBSTDC 1
%define TARGET_JAVA 1
Name: gcc
Version: 3.2.3
Release: 3
Copyright: GPL
Group: Development/Languages
Source0: gcc-%{GCC_VERSION}.tar.bz2
Patch1: gcc-20030210-sh-linux-1.patch
Patch2: gcc-3.2.3-libffi-1.patch
Patch3: gcc-3.2.3-sh-linux-dwarf2-1.patch
Buildroot: /var/tmp/gcc-%{_target}-root
ExclusiveArch: i386 sh3 sh3eb sh4 sh4eb
%description
This package contains the GNU Compiler Collection: gcc and g++.
You'll need this package in order to compile C/C++ code.
%ifarch i386
# ==================== Cross Compiler ===============================
%package sh-linux
Summary: The GNU Compiler Collection for sh-linux.
Group: Development/Languages
Requires: binutils-sh-linux >= 2.13.2
Provides: gcc-sh-linux
Obsoletes: gcc-sh3-linux gcc-sh3eb-linux gcc-sh4-linux gcc-sh4eb-linux
Obsoletes: gcc-sh3-linux-c++ gcc-sh3eb-linux-c++ gcc-sh4-linux-c++ gcc-sh4eb-linux-c++
Obsoletes: libstdc++-sh3-linux libstdc++-sh3eb-linux libstdc++-sh4-linux libstdc++-sh4eb-linux
AutoReqProv: no
%description sh-linux
The gcc-sh-linux package contains GNU Compiler Collection: gcc g++ and libstdc++-v3.
It includes support for most of the current C++ specification, including templates and
exception handling. It does also include the standard C++ library and C++ header files.
You'll need this package in order to cross compile C/C++ code for sh-linux.
%package -n libgcj-sh-linux
Summary: Header files and libraries for sh-linux Java development.
Group: Development/Libraries
Requires: gcc-sh-linux = %{version}-%{release}
AutoReqProv: no
%description -n libgcj-sh-linux
The Java static libraries and C header files. You will need this
package to compile your Java programs for sh-linux using the gcc Java compiler (gcj).
%else
# =========================== Native Compiler =================================
%package libgcc
Summary: runtime libraries for the GNU Compiler Collection.
Group: System Environment/Libraries
%description libgcc
This package contains libgcc shared libraries for the GNU C Compiler Collection.
You'll need this package in order to execute C,C++,JAVA code
that uses shared libgcc.
%package c++
Summary: C++ support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}
%description c++
This package adds C++ support to the GNU Compiler Collection. It includes
support for most of the current C++ specification, including templates and
exception handling. It does include the static standard C++
library and C++ header files; the library for dynamically linking
programs is available separately.
%package -n libstdc++
Summary: GNU c++ library.
Group: System Environment/Libraries
%description -n libstdc++
The libstdc++ package contains a snapshot of the GCC Standard C++
Library v3, an ongoing project to implement the ISO 14882 Standard C++
library.
%package -n libstdc++-devel
Summary: Header files and libraries for C++ development
Group: Development/Libraries
Requires: libstdc++ = %{version}-%{release}, gcc-c++ = %{version}-%{release}
%description -n libstdc++-devel
This is the GNU implementation of the standard C++ libraries. This
package includes the header files and libraries needed for C++
development. This includes SGI's implementation of the STL.
%package java
Summary: Java support for gcc
Group: Development/Languages
Requires: gcc = %{version}-%{release}, libgcj = %{version}-%{release}, libgcj-devel = %{version}-%{release}
%description java
This package adds experimental support for compiling Java(tm) programs and
bytecode into native code. To use this you will also need the libgcj and
libgcj-devel packages.
%package -n libgcj
Summary: Java runtime library for gcc.
Group: System Environment/Libraries
%description -n libgcj
The Java runtime library. You will need this package to run your Java
programs compiled using the gcc Java compiler (gcj).
%package -n libgcj-devel
Summary: Header files and libraries for Java development.
Group: Development/Libraries
Requires: libgcj = %{version}-%{release}
%description -n libgcj-devel
The Java static libraries and C header files. You will need this
package to compile your Java programs using the gcc Java compiler (gcj).
%endif
%prep
%setup -q -n gcc-%{GCC_VERSION}
%patch1 -p1
%patch2 -p1
##%patch3 -p1
%build
%ifarch i386
# build cross compiler for i386-linux host
for arch in sh-linux; do
rm -rf ${arch}
mkdir ${arch}
CONFIG_ARGS="\
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--target=${arch} \
--host=%{_host} \
--build=%{_build} \
--enable-languages=c,c++,java \
--with-system-zlib \
--with-gxx-include-dir=%{_prefix}/${arch}/include/g++-v3 \
--includedir=%{_prefix}/${arch}/include \
--disable-checking \
--disable-shared \
--enable-__cxa_atexit \
--enable-c99 \
--enable-threads=posix \
--enable-long-long"
if [ %{TARGET_JAVA} -ne 0 ]; then
CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
fi
( cd $arch
../configure ${CONFIG_ARGS}
)
if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
fi
make all-gcc -C ${arch}
if [ %{TARGET_LIBSTDC} -ne 0 ]; then
CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host" all-target-libstdc++-v3 -C ${arch}
fi
if [ %{TARGET_JAVA} -ne 0 ]; then
make all-fastjar -C ${arch}
CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--host=%{_host}/--host=${arch}/`"
dir=`pwd`
ac_cv_file__proc_self_exe=yes \
ac_cv_prog_GCJ="$dir/$arch/gcc/gcj -B$dir/$arch/$arch/libjava/ -B$dir/$arch/gcc/ -B%{_prefix}/$arch/bin/ -B%{_prefix}/$arch/lib/ -isystem %{_prefix}/$arch/include" \
make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-cross-host --enable-multilib --with-target-subdir=${arch} --with-x=no" \
all-target-libjava -C ${arch}
fi
%else
# Canadian cross (build native compiler)
for arch in %{_target}; do
rm -rf ${arch}
mkdir -p ${arch}
CONFIG_ARGS="\
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--target=${arch} \
--host=${arch} \
--build=%{_build} \
--enable-languages=c,c++,java \
--with-system-zlib \
--with-gxx-include-dir=%{_prefix}/include/g++-v3 \
--disable-checking \
--disable-shared \
--enable-__cxa_atexit \
--enable-c99 \
--enable-threads=posix \
--enable-long-long"
if [ %{TARGET_JAVA} -ne 0 ]; then
CONFIG_ARGS="$CONFIG_ARGS --enable-libgcj"
fi
( cd ${arch}
CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ \
../configure $CONFIG_ARGS
)
if [ %{TARGET_LIBSTDC} -ne 0 -o %{TARGET_JAVA} -ne 0 ]; then
sed -e s:-Dinhibit_libc::g ${arch}/gcc/Makefile >${arch}/gcc/Makefile.$$$
mv -f ${arch}/gcc/Makefile.$$$ ${arch}/gcc/Makefile
fi
make all-build-libiberty all-gcc -C ${arch}
if [ %{TARGET_LIBSTDC} -ne 0 ]; then
CONFIG_ARGS="`echo $CONFIG_ARGS | sed -e s/--disable-shared/--enable-shared/`"
make TARGET_CONFIGARGS="${CONFIG_ARGS}" all-target-libstdc++-v3 -C ${arch}
if [ %{TARGET_JAVA} -ne 0 ]; then
( mkdir -p ${arch}/fastjar; cd ${arch}/fastjar; rm *; ../../fastjar/configure --with-system-zlib; make )
ac_cv_file__proc_self_exe=yes \
CC=${arch}-gcc AR=${arch}-ar RANLIB=${arch}-ranlib CXX=${arch}-g++ GCJ=${arch}-gcj \
make TARGET_CONFIGARGS="${CONFIG_ARGS} --with-x=no" configure-target-libjava -C ${arch}
make -C ${arch}/${arch}/libffi
make -C ${arch}/${arch}/boehm-gc
make -C ${arch}/${arch}/zlib
make GCJ=${arch}-gcj GCJH=${arch}-gcjh ZIP=${arch}-jar -C ${arch}/${arch}/libjava
(
rm -rf ${arch}/${arch}/fastjar
mkdir -p ${arch}/${arch}/fastjar
cd ${arch}/${arch}/fastjar
ac_cv_sizeof_char=1 \
ac_cv_sizeof_short=2 \
ac_cv_sizeof_int=4 \
ac_cv_sizeof_long=4 \
ac_cv_sizeof_long_long=8 \
ac_cv_sizeof_float=4 \
ac_cv_sizeof_double=8 \
ac_cv_sizeof_long_double=8 \
ac_cv_sizeof_void_p=4 \
ac_cv_file__proc_self_exe=yes \
ac_cv_header_langinfo_h=yes \
CC=${arch}-gcc ../../../fastjar/configure $CONFIG_ARGS
make
)
fi
fi
%endif
done
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p ${RPM_BUILD_ROOT}/{%{_prefix}/bin,lib}
%ifarch i386
ARCH_STRTIP=strip
EXESUFFIX=""
arch=sh-linux
TOOLPREFIX=${arch}-
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/{bin,include,lib,share}
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${arch}/lib/{m4,mb/m4}
make DESTDIR=${RPM_BUILD_ROOT} \
install-gcc \
install-fastjar \
-C ${arch}
%if 0
( cd ${RPM_BUILD_ROOT}%{_prefix}/sh-linux/lib
rm -f libgcc_s_*.so
mv libgcc_s_mb.so.1 mb/libgcc_s.so.1
mv libgcc_s_m4.so.1 m4/libgcc_s.so.1
mv libgcc_s_mb_m4.so.1 mb/m4/libgcc_s.so.1
ln -s libgcc_s.so.1 mb/libgcc_s.so
ln -s libgcc_s.so.1 m4/libgcc_s.so
ln -s libgcc_s.so.1 mb/m4/libgcc_s.so
)
%endif
if [ %{TARGET_LIBSTDC} -ne 0 ]; then
make DESTDIR=${RPM_BUILD_ROOT} \
install-target-libstdc++-v3 \
-C ${arch}
fi
if [ %{TARGET_JAVA} -ne 0 ]; then
make DESTDIR=${RPM_BUILD_ROOT} \
install-target-libjava \
install-target-boehm-gc \
install-target-zlib \
-C ${arch}
make DESTDIR=${RPM_BUILD_ROOT} prefix=%{_prefix}/${arch} \
install -C ${arch}/${arch}/libffi
mv -f $RPM_BUILD_ROOT%{_prefix}/share/java $RPM_BUILD_ROOT%{_prefix}/sh-linux/share/
fi
rm -f $RPM_BUILD_ROOT%{_prefix}/bin/{gcov,gccbug}
rm -f $RPM_BUILD_ROOT%{_prefix}/${arch}/bin/{gij,jv-convert}
sed -e 's/@@VERSION@@/%{GCC_VERSION}/g' debian/shCPU-linux-GCC >$RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
chmod 0755 $RPM_BUILD_ROOT%{_prefix}/bin/shCPU-linux-GCC
LIBSTDC=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libstdc++.so*`
LIBGCJ=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libgcj.so*`
LIBFFI=`cd $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib; echo libffi*.so*`
# literally (binary-ly) same
PROGS="cpp c++ g++ g77 gcc gcj"
DRIVERS="cc1 cc1obj cc1plus collect2 cpp0 f771 jc1 tradcpp0 jvgenmain"
OBJS="crtbegin.o crtbeginS.o crtend.o crtendS.o crtbeginT.o"
LIBS="libgcc.a libgcc_eh.a libobjc.a"
LIBS_1="$LIBSTDC \
$LIBGCJ libgcj.spec \
$LIBFFI "
LIBS_2="libstdc++.a libstdc++.la \
libsupc++.a libsupc++.la \
libgcj.a libgcj.la \
libffi.a libffi.la"
INCLUDE="include"
for CPU in sh3 sh3eb sh4 sh4eb; do
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}
mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/${CPU}-linux/{lib,share/java}
# Make symbolic links for include dir.
ln -s ../sh-linux/include $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/include
# Make symbolic links for libgcj.jar
ln -s ../../sh-linux/share/java/libgcj-%{GCC_VERSION}.jar $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/share/java/libgcj-%{GCC_VERSION}.jar
# Make symbolic links for executables.
for p in ${PROGS}; do
ln -s shCPU-linux-GCC $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-$p
done
ln -s sh-linux-gcjh $RPM_BUILD_ROOT%{_prefix}/bin/${CPU}-linux-gcjh
case "${CPU}" in
sh3)
MULTILIBDIR=
MULTIPARENTDIR=
AS_ENDIAN_FLAG="-little"
CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
CC1_CPU_ENDIAN_FLAGS="-ml -m3"
CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m3"
LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh3"
LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3-linux/lib"
;;
sh3eb)
MULTILIBDIR=/mb
MULTIPARENTDIR=../
AS_ENDIAN_FLAG="-big"
CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
CPP_CPU_DEFS='-D__SH3__ -D__sh3__'
CC1_CPU_ENDIAN_FLAGS="-mb -m3"
CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m3"
LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh3"
LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh3eb-linux/lib"
;;
sh4)
MULTILIBDIR=/m4
MULTIPARENTDIR=../
AS_ENDIAN_FLAG="-little"
CPP_ENDIAN_DEF="-D__LITTLE_ENDIAN__"
CPP_CPU_DEFS="-D__SH4__"
CC1_CPU_ENDIAN_FLAGS="-ml -m4"
CC1PLUS_CPU_ENDIAN_FLAGS="-ml -m4"
LINKER_CPU_ENDIAN_FLAGS="-m shlelf_linux -EL --architecture sh4"
LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4-linux/lib"
;;
sh4eb)
MULTILIBDIR=/mb/m4
MULTIPARENTDIR=../../
AS_ENDIAN_FLAG="-big"
CPP_ENDIAN_DEF="-D__BIG_ENDIAN__"
CPP_CPU_DEFS="-D__SH4__"
CC1_CPU_ENDIAN_FLAGS="-mb -m4"
CC1PLUS_CPU_ENDIAN_FLAGS="-mb -m4"
LINKER_CPU_ENDIAN_FLAGS="-m shelf_linux -EB --architecture sh4"
LINKER_RPATH_LINK_FLAG="-rpath-link %{_prefix}/sh4eb-linux/lib"
;;
esac
# Make symbolic links for GCC drivers, objects, libraries, and include dir.
for f in ${DRIVERS} ${INCLUDE}; do
if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/$f ]; then
ln -s ../../sh-linux/%{GCC_VERSION}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
fi
done
for f in ${OBJS} ${LIBS}; do
if [ -a $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f ]; then
ln -s ../../sh-linux/%{GCC_VERSION}${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/$f
fi
done
for f in ${LIBS_1} ${LIBS_2}; do
if [ -e $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f ]; then
mv -f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f $RPM_BUILD_ROOT%{_prefix}/${CPU}-linux/lib
ln -s ${MULTIPARENTDIR}../../${CPU}-linux/lib/$f $RPM_BUILD_ROOT%{_prefix}/sh-linux/lib${MULTILIBDIR}/$f
fi
done
sed -e "s+@AS_ENDIAN_FLAG@+${AS_ENDIAN_FLAG}+" \
-e "s+@CPP_ENDIAN_DEF@+${CPP_ENDIAN_DEF}+" \
-e "s+@CPP_CPU_DEFS@+${CPP_CPU_DEFS}+" \
-e "s+@CC1_CPU_ENDIAN_FLAGS@+${CC1_CPU_ENDIAN_FLAGS}+" \
-e "s+@CC1PLUS_CPU_ENDIAN_FLAGS@+${CC1PLUS_CPU_ENDIAN_FLAGS}+" \
-e "s+@LINKER_CPU_ENDIAN_FLAGS@+${LINKER_CPU_ENDIAN_FLAGS}+" \
-e "s+@LINKER_RPATH_LINK_FLAG@+${LINKER_RPATH_LINK_FLAG}+" \
debian/edit-specs.in >${arch}/edit-specs-${CPU}.sed
sed -f ${arch}/edit-specs-${CPU}.sed \
$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs \
> $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${CPU}-linux/%{GCC_VERSION}/specs
done
%else
ARCH_STRTIP=%{_target}-strip
EXESUFFIX=""
TOOLPREFIX=""
ln -s ..%{_prefix}/bin/cpp ${RPM_BUILD_ROOT}/lib/cpp
ln -s gcc ${RPM_BUILD_ROOT}%{_prefix}/bin/cc
arch=%{_target}
make DESTDIR=${RPM_BUILD_ROOT} \
install -C ${arch}
if [ %{TARGET_JAVA} -ne 0 ]; then
make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/libffi
make DESTDIR=${RPM_BUILD_ROOT} install -C ${arch}/${arch}/fastjar
mv -f ${RPM_BUILD_ROOT}/%{_prefix}/%{_lib}/libgcj.spec \
${RPM_BUILD_ROOT}/%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/
fi
$ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/gcov$EXESUFFIX || :
cat >${arch}/edit-specs <<EOF
/^*cross_compile:$/ {
n
c\\
0
}
EOF
sed -f ${arch}/edit-specs -e 's#-rpath-link.*/usr/%{_target}/lib##' \
${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs \
>${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$
mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs.$$ \
${RPM_BUILD_ROOT}%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/specs
sed -e "s/dependency_libs=.*/dependency_libs='-lm -lgcc -lc -lgcc'/" \
${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la \
>${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$
mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la.$$ \
${RPM_BUILD_ROOT}%{_prefix}/lib/libstdc++.la
sed -e "s/dependency_libs=.*/dependency_libs='-lpthread -ldl -lz -lm -lgcc -lc -lgcc'/" \
${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la \
>${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$
mv -f ${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la.$$ \
${RPM_BUILD_ROOT}%{_prefix}/lib/libgcj.la
cat >$RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h <<EOF
#define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */
#include_next <limits.h>
#undef _GCC_NEXT_LIMITS_H
EOF
%endif
$ARCH_STRTIP $RPM_BUILD_ROOT%{_prefix}/bin/${TOOLPREFIX}{gcc,cpp,c++,c++filt,gcj,gcjh,gij,jar,grepjar,jcf-dump,jv-convert,jv-scan}$EXESUFFIX || :
FULLPATH=$(dirname $RPM_BUILD_ROOT%{_prefix}/lib/gcc-lib/${arch}/%{GCC_VERSION}/cc1${EXESUFFIX})
$ARCH_STRTIP $FULLPATH/{cc1${EXESUFFIX},cc1plus${EXESUFFIX},cpp0${EXESUFFIX},tradcpp0${EXESUFFIX},collect2${EXESUFFIX},jc1${EXESUFFIX},jvgenmain${EXESUFFIX}} || :
# Strip static libraries
sh-linux-strip -S -R .comment `find $RPM_BUILD_ROOT -type f -name "*.a"` || :
# Strip ELF shared objects
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) `; do
if file $f | grep -q "shared object.*not stripped"; then
sh-linux-strip --strip-unneeded -R .comment $f
fi
done
%clean
rm -rf $RPM_BUILD_ROOT
# ==================== Cross Compiler ===============================
%ifarch i386
%files sh-linux
%defattr(-,root,root)
%{_prefix}/bin/sh*
%dir %{_prefix}/lib/gcc-lib/sh-linux
%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}
%dir %{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include
%dir %{_prefix}/lib/gcc-lib/sh3-linux
%dir %{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}
%dir %{_prefix}/lib/gcc-lib/sh3eb-linux
%dir %{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}
%dir %{_prefix}/lib/gcc-lib/sh4-linux
%dir %{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}
%dir %{_prefix}/lib/gcc-lib/sh4eb-linux
%dir %{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cc1plus
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/collect2
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/cpp0
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/*.o
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/libgcc*.a
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/specs
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/tradcpp0
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jc1
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/jvgenmain
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/m4
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/mb
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stddef.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdarg.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/varargs.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/float.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/limits.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/stdbool.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/iso646.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/syslimits.h
%{_prefix}/lib/gcc-lib/sh-linux/%{GCC_VERSION}/include/README
%{_prefix}/lib/gcc-lib/sh3-linux/%{GCC_VERSION}/*
%{_prefix}/lib/gcc-lib/sh3eb-linux/%{GCC_VERSION}/*
%{_prefix}/lib/gcc-lib/sh4-linux/%{GCC_VERSION}/*
%{_prefix}/lib/gcc-lib/sh4eb-linux/%{GCC_VERSION}/*
%{_mandir}/man1/sh-linux-*
%dir %{_prefix}/sh-linux/include
%{_prefix}/sh3-linux/include
%{_prefix}/sh3eb-linux/include
%{_prefix}/sh4-linux/include
%{_prefix}/sh4eb-linux/include
%endif
%if %{TARGET_LIBSTDC}
%ifarch i386
%{_prefix}/sh-linux/include/g++-v3
%{_prefix}/sh-linux/lib/libs*
%{_prefix}/sh-linux/lib/m4/libs*
%{_prefix}/sh-linux/lib/mb/libs*
%{_prefix}/sh-linux/lib/mb/m4/libs*
%{_prefix}/sh3-linux/lib/libs*
%{_prefix}/sh4-linux/lib/libs*
%{_prefix}/sh3eb-linux/lib/libs*
%{_prefix}/sh4eb-linux/lib/libs*
%endif
%endif
%if %{TARGET_JAVA}
%ifarch i386
%files -n libgcj-sh-linux
%defattr(-,root,root)
%{_prefix}/sh-linux/include/*.h
%{_prefix}/sh-linux/include/gcj
%{_prefix}/sh-linux/include/gnu/*
%{_prefix}/sh-linux/include/java
%{_prefix}/sh-linux/lib/lib*gcj*
%{_prefix}/sh-linux/lib/m4/lib*gcj*
%{_prefix}/sh-linux/lib/mb/lib*gcj*
%{_prefix}/sh-linux/lib/mb/m4/lib*gcj*
%{_prefix}/sh-linux/lib/libffi*
%{_prefix}/sh-linux/lib/m4/libffi*
%{_prefix}/sh-linux/lib/mb/libffi*
%{_prefix}/sh-linux/lib/mb/m4/libffi*
%{_prefix}/sh-linux/share/java/libgcj-%{GCC_VERSION}.jar
%{_prefix}/sh3-linux/lib/lib*gcj*
%{_prefix}/sh3-linux/lib/libffi*
%{_prefix}/sh3-linux/share/java/libgcj-%{GCC_VERSION}.jar
%{_prefix}/sh4-linux/lib/lib*gcj*
%{_prefix}/sh4-linux/lib/libffi*
%{_prefix}/sh4-linux/share/java/libgcj-%{GCC_VERSION}.jar
%{_prefix}/sh3eb-linux/lib/lib*gcj*
%{_prefix}/sh3eb-linux/lib/libffi*
%{_prefix}/sh3eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
%{_prefix}/sh4eb-linux/lib/lib*gcj*
%{_prefix}/sh4eb-linux/lib/libffi*
%{_prefix}/sh4eb-linux/share/java/libgcj-%{GCC_VERSION}.jar
%endif
%endif
%ifarch sh3 sh3eb sh4 sh4eb
# =========================== Native Compiler =================================
%files
%defattr(-,root,root)
%dir %{_prefix}/lib/gcc-lib/%{_target}
%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/collect2
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cpp0
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/crt*.o
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcc*.a
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/specs
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/tradcpp0
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stddef.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdarg.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/varargs.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/float.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/limits.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/stdbool.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/iso646.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/syslimits.h
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/include/README
%{_prefix}/bin/gcc
%{_prefix}/bin/%{_target}-gcc
%{_prefix}/bin/cpp
%{_prefix}/bin/gccbug
%{_prefix}/bin/gcov
%{_prefix}/bin/cc
/lib/cpp
%{_infodir}/cpp*
%{_infodir}/gcc*
%if 0
%files libgcc
%defattr(-,root,root)
/lib/libgcc_s.so*
%endif
%files c++
%defattr(-,root,root)
%{_prefix}/bin/c++
%{_prefix}/bin/g++
%{_prefix}/bin/c++filt
%{_prefix}/bin/%{_target}-c++
%{_prefix}/bin/%{_target}-g++
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/cc1plus
%endif
%if %{TARGET_LIBSTDC}
%ifarch sh3 sh3eb sh4 sh4eb
%files -n libstdc++
%defattr(-,root,root)
%{_prefix}/lib/libstdc++.so*
%files -n libstdc++-devel
%defattr(-,root,root)
%{_prefix}/include/g++-v3
%{_prefix}/lib/libstdc++.*a
%endif
%endif
%if %{TARGET_JAVA}
%ifarch sh3 sh3eb sh4 sh4eb
%files java
%defattr(-,root,root)
%{_prefix}/bin/addr2name.awk
%{_prefix}/bin/gcj
%{_prefix}/bin/gcjh
%{_prefix}/bin/gij
%{_prefix}/bin/jar
%{_prefix}/bin/grepjar
%{_prefix}/bin/jcf-dump
%{_prefix}/bin/jv-convert
%{_prefix}/bin/jv-scan
%dir %{_prefix}/lib/gcc-lib
%dir %{_prefix}/lib/gcc-lib/%{_target}
%dir %{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jc1
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/jvgenmain
%{_infodir}/gcj*
%files -n libgcj
%defattr(-,root,root)
%{_prefix}/%{_lib}/libgcj.so*
%{_prefix}/%{_lib}/libffi*.so*
%{_prefix}/lib/gcc-lib/%{_target}/%{GCC_VERSION}/libgcj.spec
%{_prefix}/share/java/libgcj-%{GCC_VERSION}.jar
%files -n libgcj-devel
%defattr(-,root,root)
%{_prefix}/include/*.h
%{_prefix}/include/gcj
%{_prefix}/include/gnu/*
%{_prefix}/include/java
%{_prefix}/lib/libgcj.*a
%{_prefix}/lib/libffi.*a
%endif
%endif
%changelog
* Wed Feb 19 2003 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- version 3.2.2.
* Tue Feb 19 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- version 3.0.4.
* Tue Feb 12 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- add java support.
* Thu Feb 7 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- follow debian/SH update.
* Tue Feb 5 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- follow debian/SH update.
* Thu Jan 24 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- rebuild with new binutils.
* Tue Jan 22 2002 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- leaf function optimization fixed.
* Thu Dec 06 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- add gcc-ice-rml patch.
* Tue Nov 13 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- add configure option.
* Thu Nov 01 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- tablejump fix by gniibe.
* Mon Oct 22 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- updated gcc patch.
* Wed Oct 17 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- updated gcc patch.
* Tue Oct 02 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- gcc/config/sh/sh.c bug fix.
* Fri Aug 24 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- gcc version 3.0.1.
* Thu Jun 28 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- gcc version 3.0.
- Add libstdc++ package.
* Mon Apr 23 2001 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- Add cygwin host.
* Sat Dec 23 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- fix file attribute.
- add asmspecs patch.
* Sat Nov 11 2000 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
- initial version.

@ -1,70 +0,0 @@
See http://gcc.gnu.org/PR22541
From: Dan Kegel
When building gcc-3.4.3 or gcc-4.0.0 as a cross into a clean $PREFIX
(the only two I've tried like this), the configure script happily copies
the glibc include files from include to sys-include; here's the line
from the log file (with $PREFIX instead of the real prefix):
Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
But later, when running fixincludes, it gives the error message
The directory that should contain system headers does not exist:
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
Nevertheless, it continues building; the header files it installs in
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.
That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu with the path
$PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'. (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)
A possible fix is to replace the line in gcc/Makefile.in that says
SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
with a version that gets rid of extra ..'s, e.g.
SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
--- gcc-3.4.3/gcc/Makefile.in.foo 2005-05-20 11:41:39.000000000 -0700
+++ gcc-3.4.3/gcc/Makefile.in 2005-05-20 12:08:46.000000000 -0700
@@ -350,7 +350,10 @@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+# Purge it of unneccessary internal relative paths
+# to directories that might not exist yet.
+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@
@@ -2532,11 +2535,13 @@
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(gcc_tooldir)
# Build fixed copies of system files.
+# Abort if no system headers available, unless building a crosscompiler.
+# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: fixinc.sh gsyslimits.h
@if test ! -d ${SYSTEM_HEADER_DIR}; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
then sleep 1; else exit 1; fi; \
fi
rm -rf include; mkdir include

@ -1,62 +0,0 @@
diff -urN gcc-3.3.4.orig/gcc/config/arm/linux-elf.h gcc-3.3.4/gcc/config/arm/linux-elf.h
--- gcc-3.3.4.orig/gcc/config/arm/linux-elf.h 2004-03-30 22:43:45.000000000 +0200
+++ gcc-3.3.4/gcc/config/arm/linux-elf.h 2004-08-20 02:13:02.969084177 +0200
@@ -30,17 +30,31 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
+ * (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
/* Default is to use APCS-32 mode. */
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS)
+#define TARGET_DEFAULT (ARM_FLAG_APCS_32 | ARM_FLAG_MMU_TRAPS | TARGET_ENDIAN_DEFAULT)
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mapcs-32", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mapcs-32", "mno-thumb-interwork" }
#define CPP_APCS_PC_DEFAULT_SPEC "-D__APCS_32__"
@@ -88,7 +102,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#define TARGET_OS_CPP_BUILTINS() \
diff -urN gcc-3.3.4.orig/gcc/config.gcc gcc-3.3.4/gcc/config.gcc
--- gcc-3.3.4.orig/gcc/config.gcc 2004-04-29 06:42:47.000000000 +0200
+++ gcc-3.3.4/gcc/config.gcc 2004-08-20 02:11:04.326143343 +0200
@@ -699,6 +699,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h arm/elf.h arm/linux-gas.h arm/linux-elf.h arm/aout.h arm/arm.h"
+ case $machine in
+ arm*b-*)
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
+ ;;
+ esac
tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes

@ -1,71 +0,0 @@
From http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00832.html, by
Richard Earnshaw. Fixes http://gcc.gnu.org/PR22528
--- gcc-3.3.4/gcc/config/arm/arm.md.orig 2004-03-30 22:43:44.000000000 +0200
+++ gcc-3.3.4/gcc/config/arm/arm.md 2005-08-15 12:21:55.000000000 +0200
@@ -4275,7 +4275,7 @@
(set (match_dup 2)
(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
;; store the high byte
- (set (match_dup 4) (subreg:QI (match_dup 2) 0))] ;explicit subreg safe
+ (set (match_dup 4) (match_dup 5))]
"TARGET_ARM"
"
{
@@ -4291,7 +4291,8 @@
operands[1] = adjust_address (operands[1], QImode, 0);
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
- operands[2] = gen_reg_rtx (SImode);
+ operands[2] = gen_reg_rtx (SImode);
+ operands[5] = gen_lowpart (QImode, operands[2]);
}"
)
@@ -4299,7 +4300,7 @@
[(set (match_dup 4) (match_dup 3))
(set (match_dup 2)
(ashiftrt:SI (match_operand 0 "" "") (const_int 8)))
- (set (match_operand 1 "" "") (subreg:QI (match_dup 2) 3))]
+ (set (match_operand 1 "" "") (match_dup 5))]
"TARGET_ARM"
"
{
@@ -4316,13 +4317,14 @@
operands[3] = gen_lowpart (QImode, operands[0]);
operands[0] = gen_lowpart (SImode, operands[0]);
operands[2] = gen_reg_rtx (SImode);
+ operands[5] = gen_lowpart (QImode, operands[2]);
}"
)
;; Subroutine to store a half word integer constant into memory.
(define_expand "storeinthi"
[(set (match_operand 0 "" "")
- (subreg:QI (match_operand 1 "" "") 0))
+ (match_operand 1 "" ""))
(set (match_dup 3) (match_dup 2))]
"TARGET_ARM"
"
@@ -4363,6 +4365,7 @@
operands[3] = adjust_address (op0, QImode, 1);
operands[0] = adjust_address (operands[0], QImode, 0);
operands[2] = gen_lowpart (QImode, operands[2]);
+ operands[1] = gen_lowpart (QImode, operands[1]);
}"
)
@@ -4682,11 +4685,12 @@
(set (match_dup 3)
(ashiftrt:SI (match_dup 2) (const_int 16)))
(set (match_operand:HI 0 "s_register_operand" "")
- (subreg:HI (match_dup 3) 0))]
+ (match_dup 4))]
"TARGET_ARM"
"
operands[2] = gen_reg_rtx (SImode);
operands[3] = gen_reg_rtx (SImode);
+ operands[4] = gen_lowpart (HImode, operands[3]);
"
)

@ -1,72 +0,0 @@
See http://gcc.gnu.org/PR22541
From: Dan Kegel
When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
the configure script happily copies the glibc include files from include to sys-include;
here's the line from the log file (with $PREFIX instead of the real prefix):
Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
But later, when running fixincludes, it gives the error message
The directory that should contain system headers does not exist:
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
Nevertheless, it continues building; the header files it installs in
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.
That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu with the path
$PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'. (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)
A possible fix is to replace the line in gcc/Makefile.in that says
SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
with a version that gets rid of extra ..'s, e.g.
SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
[rediffed against gcc-4.0.0]
--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
@@ -378,7 +378,10 @@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+# Purge it of unneccessary internal relative paths
+# to directories that might not exist yet.
+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@
@@ -2838,13 +2841,15 @@
../$(build_subdir)/fixincludes/fixincl: ; @ :
# Build fixed copies of system files.
+# Abort if no system headers available, unless building a crosscompiler.
+# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: gsyslimits.h macro_list \
../$(build_subdir)/fixincludes/fixincl \
../$(build_subdir)/fixincludes/fixinc.sh
@if test ! -d ${SYSTEM_HEADER_DIR}; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
then sleep 1; else exit 1; fi; \
fi
rm -rf include; mkdir include

@ -1,79 +0,0 @@
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
Fixes following build error for big-endian ARM targets:
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
Supported emulations: armelfb_linux armelfb
collect2: ld returned 1 exit status
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
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'
make[1]: *** [csu/subdir_lib] Error 2
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'
make: *** [lib] Error 2
See http://gcc.gnu.org/PR16350
--- gcc-4.0-20050305/gcc/config/arm/linux-elf.h.orig 2005-03-23 18:44:54.822707377 +0100
+++ gcc-4.0-20050305/gcc/config/arm/linux-elf.h 2005-03-23 18:46:18.228560206 +0100
@@ -31,19 +31,33 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for
+ * arm*b-*-linux* (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (0)
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
@@ -90,7 +104,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#define TARGET_OS_CPP_BUILTINS() \
--- gcc-4.0-20050305/gcc/config.gcc.orig 2005-03-23 18:46:23.318105335 +0100
+++ gcc-4.0-20050305/gcc/config.gcc 2005-03-23 18:47:41.592546386 +0100
@@ -650,6 +650,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
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"
+ case $target in
+ arm*b-*-linux*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
tmake_file="${tmake_file} arm/t-arm arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes

@ -1,121 +0,0 @@
Date: 18 May 2005 22:47:59 -0000
Message-ID: <20050518224759.7352.qmail@sourceware.org>
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: dank@kegel.com
References: <20050407215701.20815.dank@kegel.com>
Reply-To: gcc-bugzilla@gcc.gnu.org
Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> coverage_checksum_string already knows a bit about ignoring random seed
> produced mess. It looks like this needs to be extended somehow to
> handle namespaces too...
This seems to solve the missmatch. Would it be possible to test it on
bigger testcase and if it works distile a testcase that don't use
file IO so it is more suitable for gcc regtesting?
Index: coverage.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
retrieving revision 1.6.2.12.2.12
diff -c -3 -p -r1.6.2.12.2.12 coverage.c
*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
*************** coverage_checksum_string (unsigned chksu
*** 471,505 ****
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
if (!strncmp (string + i, "_GLOBAL__", 9))
! for (i = i + 9; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
! unsigned seed;
! int scan;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! scan = sscanf (string + i + 10, "%X", &seed);
! gcc_assert (scan);
! if (seed != crc32_string (0, flag_random_seed))
! continue;
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! break;
! }
break;
}
--- 471,511 ----
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
+ int offset = 0;
+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
+ offset = 11;
if (!strncmp (string + i, "_GLOBAL__", 9))
! offset = 9;
!
! /* C++ namespaces do have scheme:
! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
! since filename might contain extra underscores there seems
! to be no better chance then walk all possible offsets looking
! for magicnuber. */
! if (offset)
! for (;string[offset]; offset++)
! for (i = i + offset; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! if (!dup)
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! }
break;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

@ -1,80 +0,0 @@
http://gcc.gnu.org/PR20973
"gcc 4 (about RC1) miscompiles khtml, in fact something in CSS, which basically
leads to all websites being misrendered. I can't easily reduce the testcase,
but have applied the whole preprocessed source of css/cssstyleselector.ii.
It is to be compiled with g++ -O2 -fPIC -march=i586 -mtune=i686
-fno-exceptions. A more detailed analysis will follow, as we've found out
some things already."
---
Subject: Bug 20973
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: matz@gcc.gnu.org 2005-04-22 17:30:21
Modified files:
gcc : ChangeLog reload.c
Log message:
PR middle-end/20973
* reload.c (push_reload, find_dummy_reload): Check for uninitialized
pseudos.
Patches:
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
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
---
===================================================================
RCS file: /cvs/gcc/gcc/gcc/reload.c,v
retrieving revision 1.268
retrieving revision 1.268.2.1
diff -u -r1.268 -r1.268.2.1
--- gcc/gcc/reload.c 2005/02/24 22:06:06 1.268
+++ gcc/gcc/reload.c 2005/04/22 17:30:15 1.268.2.1
@@ -1520,7 +1520,7 @@
But if there is no spilling in this block, that is OK.
An explicitly used hard reg cannot be a spill reg. */
- if (rld[i].reg_rtx == 0 && in != 0)
+ if (rld[i].reg_rtx == 0 && in != 0 && hard_regs_live_known)
{
rtx note;
int regno;
@@ -1534,6 +1534,11 @@
&& REG_P (XEXP (note, 0))
&& (regno = REGNO (XEXP (note, 0))) < FIRST_PSEUDO_REGISTER
&& reg_mentioned_p (XEXP (note, 0), in)
+ /* Check that we don't use a hardreg for an uninitialized
+ pseudo. See also find_dummy_reload(). */
+ && (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
+ ORIGINAL_REGNO (XEXP (note, 0))))
&& ! refers_to_regno_for_reload_p (regno,
(regno
+ hard_regno_nregs[regno]
@@ -1997,7 +2002,17 @@
is a subreg, and in that case, out
has a real mode. */
(GET_MODE (out) != VOIDmode
- ? GET_MODE (out) : outmode)))
+ ? GET_MODE (out) : outmode))
+ /* But only do all this if we can be sure, that this input
+ operand doesn't correspond with an uninitialized pseudoreg.
+ global can assign some hardreg to it, which is the same as
+ a different pseudo also currently live (as it can ignore the
+ conflict). So we never must introduce writes to such hardregs,
+ as they would clobber the other live pseudo using the same.
+ See also PR20973. */
+ && (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
+ ORIGINAL_REGNO (in))))
{
unsigned int regno = REGNO (in) + in_offset;
unsigned int nwords = hard_regno_nregs[regno][inmode];

@ -1,66 +0,0 @@
See http://gcc.gnu.org/PR21173
This is a fix for a last minute brown-bag bug with gcc-4.0.0
------- Additional Comment #24 From CVS Commits 2005-04-25 14:03 [reply] -------
Subject: Bug 21173
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: dberlin@gcc.gnu.org 2005-04-25 14:02:38
Modified files:
gcc : ChangeLog tree-ssa-pre.c
Log message:
2005-04-25 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/21173
* tree-ssa-pre.c (create_expression_by_pieces): Call unshare_expr
on things we pass to force_gimple_operand. Don't try to special
case min_invariants.
Patches:
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
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
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-pre.c,v
retrieving revision 2.65.4.2
retrieving revision 2.65.4.3
diff -u -r2.65.4.2 -r2.65.4.3
--- gcc/gcc/tree-ssa-pre.c 2005/04/17 23:40:31 2.65.4.2
+++ gcc/gcc/tree-ssa-pre.c 2005/04/25 14:02:31 2.65.4.3
@@ -1330,7 +1330,8 @@
folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
genop1, genop2));
- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
+ newexpr = force_gimple_operand (unshare_expr (folded),
+ &forced_stmts, false, NULL);
if (forced_stmts)
{
tsi = tsi_start (forced_stmts);
@@ -1372,14 +1373,8 @@
add_referenced_tmp_var (temp);
folded = fold (build (TREE_CODE (expr), TREE_TYPE (expr),
genop1));
- /* If the generated operand is already GIMPLE min_invariant
- just use it instead of calling force_gimple_operand on it,
- since that may make it not invariant by copying it into an
- assignment. */
- if (!is_gimple_min_invariant (genop1))
- newexpr = force_gimple_operand (folded, &forced_stmts, false, NULL);
- else
- newexpr = genop1;
+ newexpr = force_gimple_operand (unshare_expr (folded),
+ &forced_stmts, false, NULL);
if (forced_stmts)
{
tsi = tsi_start (forced_stmts);
0K . 1.24 MB/s
13:16:54 (1.24 MB/s) - `-' saved [1303]

@ -1,153 +0,0 @@
Workaround for buglet in std::vector etc. when compiling
with gcc-4.0.0 -Wall -O -fno-exceptions
Fixes:
.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
non-void function 'typename _Alloc::pointer std::vector<_Tp,
_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
See http://gcc.gnu.org/PR21951
--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h.old 2005-06-11 03:58:20.000000000 -0700
+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_vector.h 2005-06-11 04:01:21.000000000 -0700
@@ -765,13 +765,13 @@
{
std::__uninitialized_copy_a(__first, __last, __result,
this->get_allocator());
- return __result;
}
catch(...)
{
_M_deallocate(__result, __n);
__throw_exception_again;
}
+ return __result;
}
--- gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h.old 2005-06-11 03:58:20.000000000 -0700
+++ gcc-4.0.1-20050607/libstdc++-v3/include/bits/stl_uninitialized.h 2005-06-11 04:05:18.990003248 -0700
@@ -84,13 +84,13 @@
{
for (; __first != __last; ++__first, ++__cur)
std::_Construct(&*__cur, *__first);
- return __cur;
}
catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
+ return __cur;
}
/**
@@ -236,13 +236,13 @@
{
for (; __first != __last; ++__first, ++__cur)
__alloc.construct(&*__cur, *__first);
- return __cur;
}
catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
}
+ return __cur;
}
template<typename _InputIterator, typename _ForwardIterator, typename _Tp>
@@ -337,11 +337,13 @@
{
return std::__uninitialized_copy_a(__first2, __last2, __mid, __alloc);
}
+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
+#endif
}
// __uninitialized_fill_copy
@@ -360,11 +362,13 @@
{
return std::__uninitialized_copy_a(__first, __last, __mid, __alloc);
}
+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
catch(...)
{
std::_Destroy(__result, __mid, __alloc);
__throw_exception_again;
}
+#endif
}
// __uninitialized_copy_fill
--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope.old 2005-06-11 03:58:20.000000000 -0700
+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/rope 2005-06-11 04:13:26.628870872 -0700
@@ -1645,11 +1645,13 @@
_S_cond_store_eos(__buf[__size]);
try
{ return _S_new_RopeLeaf(__buf, __size, __a); }
+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
catch(...)
{
_RopeRep::__STL_FREE_STRING(__buf, __size, __a);
__throw_exception_again;
}
+#endif
}
// Concatenation of nonempty strings.
--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory.old 2005-06-11 03:58:20.000000000 -0700
+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/memory 2005-06-11 04:13:52.897877376 -0700
@@ -85,11 +85,13 @@
std::_Construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
catch(...)
{
std::_Destroy(__result, __cur);
__throw_exception_again;
}
+#endif
}
template<typename _RandomAccessIter, typename _Size, typename _ForwardIter>
@@ -144,11 +146,13 @@
__alloc.construct(&*__cur, *__first);
return pair<_InputIter, _ForwardIter>(__first, __cur);
}
+#ifdef __EXCEPTIONS // work around http://gcc.gnu.org/PR21951 in gcc-4.0 only
catch(...)
{
std::_Destroy(__result, __cur, __alloc);
__throw_exception_again;
}
+#endif
}
template<typename _InputIter, typename _Size, typename _ForwardIter,
--- gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h.old 2005-06-11 03:58:20.000000000 -0700
+++ gcc-4.0.1-20050607/libstdc++-v3/include/ext/hashtable.h 2005-06-11 04:14:28.384482592 -0700
@@ -607,13 +607,13 @@
try
{
this->get_allocator().construct(&__n->_M_val, __obj);
- return __n;
}
catch(...)
{
_M_put_node(__n);
__throw_exception_again;
}
+ return __n;
}
void

@ -1,72 +0,0 @@
See http://gcc.gnu.org/PR22541
From: Dan Kegel
When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
the configure script happily copies the glibc include files from include to sys-include;
here's the line from the log file (with $PREFIX instead of the real prefix):
Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
But later, when running fixincludes, it gives the error message
The directory that should contain system headers does not exist:
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
Nevertheless, it continues building; the header files it installs in
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.
That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu with the path
$PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'. (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)
A possible fix is to replace the line in gcc/Makefile.in that says
SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
with a version that gets rid of extra ..'s, e.g.
SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
[rediffed against gcc-4.0.0]
--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
@@ -378,7 +378,10 @@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+# Purge it of unneccessary internal relative paths
+# to directories that might not exist yet.
+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@
@@ -2838,13 +2841,15 @@
../$(build_subdir)/fixincludes/fixincl: ; @ :
# Build fixed copies of system files.
+# Abort if no system headers available, unless building a crosscompiler.
+# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: gsyslimits.h macro_list \
../$(build_subdir)/fixincludes/fixincl \
../$(build_subdir)/fixincludes/fixinc.sh
@if test ! -d ${SYSTEM_HEADER_DIR}; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
then sleep 1; else exit 1; fi; \
fi
rm -rf include; mkdir include

@ -1,121 +0,0 @@
Date: 18 May 2005 22:47:59 -0000
Message-ID: <20050518224759.7352.qmail@sourceware.org>
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: dank@kegel.com
References: <20050407215701.20815.dank@kegel.com>
Reply-To: gcc-bugzilla@gcc.gnu.org
Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> coverage_checksum_string already knows a bit about ignoring random seed
> produced mess. It looks like this needs to be extended somehow to
> handle namespaces too...
This seems to solve the missmatch. Would it be possible to test it on
bigger testcase and if it works distile a testcase that don't use
file IO so it is more suitable for gcc regtesting?
Index: coverage.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
retrieving revision 1.6.2.12.2.12
diff -c -3 -p -r1.6.2.12.2.12 coverage.c
*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
*************** coverage_checksum_string (unsigned chksu
*** 471,505 ****
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
if (!strncmp (string + i, "_GLOBAL__", 9))
! for (i = i + 9; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
! unsigned seed;
! int scan;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! scan = sscanf (string + i + 10, "%X", &seed);
! gcc_assert (scan);
! if (seed != crc32_string (0, flag_random_seed))
! continue;
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! break;
! }
break;
}
--- 471,511 ----
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
+ int offset = 0;
+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
+ offset = 11;
if (!strncmp (string + i, "_GLOBAL__", 9))
! offset = 9;
!
! /* C++ namespaces do have scheme:
! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
! since filename might contain extra underscores there seems
! to be no better chance then walk all possible offsets looking
! for magicnuber. */
! if (offset)
! for (;string[offset]; offset++)
! for (i = i + offset; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! if (!dup)
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! }
break;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

@ -1,71 +0,0 @@
Workaround for buglet in std::vector etc. when compiling
with gcc-4.0.1 -Wall -O -fno-exceptions
Fixes:
.../include/c++/4.0.0/bits/vector.tcc: In member function 'void std::vector<_Tp,
_Alloc>::reserve(size_t) [with _Tp = int, _Alloc = std::allocator<int>]':
.../include/c++/4.0.0/bits/vector.tcc:78: warning: control may reach end of
non-void function 'typename _Alloc::pointer std::vector<_Tp,
_Alloc>::_M_allocate_and_copy(size_t, _ForwardIterator, _ForwardIterator) [with
_ForwardIterator = int*, _Tp = int, _Alloc = std::allocator<int>]' being inlined
See http://gcc.gnu.org/PR21951
To: gcc-patches at gcc dot gnu dot org
Subject: [4.0.x] may reach end warning in system headers
Message-Id: <20050701183024.E138714C16A9@geoffk5.apple.com>
Date: Fri, 1 Jul 2005 11:30:24 -0700 (PDT)
From: gkeating at apple dot com (Geoffrey Keating)
One of our users was getting
/usr/include/gcc/darwin/4.0/c++/bits/stl_uninitialized.h:113: warning:
control may reach end of non-void function '_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator, _InputIterator,
_ForwardIterator, __false_type) [with _InputIterator =
__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
std::vector<TPoolAllocator::tAllocState,
std::allocator<TPoolAllocator::tAllocState> > >, _ForwardIterator =
__gnu_cxx::__normal_iterator<TPoolAllocator::tAllocState*,
std::vector<TPoolAllocator::tAllocState,
std::allocator<TPoolAllocator::tAllocState> > >]' being inlined
which shouldn't be happening, he has no way to change a standard C++
header. The warning is bogus anyway, but it's fixed in 4.1 through
the CFG changes, which I don't really want to backport to the 4.0
branch, so instead I'll add this patch. Other warnings generated from
tree-inline.c check for DECL_SYSTEM_HEADER like this.
Bootstrapped & tested on powerpc-darwin8, I'll commit when the branch
is unfrozen.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-40-4121982.patch======================
Index: ChangeLog
2005-06-28 Geoffrey Keating <geoffk@apple.com>
* tree-inline.c (expand_call_inline): Prevent 'may reach end'
warning in system headers.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.170.8.4
diff -u -p -u -p -r1.170.8.4 tree-inline.c
--- gcc-4.0.1/gcc/tree-inline.c.old 6 Jun 2005 19:20:32 -0000 1.170.8.4
+++ gcc-4.0.1/gcc/tree-inline.c 1 Jul 2005 18:27:26 -0000
@@ -1693,7 +1693,8 @@ expand_call_inline (tree *tp, int *walk_
&& !TREE_NO_WARNING (fn)
&& !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
&& return_slot_addr == NULL_TREE
- && block_may_fallthru (copy))
+ && block_may_fallthru (copy)
+ && !DECL_IN_SYSTEM_HEADER (fn))
{
warning ("control may reach end of non-void function %qD being inlined",
fn);
============================================================

@ -1,72 +0,0 @@
See http://gcc.gnu.org/PR22541
From: Dan Kegel
When building gcc-3.4.3 or gcc-4.0.[01] into a clean $PREFIX (the only two I've tried like this),
the configure script happily copies the glibc include files from include to sys-include;
here's the line from the log file (with $PREFIX instead of the real prefix):
Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
But later, when running fixincludes, it gives the error message
The directory that should contain system headers does not exist:
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
Nevertheless, it continues building; the header files it installs in
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.
That's not nice. I suspect the problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu with the path
$PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'. (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)
A possible fix is to replace the line in gcc/Makefile.in that says
SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
with a version that gets rid of extra ..'s, e.g.
SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,,;ta"`
(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
[rediffed against gcc-4.0.0]
--- gcc-4.0.0/gcc/Makefile.in.orig 2005-04-04 12:45:13.000000000 -0700
+++ gcc-4.0.0/gcc/Makefile.in 2005-05-20 12:33:43.000000000 -0700
@@ -378,7 +378,10 @@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+# Purge it of unneccessary internal relative paths
+# to directories that might not exist yet.
+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@
@@ -2838,13 +2841,15 @@
../$(build_subdir)/fixincludes/fixincl: ; @ :
# Build fixed copies of system files.
+# Abort if no system headers available, unless building a crosscompiler.
+# FIXME: abort unless building --without-headers would be more accurate and less ugly
stmp-fixinc: gsyslimits.h macro_list \
../$(build_subdir)/fixincludes/fixincl \
../$(build_subdir)/fixincludes/fixinc.sh
@if test ! -d ${SYSTEM_HEADER_DIR}; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
then sleep 1; else exit 1; fi; \
fi
rm -rf include; mkdir include

@ -1,121 +0,0 @@
Date: 18 May 2005 22:47:59 -0000
Message-ID: <20050518224759.7352.qmail@sourceware.org>
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: dank@kegel.com
References: <20050407215701.20815.dank@kegel.com>
Reply-To: gcc-bugzilla@gcc.gnu.org
Subject: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:47 -------
Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> ------- Additional Comments From hubicka at ucw dot cz 2005-05-18 22:22 -------
> Subject: Re: [Bug gcov/profile/20815] -fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'."
>
> coverage_checksum_string already knows a bit about ignoring random seed
> produced mess. It looks like this needs to be extended somehow to
> handle namespaces too...
This seems to solve the missmatch. Would it be possible to test it on
bigger testcase and if it works distile a testcase that don't use
file IO so it is more suitable for gcc regtesting?
Index: coverage.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/coverage.c,v
retrieving revision 1.6.2.12.2.12
diff -c -3 -p -r1.6.2.12.2.12 coverage.c
*** gcc-old/gcc/coverage.c 18 May 2005 07:37:31 -0000 1.6.2.12.2.12
--- gcc/gcc/coverage.c 18 May 2005 22:45:36 -0000
*************** coverage_checksum_string (unsigned chksu
*** 471,505 ****
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
if (!strncmp (string + i, "_GLOBAL__", 9))
! for (i = i + 9; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
! unsigned seed;
! int scan;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! scan = sscanf (string + i + 10, "%X", &seed);
! gcc_assert (scan);
! if (seed != crc32_string (0, flag_random_seed))
! continue;
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! break;
! }
break;
}
--- 471,511 ----
as the checksums are used only for sanity checking. */
for (i = 0; string[i]; i++)
{
+ int offset = 0;
+ if (!strncmp (string + i, "_GLOBAL__N_", 11))
+ offset = 11;
if (!strncmp (string + i, "_GLOBAL__", 9))
! offset = 9;
!
! /* C++ namespaces do have scheme:
! _GLOBAL__N_<filename>_<wrongmagicnumber>_<magicnumber>functionname
! since filename might contain extra underscores there seems
! to be no better chance then walk all possible offsets looking
! for magicnuber. */
! if (offset)
! for (;string[offset]; offset++)
! for (i = i + offset; string[i]; i++)
! if (string[i]=='_')
! {
! int y;
!
! for (y = 1; y < 9; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 9 || string[i + 9] != '_')
! continue;
! for (y = 10; y < 18; y++)
! if (!(string[i + y] >= '0' && string[i + y] <= '9')
! && !(string[i + y] >= 'A' && string[i + y] <= 'F'))
! break;
! if (y != 18)
! continue;
! if (!dup)
! string = dup = xstrdup (string);
! for (y = 10; y < 18; y++)
! dup[i + y] = '0';
! }
break;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20815
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

@ -1,53 +0,0 @@
Message-ID: <434576E1.6020305@sscd.de>
Date: Thu, 06 Oct 2005 21:11:29 +0200
From: Alexander Sieb <sieb@sscd.de>
To: crossgcc@sourceware.org
Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
Hi,
attached you find the files I needed to add to crosstool-0.38
in order to build a sh4-linux gcc-4.0.2-glibc-2.3.5 tool chain.
Files attached:
sh4-gcc4.dat:
* gcc4 needs --with-multilib-list=m4,m4-nofpu otherwise a linux
kernel won't build as it uses the -m4-nofpu option.
gcc-pr21623.patch:
* Kaz Kojima provided a patch [really, a workaround -dank] for http://gcc.gnu.org/PR21623
glibc-2.3.5-sh-memset.patch:
* A patch for glibc-2.3.5 which corrects memset. From SUGIOKA Toshinobu.
See content for rationale.
-- snip --
-- Here's patch 1 of 2, plus URLs showing where it is in CVS --
[http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00081.html]
2005-09-30 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_register_move_cost): Add case for moving
from T_REGS to FP register class.
[http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/sh/sh.c.diff?cvsroot=gcc&r1=1.347&r2=1.348]
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -r1.347 -r1.348
--- gcc/gcc/config/sh/sh.c 2005/09/05 12:45:22 1.347
+++ gcc/gcc/config/sh/sh.c 2005/10/03 22:07:08 1.348
@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
&& REGCLASS_HAS_FP_REG (dstclass))
return 4;
+ if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
+ return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
+
if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
|| (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
return 9;

@ -1,553 +0,0 @@
--- gcc-4.0.2/gcc/config/t-linux-uclibc
+++ gcc-4.0.2/gcc/config/t-linux-uclibc
@@ -0,0 +1,5 @@
+# Remove glibc specific files added in t-linux
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
+
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
--- gcc-4.0.2/gcc/config.gcc
+++ gcc-4.0.2/gcc/config.gcc
@@ -1778,7 +1778,7 @@
;;
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
- sh-*-linux* | sh[346lbe]*-*-linux* | \
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
sh64-*-netbsd* | sh64l*-*-netbsd*)
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
@@ -2234,10 +2234,16 @@
*)
echo "*** Configuration ${target} not supported" 1>&2
exit 1
;;
esac
+
+# Rather than hook into each target, just do it after all the linux
+# targets have been processed
+case ${target} in
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
+esac
case ${target} in
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
tmake_file="${tmake_file} i386/t-gmm_malloc"
;;
--- gcc-4.0.2/gcc/config/alpha/linux-elf.h
+++ gcc-4.0.2/gcc/config/alpha/linux-elf.h
@@ -27,7 +27,11 @@
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
--- gcc-4.0.2/gcc/config/arm/linux-elf.h
+++ gcc-4.0.2/gcc/config/arm/linux-elf.h
@@ -81,14 +81,19 @@
#define ENDFILE_SPEC \
"%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s"
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "%{h*} %{version:-v} \
%{b} %{Wl,*:%*} \
%{static:-Bstatic} \
%{shared:-shared} \
%{symbolic:-Bsymbolic} \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "} \
-X \
%{mbig-endian:-EB}" \
SUBTARGET_EXTRA_LINK_SPEC
--- gcc-4.0.2/gcc/config/cris/linux.h
+++ gcc-4.0.2/gcc/config/cris/linux.h
@@ -79,6 +79,25 @@
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+ -rpath-link include/asm/../..%s\
+ %{shared} %{static}\
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+ %{!r:%{O2|O3: --gc-sections}}"
+
+#else /* USE_UCLIBC */
+
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
@@ -93,6 +112,8 @@
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
+#endif /* USE_UCLIBC */
+
/* Node: Run-time Target */
--- gcc-4.0.2/gcc/config/i386/linux.h
+++ gcc-4.0.2/gcc/config/i386/linux.h
@@ -107,6 +107,11 @@
#define LINK_EMULATION "elf_i386"
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#ifdef USE_UCLIBC
+#undef DYNAMIC_LINKER
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#endif
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "link_emulation", LINK_EMULATION },\
--- gcc-4.0.2/gcc/config/i386/linux64.h
+++ gcc-4.0.2/gcc/config/i386/linux64.h
@@ -54,14 +54,21 @@
When the -shared link option is used a final link is not being
done. */
+#ifdef USE_UCLIBC
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
%{static:-static}}"
#define MULTILIB_DEFAULTS { "m64" }
--- gcc-4.0.2/gcc/config/ia64/linux.h
+++ gcc-4.0.2/gcc/config/ia64/linux.h
@@ -37,13 +37,18 @@
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
--- gcc-4.0.2/gcc/config/m68k/linux.h
+++ gcc-4.0.2/gcc/config/m68k/linux.h
@@ -127,12 +127,17 @@
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static}}"
/* For compatibility with linux/a.out */
--- gcc-4.0.2/gcc/config/mips/linux.h
+++ gcc-4.0.2/gcc/config/mips/linux.h
@@ -108,14 +108,19 @@
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#define LINK_SPEC \
"%(endian_spec) \
%{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
#undef SUBTARGET_ASM_SPEC
--- gcc-4.0.2/gcc/config/pa/pa-linux.h
+++ gcc-4.0.2/gcc/config/pa/pa-linux.h
@@ -82,13 +82,18 @@
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */
--- gcc-4.0.2/gcc/config/rs6000/linux.h
+++ gcc-4.0.2/gcc/config/rs6000/linux.h
@@ -69,7 +69,11 @@
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
#undef LINK_OS_DEFAULT_SPEC
+#ifdef USE_UCLIBC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
+#else
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+#endif
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
--- gcc-4.0.2/gcc/config/rs6000/sysv4.h
+++ gcc-4.0.2/gcc/config/rs6000/sysv4.h
@@ -949,6 +949,7 @@
mcall-linux : %(link_os_linux) ; \
mcall-gnu : %(link_os_gnu) ; \
mcall-netbsd : %(link_os_netbsd) ; \
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
mcall-openbsd: %(link_os_openbsd) ; \
: %(link_os_default) }"
@@ -1127,6 +1128,10 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
+
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
@@ -1293,6 +1298,7 @@
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
--- gcc-4.0.2/gcc/config/s390/linux.h
+++ gcc-4.0.2/gcc/config/s390/linux.h
@@ -77,6 +77,13 @@
#define MULTILIB_DEFAULTS { "m31" }
#endif
+#ifdef USE_UCLIBC
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC \
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
@@ -86,8 +93,8 @@
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{m31:-dynamic-linker /lib/ld.so.1} \
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
--- gcc-4.0.2/gcc/config/sh/linux.h
+++ gcc-4.0.2/gcc/config/sh/linux.h
@@ -67,11 +67,16 @@
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define SUBTARGET_LINK_SPEC \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}"
#undef LIB_SPEC
--- gcc-4.0.2/gcc/config/sparc/linux.h
+++ gcc-4.0.2/gcc/config/sparc/linux.h
@@ -130,14 +130,19 @@
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
--- gcc-4.0.2/gcc/config/sparc/linux64.h
+++ gcc-4.0.2/gcc/config/sparc/linux64.h
@@ -167,12 +166,17 @@
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}} \
"
--- gcc-4.0.2/libtool.m4
+++ gcc-4.0.2/libtool.m4
@@ -682,6 +682,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
--- gcc-4.0.2/ltconfig
+++ gcc-4.0.2/ltconfig
@@ -603,6 +603,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
+linux-uclibc*) ;;
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1274,6 +1275,23 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
--- gcc-4.0.2/libffi/configure
+++ gcc-4.0.2/libffi/configure
@@ -3457,6 +3457,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/libgfortran/configure
+++ gcc-4.0.2/libgfortran/configure
@@ -3681,6 +3681,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/libjava/configure
+++ gcc-4.0.2/libjava/configure
@@ -4351,6 +4351,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/libmudflap/configure
+++ gcc-4.0.2/libmudflap/configure
@@ -5380,6 +5380,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/libobjc/configure
+++ gcc-4.0.2/libobjc/configure
@@ -3283,6 +3283,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/boehm-gc/configure
+++ gcc-4.0.2/boehm-gc/configure
@@ -4320,6 +4320,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.0.2/configure
+++ gcc-4.0.2/configure
@@ -1141,7 +1141,7 @@
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.0.2/configure.in
+++ gcc-4.0.2/configure.in
@@ -350,7 +350,7 @@
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.0.2/contrib/regression/objs-gcc.sh
+++ gcc-4.0.2/contrib/regression/objs-gcc.sh
@@ -105,6 +105,10 @@
then
make all-gdb all-dejagnu all-ld || exit 1
make install-gdb install-dejagnu install-ld || exit 1
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
make bootstrap || exit 1
make install || exit 1
--- gcc-4.0.2/zlib/configure
+++ gcc-4.0.2/zlib/configure
@@ -3426,6 +3426,11 @@
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'

File diff suppressed because it is too large Load Diff

@ -1,45 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/src/Makefile.am
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.am
@@ -214,6 +214,10 @@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+install-exec-local:
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Added bits to build debug library.
if GLIBCXX_BUILD_DEBUG
all-local: build_debug
--- gcc-4.0.0/libstdc++-v3/src/Makefile.in
+++ gcc-4.0.0/libstdc++-v3/src/Makefile.in
@@ -625,7 +625,7 @@
install-data-am: install-data-local
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
install-info: install-info-am
@@ -664,7 +664,7 @@
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-info-am \
- uninstall-toolexeclibLTLIBRARIES
+ uninstall-toolexeclibLTLIBRARIES install-exec-local
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@libstdc++-symbol.ver: ${glibcxx_srcdir}/$(SYMVER_MAP)
@GLIBCXX_BUILD_VERSIONED_SHLIB_TRUE@ cp ${glibcxx_srcdir}/$(SYMVER_MAP) ./libstdc++-symbol.ver
@@ -743,6 +743,11 @@
install_debug:
(cd ${debugdir} && $(MAKE) \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

@ -1,11 +0,0 @@
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
@@ -500,7 +500,7 @@
#ifdef __linux__
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
- && !defined(__ia64__)
+ && !defined(__ia64__) && !defined(__UCLIBC__)
# ifndef GC_HAVE_BUILTIN_BACKTRACE
# define GC_HAVE_BUILTIN_BACKTRACE
# endif

@ -1,11 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
@@ -142,7 +142,7 @@
using ::vsprintf;
}
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
#undef snprintf
#undef vfscanf

@ -1,12 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
@@ -7194,6 +7194,9 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <complex.h>
+#ifdef __UCLIBC__
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
+#endif
int
main ()
{

@ -1,24 +0,0 @@
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
@@ -59,6 +59,9 @@
#include <bits/allocator.h>
#include <ext/hash_fun.h>
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
# ifdef __GC
# define __GC_CONST const
# else
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
@@ -53,6 +53,9 @@
#include <ext/memory> // For uninitialized_copy_n
#include <ext/numeric> // For power
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
namespace __gnu_cxx
{
using std::size_t;

@ -1,22 +0,0 @@
diff -urN gcc-4.0.0-100/libstdc++-v3/fragment.am gcc-4.0.0/libstdc++-v3/fragment.am
--- gcc-4.0.0-100/libstdc++-v3/fragment.am 2004-10-25 15:32:40.000000000 -0500
+++ gcc-4.0.0/libstdc++-v3/fragment.am 2005-04-28 21:48:43.000000000 -0500
@@ -18,5 +18,5 @@
$(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
# -I/-D flags to pass when compiling.
-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
+AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
diff -urN gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am gcc-4.0.0/libstdc++-v3/libmath/Makefile.am
--- gcc-4.0.0-100/libstdc++-v3/libmath/Makefile.am 2003-08-27 16:29:42.000000000 -0500
+++ gcc-4.0.0/libstdc++-v3/libmath/Makefile.am 2005-04-28 21:48:43.000000000 -0500
@@ -32,7 +32,7 @@
libmath_la_SOURCES = stubs.c
-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
+AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
# Only compiling "C" sources in this directory.
LIBTOOL = @LIBTOOL@ --tag CC

@ -1,67 +0,0 @@
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
See http://gcc.gnu.org/PR16350
--- gcc-4.0.3/gcc/config/arm/linux-elf.h
+++ gcc-4.0.3/gcc/config/arm/linux-elf.h
@@ -31,19 +31,33 @@
/* Do not assume anything about header files. */
#define NO_IMPLICIT_EXTERN_C
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
+ * (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT ARM_FLAG_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (0)
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
/* The GNU C++ standard library requires that these macros be defined. */
#undef CPLUSPLUS_CPP_SPEC
@@ -90,7 +104,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#define TARGET_OS_CPP_BUILTINS() \
--- gcc-4.0.3/gcc/config.gcc
+++ gcc-4.0.3/gcc/config.gcc
@@ -672,6 +672,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
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"
+ case $target in
+ arm*b-*)
+ tm_defines="TARGET_BIG_ENDIAN_DEFAULT=1 $tm_defines"
+ ;;
+ esac
tmake_file="${tmake_file} arm/t-arm arm/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes

@ -1,71 +0,0 @@
See http://gcc.gnu.org/PR22541
From: Dan Kegel
When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
the configure script happily copies the glibc include files from include to sys-include;
here's the line from the log file (with $PREFIX instead of the real prefix):
Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include
But later, when running fixincludes, it gives the error message
The directory that should contain system headers does not exist:
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include
Nevertheless, it continues building; the header files it installs in
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.
The problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu with the path
$PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'. (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)
A fix that I've been using for a while is to use sed to canonicalize
the path. The sed syntax is a bit obtuse, but it works.
(hey, that's the first time I've ever used a label in a sed script; thanks to the sed faq
for explaining the :a ... ta method of looping to repeat a search-and-replace until it doesn't match.)
[rediffed against gcc-4.1-20060210]
--- gcc-4.1-20060210/gcc/Makefile.in.old 2006-01-11 06:29:29.000000000 -0800
+++ gcc-4.1-20060210/gcc/Makefile.in 2006-02-14 16:08:54.000000000 -0800
@@ -388,7 +388,10 @@
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
# autoconf sets SYSTEM_HEADER_DIR to one of the above.
-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
+# Purge it of unneccessary internal relative paths
+# to directories that might not exist yet.
+# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
+SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = @STMP_FIXPROTO@
@@ -3167,13 +3170,15 @@
../$(build_subdir)/fixincludes/fixincl: ; @ :
# Build fixed copies of system files.
+# Abort if no system headers available, unless building a crosscompiler.
+# Canonicalize $gcc_tooldir/sys-include in same way as $SYSTEM_HEADER_DIR was canonicalized so test still works
stmp-fixinc: gsyslimits.h macro_list \
$(build_objdir)/fixincludes/fixincl \
$(build_objdir)/fixincludes/fixinc.sh
@if ! $(inhibit_libc) && test ! -d ${SYSTEM_HEADER_DIR}; then \
echo The directory that should contain system headers does not exist: >&2 ; \
echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
+ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
then sleep 1; else exit 1; fi; \
fi
rm -rf include; mkdir include

@ -1,544 +0,0 @@
--- gcc-4.1.0/gcc/config/t-linux-uclibc
+++ gcc-4.1.0/gcc/config/t-linux-uclibc
@@ -0,0 +1,5 @@
+# Remove glibc specific files added in t-linux
+SHLIB_MAPFILES := $(filter-out $(srcdir)/config/libgcc-glibc.ver, $(SHLIB_MAPFILES))
+
+# Use unwind-dw2-fde instead of unwind-dw2-fde-glibc
+LIB2ADDEH := $(subst unwind-dw2-fde-glibc.c,unwind-dw2-fde.c,$(LIB2ADDEH))
--- gcc-4.1.0/gcc/config.gcc
+++ gcc-4.1.0/gcc/config.gcc
@@ -1887,7 +1887,7 @@ s390x-ibm-tpf*)
;;
sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
- sh-*-linux* | sh[346lbe]*-*-linux* | \
+ sh*-*-linux* | sh[346lbe]*-*-linux* | \
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
sh64-*-netbsd* | sh64l*-*-netbsd*)
tmake_file="${tmake_file} sh/t-sh sh/t-elf"
@@ -2341,6 +2341,12 @@ m32c-*-elf*)
;;
esac
+# Rather than hook into each target, just do it after all the linux
+# targets have been processed
+case ${target} in
+*-linux-uclibc*) tm_defines="${tm_defines} USE_UCLIBC" ; tmake_file="${tmake_file} t-linux-uclibc"
+esac
+
case ${target} in
i[34567]86-*-linux*aout* | i[34567]86-*-linux*libc1)
tmake_file="${tmake_file} i386/t-gmm_malloc"
--- gcc-4.1.0/boehm-gc/configure
+++ gcc-4.1.0/boehm-gc/configure
@@ -4320,6 +4320,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/configure
+++ gcc-4.1.0/configure
@@ -1133,7 +1133,7 @@ no)
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.1.0/configure.in
+++ gcc-4.1.0/configure.in
@@ -341,7 +341,7 @@ no)
;;
"")
case "${target}" in
- *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux*-gnu | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
--- gcc-4.1.0/contrib/regression/objs-gcc.sh
+++ gcc-4.1.0/contrib/regression/objs-gcc.sh
@@ -105,6 +105,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H
then
make all-gdb all-dejagnu all-ld || exit 1
make install-gdb install-dejagnu install-ld || exit 1
+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
make bootstrap || exit 1
make install || exit 1
--- gcc-4.1.0/gcc/config/alpha/linux-elf.h
+++ gcc-4.1.0/gcc/config/alpha/linux-elf.h
@@ -27,7 +27,11 @@ Boston, MA 02110-1301, USA. */
#define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+#if defined USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
@@ -51,7 +51,11 @@
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+#ifdef USE_UCLIBC
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
+#else
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
+#endif
#define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
%{b} \
--- gcc-4.1.0/gcc/config/cris/linux.h
+++ gcc-4.1.0/gcc/config/cris/linux.h
@@ -73,6 +73,25 @@ Boston, MA 02110-1301, USA. */
#undef CRIS_DEFAULT_CPU_VERSION
#define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+#ifdef USE_UCLIBC
+
+#undef CRIS_SUBTARGET_VERSION
+#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
+
+#undef CRIS_LINK_SUBTARGET_SPEC
+#define CRIS_LINK_SUBTARGET_SPEC \
+ "-mcrislinux\
+ -rpath-link include/asm/../..%s\
+ %{shared} %{static}\
+ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
+ %{!shared: \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}} \
+ %{!r:%{O2|O3: --gc-sections}}"
+
+#else /* USE_UCLIBC */
+
#undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
@@ -87,6 +106,8 @@ Boston, MA 02110-1301, USA. */
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\
%{!r:%{O2|O3: --gc-sections}}"
+#endif /* USE_UCLIBC */
+
/* Node: Run-time Target */
--- gcc-4.1.0/gcc/config/i386/linux.h
+++ gcc-4.1.0/gcc/config/i386/linux.h
@@ -107,6 +107,11 @@ Boston, MA 02110-1301, USA. */
#define LINK_EMULATION "elf_i386"
#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#if defined USE_UCLIBC
+#undef DYNAMIC_LINKER
+#define DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#endif
+
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
{ "link_emulation", LINK_EMULATION },\
--- gcc-4.1.0/gcc/config/i386/linux64.h
+++ gcc-4.1.0/gcc/config/i386/linux64.h
@@ -54,14 +54,21 @@ Boston, MA 02110-1301, USA. */
When the -shared link option is used a final link is not being
done. */
+#ifdef USE_UCLIBC
+#define ELF32_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF32_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define ELF64_DYNAMIC_LINKER "/lib64/ld-linux-x86-64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
- %{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \
+ %{m32:%{!dynamic-linker:-dynamic-linker " ELF32_DYNAMIC_LINKER "}} \
+ %{!m32:%{!dynamic-linker:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}} \
%{static:-static}}"
/* Similar to standard Linux, but adding -ffast-math support. */
--- gcc-4.1.0/gcc/config/ia64/linux.h
+++ gcc-4.1.0/gcc/config/ia64/linux.h
@@ -37,13 +37,18 @@ do { \
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
--- gcc-4.1.0/gcc/config/m68k/linux.h
+++ gcc-4.1.0/gcc/config/m68k/linux.h
@@ -123,12 +123,17 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker*:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static}}"
/* For compatibility with linux/a.out */
--- gcc-4.1.0/gcc/config/mips/linux.h
+++ gcc-4.1.0/gcc/config/mips/linux.h
@@ -105,6 +105,11 @@ Boston, MA 02110-1301, USA. */
/* Borrowed from sparc/linux.h */
#undef LINK_SPEC
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#define LINK_SPEC \
"%(endian_spec) \
%{shared:-shared} \
@@ -112,7 +117,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
#undef SUBTARGET_ASM_SPEC
--- gcc-4.1.0/gcc/config/pa/pa-linux.h
+++ gcc-4.1.0/gcc/config/pa/pa-linux.h
@@ -49,13 +49,18 @@ Boston, MA 02110-1301, USA. */
/* Define this for shared library support because it isn't in the main
linux.h file. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "\
%{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */
--- gcc-4.1.0/gcc/config/rs6000/linux.h
+++ gcc-4.1.0/gcc/config/rs6000/linux.h
@@ -72,7 +72,11 @@
#define LINK_START_DEFAULT_SPEC "%(link_start_linux)"
#undef LINK_OS_DEFAULT_SPEC
+#ifdef USE_UCLIBC
+#define LINK_OS_DEFAULT_SPEC "%(link_os_linux_uclibc)"
+#else
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+#endif
#define LINK_GCC_C_SEQUENCE_SPEC \
"%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
--- gcc-4.1.0/gcc/config/rs6000/sysv4.h
+++ gcc-4.1.0/gcc/config/rs6000/sysv4.h
@@ -866,6 +866,7 @@ extern int fixuplabelno;
mcall-linux : %(link_os_linux) ; \
mcall-gnu : %(link_os_gnu) ; \
mcall-netbsd : %(link_os_netbsd) ; \
+ mcall-linux-uclibc : %(link_os_linux_uclibc); \
mcall-openbsd: %(link_os_openbsd) ; \
: %(link_os_default) }"
@@ -1043,6 +1044,10 @@ extern int fixuplabelno;
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
+#define LINK_OS_LINUX_UCLIBC_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}}}"
+
#if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
#endif
@@ -1209,6 +1214,7 @@ ncrtn.o%s"
{ "link_os_sim", LINK_OS_SIM_SPEC }, \
{ "link_os_freebsd", LINK_OS_FREEBSD_SPEC }, \
{ "link_os_linux", LINK_OS_LINUX_SPEC }, \
+ { "link_os_linux_uclibc", LINK_OS_LINUX_UCLIBC_SPEC }, \
{ "link_os_gnu", LINK_OS_GNU_SPEC }, \
{ "link_os_netbsd", LINK_OS_NETBSD_SPEC }, \
{ "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \
--- gcc-4.1.0/gcc/config/s390/linux.h
+++ gcc-4.1.0/gcc/config/s390/linux.h
@@ -77,6 +77,13 @@ Software Foundation, 51 Franklin Street,
#define MULTILIB_DEFAULTS { "m31" }
#endif
+#ifdef USE_UCLIBC
+#define ELF31_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64-uClibc.so.0"
+#else
+#define ELF31_DYNAMIC_LINKER "/lib/ld.so.1"
+#define ELF64_DYNAMIC_LINKER "/lib/ld64.so.1"
+#endif
#undef LINK_SPEC
#define LINK_SPEC \
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \
@@ -86,8 +93,8 @@ Software Foundation, 51 Franklin Street,
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker: \
- %{m31:-dynamic-linker /lib/ld.so.1} \
- %{m64:-dynamic-linker /lib/ld64.so.1}}}}"
+ %{m31:-dynamic-linker " ELF31_DYNAMIC_LINKER "} \
+ %{m64:-dynamic-linker " ELF64_DYNAMIC_LINKER "}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
--- gcc-4.1.0/gcc/config/sh/linux.h
+++ gcc-4.1.0/gcc/config/sh/linux.h
@@ -56,12 +56,21 @@ Boston, MA 02110-1301, USA. */
#undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC
+#ifdef USE_UCLIBC
+#define SUBTARGET_LINK_SPEC \
+ "%{shared:-shared} \
+ %{!static: \
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker /lib/ld-uClibc.so.0}} \
+ %{static:-static}"
+#else
#define SUBTARGET_LINK_SPEC \
"%{shared:-shared} \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
%{static:-static}"
+#endif
/* Output assembler code to STREAM to call the profiler. */
--- gcc-4.1.0/gcc/config/sparc/linux.h
+++ gcc-4.1.0/gcc/config/sparc/linux.h
@@ -125,6 +125,11 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \
@@ -132,7 +137,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
--- gcc-4.1.0/gcc/config/sparc/linux64.h
+++ gcc-4.1.0/gcc/config/sparc/linux64.h
@@ -162,12 +162,17 @@ Boston, MA 02110-1301, USA. */
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC },
+#ifdef USE_UCLIBC
+#define ELF_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+#else
+#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#endif
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \
%{!ibcs: \
%{!static: \
%{rdynamic:-export-dynamic} \
- %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
+ %{!dynamic-linker:-dynamic-linker " ELF_DYNAMIC_LINKER "}} \
%{static:-static}}} \
"
--- gcc-4.1.0/libffi/configure
+++ gcc-4.1.0/libffi/configure
@@ -3457,6 +3457,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libgfortran/configure
+++ gcc-4.1.0/libgfortran/configure
@@ -3699,6 +3699,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libjava/configure
+++ gcc-4.1.0/libjava/configure
@@ -5137,6 +5137,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libmudflap/configure
+++ gcc-4.1.0/libmudflap/configure
@@ -5382,6 +5382,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libobjc/configure
+++ gcc-4.1.0/libobjc/configure
@@ -3312,6 +3312,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gcc-4.1.0/libtool.m4
+++ gcc-4.1.0/libtool.m4
@@ -743,6 +743,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
[lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
--- gcc-4.1.0/ltconfig
+++ gcc-4.1.0/ltconfig
@@ -603,6 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
+linux-uclibc*) ;;
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1274,6 +1275,23 @@ linux-gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
--- gcc-4.1.0/zlib/configure
+++ gcc-4.1.0/zlib/configure
@@ -3426,6 +3426,11 @@ linux-gnu*)
lt_cv_deplibs_check_method=pass_all
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'

@ -1,27 +0,0 @@
--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
+++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
@@ -674,7 +674,7 @@
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
tmake_file="${tmake_file} t-linux arm/t-arm"
case ${target} in
- arm*-*-linux-gnueabi)
+ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
# The BPABI long long divmod functions return a 128-bit value in
diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
+++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
@@ -53,7 +53,11 @@
/* Use ld-linux.so.3 so that it will be possible to run "classic"
GNU/Linux binaries on an EABI system. */
#undef LINUX_TARGET_INTERPRETER
+#ifdef USE_UCLIBC
+#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
+#else
#define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
+#endif
/* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
use the GNU/Linux version, not the generic BPABI version. */

File diff suppressed because it is too large Load Diff

@ -1,50 +0,0 @@
# DP: Build and install libstdc++_pic.a library.
--- gcc/libstdc++-v3/src/Makefile.am
+++ gcc/libstdc++-v3/src/Makefile.am
@@ -214,6 +214,12 @@
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+install-exec-local:
+ifeq ($(enable_shared),yes)
+ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+endif
+
# Added bits to build debug library.
if GLIBCXX_BUILD_DEBUG
all-local: build_debug
--- gcc/libstdc++-v3/src/Makefile.in
+++ gcc/libstdc++-v3/src/Makefile.in
@@ -627,7 +627,7 @@
install-data-am: install-data-local
-install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
install-info: install-info-am
@@ -660,6 +660,7 @@
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-data-local install-exec \
+ install-exec-local \
install-exec-am install-info install-info-am install-man \
install-strip install-toolexeclibLTLIBRARIES installcheck \
installcheck-am installdirs maintainer-clean \
@@ -743,6 +743,13 @@
install_debug:
(cd ${debugdir} && $(MAKE) \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
+
+install-exec-local:
+ifeq ($(enable_shared),yes)
+ $(AR) cru libstdc++_pic.a *.o $(top_builddir)/libsupc++/*.o
+ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
+endif
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

@ -1,11 +0,0 @@
--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
+++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
@@ -500,7 +500,7 @@
#ifdef __linux__
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
- && !defined(__ia64__)
+ && !defined(__ia64__) && !defined(__UCLIBC__)
# ifndef GC_HAVE_BUILTIN_BACKTRACE
# define GC_HAVE_BUILTIN_BACKTRACE
# endif

@ -1,11 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
+++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
@@ -142,7 +142,7 @@
using ::vsprintf;
}
-#if _GLIBCXX_USE_C99
+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
#undef snprintf
#undef vfscanf

@ -1,12 +0,0 @@
--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
+++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
@@ -7194,6 +7194,9 @@
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <complex.h>
+#ifdef __UCLIBC__
+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
+#endif
int
main ()
{

@ -1,24 +0,0 @@
--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
@@ -59,6 +59,9 @@
#include <bits/allocator.h>
#include <ext/hash_fun.h>
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
# ifdef __GC
# define __GC_CONST const
# else
--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
+++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
@@ -53,6 +53,9 @@
#include <ext/memory> // For uninitialized_copy_n
#include <ext/numeric> // For power
+/* cope w/ index defined as macro, SuSv3 proposal */
+#undef index
+
namespace __gnu_cxx
{
using std::size_t;

@ -1,25 +0,0 @@
http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
--- gcc/gcc/configure.ac (revision 106699)
+++ gcc/gcc/configure.ac (working copy)
@@ -2446,7 +2446,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25
--- gcc/gcc/configure
+++ gcc/gcc/configure
@@ -14846,7 +14846,7 @@
tls_first_minor=14
tls_as_opt="-m64 -Aesame --fatal-warnings"
;;
- sh-*-* | sh[34]-*-*)
+ sh-*-* | sh[34]*-*-*)
conftest_s='
.section ".tdata","awT",@progbits
foo: .long 25

@ -1,67 +0,0 @@
By Lennert Buytenhek <buytenh@wantstofly.org>
Adds support for arm*b-linux* big-endian ARM targets
See http://gcc.gnu.org/PR16350
--- gcc-4.1.0/gcc/config/arm/linux-elf.h
+++ gcc-4.1.0/gcc/config/arm/linux-elf.h
@@ -28,19 +28,33 @@
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+/*
+ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
+ * (big endian) configurations.
+ */
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
+#define TARGET_ENDIAN_OPTION "mbig-endian"
+#define TARGET_LINKER_EMULATION "armelfb_linux"
+#else
+#define TARGET_ENDIAN_DEFAULT 0
+#define TARGET_ENDIAN_OPTION "mlittle-endian"
+#define TARGET_LINKER_EMULATION "armelf_linux"
+#endif
+
#undef TARGET_DEFAULT_FLOAT_ABI
#define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
#undef TARGET_DEFAULT
-#define TARGET_DEFAULT (0)
+#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
+#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
#undef MULTILIB_DEFAULTS
#define MULTILIB_DEFAULTS \
- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
+ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
/* Now we define the strings used to build the spec file. */
#undef LIB_SPEC
@@ -61,7 +75,7 @@
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker " LINUX_TARGET_INTERPRETER "} \
-X \
- %{mbig-endian:-EB}" \
+ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
SUBTARGET_EXTRA_LINK_SPEC
#undef LINK_SPEC
--- gcc-4.1.0/gcc/config.gcc
+++ gcc-4.1.0/gcc/config.gcc
@@ -672,6 +672,11 @@
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ case $target in
+ arm*b-*)
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ ;;
+ esac
tmake_file="${tmake_file} t-linux arm/t-arm"
case ${target} in
arm*-*-linux-gnueabi)

@ -1,58 +0,0 @@
This patch (C) 2007 Yann E. MORIN
Licensed under GPL v2.
First hunk of this patch solves compiling uClibc-0.9.28{,.1} :
make[1]: Entering directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
LD libuClibc-0.9.29.so
libc/libc_so.a(difftime.os): In function `difftime':
difftime.c:(.text+0x8): undefined reference to `__floatsidf'
difftime.c:(.text+0x2c): undefined reference to `__subdf3'
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
_fpmaxtostr.c:(.text+0xd4): undefined reference to `__nedf2'
_fpmaxtostr.c:(.text+0xf8): undefined reference to `__eqdf2'
_fpmaxtostr.c:(.text+0x114): undefined reference to `__divdf3'
_fpmaxtostr.c:(.text+0x120): undefined reference to `__ltdf2'
_fpmaxtostr.c:(.text+0x1c4): undefined reference to `__muldf3'
_fpmaxtostr.c:(.text+0x388): undefined reference to `__gedf2'
_fpmaxtostr.c:(.text+0x430): undefined reference to `__adddf3'
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
__psfs_do_numeric.c:(.text+0x520): undefined reference to `__truncdfsf2'
libc/libc_so.a(strtof.os): In function `strtof':
strtof.c:(.text+0x1c): undefined reference to `__extendsfdf2'
/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/cc_core_prefix/lib/gcc/arm-linux-uclibc/4.1.1/libgcc.a(_fixunsdfsi.o):
In function `__fixunsdfsi':
libgcc2.c:(.text+0x34): undefined reference to `__fixdfsi'
make[2]: *** [lib/libc.so] Error 1
make[1]: *** [lib/libc.so.0] Error 2
make[1]: Leaving directory `/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc'
make: *** [/home/ymorin/x-tools/build/armeb-unknown-linux-uclibc/gcc-4.1.1-uClibc-0.9.28.1/build-libc/lib/libc.a]
Error 2
The second hunk fixes building final gcc because soft-float implies using -lfloat (which we don't have).
diff -dur gcc-4.1.1.no-softfloat-fix/gcc/config.gcc gcc-4.1.1/gcc/config.gcc
--- gcc-4.1.1.no-softfloat-fix/gcc/config.gcc 2007-02-01 21:57:17.000000000 +0100
+++ gcc-4.1.1/gcc/config.gcc 2007-02-01 22:11:06.000000000 +0100
@@ -690,7 +690,7 @@
default_use_cxa_atexit=yes
;;
*)
- tmake_file="$tmake_file arm/t-linux"
+ tmake_file="$tmake_file arm/t-linux arm/t-arm-elf"
;;
esac
tm_file="$tm_file arm/aout.h arm/arm.h"
diff -dur gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h gcc-4.1.1/gcc/config/arm/linux-elf.h
--- gcc-4.1.1.-lfloat/gcc/config/arm/linux-elf.h 2007-02-01 21:57:17.000000000 +0100
+++ gcc-4.1.1/gcc/config/arm/linux-elf.h 2007-02-01 23:00:42.000000000 +0100
@@ -63,7 +63,7 @@
%{shared:-lc} \
%{!shared:%{profile:-lc_p}%{!profile:-lc}}"
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+#define LIBGCC_SPEC "-lgcc"
#ifdef USE_UCLIBC
#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"

@ -1,78 +0,0 @@
--- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
@@ -3583,6 +3583,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
@@ -653,6 +653,11 @@
fi
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
newsos6)
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
lt_cv_file_magic_cmd=/usr/bin/file
--- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
@@ -602,7 +602,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
-linux-gnu*) ;;
+linux-gnu*|linux-uclibc*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1270,6 +1270,24 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
--- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
@@ -3595,6 +3595,11 @@
fi
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
newsos6)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file

@ -1,15 +0,0 @@
--- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
@@ -6249,7 +6249,12 @@
echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+if test "${bash_cv_have_mbstate_t+set}" != set; then
+ bash_cv_have_mbstate_t=yes
+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
+fi
if test "${bash_cv_have_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else

@ -1,34 +0,0 @@
--- gdb-6.3.org/gdb/gdbserver/thread-db.c 2004-10-17 02:42:00.000000000 +0900
+++ gdb-6.3/gdb/gdbserver/thread-db.c 2005-01-27 12:19:29.000000000 +0900
@@ -21,6 +21,7 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <unistd.h>
#include "server.h"
#include "linux-low.h"
@@ -142,6 +143,7 @@
td_event_msg_t msg;
td_err_e err;
struct inferior_linux_data *tdata;
+ int timeout;
if (debug_threads)
fprintf (stderr, "Thread creation event.\n");
@@ -152,7 +154,13 @@
In the LinuxThreads implementation, this is safe,
because all events come from the manager thread
(except for its own creation, of course). */
- err = td_ta_event_getmsg (thread_agent, &msg);
+ for (timeout = 0; timeout < 50000; timeout++)
+ {
+ err = td_ta_event_getmsg (thread_agent, &msg);
+ if (err != TD_NOMSG)
+ break;
+ usleep(1000);
+ }
if (err != TD_OK)
fprintf (stderr, "thread getmsg err: %s\n",
thread_db_err_str (err));

@ -1,87 +0,0 @@
diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
--- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
+++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
@@ -309,7 +309,7 @@
# include <unistd.h>
#endif"
-ac_subdirs_all="$ac_subdirs_all doc testsuite"
+ac_subdirs_all="$ac_subdirs_all doc"
ac_subdirs_all="$ac_subdirs_all gdbtk"
ac_subdirs_all="$ac_subdirs_all multi-ice"
ac_subdirs_all="$ac_subdirs_all gdbserver"
@@ -5940,7 +5940,7 @@
-subdirs="$subdirs doc testsuite"
+subdirs="$subdirs doc"
. $srcdir/configure.host
diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
--- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
+++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
@@ -1239,7 +1239,7 @@
ac_cache_corrupted=: ;;
,);;
*)
- if test "x$ac_old_val" != "x$ac_new_val"; then
+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
--- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
+++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
@@ -1248,7 +1248,7 @@
ac_cache_corrupted=: ;;
,);;
*)
- if test "x$ac_old_val" != "x$ac_new_val"; then
+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
--- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
+++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
@@ -383,7 +383,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
# If GCC_FOR_TARGET is not overriden on the command line, then this
@@ -423,7 +423,7 @@
fi; \
fi`
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)
diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
--- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
+++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
@@ -386,7 +386,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
# If GCC_FOR_TARGET is not overriden on the command line, then this
@@ -426,7 +426,7 @@
fi; \
fi`
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CXXFLAGS_FOR_TARGET = $(strip $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ $(FLAGS_FOR_TARGET)

@ -1,28 +0,0 @@
Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
coredump handling by gdb for current kernels. Update the hardcoded constants
to reflect the change.
--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
@@ -53,12 +53,22 @@
#define EF_REG0 6
#define EF_REG31 37
+
+#if 0
#define EF_LO 38
#define EF_HI 39
#define EF_CP0_EPC 40
#define EF_CP0_BADVADDR 41
#define EF_CP0_STATUS 42
#define EF_CP0_CAUSE 43
+#else
+#define EF_CP0_STATUS 38
+#define EF_LO 39
+#define EF_HI 40
+#define EF_CP0_BADVADDR 41
+#define EF_CP0_CAUSE 42
+#define EF_CP0_EPC 43
+#endif
#define EF_SIZE 180

@ -1,78 +0,0 @@
--- gdb-6.3/bfd/configure.orig Fri Oct 8 16:53:56 2004
+++ gdb-6.3/bfd/configure Sun Feb 27 18:32:58 2005
@@ -3583,6 +3583,11 @@
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
netbsd* | knetbsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
--- gdb-6.3/libtool.m4.orig Wed Jul 21 21:21:41 2004
+++ gdb-6.3/libtool.m4 Mon Feb 28 00:08:11 2005
@@ -653,6 +653,11 @@
fi
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
newsos6)
[lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
lt_cv_file_magic_cmd=/usr/bin/file
--- gdb-6.3/ltconfig.orig Tue Oct 5 15:34:42 2004
+++ gdb-6.3/ltconfig Sun Feb 27 18:14:41 2005
@@ -602,7 +602,7 @@
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
case $host_os in
-linux-gnu*) ;;
+linux-gnu*|linux-uclibc*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
@@ -1270,6 +1270,24 @@
dynamic_linker='GNU/Linux ld.so'
;;
+linux-uclibc*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ soname_spec='${libname}${release}.so$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ # Note: copied from linux-gnu, and may not be appropriate.
+ hardcode_into_libs=yes
+ # Assume using the uClibc dynamic linker.
+ dynamic_linker="uClibc ld.so"
+ ;;
+
netbsd*)
need_lib_prefix=no
need_version=no
--- gdb-6.3/opcodes/configure.orig Fri Sep 17 08:13:38 2004
+++ gdb-6.3/opcodes/configure Mon Feb 28 00:09:42 2005
@@ -3595,6 +3595,11 @@
fi
;;
+linux-uclibc*)
+ lt_cv_deplibs_check_method=pass_all
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
+ ;;
+
newsos6)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file

@ -1,15 +0,0 @@
--- gdb-6.1.1-dist/readline/configure 2003-05-27 18:29:47.000000000 -0500
+++ gdb-6.1.1/readline/configure 2004-08-09 14:20:23.000000000 -0500
@@ -6249,7 +6249,12 @@
echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "bash_cv_have_mbstate_t=$bash_cv_have_mbstate_t" >&6
echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
+if test "${bash_cv_have_mbstate_t+set}" != set; then
+ bash_cv_have_mbstate_t=yes
+ echo $ECHO_N "WARNING!! forcing to yes!!! $ECHO_C" >&6
+fi
if test "${bash_cv_have_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else

@ -1,33 +0,0 @@
--- gdb-6.5/./gdb/gdbserver/thread-db.c.orig 2006-03-15 08:13:29.000000000 -0800
+++ gdb-6.5/./gdb/gdbserver/thread-db.c 2008-04-01 21:21:23.000000000 -0700
@@ -21,6 +21,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
+#include <unistd.h>
#include "server.h"
#include "linux-low.h"
@@ -134,6 +135,7 @@ thread_db_create_event (CORE_ADDR where)
td_event_msg_t msg;
td_err_e err;
struct inferior_linux_data *tdata;
+ int timeout;
if (debug_threads)
fprintf (stderr, "Thread creation event.\n");
@@ -144,7 +146,13 @@ thread_db_create_event (CORE_ADDR where)
In the LinuxThreads implementation, this is safe,
because all events come from the manager thread
(except for its own creation, of course). */
- err = td_ta_event_getmsg (thread_agent, &msg);
+ for (timeout = 0; timeout < 50000; timeout++)
+ {
+ err = td_ta_event_getmsg (thread_agent, &msg);
+ if (err != TD_NOMSG)
+ break;
+ usleep(1000);
+ }
if (err != TD_OK)
fprintf (stderr, "thread getmsg err: %s\n",
thread_db_err_str (err));

@ -1,69 +0,0 @@
diff -ur gdb-6.4/gdb/configure gdb-6.4-patched/gdb/configure
--- gdb-6.4/gdb/configure 2005-07-25 10:08:40.000000000 -0500
+++ gdb-6.4-patched/gdb/configure 2007-02-05 13:22:36.000000000 -0600
@@ -309,7 +309,7 @@
# include <unistd.h>
#endif"
-ac_subdirs_all="$ac_subdirs_all doc testsuite"
+ac_subdirs_all="$ac_subdirs_all doc"
ac_subdirs_all="$ac_subdirs_all gdbtk"
ac_subdirs_all="$ac_subdirs_all multi-ice"
ac_subdirs_all="$ac_subdirs_all gdbserver"
@@ -5940,7 +5940,7 @@
-subdirs="$subdirs doc testsuite"
+subdirs="$subdirs doc"
. $srcdir/configure.host
diff -ur gdb-6.4/gdb/gdbserver/configure gdb-6.4-patched/gdb/gdbserver/configure
--- gdb-6.4/gdb/gdbserver/configure 2005-09-17 18:14:37.000000000 -0500
+++ gdb-6.4-patched/gdb/gdbserver/configure 2007-02-05 13:22:58.000000000 -0600
@@ -1239,7 +1239,7 @@
ac_cache_corrupted=: ;;
,);;
*)
- if test "x$ac_old_val" != "x$ac_new_val"; then
+ if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
diff -ur gdb-6.4/gdb/testsuite/configure gdb-6.4-patched/gdb/testsuite/configure
--- gdb-6.4/gdb/testsuite/configure 2005-04-11 09:13:12.000000000 -0500
+++ gdb-6.4-patched/gdb/testsuite/configure 2007-02-05 13:22:36.000000000 -0600
@@ -1248,7 +1248,7 @@
ac_cache_corrupted=: ;;
,);;
*)
- if test "x$ac_old_val" != "x$ac_new_val"; then
+ if test "`echo $ac_old_val" != "`echo $ac_new_val"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
diff -ur gdb-6.4/Makefile.in gdb-6.4-patched/Makefile.in
--- gdb-6.4/Makefile.in 2005-12-01 23:29:54.000000000 -0600
+++ gdb-6.4-patched/Makefile.in 2007-02-05 13:22:36.000000000 -0600
@@ -383,7 +383,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
# If GCC_FOR_TARGET is not overriden on the command line, then this
diff -ur gdb-6.4/Makefile.tpl gdb-6.4-patched/Makefile.tpl
--- gdb-6.4/Makefile.tpl 2005-10-22 05:37:55.000000000 -0500
+++ gdb-6.4-patched/Makefile.tpl 2007-02-05 13:22:36.000000000 -0600
@@ -386,7 +386,7 @@
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+CFLAGS_FOR_TARGET = $(strip $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET))
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
# If GCC_FOR_TARGET is not overriden on the command line, then this

@ -1,28 +0,0 @@
Sometime around 2.4.22-23, the mips pt_regs.h fields were reordered, breaking
coredump handling by gdb for current kernels. Update the hardcoded constants
to reflect the change.
--- gdb-6.2.1/gdb/mips-linux-tdep.c-orig 2004-10-29 14:23:55.000000000 -0500
+++ gdb-6.2.1/gdb/mips-linux-tdep.c 2004-10-29 14:26:44.000000000 -0500
@@ -53,12 +53,22 @@
#define EF_REG0 6
#define EF_REG31 37
+
+#if 0
#define EF_LO 38
#define EF_HI 39
#define EF_CP0_EPC 40
#define EF_CP0_BADVADDR 41
#define EF_CP0_STATUS 42
#define EF_CP0_CAUSE 43
+#else
+#define EF_CP0_STATUS 38
+#define EF_LO 39
+#define EF_HI 40
+#define EF_CP0_BADVADDR 41
+#define EF_CP0_CAUSE 42
+#define EF_CP0_EPC 43
+#endif
#define EF_SIZE 180

@ -1,14 +0,0 @@
Give preference to target-optimised functions over glibc's ones,
which in turn ahave precedence over generic ones.
--- uClibc.orig/libc/Makefile 2005-07-20 08:10:44.000000000 +0200
+++ uclibc/libc/Makefile 2005-07-28 13:33:40.000000000 +0200
@@ -59,7 +59,7 @@
$(AR) dN 2 $(LIBNAME) $$objs && \
$(AR) dN 2 $(LIBNAME) $$objs
@for objfile in obj.signal \
- obj.string.generic obj.string.$(TARGET_ARCH) obj.string \
+ obj.string obj.string.generic obj.string.$(TARGET_ARCH) \
obj.sysdeps.common obj.sysdeps.$(TARGET_ARCH) ; do \
if [ -e $$objfile ] ; then \
echo $(AR) $(ARFLAGS) $(LIBNAME) $$objfile ; \

@ -1,22 +0,0 @@
We know that the kernel headers are in place. Don't try to install them.
diff -dur uClibc-0.9.28.1.orig/Makefile uClibc-0.9.28.1/Makefile
--- uClibc-0.9.28.1.orig/Makefile 2007-01-28 06:38:00.000000000 +0100
+++ uClibc-0.9.28.1/Makefile 2007-01-28 18:55:46.000000000 +0100
@@ -158,12 +158,10 @@
$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
- if [ "$(KERNEL_SOURCE)" = "$(DEVEL_PREFIX)" ] ; then \
- extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
- else \
- extra_exclude="" ; \
- fi ; \
- tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
+ extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
+ tar -chf - include --exclude .svn --exclude CVS \
+ --exclude include/linux \
+ --exclude include/asm'*' \
| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
# Remove floating point related headers since float support is disabled.

@ -1,14 +0,0 @@
diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile
--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/common/Makefile 2007-01-26 00:54:19.000000000 +0100
+++ uClibc-0.9.28.1/libc/sysdeps/linux/common/Makefile 2007-02-01 08:44:37.000000000 +0100
@@ -25,6 +25,10 @@
SRCS := $(filter-out sbrk.c,$(SRCS))
endif
+ifneq ($(strip $(UCLIBC_HAS_LFS)),y)
+SRCS := $(filter-out readahead.c,$(SRCS))
+endif
+
ifneq ($(strip $(UCLIBC_HAS_SSP)),y)
SRCS := $(filter-out ssp.c,$(SRCS))
endif

@ -1,15 +0,0 @@
Index: libc/misc/time/time.c
===================================================================
--- a/libc/misc/time/time.c (revision 17534)
+++ b/libc/misc/time/time.c (revision 17647)
@@ -158,7 +158,9 @@
#endif
#if defined (L_tzset) || defined (L_localtime_r) || defined(L_strftime) || \
- defined(L__time_mktime) || defined(L__time_mktime_tzi)
+ defined(L__time_mktime) || defined(L__time_mktime_tzi) || \
+ ((defined(L_strftime) || defined(L_strftime_l)) && \
+ defined(__UCLIBC_HAS_XLOCALE__))
void _time_tzset (int);

@ -1,17 +0,0 @@
diff -urN uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h
--- uClibc-dist/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:25 2005
+++ uClibc/libc/sysdeps/linux/common/bits/uClibc_touplow.h Fri Jun 3 13:30:39 2005
@@ -34,11 +34,11 @@
/* glibc uses the equivalent of - typedef __int32_t __ctype_touplow_t; */
-typedef __uint16_t __ctype_mask_t;
+typedef __uint32_t __ctype_mask_t;
#ifdef __UCLIBC_HAS_CTYPE_SIGNED__
-typedef __int16_t __ctype_touplow_t;
+typedef __int32_t __ctype_touplow_t;
#define __UCLIBC_CTYPE_B_TBL_OFFSET 128
#define __UCLIBC_CTYPE_TO_TBL_OFFSET 128

@ -1,31 +0,0 @@
diff -dur uClibc-0.9.28.orig/Rules.mak uClibc-0.9.28/Rules.mak
--- uClibc-0.9.28.orig/Rules.mak 2005-08-18 00:49:49.000000000 +0200
+++ uClibc-0.9.28/Rules.mak 2007-01-30 10:53:34.000000000 +0100
@@ -168,6 +168,7 @@
CPU_CFLAGS-$(CONFIG_MIPS_ISA_4)+=-mips4 -mtune=mips4
CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS32)+=-mips32 -mtune=mips32
CPU_CFLAGS-$(CONFIG_MIPS_ISA_MIPS64)+=-mips64 -mtune=mips32
+ CPU_CFLAGS-$(CONFIG_MIPS_ISA_CUSTOM)+=-march=$(CONFIG_MIPS_CPU_CFLAGS_CUSTOM)
endif
ifeq ($(strip $(TARGET_ARCH)),sh)
diff -dur uClibc-0.9.28.orig/extra/Configs/Config.mips uClibc-0.9.28/extra/Configs/Config.mips
--- uClibc-0.9.28.orig/extra/Configs/Config.mips 2005-08-18 00:49:41.000000000 +0200
+++ uClibc-0.9.28/extra/Configs/Config.mips 2007-01-30 10:52:12.000000000 +0100
@@ -63,4 +63,16 @@
config CONFIG_MIPS_ISA_MIPS64
bool "MIPS64"
+config CONFIG_MIPS_ISA_CUSTOM
+ bool "Custom"
+
endchoice
+
+config CONFIG_MIPS_CPU_CFLAGS_CUSTOM
+ string
+ prompt "Custon ISA"
+ depends on CONFIG_MIPS_ISA_CUSTOM
+ default ""
+ help
+ Enter your custom ISA here (eg: lx4189!).
+

@ -1,41 +0,0 @@
diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S
--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/clone.S 2007-02-07 11:18:12.000000000 +0100
+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/clone.S 2007-02-07 10:41:34.000000000 +0100
@@ -24,7 +24,7 @@
#include <sys/regdef.h>
#define _ERRNO_H 1
#include <bits/errno.h>
-#include <asm/asm.h>
+#include <sys/asm.h>
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */
diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S
--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:18:12.000000000 +0100
+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/pipe.S 2007-02-07 11:16:52.000000000 +0100
@@ -3,9 +3,9 @@
/*see uClibc's sh/pipe.c and glibc-2.2.4's mips/pipe.S */
#include <features.h>
-#include <asm/asm.h>
+#include <sys/asm.h>
#include <asm/unistd.h>
-#include <asm/regdef.h>
+#include <sys/regdef.h>
.globl pipe
.ent pipe, 0
diff -dur uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S
--- uClibc-0.9.28.1.orig/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:18:12.000000000 +0100
+++ uClibc-0.9.28.1/libc/sysdeps/linux/mips/syscall.S 2007-02-07 11:17:03.000000000 +0100
@@ -17,8 +17,8 @@
02111-1307 USA. */
#include <features.h>
-#include <asm/asm.h>
-#include <asm/regdef.h>
+#include <sys/asm.h>
+#include <sys/regdef.h>
#ifdef __PIC__
.option pic2

Some files were not shown because too many files have changed in this diff Show More