scripts/build/companion_libs/gmp.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 GMP library
     2 # Copyright 2008 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_gmp_get() { :; }
     6 do_gmp_extract() { :; }
     7 do_gmp() { :; }
     8 
     9 # Overide functions depending on configuration
    10 if [ "${CT_GMP}" = "y" ]; then
    11 
    12 # Download GMP
    13 do_gmp_get() {
    14     CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
    15 }
    16 
    17 # Extract GMP
    18 do_gmp_extract() {
    19     CT_Extract "gmp-${CT_GMP_VERSION}"
    20     CT_Patch "gmp" "${CT_GMP_VERSION}"
    21 }
    22 
    23 do_gmp() {
    24     local -a gmp_opts
    25 
    26     mkdir -p "${CT_BUILD_DIR}/build-gmp"
    27     cd "${CT_BUILD_DIR}/build-gmp"
    28 
    29     CT_DoStep INFO "Installing GMP"
    30 
    31     CT_DoLog EXTRA "Configuring GMP"
    32 
    33     if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
    34         gmp_opts+=( --enable-shared --disable-static )
    35     else
    36         gmp_opts+=( --disable-shared --enable-static )
    37     fi
    38 
    39     CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions"     \
    40     CT_DoExecLog ALL                                \
    41     "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    42         --build=${CT_BUILD}                         \
    43         --host=${CT_HOST}                           \
    44         --prefix="${CT_COMPLIBS_DIR}"               \
    45         --enable-fft                                \
    46         --enable-mpbsd                              \
    47         --enable-cxx                                \
    48         "${gmp_opts[@]}"
    49 
    50     CT_DoLog EXTRA "Building GMP"
    51     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    52 
    53     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    54         CT_DoLog EXTRA "Checking GMP"
    55         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    56     fi
    57 
    58     CT_DoLog EXTRA "Installing GMP"
    59     CT_DoExecLog ALL make install
    60 
    61     CT_EndStep
    62 }
    63 
    64 fi # CT_GMP