summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-20 07:27:21 (GMT)
committerGitHub <noreply@github.com>2017-02-20 07:27:21 (GMT)
commit6a1b5a3d7723d9b45df2f0dc0f0d2b7fdfc11d73 (patch)
tree4d8fd739374f6852777a2ce5823dadeb143d223d /scripts/build
parentabcb548d189be00d3c48d50b3e14e94613200c21 (diff)
parentd20091d730f896155462333bbd770eb6e4946a52 (diff)
Merge pull request #608 from stilor/static-no-plugins
Disable LTO for static toolchain
Diffstat (limited to 'scripts/build')
-rw-r--r--scripts/build/cc/100-gcc.sh82
1 files changed, 34 insertions, 48 deletions
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 6d5a6af..48f5122 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -411,10 +411,9 @@ do_gcc_core_backend() {
fi
done
- if [ "${CT_CC_GCC_HAS_PKGVERSION_BUGURL}" = "y" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
- [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
- fi
+ extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
extra_config+=("--enable-__cxa_atexit")
else
@@ -435,14 +434,12 @@ do_gcc_core_backend() {
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
+ 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
core_LDFLAGS+=("${ldflags}")
@@ -479,13 +476,9 @@ do_gcc_core_backend() {
core_LDFLAGS+=("-lm")
fi
- if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
- extra_config+=("--with-gmp=${complibs}")
- extra_config+=("--with-mpfr=${complibs}")
- fi
- if [ "${CT_CC_GCC_USE_MPC}" = "y" ]; then
- extra_config+=("--with-mpc=${complibs}")
- fi
+ extra_config+=("--with-gmp=${complibs}")
+ extra_config+=("--with-mpfr=${complibs}")
+ extra_config+=("--with-mpc=${complibs}")
if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
if [ "${CT_ISL}" = "y" ]; then
extra_config+=("--with-isl=${complibs}")
@@ -493,13 +486,13 @@ do_gcc_core_backend() {
if [ "${CT_CLOOG}" = "y" ]; then
extra_config+=("--with-cloog=${complibs}")
fi
- elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then
+ else
extra_config+=("--with-isl=no")
extra_config+=("--with-cloog=no")
fi
if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
extra_config+=("--enable-lto")
- elif [ "${CT_CC_GCC_HAS_LTO}" = "y" ]; then
+ else
extra_config+=("--disable-lto")
fi
@@ -893,10 +886,9 @@ do_gcc_backend() {
done
[ "${CT_SHARED_LIBS}" = "y" ] || extra_config+=("--disable-shared")
- if [ "${CT_CC_GCC_HAS_PKGVERSION_BUGURL}" = "y" ]; then
- extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
- [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
- fi
+ extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
+ [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+
case "${CT_CC_GCC_SJLJ_EXCEPTIONS}" in
y) extra_config+=("--enable-sjlj-exceptions");;
m) ;;
@@ -930,22 +922,18 @@ do_gcc_backend() {
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
+ 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
- if [ "${CT_CC_GCC_HAS_LIBSANITIZER}" = "y" ]; then
- if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then
- extra_config+=(--enable-libsanitizer)
- else
- extra_config+=(--disable-libsanitizer)
- fi
+ if [ "${CT_CC_GCC_LIBSANITIZER}" = "y" ]; then
+ extra_config+=(--enable-libsanitizer)
+ else
+ extra_config+=(--disable-libsanitizer)
fi
if [ "${CT_CC_GCC_HAS_LIBMPX}" = "y" ]; then
@@ -990,13 +978,9 @@ do_gcc_backend() {
final_LDFLAGS+=("-lm")
fi
- if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
- extra_config+=("--with-gmp=${complibs}")
- extra_config+=("--with-mpfr=${complibs}")
- fi
- if [ "${CT_CC_GCC_USE_MPC}" = "y" ]; then
- extra_config+=("--with-mpc=${complibs}")
- fi
+ extra_config+=("--with-gmp=${complibs}")
+ extra_config+=("--with-mpfr=${complibs}")
+ extra_config+=("--with-mpc=${complibs}")
if [ "${CT_CC_GCC_USE_GRAPHITE}" = "y" ]; then
if [ "${CT_ISL}" = "y" ]; then
extra_config+=("--with-isl=${complibs}")
@@ -1004,13 +988,13 @@ do_gcc_backend() {
if [ "${CT_CLOOG}" = "y" ]; then
extra_config+=("--with-cloog=${complibs}")
fi
- elif [ "${CT_CC_GCC_HAS_GRAPHITE}" = "y" ]; then
+ else
extra_config+=("--with-isl=no")
extra_config+=("--with-cloog=no")
fi
if [ "${CT_CC_GCC_USE_LTO}" = "y" ]; then
extra_config+=("--enable-lto")
- elif [ "${CT_CC_GCC_HAS_LTO}" = "y" ]; then
+ else
extra_config+=("--disable-lto")
fi
@@ -1058,6 +1042,8 @@ do_gcc_backend() {
if [ "${CT_CC_GCC_ENABLE_PLUGINS}" = "y" ]; then
extra_config+=( --enable-plugin )
+ else
+ extra_config+=( --disable-plugin )
fi
if [ "${CT_CC_GCC_GOLD}" = "y" ]; then
extra_config+=( --enable-gold )