From 24b475841870cc495417619637c42d65381be38e Mon Sep 17 00:00:00 2001 From: oblique Date: Wed, 8 May 2013 19:21:31 +0300 Subject: [PATCH] Add a patch for binutils 2.23.1 Without this patch, binutils fails to compile. This patch will not be needed for binutils 2.24. --- Makefile | 2 +- .../binutils-elf32-xtensa-sec_cache.patch | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 local/patches/binutils-elf32-xtensa-sec_cache.patch diff --git a/Makefile b/Makefile index ec4d440..0465298 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ BINUTILS_VER=2.23.1 BINUTILS_URL=https://ftp.gnu.org/gnu/binutils/binutils-$(BINUTILS_VER).tar.bz2 BINUTILS_TAR=binutils-$(BINUTILS_VER).tar.bz2 BINUTILS_DIR=binutils-$(BINUTILS_VER) -BINUTILS_PATCHES=local/patches/binutils.patch +BINUTILS_PATCHES=local/patches/binutils.patch local/patches/binutils-elf32-xtensa-sec_cache.patch GCC_VER=4.7.2 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2 diff --git a/local/patches/binutils-elf32-xtensa-sec_cache.patch b/local/patches/binutils-elf32-xtensa-sec_cache.patch new file mode 100644 index 0000000..facf709 --- /dev/null +++ b/local/patches/binutils-elf32-xtensa-sec_cache.patch @@ -0,0 +1,20 @@ +--- a/bfd/elf32-xtensa.c 2012-06-29 17:46:01.000000000 +0300 ++++ b/bfd/elf32-xtensa.c 2013-05-08 19:16:39.436716824 +0300 +@@ -6075,7 +6075,7 @@ + release_internal_relocs (sec_cache->sec, sec_cache->relocs); + if (sec_cache->ptbl) + free (sec_cache->ptbl); +- memset (sec_cache, 0, sizeof (sec_cache)); ++ memset (sec_cache, 0, sizeof (*sec_cache)); + } + } + +@@ -6117,7 +6117,7 @@ + + /* Fill in the new section cache. */ + clear_section_cache (sec_cache); +- memset (sec_cache, 0, sizeof (sec_cache)); ++ memset (sec_cache, 0, sizeof (*sec_cache)); + + sec_cache->sec = sec; + sec_cache->contents = contents; -- 2.25.1