1.1 --- a/scripts/build/cc/gcc.sh Sun Apr 11 00:47:23 2010 +0200
1.2 +++ b/scripts/build/cc/gcc.sh Sun Apr 11 11:10:06 2010 +0200
1.3 @@ -151,24 +151,24 @@
1.4 else
1.5 extra_config+=("--disable-__cxa_atexit")
1.6 fi
1.7 - if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
1.8 - extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
1.9 - extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
1.10 - fi
1.11 - if [ "${CT_CC_GCC_USE_PPL_CLOOG_MPC}" = "y" ]; then
1.12 - extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
1.13 - extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
1.14 - extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
1.15 - fi
1.16 -
1.17 - CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
1.18
1.19 # When companion libraries are build static (eg !shared),
1.20 # the libstdc++ is not pulled automatically, although it
1.21 # is needed. Shoe-horn it in our LDFLAGS
1.22 - if [ -z "${CT_COMPLIBS_SHARED}" ]; then
1.23 + if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
1.24 core_LDFLAGS='-lstdc++'
1.25 fi
1.26 + if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
1.27 + extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")
1.28 + extra_config+=("--with-mpfr=${CT_COMPLIBS_DIR}")
1.29 + fi
1.30 + if [ "${CT_CC_GCC_USE_PPL_CLOOG_MPC}" = "y" ]; then
1.31 + extra_config+=("--with-ppl=${CT_COMPLIBS_DIR}")
1.32 + extra_config+=("--with-cloog=${CT_COMPLIBS_DIR}")
1.33 + extra_config+=("--with-mpc=${CT_COMPLIBS_DIR}")
1.34 + fi
1.35 +
1.36 + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
1.37
1.38 # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)
1.39 CC_FOR_BUILD="${CT_BUILD}-gcc" \
1.40 @@ -313,14 +313,21 @@
1.41 if [ -n "${CC_ENABLE_CXX_FLAGS}" ]; then
1.42 extra_config+=("--enable-cxx-flags=${CC_ENABLE_CXX_FLAGS}")
1.43 fi
1.44 +
1.45 + # When companion libraries are build static (eg !shared),
1.46 + # the libstdc++ is not pulled automatically, although it
1.47 + # is needed. Shoe-horn it in our LDFLAGS
1.48 + if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
1.49 + final_LDFLAGS='-lstdc++'
1.50 + fi
1.51 if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
1.52 - extra_config+=("--with-gmp=${CT_PREFIX_DIR}")
1.53 - extra_config+=("--with-mpfr=${CT_PREFIX_DIR}")
1.54 + extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")
1.55 + extra_config+=("--with-mpfr=${CT_COMPLIBS_DIR}")
1.56 fi
1.57 if [ "${CT_CC_GCC_USE_PPL_CLOOG_MPC}" = "y" ]; then
1.58 - extra_config+=("--with-ppl=${CT_PREFIX_DIR}")
1.59 - extra_config+=("--with-cloog=${CT_PREFIX_DIR}")
1.60 - extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
1.61 + extra_config+=("--with-ppl=${CT_COMPLIBS_DIR}")
1.62 + extra_config+=("--with-cloog=${CT_COMPLIBS_DIR}")
1.63 + extra_config+=("--with-mpc=${CT_COMPLIBS_DIR}")
1.64 fi
1.65
1.66 if [ "${CT_THREADS}" = "none" ]; then
1.67 @@ -334,13 +341,6 @@
1.68
1.69 CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
1.70
1.71 - # When companion libraries are build static (eg !shared),
1.72 - # the libstdc++ is not pulled automatically, although it
1.73 - # is needed. Shoe-horn it in our LDFLAGS
1.74 - if [ -z "${CT_COMPLIBS_SHARED}" ]; then
1.75 - final_LDFLAGS='-lstdc++'
1.76 - fi
1.77 -
1.78 # --enable-symvers=gnu really only needed for sh4 to work around a
1.79 # detection problem only matters for gcc-3.2.x and later, I think.
1.80 # --disable-nls to work around crash bug on ppc405, but also because
2.1 --- a/scripts/build/companion_libs/cloog.sh Sun Apr 11 00:47:23 2010 +0200
2.2 +++ b/scripts/build/companion_libs/cloog.sh Sun Apr 11 11:10:06 2010 +0200
2.3 @@ -65,9 +65,9 @@
2.4 "${CT_SRC_DIR}/cloog-ppl${_t}/configure" \
2.5 --build=${CT_BUILD} \
2.6 --host=${CT_HOST} \
2.7 - --prefix="${CT_PREFIX_DIR}" \
2.8 - --with-gmp="${CT_PREFIX_DIR}" \
2.9 - --with-ppl="${CT_PREFIX_DIR}" \
2.10 + --prefix="${CT_COMPLIBS_DIR}" \
2.11 + --with-gmp="${CT_COMPLIBS_DIR}" \
2.12 + --with-ppl="${CT_COMPLIBS_DIR}" \
2.13 --with-bits=gmp \
2.14 "${cloog_opts[@]}"
2.15
3.1 --- a/scripts/build/companion_libs/gmp.sh Sun Apr 11 00:47:23 2010 +0200
3.2 +++ b/scripts/build/companion_libs/gmp.sh Sun Apr 11 11:10:06 2010 +0200
3.3 @@ -44,7 +44,7 @@
3.4 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
3.5 --build=${CT_BUILD} \
3.6 --host=${CT_HOST} \
3.7 - --prefix="${CT_PREFIX_DIR}" \
3.8 + --prefix="${CT_COMPLIBS_DIR}" \
3.9 --enable-fft \
3.10 --enable-mpbsd \
3.11 --enable-cxx \
4.1 --- a/scripts/build/companion_libs/libelf.sh Sun Apr 11 00:47:23 2010 +0200
4.2 +++ b/scripts/build/companion_libs/libelf.sh Sun Apr 11 11:10:06 2010 +0200
4.3 @@ -45,7 +45,7 @@
4.4 # --build=${CT_BUILD} \
4.5 # --host=${CT_HOST} \
4.6 # --target=${CT_TARGET} \
4.7 -# --prefix="${CT_PREFIX_DIR}" \
4.8 +# --prefix="${CT_COMPLIBS_DIR}" \
4.9 # --enable-compat \
4.10 # --enable-elf64 \
4.11 # --enable-extended-format \
5.1 --- a/scripts/build/companion_libs/mpc.sh Sun Apr 11 00:47:23 2010 +0200
5.2 +++ b/scripts/build/companion_libs/mpc.sh Sun Apr 11 11:10:06 2010 +0200
5.3 @@ -43,9 +43,9 @@
5.4 "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
5.5 --build=${CT_BUILD} \
5.6 --host=${CT_HOST} \
5.7 - --prefix="${CT_PREFIX_DIR}" \
5.8 - --with-gmp="${CT_PREFIX_DIR}" \
5.9 - --with-mpfr="${CT_PREFIX_DIR}" \
5.10 + --prefix="${CT_COMPLIBS_DIR}" \
5.11 + --with-gmp="${CT_COMPLIBS_DIR}" \
5.12 + --with-mpfr="${CT_COMPLIBS_DIR}" \
5.13 "${mpc_opts[@]}"
5.14
5.15 CT_DoLog EXTRA "Building MPC"
6.1 --- a/scripts/build/companion_libs/mpfr.sh Sun Apr 11 00:47:23 2010 +0200
6.2 +++ b/scripts/build/companion_libs/mpfr.sh Sun Apr 11 11:10:06 2010 +0200
6.3 @@ -95,8 +95,8 @@
6.4 "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure" \
6.5 --build=${CT_BUILD} \
6.6 --host=${CT_HOST} \
6.7 - --prefix="${CT_PREFIX_DIR}" \
6.8 - --with-gmp="${CT_PREFIX_DIR}" \
6.9 + --prefix="${CT_COMPLIBS_DIR}" \
6.10 + --with-gmp="${CT_COMPLIBS_DIR}" \
6.11 "${mpfr_opts[@]}"
6.12
6.13 CT_DoLog EXTRA "Building MPFR"
7.1 --- a/scripts/build/companion_libs/ppl.sh Sun Apr 11 00:47:23 2010 +0200
7.2 +++ b/scripts/build/companion_libs/ppl.sh Sun Apr 11 11:10:06 2010 +0200
7.3 @@ -46,9 +46,9 @@
7.4 "${CT_SRC_DIR}/ppl-${CT_PPL_VERSION}/configure" \
7.5 --build=${CT_BUILD} \
7.6 --host=${CT_HOST} \
7.7 - --prefix="${CT_PREFIX_DIR}" \
7.8 - --with-libgmp-prefix="${CT_PREFIX_DIR}" \
7.9 - --with-libgmpxx-prefix="${CT_PREFIX_DIR}" \
7.10 + --prefix="${CT_COMPLIBS_DIR}" \
7.11 + --with-libgmp-prefix="${CT_COMPLIBS_DIR}" \
7.12 + --with-libgmpxx-prefix="${CT_COMPLIBS_DIR}" \
7.13 --disable-debugging \
7.14 --disable-assertions \
7.15 --disable-ppl_lcdd \
8.1 --- a/scripts/crosstool-NG.sh.in Sun Apr 11 00:47:23 2010 +0200
8.2 +++ b/scripts/crosstool-NG.sh.in Sun Apr 11 11:10:06 2010 +0200
8.3 @@ -150,6 +150,11 @@
8.4 CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build"
8.5 CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
8.6 CT_CONFIG_DIR="${CT_BUILD_DIR}/configs"
8.7 +if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
8.8 + CT_COMPLIBS_DIR="${CT_PREFIX_DIR}"
8.9 +else
8.10 + CT_COMPLIBS_DIR="${CT_BUILD_DIR}/static"
8.11 +fi
8.12
8.13 # Note: we'll always install the core compiler in its own directory, so as to
8.14 # not mix the two builds: core and final.