# HG changeset patch # User "Yann E. MORIN" # Date 1325345007 -3600 # Node ID 3dc2727ebffc0bf658cf41c7418b504b74ddd284 # Parent 5b9d68ed6f52fb265e41e3eb97860bf2998ad99c cc/gcc: add option to use system zlib In some cases, it might be desirable to use the system zlib Eg. because latest gcc seem to be totally borked when it comes to multilib, and tries to build a multilib host zlib, when it is *absolutely* *not* needed: we want mulitlib on the target, not on the host! Sigh... :-( Signed-off-by: "Yann E. MORIN" diff -r 5b9d68ed6f52 -r 3dc2727ebffc config/cc/gcc.in.2 --- a/config/cc/gcc.in.2 Fri Dec 30 22:04:24 2011 +0100 +++ b/config/cc/gcc.in.2 Sat Dec 31 16:23:27 2011 +0100 @@ -53,6 +53,19 @@ 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 -r 5b9d68ed6f52 -r 3dc2727ebffc scripts/build/cc/gcc.sh --- a/scripts/build/cc/gcc.sh Fri Dec 30 22:04:24 2011 +0100 +++ b/scripts/build/cc/gcc.sh Sat Dec 31 16:23:27 2011 +0100 @@ -293,6 +293,10 @@ [ "${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 @@ [ "${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 \