scripts/build/gmp.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 09:50:16 2009 +0000 (2009-05-03)
branchnewlib
changeset 1366 5e5d1e6f55d3
parent 1119 4e7562023f3e
permissions -rw-r--r--
Update the newlib devel branch with stuff from /trunk@1498.

-------- diffstat follows --------
/devel/newlib/configure | 336 176 160 0 +++++++------
/devel/newlib/Makefile.in | 12 3 9 0 -
/devel/newlib/scripts/build/kernel/linux.sh | 2 1 1 0
/devel/newlib/scripts/build/internals.sh | 1 0 1 0 -
/devel/newlib/scripts/build/libc/eglibc.sh | 1 0 1 0 -
/devel/newlib/scripts/build/mpfr.sh | 2 1 1 0
/devel/newlib/scripts/functions | 111 5 106 0 ----
/devel/newlib/scripts/config.guess | 7 5 2 0 +
/devel/newlib/scripts/config.sub | 3 2 1 0 +
/devel/newlib/scripts/saveSample.sh.in | 4 2 2 0
/devel/newlib/docs/overview.txt | 8 6 2 0 +
/devel/newlib/samples/armeb-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/sh4-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-elf/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/armeb-unknown-eabi/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/arm-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/ia64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/x86_64-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-gnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-e500v2-linux-gnuspe/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i686-nptl-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-iphone-linux-gnueabi/crosstool.config | 8 4 4 0
/devel/newlib/samples/armeb-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/i586-geode-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-unknown-linux-uclibc/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/mips-unknown-elf/crosstool.config | 2 0 2 0 -
/devel/newlib/samples/powerpc-405-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/arm-unknown-eabi/crosstool.config | 12 3 9 0 -
/devel/newlib/samples/mipsel-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc64-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/alphaev56-unknown-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/samples/powerpc-860-linux-gnu/crosstool.config | 14 5 9 0 -
/devel/newlib/config/kernel/linux.in | 108 2 106 0 ----
/devel/newlib/config/global/ct-behave.in | 22 13 9 0 +
/devel/newlib/config/global/download.in | 210 15 195 0 +-------
/devel/newlib/config/libc/glibc.in | 7 7 0 0 +
/devel/newlib/config/libc/glibc-eglibc.in-common | 15 14 1 0 +
45 files changed, 382 insertions(+), 839 deletions(-)
     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 do_gmp_target() { :; }
     9 
    10 # Overide functions depending on configuration
    11 if [ "${CT_GMP_MPFR}" = "y" ]; then
    12 
    13 # Download GMP
    14 do_gmp_get() {
    15     CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
    16 }
    17 
    18 # Extract GMP
    19 do_gmp_extract() {
    20     CT_Extract "gmp-${CT_GMP_VERSION}"
    21     CT_Patch "gmp-${CT_GMP_VERSION}"
    22 }
    23 
    24 do_gmp() {
    25     mkdir -p "${CT_BUILD_DIR}/build-gmp"
    26     cd "${CT_BUILD_DIR}/build-gmp"
    27 
    28     CT_DoStep INFO "Installing GMP"
    29 
    30     CT_DoLog EXTRA "Configuring GMP"
    31     CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    32     CT_DoExecLog ALL                                \
    33     "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    34         --build=${CT_BUILD}                         \
    35         --host=${CT_HOST}                           \
    36         --prefix="${CT_PREFIX_DIR}"                 \
    37         --disable-shared --enable-static            \
    38         --enable-fft --enable-mpbsd
    39 
    40     CT_DoLog EXTRA "Building GMP"
    41     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    42 
    43     if [ "${CT_GMP_CHECK}" = "y" ]; then
    44         CT_DoLog EXTRA "Checking GMP"
    45         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    46     fi
    47 
    48     CT_DoLog EXTRA "Installing GMP"
    49     CT_DoExecLog ALL make install
    50 
    51     CT_EndStep
    52 }
    53 
    54 if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
    55 
    56 do_gmp_target() {
    57     mkdir -p "${CT_BUILD_DIR}/build-gmp-target"
    58     cd "${CT_BUILD_DIR}/build-gmp-target"
    59 
    60     CT_DoStep INFO "Installing GMP for the target"
    61 
    62     CT_DoLog EXTRA "Configuring GMP"
    63     CFLAGS="${CT_CFLAGS_FOR_TARGET}"                \
    64     CT_DoExecLog ALL                                \
    65     "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    66         --build=${CT_BUILD}                         \
    67         --host=${CT_TARGET}                         \
    68         --prefix=/usr                               \
    69         --disable-shared --enable-static            \
    70         --enable-fft --enable-mpbsd
    71 
    72     CT_DoLog EXTRA "Building GMP"
    73     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    74 
    75     # Not possible to check MPFR while X-compiling
    76 
    77     CT_DoLog EXTRA "Installing GMP"
    78     CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
    79 
    80     CT_EndStep
    81 }
    82 
    83 fi # CT_GMP_MPFR_TARGET == y
    84 
    85 fi # CT_GMP_MPFR == y