scripts/build/companion_libs/110-mpfr.sh
changeset 3159 fb71cad4b085
parent 3115 1c68438f44f7
     1.1 --- a/scripts/build/companion_libs/110-mpfr.sh	Fri Nov 16 14:59:27 2012 +0100
     1.2 +++ b/scripts/build/companion_libs/110-mpfr.sh	Thu Jan 10 00:27:13 2013 +0100
     1.3 @@ -80,6 +80,8 @@
     1.4  
     1.5      mpfr_opts+=( "host=${CT_BUILD}" )
     1.6      mpfr_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
     1.7 +    mpfr_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
     1.8 +    mpfr_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
     1.9      do_mpfr_backend "${mpfr_opts[@]}"
    1.10  
    1.11      CT_Popd
    1.12 @@ -96,6 +98,7 @@
    1.13      mpfr_opts+=( "host=${CT_HOST}" )
    1.14      mpfr_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
    1.15      mpfr_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.16 +    mpfr_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    1.17      do_mpfr_backend "${mpfr_opts[@]}"
    1.18  
    1.19      CT_Popd
    1.20 @@ -106,11 +109,13 @@
    1.21  #     Parameter     : description               : type      : default
    1.22  #     host          : machine to run on         : tuple     : (none)
    1.23  #     prefix        : prefix to install into    : dir       : (none)
    1.24 -#     cflags        : host cflags to use        : string    : (empty)
    1.25 +#     cflags        : cflags to use             : string    : (empty)
    1.26 +#     ldflags       : ldflags to use            : string    : (empty)
    1.27  do_mpfr_backend() {
    1.28      local host
    1.29      local prefix
    1.30      local cflags
    1.31 +    local ldflags
    1.32      local arg
    1.33  
    1.34      for arg in "$@"; do
    1.35 @@ -128,7 +133,8 @@
    1.36      CT_DoLog EXTRA "Configuring MPFR"
    1.37      CT_DoExecLog CFG                                    \
    1.38      CC="${host}-gcc"                                    \
    1.39 -    CFLAGS="${CT_CFLAGS_FOR_HOST}"                      \
    1.40 +    CFLAGS="${cflags}"                                  \
    1.41 +    LDFLAGS="${ldflags}"                                \
    1.42      "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure"   \
    1.43          --build=${CT_BUILD}                             \
    1.44          --host=${host}                                  \