From 1ca99c8bcfa96041185848b2efef6953189f503f Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Sun, 16 Jan 2005 11:43:02 +0000 Subject: Initial revision git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@197 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- toolchain/binutils/2.14.90.0.6/001-debian.patch | 185 ++ .../binutils/2.14.90.0.6/100-uclibc-conf.patch | 646 ++++++ .../binutils/2.14.90.0.6/200-build_modules.patch | 31 + toolchain/binutils/2.14.90.0.6/210-cflags.patch | 32 + toolchain/binutils/2.14.90.0.7/001-debian.patch | 2394 ++++++++++++++++++++ .../binutils/2.14.90.0.7/100-uclibc-conf.patch | 646 ++++++ .../binutils/2.14.90.0.7/200-build_modules.patch | 31 + toolchain/binutils/2.14.90.0.7/210-cflags.patch | 32 + .../binutils/2.14.90.0.7/600-arm-textrel.patch | 63 + toolchain/binutils/2.14.90.0.8/001-debian.patch | 142 ++ .../binutils/2.14.90.0.8/100-uclibc-conf.patch | 630 ++++++ .../binutils/2.14.90.0.8/600-arm-textrel.patch | 63 + .../binutils/2.15.90.0.1.1/100-uclibc-conf.patch | 692 ++++++ .../binutils/2.15.90.0.1.1/600-arm-textrel.patch | 63 + .../binutils/2.15.90.0.1/100-uclibc-conf.patch | 692 ++++++ .../binutils/2.15.90.0.1/600-arm-textrel.patch | 63 + .../binutils/2.15.90.0.2/100-uclibc-conf.patch | 692 ++++++ .../binutils/2.15.90.0.2/600-arm-textrel.patch | 63 + .../binutils/2.15.90.0.3/100-uclibc-conf.patch | 692 ++++++ toolchain/binutils/2.15.90.0.3/210-cflags.patch | 32 + .../binutils/2.15.90.0.3/500-branch-likely.patch | 10 + .../binutils/2.15.90.0.3/600-arm-textrel.patch | 63 + .../binutils/2.15.91.0.1/100-uclibc-conf.patch | 692 ++++++ .../binutils/2.15.91.0.1/600-arm-textrel.patch | 63 + .../binutils/2.15.91.0.2/100-uclibc-conf.patch | 722 ++++++ .../binutils/2.15.91.0.2/500-branch-likely.patch | 10 + .../binutils/2.15.91.0.2/600-arm-textrel.patch | 63 + .../700-binutils-20040817-linkonce.patch | 118 + .../2.15.91.0.2/701-binutils-dup-sections.patch | 68 + .../2.15.91.0.2/702-binutils-skip-comments.patch | 101 + .../binutils/2.15.92.0.2/100-uclibc-conf.patch | 724 ++++++ .../2.15.92.0.2/300-001_ld_makefile_patch.patch | 52 + .../2.15.92.0.2/300-006_better_file_error.patch | 43 + .../300-012_check_ldrunpath_length.patch | 47 + .../2.15.92.0.2/300-117_mips_symbolic_link.patch | 42 + .../300-120_mips_xgot_multigot_workaround.patch | 39 + .../binutils/2.15.92.0.2/600-arm-textrel.patch | 54 + .../2.15.92.0.2/702-binutils-skip-comments.patch | 101 + .../binutils/2.15.94.0.1/100-uclibc-conf.patch | 734 ++++++ .../2.15.94.0.1/300-001_ld_makefile_patch.patch | 52 + .../2.15.94.0.1/300-006_better_file_error.patch | 43 + .../300-012_check_ldrunpath_length.patch | 47 + .../300-120_mips_xgot_multigot_workaround.patch | 39 + .../2.15.94.0.1/702-binutils-skip-comments.patch | 101 + .../binutils/2.15.94.0.2/100-uclibc-conf.patch | 749 ++++++ .../2.15.94.0.2/300-001_ld_makefile_patch.patch | 52 + .../2.15.94.0.2/300-006_better_file_error.patch | 43 + .../300-012_check_ldrunpath_length.patch | 47 + .../300-120_mips_xgot_multigot_workaround.patch | 39 + .../2.15.94.0.2/702-binutils-skip-comments.patch | 101 + toolchain/binutils/2.15/100-uclibc-conf.patch | 692 ++++++ toolchain/binutils/2.15/600-arm-textrel.patch | 63 + toolchain/binutils/Config.in | 66 + toolchain/binutils/Makefile.in | 1 + toolchain/binutils/binutils.mk | 134 ++ 55 files changed, 13899 insertions(+) create mode 100644 toolchain/binutils/2.14.90.0.6/001-debian.patch create mode 100644 toolchain/binutils/2.14.90.0.6/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.14.90.0.6/200-build_modules.patch create mode 100644 toolchain/binutils/2.14.90.0.6/210-cflags.patch create mode 100644 toolchain/binutils/2.14.90.0.7/001-debian.patch create mode 100644 toolchain/binutils/2.14.90.0.7/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.14.90.0.7/200-build_modules.patch create mode 100644 toolchain/binutils/2.14.90.0.7/210-cflags.patch create mode 100644 toolchain/binutils/2.14.90.0.7/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.14.90.0.8/001-debian.patch create mode 100644 toolchain/binutils/2.14.90.0.8/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.90.0.1.1/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.90.0.1.1/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.90.0.1/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.90.0.1/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.90.0.2/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.90.0.2/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.90.0.3/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.90.0.3/210-cflags.patch create mode 100644 toolchain/binutils/2.15.90.0.3/500-branch-likely.patch create mode 100644 toolchain/binutils/2.15.90.0.3/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.91.0.1/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.91.0.1/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.91.0.2/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.91.0.2/500-branch-likely.patch create mode 100644 toolchain/binutils/2.15.91.0.2/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch create mode 100644 toolchain/binutils/2.15.91.0.2/701-binutils-dup-sections.patch create mode 100644 toolchain/binutils/2.15.91.0.2/702-binutils-skip-comments.patch create mode 100644 toolchain/binutils/2.15.92.0.2/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.92.0.2/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/2.15.92.0.2/300-006_better_file_error.patch create mode 100644 toolchain/binutils/2.15.92.0.2/300-012_check_ldrunpath_length.patch create mode 100644 toolchain/binutils/2.15.92.0.2/300-117_mips_symbolic_link.patch create mode 100644 toolchain/binutils/2.15.92.0.2/300-120_mips_xgot_multigot_workaround.patch create mode 100644 toolchain/binutils/2.15.92.0.2/600-arm-textrel.patch create mode 100644 toolchain/binutils/2.15.92.0.2/702-binutils-skip-comments.patch create mode 100644 toolchain/binutils/2.15.94.0.1/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.94.0.1/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/2.15.94.0.1/300-006_better_file_error.patch create mode 100644 toolchain/binutils/2.15.94.0.1/300-012_check_ldrunpath_length.patch create mode 100644 toolchain/binutils/2.15.94.0.1/300-120_mips_xgot_multigot_workaround.patch create mode 100644 toolchain/binutils/2.15.94.0.1/702-binutils-skip-comments.patch create mode 100644 toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch create mode 100644 toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch create mode 100644 toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch create mode 100644 toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch create mode 100644 toolchain/binutils/2.15/100-uclibc-conf.patch create mode 100644 toolchain/binutils/2.15/600-arm-textrel.patch create mode 100644 toolchain/binutils/Config.in create mode 100644 toolchain/binutils/Makefile.in create mode 100644 toolchain/binutils/binutils.mk (limited to 'toolchain/binutils') diff --git a/toolchain/binutils/2.14.90.0.6/001-debian.patch b/toolchain/binutils/2.14.90.0.6/001-debian.patch new file mode 100644 index 0000000000..97b8e7fde7 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.6/001-debian.patch @@ -0,0 +1,185 @@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.am ++++ binutils-2.11.90.0.19/ld/Makefile.am +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- binutils-2.11.90.0.19.orig/ld/Makefile.in ++++ binutils-2.11.90.0.19/ld/Makefile.in +@@ -123,7 +123,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urN binutils-2.11.90.0.27/gprof/gprof.texi binutils-2.11.90.0.27.new/gprof/gprof.texi +--- binutils-2.11.90.0.27/gprof/gprof.texi Tue Jun 19 14:57:58 2001 ++++ binutils-2.11.90.0.27.new/gprof/gprof.texi Mon Aug 27 10:27:23 2001 +@@ -137,6 +137,10 @@ + If more than one profile file is specified, the @code{gprof} + output shows the sum of the profile information in the given profile files. + ++If you use gcc 2.95.x or 3.0 to compile your binaries, you may need ++to add the @samp{-fprofile-arcs} to the compile command line in order ++for the call graphs to be properly stored in gmon.out. ++ + @code{Gprof} calculates the amount of time spent in each routine. + Next, these times are propagated along the edges of the call graph. + Cycles are discovered, and calls into a cycle are made to share the time +@@ -266,6 +270,11 @@ + to do the linking, simply specify @samp{-pg} in addition to your usual + options. The same option, @samp{-pg}, alters either compilation or linking + to do what is necessary for profiling. Here are examples: ++ ++If you use gcc 2.95.x or 3.0.x, you may need to add the ++@samp{-fprofile-arcs} option to the compile line along with @samp{-pg} ++in order to allow the call-graphs to be properly included in the gmon.out ++file. + + @example + cc -g -c myprog.c utils.c -pg +diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c +--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001 ++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001 +@@ -127,6 +127,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) +diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c +--- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001 ++++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001 +@@ -1830,7 +1830,7 @@ + * The function returns the length of this instruction in bytes. + */ + +-static char intel_syntax; ++static signed char intel_syntax; + static char open_char; + static char close_char; + static char separator_char; +diff -urN binutils-2.12.90.0.12/ld/emultempl/elf32.em binutils-2.12.90.0.12.new/ld/emultempl/elf32.em +--- binutils-2.12.90.0.12/ld/emultempl/elf32.em Wed Jun 19 00:41:59 2002 ++++ binutils-2.12.90.0.12.new/ld/emultempl/elf32.em Wed Jun 26 10:00:26 2002 +@@ -672,6 +672,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, + force)) + break; +@@ -867,6 +869,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf${ELFSIZE}_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, +diff -urN binutils-2.13.90.0.18/gprof/gprof.texi binutils-2.13.90.0.18.new/gprof/gprof.texi +--- binutils-2.13.90.0.18/gprof/gprof.texi 2003-02-02 18:29:09.000000000 -0500 ++++ binutils-2.13.90.0.18.new/gprof/gprof.texi 2003-02-02 18:28:37.000000000 -0500 +@@ -185,7 +185,7 @@ + @c man end + + @c man begin SEEALSO +-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. ++profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. + + ``An Execution Profiler for Modular Programs'', + by S. Graham, P. Kessler, M. McKusick; +diff -urN binutils-2.13.90.0.10/opcodes/alpha-opc.c binutils-2.13.90.0.10.new/opcodes/alpha-opc.c +--- binutils-2.13.90.0.10/opcodes/alpha-opc.c 2002-03-07 14:52:40.000000000 -0500 ++++ binutils-2.13.90.0.10.new/opcodes/alpha-opc.c 2002-10-12 20:16:08.000000000 -0400 +@@ -1101,7 +1101,8 @@ + { "wmb", MFC(0x18,0x4400), BASE, ARG_NONE }, + { "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } }, + { "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } }, +- { "rpcc", MFC(0x18,0xC000), BASE, { RA } }, ++ { "rpcc", MFC(0x18,0xC000), BASE, { RA, ZB } }, ++ { "rpcc", MFC(0x18,0xC000), BASE, { RA, RB } }, /* ev6 una */ + { "rc", MFC(0x18,0xE000), BASE, { RA } }, + { "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */ + { "rs", MFC(0x18,0xF000), BASE, { RA } }, +--- binutils-2.13.90.0.18/bfd/elf64-alpha.c 2003-01-21 19:21:32.000000000 +0100 ++++ binutils-2.13.90.0.18-modif/bfd/elf64-alpha.c 2003-04-11 01:24:26.000000000 +0200 +@@ -4184,9 +4184,12 @@ + + loc = srel->contents; + loc += srel->reloc_count++ * sizeof (Elf64_External_Rela); +- bfd_elf64_swap_reloca_out (abfd, &outrel, loc); +- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count +- <= srel->_cooked_size); ++ if (loc) ++ { ++ bfd_elf64_swap_reloca_out (abfd, &outrel, loc); ++ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count ++ <= srel->_cooked_size); ++ } + } + + /* Relocate an Alpha ELF section for a relocatable link. +2003-05-23 H.J. Lu + + * ltmain.sh: Make symlink for shared library if needed. + +opcodes/ + +2003-07-14 H.J. Lu + + * Makefile.in: Regenerated. + +2003-06-11 H.J. Lu + + * Makefile.in: Regenerated. + +2003-05-23 H.J. Lu + + * Makefile.am (libopcodes_la_LIBADD): Use "-L../bfd -lbfd" + instead of "../bfd/libbfd.la". + * Makefile.in: Regenerated. + +--- binutils/ltmain.sh.dso 2002-03-22 00:16:20.000000000 -0800 ++++ binutils/ltmain.sh 2003-07-14 12:50:17.000000000 -0700 +@@ -4413,6 +4413,10 @@ relink_command=\"$relink_command\"" + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ++ if test -n "$linkname"; then ++ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)" ++ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $? ++ fi + ;; + esac + exit 0 +--- binutils/opcodes/Makefile.am.dso 2003-06-11 07:18:04.000000000 -0700 ++++ binutils/opcodes/Makefile.am 2003-07-14 12:50:18.000000000 -0700 +@@ -283,7 +283,7 @@ disassemble.lo: disassemble.c $(INCDIR)/ + + libopcodes_la_SOURCES = dis-buf.c disassemble.c + libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la +-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la ++libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ -L../bfd -lbfd + libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@ + + # libtool will build .libs/libopcodes.a. We create libopcodes.a in diff --git a/toolchain/binutils/2.14.90.0.6/100-uclibc-conf.patch b/toolchain/binutils/2.14.90.0.6/100-uclibc-conf.patch new file mode 100644 index 0000000000..87db23fb01 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.6/100-uclibc-conf.patch @@ -0,0 +1,646 @@ +diff -urN binutils-2.14.90.0.6/bfd/config.bfd binutils-2.14.90.0.6-uClibc/bfd/config.bfd +--- binutils-2.14.90.0.6/bfd/config.bfd 2003-08-21 10:28:47.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/bfd/config.bfd 2004-01-06 23:20:32.000000000 -0600 +@@ -121,7 +121,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 + ;; +@@ -131,7 +131,8 @@ + alpha*-*-*) + targ_defvec=ecoffalpha_little_vec + ;; +- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf*) ++ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | \ ++ ia64*-*-linux-uclibc* | ia64*-*-elf*) + targ_defvec=bfd_elf64_ia64_little_vec + targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" + ;; +@@ -214,7 +215,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 + ;; +@@ -222,7 +223,8 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*) ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ ++ arm*-*-conix* | arm*-*-uclinux*) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +@@ -355,7 +357,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 + ;; +@@ -366,7 +368,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu*) ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -488,7 +490,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 +@@ -502,7 +504,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" + ;; +@@ -662,7 +664,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 + ;; +@@ -929,7 +931,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" +@@ -961,8 +964,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" +@@ -1110,7 +1113,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" + ;; +@@ -1157,7 +1160,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" + ;; +diff -urN binutils-2.14.90.0.6/bfd/configure binutils-2.14.90.0.6-uClibc/bfd/configure +--- binutils-2.14.90.0.6/bfd/configure 2003-08-21 10:28:47.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/bfd/configure 2004-01-06 20:26:51.000000000 -0600 +@@ -1698,6 +1698,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]+$' +@@ -5102,7 +5107,7 @@ + alpha*-*-freebsd*) + COREFILE='' + ;; +- alpha*-*-linux-gnu*) ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/alphalinux.h"' + ;; +@@ -5161,7 +5166,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"' + ;; +@@ -5211,7 +5216,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"' + ;; +diff -urN binutils-2.14.90.0.6/bfd/configure.in binutils-2.14.90.0.6-uClibc/bfd/configure.in +--- binutils-2.14.90.0.6/bfd/configure.in 2003-08-21 10:28:47.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/bfd/configure.in 2004-01-06 20:33:02.000000000 -0600 +@@ -153,7 +153,7 @@ + alpha*-*-freebsd*) + COREFILE='' + ;; +- alpha*-*-linux-gnu*) ++ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) + COREFILE=trad-core.lo + TRAD_HEADER='"hosts/alphalinux.h"' + ;; +@@ -233,7 +233,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"' +@@ -286,7 +286,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"' + ;; +diff -urN binutils-2.14.90.0.6/config.sub binutils-2.14.90.0.6-uClibc/config.sub +--- binutils-2.14.90.0.6/config.sub 2003-08-21 10:28:47.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/config.sub 2004-01-06 22:56:56.000000000 -0600 +@@ -118,7 +118,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -1131,7 +1131,8 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ +diff -urN binutils-2.14.90.0.6/configure binutils-2.14.90.0.6-uClibc/configure +--- binutils-2.14.90.0.6/configure 2003-08-21 10:29:32.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure 2004-01-07 05:43:40.000000000 -0600 +@@ -1257,6 +1262,18 @@ + i[3456789]86-*-freebsd*) + 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.14.90.0.6/configure.in binutils-2.14.90.0.6-uClibc/configure.in +--- binutils-2.14.90.0.6/configure.in 2003-08-21 10:29:30.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure.in 2004-01-07 05:44:02.000000000 -0600 +@@ -508,6 +513,19 @@ + i[[3456789]]86-*-freebsd*) + 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" ++ build_modules= ++ # 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.14.90.0.6/demangler/configure binutils-2.14.90.0.6-uClibc/demangler/configure +--- binutils-2.14.90.0.6/demangler/configure 2003-08-21 10:29:31.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/demangler/configure 2004-01-06 21:45:51.000000000 -0600 +@@ -1363,6 +1363,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.14.90.0.6/gas/configure binutils-2.14.90.0.6-uClibc/gas/configure +--- binutils-2.14.90.0.6/gas/configure 2003-07-23 10:08:10.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/gas/configure 2004-01-06 21:57:25.000000000 -0600 +@@ -1576,6 +1576,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]+$' +@@ -2370,6 +2375,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 ;; + +@@ -2386,6 +2392,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 ;; +@@ -2400,6 +2407,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 ;; +@@ -2455,7 +2463,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 ;; +@@ -2512,6 +2522,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 ;; + +@@ -2538,6 +2549,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-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; + m68k-*-netbsdelf*) fmt=elf em=nbsd ;; +@@ -2592,6 +2604,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 + case "$endian" in + big) ;; +@@ -2616,7 +2629,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 +@@ -2649,6 +2664,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.14.90.0.6/gas/configure.in binutils-2.14.90.0.6-uClibc/gas/configure.in +--- binutils-2.14.90.0.6/gas/configure.in 2003-07-23 10:08:10.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/gas/configure.in 2004-01-06 21:57:26.000000000 -0600 +@@ -184,6 +184,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 ;; + +@@ -200,6 +201,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 ;; +@@ -214,6 +216,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 ;; +@@ -269,7 +272,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 ;; +@@ -322,6 +327,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 ;; + +@@ -348,6 +354,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-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; + m68k-*-netbsdelf*) fmt=elf em=nbsd ;; +@@ -402,6 +409,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 + case "$endian" in + big) ;; +@@ -424,7 +432,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 +@@ -457,6 +467,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.14.90.0.6/ld/configure binutils-2.14.90.0.6-uClibc/ld/configure +--- binutils-2.14.90.0.6/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/ld/configure 2004-01-06 21:59:31.000000000 -0600 +@@ -1578,6 +1578,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.14.90.0.6/ld/configure.tgt binutils-2.14.90.0.6-uClibc/ld/configure.tgt +--- binutils-2.14.90.0.6/ld/configure.tgt 2003-08-21 10:28:48.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/ld/configure.tgt 2004-01-06 22:09:40.000000000 -0600 +@@ -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 +@@ -124,7 +127,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 ;; +@@ -148,14 +151,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/'` +@@ -250,10 +255,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 ;; +@@ -354,7 +362,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/'` + ;; +@@ -370,9 +379,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 ;; +@@ -416,16 +425,20 @@ + mips*-*-rtems*) targ_emul=elf32ebmip ;; + mips*el-*-vxworks*) targ_emul=elf32elmip ;; + mips*-*-vxworks*) targ_emul=elf32ebmip ;; +-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 ;; +@@ -447,6 +460,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.14.90.0.6/libtool.m4 binutils-2.14.90.0.6-uClibc/libtool.m4 +--- binutils-2.14.90.0.6/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/libtool.m4 2004-01-06 20:30:39.000000000 -0600 +@@ -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.14.90.0.6/ltconfig binutils-2.14.90.0.6-uClibc/ltconfig +--- binutils-2.14.90.0.6/ltconfig 2003-07-23 10:08:08.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/ltconfig 2004-01-06 21:05:11.000000000 -0600 +@@ -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 --git a/toolchain/binutils/2.14.90.0.6/200-build_modules.patch b/toolchain/binutils/2.14.90.0.6/200-build_modules.patch new file mode 100644 index 0000000000..e9f8e75a89 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.6/200-build_modules.patch @@ -0,0 +1,31 @@ +Get around an odd build failure. +diff -urN binutils-2.14.90.0.6/configure binutils-2.14.90.0.6-uClibc/configure +--- binutils-2.14.90.0.6/configure 2003-08-21 10:29:32.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure 2004-01-07 05:43:40.000000000 -0600 +@@ -906,6 +906,11 @@ + fi + + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" +diff -urN binutils-2.14.90.0.6/configure.in binutils-2.14.90.0.6-uClibc/configure.in +--- binutils-2.14.90.0.6/configure.in 2003-08-21 10:29:30.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure.in 2004-01-07 05:44:02.000000000 -0600 +@@ -178,6 +178,11 @@ + fi + + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" diff --git a/toolchain/binutils/2.14.90.0.6/210-cflags.patch b/toolchain/binutils/2.14.90.0.6/210-cflags.patch new file mode 100644 index 0000000000..dc67d3c4e3 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.6/210-cflags.patch @@ -0,0 +1,32 @@ +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 + diff --git a/toolchain/binutils/2.14.90.0.7/001-debian.patch b/toolchain/binutils/2.14.90.0.7/001-debian.patch new file mode 100644 index 0000000000..1dd39a933d --- /dev/null +++ b/toolchain/binutils/2.14.90.0.7/001-debian.patch @@ -0,0 +1,2394 @@ +diff -urN binutils-2.14.90.0.7.orig/bfd/ChangeLog binutils-2.14.90.0.7/bfd/ChangeLog +--- binutils-2.14.90.0.7.orig/bfd/ChangeLog 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/ChangeLog 2004-04-20 01:26:12.000000000 -0600 +@@ -1,3 +1,34 @@ ++2003-10-29 Daniel Jacobowitz ++ ++ * elf32-arm.h (elf32_arm_final_link_relocate): Move check for ++ SEC_ALLOC. ++ ++2003-10-29 Philip Blundell ++ ++ * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New ++ code sequence. ++ (PLT_HEADER_SIZE): New. ++ (struct elf32_arm_pcrel_relocs_copied): Rename to ... ++ (struct elf32_arm_relocs_copied): ... this. Count both ++ pcrel and non-pcrel relocs. All uses updated. ++ (struct elf32_arm_link_hash_table): Add pointers to dynamic linker ++ sections and symbol/section mapping cache. ++ (create_got_section): New. ++ (elf32_arm_create_dynamic_sections): New. ++ (elf_backend_create_dynamic_sections): Use it. ++ (elf32_arm_final_link_relocate): Support garbage collection of relocs. ++ (elf32_arm_check_relocs): Likewise. ++ (elf32_arm_adjust_dynamic_symbol): Likewise. ++ (elf32_arm_copy_indirect_symbol): New. ++ (elf32_arm_link_hash_table_create): Initialise new fields. ++ (elf32_arm_gc_sweep_hook): Implement. ++ (elf32_arm_discard_copies): Delete. ++ (elf32_arm_finish_dynamic_symbol): Use new PLT code. ++ (elf32_arm_finish_dynamic_sections): Likewise. ++ (elf_backend_can_refcount): Define. ++ (elf_backend_copy_indirect_symbol): Likewise. ++ (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE. ++ + 2003-10-29 Alan Modra + + * elf64-ppc.c (elf_backend_grok_prstatus): Define. +diff -urN binutils-2.14.90.0.7.orig/bfd/elf-bfd.h binutils-2.14.90.0.7/bfd/elf-bfd.h +--- binutils-2.14.90.0.7.orig/bfd/elf-bfd.h 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf-bfd.h 2004-04-20 01:26:12.000000000 -0600 +@@ -1303,7 +1303,7 @@ + extern enum elf_reloc_type_class _bfd_elf_reloc_type_class + (const Elf_Internal_Rela *); + extern bfd_vma _bfd_elf_rela_local_sym +- (bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *); ++ (bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *); + extern bfd_vma _bfd_elf_rel_local_sym + (bfd *, Elf_Internal_Sym *, asection **, bfd_vma); + extern bfd_vma _bfd_elf_section_offset +diff -urN binutils-2.14.90.0.7.orig/bfd/elf-hppa.h binutils-2.14.90.0.7/bfd/elf-hppa.h +--- binutils-2.14.90.0.7.orig/bfd/elf-hppa.h 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf-hppa.h 2004-04-20 01:26:12.000000000 -0600 +@@ -1346,11 +1346,11 @@ + /* This is a local symbol. */ + sym = local_syms + r_symndx; + sym_sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); + + /* If this symbol has an entry in the PA64 dynamic hash + table, then get it. */ +- dyn_name = get_dyn_name (input_section, h, rel, ++ dyn_name = get_dyn_name (input_bfd, h, rel, + &dynh_buf, &dynh_buflen); + dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, + dyn_name, FALSE, FALSE); +@@ -1373,7 +1373,7 @@ + + /* If this symbol has an entry in the PA64 dynamic hash + table, then get it. */ +- dyn_name = get_dyn_name (input_section, h, rel, ++ dyn_name = get_dyn_name (input_bfd, h, rel, + &dynh_buf, &dynh_buflen); + dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, + dyn_name, FALSE, FALSE); +@@ -1410,7 +1410,7 @@ + + /* If this symbol has an entry in the PA64 dynamic hash + table, then get it. */ +- dyn_name = get_dyn_name (input_section, h, rel, ++ dyn_name = get_dyn_name (input_bfd, h, rel, + &dynh_buf, &dynh_buflen); + dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, + dyn_name, FALSE, FALSE); +@@ -1426,7 +1426,7 @@ + } + else if (h->root.type == bfd_link_hash_undefweak) + { +- dyn_name = get_dyn_name (input_section, h, rel, ++ dyn_name = get_dyn_name (input_bfd, h, rel, + &dynh_buf, &dynh_buflen); + dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, + dyn_name, FALSE, FALSE); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf-m10200.c binutils-2.14.90.0.7/bfd/elf-m10200.c +--- binutils-2.14.90.0.7.orig/bfd/elf-m10200.c 2003-07-23 09:08:08.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf-m10200.c 2004-04-20 01:26:12.000000000 -0600 +@@ -373,7 +373,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf-m10300.c binutils-2.14.90.0.7/bfd/elf-m10300.c +--- binutils-2.14.90.0.7.orig/bfd/elf-m10300.c 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf-m10300.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1574,7 +1574,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf.c binutils-2.14.90.0.7/bfd/elf.c +--- binutils-2.14.90.0.7.orig/bfd/elf.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf.c 2004-04-20 01:26:12.000000000 -0600 +@@ -7367,9 +7367,10 @@ + bfd_vma + _bfd_elf_rela_local_sym (bfd *abfd, + Elf_Internal_Sym *sym, +- asection *sec, ++ asection **psec, + Elf_Internal_Rela *rel) + { ++ asection *sec = *psec; + bfd_vma relocation; + + relocation = (sec->output_section->vma +@@ -7379,16 +7380,14 @@ + && ELF_ST_TYPE (sym->st_info) == STT_SECTION + && sec->sec_info_type == ELF_INFO_TYPE_MERGE) + { +- asection *msec; +- +- msec = sec; + rel->r_addend = +- _bfd_merged_section_offset (abfd, &msec, ++ _bfd_merged_section_offset (abfd, psec, + elf_section_data (sec)->sec_info, + sym->st_value + rel->r_addend, +- 0) +- - relocation; +- rel->r_addend += msec->output_section->vma + msec->output_offset; ++ 0); ++ sec = *psec; ++ rel->r_addend -= relocation; ++ rel->r_addend += sec->output_section->vma + sec->output_offset; + } + return relocation; + } +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-arm.h binutils-2.14.90.0.7/bfd/elf32-arm.h +--- binutils-2.14.90.0.7.orig/bfd/elf32-arm.h 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-arm.h 2004-04-20 01:26:12.000000000 -0600 +@@ -84,6 +84,12 @@ + static void arm_add_to_rel + PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma)); + #endif ++static bfd_boolean allocate_dynrelocs ++ PARAMS ((struct elf_link_hash_entry *h, PTR inf)); ++static bfd_boolean create_got_section ++ PARAMS ((bfd * dynobj, struct bfd_link_info * info)); ++static bfd_boolean elf32_arm_create_dynamic_sections ++ PARAMS ((bfd * dynobj, struct bfd_link_info * info)); + static enum elf_reloc_type_class elf32_arm_reloc_type_class + PARAMS ((const Elf_Internal_Rela *)); + static bfd_boolean elf32_arm_object_p +@@ -119,6 +125,12 @@ + section. */ + #define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1" + ++#ifdef FOUR_WORD_PLT ++ ++/* The size in bytes of the special first entry in the procedure ++ linkage table. */ ++#define PLT_HEADER_SIZE 16 ++ + /* The size in bytes of an entry in the procedure linkage table. */ + #define PLT_ENTRY_SIZE 16 + +@@ -126,23 +138,56 @@ + this. It is set up so that any shared library function that is + called before the relocation has been set up calls the dynamic + linker first. */ +-static const bfd_vma elf32_arm_plt0_entry [PLT_ENTRY_SIZE / 4] = ++static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] = + { +- 0xe52de004, /* str lr, [sp, #-4]! */ +- 0xe59fe010, /* ldr lr, [pc, #16] */ +- 0xe08fe00e, /* add lr, pc, lr */ +- 0xe5bef008 /* ldr pc, [lr, #8]! */ ++ 0xe52de004, /* str lr, [sp, #-4]! */ ++ 0xe59fe010, /* ldr lr, [pc, #16] */ ++ 0xe08fe00e, /* add lr, pc, lr */ ++ 0xe5bef008, /* ldr pc, [lr, #8]! */ + }; + + /* Subsequent entries in a procedure linkage table look like + this. */ + static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] = +- { +- 0xe59fc004, /* ldr ip, [pc, #4] */ +- 0xe08fc00c, /* add ip, pc, ip */ +- 0xe59cf000, /* ldr pc, [ip] */ +- 0x00000000 /* offset to symbol in got */ +- }; ++ { ++ 0xe28fc600, /* add ip, pc, #NN */ ++ 0xe28cca00, /* add ip, ip, #NN */ ++ 0xe5bcf000, /* ldr pc, [ip, #NN]! */ ++ 0x00000000, /* unused */ ++ }; ++ ++#else ++ ++/* The size in bytes of the special first entry in the procedure ++ linkage table. */ ++#define PLT_HEADER_SIZE 20 ++ ++/* The size in bytes of an entry in the procedure linkage table. */ ++#define PLT_ENTRY_SIZE 12 ++ ++/* The first entry in a procedure linkage table looks like ++ this. It is set up so that any shared library function that is ++ called before the relocation has been set up calls the dynamic ++ linker first. */ ++static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] = ++ { ++ 0xe52de004, /* str lr, [sp, #-4]! */ ++ 0xe59fe004, /* ldr lr, [pc, #4] */ ++ 0xe08fe00e, /* add lr, pc, lr */ ++ 0xe5bef008, /* ldr pc, [lr, #8]! */ ++ 0x00000000, /* &GOT[0] - . */ ++ }; ++ ++/* Subsequent entries in a procedure linkage table look like ++ this. */ ++static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] = ++ { ++ 0xe28fc600, /* add ip, pc, #0xNN00000 */ ++ 0xe28cca00, /* add ip, ip, #0xNN000 */ ++ 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */ ++ }; ++ ++#endif + + /* The ARM linker needs to keep track of the number of relocs that it + decides to copy in check_relocs for each symbol. This is so that +@@ -152,14 +197,16 @@ + + /* This structure keeps track of the number of PC relative relocs we + have copied for a given symbol. */ +-struct elf32_arm_pcrel_relocs_copied ++struct elf32_arm_relocs_copied + { + /* Next section. */ +- struct elf32_arm_pcrel_relocs_copied * next; ++ struct elf32_arm_relocs_copied * next; + /* A section in dynobj. */ + asection * section; + /* Number of relocs copied in this section. */ + bfd_size_type count; ++ /* Number of relocs copied in this section. */ ++ bfd_size_type pc_count; + }; + + /* Arm ELF linker hash entry. */ +@@ -168,13 +215,9 @@ + struct elf_link_hash_entry root; + + /* Number of PC relative relocs copied for this symbol. */ +- struct elf32_arm_pcrel_relocs_copied * pcrel_relocs_copied; ++ struct elf32_arm_relocs_copied * relocs_copied; + }; + +-/* Declare this now that the above structures are defined. */ +-static bfd_boolean elf32_arm_discard_copies +- PARAMS ((struct elf32_arm_link_hash_entry *, PTR)); +- + /* Traverse an arm ELF linker hash table. */ + #define elf32_arm_link_hash_traverse(table, func, info) \ + (elf_link_hash_traverse \ +@@ -204,6 +247,18 @@ + /* A boolean indicating whether knowledge of the ARM's pipeline + length should be applied by the linker. */ + int no_pipeline_knowledge; ++ ++ /* Short-cuts to get to dynamic linker sections. */ ++ asection *sgot; ++ asection *sgotplt; ++ asection *srelgot; ++ asection *splt; ++ asection *srelplt; ++ asection *sdynbss; ++ asection *srelbss; ++ ++ /* Small local sym to section mapping cache. */ ++ struct sym_sec_cache sym_sec; + }; + + /* Create an entry in an ARM ELF linker hash table. */ +@@ -231,11 +286,121 @@ + _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, + table, string)); + if (ret != (struct elf32_arm_link_hash_entry *) NULL) +- ret->pcrel_relocs_copied = NULL; ++ ret->relocs_copied = NULL; + + return (struct bfd_hash_entry *) ret; + } + ++/* Create .got, .gotplt, and .rel.got sections in DYNOBJ, and set up ++ shortcuts to them in our hash table. */ ++ ++static bfd_boolean ++create_got_section (dynobj, info) ++ bfd *dynobj; ++ struct bfd_link_info *info; ++{ ++ struct elf32_arm_link_hash_table *htab; ++ ++ if (! _bfd_elf_create_got_section (dynobj, info)) ++ return FALSE; ++ ++ htab = elf32_arm_hash_table (info); ++ htab->sgot = bfd_get_section_by_name (dynobj, ".got"); ++ htab->sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); ++ if (!htab->sgot || !htab->sgotplt) ++ abort (); ++ ++ htab->srelgot = bfd_make_section (dynobj, ".rel.got"); ++ if (htab->srelgot == NULL ++ || ! bfd_set_section_flags (dynobj, htab->srelgot, ++ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS ++ | SEC_IN_MEMORY | SEC_LINKER_CREATED ++ | SEC_READONLY)) ++ || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2)) ++ return FALSE; ++ return TRUE; ++} ++ ++/* Create .plt, .rel.plt, .got, .got.plt, .rel.got, .dynbss, and ++ .rel.bss sections in DYNOBJ, and set up shortcuts to them in our ++ hash table. */ ++ ++static bfd_boolean ++elf32_arm_create_dynamic_sections (dynobj, info) ++ bfd *dynobj; ++ struct bfd_link_info *info; ++{ ++ struct elf32_arm_link_hash_table *htab; ++ ++ htab = elf32_arm_hash_table (info); ++ if (!htab->sgot && !create_got_section (dynobj, info)) ++ return FALSE; ++ ++ if (!_bfd_elf_create_dynamic_sections (dynobj, info)) ++ return FALSE; ++ ++ htab->splt = bfd_get_section_by_name (dynobj, ".plt"); ++ htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt"); ++ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss"); ++ if (!info->shared) ++ htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss"); ++ ++ if (!htab->splt || !htab->srelplt || !htab->sdynbss ++ || (!info->shared && !htab->srelbss)) ++ abort (); ++ ++ return TRUE; ++} ++ ++/* Copy the extra info we tack onto an elf_link_hash_entry. */ ++ ++static void ++elf32_arm_copy_indirect_symbol (const struct elf_backend_data *bed, ++ struct elf_link_hash_entry *dir, ++ struct elf_link_hash_entry *ind) ++{ ++ struct elf32_arm_link_hash_entry *edir, *eind; ++ ++ edir = (struct elf32_arm_link_hash_entry *) dir; ++ eind = (struct elf32_arm_link_hash_entry *) ind; ++ ++ if (eind->relocs_copied != NULL) ++ { ++ if (edir->relocs_copied != NULL) ++ { ++ struct elf32_arm_relocs_copied **pp; ++ struct elf32_arm_relocs_copied *p; ++ ++ if (ind->root.type == bfd_link_hash_indirect) ++ abort (); ++ ++ /* Add reloc counts against the weak sym to the strong sym ++ list. Merge any entries against the same section. */ ++ for (pp = &eind->relocs_copied; (p = *pp) != NULL; ) ++ { ++ struct elf32_arm_relocs_copied *q; ++ ++ for (q = edir->relocs_copied; q != NULL; q = q->next) ++ if (q->section == p->section) ++ { ++ q->pc_count += p->pc_count; ++ q->count += p->count; ++ *pp = p->next; ++ break; ++ } ++ if (q == NULL) ++ pp = &p->next; ++ } ++ *pp = edir->relocs_copied; ++ } ++ ++ edir->relocs_copied = eind->relocs_copied; ++ eind->relocs_copied = NULL; ++ } ++ ++ _bfd_elf_link_hash_copy_indirect (bed, dir, ind); ++} ++ + /* Create an ARM elf linker hash table. */ + + static struct bfd_link_hash_table * +@@ -256,10 +421,18 @@ + return NULL; + } + ++ ret->sgot = NULL; ++ ret->sgotplt = NULL; ++ ret->srelgot = NULL; ++ ret->splt = NULL; ++ ret->srelplt = NULL; ++ ret->sdynbss = NULL; ++ ret->srelbss = NULL; + ret->thumb_glue_size = 0; + ret->arm_glue_size = 0; + ret->bfd_of_glue_owner = NULL; + ret->no_pipeline_knowledge = 0; ++ ret->sym_sec.abfd = NULL; + + return &ret->root.root; + } +@@ -1134,16 +1307,21 @@ + #ifndef OLD_ARM_ABI + case R_ARM_XPC25: + #endif ++ /* r_symndx will be zero only for relocs against symbols ++ from removed linkonce sections, or sections discarded by ++ a linker script. */ ++ if (r_symndx == 0) ++ return bfd_reloc_ok; ++ + /* When generating a shared object, these relocations are copied + into the output file to be resolved at run time. */ +- if (info->shared +- && r_symndx != 0 +- && (r_type != R_ARM_PC24 +- || (h != NULL +- && h->dynindx != -1 +- && (! info->symbolic +- || (h->elf_link_hash_flags +- & ELF_LINK_HASH_DEF_REGULAR) == 0)))) ++ if ((info->shared ++ && (input_section->flags & SEC_ALLOC) ++ && (h == NULL ++ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT ++ || h->root.type != bfd_link_hash_undefweak) ++ && (r_type != R_ARM_PC24 ++ || !SYMBOL_CALLS_LOCAL (info, h)))) + { + Elf_Internal_Rela outrel; + bfd_byte *loc; +@@ -1184,30 +1362,19 @@ + + if (skip) + memset (&outrel, 0, sizeof outrel); +- else if (r_type == R_ARM_PC24) +- { +- BFD_ASSERT (h != NULL && h->dynindx != -1); +- if ((input_section->flags & SEC_ALLOC) == 0) +- relocate = TRUE; +- outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_PC24); +- } ++ else if (h != NULL ++ && h->dynindx != -1 ++ && (r_type == R_ARM_PC24 ++ || !info->shared ++ || !info->symbolic ++ || (h->elf_link_hash_flags ++ & ELF_LINK_HASH_DEF_REGULAR) == 0)) ++ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); + else + { +- if (h == NULL +- || ((info->symbolic || h->dynindx == -1) +- && (h->elf_link_hash_flags +- & ELF_LINK_HASH_DEF_REGULAR) != 0)) +- { +- relocate = TRUE; +- outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE); +- } +- else +- { +- BFD_ASSERT (h->dynindx != -1); +- if ((input_section->flags & SEC_ALLOC) == 0) +- relocate = TRUE; +- outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_ABS32); +- } ++ /* This symbol is local, or marked to become local. */ ++ relocate = TRUE; ++ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE); + } + + loc = sreloc->contents; +@@ -1617,16 +1784,17 @@ + if (h != NULL) + { + bfd_vma off; +- bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created; ++ bfd_boolean dyn; + + off = h->got.offset; + BFD_ASSERT (off != (bfd_vma) -1); ++ dyn = globals->root.dynamic_sections_created; + +- if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) ++ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h) + || (info->shared +- && (info->symbolic || h->dynindx == -1 +- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL)) +- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))) ++ && SYMBOL_REFERENCES_LOCAL (info, h)) ++ || (ELF_ST_VISIBILITY (h->other) ++ && h->root.type == bfd_link_hash_undefweak)) + { + /* This is actually a static link, or it is a -Bsymbolic link + and the symbol is defined locally. We must initialize this +@@ -1712,7 +1880,8 @@ + contents, rel->r_offset, value, + (bfd_vma) 0); + +- if (h->plt.offset == (bfd_vma) -1) ++ if (h->plt.offset == (bfd_vma) -1 ++ || globals->splt == NULL) + /* We didn't make a PLT entry for this symbol. This + happens when statically linking PIC code, or when + using -Bsymbolic. */ +@@ -1958,7 +2127,7 @@ + bfd_put_32 (input_bfd, value, contents + rel->r_offset); + } + #else +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + #endif + } + else +@@ -1983,9 +2152,10 @@ + case R_ARM_THM_PC22: + if (info->shared + && ( +- (!info->symbolic && h->dynindx != -1) ++ (!info->symbolic && h->dynindx != -1) + || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 + ) ++ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT + && ((input_section->flags & SEC_ALLOC) != 0 + /* DWARF will emit R_ARM_ABS32 relocations in its + sections against symbols defined externally +@@ -2603,7 +2773,82 @@ + asection *sec ATTRIBUTE_UNUSED; + const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED; + { +- /* We don't support garbage collection of GOT and PLT relocs yet. */ ++ Elf_Internal_Shdr *symtab_hdr; ++ struct elf_link_hash_entry **sym_hashes; ++ bfd_signed_vma *local_got_refcounts; ++ const Elf_Internal_Rela *rel, *relend; ++ unsigned long r_symndx; ++ struct elf_link_hash_entry *h; ++ ++ elf_section_data (sec)->local_dynrel = NULL; ++ ++ symtab_hdr = &elf_tdata (abfd)->symtab_hdr; ++ sym_hashes = elf_sym_hashes (abfd); ++ local_got_refcounts = elf_local_got_refcounts (abfd); ++ ++ relend = relocs + sec->reloc_count; ++ for (rel = relocs; rel < relend; rel++) ++ switch (ELF32_R_TYPE (rel->r_info)) ++ { ++ case R_ARM_GOT32: ++ r_symndx = ELF32_R_SYM (rel->r_info); ++ if (r_symndx >= symtab_hdr->sh_info) ++ { ++ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; ++ if (h->got.refcount > 0) ++ h->got.refcount -= 1; ++ } ++ else if (local_got_refcounts != NULL) ++ { ++ if (local_got_refcounts[r_symndx] > 0) ++ local_got_refcounts[r_symndx] -= 1; ++ } ++ break; ++ ++ case R_ARM_ABS32: ++ case R_ARM_REL32: ++ case R_ARM_PC24: ++ r_symndx = ELF32_R_SYM (rel->r_info); ++ if (r_symndx >= symtab_hdr->sh_info) ++ { ++ struct elf32_arm_link_hash_entry *eh; ++ struct elf32_arm_relocs_copied **pp; ++ struct elf32_arm_relocs_copied *p; ++ ++ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; ++ ++ if (!info->shared && h->plt.refcount > 0) ++ h->plt.refcount -= 1; ++ ++ eh = (struct elf32_arm_link_hash_entry *) h; ++ ++ for (pp = &eh->relocs_copied; (p = *pp) != NULL; pp = &p->next) ++ if (p->section == sec) ++ { ++ if (ELF32_R_TYPE (rel->r_info) == R_ARM_PC24) ++ p->pc_count -= 1; ++ p->count -= 1; ++ if (p->count == 0) ++ *pp = p->next; ++ break; ++ } ++ } ++ break; ++ ++ case R_ARM_PLT32: ++ r_symndx = ELF32_R_SYM (rel->r_info); ++ if (r_symndx >= symtab_hdr->sh_info) ++ { ++ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; ++ if (h->plt.refcount > 0) ++ h->plt.refcount -= 1; ++ } ++ break; ++ ++ default: ++ break; ++ } ++ + return TRUE; + } + +@@ -2622,13 +2867,15 @@ + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; + bfd *dynobj; +- asection *sgot, *srelgot, *sreloc; ++ asection *sreloc; + bfd_vma *local_got_offsets; ++ struct elf32_arm_link_hash_table *htab; + + if (info->relocatable) + return TRUE; + +- sgot = srelgot = sreloc = NULL; ++ htab = elf32_arm_hash_table (info); ++ sreloc = NULL; + + dynobj = elf_hash_table (info)->dynobj; + local_got_offsets = elf_local_got_offsets (abfd); +@@ -2653,126 +2900,82 @@ + else + h = sym_hashes[r_symndx - symtab_hdr->sh_info]; + +- /* Some relocs require a global offset table. */ +- if (dynobj == NULL) +- { +- switch (ELF32_R_TYPE (rel->r_info)) +- { +- case R_ARM_GOT32: +- case R_ARM_GOTOFF: +- case R_ARM_GOTPC: +- elf_hash_table (info)->dynobj = dynobj = abfd; +- if (! _bfd_elf_create_got_section (dynobj, info)) +- return FALSE; +- break; +- +- default: +- break; +- } +- } +- + switch (ELF32_R_TYPE (rel->r_info)) + { +- case R_ARM_GOT32: +- /* This symbol requires a global offset table entry. */ +- if (sgot == NULL) +- { +- sgot = bfd_get_section_by_name (dynobj, ".got"); +- BFD_ASSERT (sgot != NULL); +- } ++ case R_ARM_PLT32: ++ /* This symbol requires a procedure linkage table entry. We ++ actually build the entry in adjust_dynamic_symbol, ++ because this might be a case of linking PIC code which is ++ never referenced by a dynamic object, in which case we ++ don't need to generate a procedure linkage table entry ++ after all. */ + +- /* Get the got relocation section if necessary. */ +- if (srelgot == NULL +- && (h != NULL || info->shared)) +- { +- srelgot = bfd_get_section_by_name (dynobj, ".rel.got"); ++ /* If this is a local symbol, we resolve it directly without ++ creating a procedure linkage table entry. */ ++ if (h == NULL) ++ continue; + +- /* If no got relocation section, make one and initialize. */ +- if (srelgot == NULL) +- { +- srelgot = bfd_make_section (dynobj, ".rel.got"); +- if (srelgot == NULL +- || ! bfd_set_section_flags (dynobj, srelgot, +- (SEC_ALLOC +- | SEC_LOAD +- | SEC_HAS_CONTENTS +- | SEC_IN_MEMORY +- | SEC_LINKER_CREATED +- | SEC_READONLY)) +- || ! bfd_set_section_alignment (dynobj, srelgot, 2)) +- return FALSE; +- } +- } ++ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; ++ h->plt.refcount++; ++ break; + ++ case R_ARM_GOT32: ++ /* This symbol requires a global offset table entry. */ + if (h != NULL) + { +- if (h->got.offset != (bfd_vma) -1) +- /* We have already allocated space in the .got. */ +- break; +- +- h->got.offset = sgot->_raw_size; +- +- /* Make sure this symbol is output as a dynamic symbol. */ +- if (h->dynindx == -1) +- if (! bfd_elf32_link_record_dynamic_symbol (info, h)) +- return FALSE; +- +- srelgot->_raw_size += sizeof (Elf32_External_Rel); ++ h->got.refcount++; + } + else + { +- /* This is a global offset table entry for a local +- symbol. */ +- if (local_got_offsets == NULL) ++ bfd_signed_vma *local_got_refcounts; ++ ++ /* This is a global offset table entry for a local symbol. */ ++ local_got_refcounts = elf_local_got_refcounts (abfd); ++ if (local_got_refcounts == NULL) + { + bfd_size_type size; +- unsigned int i; + + size = symtab_hdr->sh_info; +- size *= sizeof (bfd_vma); +- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size); +- if (local_got_offsets == NULL) ++ size *= (sizeof (bfd_signed_vma) + sizeof(char)); ++ local_got_refcounts = ((bfd_signed_vma *) ++ bfd_zalloc (abfd, size)); ++ if (local_got_refcounts == NULL) + return FALSE; +- elf_local_got_offsets (abfd) = local_got_offsets; +- for (i = 0; i < symtab_hdr->sh_info; i++) +- local_got_offsets[i] = (bfd_vma) -1; ++ elf_local_got_refcounts (abfd) = local_got_refcounts; + } +- +- if (local_got_offsets[r_symndx] != (bfd_vma) -1) +- /* We have already allocated space in the .got. */ +- break; +- +- local_got_offsets[r_symndx] = sgot->_raw_size; +- +- if (info->shared) +- /* If we are generating a shared object, we need to +- output a R_ARM_RELATIVE reloc so that the dynamic +- linker can adjust this GOT entry. */ +- srelgot->_raw_size += sizeof (Elf32_External_Rel); ++ local_got_refcounts[r_symndx] += 1; + } +- +- sgot->_raw_size += 4; + break; + +- case R_ARM_PLT32: +- /* This symbol requires a procedure linkage table entry. We +- actually build the entry in adjust_dynamic_symbol, +- because this might be a case of linking PIC code which is +- never referenced by a dynamic object, in which case we +- don't need to generate a procedure linkage table entry +- after all. */ +- +- /* If this is a local symbol, we resolve it directly without +- creating a procedure linkage table entry. */ +- if (h == NULL) +- continue; +- +- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT; ++ case R_ARM_GOTOFF: ++ case R_ARM_GOTPC: ++ if (htab->sgot == NULL) ++ { ++ if (htab->root.dynobj == NULL) ++ htab->root.dynobj = abfd; ++ if (!create_got_section (htab->root.dynobj, info)) ++ return FALSE; ++ } + break; + + case R_ARM_ABS32: + case R_ARM_REL32: + case R_ARM_PC24: ++ if (h != NULL && !info->shared) ++ { ++ /* If this reloc is in a read-only section, we might ++ need a copy reloc. We can't check reliably at this ++ stage whether the section is read-only, as input ++ sections have not yet been mapped to output sections. ++ Tentatively set the flag for now, and correct in ++ adjust_dynamic_symbol. */ ++ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF; ++ ++ /* We may need a .plt entry if the function this reloc ++ refers to is in a shared lib. */ ++ h->plt.refcount += 1; ++ } ++ + /* If we are creating a shared library, and this is a reloc + against a global symbol, or a non PC relative reloc + against a local symbol, then we need to copy the reloc +@@ -2784,14 +2987,17 @@ + possible that DEF_REGULAR is not set now but will be set + later (it is never cleared). We account for that + possibility below by storing information in the +- pcrel_relocs_copied field of the hash table entry. */ ++ relocs_copied field of the hash table entry. */ + if (info->shared +- && (ELF32_R_TYPE (rel->r_info) != R_ARM_PC24 +- || (h != NULL +- && (! info->symbolic +- || (h->elf_link_hash_flags +- & ELF_LINK_HASH_DEF_REGULAR) == 0)))) ++ && (sec->flags & SEC_ALLOC) != 0 ++ && (ELF32_R_TYPE (rel->r_info) != R_ARM_PC24 ++ || (h != NULL ++ && (! info->symbolic ++ || (h->elf_link_hash_flags ++ & ELF_LINK_HASH_DEF_REGULAR) == 0)))) + { ++ struct elf32_arm_relocs_copied *p, **head; ++ + /* When creating a shared object, we must copy these + reloc types into the output file. We create a reloc + section in dynobj and make room for this reloc. */ +@@ -2825,45 +3031,49 @@ + || ! bfd_set_section_alignment (dynobj, sreloc, 2)) + return FALSE; + } +- if (sec->flags & SEC_READONLY) +- info->flags |= DF_TEXTREL; ++ ++ elf_section_data (sec)->sreloc = sreloc; + } + +- sreloc->_raw_size += sizeof (Elf32_External_Rel); +- /* If we are linking with -Bsymbolic, and this is a +- global symbol, we count the number of PC relative +- relocations we have entered for this symbol, so that +- we can discard them again if the symbol is later +- defined by a regular object. Note that this function +- is only called if we are using an elf_i386 linker +- hash table, which means that h is really a pointer to +- an elf_i386_link_hash_entry. */ +- if (h != NULL && info->symbolic +- && ELF32_R_TYPE (rel->r_info) == R_ARM_PC24) ++ /* If this is a global symbol, we count the number of ++ relocations we need for this symbol. */ ++ if (h != NULL) + { +- struct elf32_arm_link_hash_entry * eh; +- struct elf32_arm_pcrel_relocs_copied * p; +- +- eh = (struct elf32_arm_link_hash_entry *) h; +- +- for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next) +- if (p->section == sreloc) +- break; +- ++ head = &((struct elf32_arm_link_hash_entry *) h)->relocs_copied; ++ } ++ else ++ { ++ /* Track dynamic relocs needed for local syms too. ++ We really need local syms available to do this ++ easily. Oh well. */ ++ ++ asection *s; ++ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, ++ sec, r_symndx); ++ if (s == NULL) ++ return FALSE; ++ ++ head = ((struct elf32_arm_relocs_copied **) ++ &elf_section_data (s)->local_dynrel); ++ } ++ ++ p = *head; ++ if (p == NULL || p->section != sec) ++ { ++ bfd_size_type amt = sizeof *p; ++ p = bfd_alloc (htab->root.dynobj, amt); + if (p == NULL) +- { +- p = ((struct elf32_arm_pcrel_relocs_copied *) +- bfd_alloc (dynobj, (bfd_size_type) sizeof * p)); +- if (p == NULL) +- return FALSE; +- p->next = eh->pcrel_relocs_copied; +- eh->pcrel_relocs_copied = p; +- p->section = sreloc; +- p->count = 0; +- } +- +- ++p->count; ++ return FALSE; ++ p->next = *head; ++ *head = p; ++ p->section = sec; ++ p->count = 0; ++ p->pc_count = 0; + } ++ ++ p->count += 1; ++ if (ELF32_R_TYPE (rel->r_info) == R_ARM_PC24) ++ p->pc_count += 1; + } + break; + +@@ -3003,71 +3213,29 @@ + if (h->type == STT_FUNC + || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) + { +- /* If we link a program (not a DSO), we'll get rid of unnecessary +- PLT entries; we point to the actual symbols -- even for pic +- relocs, because a program built with -fpic should have the same +- result as one built without -fpic, specifically considering weak +- symbols. +- FIXME: m68k and i386 differ here, for unclear reasons. */ +- if (! info->shared +- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0) ++ if (h->plt.refcount <= 0 ++ || SYMBOL_CALLS_LOCAL (info, h) ++ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak)) + { + /* This case can occur if we saw a PLT32 reloc in an input +- file, but the symbol was not defined by a dynamic object. +- In such a case, we don't actually need to build a +- procedure linkage table, and we can just do a PC32 reloc +- instead. */ +- BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0); ++ file, but the symbol was never referred to by a dynamic ++ object, or if all references were garbage collected. In ++ such a case, we don't actually need to build a procedure ++ linkage table, and we can just do a PC24 reloc instead. */ ++ h->plt.offset = (bfd_vma) -1; + h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; +- return TRUE; +- } +- +- /* Make sure this symbol is output as a dynamic symbol. */ +- if (h->dynindx == -1) +- { +- if (! bfd_elf32_link_record_dynamic_symbol (info, h)) +- return FALSE; + } + +- s = bfd_get_section_by_name (dynobj, ".plt"); +- BFD_ASSERT (s != NULL); +- +- /* If this is the first .plt entry, make room for the special +- first entry. */ +- if (s->_raw_size == 0) +- s->_raw_size += PLT_ENTRY_SIZE; +- +- /* If this symbol is not defined in a regular file, and we are +- not generating a shared library, then set the symbol to this +- location in the .plt. This is required to make function +- pointers compare as equal between the normal executable and +- the shared library. */ +- if (! info->shared +- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) +- { +- h->root.u.def.section = s; +- h->root.u.def.value = s->_raw_size; +- } +- +- h->plt.offset = s->_raw_size; +- +- /* Make room for this entry. */ +- s->_raw_size += PLT_ENTRY_SIZE; +- +- /* We also need to make an entry in the .got.plt section, which +- will be placed in the .got section by the linker script. */ +- s = bfd_get_section_by_name (dynobj, ".got.plt"); +- BFD_ASSERT (s != NULL); +- s->_raw_size += 4; +- +- /* We also need to make an entry in the .rel.plt section. */ +- +- s = bfd_get_section_by_name (dynobj, ".rel.plt"); +- BFD_ASSERT (s != NULL); +- s->_raw_size += sizeof (Elf32_External_Rel); +- + return TRUE; + } ++ else ++ /* It's possible that we incorrectly decided a .plt reloc was ++ needed for an R_ARM_PC24 reloc to a non-function sym in ++ check_relocs. We can't decide accurately between function and ++ non-function syms in check-relocs; Objects loaded later in ++ the link may change h->type. So fix it now. */ ++ h->plt.offset = (bfd_vma) -1; + + /* If this is a weak symbol, and there is a real definition, the + processor independent code will have arranged for us to see the +@@ -3142,6 +3310,198 @@ + return TRUE; + } + ++/* Allocate space in .plt, .got and associated reloc sections for ++ dynamic relocs. */ ++ ++static bfd_boolean ++allocate_dynrelocs (h, inf) ++ struct elf_link_hash_entry *h; ++ PTR inf; ++{ ++ struct bfd_link_info *info; ++ struct elf32_arm_link_hash_table *htab; ++ struct elf32_arm_link_hash_entry *eh; ++ struct elf32_arm_relocs_copied *p; ++ ++ if (h->root.type == bfd_link_hash_indirect) ++ return TRUE; ++ ++ if (h->root.type == bfd_link_hash_warning) ++ /* When warning symbols are created, they **replace** the "real" ++ entry in the hash table, thus we never get to see the real ++ symbol in a hash traversal. So look at it now. */ ++ h = (struct elf_link_hash_entry *) h->root.u.i.link; ++ ++ info = (struct bfd_link_info *) inf; ++ htab = elf32_arm_hash_table (info); ++ ++ if (htab->root.dynamic_sections_created ++ && h->plt.refcount > 0) ++ { ++ /* Make sure this symbol is output as a dynamic symbol. ++ Undefined weak syms won't yet be marked as dynamic. */ ++ if (h->dynindx == -1 ++ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) ++ { ++ if (! bfd_elf32_link_record_dynamic_symbol (info, h)) ++ return FALSE; ++ } ++ ++ if (info->shared ++ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h)) ++ { ++ asection *s = htab->splt; ++ ++ /* If this is the first .plt entry, make room for the special ++ first entry. */ ++ if (s->_raw_size == 0) ++ s->_raw_size += PLT_HEADER_SIZE; ++ ++ h->plt.offset = s->_raw_size; ++ ++ /* If this symbol is not defined in a regular file, and we are ++ not generating a shared library, then set the symbol to this ++ location in the .plt. This is required to make function ++ pointers compare as equal between the normal executable and ++ the shared library. */ ++ if (! info->shared ++ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) ++ { ++ h->root.u.def.section = s; ++ h->root.u.def.value = h->plt.offset; ++ } ++ ++ /* Make room for this entry. */ ++ s->_raw_size += PLT_ENTRY_SIZE; ++ ++ /* We also need to make an entry in the .got.plt section, which ++ will be placed in the .got section by the linker script. */ ++ htab->sgotplt->_raw_size += 4; ++ ++ /* We also need to make an entry in the .rel.plt section. */ ++ htab->srelplt->_raw_size += sizeof (Elf32_External_Rel); ++ } ++ else ++ { ++ h->plt.offset = (bfd_vma) -1; ++ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; ++ } ++ } ++ else ++ { ++ h->plt.offset = (bfd_vma) -1; ++ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT; ++ } ++ ++ if (h->got.refcount > 0) ++ { ++ asection *s; ++ bfd_boolean dyn; ++ ++ /* Make sure this symbol is output as a dynamic symbol. ++ Undefined weak syms won't yet be marked as dynamic. */ ++ if (h->dynindx == -1 ++ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) ++ { ++ if (! bfd_elf32_link_record_dynamic_symbol (info, h)) ++ return FALSE; ++ } ++ ++ s = htab->sgot; ++ h->got.offset = s->_raw_size; ++ s->_raw_size += 4; ++ dyn = htab->root.dynamic_sections_created; ++ if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT ++ || h->root.type != bfd_link_hash_undefweak) ++ && (info->shared ++ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))) ++ htab->srelgot->_raw_size += sizeof (Elf32_External_Rel); ++ } ++ else ++ h->got.offset = (bfd_vma) -1; ++ ++ eh = (struct elf32_arm_link_hash_entry *) h; ++ if (eh->relocs_copied == NULL) ++ return TRUE; ++ ++ /* In the shared -Bsymbolic case, discard space allocated for ++ dynamic pc-relative relocs against symbols which turn out to be ++ defined in regular objects. For the normal shared case, discard ++ space for pc-relative relocs that have become local due to symbol ++ visibility changes. */ ++ ++ if (info->shared) ++ { ++ /* The only reloc that uses pc_count is R_ARM_PC24, which will ++ appear on a call or on something like ".long foo - .". We ++ want calls to protected symbols to resolve directly to the ++ function rather than going via the plt. If people want ++ function pointer comparisons to work as expected then they ++ should avoid writing assembly like ".long foo - .". */ ++ if (SYMBOL_CALLS_LOCAL (info, h)) ++ { ++ struct elf32_arm_relocs_copied **pp; ++ ++ for (pp = &eh->relocs_copied; (p = *pp) != NULL; ) ++ { ++ p->count -= p->pc_count; ++ p->pc_count = 0; ++ if (p->count == 0) ++ *pp = p->next; ++ else ++ pp = &p->next; ++ } ++ } ++ ++ /* Also discard relocs on undefined weak syms with non-default ++ visibility. */ ++ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak) ++ eh->relocs_copied = NULL; ++ } ++ else ++ { ++ /* For the non-shared case, discard space for relocs against ++ symbols which turn out to need copy relocs or are not ++ dynamic. */ ++ ++ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0 ++ && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0 ++ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) ++ || (htab->root.dynamic_sections_created ++ && (h->root.type == bfd_link_hash_undefweak ++ || h->root.type == bfd_link_hash_undefined)))) ++ { ++ /* Make sure this symbol is output as a dynamic symbol. ++ Undefined weak syms won't yet be marked as dynamic. */ ++ if (h->dynindx == -1 ++ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) ++ { ++ if (! bfd_elf32_link_record_dynamic_symbol (info, h)) ++ return FALSE; ++ } ++ ++ /* If that succeeded, we know we'll be keeping all the ++ relocs. */ ++ if (h->dynindx != -1) ++ goto keep; ++ } ++ ++ eh->relocs_copied = NULL; ++ ++ keep: ; ++ } ++ ++ /* Finally, allocate space. */ ++ for (p = eh->relocs_copied; p != NULL; p = p->next) ++ { ++ asection *sreloc = elf_section_data (p->section)->sreloc; ++ sreloc->_raw_size += p->count * sizeof (Elf32_External_Rel); ++ } ++ ++ return TRUE; ++} ++ + /* Set the sizes of the dynamic sections. */ + + static bfd_boolean +@@ -3153,7 +3513,10 @@ + asection * s; + bfd_boolean plt; + bfd_boolean relocs; ++ bfd *ibfd; ++ struct elf32_arm_link_hash_table *htab; + ++ htab = elf32_arm_hash_table (info); + dynobj = elf_hash_table (info)->dynobj; + BFD_ASSERT (dynobj != NULL); + +@@ -3168,26 +3531,74 @@ + s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER; + } + } +- else +- { +- /* We may have created entries in the .rel.got section. +- However, if we are not creating the dynamic sections, we will +- not actually use these entries. Reset the size of .rel.got, +- which will cause it to get stripped from the output file +- below. */ +- s = bfd_get_section_by_name (dynobj, ".rel.got"); +- if (s != NULL) +- s->_raw_size = 0; +- } +- +- /* If this is a -Bsymbolic shared link, then we need to discard all +- PC relative relocs against symbols defined in a regular object. +- We allocated space for them in the check_relocs routine, but we +- will not fill them in in the relocate_section routine. */ +- if (info->shared && info->symbolic) +- elf32_arm_link_hash_traverse (elf32_arm_hash_table (info), +- elf32_arm_discard_copies, +- (PTR) NULL); ++ ++ /* Set up .got offsets for local syms, and space for local dynamic ++ relocs. */ ++ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) ++ { ++ bfd_signed_vma *local_got; ++ bfd_signed_vma *end_local_got; ++ char *local_tls_type; ++ bfd_size_type locsymcount; ++ Elf_Internal_Shdr *symtab_hdr; ++ asection *srel; ++ ++ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) ++ continue; ++ ++ for (s = ibfd->sections; s != NULL; s = s->next) ++ { ++ struct elf32_arm_relocs_copied *p; ++ ++ for (p = *((struct elf32_arm_relocs_copied **) ++ &elf_section_data (s)->local_dynrel); ++ p != NULL; ++ p = p->next) ++ { ++ if (!bfd_is_abs_section (p->section) ++ && bfd_is_abs_section (p->section->output_section)) ++ { ++ /* Input section has been discarded, either because ++ it is a copy of a linkonce section or due to ++ linker script /DISCARD/, so we'll be discarding ++ the relocs too. */ ++ } ++ else if (p->count != 0) ++ { ++ srel = elf_section_data (p->section)->sreloc; ++ srel->_raw_size += p->count * sizeof (Elf32_External_Rel); ++ if ((p->section->output_section->flags & SEC_READONLY) != 0) ++ info->flags |= DF_TEXTREL; ++ } ++ } ++ } ++ ++ local_got = elf_local_got_refcounts (ibfd); ++ if (!local_got) ++ continue; ++ ++ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; ++ locsymcount = symtab_hdr->sh_info; ++ end_local_got = local_got + locsymcount; ++ s = htab->sgot; ++ srel = htab->srelgot; ++ for (; local_got < end_local_got; ++local_got, ++local_tls_type) ++ { ++ if (*local_got > 0) ++ { ++ *local_got = s->_raw_size; ++ s->_raw_size += 4; ++ if (info->shared) ++ srel->_raw_size += sizeof (Elf32_External_Rel); ++ } ++ else ++ *local_got = (bfd_vma) -1; ++ } ++ } ++ ++ /* Allocate global sym .plt and .got entries, and space for global ++ sym dynamic relocs. */ ++ elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info); + + /* The check_relocs and adjust_dynamic_symbol entry points have + determined the sizes of the various dynamic sections. Allocate +@@ -3312,33 +3723,6 @@ + return TRUE; + } + +-/* This function is called via elf32_arm_link_hash_traverse if we are +- creating a shared object with -Bsymbolic. It discards the space +- allocated to copy PC relative relocs against symbols which are +- defined in regular objects. We allocated space for them in the +- check_relocs routine, but we won't fill them in in the +- relocate_section routine. */ +- +-static bfd_boolean +-elf32_arm_discard_copies (h, ignore) +- struct elf32_arm_link_hash_entry * h; +- PTR ignore ATTRIBUTE_UNUSED; +-{ +- struct elf32_arm_pcrel_relocs_copied * s; +- +- if (h->root.root.type == bfd_link_hash_warning) +- h = (struct elf32_arm_link_hash_entry *) h->root.root.u.i.link; +- +- /* We only discard relocs for symbols defined in a regular object. */ +- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0) +- return TRUE; +- +- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next) +- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel); +- +- return TRUE; +-} +- + /* Finish up dynamic symbol handling. We set the contents of various + dynamic sections here. */ + +@@ -3362,6 +3746,7 @@ + bfd_vma got_offset; + Elf_Internal_Rela rel; + bfd_byte *loc; ++ bfd_vma got_displacement; + + /* This symbol has an entry in the procedure linkage table. Set + it up. */ +@@ -3377,35 +3762,43 @@ + corresponds to this symbol. This is the index of this symbol + in all the symbols for which we are making plt entries. The + first entry in the procedure linkage table is reserved. */ +- plt_index = h->plt.offset / PLT_ENTRY_SIZE - 1; ++ plt_index = (h->plt.offset - PLT_HEADER_SIZE) / PLT_ENTRY_SIZE; + + /* Get the offset into the .got table of the entry that + corresponds to this function. Each .got entry is 4 bytes. + The first three are reserved. */ + got_offset = (plt_index + 3) * 4; + ++ /* Calculate the displacement between the PLT slot and the ++ entry in the GOT. */ ++ got_displacement = (sgot->output_section->vma ++ + sgot->output_offset ++ + got_offset ++ - splt->output_section->vma ++ - splt->output_offset ++ - h->plt.offset ++ - 8); ++ ++ BFD_ASSERT ((got_displacement & 0xf0000000) == 0); ++ + /* Fill in the entry in the procedure linkage table. */ +- bfd_put_32 (output_bfd, elf32_arm_plt_entry[0], ++ bfd_put_32 (output_bfd, elf32_arm_plt_entry[0] | ((got_displacement & 0x0ff00000) >> 20), + splt->contents + h->plt.offset + 0); +- bfd_put_32 (output_bfd, elf32_arm_plt_entry[1], ++ bfd_put_32 (output_bfd, elf32_arm_plt_entry[1] | ((got_displacement & 0x000ff000) >> 12), + splt->contents + h->plt.offset + 4); +- bfd_put_32 (output_bfd, elf32_arm_plt_entry[2], ++ bfd_put_32 (output_bfd, elf32_arm_plt_entry[2] | (got_displacement & 0x00000fff), + splt->contents + h->plt.offset + 8); +- bfd_put_32 (output_bfd, +- (sgot->output_section->vma +- + sgot->output_offset +- + got_offset +- - splt->output_section->vma +- - splt->output_offset +- - h->plt.offset - 12), +- splt->contents + h->plt.offset + 12); ++#ifdef FOUR_WORD_PLT ++ bfd_put_32 (output_bfd, elf32_arm_plt_entry[3], ++ splt->contents + h->plt.offset + 12); ++#endif + + /* Fill in the entry in the global offset table. */ + bfd_put_32 (output_bfd, + (splt->output_section->vma + + splt->output_offset), + sgot->contents + got_offset); +- ++ + /* Fill in the entry in the .rel.plt section. */ + rel.r_offset = (sgot->output_section->vma + + sgot->output_offset +@@ -3446,16 +3839,20 @@ + + sgot->output_offset + + (h->got.offset &~ (bfd_vma) 1)); + +- /* If this is a -Bsymbolic link, and the symbol is defined +- locally, we just want to emit a RELATIVE reloc. The entry in +- the global offset table will already have been initialized in +- the relocate_section function. */ ++ /* If this is a static link, or it is a -Bsymbolic link and the ++ symbol is defined locally or was forced to be local because ++ of a version file, we just want to emit a RELATIVE reloc. ++ The entry in the global offset table will already have been ++ initialized in the relocate_section function. */ + if (info->shared +- && (info->symbolic || h->dynindx == -1) +- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) +- rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE); ++ && SYMBOL_REFERENCES_LOCAL (info, h)) ++ { ++ BFD_ASSERT((h->got.offset & 1) != 0); ++ rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE); ++ } + else + { ++ BFD_ASSERT((h->got.offset & 1) == 0); + bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset); + rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT); + } +@@ -3609,10 +4006,26 @@ + /* Fill in the first entry in the procedure linkage table. */ + if (splt->_raw_size > 0) + { ++ bfd_vma got_displacement; ++ ++ /* Calculate the displacement between the PLT slot and &GOT[0]. */ ++ got_displacement = (sgot->output_section->vma ++ + sgot->output_offset ++ - splt->output_section->vma ++ - splt->output_offset ++ - 16); ++ + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[0], splt->contents + 0); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[1], splt->contents + 4); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[2], splt->contents + 8); + bfd_put_32 (output_bfd, elf32_arm_plt0_entry[3], splt->contents + 12); ++#ifdef FOUR_WORD_PLT ++ /* The displacement value goes in the otherwise-unused last word of ++ the second entry. */ ++ bfd_put_32 (output_bfd, got_displacement, splt->contents + 28); ++#else ++ bfd_put_32 (output_bfd, got_displacement, splt->contents + 16); ++#endif + } + + /* UnixWare sets the entsize of .plt to 4, although that doesn't +@@ -3714,7 +4127,7 @@ + #define elf_backend_check_relocs elf32_arm_check_relocs + #define elf_backend_relocate_section elf32_arm_relocate_section + #define elf_backend_adjust_dynamic_symbol elf32_arm_adjust_dynamic_symbol +-#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections ++#define elf_backend_create_dynamic_sections elf32_arm_create_dynamic_sections + #define elf_backend_finish_dynamic_symbol elf32_arm_finish_dynamic_symbol + #define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections + #define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections +@@ -3723,7 +4136,9 @@ + #define elf_backend_object_p elf32_arm_object_p + #define elf_backend_section_flags elf32_arm_section_flags + #define elf_backend_final_write_processing elf32_arm_final_write_processing ++#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol + ++#define elf_backend_can_refcount 1 + #define elf_backend_can_gc_sections 1 + #define elf_backend_plt_readonly 1 + #define elf_backend_want_got_plt 1 +@@ -3733,7 +4148,7 @@ + #endif + + #define elf_backend_got_header_size 12 +-#define elf_backend_plt_header_size PLT_ENTRY_SIZE ++#define elf_backend_plt_header_size PLT_HEADER_SIZE + + #include "elf32-target.h" + +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-avr.c binutils-2.14.90.0.7/bfd/elf32-avr.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-avr.c 2003-07-23 09:08:08.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-avr.c 2004-04-20 01:26:12.000000000 -0600 +@@ -750,7 +750,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-cris.c binutils-2.14.90.0.7/bfd/elf32-cris.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-cris.c 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-cris.c 2004-04-20 01:26:12.000000000 -0600 +@@ -847,7 +847,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + symname = (bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name)); +@@ -1292,16 +1292,7 @@ + { + long indx; + +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-fr30.c binutils-2.14.90.0.7/bfd/elf32-fr30.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-fr30.c 2003-07-23 09:08:08.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-fr30.c 2004-04-20 01:26:12.000000000 -0600 +@@ -552,7 +552,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-frv.c binutils-2.14.90.0.7/bfd/elf32-frv.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-frv.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-frv.c 2004-04-20 01:26:12.000000000 -0600 +@@ -724,7 +724,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-h8300.c binutils-2.14.90.0.7/bfd/elf32-h8300.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-h8300.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-h8300.c 2004-04-20 01:26:12.000000000 -0600 +@@ -435,7 +435,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-hppa.c binutils-2.14.90.0.7/bfd/elf32-hppa.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-hppa.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-hppa.c 2004-04-20 01:26:12.000000000 -0600 +@@ -3408,7 +3408,7 @@ + /* This is a local symbol, h defaults to NULL. */ + sym = local_syms + r_symndx; + sym_sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-i370.c binutils-2.14.90.0.7/bfd/elf32-i370.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-i370.c 2003-07-23 09:08:08.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-i370.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1210,7 +1210,7 @@ + sec = local_sections[r_symndx]; + sym_name = ""; + +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + addend = rel->r_addend; + } + else +@@ -1363,16 +1363,7 @@ + { + long indx; + +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-i860.c binutils-2.14.90.0.7/bfd/elf32-i860.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-i860.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-i860.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1104,7 +1104,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-m32r.c binutils-2.14.90.0.7/bfd/elf32-m32r.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-m32r.c 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-m32r.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1107,7 +1107,7 @@ + sec = local_sections[r_symndx]; + sym_name = ""; + #if !USE_REL +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + addend = rel->r_addend; + #else + /* FIXME: This won't handle local relocations against SEC_MERGE +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-m68k.c binutils-2.14.90.0.7/bfd/elf32-m68k.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-m68k.c 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-m68k.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1403,7 +1403,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -1657,16 +1657,7 @@ + { + long indx; + +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-mcore.c binutils-2.14.90.0.7/bfd/elf32-mcore.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-mcore.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-mcore.c 2004-04-20 01:26:12.000000000 -0600 +@@ -467,7 +467,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + addend = rel->r_addend; + } + else +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-msp430.c binutils-2.14.90.0.7/bfd/elf32-msp430.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-msp430.c 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-msp430.c 2004-04-20 01:26:12.000000000 -0600 +@@ -449,7 +449,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-openrisc.c binutils-2.14.90.0.7/bfd/elf32-openrisc.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-openrisc.c 2003-07-23 09:08:08.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-openrisc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -375,7 +375,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-ppc.c binutils-2.14.90.0.7/bfd/elf32-ppc.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-ppc.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-ppc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -4727,7 +4727,7 @@ + sec = local_sections[r_symndx]; + sym_name = bfd_elf_local_sym_name (input_bfd, sym); + +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -5455,44 +5455,9 @@ + break; + + case R_PPC_RELAX32: +- { +- unsigned long r_symndx; +- Elf_Internal_Sym *sym; +- asection *sym_sec; +- bfd_byte *hit_addr = 0; +- bfd_vma value = 0; +- +- r_symndx = ELF32_R_SYM (rel->r_info); +- +- if (r_symndx < symtab_hdr->sh_info) +- { +- sym = local_syms + r_symndx; +- sym_sec = local_sections[r_symndx]; +- +- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); +- } +- else +- { +- bfd_boolean warned; +- bfd_boolean unresolved_reloc; +- +- RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd), +- r_symndx, symtab_hdr, +- value, sym_sec, +- unresolved_reloc, info, +- warned); +- if (warned) +- continue; +- } +- hit_addr = contents + rel->r_offset; +- value += rel->r_addend; +- +- r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type); +- if (r != bfd_reloc_ok) +- break; +- else +- continue; +- } ++ ppc_elf_install_value (output_bfd, contents + rel->r_offset, ++ relocation + addend, r_type); ++ continue; + + /* Indirect .sdata relocation. */ + case R_PPC_EMB_SDAI16: +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-s390.c binutils-2.14.90.0.7/bfd/elf32-s390.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-s390.c 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-s390.c 2004-04-20 01:26:12.000000000 -0600 +@@ -2327,7 +2327,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-sh.c binutils-2.14.90.0.7/bfd/elf32-sh.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-sh.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-sh.c 2004-04-20 01:26:12.000000000 -0600 +@@ -4805,7 +4805,7 @@ + } + else if (! howto->partial_inplace) + { +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + addend = rel->r_addend; + } + else if ((sec->flags & SEC_MERGE) +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-sparc.c binutils-2.14.90.0.7/bfd/elf32-sparc.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-sparc.c 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-sparc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -2182,7 +2182,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -2459,16 +2459,8 @@ + + if (is_plt) + sec = htab->splt; +- else if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-v850.c binutils-2.14.90.0.7/bfd/elf32-v850.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-v850.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-v850.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1681,7 +1681,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + #if 0 + { + char * name; +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-vax.c binutils-2.14.90.0.7/bfd/elf32-vax.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-vax.c 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-vax.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1483,7 +1483,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -1737,16 +1737,7 @@ + { + long indx; + +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-xstormy16.c binutils-2.14.90.0.7/bfd/elf32-xstormy16.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-xstormy16.c 2003-07-23 09:08:09.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf32-xstormy16.c 2004-04-20 01:26:12.000000000 -0600 +@@ -845,7 +845,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf32-xtensa.c binutils-2.14.90.0.7/bfd/elf32-xtensa.c +--- binutils-2.14.90.0.7.orig/bfd/elf32-xtensa.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf32-xtensa.c 2004-04-20 01:26:12.000000000 -0600 +@@ -2004,7 +2004,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-alpha.c binutils-2.14.90.0.7/bfd/elf64-alpha.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-alpha.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf64-alpha.c 2004-04-20 01:26:12.000000000 -0600 +@@ -4394,9 +4394,11 @@ + + if (r_symndx < symtab_hdr->sh_info) + { ++ asection *msec; + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ msec = sec; ++ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel); + + /* If this is a tp-relative relocation against sym 0, + this is hackery from relax_section. Force the value to +@@ -4424,7 +4426,6 @@ + && !gotent->reloc_xlated) + { + struct alpha_elf_got_entry *ent; +- asection *msec; + + for (ent = gotent; ent; ent = ent->next) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-hppa.c binutils-2.14.90.0.7/bfd/elf64-hppa.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-hppa.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf64-hppa.c 2004-04-20 01:26:12.000000000 -0600 +@@ -173,7 +173,7 @@ + PTR info)); + + static const char *get_dyn_name +- PARAMS ((asection *, struct elf_link_hash_entry *, ++ PARAMS ((bfd *, struct elf_link_hash_entry *, + const Elf_Internal_Rela *, char **, size_t *)); + + /* This must follow the definitions of the various derived linker +@@ -446,13 +446,14 @@ + allocate memory as necessary, possibly reusing PBUF/PLEN. */ + + static const char * +-get_dyn_name (sec, h, rel, pbuf, plen) +- asection *sec; ++get_dyn_name (abfd, h, rel, pbuf, plen) ++ bfd *abfd; + struct elf_link_hash_entry *h; + const Elf_Internal_Rela *rel; + char **pbuf; + size_t *plen; + { ++ asection *sec = abfd->sections; + size_t nlen, tlen; + char *buf; + size_t len; +@@ -858,7 +859,7 @@ + continue; + + /* Collect a canonical name for this address. */ +- addr_name = get_dyn_name (sec, h, rel, &buf, &buf_len); ++ addr_name = get_dyn_name (abfd, h, rel, &buf, &buf_len); + + /* Collect the canonical entry data for this address. */ + dyn_h = elf64_hppa_dyn_hash_lookup (&hppa_info->dyn_hash_table, +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-mmix.c binutils-2.14.90.0.7/bfd/elf64-mmix.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-mmix.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf64-mmix.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1472,7 +1472,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections [r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + + name = bfd_elf_string_from_elf_section + (input_bfd, symtab_hdr->sh_link, sym->st_name); +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-ppc.c binutils-2.14.90.0.7/bfd/elf64-ppc.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-ppc.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf64-ppc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -7385,7 +7385,7 @@ + sec = local_sections[r_symndx]; + sym_name = bfd_elf_local_sym_name (input_bfd, sym); + sym_type = ELF64_ST_TYPE (sym->st_info); +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + if (elf_section_data (sec) != NULL) + { + long *opd_sym_adjust; +@@ -8178,7 +8178,9 @@ + relocation = TOCstart; + if (r_symndx == 0) + relocation += htab->stub_group[input_section->id].toc_off; +- else if (sec != NULL && !unresolved_reloc) ++ else if (unresolved_reloc) ++ ; ++ else if (sec != NULL && sec->id <= htab->top_id) + relocation += htab->stub_group[sec->id].toc_off; + else + unresolved_reloc = TRUE; +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-s390.c binutils-2.14.90.0.7/bfd/elf64-s390.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-s390.c 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf64-s390.c 2004-04-20 01:26:12.000000000 -0600 +@@ -2297,7 +2297,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-sh64.c binutils-2.14.90.0.7/bfd/elf64-sh64.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-sh64.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elf64-sh64.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1582,7 +1582,7 @@ + } + else if (! howto->partial_inplace) + { +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + relocation |= ((sym->st_other & STO_SH5_ISA32) != 0); + } + else if ((sec->flags & SEC_MERGE) +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-sparc.c binutils-2.14.90.0.7/bfd/elf64-sparc.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-sparc.c 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf64-sparc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -2070,7 +2070,7 @@ + { + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -2247,16 +2247,8 @@ + + if (is_plt) + sec = splt; +- else if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ ++ if (bfd_is_abs_section (sec)) + indx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elf64-x86-64.c binutils-2.14.90.0.7/bfd/elf64-x86-64.c +--- binutils-2.14.90.0.7.orig/bfd/elf64-x86-64.c 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/bfd/elf64-x86-64.c 2004-04-20 01:26:12.000000000 -0600 +@@ -1823,7 +1823,7 @@ + sym = local_syms + r_symndx; + sec = local_sections[r_symndx]; + +- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); ++ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); + } + else + { +@@ -2048,16 +2048,7 @@ + { + long sindx; + +- if (h == NULL) +- sec = local_sections[r_symndx]; +- else +- { +- BFD_ASSERT (h->root.type == bfd_link_hash_defined +- || (h->root.type +- == bfd_link_hash_defweak)); +- sec = h->root.u.def.section; +- } +- if (sec != NULL && bfd_is_abs_section (sec)) ++ if (bfd_is_abs_section (sec)) + sindx = 0; + else if (sec == NULL || sec->owner == NULL) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/elfxx-ia64.c binutils-2.14.90.0.7/bfd/elfxx-ia64.c +--- binutils-2.14.90.0.7.orig/bfd/elfxx-ia64.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/elfxx-ia64.c 2004-04-20 01:26:12.000000000 -0600 +@@ -3849,9 +3849,11 @@ + if (r_symndx < symtab_hdr->sh_info) + { + /* Reloc against local symbol. */ ++ asection *msec; + sym = local_syms + r_symndx; + sym_sec = local_sections[r_symndx]; +- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); ++ msec = sym_sec; ++ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel); + if ((sym_sec->flags & SEC_MERGE) + && ELF_ST_TYPE (sym->st_info) == STT_SECTION + && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) +@@ -3862,7 +3864,6 @@ + if (loc_h && ! loc_h->sec_merge_done) + { + struct elfNN_ia64_dyn_sym_info *dynent; +- asection *msec; + + for (dynent = loc_h->info; dynent; dynent = dynent->next) + { +diff -urN binutils-2.14.90.0.7.orig/bfd/opncls.c binutils-2.14.90.0.7/bfd/opncls.c +--- binutils-2.14.90.0.7.orig/bfd/opncls.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/opncls.c 2004-04-20 01:26:11.000000000 -0600 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) +diff -urN binutils-2.14.90.0.7.orig/binutils/objcopy.c binutils-2.14.90.0.7/binutils/objcopy.c +--- binutils-2.14.90.0.7.orig/binutils/objcopy.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/binutils/objcopy.c 2004-04-20 01:26:12.000000000 -0600 +@@ -27,6 +27,7 @@ + #include "libiberty.h" + #include "budbg.h" + #include "filenames.h" ++#include "elf-bfd.h" + #include + + /* A list of symbols to explicitly strip out, or to keep. A linked +@@ -385,6 +386,7 @@ + -g --strip-debug Remove all debugging symbols & sections\n\ + --strip-unneeded Remove all symbols not needed by relocations\n\ + -N --strip-symbol Do not copy symbol \n\ ++ --only-keep-debug Strip everything but the debug information\n\ + -K --keep-symbol Only copy symbol \n\ + -L --localize-symbol Force symbol to be marked as a local\n\ + -G --keep-global-symbol Localize all symbols except \n\ +@@ -457,6 +459,7 @@ + -s --strip-all Remove all symbol and relocation information\n\ + -g -S -d --strip-debug Remove all debugging symbols & sections\n\ + --strip-unneeded Remove all symbols not needed by relocations\n\ ++ --only-keep-debug Strip everything but the debug information\n\ + -N --strip-symbol= Do not copy symbol \n\ + -K --keep-symbol= Only copy symbol \n\ + -x --discard-all Remove all non-global symbols\n\ +@@ -734,7 +737,7 @@ + return FALSE; + } + +- return strip_symbols == STRIP_NONDEBUG ? TRUE : FALSE; ++ return FALSE; + } + + /* Choose which symbol entries to copy; put the result in OSYMS. +@@ -1806,6 +1809,13 @@ + + if (p != NULL && p->set_flags) + flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC)); ++ else if (strip_symbols == STRIP_NONDEBUG && (flags & SEC_ALLOC) != 0) ++ { ++ flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD); ++ if (obfd->xvec->flavour == bfd_target_elf_flavour) ++ elf_section_type (osection) = SHT_NOBITS; ++ } ++ + if (!bfd_set_section_flags (obfd, osection, flags)) + { + err = _("flags"); +@@ -1926,6 +1936,8 @@ + } + + bfd_set_reloc (obfd, osection, relcount == 0 ? NULL : relpp, relcount); ++ if (relcount == 0) ++ free (relpp); + } + + isection->_cooked_size = isection->_raw_size; +diff -urN binutils-2.14.90.0.7.orig/binutils/readelf.c binutils-2.14.90.0.7/binutils/readelf.c +--- binutils-2.14.90.0.7.orig/binutils/readelf.c 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/binutils/readelf.c 2004-04-20 01:26:12.000000000 -0600 +@@ -6055,7 +6055,7 @@ + + bytes = section->sh_size; + +- if (bytes == 0) ++ if (bytes == 0 || section->sh_type == SHT_NOBITS) + { + printf (_("\nSection '%s' has no data to dump.\n"), + SECTION_NAME (section)); +diff -urN binutils-2.14.90.0.7.orig/gprof/gprof.texi binutils-2.14.90.0.7/gprof/gprof.texi +--- binutils-2.14.90.0.7.orig/gprof/gprof.texi 2002-08-01 18:49:32.000000000 -0600 ++++ binutils-2.14.90.0.7/gprof/gprof.texi 2004-04-20 01:26:11.000000000 -0600 +@@ -137,6 +137,10 @@ + If more than one profile file is specified, the @code{gprof} + output shows the sum of the profile information in the given profile files. + ++If you use gcc 2.95.x or 3.0 to compile your binaries, you may need ++to add the @samp{-fprofile-arcs} to the compile command line in order ++for the call graphs to be properly stored in gmon.out. ++ + @code{Gprof} calculates the amount of time spent in each routine. + Next, these times are propagated along the edges of the call graph. + Cycles are discovered, and calls into a cycle are made to share the time +@@ -181,7 +185,7 @@ + @c man end + + @c man begin SEEALSO +-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. ++profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. + + ``An Execution Profiler for Modular Programs'', + by S. Graham, P. Kessler, M. McKusick; +@@ -267,6 +271,11 @@ + options. The same option, @samp{-pg}, alters either compilation or linking + to do what is necessary for profiling. Here are examples: + ++If you use gcc 2.95.x or 3.0.x, you may need to add the ++@samp{-fprofile-arcs} option to the compile line along with @samp{-pg} ++in order to allow the call-graphs to be properly included in the gmon.out ++file. ++ + @example + cc -g -c myprog.c utils.c -pg + cc -o myprog myprog.o utils.o -pg +diff -urN binutils-2.14.90.0.7.orig/ld/Makefile.am binutils-2.14.90.0.7/ld/Makefile.am +--- binutils-2.14.90.0.7.orig/ld/Makefile.am 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/ld/Makefile.am 2004-04-20 01:26:11.000000000 -0600 +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urN binutils-2.14.90.0.7.orig/ld/Makefile.in binutils-2.14.90.0.7/ld/Makefile.in +--- binutils-2.14.90.0.7.orig/ld/Makefile.in 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/ld/Makefile.in 2004-04-20 01:26:11.000000000 -0600 +@@ -128,7 +128,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urN binutils-2.14.90.0.7.orig/ld/emultempl/elf32.em binutils-2.14.90.0.7/ld/emultempl/elf32.em +--- binutils-2.14.90.0.7.orig/ld/emultempl/elf32.em 2003-08-21 09:28:48.000000000 -0600 ++++ binutils-2.14.90.0.7/ld/emultempl/elf32.em 2004-04-20 01:26:11.000000000 -0600 +@@ -679,6 +679,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, + force)) + break; +@@ -855,6 +857,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf${ELFSIZE}_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, +diff -urN binutils-2.14.90.0.7.orig/ltmain.sh binutils-2.14.90.0.7/ltmain.sh +--- binutils-2.14.90.0.7.orig/ltmain.sh 2002-03-22 15:06:16.000000000 -0700 ++++ binutils-2.14.90.0.7/ltmain.sh 2004-04-20 01:26:12.000000000 -0600 +@@ -4413,6 +4413,10 @@ + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ++ if test -n "$linkname"; then ++ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)" ++ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $? ++ fi + ;; + esac + exit 0 +diff -urN binutils-2.14.90.0.7.orig/opcodes/Makefile.am binutils-2.14.90.0.7/opcodes/Makefile.am +--- binutils-2.14.90.0.7.orig/opcodes/Makefile.am 2003-10-29 10:37:49.000000000 -0700 ++++ binutils-2.14.90.0.7/opcodes/Makefile.am 2004-04-20 01:26:12.000000000 -0600 +@@ -284,7 +284,7 @@ + + libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c + libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la +-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la ++libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ -L../bfd -lbfd + libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@ + + # libtool will build .libs/libopcodes.a. We create libopcodes.a in +diff -urN binutils-2.14.90.0.7.orig/opcodes/Makefile.in binutils-2.14.90.0.7/opcodes/Makefile.in +--- binutils-2.14.90.0.7.orig/opcodes/Makefile.in 2003-10-29 10:37:49.000000000 -0700 ++++ binutils-2.14.90.0.7/opcodes/Makefile.in 2004-04-20 01:26:12.000000000 -0600 +@@ -394,7 +394,7 @@ + + libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c + libopcodes_la_DEPENDENCIES = $(OFILES) ../bfd/libbfd.la +-libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ ../bfd/libbfd.la ++libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@ -L../bfd -lbfd + libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@ + + # libtool will build .libs/libopcodes.a. We create libopcodes.a in +@@ -593,7 +593,7 @@ + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive install-info-recursive \ + check-recursive installcheck-recursive info-recursive dvi-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -613,7 +613,7 @@ + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +- @set fnord $(MAKEFLAGS); amf=$$2; \ ++ @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ +diff -urN binutils-2.14.90.0.7.orig/opcodes/alpha-opc.c binutils-2.14.90.0.7/opcodes/alpha-opc.c +--- binutils-2.14.90.0.7.orig/opcodes/alpha-opc.c 2003-01-21 11:21:34.000000000 -0700 ++++ binutils-2.14.90.0.7/opcodes/alpha-opc.c 2004-04-20 01:26:11.000000000 -0600 +@@ -1105,7 +1105,8 @@ + { "wmb", MFC(0x18,0x4400), BASE, ARG_NONE }, + { "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } }, + { "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } }, +- { "rpcc", MFC(0x18,0xC000), BASE, { RA } }, ++ { "rpcc", MFC(0x18,0xC000), BASE, { RA, ZB } }, ++ { "rpcc", MFC(0x18,0xC000), BASE, { RA, RB } }, /* ev6 una */ + { "rc", MFC(0x18,0xE000), BASE, { RA } }, + { "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */ + { "rs", MFC(0x18,0xF000), BASE, { RA } }, +diff -urN binutils-2.14.90.0.7.orig/opcodes/m68k-opc.c binutils-2.14.90.0.7/opcodes/m68k-opc.c +--- binutils-2.14.90.0.7.orig/opcodes/m68k-opc.c 2003-10-29 10:37:49.000000000 -0700 ++++ binutils-2.14.90.0.7/opcodes/m68k-opc.c 2004-04-20 01:26:12.000000000 -0600 +@@ -847,15 +847,15 @@ + {"fmoved", two(0xF000, 0x7400), two(0xF1C0, 0xFC7F), "IiF7ws", cfloat }, + {"fmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "Ii;lF7", mfloat }, + {"fmovel", two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7$l", mfloat }, ++/* FIXME: the next two variants should not permit moving an address ++ register to anything but the floating point instruction register. */ ++{"fmovel", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat }, ++{"fmovel", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ls8", mfloat }, + {"fmovel", two(0xF000, 0x4000), two(0xF1C0, 0xFC7F), "IibsF7", cfloat }, + {"fmovel", two(0xF000, 0x6000), two(0xF1C0, 0xFC7F), "IiF7bs", cfloat }, + /* Move the FP control registers */ + {"fmovel", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8ps", cfloat }, + {"fmovel", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Iibss8", cfloat }, +-/* FIXME: the next two variants should not permit moving an address +- register to anything but the floating point instruction register. */ +-{"fmovel", two(0xF000, 0xA000), two(0xF1C0, 0xE3FF), "Iis8%s", mfloat }, +-{"fmovel", two(0xF000, 0x8000), two(0xF1C0, 0xE3FF), "Ii*ls8", mfloat }, + {"fmovep", two(0xF000, 0x4C00), two(0xF1C0, 0xFC7F), "Ii;pF7", mfloat }, + {"fmovep", two(0xF000, 0x6C00), two(0xF1C0, 0xFC00), "IiF7~pkC", mfloat }, + {"fmovep", two(0xF000, 0x7C00), two(0xF1C0, 0xFC0F), "IiF7~pDk", mfloat }, diff --git a/toolchain/binutils/2.14.90.0.7/100-uclibc-conf.patch b/toolchain/binutils/2.14.90.0.7/100-uclibc-conf.patch new file mode 100644 index 0000000000..6e36af2298 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.7/100-uclibc-conf.patch @@ -0,0 +1,646 @@ +diff -urN binutils-2.14.90.0.7.orig/bfd/config.bfd binutils-2.14.90.0.7/bfd/config.bfd +--- binutils-2.14.90.0.7.orig/bfd/config.bfd 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/config.bfd 2004-04-20 01:37:12.000000000 -0600 +@@ -121,7 +121,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 + ;; +@@ -131,7 +131,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*-*-elf* | ia64*-*-linux-uclibc* | ia64*-*-kfreebsd*-gnu) + targ_defvec=bfd_elf64_ia64_little_vec + targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" + ;; +@@ -214,7 +214,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 + ;; +@@ -222,7 +222,7 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu) ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux* | arm*-*-linux-uclibc* | arm-*-kfreebsd*-gnu) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +@@ -355,7 +355,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 + ;; +@@ -366,7 +366,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu* | hppa*-*-netbsd*) ++ hppa*-*-linux-gnu* | hppa*-*-netbsd* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -488,7 +488,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 +@@ -502,7 +502,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" + ;; +@@ -662,7 +662,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 + ;; +@@ -929,7 +929,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" +@@ -961,8 +962,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" +@@ -1110,7 +1111,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" + ;; +@@ -1157,7 +1158,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" + ;; +diff -urN binutils-2.14.90.0.7.orig/bfd/configure binutils-2.14.90.0.7/bfd/configure +--- binutils-2.14.90.0.7.orig/bfd/configure 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/configure 2004-04-20 01:32:29.000000000 -0600 +@@ -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"' + ;; +@@ -5388,7 +5393,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"' + ;; +diff -urN binutils-2.14.90.0.7.orig/bfd/configure.in binutils-2.14.90.0.7/bfd/configure.in +--- binutils-2.14.90.0.7.orig/bfd/configure.in 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/bfd/configure.in 2004-04-20 01:32:29.000000000 -0600 +@@ -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"' +@@ -312,7 +312,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"' + ;; +diff -urN binutils-2.14.90.0.7.orig/config.sub binutils-2.14.90.0.7/config.sub +--- binutils-2.14.90.0.7.orig/config.sub 2003-08-21 09:28:47.000000000 -0600 ++++ binutils-2.14.90.0.7/config.sub 2004-04-20 01:32:29.000000000 -0600 +@@ -118,7 +118,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -1131,7 +1131,8 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ +diff -urN binutils-2.14.90.0.7.orig/configure binutils-2.14.90.0.7/configure +--- binutils-2.14.90.0.7.orig/configure 2003-10-29 10:38:23.000000000 -0700 ++++ binutils-2.14.90.0.7/configure 2004-04-20 01:32:29.000000000 -0600 +@@ -1276,6 +1276,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.14.90.0.7.orig/configure.in binutils-2.14.90.0.7/configure.in +--- binutils-2.14.90.0.7.orig/configure.in 2003-10-29 10:38:20.000000000 -0700 ++++ binutils-2.14.90.0.7/configure.in 2004-04-20 01:32:29.000000000 -0600 +@@ -515,6 +515,19 @@ + 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" ++ build_modules= ++ # 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.14.90.0.7.orig/demangler/configure binutils-2.14.90.0.7/demangler/configure +--- binutils-2.14.90.0.7.orig/demangler/configure 2003-10-29 10:38:20.000000000 -0700 ++++ binutils-2.14.90.0.7/demangler/configure 2004-04-20 01:32:29.000000000 -0600 +@@ -1380,6 +1380,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.14.90.0.7.orig/gas/configure binutils-2.14.90.0.7/gas/configure +--- binutils-2.14.90.0.7.orig/gas/configure 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/gas/configure 2004-04-20 01:37:58.000000000 -0600 +@@ -3215,6 +3215,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]+$' +@@ -4028,6 +4033,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 ;; + +@@ -4044,6 +4050,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 ;; +@@ -4058,6 +4065,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 ;; +@@ -4114,7 +4122,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 ;; +@@ -4175,6 +4185,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 ;; + +@@ -4201,6 +4212,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-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; + m68k-*-netbsdelf*) fmt=elf em=nbsd ;; +@@ -4257,7 +4269,7 @@ + ppc-*-beos*) fmt=coff ;; + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; +- ppc-*-linux-gnu*) fmt=elf em=linux ++ ppc-*-linux-uclibc* | ppc-*-linux-gnu*) fmt=elf em=linux + case "$endian" in + big) ;; + *) { { echo "$as_me:$LINENO: error: GNU/Linux must be configured big endian" >&5 +@@ -4286,7 +4298,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 +@@ -4319,6 +4333,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.14.90.0.7.orig/gas/configure.in binutils-2.14.90.0.7/gas/configure.in +--- binutils-2.14.90.0.7.orig/gas/configure.in 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/gas/configure.in 2004-04-20 01:38:23.000000000 -0600 +@@ -192,6 +192,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 ;; + +@@ -208,6 +209,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 ;; +@@ -222,6 +224,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 ;; +@@ -278,7 +281,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 ;; +@@ -332,6 +337,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 ;; + +@@ -358,6 +364,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-*-gnu*) fmt=elf ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; + m68k-*-netbsdelf*) fmt=elf em=nbsd ;; +@@ -412,7 +419,7 @@ + ppc-*-beos*) fmt=coff ;; + ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; + ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; +- ppc-*-linux-gnu*) fmt=elf em=linux ++ ppc-*-linux-uclibc* | ppc-*-linux-gnu*) fmt=elf em=linux + case "$endian" in + big) ;; + *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;; +@@ -434,7 +441,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 +@@ -467,6 +476,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.14.90.0.7.orig/ld/configure binutils-2.14.90.0.7/ld/configure +--- binutils-2.14.90.0.7.orig/ld/configure 2003-05-05 15:46:49.000000000 -0600 ++++ binutils-2.14.90.0.7/ld/configure 2004-04-20 01:32:29.000000000 -0600 +@@ -1578,6 +1578,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.14.90.0.7.orig/ld/configure.tgt binutils-2.14.90.0.7/ld/configure.tgt +--- binutils-2.14.90.0.7.orig/ld/configure.tgt 2003-10-29 10:37:48.000000000 -0700 ++++ binutils-2.14.90.0.7/ld/configure.tgt 2004-04-20 01:32:29.000000000 -0600 +@@ -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 +@@ -125,7 +128,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 ;; +@@ -149,14 +152,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/'` +@@ -256,10 +261,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 ;; +@@ -360,7 +368,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/'` + ;; +@@ -376,9 +385,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 ;; +@@ -422,16 +431,20 @@ + mips*-*-rtems*) targ_emul=elf32ebmip ;; + mips*el-*-vxworks*) targ_emul=elf32elmip ;; + mips*-*-vxworks*) targ_emul=elf32ebmip ;; +-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 ;; +@@ -454,6 +467,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.14.90.0.7.orig/libtool.m4 binutils-2.14.90.0.7/libtool.m4 +--- binutils-2.14.90.0.7.orig/libtool.m4 2003-05-05 15:46:46.000000000 -0600 ++++ binutils-2.14.90.0.7/libtool.m4 2004-04-20 01:32:29.000000000 -0600 +@@ -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.14.90.0.7.orig/ltconfig binutils-2.14.90.0.7/ltconfig +--- binutils-2.14.90.0.7.orig/ltconfig 2003-10-29 10:37:47.000000000 -0700 ++++ binutils-2.14.90.0.7/ltconfig 2004-04-20 01:32:29.000000000 -0600 +@@ -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 --git a/toolchain/binutils/2.14.90.0.7/200-build_modules.patch b/toolchain/binutils/2.14.90.0.7/200-build_modules.patch new file mode 100644 index 0000000000..e9f8e75a89 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.7/200-build_modules.patch @@ -0,0 +1,31 @@ +Get around an odd build failure. +diff -urN binutils-2.14.90.0.6/configure binutils-2.14.90.0.6-uClibc/configure +--- binutils-2.14.90.0.6/configure 2003-08-21 10:29:32.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure 2004-01-07 05:43:40.000000000 -0600 +@@ -906,6 +906,11 @@ + fi + + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" +diff -urN binutils-2.14.90.0.6/configure.in binutils-2.14.90.0.6-uClibc/configure.in +--- binutils-2.14.90.0.6/configure.in 2003-08-21 10:29:30.000000000 -0500 ++++ binutils-2.14.90.0.6-uClibc/configure.in 2004-01-07 05:44:02.000000000 -0600 +@@ -178,6 +178,11 @@ + fi + + ++case "$target" in ++ *-*-*-uclibc*) ++ build_modules= ++ ;; ++esac + ################################################################################ + + srcname="gnu development package" diff --git a/toolchain/binutils/2.14.90.0.7/210-cflags.patch b/toolchain/binutils/2.14.90.0.7/210-cflags.patch new file mode 100644 index 0000000000..dc67d3c4e3 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.7/210-cflags.patch @@ -0,0 +1,32 @@ +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 + diff --git a/toolchain/binutils/2.14.90.0.7/600-arm-textrel.patch b/toolchain/binutils/2.14.90.0.7/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.14.90.0.7/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.14.90.0.8/001-debian.patch b/toolchain/binutils/2.14.90.0.8/001-debian.patch new file mode 100644 index 0000000000..780823542a --- /dev/null +++ b/toolchain/binutils/2.14.90.0.8/001-debian.patch @@ -0,0 +1,142 @@ +diff -urN binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c binutils-2.14.90.0.8/bfd/elf64-alpha.c +--- binutils-2.14.90.0.8-dist/bfd/elf64-alpha.c 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.14.90.0.8/bfd/elf64-alpha.c 2004-02-11 03:42:05.000000000 -0600 +@@ -4144,9 +4144,12 @@ + + loc = srel->contents; + loc += srel->reloc_count++ * sizeof (Elf64_External_Rela); +- bfd_elf64_swap_reloca_out (abfd, &outrel, loc); +- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count +- <= srel->_cooked_size); ++ if (loc) ++ { ++ bfd_elf64_swap_reloca_out (abfd, &outrel, loc); ++ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count ++ <= srel->_cooked_size); ++ } + } + + /* Relocate an Alpha ELF section for a relocatable link. +diff -urN binutils-2.14.90.0.8-dist/bfd/opncls.c binutils-2.14.90.0.8/bfd/opncls.c +--- binutils-2.14.90.0.8-dist/bfd/opncls.c 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.14.90.0.8/bfd/opncls.c 2004-02-11 03:42:01.000000000 -0600 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) +diff -urN binutils-2.14.90.0.8-dist/gprof/gprof.texi binutils-2.14.90.0.8/gprof/gprof.texi +--- binutils-2.14.90.0.8-dist/gprof/gprof.texi 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.14.90.0.8/gprof/gprof.texi 2004-02-11 03:42:01.000000000 -0600 +@@ -138,6 +138,10 @@ + If more than one profile file is specified, the @code{gprof} + output shows the sum of the profile information in the given profile files. + ++If you use gcc 2.95.x or 3.0 to compile your binaries, you may need ++to add the @samp{-fprofile-arcs} to the compile command line in order ++for the call graphs to be properly stored in gmon.out. ++ + @code{Gprof} calculates the amount of time spent in each routine. + Next, these times are propagated along the edges of the call graph. + Cycles are discovered, and calls into a cycle are made to share the time +@@ -182,7 +186,7 @@ + @c man end + + @c man begin SEEALSO +-monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. ++profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. + + ``An Execution Profiler for Modular Programs'', + by S. Graham, P. Kessler, M. McKusick; +@@ -268,6 +272,11 @@ + options. The same option, @samp{-pg}, alters either compilation or linking + to do what is necessary for profiling. Here are examples: + ++If you use gcc 2.95.x or 3.0.x, you may need to add the ++@samp{-fprofile-arcs} option to the compile line along with @samp{-pg} ++in order to allow the call-graphs to be properly included in the gmon.out ++file. ++ + @example + cc -g -c myprog.c utils.c -pg + cc -o myprog myprog.o utils.o -pg +diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.am binutils-2.14.90.0.8/ld/Makefile.am +--- binutils-2.14.90.0.8-dist/ld/Makefile.am 2004-01-14 15:07:52.000000000 -0600 ++++ binutils-2.14.90.0.8/ld/Makefile.am 2004-02-11 03:42:01.000000000 -0600 +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urN binutils-2.14.90.0.8-dist/ld/Makefile.in binutils-2.14.90.0.8/ld/Makefile.in +--- binutils-2.14.90.0.8-dist/ld/Makefile.in 2004-01-14 15:07:52.000000000 -0600 ++++ binutils-2.14.90.0.8/ld/Makefile.in 2004-02-11 03:42:01.000000000 -0600 +@@ -128,7 +128,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urN binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em binutils-2.14.90.0.8/ld/emultempl/elf32.em +--- binutils-2.14.90.0.8-dist/ld/emultempl/elf32.em 2004-01-14 15:07:53.000000000 -0600 ++++ binutils-2.14.90.0.8/ld/emultempl/elf32.em 2004-02-11 03:42:01.000000000 -0600 +@@ -671,6 +671,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, + force)) + break; +@@ -850,6 +852,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf${ELFSIZE}_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, +diff -urN binutils-2.14.90.0.8-dist/ltmain.sh binutils-2.14.90.0.8/ltmain.sh +--- binutils-2.14.90.0.8-dist/ltmain.sh 2002-03-22 16:06:16.000000000 -0600 ++++ binutils-2.14.90.0.8/ltmain.sh 2004-02-11 03:42:05.000000000 -0600 +@@ -4413,6 +4413,10 @@ + # LD_LIBRARY_PATH before the program is installed. + $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" + $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ++ if test -n "$linkname"; then ++ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)" ++ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $? ++ fi + ;; + esac + exit 0 +diff -urN binutils-2.14.90.0.8-dist/opcodes/i386-dis.c binutils-2.14.90.0.8/opcodes/i386-dis.c +--- binutils-2.14.90.0.8-dist/opcodes/i386-dis.c 2004-01-14 15:07:55.000000000 -0600 ++++ binutils-2.14.90.0.8/opcodes/i386-dis.c 2004-02-11 03:42:01.000000000 -0600 +@@ -1879,7 +1879,7 @@ + * The function returns the length of this instruction in bytes. + */ + +-static char intel_syntax; ++static signed char intel_syntax; + static char open_char; + static char close_char; + static char separator_char; diff --git a/toolchain/binutils/2.14.90.0.8/100-uclibc-conf.patch b/toolchain/binutils/2.14.90.0.8/100-uclibc-conf.patch new file mode 100644 index 0000000000..5cb516cd21 --- /dev/null +++ b/toolchain/binutils/2.14.90.0.8/100-uclibc-conf.patch @@ -0,0 +1,630 @@ +diff -urN binutils-2.14.90.0.8-001-debian/bfd/config.bfd binutils-2.14.90.0.8/bfd/config.bfd +--- binutils-2.14.90.0.8-001-debian/bfd/config.bfd 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.14.90.0.8/bfd/config.bfd 2004-02-12 14:18:14.000000000 -0600 +@@ -121,7 +121,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 + ;; +@@ -131,7 +131,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" + ;; +@@ -208,7 +208,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 + ;; +@@ -216,8 +216,8 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ +- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks) ++ 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 + ;; +@@ -350,7 +350,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 + ;; +@@ -361,7 +361,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 + ;; +@@ -483,7 +483,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 +@@ -497,7 +497,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" + ;; +@@ -672,7 +672,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 + ;; +@@ -952,7 +952,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" +@@ -984,8 +985,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" +@@ -1141,7 +1142,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" + ;; +@@ -1188,7 +1189,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" + ;; +diff -urN binutils-2.14.90.0.8-001-debian/bfd/configure binutils-2.14.90.0.8/bfd/configure +--- binutils-2.14.90.0.8-001-debian/bfd/configure 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.14.90.0.8/bfd/configure 2004-02-12 14:09:10.000000000 -0600 +@@ -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"' + ;; +@@ -5388,7 +5393,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"' + ;; +diff -urN binutils-2.14.90.0.8-001-debian/bfd/configure.in binutils-2.14.90.0.8/bfd/configure.in +--- binutils-2.14.90.0.8-001-debian/bfd/configure.in 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.14.90.0.8/bfd/configure.in 2004-02-12 14:09:10.000000000 -0600 +@@ -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"' +@@ -312,7 +312,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"' + ;; +diff -urN binutils-2.14.90.0.8-001-debian/config.sub binutils-2.14.90.0.8/config.sub +--- binutils-2.14.90.0.8-001-debian/config.sub 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.14.90.0.8/config.sub 2004-02-12 14:09:10.000000000 -0600 +@@ -118,7 +118,7 @@ + # Here we must recognize all the valid KERNEL-OS combinations. + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in +- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) ++ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; +@@ -1131,7 +1131,8 @@ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ++ | -mingw32* | -linux-gnu* | -linux-uclibc* \ ++ | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ +diff -urN binutils-2.14.90.0.8-001-debian/configure binutils-2.14.90.0.8/configure +--- binutils-2.14.90.0.8-001-debian/configure 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.14.90.0.8/configure 2004-02-12 14:09:10.000000000 -0600 +@@ -1273,6 +1273,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.14.90.0.8-001-debian/configure.in binutils-2.14.90.0.8/configure.in +--- binutils-2.14.90.0.8-001-debian/configure.in 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.14.90.0.8/configure.in 2004-02-12 14:50:56.000000000 -0600 +@@ -512,6 +512,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.14.90.0.8-001-debian/gas/configure binutils-2.14.90.0.8/gas/configure +--- binutils-2.14.90.0.8-001-debian/gas/configure 2004-01-14 15:07:45.000000000 -0600 ++++ binutils-2.14.90.0.8/gas/configure 2004-02-12 14:57:43.000000000 -0600 +@@ -3215,6 +3215,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]+$' +@@ -4030,6 +4035,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 ;; + +@@ -4046,6 +4052,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 ;; +@@ -4059,6 +4066,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 ;; +@@ -4115,7 +4123,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 ;; +@@ -4175,6 +4185,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 ;; + +@@ -4202,6 +4213,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 ;; +@@ -4265,6 +4277,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) ;; +@@ -4292,7 +4305,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 +@@ -4325,6 +4340,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.14.90.0.8-001-debian/gas/configure.in binutils-2.14.90.0.8/gas/configure.in +--- binutils-2.14.90.0.8-001-debian/gas/configure.in 2004-01-14 15:07:45.000000000 -0600 ++++ binutils-2.14.90.0.8/gas/configure.in 2004-02-12 14:21:06.000000000 -0600 +@@ -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 ;; +@@ -279,7 +282,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 ;; +@@ -332,6 +337,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 ;; + +@@ -359,6 +365,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.14.90.0.8-001-debian/ld/configure binutils-2.14.90.0.8/ld/configure +--- binutils-2.14.90.0.8-001-debian/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.14.90.0.8/ld/configure 2004-02-12 14:09:10.000000000 -0600 +@@ -1578,6 +1578,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.14.90.0.8-001-debian/ld/configure.tgt binutils-2.14.90.0.8/ld/configure.tgt +--- binutils-2.14.90.0.8-001-debian/ld/configure.tgt 2004-01-14 15:07:52.000000000 -0600 ++++ binutils-2.14.90.0.8/ld/configure.tgt 2004-02-12 14:14:12.000000000 -0600 +@@ -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 +@@ -128,7 +131,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 +155,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 +264,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 ;; +@@ -363,7 +371,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/'` + ;; +@@ -380,9 +389,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 ;; +@@ -429,16 +438,20 @@ + 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 +474,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.14.90.0.8-001-debian/libtool.m4 binutils-2.14.90.0.8/libtool.m4 +--- binutils-2.14.90.0.8-001-debian/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.14.90.0.8/libtool.m4 2004-02-12 14:09:10.000000000 -0600 +@@ -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.14.90.0.8-001-debian/ltconfig binutils-2.14.90.0.8/ltconfig +--- binutils-2.14.90.0.8-001-debian/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.14.90.0.8/ltconfig 2004-02-12 14:09:10.000000000 -0600 +@@ -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 --git a/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch b/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.14.90.0.8/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.90.0.1.1/100-uclibc-conf.patch b/toolchain/binutils/2.15.90.0.1.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..d47b6f0942 --- /dev/null +++ b/toolchain/binutils/2.15.90.0.1.1/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +diff -urN binutils-2.15.90.0.1.1-dist/bfd/config.bfd binutils-2.15.90.0.1.1/bfd/config.bfd +--- binutils-2.15.90.0.1.1-dist/bfd/config.bfd 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.15.90.0.1.1/bfd/config.bfd 2004-08-06 17:29:55.000000000 -0500 +@@ -121,7 +121,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 + ;; +@@ -131,7 +131,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" + ;; +@@ -208,7 +208,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 + ;; +@@ -216,7 +216,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 +@@ -350,7 +350,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 + ;; +@@ -361,7 +361,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 + ;; +@@ -483,7 +483,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 +@@ -497,7 +497,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" + ;; +@@ -672,7 +672,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 + ;; +@@ -952,7 +952,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" +@@ -984,8 +985,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" +@@ -1141,7 +1142,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" + ;; +@@ -1188,7 +1189,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" + ;; +@@ -1257,7 +1258,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -urN binutils-2.15.90.0.1.1-dist/bfd/configure binutils-2.15.90.0.1.1/bfd/configure +--- binutils-2.15.90.0.1.1-dist/bfd/configure 2004-03-05 19:18:21.000000000 -0600 ++++ binutils-2.15.90.0.1.1/bfd/configure 2004-08-06 17:29:55.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"' + ;; +@@ -5388,7 +5393,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"' + ;; +@@ -5489,7 +5494,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.90.0.1.1-dist/bfd/configure.in binutils-2.15.90.0.1.1/bfd/configure.in +--- binutils-2.15.90.0.1.1-dist/bfd/configure.in 2004-03-05 19:18:21.000000000 -0600 ++++ binutils-2.15.90.0.1.1/bfd/configure.in 2004-08-06 17:29:55.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"' +@@ -312,7 +312,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"' + ;; +@@ -397,7 +397,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.90.0.1.1-dist/binutils/configure binutils-2.15.90.0.1.1/binutils/configure +--- binutils-2.15.90.0.1.1-dist/binutils/configure 2004-01-14 15:07:44.000000000 -0600 ++++ binutils-2.15.90.0.1.1/binutils/configure 2004-08-06 17:29:55.000000000 -0500 +@@ -1574,6 +1574,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.90.0.1.1-dist/configure binutils-2.15.90.0.1.1/configure +--- binutils-2.15.90.0.1.1-dist/configure 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1.1/configure 2004-08-06 17:29:55.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.90.0.1.1-dist/configure.in binutils-2.15.90.0.1.1/configure.in +--- binutils-2.15.90.0.1.1-dist/configure.in 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1.1/configure.in 2004-08-06 17:29:55.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.90.0.1.1-dist/gas/configure binutils-2.15.90.0.1.1/gas/configure +--- binutils-2.15.90.0.1.1-dist/gas/configure 2004-03-05 19:18:21.000000000 -0600 ++++ binutils-2.15.90.0.1.1/gas/configure 2004-08-06 17:29:55.000000000 -0500 +@@ -3401,6 +3401,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]+$' +@@ -4226,6 +4231,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 ;; + +@@ -4242,6 +4248,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 ;; +@@ -4255,6 +4262,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 ;; +@@ -4311,7 +4319,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 ;; +@@ -4371,6 +4381,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 ;; + +@@ -4398,6 +4409,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 ;; +@@ -4461,6 +4473,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) ;; +@@ -4488,7 +4501,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 +@@ -4521,6 +4536,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.90.0.1.1-dist/gas/configure.in binutils-2.15.90.0.1.1/gas/configure.in +--- binutils-2.15.90.0.1.1-dist/gas/configure.in 2004-01-14 15:07:45.000000000 -0600 ++++ binutils-2.15.90.0.1.1/gas/configure.in 2004-08-06 17:29:55.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 ;; +@@ -279,7 +282,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 ;; +@@ -332,6 +337,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 ;; + +@@ -359,6 +365,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.90.0.1.1-dist/gprof/configure binutils-2.15.90.0.1.1/gprof/configure +--- binutils-2.15.90.0.1.1-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.15.90.0.1.1/gprof/configure 2004-08-06 17:29:55.000000000 -0500 +@@ -1570,6 +1570,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.90.0.1.1-dist/ld/configure binutils-2.15.90.0.1.1/ld/configure +--- binutils-2.15.90.0.1.1-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.15.90.0.1.1/ld/configure 2004-08-06 17:29:55.000000000 -0500 +@@ -1578,6 +1578,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.90.0.1.1-dist/ld/configure.tgt binutils-2.15.90.0.1.1/ld/configure.tgt +--- binutils-2.15.90.0.1.1-dist/ld/configure.tgt 2004-01-14 15:07:52.000000000 -0600 ++++ binutils-2.15.90.0.1.1/ld/configure.tgt 2004-08-06 17:29:55.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 ;; +@@ -363,7 +373,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/'` + ;; +@@ -380,9 +391,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 ;; +@@ -395,6 +406,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.90.0.1.1-dist/libtool.m4 binutils-2.15.90.0.1.1/libtool.m4 +--- binutils-2.15.90.0.1.1-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.15.90.0.1.1/libtool.m4 2004-08-06 17:29:55.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.90.0.1.1-dist/ltconfig binutils-2.15.90.0.1.1/ltconfig +--- binutils-2.15.90.0.1.1-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.15.90.0.1.1/ltconfig 2004-08-06 17:29:55.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.90.0.1.1-dist/opcodes/configure binutils-2.15.90.0.1.1/opcodes/configure +--- binutils-2.15.90.0.1.1-dist/opcodes/configure 2004-01-14 15:07:54.000000000 -0600 ++++ binutils-2.15.90.0.1.1/opcodes/configure 2004-08-06 17:29:55.000000000 -0500 +@@ -1689,6 +1689,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 --git a/toolchain/binutils/2.15.90.0.1.1/600-arm-textrel.patch b/toolchain/binutils/2.15.90.0.1.1/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.90.0.1.1/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.90.0.1/100-uclibc-conf.patch b/toolchain/binutils/2.15.90.0.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..64aef4986e --- /dev/null +++ b/toolchain/binutils/2.15.90.0.1/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +diff -urN binutils-2.15.90.0.1-dist/bfd/config.bfd binutils-2.15.90.0.1/bfd/config.bfd +--- binutils-2.15.90.0.1-dist/bfd/config.bfd 2004-01-14 15:07:43.000000000 -0600 ++++ binutils-2.15.90.0.1/bfd/config.bfd 2004-08-06 17:39:55.000000000 -0500 +@@ -121,7 +121,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 + ;; +@@ -131,7 +131,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" + ;; +@@ -208,7 +208,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 + ;; +@@ -216,7 +216,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 +@@ -350,7 +350,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 + ;; +@@ -361,7 +361,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 + ;; +@@ -483,7 +483,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 +@@ -497,7 +497,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" + ;; +@@ -672,7 +672,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 + ;; +@@ -952,7 +952,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" +@@ -984,8 +985,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" +@@ -1141,7 +1142,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" + ;; +@@ -1188,7 +1189,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" + ;; +@@ -1257,7 +1258,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -urN binutils-2.15.90.0.1-dist/bfd/configure binutils-2.15.90.0.1/bfd/configure +--- binutils-2.15.90.0.1-dist/bfd/configure 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1/bfd/configure 2004-08-06 17:39:55.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"' + ;; +@@ -5388,7 +5393,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"' + ;; +@@ -5489,7 +5494,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.90.0.1-dist/bfd/configure.in binutils-2.15.90.0.1/bfd/configure.in +--- binutils-2.15.90.0.1-dist/bfd/configure.in 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1/bfd/configure.in 2004-08-06 17:39:55.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"' +@@ -312,7 +312,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"' + ;; +@@ -397,7 +397,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.90.0.1-dist/binutils/configure binutils-2.15.90.0.1/binutils/configure +--- binutils-2.15.90.0.1-dist/binutils/configure 2004-01-14 15:07:44.000000000 -0600 ++++ binutils-2.15.90.0.1/binutils/configure 2004-08-06 17:39:55.000000000 -0500 +@@ -1574,6 +1574,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.90.0.1-dist/configure binutils-2.15.90.0.1/configure +--- binutils-2.15.90.0.1-dist/configure 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1/configure 2004-08-06 17:39:55.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.90.0.1-dist/configure.in binutils-2.15.90.0.1/configure.in +--- binutils-2.15.90.0.1-dist/configure.in 2004-03-03 14:24:33.000000000 -0600 ++++ binutils-2.15.90.0.1/configure.in 2004-08-06 17:39:55.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.90.0.1-dist/gas/configure binutils-2.15.90.0.1/gas/configure +--- binutils-2.15.90.0.1-dist/gas/configure 2004-01-14 15:07:45.000000000 -0600 ++++ binutils-2.15.90.0.1/gas/configure 2004-08-06 17:39:55.000000000 -0500 +@@ -3215,6 +3215,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]+$' +@@ -4030,6 +4035,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 ;; + +@@ -4046,6 +4052,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 ;; +@@ -4059,6 +4066,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 ;; +@@ -4115,7 +4123,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 ;; +@@ -4175,6 +4185,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 ;; + +@@ -4202,6 +4213,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 ;; +@@ -4265,6 +4277,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) ;; +@@ -4292,7 +4305,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 +@@ -4325,6 +4340,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.90.0.1-dist/gas/configure.in binutils-2.15.90.0.1/gas/configure.in +--- binutils-2.15.90.0.1-dist/gas/configure.in 2004-01-14 15:07:45.000000000 -0600 ++++ binutils-2.15.90.0.1/gas/configure.in 2004-08-06 17:39:55.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 ;; +@@ -279,7 +282,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 ;; +@@ -332,6 +337,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 ;; + +@@ -359,6 +365,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.90.0.1-dist/gprof/configure binutils-2.15.90.0.1/gprof/configure +--- binutils-2.15.90.0.1-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.15.90.0.1/gprof/configure 2004-08-06 17:39:55.000000000 -0500 +@@ -1570,6 +1570,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.90.0.1-dist/ld/configure binutils-2.15.90.0.1/ld/configure +--- binutils-2.15.90.0.1-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.15.90.0.1/ld/configure 2004-08-06 17:39:55.000000000 -0500 +@@ -1578,6 +1578,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.90.0.1-dist/ld/configure.tgt binutils-2.15.90.0.1/ld/configure.tgt +--- binutils-2.15.90.0.1-dist/ld/configure.tgt 2004-01-14 15:07:52.000000000 -0600 ++++ binutils-2.15.90.0.1/ld/configure.tgt 2004-08-06 17:39:55.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 ;; +@@ -363,7 +373,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/'` + ;; +@@ -380,9 +391,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 ;; +@@ -395,6 +406,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.90.0.1-dist/libtool.m4 binutils-2.15.90.0.1/libtool.m4 +--- binutils-2.15.90.0.1-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.15.90.0.1/libtool.m4 2004-08-06 17:39:55.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.90.0.1-dist/ltconfig binutils-2.15.90.0.1/ltconfig +--- binutils-2.15.90.0.1-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.15.90.0.1/ltconfig 2004-08-06 17:39:55.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.90.0.1-dist/opcodes/configure binutils-2.15.90.0.1/opcodes/configure +--- binutils-2.15.90.0.1-dist/opcodes/configure 2004-01-14 15:07:54.000000000 -0600 ++++ binutils-2.15.90.0.1/opcodes/configure 2004-08-06 17:39:55.000000000 -0500 +@@ -1689,6 +1689,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 --git a/toolchain/binutils/2.15.90.0.1/600-arm-textrel.patch b/toolchain/binutils/2.15.90.0.1/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.90.0.1/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.90.0.2/100-uclibc-conf.patch b/toolchain/binutils/2.15.90.0.2/100-uclibc-conf.patch new file mode 100644 index 0000000000..28c5017ed2 --- /dev/null +++ b/toolchain/binutils/2.15.90.0.2/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +diff -urN binutils-2.15.90.0.3-dist/bfd/config.bfd binutils-2.15.90.0.3/bfd/config.bfd +--- binutils-2.15.90.0.3-dist/bfd/config.bfd 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/config.bfd 2004-08-06 17:02:17.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.90.0.3-dist/bfd/configure binutils-2.15.90.0.3/bfd/configure +--- binutils-2.15.90.0.3-dist/bfd/configure 2004-04-14 23:26:05.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/configure 2004-08-06 17:02:17.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.90.0.3-dist/bfd/configure.in binutils-2.15.90.0.3/bfd/configure.in +--- binutils-2.15.90.0.3-dist/bfd/configure.in 2004-04-14 23:26:05.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/configure.in 2004-08-06 17:02:17.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.90.0.3-dist/binutils/configure binutils-2.15.90.0.3/binutils/configure +--- binutils-2.15.90.0.3-dist/binutils/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/binutils/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1575,6 +1575,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.90.0.3-dist/configure binutils-2.15.90.0.3/configure +--- binutils-2.15.90.0.3-dist/configure 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1298,6 +1298,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.90.0.3-dist/configure.in binutils-2.15.90.0.3/configure.in +--- binutils-2.15.90.0.3-dist/configure.in 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/configure.in 2004-08-06 17:02:17.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.90.0.3-dist/gas/configure binutils-2.15.90.0.3/gas/configure +--- binutils-2.15.90.0.3-dist/gas/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/configure 2004-08-06 17:04:29.000000000 -0500 +@@ -3401,6 +3401,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]+$' +@@ -4226,6 +4231,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 ;; + +@@ -4242,6 +4248,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 ;; +@@ -4255,6 +4262,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 ;; +@@ -4311,7 +4319,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 ;; +@@ -4371,6 +4381,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 ;; + +@@ -4398,6 +4409,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 ;; +@@ -4460,6 +4472,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) ;; +@@ -4487,7 +4500,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 +@@ -4520,6 +4535,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.90.0.3-dist/gas/configure.in binutils-2.15.90.0.3/gas/configure.in +--- binutils-2.15.90.0.3-dist/gas/configure.in 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/configure.in 2004-08-06 17:04:27.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 ;; +@@ -279,7 +282,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 ;; +@@ -332,6 +337,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 ;; + +@@ -359,6 +365,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 ;; +@@ -418,6 +425,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) ;; +@@ -438,7 +446,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 +@@ -471,6 +481,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.90.0.3-dist/gprof/configure binutils-2.15.90.0.3/gprof/configure +--- binutils-2.15.90.0.3-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.15.90.0.3/gprof/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1570,6 +1570,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.90.0.3-dist/ld/configure binutils-2.15.90.0.3/ld/configure +--- binutils-2.15.90.0.3-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.15.90.0.3/ld/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1578,6 +1578,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.90.0.3-dist/ld/configure.tgt binutils-2.15.90.0.3/ld/configure.tgt +--- binutils-2.15.90.0.3-dist/ld/configure.tgt 2004-04-12 14:56:35.000000000 -0500 ++++ binutils-2.15.90.0.3/ld/configure.tgt 2004-08-06 17:02:17.000000000 -0500 +@@ -31,6 +31,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 ;; +@@ -60,14 +61,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 +@@ -119,7 +122,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 +@@ -129,7 +134,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 ;; +@@ -153,14 +158,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/'` +@@ -260,10 +267,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 ;; +@@ -365,7 +375,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/'` + ;; +@@ -382,9 +393,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 ;; +@@ -397,6 +408,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 ;; +@@ -430,16 +442,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 ;; +@@ -462,6 +474,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.90.0.3-dist/libtool.m4 binutils-2.15.90.0.3/libtool.m4 +--- binutils-2.15.90.0.3-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.15.90.0.3/libtool.m4 2004-08-06 17:02:17.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.90.0.3-dist/ltconfig binutils-2.15.90.0.3/ltconfig +--- binutils-2.15.90.0.3-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.15.90.0.3/ltconfig 2004-08-06 17:02:17.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.90.0.3-dist/opcodes/configure binutils-2.15.90.0.3/opcodes/configure +--- binutils-2.15.90.0.3-dist/opcodes/configure 2004-04-12 14:56:38.000000000 -0500 ++++ binutils-2.15.90.0.3/opcodes/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1690,6 +1690,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 --git a/toolchain/binutils/2.15.90.0.2/600-arm-textrel.patch b/toolchain/binutils/2.15.90.0.2/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.90.0.2/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.90.0.3/100-uclibc-conf.patch b/toolchain/binutils/2.15.90.0.3/100-uclibc-conf.patch new file mode 100644 index 0000000000..28c5017ed2 --- /dev/null +++ b/toolchain/binutils/2.15.90.0.3/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +diff -urN binutils-2.15.90.0.3-dist/bfd/config.bfd binutils-2.15.90.0.3/bfd/config.bfd +--- binutils-2.15.90.0.3-dist/bfd/config.bfd 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/config.bfd 2004-08-06 17:02:17.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.90.0.3-dist/bfd/configure binutils-2.15.90.0.3/bfd/configure +--- binutils-2.15.90.0.3-dist/bfd/configure 2004-04-14 23:26:05.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/configure 2004-08-06 17:02:17.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.90.0.3-dist/bfd/configure.in binutils-2.15.90.0.3/bfd/configure.in +--- binutils-2.15.90.0.3-dist/bfd/configure.in 2004-04-14 23:26:05.000000000 -0500 ++++ binutils-2.15.90.0.3/bfd/configure.in 2004-08-06 17:02:17.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.90.0.3-dist/binutils/configure binutils-2.15.90.0.3/binutils/configure +--- binutils-2.15.90.0.3-dist/binutils/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/binutils/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1575,6 +1575,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.90.0.3-dist/configure binutils-2.15.90.0.3/configure +--- binutils-2.15.90.0.3-dist/configure 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1298,6 +1298,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.90.0.3-dist/configure.in binutils-2.15.90.0.3/configure.in +--- binutils-2.15.90.0.3-dist/configure.in 2004-04-12 14:56:33.000000000 -0500 ++++ binutils-2.15.90.0.3/configure.in 2004-08-06 17:02:17.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.90.0.3-dist/gas/configure binutils-2.15.90.0.3/gas/configure +--- binutils-2.15.90.0.3-dist/gas/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/configure 2004-08-06 17:04:29.000000000 -0500 +@@ -3401,6 +3401,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]+$' +@@ -4226,6 +4231,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 ;; + +@@ -4242,6 +4248,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 ;; +@@ -4255,6 +4262,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 ;; +@@ -4311,7 +4319,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 ;; +@@ -4371,6 +4381,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 ;; + +@@ -4398,6 +4409,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 ;; +@@ -4460,6 +4472,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) ;; +@@ -4487,7 +4500,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 +@@ -4520,6 +4535,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.90.0.3-dist/gas/configure.in binutils-2.15.90.0.3/gas/configure.in +--- binutils-2.15.90.0.3-dist/gas/configure.in 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/configure.in 2004-08-06 17:04:27.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 ;; +@@ -279,7 +282,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 ;; +@@ -332,6 +337,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 ;; + +@@ -359,6 +365,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 ;; +@@ -418,6 +425,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) ;; +@@ -438,7 +446,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 +@@ -471,6 +481,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.90.0.3-dist/gprof/configure binutils-2.15.90.0.3/gprof/configure +--- binutils-2.15.90.0.3-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.15.90.0.3/gprof/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1570,6 +1570,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.90.0.3-dist/ld/configure binutils-2.15.90.0.3/ld/configure +--- binutils-2.15.90.0.3-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.15.90.0.3/ld/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1578,6 +1578,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.90.0.3-dist/ld/configure.tgt binutils-2.15.90.0.3/ld/configure.tgt +--- binutils-2.15.90.0.3-dist/ld/configure.tgt 2004-04-12 14:56:35.000000000 -0500 ++++ binutils-2.15.90.0.3/ld/configure.tgt 2004-08-06 17:02:17.000000000 -0500 +@@ -31,6 +31,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 ;; +@@ -60,14 +61,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 +@@ -119,7 +122,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 +@@ -129,7 +134,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 ;; +@@ -153,14 +158,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/'` +@@ -260,10 +267,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 ;; +@@ -365,7 +375,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/'` + ;; +@@ -382,9 +393,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 ;; +@@ -397,6 +408,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 ;; +@@ -430,16 +442,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 ;; +@@ -462,6 +474,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.90.0.3-dist/libtool.m4 binutils-2.15.90.0.3/libtool.m4 +--- binutils-2.15.90.0.3-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.15.90.0.3/libtool.m4 2004-08-06 17:02:17.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.90.0.3-dist/ltconfig binutils-2.15.90.0.3/ltconfig +--- binutils-2.15.90.0.3-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.15.90.0.3/ltconfig 2004-08-06 17:02:17.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.90.0.3-dist/opcodes/configure binutils-2.15.90.0.3/opcodes/configure +--- binutils-2.15.90.0.3-dist/opcodes/configure 2004-04-12 14:56:38.000000000 -0500 ++++ binutils-2.15.90.0.3/opcodes/configure 2004-08-06 17:02:17.000000000 -0500 +@@ -1690,6 +1690,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 --git a/toolchain/binutils/2.15.90.0.3/210-cflags.patch b/toolchain/binutils/2.15.90.0.3/210-cflags.patch new file mode 100644 index 0000000000..29bb5c18db --- /dev/null +++ b/toolchain/binutils/2.15.90.0.3/210-cflags.patch @@ -0,0 +1,32 @@ +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 +@@ -472,10 +472,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 + diff --git a/toolchain/binutils/2.15.90.0.3/500-branch-likely.patch b/toolchain/binutils/2.15.90.0.3/500-branch-likely.patch new file mode 100644 index 0000000000..0bb1a4b4f6 --- /dev/null +++ b/toolchain/binutils/2.15.90.0.3/500-branch-likely.patch @@ -0,0 +1,10 @@ +--- binutils-2.15.90.0.3/gas/config/tc-mips.c-dist 2004-08-19 12:56:20.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/config/tc-mips.c 2004-08-19 12:57:30.000000000 -0500 +@@ -2708,6 +2708,7 @@ + prev_insn_reloc_type[1] = BFD_RELOC_UNUSED; + prev_insn_reloc_type[2] = BFD_RELOC_UNUSED; + prev_insn_extended = 0; ++ prev_insn_is_delay_slot = 1; + } + else + { diff --git a/toolchain/binutils/2.15.90.0.3/600-arm-textrel.patch b/toolchain/binutils/2.15.90.0.3/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.90.0.3/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.91.0.1/100-uclibc-conf.patch b/toolchain/binutils/2.15.91.0.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..57b86abca1 --- /dev/null +++ b/toolchain/binutils/2.15.91.0.1/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +diff -urN binutils-2.15.91.0.1-dist/bfd/config.bfd binutils-2.15.91.0.1/bfd/config.bfd +--- binutils-2.15.91.0.1-dist/bfd/config.bfd 2004-05-27 13:26:01.000000000 -0500 ++++ binutils-2.15.91.0.1/bfd/config.bfd 2004-07-16 14:57:21.000000000 -0500 +@@ -128,7 +128,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 + ;; +@@ -138,7 +138,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" + ;; +@@ -215,7 +215,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 + ;; +@@ -223,7 +223,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 +@@ -367,7 +367,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 + ;; +@@ -378,7 +378,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 + ;; +@@ -501,7 +501,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 +@@ -515,7 +515,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" + ;; +@@ -690,7 +690,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 + ;; +@@ -966,7 +966,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" +@@ -1003,8 +1004,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" +@@ -1165,7 +1166,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" + ;; +@@ -1212,7 +1213,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" + ;; +@@ -1281,7 +1282,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -urN binutils-2.15.91.0.1-dist/bfd/configure binutils-2.15.91.0.1/bfd/configure +--- binutils-2.15.91.0.1-dist/bfd/configure 2004-05-27 13:26:02.000000000 -0500 ++++ binutils-2.15.91.0.1/bfd/configure 2004-07-16 14:57:21.000000000 -0500 +@@ -1687,6 +1687,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]+$' +@@ -5266,7 +5271,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"' + ;; +@@ -5326,7 +5331,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"' + ;; +@@ -5364,7 +5369,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"' + ;; +@@ -5468,7 +5473,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.91.0.1-dist/bfd/configure.in binutils-2.15.91.0.1/bfd/configure.in +--- binutils-2.15.91.0.1-dist/bfd/configure.in 2004-05-27 13:26:02.000000000 -0500 ++++ binutils-2.15.91.0.1/bfd/configure.in 2004-07-16 14:57:21.000000000 -0500 +@@ -164,7 +164,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"' + ;; +@@ -245,7 +245,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"' +@@ -286,7 +286,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"' + ;; +@@ -374,7 +374,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.91.0.1-dist/binutils/configure binutils-2.15.91.0.1/binutils/configure +--- binutils-2.15.91.0.1-dist/binutils/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.91.0.1/binutils/configure 2004-07-27 21:50:54.000000000 -0500 +@@ -1575,6 +1575,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.91.0.1-dist/configure binutils-2.15.91.0.1/configure +--- binutils-2.15.91.0.1-dist/configure 2004-05-27 13:26:01.000000000 -0500 ++++ binutils-2.15.91.0.1/configure 2004-07-16 14:57:21.000000000 -0500 +@@ -1365,6 +1365,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.91.0.1-dist/configure.in binutils-2.15.91.0.1/configure.in +--- binutils-2.15.91.0.1-dist/configure.in 2004-05-27 13:26:01.000000000 -0500 ++++ binutils-2.15.91.0.1/configure.in 2004-07-16 14:57:21.000000000 -0500 +@@ -551,6 +551,18 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.91.0.1-dist/gas/configure binutils-2.15.91.0.1/gas/configure +--- binutils-2.15.91.0.1-dist/gas/configure 2004-05-27 13:26:03.000000000 -0500 ++++ binutils-2.15.91.0.1/gas/configure 2004-07-16 14:57:21.000000000 -0500 +@@ -3408,6 +3408,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]+$' +@@ -4233,6 +4238,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 ;; + +@@ -4249,6 +4255,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 ;; +@@ -4262,6 +4269,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 ;; +@@ -4319,7 +4327,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=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4379,6 +4389,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 ;; + +@@ -4406,6 +4417,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 ;; +@@ -4468,6 +4480,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) ;; +@@ -4496,7 +4509,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -4529,6 +4544,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.91.0.1-dist/gas/configure.in binutils-2.15.91.0.1/gas/configure.in +--- binutils-2.15.91.0.1-dist/gas/configure.in 2004-05-27 13:26:03.000000000 -0500 ++++ binutils-2.15.91.0.1/gas/configure.in 2004-07-16 14:57: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=elf em=lynx bfd_gas=yes ;; + 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) ;; +@@ -440,7 +448,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -473,6 +483,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.91.0.1-dist/gprof/configure binutils-2.15.91.0.1/gprof/configure +--- binutils-2.15.91.0.1-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 ++++ binutils-2.15.91.0.1/gprof/configure 2004-07-27 21:53:11.000000000 -0500 +@@ -1570,6 +1570,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.91.0.1-dist/ld/configure binutils-2.15.91.0.1/ld/configure +--- binutils-2.15.91.0.1-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 ++++ binutils-2.15.91.0.1/ld/configure 2004-07-16 14:57:21.000000000 -0500 +@@ -1578,6 +1578,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.91.0.1-dist/ld/configure.tgt binutils-2.15.91.0.1/ld/configure.tgt +--- binutils-2.15.91.0.1-dist/ld/configure.tgt 2004-05-27 13:26:04.000000000 -0500 ++++ binutils-2.15.91.0.1/ld/configure.tgt 2004-07-16 14:57:21.000000000 -0500 +@@ -31,6 +31,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 ;; +@@ -60,14 +61,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 +@@ -119,7 +122,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 +@@ -129,7 +134,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 ;; +@@ -153,14 +158,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/'` +@@ -260,10 +267,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 ;; +@@ -365,7 +375,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/'` + ;; +@@ -382,9 +393,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 ;; +@@ -397,6 +408,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 ;; +@@ -430,16 +442,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 ;; +@@ -462,6 +474,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.91.0.1-dist/libtool.m4 binutils-2.15.91.0.1/libtool.m4 +--- binutils-2.15.91.0.1-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 ++++ binutils-2.15.91.0.1/libtool.m4 2004-07-16 14:57:21.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.91.0.1-dist/ltconfig binutils-2.15.91.0.1/ltconfig +--- binutils-2.15.91.0.1-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 ++++ binutils-2.15.91.0.1/ltconfig 2004-07-16 14:57:21.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.91.0.1-dist/opcodes/configure binutils-2.15.91.0.1/opcodes/configure +--- binutils-2.15.91.0.1-dist/opcodes/configure 2004-04-12 14:56:38.000000000 -0500 ++++ binutils-2.15.91.0.1/opcodes/configure 2004-07-27 21:55:25.000000000 -0500 +@@ -1690,6 +1690,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 --git a/toolchain/binutils/2.15.91.0.1/600-arm-textrel.patch b/toolchain/binutils/2.15.91.0.1/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.91.0.1/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.91.0.2/100-uclibc-conf.patch b/toolchain/binutils/2.15.91.0.2/100-uclibc-conf.patch new file mode 100644 index 0000000000..911bef4ff1 --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/100-uclibc-conf.patch @@ -0,0 +1,722 @@ +diff -urN binutils-2.15.91.0.2-dist/bfd/config.bfd binutils-2.15.91.0.2/bfd/config.bfd +--- binutils-2.15.91.0.2-dist/bfd/config.bfd 2004-07-27 23:36:07.000000000 -0500 ++++ binutils-2.15.91.0.2/bfd/config.bfd 2004-09-28 14:33:13.000000000 -0500 +@@ -129,7 +129,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 + ;; +@@ -139,7 +139,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" + ;; +@@ -216,7 +216,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 + ;; +@@ -224,7 +224,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 +@@ -373,7 +373,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 + ;; +@@ -384,7 +384,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 + ;; +@@ -507,7 +507,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 +@@ -521,7 +521,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" + ;; +@@ -696,7 +696,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 + ;; +@@ -972,7 +972,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" +@@ -1009,8 +1010,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" +@@ -1177,7 +1178,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" + ;; +@@ -1224,7 +1225,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" + ;; +@@ -1293,7 +1294,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -urN binutils-2.15.91.0.2-dist/bfd/configure binutils-2.15.91.0.2/bfd/configure +--- binutils-2.15.91.0.2-dist/bfd/configure 2004-07-27 23:36:07.000000000 -0500 ++++ binutils-2.15.91.0.2/bfd/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -1687,6 +1687,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]+$' +@@ -5266,7 +5271,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"' + ;; +@@ -5330,7 +5335,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"' + ;; +@@ -5368,7 +5373,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"' + ;; +@@ -5472,7 +5477,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.91.0.2-dist/bfd/configure.in binutils-2.15.91.0.2/bfd/configure.in +--- binutils-2.15.91.0.2-dist/bfd/configure.in 2004-07-27 23:36:07.000000000 -0500 ++++ binutils-2.15.91.0.2/bfd/configure.in 2004-09-28 14:33:13.000000000 -0500 +@@ -164,7 +164,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"' + ;; +@@ -249,7 +249,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"' +@@ -290,7 +290,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"' + ;; +@@ -378,7 +378,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.91.0.2-dist/binutils/configure binutils-2.15.91.0.2/binutils/configure +--- binutils-2.15.91.0.2-dist/binutils/configure 2004-04-12 14:56:34.000000000 -0500 ++++ binutils-2.15.91.0.2/binutils/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -1575,6 +1575,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.91.0.2-dist/configure binutils-2.15.91.0.2/configure +--- binutils-2.15.91.0.2-dist/configure 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.91.0.2/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -1349,6 +1349,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.91.0.2-dist/configure.in binutils-2.15.91.0.2/configure.in +--- binutils-2.15.91.0.2-dist/configure.in 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.91.0.2/configure.in 2004-09-28 14:33:13.000000000 -0500 +@@ -569,6 +569,18 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.91.0.2-dist/gas/configure binutils-2.15.91.0.2/gas/configure +--- binutils-2.15.91.0.2-dist/gas/configure 2004-07-27 23:36:09.000000000 -0500 ++++ binutils-2.15.91.0.2/gas/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -3408,6 +3408,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]+$' +@@ -4234,6 +4239,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 ;; + +@@ -4250,6 +4256,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 ;; +@@ -4263,6 +4270,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 ;; + + crx-*-elf*) fmt=elf ;; +@@ -4322,7 +4330,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=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4382,6 +4392,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 ;; + +@@ -4409,6 +4420,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 ;; +@@ -4471,6 +4483,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) ;; +@@ -4498,7 +4511,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -4538,6 +4553,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.91.0.2-dist/gas/configure.in binutils-2.15.91.0.2/gas/configure.in +--- binutils-2.15.91.0.2-dist/gas/configure.in 2004-07-27 23:36:09.000000000 -0500 ++++ binutils-2.15.91.0.2/gas/configure.in 2004-09-28 14:33:13.000000000 -0500 +@@ -195,6 +195,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 ;; + +@@ -211,6 +212,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 ;; +@@ -224,6 +226,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 ;; + + crx-*-elf*) fmt=elf ;; +@@ -283,7 +286,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=elf em=lynx bfd_gas=yes ;; + changequote(,)dnl + i386-*-sysv[45]*) fmt=elf ;; +@@ -336,6 +341,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 ;; + +@@ -363,6 +369,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 ;; +@@ -422,6 +429,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) ;; +@@ -442,7 +450,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -478,6 +488,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.91.0.2-dist/gprof/configure binutils-2.15.91.0.2/gprof/configure +--- binutils-2.15.91.0.2-dist/gprof/configure 2004-07-27 23:36:10.000000000 -0500 ++++ binutils-2.15.91.0.2/gprof/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -3401,6 +3401,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.91.0.2-dist/ld/configure binutils-2.15.91.0.2/ld/configure +--- binutils-2.15.91.0.2-dist/ld/configure 2004-07-27 23:36:11.000000000 -0500 ++++ binutils-2.15.91.0.2/ld/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -1578,6 +1578,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.91.0.2-dist/ld/configure.tgt binutils-2.15.91.0.2/ld/configure.tgt +--- binutils-2.15.91.0.2-dist/ld/configure.tgt 2004-07-27 23:36:11.000000000 -0500 ++++ binutils-2.15.91.0.2/ld/configure.tgt 2004-09-28 14:33:13.000000000 -0500 +@@ -31,6 +31,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 ;; +@@ -61,14 +62,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 +@@ -120,7 +123,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 +@@ -130,7 +135,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 ;; +@@ -154,14 +159,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/'` +@@ -261,10 +268,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 ;; +@@ -369,7 +379,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/'` + ;; +@@ -386,9 +397,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 ;; +@@ -401,6 +412,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 ;; +@@ -434,16 +446,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 ;; +@@ -466,6 +478,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.91.0.2-dist/ld/emultempl/elf32.em binutils-2.15.91.0.2/ld/emultempl/elf32.em +--- binutils-2.15.91.0.2-dist/ld/emultempl/elf32.em 2004-07-27 23:36:11.000000000 -0500 ++++ binutils-2.15.91.0.2/ld/emultempl/elf32.em 2004-09-28 14:33:54.000000000 -0500 +@@ -327,7 +327,7 @@ + + EOF + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <name, force)) + break; +diff -urN binutils-2.15.91.0.2-dist/libtool.m4 binutils-2.15.91.0.2/libtool.m4 +--- binutils-2.15.91.0.2-dist/libtool.m4 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.91.0.2/libtool.m4 2004-09-28 14:33:13.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* | 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]+$'] +diff -urN binutils-2.15.91.0.2-dist/ltconfig binutils-2.15.91.0.2/ltconfig +--- binutils-2.15.91.0.2-dist/ltconfig 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.91.0.2/ltconfig 2004-09-28 14:33:13.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 + +@@ -1270,6 +1271,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.91.0.2-dist/opcodes/configure binutils-2.15.91.0.2/opcodes/configure +--- binutils-2.15.91.0.2-dist/opcodes/configure 2004-07-27 23:36:11.000000000 -0500 ++++ binutils-2.15.91.0.2/opcodes/configure 2004-09-28 14:33:13.000000000 -0500 +@@ -1690,6 +1690,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 --git a/toolchain/binutils/2.15.91.0.2/500-branch-likely.patch b/toolchain/binutils/2.15.91.0.2/500-branch-likely.patch new file mode 100644 index 0000000000..0bb1a4b4f6 --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/500-branch-likely.patch @@ -0,0 +1,10 @@ +--- binutils-2.15.90.0.3/gas/config/tc-mips.c-dist 2004-08-19 12:56:20.000000000 -0500 ++++ binutils-2.15.90.0.3/gas/config/tc-mips.c 2004-08-19 12:57:30.000000000 -0500 +@@ -2708,6 +2708,7 @@ + prev_insn_reloc_type[1] = BFD_RELOC_UNUSED; + prev_insn_reloc_type[2] = BFD_RELOC_UNUSED; + prev_insn_extended = 0; ++ prev_insn_is_delay_slot = 1; + } + else + { diff --git a/toolchain/binutils/2.15.91.0.2/600-arm-textrel.patch b/toolchain/binutils/2.15.91.0.2/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch b/toolchain/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch new file mode 100644 index 0000000000..97fa6eed60 --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch @@ -0,0 +1,118 @@ +From http://sources.redhat.com/ml/binutils/2004-08/msg00190.html + +Date: Tue, 17 Aug 2004 12:04:29 +0200 +From: Jakub Jelinek +To: binutils at sources dot redhat dot com +Subject: [PATCH] Fix `defined in discarded section' errors when building ia64 gcc +Message-ID: <20040817100429.GL30497@sunsite.ms.mff.cuni.cz> +Reply-To: Jakub Jelinek +References: <20040817090201.GK30497@sunsite.ms.mff.cuni.cz> +In-Reply-To: <20040817090201 dot GK30497 at sunsite dot ms dot mff dot cuni dot cz> + +On Tue, Aug 17, 2004 at 11:02:01AM +0200, Jakub Jelinek wrote: +> Current gcc 3.4.x (at least gcc-3_4-rhl-branch) doesn't build with CVS +> binutils (nor 2.15.91.0.2). +> The problem is that libstdc++.so linking fails with: +> `.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.gnu.linkonce.ia64unw._ZNSdD2Ev' of .libs/sstream-inst.o: defined in discarded section `.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o +> The problem is that both io-inst.s and sstream-inst.s have +> .gnu.linkonce.t._ZNSdD2Ev definition, but because io-inst.cc +> also instantiates some templates sstream-inst.cc doesn't instantiate, +> the inliner can do a better job in io-inst.cc. +> The result is that _ZNSdD2Ev in io-inst.cc is a leaf routine, while +> it is not in sstream-inst.cc (in assembly, +> _ZNSdD2Ev in io-inst.s starts with .prologue and no .save directives, +> while _ZNSdD2Ev] in sstream-inst.s has .prologue 12, 35 and some +> .save directives. +> IA-64 ABI allows leaf routines to have no unwind section at all, +> which means .gnu.linkonce.ia64unw._ZNSdD2Ev is not created in +> io-inst.o at all and as .gnu.linkonce.t._ZNSdD2Ev comes first +> and wins, .gnu.linkonce.ia64unw._ZNSdD2Ev in sstream.o suddenly +> references a discarded section. +> +> Not sure what should be done here, but certainly the compiler +> isn't at fault here, it is a binutils problem. +> One fix could be to create empty .gnu.linkonce.ia64unw.* section +> in assembler, another special case ia64 unwind sections in the linker. + +Here is a patch for the first possibility. +It certainly makes libstdc++.so to link and even the unwind info looks +good on brief skimming. + +2004-08-17 Jakub Jelinek + + * config/tc-ia64.c (start_unwind_section): Add linkonce_empty + argument, don't do anything if current section is not + .gnu.linkonce.t.* and linkonce_empty is set. + (generate_unwind_image, dot_endp): Adjust callers, call + start_unwind_section (*, 1) if nothing will be put into the + section. + +--- binutils/gas/config/tc-ia64.c.jj 2004-07-30 11:42:24.000000000 +0200 ++++ binutils/gas/config/tc-ia64.c 2004-08-17 13:45:04.288173205 +0200 +@@ -1,5 +1,6 @@ + /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture. +- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. ++ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++ Free Software Foundation, Inc. + Contributed by David Mosberger-Tang + + This file is part of GAS, the GNU Assembler. +@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] = + }; + + static void +-start_unwind_section (const segT text_seg, int sec_index) ++start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty) + { + /* + Use a slightly ugly scheme to derive the unwind section names from +@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_se + prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND]; + suffix += sizeof (".gnu.linkonce.t.") - 1; + } ++ else if (linkonce_empty) ++ return; + + prefix_len = strlen (prefix); + suffix_len = strlen (suffix); +@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_s + expressionS exp; + bfd_reloc_code_real_type reloc; + +- start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO); ++ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0); + + /* Make sure the section has 4 byte alignment for ILP32 and + 8 byte alignment for LP64. */ +@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_s + unwind.personality_routine = 0; + } + } ++ else ++ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1); + + free_saved_prologue_counts (); + unwind.list = unwind.tail = unwind.current_entry = NULL; +@@ -4164,7 +4169,7 @@ dot_endp (dummy) + subseg_set (md.last_text_seg, 0); + unwind.proc_end = expr_build_dot (); + +- start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND); ++ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0); + + /* Make sure that section has 4 byte alignment for ILP32 and + 8 byte alignment for LP64. */ +@@ -4204,6 +4209,9 @@ dot_endp (dummy) + bytes_per_address); + + } ++ else ++ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1); ++ + subseg_set (saved_seg, saved_subseg); + + /* Parse names of main and alternate entry points and set symbol sizes. */ + + + Jakub + diff --git a/toolchain/binutils/2.15.91.0.2/701-binutils-dup-sections.patch b/toolchain/binutils/2.15.91.0.2/701-binutils-dup-sections.patch new file mode 100644 index 0000000000..4e4934d8cf --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/701-binutils-dup-sections.patch @@ -0,0 +1,68 @@ +See http://sources.redhat.com/ml/binutils/2004-08/msg00256.html + +Date: Fri, 20 Aug 2004 21:13:43 -0400 +From: Daniel Jacobowitz +To: binutils at sources dot redhat dot com +Subject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linux +Message-ID: <20040821011342.GA30319@nevyn.them.org> +Mail-Followup-To: binutils at sources dot redhat dot com +References: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org> +In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org> + +On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote: +> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote: +> > Thanks. How's this? +> +> As you might have guessed from my rather slack review of your previous +> patch, I trust you enough to give the OK without proper review. But +> since you asked... :) + +Checked in as so. + +-- +Daniel Jacobowitz + +[ rediffed against binutils-2.15.91.0.2, with some elbow grease ] + +2004-08-20 Daniel Jacobowitz + + * elflink.c (_bfd_elf_section_already_linked): Handle + SEC_LINK_DUPLICATES_SAME_CONTENTS. +--- binutils-2.15.91.0.2/bfd/elflink.c.old 2004-07-27 21:36:08.000000000 -0700 ++++ binutils-2.15.91.0.2/bfd/elflink.c 2004-08-26 06:38:07.000000000 -0700 +@@ -9359,6 +9359,35 @@ + (_("%s: %s: warning: duplicate section `%s' has different size\n"), + bfd_archive_filename (abfd), name); + break; ++ case SEC_LINK_DUPLICATES_SAME_CONTENTS: ++ if (sec->size != l->sec->size) ++ (*_bfd_error_handler) ++ (_("%B: duplicate section `%A' has different size\n"), ++ bfd_archive_filename (abfd), sec); ++ else if (sec->size != 0) ++ { ++ bfd_byte *sec_contents, *l_sec_contents; ++ ++ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents)) ++ (*_bfd_error_handler) ++ (_("%B: warning: could not read contents of section `%A'\n"), ++ bfd_archive_filename (abfd), sec); ++ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec, ++ &l_sec_contents)) ++ (*_bfd_error_handler) ++ (_("%B: warning: could not read contents of section `%A'\n"), ++ bfd_archive_filename(l->sec->owner), l->sec); ++ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0) ++ (*_bfd_error_handler) ++ (_("%B: warning: duplicate section `%A' has different contents\n"), ++ bfd_archive_filename (abfd), sec); ++ ++ if (sec_contents) ++ free (sec_contents); ++ if (l_sec_contents) ++ free (l_sec_contents); ++ } ++ break; + } + + /* Set the output_section field so that lang_add_section diff --git a/toolchain/binutils/2.15.91.0.2/702-binutils-skip-comments.patch b/toolchain/binutils/2.15.91.0.2/702-binutils-skip-comments.patch new file mode 100644 index 0000000000..804a17e006 --- /dev/null +++ b/toolchain/binutils/2.15.91.0.2/702-binutils-skip-comments.patch @@ -0,0 +1,101 @@ +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 +To: Nathan Sidwell +Cc: Ian Lance Taylor , 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 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 + + * 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Ãe 5, 90409 NÃrnberg, Germany +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 +"And now for something completely different." diff --git a/toolchain/binutils/2.15.92.0.2/100-uclibc-conf.patch b/toolchain/binutils/2.15.92.0.2/100-uclibc-conf.patch new file mode 100644 index 0000000000..7fcbd6227a --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/100-uclibc-conf.patch @@ -0,0 +1,724 @@ +diff -urN binutils-2.15.92.0.2-dist/bfd/config.bfd binutils-2.15.92.0.2/bfd/config.bfd +--- binutils-2.15.92.0.2-dist/bfd/config.bfd 2004-09-15 14:05:02.000000000 -0500 ++++ binutils-2.15.92.0.2/bfd/config.bfd 2004-09-28 14:11:57.000000000 -0500 +@@ -129,7 +129,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 + ;; +@@ -139,7 +139,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" + ;; +@@ -216,7 +216,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 + ;; +@@ -224,8 +224,8 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ +- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ ++ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ + arm*-*-eabi* ) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec +@@ -378,7 +378,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 + ;; +@@ -389,7 +389,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu*) ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -516,7 +516,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 +@@ -530,7 +530,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" + ;; +@@ -705,7 +705,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 + ;; +@@ -981,7 +981,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" +@@ -1018,8 +1019,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" +@@ -1186,7 +1187,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" + ;; +@@ -1233,7 +1234,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" + ;; +@@ -1302,7 +1303,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -urN binutils-2.15.92.0.2-dist/bfd/configure binutils-2.15.92.0.2/bfd/configure +--- binutils-2.15.92.0.2-dist/bfd/configure 2004-09-27 15:46:06.000000000 -0500 ++++ binutils-2.15.92.0.2/bfd/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -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]+$' +@@ -9914,7 +9919,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"' + ;; +@@ -9978,7 +9983,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"' + ;; +@@ -10016,7 +10021,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"' + ;; +@@ -10150,7 +10155,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.92.0.2-dist/bfd/configure.in binutils-2.15.92.0.2/bfd/configure.in +--- binutils-2.15.92.0.2-dist/bfd/configure.in 2004-09-27 15:46:06.000000000 -0500 ++++ binutils-2.15.92.0.2/bfd/configure.in 2004-09-28 14:09:03.000000000 -0500 +@@ -163,7 +163,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"' + ;; +@@ -248,7 +248,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"' +@@ -289,7 +289,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"' + ;; +@@ -375,7 +375,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.92.0.2-dist/binutils/configure binutils-2.15.92.0.2/binutils/configure +--- binutils-2.15.92.0.2-dist/binutils/configure 2004-09-15 14:05:03.000000000 -0500 ++++ binutils-2.15.92.0.2/binutils/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -1575,6 +1575,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]+$' +diff -urN binutils-2.15.92.0.2-dist/configure binutils-2.15.92.0.2/configure +--- binutils-2.15.92.0.2-dist/configure 2004-09-27 15:46:06.000000000 -0500 ++++ binutils-2.15.92.0.2/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -1334,6 +1334,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.92.0.2-dist/configure.in binutils-2.15.92.0.2/configure.in +--- binutils-2.15.92.0.2-dist/configure.in 2004-09-27 15:46:06.000000000 -0500 ++++ binutils-2.15.92.0.2/configure.in 2004-09-28 14:09:03.000000000 -0500 +@@ -556,6 +556,18 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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.92.0.2-dist/gas/configure binutils-2.15.92.0.2/gas/configure +--- binutils-2.15.92.0.2-dist/gas/configure 2004-09-27 15:46:07.000000000 -0500 ++++ binutils-2.15.92.0.2/gas/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -3420,6 +3420,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]+$' +@@ -4248,6 +4253,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 ;; + +@@ -4263,6 +4269,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 ;; +@@ -4276,6 +4283,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 ;; + + crx-*-elf*) fmt=elf ;; +@@ -4335,7 +4343,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=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4395,6 +4405,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 ;; + +@@ -4422,6 +4433,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 ;; +@@ -4494,6 +4506,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) ;; +@@ -4521,7 +4534,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -4556,6 +4571,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.92.0.2-dist/gas/configure.in binutils-2.15.92.0.2/gas/configure.in +--- binutils-2.15.92.0.2-dist/gas/configure.in 2004-09-15 14:05:03.000000000 -0500 ++++ binutils-2.15.92.0.2/gas/configure.in 2004-09-28 14:09:03.000000000 -0500 +@@ -197,6 +197,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 ;; + +@@ -212,6 +213,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 ;; +@@ -225,6 +227,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 ;; + + crx-*-elf*) fmt=elf ;; +@@ -284,7 +287,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=elf em=lynx bfd_gas=yes ;; + changequote(,)dnl + i386-*-sysv[45]*) fmt=elf ;; +@@ -337,6 +342,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 ;; + +@@ -364,6 +370,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 ;; +@@ -433,6 +440,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) ;; +@@ -453,7 +461,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -484,6 +494,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.92.0.2-dist/gprof/configure binutils-2.15.92.0.2/gprof/configure +--- binutils-2.15.92.0.2-dist/gprof/configure 2004-09-27 15:46:07.000000000 -0500 ++++ binutils-2.15.92.0.2/gprof/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -3418,6 +3418,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]+$' +diff -urN binutils-2.15.92.0.2-dist/ld/configure binutils-2.15.92.0.2/ld/configure +--- binutils-2.15.92.0.2-dist/ld/configure 2004-09-27 15:46:07.000000000 -0500 ++++ binutils-2.15.92.0.2/ld/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -1579,6 +1579,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]+$' +diff -urN binutils-2.15.92.0.2-dist/ld/configure.tgt binutils-2.15.92.0.2/ld/configure.tgt +--- binutils-2.15.92.0.2-dist/ld/configure.tgt 2004-09-15 14:05:04.000000000 -0500 ++++ binutils-2.15.92.0.2/ld/configure.tgt 2004-09-28 14:09:03.000000000 -0500 +@@ -31,6 +31,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 ;; +@@ -61,14 +62,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 +@@ -120,7 +123,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 +@@ -130,7 +135,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 ;; +@@ -154,14 +159,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/'` +@@ -262,10 +269,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 ;; +@@ -370,7 +380,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/'` + ;; +@@ -387,9 +398,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 ;; +@@ -402,6 +413,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 ;; +@@ -435,16 +447,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 ;; +@@ -467,6 +479,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.92.0.2-dist/ld/emultempl/elf32.em binutils-2.15.92.0.2/ld/emultempl/elf32.em +--- binutils-2.15.92.0.2-dist/ld/emultempl/elf32.em 2004-07-27 23:36:11.000000000 -0500 ++++ binutils-2.15.92.0.2/ld/emultempl/elf32.em 2004-09-28 14:13:04.000000000 -0500 +@@ -327,7 +327,7 @@ + + EOF + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <name, force)) + break; +diff -urN binutils-2.15.92.0.2-dist/libtool.m4 binutils-2.15.92.0.2/libtool.m4 +--- binutils-2.15.92.0.2-dist/libtool.m4 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.92.0.2/libtool.m4 2004-09-28 14:09:03.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* | 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]+$'] +diff -urN binutils-2.15.92.0.2-dist/ltconfig binutils-2.15.92.0.2/ltconfig +--- binutils-2.15.92.0.2-dist/ltconfig 2004-07-27 23:36:06.000000000 -0500 ++++ binutils-2.15.92.0.2/ltconfig 2004-09-28 14:09:03.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 + +@@ -1270,6 +1271,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.92.0.2-dist/opcodes/configure binutils-2.15.92.0.2/opcodes/configure +--- binutils-2.15.92.0.2-dist/opcodes/configure 2004-09-27 15:46:08.000000000 -0500 ++++ binutils-2.15.92.0.2/opcodes/configure 2004-09-28 14:09:03.000000000 -0500 +@@ -3587,6 +3587,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]+$' diff --git a/toolchain/binutils/2.15.92.0.2/300-001_ld_makefile_patch.patch b/toolchain/binutils/2.15.92.0.2/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..b25d5b7e21 --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/300-001_ld_makefile_patch.patch @@ -0,0 +1,52 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100 +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100 +@@ -128,7 +128,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/toolchain/binutils/2.15.92.0.2/300-006_better_file_error.patch b/toolchain/binutils/2.15.92.0.2/300-006_better_file_error.patch new file mode 100644 index 0000000000..f337611edf --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/300-006_better_file_error.patch @@ -0,0 +1,43 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 ++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/toolchain/binutils/2.15.92.0.2/300-012_check_ldrunpath_length.patch b/toolchain/binutils/2.15.92.0.2/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..498651a90c --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/300-012_check_ldrunpath_length.patch @@ -0,0 +1,47 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 ++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 +@@ -692,6 +692,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -871,6 +873,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, diff --git a/toolchain/binutils/2.15.92.0.2/300-117_mips_symbolic_link.patch b/toolchain/binutils/2.15.92.0.2/300-117_mips_symbolic_link.patch new file mode 100644 index 0000000000..f5a3199168 --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/300-117_mips_symbolic_link.patch @@ -0,0 +1,42 @@ +#! /bin/sh -e +## 117_mips_symbolic_link.dpatch +## +## DP: Description: Handle symbolic multigot links. (#270619) +## DP: Author: Thiemo Seufer +## DP: Upstream status: Not submitted +## DP: Date: 2004-09-08 + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urpN binutils-2.15.orig/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c +--- binutils-2.15.orig/bfd/elfxx-mips.c 2004-05-17 21:36:03.000000000 +0200 ++++ binutils-2.15/bfd/elfxx-mips.c 2004-08-29 08:48:22.000000000 +0200 +@@ -3909,10 +3910,7 @@ mips_elf_create_dynamic_relocation (bfd + /* We must now calculate the dynamic symbol table index to use + in the relocation. */ + if (h != NULL +- && (! info->symbolic || !h->root.def_regular) +- /* h->root.dynindx may be -1 if this symbol was marked to +- become local. */ +- && h->root.dynindx != -1) ++ && (!h->root.def_regular || !h->root.forced_local)) + { + indx = h->root.dynindx; + if (SGI_COMPAT (output_bfd)) diff --git a/toolchain/binutils/2.15.92.0.2/300-120_mips_xgot_multigot_workaround.patch b/toolchain/binutils/2.15.92.0.2/300-120_mips_xgot_multigot_workaround.patch new file mode 100644 index 0000000000..ae2033d069 --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/300-120_mips_xgot_multigot_workaround.patch @@ -0,0 +1,39 @@ +#! /bin/sh -e +## 120_mips_xgot_multigot_workaround.dpatch +## +## DP: Description: Make multigot/xgot handling mutually exclusive. +## DP: Author: Thiemo Seufer +## DP: Upstream status: Not submitted +## DP: Date: 2004-09-17 + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c +--- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100 ++++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100 +@@ -5883,6 +5883,8 @@ + s->size += i * MIPS_ELF_GOT_SIZE (output_bfd); + + if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ / MIPS_ELF_GOT_SIZE (output_bfd)) + && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno)) + return FALSE; + diff --git a/toolchain/binutils/2.15.92.0.2/600-arm-textrel.patch b/toolchain/binutils/2.15.92.0.2/600-arm-textrel.patch new file mode 100644 index 0000000000..d234181608 --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/600-arm-textrel.patch @@ -0,0 +1,54 @@ +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 +@@ -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)) diff --git a/toolchain/binutils/2.15.92.0.2/702-binutils-skip-comments.patch b/toolchain/binutils/2.15.92.0.2/702-binutils-skip-comments.patch new file mode 100644 index 0000000000..804a17e006 --- /dev/null +++ b/toolchain/binutils/2.15.92.0.2/702-binutils-skip-comments.patch @@ -0,0 +1,101 @@ +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 +To: Nathan Sidwell +Cc: Ian Lance Taylor , 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 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 + + * 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Ãe 5, 90409 NÃrnberg, Germany +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 +"And now for something completely different." diff --git a/toolchain/binutils/2.15.94.0.1/100-uclibc-conf.patch b/toolchain/binutils/2.15.94.0.1/100-uclibc-conf.patch new file mode 100644 index 0000000000..dda2b4ffa2 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/100-uclibc-conf.patch @@ -0,0 +1,734 @@ +diff -ur binutils-2.15.94.0.1.orig/bfd/config.bfd binutils-2.15.94.0.1/bfd/config.bfd +--- binutils-2.15.94.0.1.orig/bfd/config.bfd 2004-11-22 21:29:57.791886144 -0500 ++++ binutils-2.15.94.0.1/bfd/config.bfd 2004-11-22 21:30:53.195463520 -0500 +@@ -140,7 +140,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 + ;; +@@ -150,7 +150,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" + ;; +@@ -227,7 +227,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 + ;; +@@ -235,8 +235,8 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ +- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ ++ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ + arm*-*-eabi* ) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec +@@ -381,7 +381,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 + ;; +@@ -392,7 +392,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu*) ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -525,7 +525,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 +@@ -539,7 +539,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" + ;; +@@ -715,7 +715,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 + ;; +@@ -1001,7 +1001,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" +@@ -1038,8 +1039,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" +@@ -1206,7 +1207,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" + ;; +@@ -1253,7 +1254,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" + ;; +@@ -1322,7 +1323,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -ur binutils-2.15.94.0.1.orig/bfd/configure binutils-2.15.94.0.1/bfd/configure +--- binutils-2.15.94.0.1.orig/bfd/configure 2004-11-22 21:29:57.794885688 -0500 ++++ binutils-2.15.94.0.1/bfd/configure 2004-11-22 21:31:10.011907032 -0500 +@@ -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]+$' +@@ -9914,7 +9919,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"' + ;; +@@ -9978,7 +9983,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"' + ;; +@@ -10016,7 +10021,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"' + ;; +@@ -10150,7 +10155,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 -ur binutils-2.15.94.0.1.orig/bfd/configure.in binutils-2.15.94.0.1/bfd/configure.in +--- binutils-2.15.94.0.1.orig/bfd/configure.in 2004-11-22 21:29:57.794885688 -0500 ++++ binutils-2.15.94.0.1/bfd/configure.in 2004-11-22 21:31:23.225898200 -0500 +@@ -163,7 +163,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"' + ;; +@@ -248,7 +248,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"' +@@ -289,7 +289,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"' + ;; +@@ -375,7 +375,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 -ur binutils-2.15.94.0.1.orig/binutils/configure binutils-2.15.94.0.1/binutils/configure +--- binutils-2.15.94.0.1.orig/binutils/configure 2004-11-22 21:29:57.923866080 -0500 ++++ binutils-2.15.94.0.1/binutils/configure 2004-11-22 21:31:47.597193200 -0500 +@@ -1575,6 +1575,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]+$' +diff -ur binutils-2.15.94.0.1.orig/configure binutils-2.15.94.0.1/configure +--- binutils-2.15.94.0.1.orig/configure 2004-11-22 21:29:57.902869272 -0500 ++++ binutils-2.15.94.0.1/configure 2004-11-22 21:31:47.601192592 -0500 +@@ -1341,6 +1341,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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 -ur binutils-2.15.94.0.1.orig/configure.in binutils-2.15.94.0.1/configure.in +--- binutils-2.15.94.0.1.orig/configure.in 2004-11-22 21:29:57.902869272 -0500 ++++ binutils-2.15.94.0.1/configure.in 2004-11-22 21:31:47.606191832 -0500 +@@ -563,6 +563,18 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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 -ur binutils-2.15.94.0.1.orig/gas/configure binutils-2.15.94.0.1/gas/configure +--- binutils-2.15.94.0.1.orig/gas/configure 2004-11-22 21:29:58.078842520 -0500 ++++ binutils-2.15.94.0.1/gas/configure 2004-11-22 21:34:12.759125232 -0500 +@@ -3420,6 +3420,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]+$' +@@ -4256,6 +4261,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 ;; + +@@ -4271,6 +4277,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 ;; +@@ -4284,6 +4291,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -4343,7 +4351,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=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4403,6 +4413,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 ;; + +@@ -4430,6 +4441,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 ;; +@@ -4504,6 +4516,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) ;; +@@ -4531,7 +4544,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -4566,6 +4581,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 -ur binutils-2.15.94.0.1.orig/gas/configure.in binutils-2.15.94.0.1/gas/configure.in +--- binutils-2.15.94.0.1.orig/gas/configure.in 2004-11-22 21:29:58.079842368 -0500 ++++ binutils-2.15.94.0.1/gas/configure.in 2004-11-22 21:34:12.763124624 -0500 +@@ -202,6 +202,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 ;; + +@@ -217,6 +218,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 ;; +@@ -230,6 +232,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -289,7 +292,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=elf em=lynx bfd_gas=yes ;; + changequote(,)dnl + i386-*-sysv[45]*) fmt=elf ;; +@@ -342,6 +347,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 ;; + +@@ -369,6 +375,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 ;; +@@ -440,6 +447,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) ;; +@@ -460,7 +468,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 +@@ -491,6 +501,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 -ur binutils-2.15.94.0.1.orig/gprof/configure binutils-2.15.94.0.1/gprof/configure +--- binutils-2.15.94.0.1.orig/gprof/configure 2004-11-22 21:29:58.628758920 -0500 ++++ binutils-2.15.94.0.1/gprof/configure 2004-11-22 21:34:12.777122496 -0500 +@@ -3418,6 +3418,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]+$' +diff -ur binutils-2.15.94.0.1.orig/ld/configure binutils-2.15.94.0.1/ld/configure +--- binutils-2.15.94.0.1.orig/ld/configure 2004-11-22 21:29:58.752740072 -0500 ++++ binutils-2.15.94.0.1/ld/configure 2004-11-22 21:34:12.784121432 -0500 +@@ -1579,6 +1579,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]+$' +diff -ur binutils-2.15.94.0.1.orig/ld/configure.tgt binutils-2.15.94.0.1/ld/configure.tgt +--- binutils-2.15.94.0.1.orig/ld/configure.tgt 2004-11-22 21:29:58.753739920 -0500 ++++ binutils-2.15.94.0.1/ld/configure.tgt 2004-11-22 21:38:50.336926992 -0500 +@@ -32,6 +32,7 @@ + targ_extra_libpath=$targ_extra_emuls ;; + cris-*-linux-gnu* | cris-*-linux-gnu*) + targ_emul=crislinux ;; ++cris-*-linux-uclibc*) targ_emul=crislinux ;; + cris-*-* | crisv32-*-*) targ_emul=criself + targ_extra_emuls="crisaout crislinux" + targ_extra_libpath=$targ_extra_emuls ;; +@@ -62,14 +63,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 +@@ -121,7 +124,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 +@@ -132,7 +137,7 @@ + m68*-apple-aux*) targ_emul=m68kaux ;; + maxq-*-coff) targ_emul=maxqcoff;; + *-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 ;; +@@ -156,14 +161,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/'` +@@ -263,11 +270,14 @@ + arm-*-kaos*) targ_emul=armelf ;; + arm9e-*-elf) targ_emul=armelf ;; + 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-gnueabi) targ_emul=armelf_linux_eabi ;; + 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 ;; +@@ -371,7 +381,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/'` + ;; +@@ -388,9 +399,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 ;; +@@ -403,6 +414,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 ;; +@@ -436,16 +448,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 ;; +@@ -468,6 +480,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 -ur binutils-2.15.94.0.1.orig/ld/emultempl/elf32.em binutils-2.15.94.0.1/ld/emultempl/elf32.em +--- binutils-2.15.94.0.1.orig/ld/emultempl/elf32.em 2004-11-22 21:29:58.763738400 -0500 ++++ binutils-2.15.94.0.1/ld/emultempl/elf32.em 2004-11-22 21:38:50.338926688 -0500 +@@ -65,7 +65,7 @@ + + if [ "x${USE_LIBPATH}" = xyes ] ; then + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c < + EOF +@@ -337,7 +337,7 @@ + + EOF + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <name, force)) + break; +diff -ur binutils-2.15.94.0.1.orig/libtool.m4 binutils-2.15.94.0.1/libtool.m4 +--- binutils-2.15.94.0.1.orig/libtool.m4 2004-11-22 21:29:57.000000000 -0500 ++++ binutils-2.15.94.0.1/libtool.m4 2004-11-22 21:38:50.339926536 -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* | 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]+$'] +diff -ur binutils-2.15.94.0.1.orig/ltconfig binutils-2.15.94.0.1/ltconfig +--- binutils-2.15.94.0.1.orig/ltconfig 2004-11-22 21:29:57.000000000 -0500 ++++ binutils-2.15.94.0.1/ltconfig 2004-11-22 21:38:50.341926232 -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 + +@@ -1270,6 +1271,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 -ur binutils-2.15.94.0.1.orig/opcodes/configure binutils-2.15.94.0.1/opcodes/configure +--- binutils-2.15.94.0.1.orig/opcodes/configure 2004-11-22 21:29:59.114685048 -0500 ++++ binutils-2.15.94.0.1/opcodes/configure 2004-11-22 21:38:50.354924256 -0500 +@@ -3587,6 +3587,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]+$' diff --git a/toolchain/binutils/2.15.94.0.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/2.15.94.0.1/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..b25d5b7e21 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/300-001_ld_makefile_patch.patch @@ -0,0 +1,52 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100 +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100 +@@ -128,7 +128,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/toolchain/binutils/2.15.94.0.1/300-006_better_file_error.patch b/toolchain/binutils/2.15.94.0.1/300-006_better_file_error.patch new file mode 100644 index 0000000000..f337611edf --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/300-006_better_file_error.patch @@ -0,0 +1,43 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 ++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/toolchain/binutils/2.15.94.0.1/300-012_check_ldrunpath_length.patch b/toolchain/binutils/2.15.94.0.1/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..498651a90c --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/300-012_check_ldrunpath_length.patch @@ -0,0 +1,47 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 ++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 +@@ -692,6 +692,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -871,6 +873,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, diff --git a/toolchain/binutils/2.15.94.0.1/300-120_mips_xgot_multigot_workaround.patch b/toolchain/binutils/2.15.94.0.1/300-120_mips_xgot_multigot_workaround.patch new file mode 100644 index 0000000000..ae2033d069 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/300-120_mips_xgot_multigot_workaround.patch @@ -0,0 +1,39 @@ +#! /bin/sh -e +## 120_mips_xgot_multigot_workaround.dpatch +## +## DP: Description: Make multigot/xgot handling mutually exclusive. +## DP: Author: Thiemo Seufer +## DP: Upstream status: Not submitted +## DP: Date: 2004-09-17 + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c +--- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100 ++++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100 +@@ -5883,6 +5883,8 @@ + s->size += i * MIPS_ELF_GOT_SIZE (output_bfd); + + if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ / MIPS_ELF_GOT_SIZE (output_bfd)) + && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno)) + return FALSE; + diff --git a/toolchain/binutils/2.15.94.0.1/702-binutils-skip-comments.patch b/toolchain/binutils/2.15.94.0.1/702-binutils-skip-comments.patch new file mode 100644 index 0000000000..804a17e006 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.1/702-binutils-skip-comments.patch @@ -0,0 +1,101 @@ +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 +To: Nathan Sidwell +Cc: Ian Lance Taylor , 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 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 + + * 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Ãe 5, 90409 NÃrnberg, Germany +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 +"And now for something completely different." diff --git a/toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch b/toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch new file mode 100644 index 0000000000..dc21386f42 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/100-uclibc-conf.patch @@ -0,0 +1,749 @@ +diff -ur binutils-2.15.94.0.2.orig/bfd/config.bfd binutils-2.15.94.0.2/bfd/config.bfd +--- binutils-2.15.94.0.2.orig/bfd/config.bfd 2004-12-22 15:00:57.219024360 -0500 ++++ binutils-2.15.94.0.2/bfd/config.bfd 2004-12-22 15:01:18.982715776 -0500 +@@ -140,7 +140,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 + ;; +@@ -150,7 +150,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" + ;; +@@ -227,7 +227,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 + ;; +@@ -235,8 +235,8 @@ + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; +- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ +- arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ ++ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ ++ arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks | \ + arm*-*-eabi* ) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec +@@ -381,7 +381,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 + ;; +@@ -392,7 +392,7 @@ + ;; + #endif + +- hppa*-*-linux-gnu*) ++ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) + targ_defvec=bfd_elf32_hppa_linux_vec + targ_selvecs=bfd_elf32_hppa_vec + ;; +@@ -525,7 +525,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 +@@ -539,7 +539,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" + ;; +@@ -715,7 +715,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 + ;; +@@ -1001,7 +1001,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" +@@ -1038,8 +1039,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" +@@ -1209,7 +1210,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" + ;; +@@ -1256,7 +1257,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" + ;; +@@ -1325,7 +1326,7 @@ + targ_underscore=yes + ;; + +- vax-*-linux-gnu*) ++ vax-*-linux-gnu* | vax-*-linux-uclibc*) + targ_defvec=bfd_elf32_vax_vec + ;; + +diff -ur binutils-2.15.94.0.2.orig/bfd/configure binutils-2.15.94.0.2/bfd/configure +--- binutils-2.15.94.0.2.orig/bfd/configure 2004-12-22 15:00:57.221024056 -0500 ++++ binutils-2.15.94.0.2/bfd/configure 2004-12-22 15:01:18.996713648 -0500 +@@ -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]+$' +@@ -9914,7 +9919,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"' + ;; +@@ -9978,7 +9983,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"' + ;; +@@ -10016,7 +10021,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"' + ;; +@@ -10150,7 +10155,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 -ur binutils-2.15.94.0.2.orig/bfd/configure.in binutils-2.15.94.0.2/bfd/configure.in +--- binutils-2.15.94.0.2.orig/bfd/configure.in 2004-12-22 15:00:57.223023752 -0500 ++++ binutils-2.15.94.0.2/bfd/configure.in 2004-12-22 15:01:18.998713344 -0500 +@@ -163,7 +163,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"' + ;; +@@ -248,7 +248,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"' +@@ -289,7 +289,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"' + ;; +@@ -375,7 +375,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 -ur binutils-2.15.94.0.2.orig/binutils/configure binutils-2.15.94.0.2/binutils/configure +--- binutils-2.15.94.0.2.orig/binutils/configure 2004-12-22 15:00:57.351004296 -0500 ++++ binutils-2.15.94.0.2/binutils/configure 2004-12-22 15:01:19.002712736 -0500 +@@ -1575,6 +1575,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]+$' +diff -ur binutils-2.15.94.0.2.orig/configure binutils-2.15.94.0.2/configure +--- binutils-2.15.94.0.2.orig/configure 2004-12-22 15:00:57.321008856 -0500 ++++ binutils-2.15.94.0.2/configure 2004-12-22 15:01:19.007711976 -0500 +@@ -1352,6 +1352,18 @@ + i[3456789]86-*-coff | i[3456789]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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 -ur binutils-2.15.94.0.2.orig/configure.in binutils-2.15.94.0.2/configure.in +--- binutils-2.15.94.0.2.orig/configure.in 2004-12-22 15:00:57.321008856 -0500 ++++ binutils-2.15.94.0.2/configure.in 2004-12-22 15:01:19.010711520 -0500 +@@ -561,6 +561,18 @@ + i[[3456789]]86-*-coff | i[[3456789]]86-*-elf) + noconfigdirs="$noconfigdirs ${libgcj}" + ;; ++ 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 -ur binutils-2.15.94.0.2.orig/gas/configure binutils-2.15.94.0.2/gas/configure +--- binutils-2.15.94.0.2.orig/gas/configure 2004-12-22 15:00:57.461987424 -0500 ++++ binutils-2.15.94.0.2/gas/configure 2004-12-22 15:01:19.019710152 -0500 +@@ -3420,6 +3420,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]+$' +@@ -4256,6 +4261,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 ;; + +@@ -4272,6 +4278,7 @@ + arm-*-linux*aout*) fmt=aout em=linux ;; + arm*-*-linux-gnueabi*) fmt=elf em=armlinuxeabi ;; + 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 ;; +@@ -4285,6 +4292,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -4344,7 +4352,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=elf em=lynx bfd_gas=yes ;; + i386-*-sysv[45]*) fmt=elf ;; + i386-*-solaris*) fmt=elf ;; +@@ -4404,6 +4414,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 ;; + +@@ -4431,6 +4442,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 ;; +@@ -4505,6 +4517,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) ;; +@@ -4532,7 +4545,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 ;; + s390-*-tpf*) fmt=elf ;; + + sh*-*-linux*) fmt=elf em=linux +@@ -4568,6 +4583,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 -ur binutils-2.15.94.0.2.orig/gas/configure.in binutils-2.15.94.0.2/gas/configure.in +--- binutils-2.15.94.0.2.orig/gas/configure.in 2004-12-22 15:00:57.461987424 -0500 ++++ binutils-2.15.94.0.2/gas/configure.in 2004-12-22 15:01:19.022709696 -0500 +@@ -202,6 +202,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 ;; + +@@ -218,6 +219,7 @@ + arm-*-linux*aout*) fmt=aout em=linux ;; + arm*-*-linux-gnueabi*) fmt=elf em=armlinuxeabi ;; + 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 ;; +@@ -231,6 +233,7 @@ + + cris-*-linux-gnu* | crisv32-*-linux-gnu*) + fmt=multi bfd_gas=yes em=linux ;; ++ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; + cris-*-* | crisv32-*-*) fmt=multi bfd_gas=yes ;; + + crx-*-elf*) fmt=elf ;; +@@ -290,7 +293,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=elf em=lynx bfd_gas=yes ;; + changequote(,)dnl + i386-*-sysv[45]*) fmt=elf ;; +@@ -343,6 +348,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 ;; + +@@ -370,6 +376,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 ;; +@@ -441,6 +448,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) ;; +@@ -461,7 +469,9 @@ + ppc-*-lynxos*) fmt=elf em=lynx bfd_gas=yes ;; + + 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 ;; + s390-*-tpf*) fmt=elf ;; + + sh*-*-linux*) fmt=elf em=linux +@@ -493,6 +503,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 -ur binutils-2.15.94.0.2.orig/gprof/configure binutils-2.15.94.0.2/gprof/configure +--- binutils-2.15.94.0.2.orig/gprof/configure 2004-12-22 15:00:57.949913248 -0500 ++++ binutils-2.15.94.0.2/gprof/configure 2004-12-22 15:01:19.030708480 -0500 +@@ -3418,6 +3418,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]+$' +diff -ur binutils-2.15.94.0.2.orig/ld/configure binutils-2.15.94.0.2/ld/configure +--- binutils-2.15.94.0.2.orig/ld/configure 2004-12-22 15:00:58.032900632 -0500 ++++ binutils-2.15.94.0.2/ld/configure 2004-12-22 15:01:19.035707720 -0500 +@@ -1579,6 +1579,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]+$' +diff -ur binutils-2.15.94.0.2.orig/ld/configure.tgt binutils-2.15.94.0.2/ld/configure.tgt +--- binutils-2.15.94.0.2.orig/ld/configure.tgt 2004-12-22 15:00:58.033900480 -0500 ++++ binutils-2.15.94.0.2/ld/configure.tgt 2004-12-22 15:01:19.036707568 -0500 +@@ -32,6 +32,7 @@ + targ_extra_libpath=$targ_extra_emuls ;; + cris-*-linux-gnu* | cris-*-linux-gnu*) + targ_emul=crislinux ;; ++cris-*-linux-uclibc*) targ_emul=crislinux ;; + cris-*-* | crisv32-*-*) targ_emul=criself + targ_extra_emuls="crisaout crislinux" + targ_extra_libpath=$targ_extra_emuls ;; +@@ -62,14 +63,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 +@@ -121,7 +124,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 +@@ -132,7 +137,7 @@ + m68*-apple-aux*) targ_emul=m68kaux ;; + maxq-*-coff) targ_emul=maxqcoff;; + *-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 ;; +@@ -156,14 +161,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/'` +@@ -263,11 +270,14 @@ + arm-*-kaos*) targ_emul=armelf ;; + arm9e-*-elf) targ_emul=armelf ;; + 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-gnueabi) targ_emul=armelf_linux_eabi ;; + 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 ;; +@@ -371,7 +381,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/'` + ;; +@@ -388,9 +399,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 ;; +@@ -403,6 +414,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 ;; +@@ -436,16 +448,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 ;; +@@ -468,6 +480,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 -ur binutils-2.15.94.0.2.orig/ld/emultempl/elf32.em binutils-2.15.94.0.2/ld/emultempl/elf32.em +--- binutils-2.15.94.0.2.orig/ld/emultempl/elf32.em 2004-12-22 15:00:58.044898808 -0500 ++++ binutils-2.15.94.0.2/ld/emultempl/elf32.em 2004-12-22 15:01:19.038707264 -0500 +@@ -65,7 +65,7 @@ + + if [ "x${USE_LIBPATH}" = xyes ] ; then + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c < + EOF +@@ -337,7 +337,7 @@ + + EOF + case ${target} in +- *-*-linux-gnu*) ++ *-*-linux-gnu* | *-*-linux-uclibc*) + cat >>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <>e${EMULATION_NAME}.c <name, force)) + break; +diff -ur binutils-2.15.94.0.2.orig/libiberty/configure binutils-2.15.94.0.2/libiberty/configure +--- binutils-2.15.94.0.2.orig/libiberty/configure 2004-12-22 15:00:59.263713520 -0500 ++++ binutils-2.15.94.0.2/libiberty/configure 2004-12-22 15:03:55.744884304 -0500 +@@ -3682,6 +3682,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]+$' +diff -ur binutils-2.15.94.0.2.orig/libtool.m4 binutils-2.15.94.0.2/libtool.m4 +--- binutils-2.15.94.0.2.orig/libtool.m4 2004-12-22 15:00:57.329007640 -0500 ++++ binutils-2.15.94.0.2/libtool.m4 2004-12-22 15:01:19.039707112 -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* | 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]+$'] +diff -ur binutils-2.15.94.0.2.orig/ltconfig binutils-2.15.94.0.2/ltconfig +--- binutils-2.15.94.0.2.orig/ltconfig 2004-12-22 15:00:57.330007488 -0500 ++++ binutils-2.15.94.0.2/ltconfig 2004-12-22 15:01:19.041706808 -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 + +@@ -1270,6 +1271,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 -ur binutils-2.15.94.0.2.orig/opcodes/configure binutils-2.15.94.0.2/opcodes/configure +--- binutils-2.15.94.0.2.orig/opcodes/configure 2004-12-22 15:00:59.334702728 -0500 ++++ binutils-2.15.94.0.2/opcodes/configure 2004-12-22 15:01:19.053704984 -0500 +@@ -3587,6 +3587,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]+$' diff --git a/toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch b/toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..b25d5b7e21 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/300-001_ld_makefile_patch.patch @@ -0,0 +1,52 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am binutils-2.14.90.0.6/ld/Makefile.am +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.am 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.am 2003-09-10 23:12:09.000000000 +0100 +@@ -19,7 +19,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in binutils-2.14.90.0.6/ld/Makefile.in +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/ld/Makefile.in 2003-08-21 16:28:48.000000000 +0100 ++++ binutils-2.14.90.0.6/ld/Makefile.in 2003-09-10 23:12:09.000000000 +0100 +@@ -128,7 +128,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ diff --git a/toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch b/toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch new file mode 100644 index 0000000000..f337611edf --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/300-006_better_file_error.patch @@ -0,0 +1,43 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c binutils-2.14.90.0.6/bfd/opncls.c +--- /home/james/debian/packages/binutils/binutils-2.14.90.0.6/bfd/opncls.c 2003-07-23 16:08:09.000000000 +0100 ++++ binutils-2.14.90.0.6/bfd/opncls.c 2003-09-10 22:35:00.000000000 +0100 +@@ -150,6 +150,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) diff --git a/toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch b/toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..498651a90c --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/300-012_check_ldrunpath_length.patch @@ -0,0 +1,47 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em +--- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100 ++++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100 +@@ -692,6 +692,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -871,6 +873,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + if (! (bfd_elf_size_dynamic_sections + (output_bfd, command_line.soname, rpath, + command_line.filter_shlib, diff --git a/toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch b/toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch new file mode 100644 index 0000000000..ae2033d069 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/300-120_mips_xgot_multigot_workaround.patch @@ -0,0 +1,39 @@ +#! /bin/sh -e +## 120_mips_xgot_multigot_workaround.dpatch +## +## DP: Description: Make multigot/xgot handling mutually exclusive. +## DP: Author: Thiemo Seufer +## DP: Upstream status: Not submitted +## DP: Date: 2004-09-17 + +if [ $# -lt 1 ]; then + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}" + +case "$1" in + -patch) patch -p1 ${patch_opts} < $0;; + -unpatch) patch -R -p1 ${patch_opts} < $0;; + *) + echo "`basename $0`: script expects -patch|-unpatch as argument" >&2 + exit 1;; +esac + +exit 0 + +@DPATCH@ +diff -urNad /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c binutils-2.15/bfd/elfxx-mips.c +--- /home/james/debian/packages/binutils/binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:41:37.156466673 +0100 ++++ binutils-2.15/bfd/elfxx-mips.c 2004-09-23 22:42:15.998362861 +0100 +@@ -5883,6 +5883,8 @@ + s->size += i * MIPS_ELF_GOT_SIZE (output_bfd); + + if (s->size > MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ && g->global_gotno <= (MIPS_ELF_GOT_MAX_SIZE (output_bfd) ++ / MIPS_ELF_GOT_SIZE (output_bfd)) + && ! mips_elf_multi_got (output_bfd, info, g, s, local_gotno)) + return FALSE; + diff --git a/toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch b/toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch new file mode 100644 index 0000000000..804a17e006 --- /dev/null +++ b/toolchain/binutils/2.15.94.0.2/702-binutils-skip-comments.patch @@ -0,0 +1,101 @@ +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 +To: Nathan Sidwell +Cc: Ian Lance Taylor , 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 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 + + * 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Ãe 5, 90409 NÃrnberg, Germany +Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 +"And now for something completely different." diff --git a/toolchain/binutils/2.15/100-uclibc-conf.patch b/toolchain/binutils/2.15/100-uclibc-conf.patch new file mode 100644 index 0000000000..1c7fa4a400 --- /dev/null +++ b/toolchain/binutils/2.15/100-uclibc-conf.patch @@ -0,0 +1,692 @@ +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]+$' diff --git a/toolchain/binutils/2.15/600-arm-textrel.patch b/toolchain/binutils/2.15/600-arm-textrel.patch new file mode 100644 index 0000000000..73d5b9df8e --- /dev/null +++ b/toolchain/binutils/2.15/600-arm-textrel.patch @@ -0,0 +1,63 @@ +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)) diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in new file mode 100644 index 0000000000..d1d62955d8 --- /dev/null +++ b/toolchain/binutils/Config.in @@ -0,0 +1,66 @@ +# Choose binutils version. + +comment "Binutils Options" + +choice + prompt "Binutils Version" + default BR2_BINUTILS_VERSION_2_15_91_0_2 + help + Select the version of binutils you wish to use. + + config BR2_BINUTILS_VERSION_2_14_90_0_6 + bool "binutils 2.14.90.0.6" + + config BR2_BINUTILS_VERSION_2_14_90_0_7 + bool "binutils 2.14.90.0.7" + + config BR2_BINUTILS_VERSION_2_14_90_0_8 + bool "binutils 2.14.90.0.8" + + config BR2_BINUTILS_VERSION_2_15 + bool "binutils 2.15" + + config BR2_BINUTILS_VERSION_2_15_90_0_1 + bool "binutils 2.15.90.0.1" + + config BR2_BINUTILS_VERSION_2_15_90_0_1_1 + bool "binutils 2.15.90.0.1.1" + + config BR2_BINUTILS_VERSION_2_15_90_0_2 + bool "binutils 2.15.90.0.2" + + config BR2_BINUTILS_VERSION_2_15_90_0_3 + bool "binutils 2.15.90.0.3" + + config BR2_BINUTILS_VERSION_2_15_91_0_1 + bool "binutils 2.15.91.0.1" + + config BR2_BINUTILS_VERSION_2_15_91_0_2 + bool "binutils 2.15.91.0.2" + + config BR2_BINUTILS_VERSION_2_15_92_0_2 + bool "binutils 2.15.92.0.2" + + config BR2_BINUTILS_VERSION_2_15_94_0_1 + bool "binutils 2.15.94.0.1" + + config BR2_BINUTILS_VERSION_2_15_94_0_2 + bool "binutils 2.15.94.0.2" + +endchoice + +config BR2_BINUTILS_VERSION + string + default "2.14.90.0.6" if BR2_BINUTILS_VERSION_2_14_90_0_6 + default "2.14.90.0.7" if BR2_BINUTILS_VERSION_2_14_90_0_7 + default "2.14.90.0.8" if BR2_BINUTILS_VERSION_2_14_90_0_8 + default "2.15" if BR2_BINUTILS_VERSION_2_15 + default "2.15.90.0.1" if BR2_BINUTILS_VERSION_2_15_90_0_1 + default "2.15.90.0.0.1.1" if BR2_BINUTILS_VERSION_2_15_90_0_1_1 + default "2.15.90.0.2" if BR2_BINUTILS_VERSION_2_15_90_0_2 + default "2.15.90.0.3" if BR2_BINUTILS_VERSION_2_15_90_0_3 + default "2.15.91.0.1" if BR2_BINUTILS_VERSION_2_15_91_0_1 + default "2.15.91.0.2" if BR2_BINUTILS_VERSION_2_15_91_0_2 + default "2.15.92.0.2" if BR2_BINUTILS_VERSION_2_15_92_0_2 + default "2.15.94.0.1" if BR2_BINUTILS_VERSION_2_15_94_0_1 + default "2.15.94.0.2" if BR2_BINUTILS_VERSION_2_15_94_0_2 diff --git a/toolchain/binutils/Makefile.in b/toolchain/binutils/Makefile.in new file mode 100644 index 0000000000..c6838bb053 --- /dev/null +++ b/toolchain/binutils/Makefile.in @@ -0,0 +1 @@ +BINUTILS_VERSION:=$(strip $(subst ",, $(BR2_BINUTILS_VERSION))) diff --git a/toolchain/binutils/binutils.mk b/toolchain/binutils/binutils.mk new file mode 100644 index 0000000000..afbb63ac3e --- /dev/null +++ b/toolchain/binutils/binutils.mk @@ -0,0 +1,134 @@ +############################################################# +# +# build binutils for use on the host system +# +############################################################# +BINUTILS_VERSION:=$(strip $(BINUTILS_VERSION)) + +BINUTILS_SITE:=http://ftp.kernel.org/pub/linux/devel/binutils +ifeq ($(BINUTILS_VERSION),2.15) +BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ +endif +ifeq ($(BINUTILS_VERSION),2.14) +BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ +endif +ifeq ($(BINUTILS_VERSION),2.13) +BINUTILS_SITE:=http://ftp.gnu.org/gnu/binutils/ +endif + +BINUTILS_SOURCE:=binutils-$(BINUTILS_VERSION).tar.bz2 +BINUTILS_DIR:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION) +BINUTILS_CAT:=bzcat + +BINUTILS_DIR1:=$(TOOL_BUILD_DIR)/binutils-$(BINUTILS_VERSION)-build + +$(DL_DIR)/$(BINUTILS_SOURCE): + mkdir -p $(DL_DIR) + $(WGET) -P $(DL_DIR) $(BINUTILS_SITE)/$(BINUTILS_SOURCE) + +$(BINUTILS_DIR)/.unpacked: $(DL_DIR)/$(BINUTILS_SOURCE) + mkdir -p $(TOOL_BUILD_DIR) + $(BINUTILS_CAT) $(DL_DIR)/$(BINUTILS_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) - + touch $(BINUTILS_DIR)/.unpacked + +$(BINUTILS_DIR)/.patched: $(BINUTILS_DIR)/.unpacked + # Apply appropriate binutils patches. + toolchain/patch-kernel.sh $(BINUTILS_DIR) toolchain/binutils/$(BINUTILS_VERSION) \*.patch + touch $(BINUTILS_DIR)/.patched + +$(BINUTILS_DIR1)/.configured: $(BINUTILS_DIR)/.patched + mkdir -p $(BINUTILS_DIR1) + (cd $(BINUTILS_DIR1); \ + $(BINUTILS_DIR)/configure \ + --prefix=$(STAGING_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + $(DISABLE_NLS) \ + $(MULTILIB) \ + $(SOFT_FLOAT_CONFIG_OPTION) ); + touch $(BINUTILS_DIR1)/.configured + +$(BINUTILS_DIR1)/binutils/objdump: $(BINUTILS_DIR1)/.configured + $(MAKE) -C $(BINUTILS_DIR1) all + +# Make install will put gettext data in staging_dir/share/locale. +# Unfortunatey, it isn't configureable. +$(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld: $(BINUTILS_DIR1)/binutils/objdump + $(MAKE) -C $(BINUTILS_DIR1) install + +binutils-dependancies: + @if ! which bison > /dev/null ; then \ + echo -e "\n\nYou must install 'bison' on your build machine\n"; \ + exit 1; \ + fi; + @if ! which flex > /dev/null ; then \ + echo -e "\n\nYou must install 'flex' on your build machine\n"; \ + exit 1; \ + fi; + @if ! which msgfmt > /dev/null ; then \ + echo -e "\n\nYou must install 'gettext' on your build machine\n"; \ + exit 1; \ + fi; + +binutils: binutils-dependancies $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/ld + +binutils-source: $(DL_DIR)/$(BINUTILS_SOURCE) + +binutils-clean: + rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)* + -$(MAKE) -C $(BINUTILS_DIR1) clean + +binutils-dirclean: + rm -rf $(BINUTILS_DIR1) + + + +############################################################# +# +# build binutils for use on the target system +# +############################################################# +BINUTILS_DIR2:=$(BUILD_DIR)/binutils-$(BINUTILS_VERSION)-target +$(BINUTILS_DIR2)/.configured: $(BINUTILS_DIR)/.patched + mkdir -p $(BINUTILS_DIR2) + (cd $(BINUTILS_DIR2); \ + PATH=$(TARGET_PATH) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CFLAGS_FOR_BUILD="-O2 -g" \ + $(BINUTILS_DIR)/configure \ + --prefix=/usr \ + --exec-prefix=/usr \ + --build=$(GNU_HOST_NAME) \ + --host=$(REAL_GNU_TARGET_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + $(DISABLE_NLS) \ + $(MULTILIB) \ + $(SOFT_FLOAT_CONFIG_OPTION) ); + touch $(BINUTILS_DIR2)/.configured + +$(BINUTILS_DIR2)/binutils/objdump: $(BINUTILS_DIR2)/.configured + PATH=$(TARGET_PATH) \ + $(MAKE) -C $(BINUTILS_DIR2) all + +$(TARGET_DIR)/usr/bin/ld: $(BINUTILS_DIR2)/binutils/objdump + PATH=$(TARGET_PATH) \ + $(MAKE) DESTDIR=$(TARGET_DIR) \ + tooldir=/usr build_tooldir=/usr \ + -C $(BINUTILS_DIR2) install + #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \ + # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc + -$(STRIP) $(TARGET_DIR)/usr/$(REAL_GNU_TARGET_NAME)/bin/* > /dev/null 2>&1 + -$(STRIP) $(TARGET_DIR)/usr/bin/* > /dev/null 2>&1 + +binutils_target: $(GCC_DEPENDANCY) $(TARGET_DIR)/usr/bin/ld + +binutils_target-clean: + (cd $(TARGET_DIR)/usr/bin; \ + rm -f addr2line ar as gprof ld nm objcopy \ + objdump ranlib readelf size strings strip) + rm -f $(TARGET_DIR)/bin/$(REAL_GNU_TARGET_NAME)* + -$(MAKE) -C $(BINUTILS_DIR2) clean + +binutils_target-dirclean: + rm -rf $(BINUTILS_DIR2) -- cgit v1.2.3