scripts/build/mpfr.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jan 03 21:11:41 2009 +0000 (2009-01-03)
changeset 1112 c72aecd1a9ef
parent 1063 1b4b6359a329
child 1119 4e7562023f3e
permissions -rw-r--r--
Get rid of all stuff related to building a /delivery' traball:
- building a delivery tarball has long been broken (since crostool-Ng is installable)
- get rid of implied do_print_filename, that can be mis-leading now tarballs can not be built

/trunk/scripts/build/kernel/bare-metal.sh | 4 0 4 0 ----
/trunk/scripts/build/kernel/linux.sh | 4 0 4 0 ----
/trunk/scripts/build/tools/000-template.sh | 11 0 11 0 -----------
/trunk/scripts/build/tools/100-libelf.sh | 4 0 4 0 ----
/trunk/scripts/build/tools/200-sstrip.sh | 11 1 10 0 +----------
/trunk/scripts/build/binutils.sh | 4 0 4 0 ----
/trunk/scripts/build/cc/gcc.sh | 5 0 5 0 -----
/trunk/scripts/build/debug/000-template.sh | 11 0 11 0 -----------
/trunk/scripts/build/debug/100-dmalloc.sh | 4 0 4 0 ----
/trunk/scripts/build/debug/400-ltrace.sh | 4 0 4 0 ----
/trunk/scripts/build/debug/300-gdb.sh | 7 0 7 0 -------
/trunk/scripts/build/debug/500-strace.sh | 4 0 4 0 ----
/trunk/scripts/build/debug/200-duma.sh | 4 0 4 0 ----
/trunk/scripts/build/libc/none.sh | 5 0 5 0 -----
/trunk/scripts/build/libc/glibc.sh | 10 0 10 0 ----------
/trunk/scripts/build/libc/uClibc.sh | 6 0 6 0 ------
/trunk/scripts/build/libc/eglibc.sh | 10 0 10 0 ----------
/trunk/scripts/build/gmp.sh | 6 0 6 0 ------
/trunk/scripts/build/mpfr.sh | 6 0 6 0 ------
/trunk/docs/overview.txt | 9 0 9 0 ---------
20 files changed, 1 insertion(+), 128 deletions(-)
     1 # This file adds the functions to build the MPFR library
     2 # Copyright 2008 Yann E. MORIN
     3 # Licensed under the GPL v2. See COPYING in the root of this package
     4 
     5 do_mpfr_get() { :; }
     6 do_mpfr_extract() { :; }
     7 do_mpfr() { :; }
     8 do_mpfr_target() { :; }
     9 
    10 # Overide function depending on configuration
    11 if [ "${CT_GMP_MPFR}" = "y" ]; then
    12 
    13 # Download MPFR
    14 do_mpfr_get() {
    15     CT_GetFile "${CT_MPFR_FILE}" http://www.mpfr.org/mpfr-current/          \
    16                                  http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
    17 }
    18 
    19 # Extract MPFR
    20 do_mpfr_extract() {
    21     CT_ExtractAndPatch "${CT_MPFR_FILE}"
    22 
    23     # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
    24     # same version number. Unfortunately, some tarballs of MPFR are not
    25     # built sanely, and thus ./configure fails on Gentoo.
    26     # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
    27     # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
    28     # This hack is not bad per se, but the MPFR guys would be better not to
    29     # do that in the future...
    30     CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
    31     if [ ! -f .autotools.ct-ng ]; then
    32         CT_DoLog DEBUG "Re-building autotools files"
    33         CT_DoExecLog ALL autoreconf -fi
    34         # Starting with libtool-1.9f, config.{guess,sub} are no longer
    35         # installed without -i, but starting with libtool-2.2.6, they
    36         # are no longer removed without -i. Sight... Just use -i with
    37         # libtool >=2
    38         # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
    39         # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
    40         libtoolize_opt=
    41         case "$(libtoolize --version |head -n 1 |gawk '{ print $(NF); }')" in
    42             0.*)    ;;
    43             1.*)    ;;
    44             *)      libtoolize_opt=-i;;
    45         esac
    46         CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
    47         touch .autotools.ct-ng
    48     fi
    49     CT_Popd
    50 }
    51 
    52 do_mpfr() {
    53     mkdir -p "${CT_BUILD_DIR}/build-mpfr"
    54     cd "${CT_BUILD_DIR}/build-mpfr"
    55 
    56     CT_DoStep INFO "Installing MPFR"
    57 
    58     CT_DoLog EXTRA "Configuring MPFR"
    59     CFLAGS="${CT_CFLAGS_FOR_HOST}"              \
    60     CT_DoExecLog ALL                            \
    61     "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure"   \
    62         --build=${CT_BUILD}                     \
    63         --host=${CT_HOST}                       \
    64         --prefix="${CT_PREFIX_DIR}"             \
    65         --enable-thread-safe                    \
    66         --disable-shared --enable-static        \
    67         --with-gmp="${CT_PREFIX_DIR}"
    68 
    69     CT_DoLog EXTRA "Building MPFR"
    70     CT_DoExecLog ALL make ${PARALLELMFLAGS}
    71 
    72     if [ "${CT_MPFR_CHECK}" = "y" ]; then
    73         CT_DoLog EXTRA "Checking MPFR"
    74         CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    75     fi
    76 
    77     CT_DoLog EXTRA "Installing MPFR"
    78     CT_DoExecLog ALL make install
    79 
    80     CT_EndStep
    81 }
    82 
    83 if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
    84 
    85 do_mpfr_target() {
    86     mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
    87     cd "${CT_BUILD_DIR}/build-mpfr-target"
    88 
    89     CT_DoStep INFO "Installing MPFR for the target"
    90 
    91     CT_DoLog EXTRA "Configuring MPFR"
    92     CFLAGS="${CT_CFLAGS_FOR_TARGET}"            \
    93     CT_DoExecLog ALL                            \
    94     "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure"   \
    95         --build=${CT_BUILD}                     \
    96         --host=${CT_TARGET}                     \
    97         --prefix=/usr                           \
    98         --enable-thread-safe                    \
    99         --disable-shared --enable-static        \
   100         --with-gmp="${CT_SYSROOT_DIR}/usr"
   101 
   102     CT_DoLog EXTRA "Building MPFR"
   103     CT_DoExecLog ALL make ${PARALLELMFLAGS}
   104 
   105     # Not possible to check MPFR while X-compiling
   106 
   107     CT_DoLog EXTRA "Installing MPFR"
   108     CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
   109 
   110     CT_EndStep
   111 }
   112 
   113 fi # CT_GMP_MPFR_TARGET == y
   114 
   115 fi # CT_GMP_MPFR == y