1.1 --- a/config/companion_libs.in Sun May 05 17:59:00 2013 +0200
1.2 +++ b/config/companion_libs.in Sun May 05 00:01:05 2013 +0200
1.3 @@ -67,7 +67,6 @@
1.4 config CLOOG
1.5 bool
1.6 select GMP
1.7 - select PPL
1.8 select COMPLIBS
1.9
1.10 config MPC
2.1 --- a/config/companion_libs/cloog.in Sun May 05 17:59:00 2013 +0200
2.2 +++ b/config/companion_libs/cloog.in Sun May 05 00:01:05 2013 +0200
2.3 @@ -2,10 +2,22 @@
2.4
2.5 choice
2.6 bool
2.7 - prompt "CLooG/ppl version"
2.8 + prompt "CLooG version"
2.9 +
2.10 +if ISL
2.11 +
2.12 # Don't remove next line
2.13 # CT_INSERT_VERSION_BELOW
2.14
2.15 +config CLOOG_V_0_18_0
2.16 + bool
2.17 + prompt "0.18.0"
2.18 + select CLOOG_0_18_or_later
2.19 +
2.20 +endif # ISL
2.21 +
2.22 +if PPL
2.23 +
2.24 config CLOOG_V_0_15_11
2.25 bool
2.26 prompt "0.15.11"
2.27 @@ -32,12 +44,15 @@
2.28 bool
2.29 prompt "0.15.6"
2.30
2.31 +endif # PPL
2.32 +
2.33 endchoice
2.34
2.35 config CLOOG_VERSION
2.36 string
2.37 # Don't remove next line
2.38 # CT_INSERT_VERSION_STRING_BELOW
2.39 + default "0.18.0" if CLOOG_V_0_18_0
2.40 default "0.15.11" if CLOOG_V_0_15_11
2.41 default "0.15.10" if CLOOG_V_0_15_10
2.42 default "0.15.9" if CLOOG_V_0_15_9
2.43 @@ -45,6 +60,9 @@
2.44 default "0.15.7" if CLOOG_V_0_15_7
2.45 default "0.15.6" if CLOOG_V_0_15_6
2.46
2.47 +config CLOOG_0_18_or_later
2.48 + bool
2.49 +
2.50 config CLOOG_0_15_1x
2.51 bool
2.52 select CLOOG_NEEDS_AUTORECONF
3.1 --- a/scripts/build/companion_libs/130-cloog.sh Sun May 05 17:59:00 2013 +0200
3.2 +++ b/scripts/build/companion_libs/130-cloog.sh Sun May 05 00:01:05 2013 +0200
3.3 @@ -7,12 +7,24 @@
3.4 do_cloog_for_build() { :; }
3.5 do_cloog_for_host() { :; }
3.6
3.7 +cloog_basename() {
3.8 + printf "cloog"
3.9 + if [ "${CT_PPL}" = "y" ]; then
3.10 + printf -- "-ppl"
3.11 + fi
3.12 +}
3.13 +cloog_basename_version() {
3.14 + cloog_basename
3.15 + printf -- "-${CT_CLOOG_VERSION}"
3.16 +}
3.17 +
3.18 # Overide functions depending on configuration
3.19 if [ "${CT_CLOOG}" = "y" ]; then
3.20
3.21 # Download CLooG
3.22 do_cloog_get() {
3.23 - CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \
3.24 + CT_GetFile "$(cloog_basename_version)" \
3.25 + http://www.bastoul.net/cloog/pages/download \
3.26 ftp://gcc.gnu.org/pub/gcc/infrastructure
3.27 }
3.28
3.29 @@ -24,20 +36,20 @@
3.30 # while versions 0.15.4 onward do have the version in the dirname.
3.31 # But, because the infrastructure properly creates the extracted
3.32 # directories (with tar's --strip-components), we can live safely...
3.33 - CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}"
3.34 - CT_Patch "cloog-ppl" "${CT_CLOOG_VERSION}"
3.35 + CT_Extract "$(cloog_basename_version)"
3.36 + CT_Patch "$(cloog_basename)" "${CT_CLOOG_VERSION}"
3.37
3.38 # Help the autostuff in case it thinks there are things to regenerate...
3.39 - CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}/m4"
3.40 + CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/$(cloog_basename_version)/m4"
3.41
3.42 if [ "${CT_CLOOG_NEEDS_AUTORECONF}" = "y" ]; then
3.43 - CT_Pushd "${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
3.44 + CT_Pushd "${CT_SRC_DIR}/$(cloog_basename_version)"
3.45 CT_DoExecLog CFG ./autogen.sh
3.46 CT_Popd
3.47 fi
3.48 }
3.49
3.50 -# Build CLooG/PPL for running on build
3.51 +# Build CLooG for running on build
3.52 # - always build statically
3.53 # - we do not have build-specific CFLAGS
3.54 # - install in build-tools prefix
3.55 @@ -48,8 +60,8 @@
3.56 native|cross) return 0;;
3.57 esac
3.58
3.59 - CT_DoStep INFO "Installing CLooG/PPL for build"
3.60 - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-build-${CT_BUILD}"
3.61 + CT_DoStep INFO "Installing CLooG for build"
3.62 + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-build-${CT_BUILD}"
3.63
3.64 cloog_opts+=( "host=${CT_BUILD}" )
3.65 cloog_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
3.66 @@ -61,12 +73,12 @@
3.67 CT_EndStep
3.68 }
3.69
3.70 -# Build CLooG/PPL for running on host
3.71 +# Build CLooG for running on host
3.72 do_cloog_for_host() {
3.73 local -a cloog_opts
3.74
3.75 - CT_DoStep INFO "Installing CLooG/PPL for host"
3.76 - CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-ppl-host-${CT_HOST}"
3.77 + CT_DoStep INFO "Installing CLooG for host"
3.78 + CT_mkdir_pushd "${CT_BUILD_DIR}/build-cloog-host-${CT_HOST}"
3.79
3.80 cloog_opts+=( "host=${CT_HOST}" )
3.81 cloog_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
3.82 @@ -78,7 +90,7 @@
3.83 CT_EndStep
3.84 }
3.85
3.86 -# Build ClooG/PPL
3.87 +# Build CLooG
3.88 # Parameter : description : type : default
3.89 # host : machine to run on : tuple : (none)
3.90 # prefix : prefix to install into : dir : (none)
3.91 @@ -89,14 +101,30 @@
3.92 local prefix
3.93 local cflags
3.94 local ldflags
3.95 - local cloog_src_dir="${CT_SRC_DIR}/cloog-ppl-${CT_CLOOG_VERSION}"
3.96 + local cloog_src_dir="${CT_SRC_DIR}/$(cloog_basename_version)"
3.97 local arg
3.98 + local -a cloog_opts
3.99 + local -a cloog_targets
3.100 + local -a cloog_install_targets
3.101
3.102 for arg in "$@"; do
3.103 eval "${arg// /\\ }"
3.104 done
3.105
3.106 - CT_DoLog EXTRA "Configuring CLooG/ppl"
3.107 + if [ "${CT_CLOOG_0_18_or_later}" = y ]; then
3.108 + cloog_opts+=( --with-gmp=system --with-gmp-prefix="${prefix}" )
3.109 + cloog_opts+=( --with-isl=system --with-isl-prefix="${prefix}" )
3.110 + cloog_opts+=( --without-osl )
3.111 + cloog_targets=( all )
3.112 + cloog_install_targets=( install )
3.113 + else
3.114 + cloog_opts+=( --with-gmp="${prefix}" )
3.115 + cloog_opts+=( --with-ppl="${prefix}" )
3.116 + cloog_targets=( libcloog.la )
3.117 + cloog_install_targets=( install-libLTLIBRARIES install-pkgincludeHEADERS )
3.118 + fi
3.119 +
3.120 + CT_DoLog EXTRA "Configuring CLooG"
3.121
3.122 CT_DoExecLog CFG \
3.123 CFLAGS="${cflags}" \
3.124 @@ -106,23 +134,22 @@
3.125 --build=${CT_BUILD} \
3.126 --host=${host} \
3.127 --prefix="${prefix}" \
3.128 - --with-gmp="${prefix}" \
3.129 - --with-ppl="${prefix}" \
3.130 --with-bits=gmp \
3.131 --with-host-libstdcxx='-lstdc++' \
3.132 --disable-shared \
3.133 - --enable-static
3.134 + --enable-static \
3.135 + "${cloog_opts[@]}"
3.136
3.137 - CT_DoLog EXTRA "Building CLooG/ppl"
3.138 - CT_DoExecLog ALL make ${JOBSFLAGS} libcloog.la
3.139 + CT_DoLog EXTRA "Building CLooG"
3.140 + CT_DoExecLog ALL make ${JOBSFLAGS} "${cloog_targets[@]}"
3.141
3.142 if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
3.143 - CT_DoLog EXTRA "Checking CLooG/ppl"
3.144 + CT_DoLog EXTRA "Checking CLooG"
3.145 CT_DoExecLog ALL make ${JOBSFLAGS} -s check
3.146 fi
3.147
3.148 - CT_DoLog EXTRA "Installing CLooG/ppl"
3.149 - CT_DoExecLog ALL make install-libLTLIBRARIES install-pkgincludeHEADERS
3.150 + CT_DoLog EXTRA "Installing CLooG"
3.151 + CT_DoExecLog ALL make "${cloog_install_targets[@]}"
3.152 }
3.153
3.154 fi # CT_CLOOG