scripts/build/companion_libs/gmp.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jan 01 17:49:44 2012 +0100 (2012-01-01)
changeset 2924 0eab838768b1
parent 2346 ab441b3f8ea1
child 2927 ddaae597fd7c
permissions -rw-r--r--
cc/gcc: install the core compilers in the build-tools dir

There really is no good reason to install the core compilers in their
own places, one for each pass. We can install them with the other
build tools.

Also, this implies that:
- there are fewer directories to save/restore
- there are fewer symlinks to create for binutils
- the PATH is shorter

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     mkdir -p "${CT_BUILD_DIR}/build-gmp"
    25     cd "${CT_BUILD_DIR}/build-gmp"
    26 
    27     CT_DoStep INFO "Installing GMP"
    28 
    29     CT_DoLog EXTRA "Configuring GMP"
    30 
    31     CT_DoExecLog CFG                                \
    32     CFLAGS="${CT_CFLAGS_FOR_HOST} -fexceptions"     \
    33     "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    34         --build=${CT_BUILD}                         \
    35         --host=${CT_HOST}                           \
    36         --prefix="${CT_COMPLIBS_DIR}"               \
    37         --enable-fft                                \
    38         --enable-mpbsd                              \
    39         --enable-cxx                                \
    40         --disable-shared                            \
    41         --enable-static
    42 
    43     CT_DoLog EXTRA "Building GMP"
    44     CT_DoExecLog ALL make ${JOBSFLAGS}
    45 
    46     if [ "${CT_COMPLIBS_CHECK}" = "y" ]; then
    47         CT_DoLog EXTRA "Checking GMP"
    48         CT_DoExecLog ALL make ${JOBSFLAGS} -s check
    49     fi
    50 
    51     CT_DoLog EXTRA "Installing GMP"
    52     CT_DoExecLog ALL make install
    53 
    54     CT_EndStep
    55 }
    56 
    57 fi # CT_GMP