From: Christian Lamparter Date: Fri, 31 May 2013 15:24:11 +0000 (+0200) Subject: carl9170 toolchain: toolchain updates X-Git-Tag: 1.9.9~46 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=f2868fcfc9ff92b55707705375e1c9dfe20ed3fe;p=carl9170fw.git carl9170 toolchain: toolchain updates + update to gcc-4.8.1 + delete source files which failed the sha256 check + automatic parallel build of the toolchain Signed-off-by: Christian Lamparter --- diff --git a/toolchain/Makefile b/toolchain/Makefile index ed3dcae..3e29f8d 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -6,61 +6,63 @@ NEWLIB_VER=2.0.0 NEWLIB_TAR=newlib-$(NEWLIB_VER).tar.gz NEWLIB_URL="ftp://sourceware.org/pub/newlib/$(NEWLIB_TAR)" -GCC_VER=4.8.0 +GCC_VER=4.8.1 GCC_TAR=gcc-$(GCC_VER).tar.bz2 GCC_URL="http://mirrors.kernel.org/gnu/gcc/gcc-$(GCC_VER)/$(GCC_TAR)" +JOBS?=$(shell grep -c ^processor /proc/cpuinfo) + BASEDIR=$(shell pwd) define checksum @if grep -q ' $(subst .,\.,$(1))$$' SHA256SUMS; then \ - grep ' $(subst .,\.,$(1))$$' SHA256SUMS | sha256sum -c; \ + grep ' $(subst .,\.,$(1))$$' SHA256SUMS | sha256sum -c || rm $(1); \ else \ echo "WARNING: no checksum defined for $(1)"; \ fi endef -all: gcc +all: clean gcc src/$(BINUTILS_TAR): - wget -P src $(BINUTILS_URL) + wget -P "$(BASEDIR)/src" $(BINUTILS_URL) $(call checksum,$@) src/$(NEWLIB_TAR): - wget -P src $(NEWLIB_URL) + wget -P "$(BASEDIR)/src" $(NEWLIB_URL) $(call checksum,$@) src/$(GCC_TAR): - wget -P src $(GCC_URL) + wget -P "$(BASEDIR)/src" $(GCC_URL) $(call checksum,$@) src/binutils-$(BINUTILS_VER): src/$(BINUTILS_TAR) - tar -C src -xf $< + tar -C "$(BASEDIR)/src" -xf $< src/newlib-$(NEWLIB_VER): src/$(NEWLIB_TAR) - tar -C src -xf $< + tar -C "$(BASEDIR)/src" -xf $< src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER) - tar -C src -xf $< + tar -C "$(BASEDIR)/src" -xf $< ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/newlib $@ ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss $@ binutils: src/binutils-$(BINUTILS_VER) - mkdir -p build/binutils - cd build/binutils; \ + mkdir -p "$(BASEDIR)/build/binutils" + cd "$(BASEDIR)/build/binutils"; \ $(BASEDIR)/$