carl9170 firmware toolchain: include GMP, MPFR and MPC into toolchain built
authorJason Self <jason.self@gmail.com>
Sun, 5 Nov 2017 16:18:00 +0000 (17:18 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 5 Nov 2017 16:26:31 +0000 (17:26 +0100)
[Updated to the latest releases and modified
from the provided diff... including other changes]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
toolchain/Makefile
toolchain/SHA256SUMS

index 9c2677b98fecfe62bffb1299a96cf5f29375df03..5ebb9f7c1ed956531fa792382e1e46fc5587a879 100644 (file)
@@ -10,6 +10,18 @@ GCC_VER=7.2.0
 GCC_TAR=gcc-$(GCC_VER).tar.xz
 GCC_URL="http://mirrors.kernel.org/gnu/gcc/gcc-$(GCC_VER)/$(GCC_TAR)"
 
+MPFR_VER=3.1.6
+MPFR_TAR=mpfr-$(MPFR_VER).tar.xz
+MPFR_URL="http://ftpmirror.gnu.org/gnu/mpfr/$(MPFR_TAR)"
+
+GMP_VER=6.1.2
+GMP_TAR=gmp-$(GMP_VER).tar.xz
+GMP_URL="http://ftpmirror.gnu.org/gnu/gmp/$(GMP_TAR)"
+
+MPC_VER=1.0.3
+MPC_TAR=mpc-$(MPC_VER).tar.gz
+MPC_URL="http://ftpmirror.gnu.org/gnu/mpc/$(MPC_TAR)"
+
 JOBS?=$(shell grep -c ^processor /proc/cpuinfo)
 
 BASEDIR=$(shell pwd)
@@ -24,40 +36,64 @@ endef
 
 all: clean gcc
 
+src/$(MPFR_TAR):
+       wget -P "$(BASEDIR)/src" "$(MPFR_URL)"
+       $(call checksum,$@)
+
+src/$(GMP_TAR):
+       wget -P "$(BASEDIR)/src" "$(GMP_URL)"
+       $(call checksum,$@)
+
+src/$(MPC_TAR):
+       wget -P "$(BASEDIR)/src" "$(MPC_URL)"
+       $(call checksum,$@)
+
 src/$(BINUTILS_TAR):
-       wget -P "$(BASEDIR)/src" $(BINUTILS_URL)
+       wget -P "$(BASEDIR)/src" "$(BINUTILS_URL)"
        $(call checksum,$@)
 
 src/$(NEWLIB_TAR):
-       wget -P "$(BASEDIR)/src" $(NEWLIB_URL)
+       wget -P "$(BASEDIR)/src" "$(NEWLIB_URL)"
        $(call checksum,$@)
 
 src/$(GCC_TAR):
-       wget -P "$(BASEDIR)/src" $(GCC_URL)
+       wget -P "$(BASEDIR)/src" "$(GCC_URL)"
        $(call checksum,$@)
 
+src/mpfr-$(MPFR_VER): src/$(MPFR_TAR)
+       tar -C "$(BASEDIR)/src" -xf "$<"
+
+src/gmp-$(GMP_VER): src/$(GMP_TAR)
+       tar -C "$(BASEDIR)/src" -xf "$<"
+
+src/mpc-$(MPC_VER): src/$(MPC_TAR)
+       tar -C "$(BASEDIR)/src" -xf "$<"
+
 src/binutils-$(BINUTILS_VER): src/$(BINUTILS_TAR)
-       tar -C "$(BASEDIR)/src" -xf $<
+       tar -C "$(BASEDIR)/src" -xf "$<"
 
 src/newlib-$(NEWLIB_VER): src/$(NEWLIB_TAR)
-       tar -C "$(BASEDIR)/src" -xf $<
+       tar -C "$(BASEDIR)/src" -xf "$<"
 
-src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER)
-       tar -C "$(BASEDIR)/src" -xf $<
-       ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/newlib $@
-       ln -s $(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss $@
+src/gcc-$(GCC_VER): src/$(GCC_TAR) src/newlib-$(NEWLIB_VER) src/mpc-$(MPC_VER) src/gmp-$(GMP_VER) src/mpfr-$(MPFR_VER)
+       tar -C "$(BASEDIR)/src" -xf "$<"
+       ln -s "$(BASEDIR)/src/newlib-$(NEWLIB_VER)/newlib" "$@"
+       ln -s "$(BASEDIR)/src/newlib-$(NEWLIB_VER)/libgloss" "$@"
+       ln -s "$(BASEDIR)/src/gmp-$(GMP_VER)" "$@/gmp"
+       ln -s "$(BASEDIR)/src/mpfr-$(MPFR_VER)" "$@/mpfr"
+       ln -s "$(BASEDIR)/src/mpc-$(MPC_VER)" "$@/mpc"
 
 binutils: src/binutils-$(BINUTILS_VER)
        mkdir -p "$(BASEDIR)/build/binutils"
        cd "$(BASEDIR)/build/binutils"; \
-       $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst; \
+       "$(BASEDIR)"/$</configure --target=sh-elf --prefix="$(BASEDIR)/inst"; \
        $(MAKE) -j$(JOBS); \
        $(MAKE) install
 
 gcc: src/gcc-$(GCC_VER) binutils
        mkdir -p "$(BASEDIR)/build/gcc"
        cd "$(BASEDIR)/build/gcc"; \
-       $(BASEDIR)/$</configure --target=sh-elf --prefix=$(BASEDIR)/inst -enable-languages=c --without-pkgversion --with-newlib; \
+       "$(BASEDIR)"/$</configure --target=sh-elf --prefix="$(BASEDIR)/inst" -enable-languages=c --without-pkgversion --with-newlib; \
        $(MAKE) -j$(JOBS); \
        $(MAKE) install
 
index 66e1ef6479ad0e25decceade5019215b01be7472..788588de051fa52c3d9052fcdf21d11dd930e8cc 100644 (file)
@@ -1,3 +1,7 @@
 1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a  src/gcc-7.2.0.tar.xz
 5b76a9b97c9464209772ed25ce55181a7bb144a66e5669aaec945aa64da3189b  src/newlib-2.5.0.tar.gz
 0b871e271c4c620444f8264f72143b4d224aa305306d85dd77ab8dce785b1e85  src/binutils-2.29.tar.xz
+87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912  src/gmp-6.1.2.tar.xz
+617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3  src/mpc-1.0.3.tar.gz
+7a62ac1a04408614fccdc506e4844b10cf0ad2c2b1677097f8f35d3a1344a950  src/mpfr-3.1.6.tar.xz
+