1 # This file adds the functions to build the ISL library
2 # Copyright 2009 Yann E. MORIN
3 # Licensed under the GPL v2. See COPYING in the root of this package
6 do_isl_extract() { :; }
7 do_isl_for_build() { :; }
8 do_isl_for_host() { :; }
10 # Overide functions depending on configuration
11 if [ "${CT_ISL}" = "y" ]; then
15 CT_GetFile "isl-${CT_ISL_VERSION}" \
16 ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/ \
17 http://mirrors.kernel.org/sources.redhat.com/gcc/infrastructure
22 CT_Extract "isl-${CT_ISL_VERSION}"
23 CT_Patch "isl" "${CT_ISL_VERSION}"
26 # Build ISL for running on build
27 # - always build statically
28 # - we do not have build-specific CFLAGS
29 # - install in build-tools prefix
35 case "${CT_TOOLCHAIN_TYPE}" in
36 native|cross) return 0;;
39 CT_DoStep INFO "Installing ISL for build"
40 CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-build-${CT_BUILD}"
42 isl_cflags="${CT_CFLAGS_FOR_BUILD}"
43 isl_cxxflags="${CT_CFLAGS_FOR_BUILD}"
45 isl_opts+=( "host=${CT_BUILD}" )
46 isl_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
47 isl_opts+=( "cflags=${isl_cflags}" )
48 isl_opts+=( "cxxflags=${isl_cxxflags}" )
49 isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
50 do_isl_backend "${isl_opts[@]}"
56 # Build ISL for running on host
62 CT_DoStep INFO "Installing ISL for host"
63 CT_mkdir_pushd "${CT_BUILD_DIR}/build-isl-host-${CT_HOST}"
65 isl_cflags="${CT_CFLAGS_FOR_HOST}"
66 isl_cxxflags="${CT_CFLAGS_FOR_HOST}"
68 isl_opts+=( "host=${CT_HOST}" )
69 isl_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
70 isl_opts+=( "cflags=${isl_cflags}" )
71 isl_opts+=( "cxxflags=${isl_cxxflags}" )
72 isl_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
73 do_isl_backend "${isl_opts[@]}"
80 # Parameter : description : type : default
81 # host : machine to run on : tuple : (none)
82 # prefix : prefix to install into : dir : (none)
83 # cflags : cflags to use : string : (empty)
84 # ldflags : ldflags to use : string : (empty)
97 CT_DoLog EXTRA "Configuring ISL"
101 CXXFLAGS="${cxxflags}" \
102 LDFLAGS="${ldflags}" \
103 "${CT_SRC_DIR}/isl-${CT_ISL_VERSION}/configure" \
104 --build=${CT_BUILD} \
106 --prefix="${prefix}" \
107 --with-libgmp-prefix="${prefix}" \
108 --with-libgmpxx-prefix="${prefix}" \
109 --with-gmp-prefix="${prefix}" \
113 --with-gmp-prefix="${prefix}" \
117 CT_DoLog EXTRA "Building ISL"
118 CT_DoExecLog ALL make ${JOBSFLAGS}
120 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
121 CT_DoLog EXTRA "Checking ISL"
122 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
125 CT_DoLog EXTRA "Installing ISL"
126 CT_DoExecLog ALL make install