From e5e9d70de47e000b8018d74589998dd1de0fd793 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 1 May 2007 16:33:17 +0000 Subject: Vampirise patches for binutils 2.17 from buildroot. diff --git a/patches/binutils/2.17/100-uclibc-conf.patch b/patches/binutils/2.17/100-uclibc-conf.patch new file mode 100644 index 0000000..267b76c --- /dev/null +++ b/patches/binutils/2.17/100-uclibc-conf.patch @@ -0,0 +1,149 @@ +diff -dur binutils-2.17.old/bfd/configure binutils-2.17/bfd/configure +--- binutils-2.17.old/bfd/configure 2006-06-23 20:17:03.000000000 +0200 ++++ binutils-2.17/bfd/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3576,7 +3576,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +diff -dur binutils-2.17.old/binutils/configure binutils-2.17/binutils/configure +--- binutils-2.17.old/binutils/configure 2006-04-06 23:49:29.000000000 +0200 ++++ binutils-2.17/binutils/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3411,7 +3411,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +diff -dur binutils-2.17.old/configure binutils-2.17/configure +--- binutils-2.17.old/configure 2006-04-06 23:49:25.000000000 +0200 ++++ binutils-2.17/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -1276,7 +1276,7 @@ + am33_2.0-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; +- sh-*-linux*) ++ sh*-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; + sh*-*-pe|mips*-*-pe|*arm-wince-pe) +@@ -1584,7 +1584,7 @@ + romp-*-*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${host}" in + i[3456789]86-*-vsta) ;; # don't add gprof back in + i[3456789]86-*-go32*) ;; # don't add gprof back in +diff -dur binutils-2.17.old/configure.in binutils-2.17/configure.in +--- binutils-2.17.old/configure.in 2006-06-23 20:19:53.000000000 +0200 ++++ binutils-2.17/configure.in 2007-05-01 18:26:03.000000000 +0200 +@@ -468,7 +468,7 @@ + am33_2.0-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; +- sh-*-linux*) ++ sh*-*-linux*) + noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss" + ;; + sh*-*-pe|mips*-*-pe|*arm-wince-pe) +@@ -776,7 +776,7 @@ + romp-*-*) + noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes target-libgloss ${libgcj}" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${host}" in + i[[3456789]]86-*-vsta) ;; # don't add gprof back in + i[[3456789]]86-*-go32*) ;; # don't add gprof back in +diff -dur binutils-2.17.old/gas/configure binutils-2.17/gas/configure +--- binutils-2.17.old/gas/configure 2006-04-06 23:49:31.000000000 +0200 ++++ binutils-2.17/gas/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3411,7 +3411,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +diff -dur binutils-2.17.old/gprof/configure binutils-2.17/gprof/configure +--- binutils-2.17.old/gprof/configure 2006-04-06 23:49:33.000000000 +0200 ++++ binutils-2.17/gprof/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3414,6 +3414,11 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd* | knetbsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' +diff -dur binutils-2.17.old/ld/configure binutils-2.17/ld/configure +--- binutils-2.17.old/ld/configure 2006-04-11 12:36:26.000000000 +0200 ++++ binutils-2.17/ld/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3413,7 +3413,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +diff -dur binutils-2.17.old/libtool.m4 binutils-2.17/libtool.m4 +--- binutils-2.17.old/libtool.m4 2005-12-27 17:37:57.000000000 +0100 ++++ binutils-2.17/libtool.m4 2007-05-01 18:26:03.000000000 +0200 +@@ -739,7 +739,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + +diff -dur binutils-2.17.old/ltconfig binutils-2.17/ltconfig +--- binutils-2.17.old/ltconfig 2005-07-16 04:36:38.000000000 +0200 ++++ binutils-2.17/ltconfig 2007-05-01 18:26:03.000000000 +0200 +@@ -602,6 +602,7 @@ + + # Transform linux* to *-*-linux-gnu*, to support old configure scripts. + case $host_os in ++linux-uclibc*) ;; + linux-gnu*) ;; + linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` + esac +@@ -1247,7 +1248,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + version_type=linux + need_lib_prefix=no + need_version=no +diff -dur binutils-2.17.old/opcodes/configure binutils-2.17/opcodes/configure +--- binutils-2.17.old/opcodes/configure 2006-02-17 15:36:28.000000000 +0100 ++++ binutils-2.17/opcodes/configure 2007-05-01 18:26:03.000000000 +0200 +@@ -3579,7 +3579,7 @@ + ;; + + # This must be Linux ELF. +-linux-gnu*) ++linux-gnu*|linux-uclibc*) + lt_cv_deplibs_check_method=pass_all + ;; + diff --git a/patches/binutils/2.17/110-arm-eabi-conf.patch b/patches/binutils/2.17/110-arm-eabi-conf.patch new file mode 100644 index 0000000..88d3a4f --- /dev/null +++ b/patches/binutils/2.17/110-arm-eabi-conf.patch @@ -0,0 +1,24 @@ +diff -dur binutils-2.17.old/configure binutils-2.17/configure +--- binutils-2.17.old/configure 2007-05-01 18:26:03.000000000 +0200 ++++ binutils-2.17/configure 2007-05-01 18:26:06.000000000 +0200 +@@ -1305,7 +1305,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; +diff -dur binutils-2.17.old/configure.in binutils-2.17/configure.in +--- binutils-2.17.old/configure.in 2007-05-01 18:26:03.000000000 +0200 ++++ binutils-2.17/configure.in 2007-05-01 18:26:06.000000000 +0200 +@@ -497,7 +497,7 @@ + arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* ) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + ;; +- arm*-*-linux-gnueabi) ++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi) + noconfigdirs="$noconfigdirs target-libffi target-qthreads" + noconfigdirs="$noconfigdirs target-libjava target-libobjc" + ;; diff --git a/patches/binutils/2.17/300-001_ld_makefile_patch.patch b/patches/binutils/2.17/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000..b40ec67 --- /dev/null +++ b/patches/binutils/2.17/300-001_ld_makefile_patch.patch @@ -0,0 +1,24 @@ +diff -dur binutils-2.17.old/ld/Makefile.am binutils-2.17/ld/Makefile.am +--- binutils-2.17.old/ld/Makefile.am 2006-06-03 06:45:50.000000000 +0200 ++++ binutils-2.17/ld/Makefile.am 2007-05-01 18:26:09.000000000 +0200 +@@ -20,7 +20,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 -dur binutils-2.17.old/ld/Makefile.in binutils-2.17/ld/Makefile.in +--- binutils-2.17.old/ld/Makefile.in 2006-06-03 06:45:50.000000000 +0200 ++++ binutils-2.17/ld/Makefile.in 2007-05-01 18:26:09.000000000 +0200 +@@ -269,7 +269,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) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/patches/binutils/2.17/300-006_better_file_error.patch b/patches/binutils/2.17/300-006_better_file_error.patch new file mode 100644 index 0000000..7900f17 --- /dev/null +++ b/patches/binutils/2.17/300-006_better_file_error.patch @@ -0,0 +1,17 @@ +diff -dur binutils-2.17.old/bfd/opncls.c binutils-2.17/bfd/opncls.c +--- binutils-2.17.old/bfd/opncls.c 2006-03-16 13:20:16.000000000 +0100 ++++ binutils-2.17/bfd/opncls.c 2007-05-01 18:26:11.000000000 +0200 +@@ -158,6 +158,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/patches/binutils/2.17/300-012_check_ldrunpath_length.patch b/patches/binutils/2.17/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000..7c24796 --- /dev/null +++ b/patches/binutils/2.17/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -dur binutils-2.17.old/ld/emultempl/elf32.em binutils-2.17/ld/emultempl/elf32.em +--- binutils-2.17.old/ld/emultempl/elf32.em 2006-06-12 15:05:04.000000000 +0200 ++++ binutils-2.17/ld/emultempl/elf32.em 2007-05-01 18:26:13.000000000 +0200 +@@ -970,6 +970,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; +@@ -1154,6 +1156,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/patches/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch b/patches/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch new file mode 100644 index 0000000..0a4980b --- /dev/null +++ b/patches/binutils/2.17/400-mips-ELF_MAXPAGESIZE-4K.patch @@ -0,0 +1,28 @@ +diff -dur binutils-2.17.old/bfd/elf32-mips.c binutils-2.17/bfd/elf32-mips.c +--- binutils-2.17.old/bfd/elf32-mips.c 2006-03-22 10:28:13.000000000 +0100 ++++ binutils-2.17/bfd/elf32-mips.c 2007-05-01 18:26:15.000000000 +0200 +@@ -1617,7 +1617,9 @@ + + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses + page sizes of up to that limit, so we need to respect it. */ +-#define ELF_MAXPAGESIZE 0x10000 ++/*#define ELF_MAXPAGESIZE 0x10000*/ ++/* Use 4K to shrink the elf header. NOT for general use! */ ++#define ELF_MAXPAGESIZE 0x1000 + #define elf32_bed elf32_tradbed + + /* Include the target file again for this target. */ +diff -dur binutils-2.17.old/bfd/elfn32-mips.c binutils-2.17/bfd/elfn32-mips.c +--- binutils-2.17.old/bfd/elfn32-mips.c 2005-11-23 15:04:17.000000000 +0100 ++++ binutils-2.17/bfd/elfn32-mips.c 2007-05-01 18:26:15.000000000 +0200 +@@ -2402,7 +2402,9 @@ + + /* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses + page sizes of up to that limit, so we need to respect it. */ +-#define ELF_MAXPAGESIZE 0x10000 ++/*#define ELF_MAXPAGESIZE 0x10000*/ ++/* Use 4K to shrink the elf header. NOT for general use! */ ++#define ELF_MAXPAGESIZE 0x1000 + #define elf32_bed elf32_tradbed + + /* Include the target file again for this target. */ -- cgit v0.10.2-6-g49f6