Vampirise patches for binutils 2.17 from buildroot.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/binutils/2.17/100-uclibc-conf.patch Tue May 01 16:33:17 2007 +0000
1.3 @@ -0,0 +1,149 @@
1.4 +diff -dur binutils-2.17.old/bfd/configure binutils-2.17/bfd/configure
1.5 +--- binutils-2.17.old/bfd/configure 2006-06-23 20:17:03.000000000 +0200
1.6 ++++ binutils-2.17/bfd/configure 2007-05-01 18:26:03.000000000 +0200
1.7 +@@ -3576,7 +3576,7 @@
1.8 + ;;
1.9 +
1.10 + # This must be Linux ELF.
1.11 +-linux-gnu*)
1.12 ++linux-gnu*|linux-uclibc*)
1.13 + lt_cv_deplibs_check_method=pass_all
1.14 + ;;
1.15 +
1.16 +diff -dur binutils-2.17.old/binutils/configure binutils-2.17/binutils/configure
1.17 +--- binutils-2.17.old/binutils/configure 2006-04-06 23:49:29.000000000 +0200
1.18 ++++ binutils-2.17/binutils/configure 2007-05-01 18:26:03.000000000 +0200
1.19 +@@ -3411,7 +3411,7 @@
1.20 + ;;
1.21 +
1.22 + # This must be Linux ELF.
1.23 +-linux-gnu*)
1.24 ++linux-gnu*|linux-uclibc*)
1.25 + lt_cv_deplibs_check_method=pass_all
1.26 + ;;
1.27 +
1.28 +diff -dur binutils-2.17.old/configure binutils-2.17/configure
1.29 +--- binutils-2.17.old/configure 2006-04-06 23:49:25.000000000 +0200
1.30 ++++ binutils-2.17/configure 2007-05-01 18:26:03.000000000 +0200
1.31 +@@ -1276,7 +1276,7 @@
1.32 + am33_2.0-*-linux*)
1.33 + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1.34 + ;;
1.35 +- sh-*-linux*)
1.36 ++ sh*-*-linux*)
1.37 + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1.38 + ;;
1.39 + sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1.40 +@@ -1584,7 +1584,7 @@
1.41 + romp-*-*)
1.42 + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1.43 + ;;
1.44 +- sh-*-* | sh64-*-*)
1.45 ++ sh*-*-* | sh64-*-*)
1.46 + case "${host}" in
1.47 + i[3456789]86-*-vsta) ;; # don't add gprof back in
1.48 + i[3456789]86-*-go32*) ;; # don't add gprof back in
1.49 +diff -dur binutils-2.17.old/configure.in binutils-2.17/configure.in
1.50 +--- binutils-2.17.old/configure.in 2006-06-23 20:19:53.000000000 +0200
1.51 ++++ binutils-2.17/configure.in 2007-05-01 18:26:03.000000000 +0200
1.52 +@@ -468,7 +468,7 @@
1.53 + am33_2.0-*-linux*)
1.54 + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1.55 + ;;
1.56 +- sh-*-linux*)
1.57 ++ sh*-*-linux*)
1.58 + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
1.59 + ;;
1.60 + sh*-*-pe|mips*-*-pe|*arm-wince-pe)
1.61 +@@ -776,7 +776,7 @@
1.62 + romp-*-*)
1.63 + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}"
1.64 + ;;
1.65 +- sh-*-* | sh64-*-*)
1.66 ++ sh*-*-* | sh64-*-*)
1.67 + case "${host}" in
1.68 + i[[3456789]]86-*-vsta) ;; # don't add gprof back in
1.69 + i[[3456789]]86-*-go32*) ;; # don't add gprof back in
1.70 +diff -dur binutils-2.17.old/gas/configure binutils-2.17/gas/configure
1.71 +--- binutils-2.17.old/gas/configure 2006-04-06 23:49:31.000000000 +0200
1.72 ++++ binutils-2.17/gas/configure 2007-05-01 18:26:03.000000000 +0200
1.73 +@@ -3411,7 +3411,7 @@
1.74 + ;;
1.75 +
1.76 + # This must be Linux ELF.
1.77 +-linux-gnu*)
1.78 ++linux-gnu*|linux-uclibc*)
1.79 + lt_cv_deplibs_check_method=pass_all
1.80 + ;;
1.81 +
1.82 +diff -dur binutils-2.17.old/gprof/configure binutils-2.17/gprof/configure
1.83 +--- binutils-2.17.old/gprof/configure 2006-04-06 23:49:33.000000000 +0200
1.84 ++++ binutils-2.17/gprof/configure 2007-05-01 18:26:03.000000000 +0200
1.85 +@@ -3414,6 +3414,11 @@
1.86 + lt_cv_deplibs_check_method=pass_all
1.87 + ;;
1.88 +
1.89 ++linux-uclibc*)
1.90 ++ lt_cv_deplibs_check_method=pass_all
1.91 ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
1.92 ++ ;;
1.93 ++
1.94 + netbsd* | knetbsd*-gnu)
1.95 + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1.96 + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
1.97 +diff -dur binutils-2.17.old/ld/configure binutils-2.17/ld/configure
1.98 +--- binutils-2.17.old/ld/configure 2006-04-11 12:36:26.000000000 +0200
1.99 ++++ binutils-2.17/ld/configure 2007-05-01 18:26:03.000000000 +0200
1.100 +@@ -3413,7 +3413,7 @@
1.101 + ;;
1.102 +
1.103 + # This must be Linux ELF.
1.104 +-linux-gnu*)
1.105 ++linux-gnu*|linux-uclibc*)
1.106 + lt_cv_deplibs_check_method=pass_all
1.107 + ;;
1.108 +
1.109 +diff -dur binutils-2.17.old/libtool.m4 binutils-2.17/libtool.m4
1.110 +--- binutils-2.17.old/libtool.m4 2005-12-27 17:37:57.000000000 +0100
1.111 ++++ binutils-2.17/libtool.m4 2007-05-01 18:26:03.000000000 +0200
1.112 +@@ -739,7 +739,7 @@
1.113 + ;;
1.114 +
1.115 + # This must be Linux ELF.
1.116 +-linux-gnu*)
1.117 ++linux-gnu*|linux-uclibc*)
1.118 + lt_cv_deplibs_check_method=pass_all
1.119 + ;;
1.120 +
1.121 +diff -dur binutils-2.17.old/ltconfig binutils-2.17/ltconfig
1.122 +--- binutils-2.17.old/ltconfig 2005-07-16 04:36:38.000000000 +0200
1.123 ++++ binutils-2.17/ltconfig 2007-05-01 18:26:03.000000000 +0200
1.124 +@@ -602,6 +602,7 @@
1.125 +
1.126 + # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1.127 + case $host_os in
1.128 ++linux-uclibc*) ;;
1.129 + linux-gnu*) ;;
1.130 + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1.131 + esac
1.132 +@@ -1247,7 +1248,7 @@
1.133 + ;;
1.134 +
1.135 + # This must be Linux ELF.
1.136 +-linux-gnu*)
1.137 ++linux-gnu*|linux-uclibc*)
1.138 + version_type=linux
1.139 + need_lib_prefix=no
1.140 + need_version=no
1.141 +diff -dur binutils-2.17.old/opcodes/configure binutils-2.17/opcodes/configure
1.142 +--- binutils-2.17.old/opcodes/configure 2006-02-17 15:36:28.000000000 +0100
1.143 ++++ binutils-2.17/opcodes/configure 2007-05-01 18:26:03.000000000 +0200
1.144 +@@ -3579,7 +3579,7 @@
1.145 + ;;
1.146 +
1.147 + # This must be Linux ELF.
1.148 +-linux-gnu*)
1.149 ++linux-gnu*|linux-uclibc*)
1.150 + lt_cv_deplibs_check_method=pass_all
1.151 + ;;
1.152 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/binutils/2.17/110-arm-eabi-conf.patch Tue May 01 16:33:17 2007 +0000
2.3 @@ -0,0 +1,24 @@
2.4 +diff -dur binutils-2.17.old/configure binutils-2.17/configure
2.5 +--- binutils-2.17.old/configure 2007-05-01 18:26:03.000000000 +0200
2.6 ++++ binutils-2.17/configure 2007-05-01 18:26:06.000000000 +0200
2.7 +@@ -1305,7 +1305,7 @@
2.8 + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
2.9 + noconfigdirs="$noconfigdirs target-libffi target-qthreads"
2.10 + ;;
2.11 +- arm*-*-linux-gnueabi)
2.12 ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
2.13 + noconfigdirs="$noconfigdirs target-libffi target-qthreads"
2.14 + noconfigdirs="$noconfigdirs target-libjava target-libobjc"
2.15 + ;;
2.16 +diff -dur binutils-2.17.old/configure.in binutils-2.17/configure.in
2.17 +--- binutils-2.17.old/configure.in 2007-05-01 18:26:03.000000000 +0200
2.18 ++++ binutils-2.17/configure.in 2007-05-01 18:26:06.000000000 +0200
2.19 +@@ -497,7 +497,7 @@
2.20 + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
2.21 + noconfigdirs="$noconfigdirs target-libffi target-qthreads"
2.22 + ;;
2.23 +- arm*-*-linux-gnueabi)
2.24 ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
2.25 + noconfigdirs="$noconfigdirs target-libffi target-qthreads"
2.26 + noconfigdirs="$noconfigdirs target-libjava target-libobjc"
2.27 + ;;
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/patches/binutils/2.17/300-001_ld_makefile_patch.patch Tue May 01 16:33:17 2007 +0000
3.3 @@ -0,0 +1,24 @@
3.4 +diff -dur binutils-2.17.old/ld/Makefile.am binutils-2.17/ld/Makefile.am
3.5 +--- binutils-2.17.old/ld/Makefile.am 2006-06-03 06:45:50.000000000 +0200
3.6 ++++ binutils-2.17/ld/Makefile.am 2007-05-01 18:26:09.000000000 +0200
3.7 +@@ -20,7 +20,7 @@
3.8 + # We put the scripts in the directory $(scriptdir)/ldscripts.
3.9 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
3.10 + # directives need to be different for native and cross linkers.
3.11 +-scriptdir = $(tooldir)/lib
3.12 ++scriptdir = $(libdir)
3.13 +
3.14 + EMUL = @EMUL@
3.15 + EMULATION_OFILES = @EMULATION_OFILES@
3.16 +diff -dur binutils-2.17.old/ld/Makefile.in binutils-2.17/ld/Makefile.in
3.17 +--- binutils-2.17.old/ld/Makefile.in 2006-06-03 06:45:50.000000000 +0200
3.18 ++++ binutils-2.17/ld/Makefile.in 2007-05-01 18:26:09.000000000 +0200
3.19 +@@ -269,7 +269,7 @@
3.20 + # We put the scripts in the directory $(scriptdir)/ldscripts.
3.21 + # We can't put the scripts in $(datadir) because the SEARCH_DIR
3.22 + # directives need to be different for native and cross linkers.
3.23 +-scriptdir = $(tooldir)/lib
3.24 ++scriptdir = $(libdir)
3.25 + BASEDIR = $(srcdir)/..
3.26 + BFDDIR = $(BASEDIR)/bfd
3.27 + INCDIR = $(BASEDIR)/include
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/patches/binutils/2.17/300-006_better_file_error.patch Tue May 01 16:33:17 2007 +0000
4.3 @@ -0,0 +1,17 @@
4.4 +diff -dur binutils-2.17.old/bfd/opncls.c binutils-2.17/bfd/opncls.c
4.5 +--- binutils-2.17.old/bfd/opncls.c 2006-03-16 13:20:16.000000000 +0100
4.6 ++++ binutils-2.17/bfd/opncls.c 2007-05-01 18:26:11.000000000 +0200
4.7 +@@ -158,6 +158,13 @@
4.8 + {
4.9 + bfd *nbfd;
4.10 + const bfd_target *target_vec;
4.11 ++ struct stat s;
4.12 ++
4.13 ++ if (stat (filename, &s) == 0)
4.14 ++ if (S_ISDIR(s.st_mode)) {
4.15 ++ bfd_set_error (bfd_error_file_not_recognized);
4.16 ++ return NULL;
4.17 ++ }
4.18 +
4.19 + nbfd = _bfd_new_bfd ();
4.20 + if (nbfd == NULL)
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/patches/binutils/2.17/300-012_check_ldrunpath_length.patch Tue May 01 16:33:17 2007 +0000
5.3 @@ -0,0 +1,21 @@
5.4 +diff -dur binutils-2.17.old/ld/emultempl/elf32.em binutils-2.17/ld/emultempl/elf32.em
5.5 +--- binutils-2.17.old/ld/emultempl/elf32.em 2006-06-12 15:05:04.000000000 +0200
5.6 ++++ binutils-2.17/ld/emultempl/elf32.em 2007-05-01 18:26:13.000000000 +0200
5.7 +@@ -970,6 +970,8 @@
5.8 + && command_line.rpath == NULL)
5.9 + {
5.10 + lib_path = (const char *) getenv ("LD_RUN_PATH");
5.11 ++ if ((lib_path) && (strlen (lib_path) == 0))
5.12 ++ lib_path = NULL;
5.13 + if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
5.14 + force))
5.15 + break;
5.16 +@@ -1154,6 +1156,8 @@
5.17 + rpath = command_line.rpath;
5.18 + if (rpath == NULL)
5.19 + rpath = (const char *) getenv ("LD_RUN_PATH");
5.20 ++ if ((rpath) && (strlen (rpath) == 0))
5.21 ++ rpath = NULL;
5.22 + if (! (bfd_elf_size_dynamic_sections
5.23 + (output_bfd, command_line.soname, rpath,
5.24 + command_line.filter_shlib,
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/patches/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch Tue May 01 16:33:17 2007 +0000
6.3 @@ -0,0 +1,28 @@
6.4 +diff -dur binutils-2.17.old/bfd/elf32-mips.c binutils-2.17/bfd/elf32-mips.c
6.5 +--- binutils-2.17.old/bfd/elf32-mips.c 2006-03-22 10:28:13.000000000 +0100
6.6 ++++ binutils-2.17/bfd/elf32-mips.c 2007-05-01 18:26:15.000000000 +0200
6.7 +@@ -1617,7 +1617,9 @@
6.8 +
6.9 + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
6.10 + page sizes of up to that limit, so we need to respect it. */
6.11 +-#define ELF_MAXPAGESIZE 0x10000
6.12 ++/*#define ELF_MAXPAGESIZE 0x10000*/
6.13 ++/* Use 4K to shrink the elf header. NOT for general use! */
6.14 ++#define ELF_MAXPAGESIZE 0x1000
6.15 + #define elf32_bed elf32_tradbed
6.16 +
6.17 + /* Include the target file again for this target. */
6.18 +diff -dur binutils-2.17.old/bfd/elfn32-mips.c binutils-2.17/bfd/elfn32-mips.c
6.19 +--- binutils-2.17.old/bfd/elfn32-mips.c 2005-11-23 15:04:17.000000000 +0100
6.20 ++++ binutils-2.17/bfd/elfn32-mips.c 2007-05-01 18:26:15.000000000 +0200
6.21 +@@ -2402,7 +2402,9 @@
6.22 +
6.23 + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
6.24 + page sizes of up to that limit, so we need to respect it. */
6.25 +-#define ELF_MAXPAGESIZE 0x10000
6.26 ++/*#define ELF_MAXPAGESIZE 0x10000*/
6.27 ++/* Use 4K to shrink the elf header. NOT for general use! */
6.28 ++#define ELF_MAXPAGESIZE 0x1000
6.29 + #define elf32_bed elf32_tradbed
6.30 +
6.31 + /* Include the target file again for this target. */