cc/gcc: with static ppl, correctly link with libm
authorDarcy Watkins <dwatkins@tranzeo.com>
Thu Aug 05 18:19:07 2010 +0200 (2010-08-05)
changeset 2070bcd33fce4db9
parent 2069 366bd2b22675
child 2071 5526fb72a893
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.
scripts/build/cc/gcc.sh
     1.1 --- a/scripts/build/cc/gcc.sh	Thu Aug 05 17:59:51 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}")