From: Jason Self Date: Sun, 5 Nov 2017 16:18:00 +0000 (+0100) Subject: carl9170 firmware toolchain: include GMP, MPFR and MPC into toolchain built X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=660d54a3566878bb50797edc1fdab68127a4cd48;p=carl9170fw.git carl9170 firmware toolchain: include GMP, MPFR and MPC into toolchain built [Updated to the latest releases and modified from the provided diff... including other changes] Signed-off-by: Christian Lamparter --- diff --git a/toolchain/Makefile b/toolchain/Makefile index 9c2677b..5ebb9f7 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -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)/$