diff options
Diffstat (limited to 'scripts/build/companion_libs')
-rw-r--r-- | scripts/build/companion_libs/cloog.sh | 63 | ||||
-rw-r--r-- | scripts/build/companion_libs/gmp.sh | 19 | ||||
-rw-r--r-- | scripts/build/companion_libs/mpc.sh | 57 | ||||
-rw-r--r-- | scripts/build/companion_libs/mpfr.sh | 8 | ||||
-rw-r--r-- | scripts/build/companion_libs/ppl.sh | 17 |
5 files changed, 141 insertions, 23 deletions
diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh new file mode 100644 index 0000000..0e6d74f --- /dev/null +++ b/scripts/build/companion_libs/cloog.sh @@ -0,0 +1,63 @@ +# This file adds the functions to build the CLooG library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_cloog_get() { :; } +do_cloog_extract() { :; } +do_cloog() { :; } +do_cloog_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + +# Download CLooG +do_cloog_get() { + CT_GetFile "cloog-ppl-${CT_CLOOG_VERSION}" \ + ftp://gcc.gnu.org/pub/gcc/infrastructure +} + +# Extract CLooG +do_cloog_extract() { + CT_Extract "cloog-ppl-${CT_CLOOG_VERSION}" + CT_Pushd "${CT_SRC_DIR}/cloog-ppl" + CT_Patch "cloog-ppl-${CT_CLOOG_VERSION}" nochdir + CT_Popd +} + +do_cloog() { + mkdir -p "${CT_BUILD_DIR}/build-cloog-ppl" + cd "${CT_BUILD_DIR}/build-cloog-ppl" + + CT_DoStep INFO "Installing CLooG/ppl" + + CT_DoLog EXTRA "Configuring CLooG/ppl" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/cloog-ppl/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-ppl="${CT_PREFIX_DIR}" \ + --enable-shared \ + --disable-static \ + --with-bits=gmp + + CT_DoLog EXTRA "Building CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking CLooG/ppl" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing CLooG/ppl" + CT_DoExecLog ALL make install + + # Remove spuriously installed file + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/cloog" + + CT_EndStep +} + +fi # CT_PPL_CLOOG_MPC diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index a3dd4a0..6371b45 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -22,8 +22,6 @@ do_gmp_extract() { } do_gmp() { - local opts - local cflags mkdir -p "${CT_BUILD_DIR}/build-gmp" cd "${CT_BUILD_DIR}/build-gmp" @@ -32,27 +30,22 @@ do_gmp() { CT_DoLog EXTRA "Configuring GMP" - if [ "${CT_PPL_CLOOG}" = "y" ]; then - opts="--enable-cxx" - cflags="-fexceptions" - fi - - CFLAGS="${CT_CFLAGS_FOR_HOST} ${cflags}" \ + CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ --prefix="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --enable-fft \ --enable-mpbsd \ - ${opts} + --enable-cxx CT_DoLog EXTRA "Building GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_GMP_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking GMP" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi @@ -63,7 +56,7 @@ do_gmp() { CT_EndStep } -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then do_gmp_target() { mkdir -p "${CT_BUILD_DIR}/build-gmp-target" diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh new file mode 100644 index 0000000..18144a0 --- /dev/null +++ b/scripts/build/companion_libs/mpc.sh @@ -0,0 +1,57 @@ +# This file adds the functions to build the MPC library +# Copyright 2009 Yann E. MORIN +# Licensed under the GPL v2. See COPYING in the root of this package + +do_mpc_get() { :; } +do_mpc_extract() { :; } +do_mpc() { :; } +do_mpc_target() { :; } + +# Overide functions depending on configuration +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then + +# Download MPC +do_mpc_get() { + CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz \ + http://www.multiprecision.org/mpc/download +} + +# Extract MPC +do_mpc_extract() { + CT_Extract "mpc-${CT_MPC_VERSION}" + CT_Patch "mpc-${CT_MPC_VERSION}" +} + +do_mpc() { + mkdir -p "${CT_BUILD_DIR}/build-mpc" + cd "${CT_BUILD_DIR}/build-mpc" + + CT_DoStep INFO "Installing MPC" + + CT_DoLog EXTRA "Configuring MPC" + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CT_DoExecLog ALL \ + "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-gmp="${CT_PREFIX_DIR}" \ + --with-mpfr="${CT_PREFIX_DIR}" \ + --enable-shared \ + --disable-static \ + + CT_DoLog EXTRA "Building MPC" + CT_DoExecLog ALL make ${PARALLELMFLAGS} + + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then + CT_DoLog EXTRA "Checking MPC" + CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check + fi + + CT_DoLog EXTRA "Installing MPC" + CT_DoExecLog ALL make install + + CT_EndStep +} + +fi # CT_PPL_CLOOG_MPC diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index e302ff7..85d0942 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -77,14 +77,14 @@ do_mpfr() { --host=${CT_HOST} \ --prefix="${CT_PREFIX_DIR}" \ ${mpfr_opt} \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --with-gmp="${CT_PREFIX_DIR}" CT_DoLog EXTRA "Building MPFR" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_MPFR_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking MPFR" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi @@ -95,7 +95,7 @@ do_mpfr() { CT_EndStep } -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then +if [ "${CT_COMP_LIBS_TARGET}" = "y" ]; then do_mpfr_target() { mkdir -p "${CT_BUILD_DIR}/build-mpfr-target" diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index d3246f9..4af080b 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -8,13 +8,14 @@ do_ppl() { :; } do_ppl_target() { :; } # Overide functions depending on configuration -if [ "${CT_PPL_CLOOG}" = "y" ]; then +if [ "${CT_PPL_CLOOG_MPC}" = "y" ]; then # Download PPL do_ppl_get() { CT_GetFile "ppl-${CT_PPL_VERSION}" \ http://www.cs.unipr.it/ppl/Download/ftp/releases/${CT_PPL_VERSION} \ - ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} + ftp://ftp.cs.unipr.it/pub/ppl/releases/${CT_PPL_VERSION} \ + ftp://gcc.gnu.org/pub/gcc/infrastructure } # Extract PPL @@ -31,6 +32,7 @@ do_ppl() { CT_DoLog EXTRA "Configuring PPL" CFLAGS="${CT_CFLAGS_FOR_HOST}" \ + CXXFLAGS="${CT_CFLAGS_FOR_HOST}" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \ --build=${CT_BUILD} \ @@ -38,8 +40,8 @@ do_ppl() { --prefix="${CT_PREFIX_DIR}" \ --with-libgmp-prefix="${CT_PREFIX_DIR}" \ --with-libgmpxx-prefix="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ + --enable-shared \ + --disable-static \ --disable-debugging \ --disable-assertions \ --disable-ppl_lcdd \ @@ -52,7 +54,7 @@ do_ppl() { CT_DoLog EXTRA "Building PPL" CT_DoExecLog ALL make ${PARALLELMFLAGS} - if [ "${CT_PPL_CHECK}" = "y" ]; then + if [ "${CT_COMP_LIBS_CHECK}" = "y" ]; then CT_DoLog EXTRA "Checking PPL" CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check fi @@ -60,7 +62,10 @@ do_ppl() { CT_DoLog EXTRA "Installing PPL" CT_DoExecLog ALL make install + # Remove spuriously installed file + CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/bin/ppl-config" + CT_EndStep } -fi # CT_PPL_CLOOG +fi # CT_PPL_CLOOG_MPC |