Browse Source

binutils: add 2.27 support, relax choice for blackfin and add required upstream patch

Waldemar Brodkorb 8 years ago
parent
commit
bdd21355f5

+ 6 - 2
target/config/Config.in.binutils

@@ -20,6 +20,12 @@ config ADK_TOOLCHAIN_BINUTILS_GIT
 	depends on !ADK_TARGET_ARCH_CRIS
 	depends on !ADK_TARGET_ARCH_NDS32
 
+config ADK_TOOLCHAIN_BINUTILS_2_27
+	bool "2.27"
+	depends on !ADK_TARGET_ARCH_ARC
+	depends on !ADK_TARGET_ARCH_AVR32
+	depends on !ADK_TARGET_ARCH_NDS32
+
 config ADK_TOOLCHAIN_BINUTILS_2_26_1
 	bool "2.26.1"
 	depends on !ADK_TARGET_ARCH_ARC
@@ -28,7 +34,6 @@ config ADK_TOOLCHAIN_BINUTILS_2_26_1
 
 config ADK_TOOLCHAIN_BINUTILS_2_25_1
 	bool "2.25.1"
-	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_H8300
@@ -38,7 +43,6 @@ config ADK_TOOLCHAIN_BINUTILS_2_25_1
 
 config ADK_TOOLCHAIN_BINUTILS_2_24
 	bool "2.24"
-	depends on !ADK_TARGET_ARCH_BFIN
 	depends on !ADK_TARGET_ARCH_ARC
 	depends on !ADK_TARGET_ARCH_AVR32
 	depends on !ADK_TARGET_ARCH_CRIS

+ 7 - 0
toolchain/binutils/Makefile.inc

@@ -2,6 +2,13 @@
 # material, please see the LICENCE file in the top-level directory.
 
 PKG_NAME:=		binutils
+ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_27),y)
+PKG_VERSION:=		2.27
+PKG_RELEASE:=		1
+PKG_HASH:=		26253bf0f360ceeba1d9ab6965c57c6a48a01a8343382130d1ed47c468a3094f
+PKG_SITES:=		${MASTER_SITE_GNU:=binutils/}
+DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
+endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_26_1),y)
 PKG_VERSION:=		2.26.1
 PKG_RELEASE:=		1

+ 13 - 0
toolchain/binutils/patches/2.24/bfin.patch

@@ -0,0 +1,13 @@
+diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
+index 7cc8b6d..12f0add 100644
+--- a/bfd/elf32-bfin.c
++++ b/bfd/elf32-bfin.c
+@@ -4457,7 +4457,7 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd,
+   if (bfinfdpic_got_section (info))
+     {
+       BFD_ASSERT (bfinfdpic_gotrel_section (info)->size
+-		  == (bfinfdpic_gotrel_section (info)->reloc_count
++		  >= (bfinfdpic_gotrel_section (info)->reloc_count
+ 		      * sizeof (Elf32_External_Rel)));
+ 
+       if (bfinfdpic_gotfixup_section (info))

+ 13 - 0
toolchain/binutils/patches/2.25.1/bfin.patch

@@ -0,0 +1,13 @@
+diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
+index 7cc8b6d..12f0add 100644
+--- a/bfd/elf32-bfin.c
++++ b/bfd/elf32-bfin.c
+@@ -4457,7 +4457,7 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd,
+   if (bfinfdpic_got_section (info))
+     {
+       BFD_ASSERT (bfinfdpic_gotrel_section (info)->size
+-		  == (bfinfdpic_gotrel_section (info)->reloc_count
++		  >= (bfinfdpic_gotrel_section (info)->reloc_count
+ 		      * sizeof (Elf32_External_Rel)));
+ 
+       if (bfinfdpic_gotfixup_section (info))

+ 3 - 0
toolchain/elf2flt/Makefile

@@ -18,6 +18,9 @@ endif
 ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_26_1),y)
 BINUTILS_VERSION:=	2.26.1
 endif
+ifeq ($(ADK_TOOLCHAIN_BINUTILS_2_27),y)
+BINUTILS_VERSION:=	2.27
+endif
 
 $(WRKBUILD)/.configured:
 	(cd $(WRKBUILD); \