summaryrefslogtreecommitdiff
path: root/scripts/build/cc/100-gcc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/cc/100-gcc.sh')
-rw-r--r--scripts/build/cc/100-gcc.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index f7eed94..2001ff9 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -194,6 +194,7 @@ do_gcc_core_backend() {
local -a core_LDFLAGS
local -a core_targets
local -a extra_user_config
+ local -a extra_user_env
local arg
for arg in "$@"; do
@@ -362,6 +363,21 @@ do_gcc_core_backend() {
extra_config+=(--disable-libgomp)
extra_config+=(--disable-libmudflap)
+ if [ "${CT_CC_GCC_LIBSSP}" = "y" ]; then
+ extra_config+=(--enable-libssp)
+ else
+ extra_config+=(--disable-libssp)
+ fi
+ if [ "${CT_CC_GCC_HAS_LIBQUADMATH}" = "y" ]; then
+ if [ "${CT_CC_GCC_LIBQUADMATH}" = "y" ]; then
+ extra_config+=(--enable-libquadmath)
+ extra_config+=(--enable-libquadmath-support)
+ else
+ extra_config+=(--disable-libquadmath)
+ extra_config+=(--disable-libquadmath-support)
+ fi
+ fi
+
[ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls")
[ "${CT_CC_GCC_DISABLE_PCH}" = "y" ] && extra_config+=("--disable-libstdcxx-pch")
@@ -376,6 +392,10 @@ do_gcc_core_backend() {
extra_config+=("--disable-multilib")
fi
+ if [ "x${CT_CC_GCC_EXTRA_ENV_ARRAY}" != "x" ]; then
+ extra_user_env=( "${CT_CC_GCC_EXTRA_ENV_ARRAY[@]}" )
+ fi
+
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)
@@ -455,7 +475,7 @@ do_gcc_core_backend() {
repair_cc=""
fi
- CT_DoExecLog ALL make ${JOBSFLAGS} -C gcc ${libgcc_rule} \
+ CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} -C gcc ${libgcc_rule} \
${repair_cc}
sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
else # build_libgcc
@@ -474,7 +494,7 @@ do_gcc_core_backend() {
fi
CT_DoLog EXTRA "Building gcc"
- CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/all-}"
+ CT_DoExecLog ALL make ${JOBSFLAGS} ${extra_user_env} "${core_targets[@]/#/all-}"
CT_DoLog EXTRA "Installing gcc"
CT_DoExecLog ALL make ${JOBSFLAGS} "${core_targets[@]/#/install-}"