Skip to content

Commit

Permalink
add optional isl support for advanced loop optimizations
Browse files Browse the repository at this point in the history
isl-0.15 does not work before gcc-5.3.0, for older gcc try isl-0.14.1
  • Loading branch information
Szabolcs Nagy authored and richfelker committed May 22, 2016
1 parent 03bd655 commit 59de5df
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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"

Expand Down
6 changes: 4 additions & 2 deletions config.mak.dist
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions hashes/isl-0.14.1.tar.bz2.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b653327b20e807d1df3a7e2f546ea924f1e030c0 isl-0.14.1.tar.bz2
1 change: 1 addition & 0 deletions hashes/isl-0.15.tar.bz2.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1e30e09a5fc2c9e1aa4bdb8c9c21fdff20a7cd12 isl-0.15.tar.bz2
7 changes: 7 additions & 0 deletions litecross/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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_%:
Expand Down

0 comments on commit 59de5df

Please sign in to comment.