scripts/build/companion_libs/mpc.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Jan 03 23:40:22 2011 +0100 (2011-01-03)
changeset 2267 7af68e6083aa
parent 2099 1bb063c8a0ca
child 2275 9ab4392430ad
permissions -rw-r--r--
libc-glibc: remove 2.3.6

This is an obsolete version which is no longer used by any sample (the only
user, the ia64 sample, has been removed).

It also makes the code path a bit complex, with twists just to accomodate
that version. Removing the version will make those twists go away, and
will ease commonalisation of glibc and eglibc in the future (hopefully!).

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 CFG                                \
    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