summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/companion_libs/cloog.sh16
-rw-r--r--scripts/build/companion_libs/gmp.sh11
-rw-r--r--scripts/build/companion_libs/libelf.sh11
-rw-r--r--scripts/build/companion_libs/mpc.sh11
-rw-r--r--scripts/build/companion_libs/mpfr.sh10
-rw-r--r--scripts/build/companion_libs/ppl.sh10
-rw-r--r--scripts/build/internals.sh50
7 files changed, 14 insertions, 105 deletions
diff --git a/scripts/build/companion_libs/cloog.sh b/scripts/build/companion_libs/cloog.sh
index f1580cb..f329fcb 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 20c3d04..b8601c5 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 1e4d36f..d53510e 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 eb6074b..f8cc87b 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 69c2ebb..a91d5c3 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 3324400..238c6c4 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=...
diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh
index 743f266..d730e28 100644
--- a/scripts/build/internals.sh
+++ b/scripts/build/internals.sh
@@ -87,56 +87,6 @@ do_finish() {
done
CT_Popd
- # If using the companion libraries, we need a wrapper
- # that will set LD_LIBRARY_PATH approriately
- if [ "${CT_WRAPPER_NEEDED}" = "y" ]; then
- CT_DoLog EXTRA "Installing toolchain wrappers"
- CT_Pushd "${CT_PREFIX_DIR}/bin"
-
- case "$CT_SYS_OS" in
- Darwin|FreeBSD)
- # wrapper does not work (when using readlink -m)
- CT_DoLog WARN "Forcing usage of binary tool wrapper"
- CT_TOOLS_WRAPPER="exec"
- ;;
- esac
- # Install the wrapper
- case "${CT_TOOLS_WRAPPER}" in
- script)
- CT_DoExecLog DEBUG install \
- -m 0755 \
- "${CT_LIB_DIR}/scripts/wrapper.in" \
- ".${CT_TARGET}-wrapper"
- ;;
- exec)
- CT_DoExecLog DEBUG "${CT_HOST}-gcc" \
- -Wall -Wextra -Werror \
- -Os \
- "${CT_LIB_DIR}/scripts/wrapper.c" \
- -o ".${CT_TARGET}-wrapper"
- if [ "${CT_DEBUG_CT}" != "y" ]; then
- # If not debugging crosstool-NG, strip the wrapper
- CT_DoExecLog DEBUG "${CT_HOST}-strip" ".${CT_TARGET}-wrapper"
- fi
- ;;
- esac
-
- # Replace every tools with the wrapper
- # Do it unconditionally, even for those tools that happen to be shell
- # scripts, we don't know if they would in the end spawn a binary...
- # Just skip symlinks
- for _t in "${CT_TARGET}-"*; do
- if [ ! -L "${_t}" ]; then
- CT_DoExecLog ALL mv "${_t}" ".${_t}"
- CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
- fi
- done
-
- # Get rid of the wrapper, we're using hardlinks
- CT_DoExecLog DEBUG rm -f ".${CT_TARGET}-wrapper"
- CT_Popd
- fi
-
CT_DoLog EXTRA "Removing access to the build system tools"
CT_DoExecLog DEBUG rm -rf "${CT_PREFIX_DIR}/buildtools"