summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarcy Watkins <dwatkins@tranzeo.com>2010-08-05 16:19:07 (GMT)
committerDarcy Watkins <dwatkins@tranzeo.com>2010-08-05 16:19:07 (GMT)
commitabfbd362b9ec63b3da99ae7b60ccbfc8d2c012ac (patch)
treed69961d016250180bb1992b86fec2bd0f1cd1f0b
parentef4e0521c1d4d98fdd4b2558b7f76485ef0bb374 (diff)
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)
-rw-r--r--scripts/build/cc/gcc.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 0b40d71..e4d75e7 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -161,8 +161,9 @@ do_cc_core() {
# When companion libraries are build static (eg !shared),
# the libstdc++ is not pulled automatically, although it
# is needed. Shoe-horn it in our LDFLAGS
+ # Ditto libm on some Fedora boxen
if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then
- core_LDFLAGS='-lstdc++'
+ core_LDFLAGS='-lstdc++ -lm'
fi
if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")
@@ -357,7 +358,8 @@ do_cc() {
# When companion libraries are build static (eg !shared),
# the libstdc++ is not pulled automatically, although it
# is needed. Shoe-horn it in our LDFLAGS
- final_LDFLAGS='-lstdc++'
+ # Ditto libm on some Fedora boxen
+ final_LDFLAGS='-lstdc++ -lm'
fi
if [ "${CT_CC_GCC_USE_GMP_MPFR}" = "y" ]; then
extra_config+=("--with-gmp=${CT_COMPLIBS_DIR}")