diff options
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index e7e56f1..d3c5d74 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -181,21 +181,29 @@ do_cc_core() { fi if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then extra_config+=("--with-libelf=${CT_COMPLIBS_DIR}") + extra_config+=("--enable-lto") elif [ "${CT_CC_GCC_HAS_LTO}" = "y" ]; then extra_config+=("--with-libelf=no") + extra_config+=("--disable-lto") fi if [ "${CT_CC_GCC_ENABLE_TARGET_OPTSPACE}" = "y" ]; then extra_config+=("--enable-target-optspace") fi + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532) CC_FOR_BUILD="${CT_BUILD}-gcc" \ CFLAGS="${CT_CFLAGS_FOR_HOST}" \ LDFLAGS="${core_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ @@ -229,17 +237,17 @@ do_cc_core() { # Next we have to configure gcc, create libgcc.mk then edit it... # So much easier if we just edit the source tree, but hey... if [ ! -f "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/gcc/BASE-VER" ]; then - CT_DoExecLog ALL make configure-libiberty + CT_DoExecLog CFG make configure-libiberty CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libiberty libiberty.a - CT_DoExecLog ALL make configure-gcc configure-libcpp + CT_DoExecLog CFG make configure-gcc configure-libcpp CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp else - CT_DoExecLog ALL make configure-gcc configure-libcpp configure-build-libiberty + CT_DoExecLog CFG make configure-gcc configure-libcpp configure-build-libiberty CT_DoExecLog ALL make ${PARALLELMFLAGS} all-libcpp all-build-libiberty fi # HACK: gcc-4.2 uses libdecnumber to build libgcc.mk, so build it here. if [ -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/libdecnumber" ]; then - CT_DoExecLog ALL make configure-libdecnumber + CT_DoExecLog CFG make configure-libdecnumber CT_DoExecLog ALL make ${PARALLELMFLAGS} -C libdecnumber libdecnumber.a fi @@ -354,6 +362,16 @@ do_cc() { else extra_config+=(--disable-libmudflap) fi + if [ "${CT_CC_GCC_LIBGOMP}" = "y" ]; then + extra_config+=(--enable-libgomp) + else + extra_config+=(--disable-libgomp) + fi + if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then + extra_config+=(--enable-libssp) + else + extra_config+=(--disable-libssp) + fi if [ "${CT_CC_STATIC_LIBSTDCXX}" = "y" ]; then # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2 @@ -391,6 +409,7 @@ do_cc() { if [ "${CT_THREADS}" = "none" ]; then extra_config+=("--disable-threads") if [ "${CT_CC_GCC_4_2_or_later}" = y ]; then + CT_Test "Disabling libgomp for no-thread gcc>=4.2" "${CT_CC_GCC_LIBGOMP}" = "Y" extra_config+=("--disable-libgomp") fi else @@ -409,6 +428,12 @@ do_cc() { extra_config+=("--disable-libstdcxx-pch") fi + case "${CT_CC_GCC_LDBL_128}" in + y) extra_config+=("--with-long-double-128");; + m) ;; + "") extra_config+=("--without-long-double-128");; + esac + CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" # --enable-symvers=gnu really only needed for sh4 to work around a @@ -421,7 +446,7 @@ do_cc() { CFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ CXXFLAGS_FOR_TARGET="${CT_TARGET_CFLAGS}" \ LDFLAGS_FOR_TARGET="${CT_TARGET_LDFLAGS}" \ - CT_DoExecLog ALL \ + CT_DoExecLog CFG \ "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${CT_HOST} \ |