summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/cc/gcc.in.213
-rw-r--r--scripts/build/cc/gcc.sh8
2 files changed, 21 insertions, 0 deletions
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 35a1070..41f2be1 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -53,6 +53,19 @@ config CC_STATIC_LIBSTDCXX
having to worry about distributing the matching version of libstdc++
along with it.
+config CC_GCC_SYSTEM_ZLIB
+ bool
+ prompt "Use system zlib"
+ depends on EXPERIMENTAL
+ help
+ Do not use bundled zlib, and use the zlib already available for
+ the host (eg. the system library).
+
+ If you want to build a static toolchain, you will need to also
+ install the static version of zlib for your host.
+
+ If unsure, say 'n'.
+
#-----------------------------------------------------------------------------
# Optimisation features
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 71ae981..981e127 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -293,6 +293,10 @@ do_cc_core() {
[ "${CT_CC_GCC_DISABLE_PCH}" = "y" ] && extra_config+=("--disable-libstdcxx-pch")
+ if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
+ extra_config+=("--with-system-zlib")
+ 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)
@@ -603,6 +607,10 @@ do_cc() {
[ "${CT_TOOLCHAIN_ENABLE_NLS}" != "y" ] && extra_config+=("--disable-nls")
+ if [ "${CT_CC_GCC_SYSTEM_ZLIB}" = "y" ]; then
+ extra_config+=("--with-system-zlib")
+ fi
+
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
CT_DoExecLog CFG \