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