From: Imre Kaloz Date: Wed, 8 Feb 2012 15:49:48 +0000 (+0000) Subject: add binutils 2.22 X-Git-Tag: reboot~14973 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=09a8334a1e36e2610a01a726fd41383d0870038a;p=openwrt%2Fopenwrt.git add binutils 2.22 SVN-Revision: 30375 --- diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index bfbb8b715f..50ee615a04 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -24,6 +24,11 @@ choice depends !avr32 || (avr32 && BROKEN) bool "binutils 2.21.1" + config BINUTILS_VERSION_2_22 + depends !ubicom32 + depends !avr32 + bool "binutils 2.22" + endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS @@ -40,5 +45,6 @@ config BINUTILS_VERSION default "2.20.1" if BINUTILS_VERSION_2_20_1 default "2.21" if BINUTILS_VERSION_2_21 default "2.21.1" if BINUTILS_VERSION_2_21_1 + default "2.22" if BINUTILS_VERSION_2_22 default "2.19.1" if ubicom32 default "2.20.1" diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index c869568232..0022202d4b 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2012 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -25,6 +25,9 @@ endif ifeq ($(PKG_VERSION),2.21.1) PKG_MD5SUM:=bde820eac53fa3a8d8696667418557ad endif +ifeq ($(PKG_VERSION),2.22) + PKG_MD5SUM:=ee0f10756c84979622b992a4a61ea3f5 +endif PATCH_DIR:=./patches/$(PKG_VERSION) diff --git a/toolchain/binutils/patches/2.22/112-arm-uclibc-gas-needs-libm.patch b/toolchain/binutils/patches/2.22/112-arm-uclibc-gas-needs-libm.patch new file mode 100644 index 0000000000..a9e435701e --- /dev/null +++ b/toolchain/binutils/patches/2.22/112-arm-uclibc-gas-needs-libm.patch @@ -0,0 +1,35 @@ +Source: Khem Raj +Disposition: submit upstream. + +Description: + +We do not need to have the libtool patch anymore for binutils after +libtool has been updated upstream it include support for it. However +for building gas natively on uclibc systems we have to link it with +-lm so that it picks up missing symbols. + +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': +floatformat.c:(.text+0x1ec): undefined reference to `frexp' +floatformat.c:(.text+0x2f8): undefined reference to `ldexp' +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': +floatformat.c:(.text+0x38a): undefined reference to `ldexp' +floatformat.c:(.text+0x3d2): undefined reference to `ldexp' +floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp' +collect2: ld returned 1 exit status +make[4]: *** [as-new] Error 1 + +--- a/gas/configure.tgt ++++ b/gas/configure.tgt +@@ -428,6 +428,12 @@ case ${generic_target} in + *-*-netware) fmt=elf em=netware ;; + esac + ++case ${generic_target} in ++ arm-*-*uclibc*) ++ need_libm=yes ++ ;; ++esac ++ + case ${cpu_type} in + alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) + bfd_gas=yes diff --git a/toolchain/binutils/patches/2.22/120-sh-conf.patch b/toolchain/binutils/patches/2.22/120-sh-conf.patch new file mode 100644 index 0000000000..d92ceb52cf --- /dev/null +++ b/toolchain/binutils/patches/2.22/120-sh-conf.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -3570,7 +3570,7 @@ case "${target}" in + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -1006,7 +1006,7 @@ case "${target}" in + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/toolchain/binutils/patches/2.22/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.22/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..aa853ff542 --- /dev/null +++ b/toolchain/binutils/patches/2.22/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -37,7 +37,7 @@ endif + # 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@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS) + # 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/toolchain/binutils/patches/2.22/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.22/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..1e04000340 --- /dev/null +++ b/toolchain/binutils/patches/2.22/300-012_check_ldrunpath_length.patch @@ -0,0 +1,20 @@ +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1273,6 +1273,8 @@ fragment <link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain/binutils/patches/2.22/999-ppc-textrels.patch b/toolchain/binutils/patches/2.22/999-ppc-textrels.patch new file mode 100644 index 0000000000..36e82f56dd --- /dev/null +++ b/toolchain/binutils/patches/2.22/999-ppc-textrels.patch @@ -0,0 +1,74 @@ +http://bugs.gentoo.org/392645 +http://sourceware.org/bugzilla/show_bug.cgi?id=13470 + +2011-12-03 Alan Modra + + PR ld/13470 + * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive + change in 2011-07-01 commit. Comment. + * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. + +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-ppc.c,v +retrieving revision 1.302.2.1 +retrieving revision 1.302.2.2 +--- a/bfd/elf32-ppc.c ++++ b/bfd/elf32-ppc.c +@@ -2987,10 +2987,6 @@ ppc_elf_copy_indirect_symbol (struct bfd + edir->elf.needs_plt |= eind->elf.needs_plt; + edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + if (eind->dyn_relocs != NULL) + { + if (edir->dyn_relocs != NULL) +@@ -3022,6 +3018,16 @@ ppc_elf_copy_indirect_symbol (struct bfd + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over the GOT refcount entries that we may have already seen to + the symbol which just became indirect. */ + edir->elf.got.refcount += eind->elf.got.refcount; +--- a/bfd/elf64-ppc.c ++++ b/bfd/elf64-ppc.c +@@ -4435,10 +4435,6 @@ ppc64_elf_copy_indirect_symbol (struct b + edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak; + edir->elf.needs_plt |= eind->elf.needs_plt; + +- /* If we were called to copy over info for a weak sym, that's all. */ +- if (eind->elf.root.type != bfd_link_hash_indirect) +- return; +- + /* Copy over any dynamic relocs we may have on the indirect sym. */ + if (eind->dyn_relocs != NULL) + { +@@ -4471,6 +4467,16 @@ ppc64_elf_copy_indirect_symbol (struct b + eind->dyn_relocs = NULL; + } + ++ /* If we were called to copy over info for a weak sym, that's all. ++ You might think dyn_relocs need not be copied over; After all, ++ both syms will be dynamic or both non-dynamic so we're just ++ moving reloc accounting around. However, ELIMINATE_COPY_RELOCS ++ code in ppc64_elf_adjust_dynamic_symbol needs to check for ++ dyn_relocs in read-only sections, and it does so on what is the ++ DIR sym here. */ ++ if (eind->elf.root.type != bfd_link_hash_indirect) ++ return; ++ + /* Copy over got entries that we may have already seen to the + symbol which just became indirect. */ + if (eind->elf.got.glist != NULL)