diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-10 22:47:23 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-04-10 22:47:23 (GMT) |
commit | 5b27e8de528dbfaa1e3ddd926af26b906db85c3d (patch) | |
tree | 384bcbc175437e3d5a53bbd93f9f91087d0bc7ec /scripts/build/companion_libs/cloog.sh | |
parent | 5b663e2aae05cab9fb519a2faba66f85f11db161 (diff) |
complibs: allow either static or shared build
Diffstat (limited to 'scripts/build/companion_libs/cloog.sh')
-rw-r--r-- | scripts/build/companion_libs/cloog.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index 6a58a2d..925ab02 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -35,6 +35,8 @@ do_cloog_extract() { do_cloog() { local _t + local cloog_LDFLAGS + local -a cloog_opts # Version 0.15.3 has a dirname 'cloog-ppl' (with no version in it!) # while versions 0.15.4 onward do have the version in the dirname. @@ -49,8 +51,16 @@ do_cloog() { CT_DoStep INFO "Installing CLooG/ppl" CT_DoLog EXTRA "Configuring CLooG/ppl" + + if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then + cloog_opts+=( --enable-shared --disable-static ) + else + cloog_opts+=( --disable-shared --enable-static ) + cloog_LDFLAGS='-lstdc++' + fi + CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - LDFLAGS='-lstdc++' \ + LDFLAGS="${cloog_LDFLAGS}" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \ --build=${CT_BUILD} \ @@ -58,9 +68,8 @@ do_cloog() { --prefix="${CT_PREFIX_DIR}" \ --with-gmp="${CT_PREFIX_DIR}" \ --with-ppl="${CT_PREFIX_DIR}" \ - --disable-shared \ - --enable-static \ - --with-bits=gmp + --with-bits=gmp \ + "${cloog_opts[@]}" CT_DoLog EXTRA "Building CLooG/ppl" CT_DoExecLog ALL make ${PARALLELMFLAGS} |