scripts/build/mpfr.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 21 22:00:52 2008 +0000 (2008-05-21)
changeset 527 4ac12179ef23
parent 522 0ebb814eb9f8
child 584 b46de4c38396
permissions -rw-r--r--
Introduce target-specific LDFLAGS, the same way we have CFLAGS for the target.
It seems to be helping gcc somewhat into telling the correct endianness to ld that sticks with little endian even when the target is big (eg armeb-unknown-linux-uclibcgnueabi).
There's still work to do, especially finish the gcc part that is not in this commit.

/trunk/scripts/functions | 9 7 2 0 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
     1 # This file adds the functions to build the MPFR library
     2 # Copyright 2008 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then
     6 
     7 do_print_filename() {
     8     [ "${CT_CC_GCC_GMP_MPFR}" = "y" ] || return 0
     9     echo "mpfr-${CT_MPFR_VERSION}"
    10 }
    11 
    12 # Download MPFR
    13 do_mpfr_get() {
    14     CT_GetFile "${CT_MPFR_FILE}" http://www.mpfr.org/mpfr-current/          \
    15                                  http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
    16 }
    17 
    18 # Extract MPFR
    19 do_mpfr_extract() {
    20     CT_ExtractAndPatch "${CT_MPFR_FILE}"
    21 }
    22 
    23 do_mpfr() {
    24     mkdir -p "${CT_BUILD_DIR}/build-mpfr"
    25     cd "${CT_BUILD_DIR}/build-mpfr"
    26 
    27     CT_DoStep INFO "Installing MPFR"
    28 
    29     CT_DoLog EXTRA "Configuring MPFR"
    30     CFLAGS="${CT_CFLAGS_FOR_HOST}"                          \
    31     "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure"               \
    32         --build=${CT_BUILD}                                 \
    33         --host=${CT_HOST}                                   \
    34         --prefix="${CT_PREFIX_DIR}"                         \
    35         --enable-thread-safe                                \
    36         --disable-shared --enable-static                    \
    37         --with-gmp="${CT_PREFIX_DIR}"                       2>&1 |CT_DoLog ALL
    38 
    39     CT_DoLog EXTRA "Building MPFR"
    40     make ${PARALLELMFLAGS}  2>&1 |CT_DoLog ALL
    41 
    42     if [ "${CT_MPFR_CHECK}" = "y" ]; then
    43         CT_DoLog EXTRA "Checking MPFR"
    44         make -s check       2>&1 |CT_DoLog ALL
    45     fi
    46 
    47     CT_DoLog EXTRA "Installing MPFR"
    48     make install            2>&1 |CT_DoLog ALL
    49 
    50     CT_EndStep
    51 }
    52 
    53 else # No MPFR
    54 
    55 do_print_filename() { :; }
    56 do_mpfr_get() { :; }
    57 do_mpfr_extract() { :; }
    58 do_mpfr() { :; }
    59 
    60 fi