Merge pull request #61 from sudoman/sudoman-fixes
authorAdrian Chadd <adrian.chadd@gmail.com>
Mon, 30 Jun 2014 04:12:00 +0000 (21:12 -0700)
committerAdrian Chadd <adrian.chadd@gmail.com>
Mon, 30 Jun 2014 04:12:00 +0000 (21:12 -0700)
minimal changes to fix the toolchain build process on some newer systems

Makefile
local/patches/binutils-elf32-xtensa-sec_cache.patch [new file with mode: 0644]

index ec4d440da6e42e9c2aa5c56678ab319a48e0ec5f..931c8bcc01794d6dd89b0da095a4f1bb28043fd6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,9 +17,9 @@ 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_VER=4.7.4
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2
 GCC_TAR=gcc-$(GCC_VER).tar.bz2
 GCC_DIR=gcc-$(GCC_VER)
@@ -71,7 +71,8 @@ endef
 
 define BINUTILS/Compile
        $(call Common/Compile,BINUTILS, \
-               --target=$(TARGET), \
+               --target=$(TARGET) \
+               --disable-werror, \
                $(MAKE) && $(MAKE) -j1 install \
        )
 endef
diff --git a/local/patches/binutils-elf32-xtensa-sec_cache.patch b/local/patches/binutils-elf32-xtensa-sec_cache.patch
new file mode 100644 (file)
index 0000000..facf709
--- /dev/null
@@ -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;