From 59de5df53512b466eb78488611abcfe8a41b015e Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sun, 22 May 2016 13:27:05 +0200 Subject: [PATCH] add optional isl support for advanced loop optimizations isl-0.15 does not work before gcc-5.3.0, for older gcc try isl-0.14.1 --- Makefile | 6 +++++- config.mak.dist | 6 ++++-- hashes/isl-0.14.1.tar.bz2.sha1 | 1 + hashes/isl-0.15.tar.bz2.sha1 | 1 + litecross/Makefile | 7 +++++++ 5 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 hashes/isl-0.14.1.tar.bz2.sha1 create mode 100644 hashes/isl-0.15.tar.bz2.sha1 diff --git a/Makefile b/Makefile index 32410c6..d88f880 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ BINUTILS_SITE = $(GNU_SITE)/binutils GMP_SITE = $(GNU_SITE)/gmp MPC_SITE = $(GNU_SITE)/mpc MPFR_SITE = $(GNU_SITE)/mpfr +ISL_SITE = http://isl.gforge.inria.fr/ MUSL_SITE = https://www.musl-libc.org/releases MUSL_REPO = git://git.musl-libc.org/musl @@ -31,12 +32,13 @@ SRC_DIRS = gcc-$(GCC_VER) binutils-$(BINUTILS_VER) musl-$(MUSL_VER) \ $(if $(GMP_VER),gmp-$(GMP_VER)) \ $(if $(MPC_VER),mpc-$(MPC_VER)) \ $(if $(MPFR_VER),mpfr-$(MPFR_VER)) \ + $(if $(ISL_VER),isl-$(ISL_VER)) \ $(if $(LINUX_VER),linux-$(LINUX_VER)) all: clean: - rm -rf gcc-* binutils-* musl-* gmp-* mpc-* mpfr-* build-* linux-* + rm -rf gcc-* binutils-* musl-* gmp-* mpc-* mpfr-* isl-* build-* linux-* distclean: clean rm -rf sources @@ -50,6 +52,7 @@ ifeq ($(SOURCES),sources) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/gmp*)): SITE = $(GMP_SITE) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/mpc*)): SITE = $(MPC_SITE) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/mpfr*)): SITE = $(MPFR_SITE) +$(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/isl*)): SITE = $(ISL_SITE) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/binutils*)): SITE = $(BINUTILS_SITE) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/gcc*)): SITE = $(GCC_SITE)/$(basename $(basename $(notdir $@))) $(patsubst hashes/%.sha1,$(SOURCES)/%,$(wildcard hashes/musl*)): SITE = $(MUSL_SITE) @@ -145,6 +148,7 @@ $(BUILD_DIR)/config.mak: | $(BUILD_DIR) $(if $(GMP_VER),"GMP_SRCDIR = ../gmp-$(GMP_VER)") \ $(if $(MPC_VER),"MPC_SRCDIR = ../mpc-$(MPC_VER)") \ $(if $(MPFR_VER),"MPFR_SRCDIR = ../mpfr-$(MPFR_VER)") \ + $(if $(ISL_VER),"ISL_SRCDIR = ../isl-$(ISL_VER)") \ $(if $(LINUX_VER),"LINUX_SRCDIR = ../linux-$(LINUX_VER)") \ "-include ../config.mak" diff --git a/config.mak.dist b/config.mak.dist index b78c9bd..ccbc194 100644 --- a/config.mak.dist +++ b/config.mak.dist @@ -26,8 +26,9 @@ # components are used. You can override those here, but the version selected # must be supported (under hashes/ and patches/) to work. For musl, you # can use "git-refname" (e.g. git-master) instead of a release. Setting a -# blank version for gmp, mpc, and mpfr will suppress download and in-tree -# build of these libraries and instead depend on pre-installed libraries. +# blank version for gmp, mpc, mpfr and isl will suppress download and +# in-tree build of these libraries and instead depend on pre-installed +# libraries when available (isl is optional and not set by default). # Setting a blank version for linux will suppress installation of kernel # headers, which are not needed unless compiling programs that use them. @@ -37,6 +38,7 @@ # GMP_VER = # MPC_VER = # MPFR_VER = +# ISL_VER = # LINUX_VER = # Something like the following can be used to produce a static-linked diff --git a/hashes/isl-0.14.1.tar.bz2.sha1 b/hashes/isl-0.14.1.tar.bz2.sha1 new file mode 100644 index 0000000..6dfa5f4 --- /dev/null +++ b/hashes/isl-0.14.1.tar.bz2.sha1 @@ -0,0 +1 @@ +b653327b20e807d1df3a7e2f546ea924f1e030c0 isl-0.14.1.tar.bz2 diff --git a/hashes/isl-0.15.tar.bz2.sha1 b/hashes/isl-0.15.tar.bz2.sha1 new file mode 100644 index 0000000..3837d72 --- /dev/null +++ b/hashes/isl-0.15.tar.bz2.sha1 @@ -0,0 +1 @@ +1e30e09a5fc2c9e1aa4bdb8c9c21fdff20a7cd12 isl-0.15.tar.bz2 diff --git a/litecross/Makefile b/litecross/Makefile index 27f3676..aa3ba5f 100644 --- a/litecross/Makefile +++ b/litecross/Makefile @@ -117,6 +117,12 @@ src_mpfr: | $(MPFR_SRCDIR) ln -sf "$(MPFR_SRCDIR)" $@ endif +ifneq ($(ISL_SRCDIR),) +src_toolchain: src_isl +src_isl: | $(ISL_SRCDIR) + ln -sf "$(ISL_SRCDIR)" $@ +endif + src_toolchain: src_binutils src_gcc rm -rf $@ $@.tmp mkdir $@.tmp @@ -125,6 +131,7 @@ src_toolchain: src_binutils src_gcc $(if $(GMP_SRCDIR),cd $@.tmp && ln -sf ../src_gmp gmp) $(if $(MPC_SRCDIR),cd $@.tmp && ln -sf ../src_mpc mpc) $(if $(MPFR_SRCDIR),cd $@.tmp && ln -sf ../src_mpfr mpfr) + $(if $(ISL_SRCDIR),cd $@.tmp && ln -sf ../src_isl isl) mv $@.tmp $@ obj_%: