summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/cc/100-gcc.sh82
-rw-r--r--scripts/build/companion_libs/220-ncurses.sh15
2 files changed, 46 insertions, 51 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 )
diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh
index 962e8ad..573523b 100644
--- a/scripts/build/companion_libs/220-ncurses.sh
+++ b/scripts/build/companion_libs/220-ncurses.sh
@@ -39,7 +39,10 @@ do_ncurses_for_build() {
case "${CT_TOOLCHAIN_TYPE}" in
native|cross)
if [ "${CT_NCURSES_HOST_DISABLE_DB}" = "y" ]; then
- opts+=( "--disable-database" "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
+ opts+=( "--disable-database" )
+ fi
+ if [ -n "${CT_NCURSES_HOST_FALLBACKS}" ]; then
+ opts+=( "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
fi
opts+=( "${CT_NCURSES_HOST_CONFIG_ARGS[@]}" )
;;
@@ -73,7 +76,10 @@ do_ncurses_for_host() {
"--without-cxx-binding" \
"--without-ada" )
if [ "${CT_NCURSES_HOST_DISABLE_DB}" = "y" ]; then
- opts+=( "--disable-database" "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
+ opts+=( "--disable-database" )
+ fi
+ if [ -n "${CT_NCURSES_HOST_FALLBACKS}" ]; then
+ opts+=( "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" )
fi
opts+=( "${CT_NCURSES_HOST_CONFIG_ARGS[@]}" )
do_ncurses_backend host="${CT_HOST}" \
@@ -96,7 +102,10 @@ do_ncurses_for_target() {
[ "${CT_CC_LANG_CXX}" = "y" ] || opts+=("--without-cxx" "--without-cxx-binding")
[ "${CT_CC_LANG_ADA}" = "y" ] || opts+=("--without-ada")
if [ "${CT_NCURSES_TARGET_DISABLE_DB}" = "y" ]; then
- opts+=( "--disable-database" "--with-fallbacks=${CT_NCURSES_TARGET_FALLBACKS}" )
+ opts+=( "--disable-database" )
+ fi
+ if [ -n "${CT_NCURSES_TARGET_FALLBACKS}" ]; then
+ opts+=( "--with-fallbacks=${CT_NCURSES_TARGET_FALLBACKS}" )
fi
opts+=( "${CT_NCURSES_TARGET_CONFIG_ARGS[@]}" )
case "${CT_TARGET}" in