1.1 --- a/config/companion_libs.in Mon May 13 15:00:56 2013 +0800
1.2 +++ b/config/companion_libs.in Sat May 04 00:08:34 2013 +0200
1.3 @@ -22,6 +22,11 @@
1.4 select PPL
1.5 select COMPLIBS_NEEDED
1.6
1.7 +config ISL_NEEDED
1.8 + bool
1.9 + select ISL
1.10 + select COMPLIBS_NEEDED
1.11 +
1.12 config CLOOG_NEEDED
1.13 bool
1.14 select CLOOG
1.15 @@ -54,6 +59,11 @@
1.16 select GMP
1.17 select COMPLIBS
1.18
1.19 +config ISL
1.20 + bool
1.21 + select GMP
1.22 + select COMPLIBS
1.23 +
1.24 config CLOOG
1.25 bool
1.26 select GMP
1.27 @@ -82,6 +92,9 @@
1.28 if PPL
1.29 source "config/companion_libs/ppl.in"
1.30 endif
1.31 +if ISL
1.32 +source "config/companion_libs/isl.in"
1.33 +endif
1.34 if CLOOG
1.35 source "config/companion_libs/cloog.in"
1.36 endif
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/companion_libs/isl.in Sat May 04 00:08:34 2013 +0200
2.3 @@ -0,0 +1,19 @@
2.4 +# ISL options
2.5 +
2.6 +choice
2.7 + bool
2.8 + prompt "ISL version"
2.9 +# Don't remove next line
2.10 +# CT_INSERT_VERSION_BELOW
2.11 +
2.12 +config ISL_V_0_11_1
2.13 + bool
2.14 + prompt "0.11.1"
2.15 +
2.16 +endchoice
2.17 +
2.18 +config ISL_VERSION
2.19 + string
2.20 +# Don't remove next line
2.21 +# CT_INSERT_VERSION_STRING_BELOW
2.22 + default "0.11.1" if ISL_V_0_11_1
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/scripts/build/companion_libs/121-isl.sh Sat May 04 00:08:34 2013 +0200
3.3 @@ -0,0 +1,128 @@
3.4 +# This file adds the functions to build the ISL library
3.5 +# Copyright 2009 Yann E. MORIN
3.6 +# Licensed under the GPL v2. See COPYING in the root of this package
3.7 +
3.8 +do_isl_get() { :; }
3.9 +do_isl_extract() { :; }
3.10 +do_isl_for_build() { :; }
3.11 +do_isl_for_host() { :; }
3.12 +
3.13 +# Overide functions depending on configuration
3.14 +if [ "${CT_ISL}" = "y" ]; then
3.15 +
3.16 +# Download ISL
3.17 +do_isl_get() {
3.18 + CT_GetFile "isl-${CT_ISL_VERSION}" \
3.19 + ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/
3.20 +}
3.21 +
3.22 +# Extract ISL
3.23 +do_isl_extract() {
3.24 + CT_Extract "isl-${CT_ISL_VERSION}"
3.25 + CT_Patch "isl" "${CT_ISL_VERSION}"
3.26 +}
3.27 +
3.28 +# Build ISL for running on build
3.29 +# - always build statically
3.30 +# - we do not have build-specific CFLAGS
3.31 +# - install in build-tools prefix
3.32 +do_isl_for_build() {
3.33 + local -a isl_opts
3.34 + local isl_cflags
3.35 + local isl_cxxflags
3.36 +
3.37 + case "${CT_TOOLCHAIN_TYPE}" in
3.38 + native|cross) return 0;;
3.39 + esac
3.40 +
3.41 + CT_DoStep INFO "Installing ISL for build"
3.42 + CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-build-${CT_BUILD}"
3.43 +
3.44 + isl_cflags="${CT_CFLAGS_FOR_BUILD}"
3.45 + isl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
3.46 +
3.47 + isl_opts+=( "host=${CT_BUILD}" )
3.48 + isl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
3.49 + isl_opts+=( "cflags=${isl_cflags}" )
3.50 + isl_opts+=( "cxxflags=${isl_cxxflags}" )
3.51 + isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
3.52 + do_isl_backend "${isl_opts[@]}"
3.53 +
3.54 + CT_Popd
3.55 + CT_EndStep
3.56 +}
3.57 +
3.58 +# Build ISL for running on host
3.59 +do_isl_for_host() {
3.60 + local -a isl_opts
3.61 + local isl_cflags
3.62 + local isl_cxxflags
3.63 +
3.64 + CT_DoStep INFO "Installing ISL for host"
3.65 + CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-host-${CT_HOST}"
3.66 +
3.67 + isl_cflags="${CT_CFLAGS_FOR_HOST}"
3.68 + isl_cxxflags="${CT_CFLAGS_FOR_HOST}"
3.69 +
3.70 + isl_opts+=( "host=${CT_HOST}" )
3.71 + isl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
3.72 + isl_opts+=( "cflags=${isl_cflags}" )
3.73 + isl_opts+=( "cxxflags=${isl_cxxflags}" )
3.74 + isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
3.75 + do_isl_backend "${isl_opts[@]}"
3.76 +
3.77 + CT_Popd
3.78 + CT_EndStep
3.79 +}
3.80 +
3.81 +# Build ISL
3.82 +# Parameter : description : type : default
3.83 +# host : machine to run on : tuple : (none)
3.84 +# prefix : prefix to install into : dir : (none)
3.85 +# cflags : cflags to use : string : (empty)
3.86 +# ldflags : ldflags to use : string : (empty)
3.87 +do_isl_backend() {
3.88 + local host
3.89 + local prefix
3.90 + local cflags
3.91 + local cxxflags
3.92 + local ldflags
3.93 + local arg
3.94 +
3.95 + for arg in "$@"; do
3.96 + eval "${arg// /\\ }"
3.97 + done
3.98 +
3.99 + CT_DoLog EXTRA "Configuring ISL"
3.100 +
3.101 + CT_DoExecLog CFG \
3.102 + CFLAGS="${cflags}" \
3.103 + CXXFLAGS="${cxxflags}" \
3.104 + LDFLAGS="${ldflags}" \
3.105 + "${CT_SRC_DIR}/isl-${CT_ISL_VERSION}/configure" \
3.106 + --build=${CT_BUILD} \
3.107 + --host=${host} \
3.108 + --prefix="${prefix}" \
3.109 + --with-libgmp-prefix="${prefix}" \
3.110 + --with-libgmpxx-prefix="${prefix}" \
3.111 + --with-gmp-prefix="${prefix}" \
3.112 + --disable-shared \
3.113 + --enable-static \
3.114 + --with-gmp=system \
3.115 + --with-gmp-prefix="${prefix}" \
3.116 + --with-piplib=no \
3.117 + --with-clang=no
3.118 +
3.119 + CT_DoLog EXTRA "Building ISL"
3.120 + CT_DoExecLog ALL make ${JOBSFLAGS}
3.121 +
3.122 + if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
3.123 + CT_DoLog EXTRA "Checking ISL"
3.124 + CT_DoExecLog ALL make ${JOBSFLAGS} -s check
3.125 + fi
3.126 +
3.127 + CT_DoLog EXTRA "Installing ISL"
3.128 + CT_DoExecLog ALL make install
3.129 +}
3.130 +
3.131 +fi # CT_ISL