scripts/build/companion_libs/mpc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 31 23:24:40 2010 +0200 (2010-08-31)
changeset 2107 f5ab0a80e466
parent 1901 bdb3a98e064b
child 2154 250cdcc86441
permissions -rw-r--r--
binutils/binutils: remove faulty patch

The added code should be conditinal to the target system
being !MIPS, but is based on the host system being !MIPS.

This is plain wrong, and had not been noticed until now
as I never used those binutils versions on MIPS.

See:
http://sourceware.org/ml/crossgcc/2010-08/msg00192.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 # This file adds the functions to build the MPC library
     2 # Copyright 2009 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_mpc_get() { :; }
     6 do_mpc_extract() { :; }
     7 do_mpc() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_MPC}" = "y" ]; then
    11 
    12 # Download MPC
    13 do_mpc_get() {
    14     CT_GetFile "mpc-${CT_MPC_VERSION}" .tar.gz      \
    15         http://www.multiprecision.org/mpc/download
    16 }
    17 
    18 # Extract MPC
    19 do_mpc_extract() {
    20     CT_Extract "mpc-${CT_MPC_VERSION}"
    21     CT_Patch "mpc" "${CT_MPC_VERSION}"
    22 }
    23 
    24 do_mpc() {
    25     local -a mpc_opts
    26 
    27     mkdir -p "${CT_BUILD_DIR}/build-mpc"
    28     cd "${CT_BUILD_DIR}/build-mpc"
    29 
    30     CT_DoStep INFO "Installing MPC"
    31 
    32     CT_DoLog EXTRA "Configuring MPC"
    33 
    34     if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    35         mpc_opts+=( --enable-shared --disable-static )
    36     else
    37         mpc_opts+=( --disable-shared --enable-static )
    38     fi
    39 
    40     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    41     CT_DoExecLog ALL                                \
    42     "${CT_SRC_DIR}/mpc-${CT_MPC_VERSION}/configure" \
    43         --build=${CT_BUILD}                         \
    44         --host=${CT_HOST}                           \
    45         --prefix="${CT_COMPLIBS_DIR}"               \
    46         --with-gmp="${CT_COMPLIBS_DIR}"             \
    47         --with-mpfr="${CT_COMPLIBS_DIR}"            \
    48         "${mpc_opts[@]}"
    49 
    50     CT_DoLog EXTRA "Building MPC"
    51     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    52 
    53     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    54         CT_DoLog EXTRA "Checking MPC"
    55         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    56     fi
    57 
    58     CT_DoLog EXTRA "Installing MPC"
    59     CT_DoExecLog ALL make install
    60 
    61     CT_EndStep
    62 }
    63 
    64 fi # CT_MPC