cc/gcc: with static ppl, correctly link with libm 1.8
authorDarcy Watkins <dwatkins@tranzeo.com>
Thu Aug 05 18:19:07 2010 +0200 (2010-08-05)
branch1.8
changeset 2073a3b7a63dce01
parent 2059 a0d99494e76f
child 2074 a98794799cbf
cc/gcc: with static ppl, correctly link with libm

On some Fedora boxen (at least FC13), it is also required
to link with libm when static ppl is used.
(transplanted from bcd33fce4db9c18223b59ecdc96f10bf6dd574de)
scripts/build/cc/gcc.sh
     1.1 --- a/scripts/build/cc/gcc.sh	Sun Aug 01 14:23:08 2010 +0200
     1.2 +++ b/scripts/build/cc/gcc.sh	Thu Aug 05 18:19:07 2010 +0200
     1.3 @@ -161,8 +161,9 @@
     1.4      # When companion libraries are build static (eg !shared),
     1.5      # the libstdc++ is not pulled automatically, although it
     1.6      # is needed. Shoe-horn it in our LDFLAGS
     1.7 +    # Ditto libm on some Fedora boxen
     1.8      if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
     1.9 -        core_LDFLAGS='-lstdc++'
    1.10 +        core_LDFLAGS='-lstdc++ -lm'
    1.11      fi
    1.12      if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
    1.13          extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")
    1.14 @@ -357,7 +358,8 @@
    1.15          # When companion libraries are build static (eg !shared),
    1.16          # the libstdc++ is not pulled automatically, although it
    1.17          # is needed. Shoe-horn it in our LDFLAGS
    1.18 -        final_LDFLAGS='-lstdc++'
    1.19 +        # Ditto libm on some Fedora boxen
    1.20 +        final_LDFLAGS='-lstdc++ -lm'
    1.21      fi
    1.22      if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
    1.23          extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")