scripts/build/companion_libs/gmp.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 22 22:35:43 2011 +0100 (2011-01-22)
changeset 2275 9ab4392430ad
parent 2154 250cdcc86441
child 2346 ab441b3f8ea1
permissions -rw-r--r--
scripts: PARALLELMFLAGS is evil, rename

The reunification of the glibc/eglibc code paths exposed a nasty
bug in the glibc build: use of PARALLELMFLAGS breaks the build.

See the explanations in that bug report against FC6:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=212111

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 CFG                                \
    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 ${JOBSFLAGS}
    52 
    53     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    54         CT_DoLog EXTRA "Checking GMP"
    55         CT_DoExecLog ALL make ${JOBSFLAGS} -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