From 5e27ad1e5aabdbc0633c380c4ab2959b34a55134 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 6 Apr 2011 22:30:57 +0200 Subject: complibs: disable building shared libs Managing the shared version of the companion libraries has become cumbersome. Also, it will one day be possible to use the companion libraries from the host distribution, and then we will be able to easily use either shared or static libs. As a side note, while working on the canadian-rework series, it has become quite more complex to properly handle shared companion libraries, as they need to be built both for the build and gost systems. That's not easy to handle. At all. Signed-off-by: "Yann E. MORIN" --- scripts/build/companion_libs/cloog.sh | 16 ++++------------ scripts/build/companion_libs/gmp.sh | 11 ++--------- scripts/build/companion_libs/libelf.sh | 11 ++--------- scripts/build/companion_libs/mpc.sh | 11 ++--------- scripts/build/companion_libs/mpfr.sh | 10 ++-------- scripts/build/companion_libs/ppl.sh | 10 ++-------- 6 files changed, 14 insertions(+), 55 deletions(-) (limited to 'scripts/build/companion_libs') diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh index f1580cbf..f329fcb2 100644 --- a/scripts/build/companion_libs/cloog.sh +++ b/scripts/build/companion_libs/cloog.sh @@ -37,8 +37,6 @@ 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. @@ -54,17 +52,9 @@ do_cloog() { 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_opts+=( --with-host-libstdcxx='-lstdc++' ) - cloog_LDFLAGS='-lm' - fi - CT_DoExecLog CFG \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ - LDFLAGS="${cloog_LDFLAGS}" \ + LDFLAGS="-lm" \ "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ @@ -72,7 +62,9 @@ do_cloog() { --with-gmp="${CT_COMPLIBS_DIR}" \ --with-ppl="${CT_COMPLIBS_DIR}" \ --with-bits=gmp \ - "${cloog_opts[@]}" + --with-host-libstdcxx='-lstdc++' \ + --disable-shared \ + --enable-static CT_DoLog EXTRA "Building CLooG/ppl" CT_DoExecLog ALL make ${JOBSFLAGS} libcloog.la diff --git a/scripts/build/companion_libs/gmp.sh b/scripts/build/companion_libs/gmp.sh index 20c3d045..b8601c57 100644 --- a/scripts/build/companion_libs/gmp.sh +++ b/scripts/build/companion_libs/gmp.sh @@ -21,8 +21,6 @@ do_gmp_extract() { } do_gmp() { - local -a gmp_opts - mkdir -p "${CT_BUILD_DIR}/build-gmp" cd "${CT_BUILD_DIR}/build-gmp" @@ -30,12 +28,6 @@ do_gmp() { CT_DoLog EXTRA "Configuring GMP" - if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then - gmp_opts+=( --enable-shared --disable-static ) - else - gmp_opts+=( --disable-shared --enable-static ) - fi - CT_DoExecLog CFG \ CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions" \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ @@ -45,7 +37,8 @@ do_gmp() { --enable-fft \ --enable-mpbsd \ --enable-cxx \ - "${gmp_opts[@]}" + --disable-shared \ + --enable-static CT_DoLog EXTRA "Building GMP" CT_DoExecLog ALL make ${JOBSFLAGS} diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh index 1e4d36fa..d53510eb 100644 --- a/scripts/build/companion_libs/libelf.sh +++ b/scripts/build/companion_libs/libelf.sh @@ -22,20 +22,12 @@ do_libelf_extract() { if [ "${CT_LIBELF}" = "y" ]; then do_libelf() { - local -a libelf_opts - CT_DoStep INFO "Installing libelf" mkdir -p "${CT_BUILD_DIR}/build-libelf" CT_Pushd "${CT_BUILD_DIR}/build-libelf" CT_DoLog EXTRA "Configuring libelf" - if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then - libelf_opts+=( --enable-shared --disable-static ) - else - libelf_opts+=( --disable-shared --enable-static ) - fi - CT_DoExecLog CFG \ CC="${CT_HOST}-gcc" \ CFLAGS="-fPIC" \ @@ -47,7 +39,8 @@ do_libelf() { --enable-compat \ --enable-elf64 \ --enable-extended-format \ - "${libelf_opts[@]}" + --disable-shared \ + --enable-static CT_DoLog EXTRA "Building libelf" CT_DoExecLog ALL make diff --git a/scripts/build/companion_libs/mpc.sh b/scripts/build/companion_libs/mpc.sh index eb6074b0..f8cc87b0 100644 --- a/scripts/build/companion_libs/mpc.sh +++ b/scripts/build/companion_libs/mpc.sh @@ -22,8 +22,6 @@ do_mpc_extract() { } do_mpc() { - local -a mpc_opts - mkdir -p "${CT_BUILD_DIR}/build-mpc" cd "${CT_BUILD_DIR}/build-mpc" @@ -31,12 +29,6 @@ do_mpc() { CT_DoLog EXTRA "Configuring MPC" - if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then - mpc_opts+=( --enable-shared --disable-static ) - else - mpc_opts+=( --disable-shared --enable-static ) - fi - CT_DoExecLog CFG \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \ @@ -45,7 +37,8 @@ do_mpc() { --prefix="${CT_COMPLIBS_DIR}" \ --with-gmp="${CT_COMPLIBS_DIR}" \ --with-mpfr="${CT_COMPLIBS_DIR}" \ - "${mpc_opts[@]}" + --disable-shared \ + --enable-static CT_DoLog EXTRA "Building MPC" CT_DoExecLog ALL make ${JOBSFLAGS} diff --git a/scripts/build/companion_libs/mpfr.sh b/scripts/build/companion_libs/mpfr.sh index 69c2ebbd..a91d5c3f 100644 --- a/scripts/build/companion_libs/mpfr.sh +++ b/scripts/build/companion_libs/mpfr.sh @@ -64,8 +64,6 @@ do_mpfr_extract() { } do_mpfr() { - local -a mpfr_opts - mkdir -p "${CT_BUILD_DIR}/build-mpfr" cd "${CT_BUILD_DIR}/build-mpfr" @@ -79,11 +77,6 @@ do_mpfr() { *) mpfr_opts+=( --enable-thread-safe );; esac - if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then - mpfr_opts+=( --enable-shared --disable-static ) - else - mpfr_opts+=( --disable-shared --enable-static ) - fi CT_DoLog EXTRA "Configuring MPFR" CT_DoExecLog CFG \ @@ -94,7 +87,8 @@ do_mpfr() { --host=${CT_HOST} \ --prefix="${CT_COMPLIBS_DIR}" \ --with-gmp="${CT_COMPLIBS_DIR}" \ - "${mpfr_opts[@]}" + --disable-shared \ + --enable-static CT_DoLog EXTRA "Building MPFR" CT_DoExecLog ALL make ${JOBSFLAGS} diff --git a/scripts/build/companion_libs/ppl.sh b/scripts/build/companion_libs/ppl.sh index 33244009..238c6c4c 100644 --- a/scripts/build/companion_libs/ppl.sh +++ b/scripts/build/companion_libs/ppl.sh @@ -24,8 +24,6 @@ do_ppl_extract() { } do_ppl() { - local -a ppl_opts - mkdir -p "${CT_BUILD_DIR}/build-ppl" cd "${CT_BUILD_DIR}/build-ppl" @@ -33,11 +31,6 @@ do_ppl() { CT_DoLog EXTRA "Configuring PPL" - if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then - ppl_opts+=( --enable-shared --disable-static ) - else - ppl_opts+=( --disable-shared --enable-static ) - fi CT_DoExecLog CFG \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ @@ -54,7 +47,8 @@ do_ppl() { --disable-assertions \ --disable-ppl_lcdd \ --disable-ppl_lpsol \ - "${ppl_opts[@]}" + --disable-shared \ + --enable-static # Maybe-options: # --enable-interfaces=... -- cgit v1.2.3