1.1 --- a/scripts/build/cc/gcc.sh Wed Jul 28 23:55:10 2010 +0200
1.2 +++ b/scripts/build/cc/gcc.sh Thu Jul 29 19:47:16 2010 +0200
1.3 @@ -347,10 +347,16 @@
1.4 extra_config+=(--disable-libmudflap)
1.5 fi
1.6
1.7 - # When companion libraries are build static (eg !shared),
1.8 - # the libstdc++ is not pulled automatically, although it
1.9 - # is needed. Shoe-horn it in our LDFLAGS
1.10 - if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
1.11 + if [ "${CT_CC_STATIC_LIBSTDCXX}" = "y" ]; then
1.12 + # this is from CodeSourcery arm-2010q1-202-arm-none-linux-gnueabi.src.tar.bz2
1.13 + # build script
1.14 + # FIXME: if the host gcc is gcc-4.5 then presumably we could use -static-libstdc++,
1.15 + # see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01635.html
1.16 + extra_config+=("--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm")
1.17 + elif [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
1.18 + # When companion libraries are build static (eg !shared),
1.19 + # the libstdc++ is not pulled automatically, although it
1.20 + # is needed. Shoe-horn it in our LDFLAGS
1.21 final_LDFLAGS='-lstdc++'
1.22 fi
1.23 if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then