1.1 --- a/config/cc/gcc.in.2 Thu Jun 02 19:49:36 2011 +0200
1.2 +++ b/config/cc/gcc.in.2 Thu Jun 02 19:50:12 2011 +0200
1.3 @@ -44,6 +44,7 @@
1.4 bool
1.5 prompt "Link libstdc++ statically into the gcc binary"
1.6 default y
1.7 + depends on CONFIGURE_has_static_libstdcxx
1.8 depends on CC_GCC_4_4_or_later
1.9 help
1.10 Newer gcc versions use the PPL library which is C++ code. Statically
2.1 --- a/config/toolchain.in Thu Jun 02 19:49:36 2011 +0200
2.2 +++ b/config/toolchain.in Thu Jun 02 19:50:12 2011 +0200
2.3 @@ -46,10 +46,19 @@
2.4 In fact, the sysroot path is constructed as:
2.5 ${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}
2.6
2.7 +# In case we need to add more conditions to enable static
2.8 +# toolchain, we'll be adding them here
2.9 +config STATIC_TOOLCHAIN_POSSIBLE
2.10 + bool
2.11 + default y
2.12 + depends on CONFIGURE_has_static_libstdcxx
2.13 + # Add new deps here! :-)
2.14 +
2.15 config STATIC_TOOLCHAIN
2.16 bool
2.17 prompt "Build Static Toolchain (EXPERIMENTAL)"
2.18 depends on EXPERIMENTAL
2.19 + depends on STATIC_TOOLCHAIN_POSSIBLE
2.20 help
2.21 Build static host binaries.
2.22
3.1 --- a/configure Thu Jun 02 19:49:36 2011 +0200
3.2 +++ b/configure Thu Jun 02 19:50:12 2011 +0200
3.3 @@ -437,6 +437,14 @@
3.4 has_or_abort lib="${stdcxx_libs}" \
3.5 err="'libstdc++' shared library was not found"
3.6
3.7 +# Yes, we may be checking twice for libstdc++.a
3.8 +# The first is because we need one instance of libstdc++ (shared or static)
3.9 +# because it is needed for PPL; the second is because the static version is
3.10 +# required for static-linking, and if missing, the option is removed.
3.11 +has_or_warn lib="libstdc++.a" \
3.12 + err="static 'libstdc++' is needed to statically link the toolchain's executables" \
3.13 + kconfig=has_static_libstdcxx
3.14 +
3.15 #---------------------------------------------------------------------
3.16 # Compute the version string
3.17