Prepare for gcc-4.4:
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun May 03 21:10:15 2009 +0000 (2009-05-03)
changeset 13185416f4ba36bf
parent 1315 655ee0516997
child 1319 d8e8cd26eae1
Prepare for gcc-4.4:
- add 'companion_libs/' to hold all libraries needed to build gcc-4.3+ and gcc-4.4+
- move GMP & MPFR to 'companion_libs/'

-------- diffstat follows --------
/trunk/scripts/build/gmp.sh | 85 0 85 0 ----------------------------
/trunk/scripts/build/mpfr.sh | 139 0 139 0 ---------------------------------------------
/trunk/scripts/addToolVersion.sh | 4 2 2 0
/trunk/scripts/crosstool-NG.sh.in | 4 2 2 0
/trunk/config/companion_libs.in | 17 10 7 0 +++---
/trunk/config/gmp_mpfr/gmp.in | 32 0 32 0 ----------
/trunk/config/gmp_mpfr/mpfr.in | 42 0 42 0 --------------
/trunk/config/config.in | 2 1 1 0
/trunk/config/gmp_mpfr.in | 35 0 35 0 -----------
9 files changed, 15 insertions(+), 345 deletions(-)
config/companion_libs.in
config/companion_libs/gmp.in
config/companion_libs/mpfr.in
config/config.in
config/gmp_mpfr.in
config/gmp_mpfr/gmp.in
config/gmp_mpfr/mpfr.in
scripts/addToolVersion.sh
scripts/build/companion_libs/gmp.sh
scripts/build/companion_libs/mpfr.sh
scripts/build/gmp.sh
scripts/build/mpfr.sh
scripts/crosstool-NG.sh.in
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/config/companion_libs.in	Sun May 03 21:10:15 2009 +0000
     1.3 @@ -0,0 +1,38 @@
     1.4 +# Companion libraries config options
     1.5 +# Those libraries are required for different versions of gcc,
     1.6 +# and can be used by binutils and gdb (maybe others as well).
     1.7 +
     1.8 +menu "Companion libraries"
     1.9 +
    1.10 +config GMP_MPFR
    1.11 +    bool
    1.12 +    prompt "GMP and MPFR"
    1.13 +    help
    1.14 +      gcc 4.3.0 and above requires both GMP and MPFR to build some frontends,
    1.15 +      and some other components can use them as well (eg. binutils and gdb).
    1.16 +      
    1.17 +      Say 'Y' here if you want to build those two libraries specifically
    1.18 +      for crosstool-NG.
    1.19 +      
    1.20 +      The packages that can use GMP and MPFR are:
    1.21 +        - binutils
    1.22 +        - gcc
    1.23 +        - gdb
    1.24 +
    1.25 +config GMP_MPFR_TARGET
    1.26 +    bool
    1.27 +    prompt "Build libraries for the target"
    1.28 +    depends on GMP_MPFR
    1.29 +    depends on ! BARE_METAL
    1.30 +    default n
    1.31 +    help
    1.32 +      Also build libraries for the target. This can be usefull if you want
    1.33 +      to later build a compiler that will run on the target, or if you want
    1.34 +      to run gdb natively on the target.
    1.35 +
    1.36 +if GMP_MPFR
    1.37 +source config/companion_libs/gmp.in
    1.38 +source config/companion_libs/mpfr.in
    1.39 +endif
    1.40 +
    1.41 +endmenu
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/config/companion_libs/gmp.in	Sun May 03 21:10:15 2009 +0000
     2.3 @@ -0,0 +1,32 @@
     2.4 +# GMP options
     2.5 +
     2.6 +choice
     2.7 +    bool
     2.8 +    prompt "GMP version"
     2.9 +
    2.10 +config GMP_V_4_2_2
    2.11 +    bool
    2.12 +    prompt "4.2.2"
    2.13 +
    2.14 +config GMP_V_4_2_4
    2.15 +    bool
    2.16 +    prompt "4.2.4"
    2.17 +
    2.18 +# CT_INSERT_VERSION_ABOVE
    2.19 +# Don't remove above line!
    2.20 +endchoice
    2.21 +
    2.22 +config GMP_VERSION
    2.23 +    string
    2.24 +    default "4.2.2" if GMP_V_4_2_2
    2.25 +    default "4.2.4" if GMP_V_4_2_4
    2.26 +# CT_INSERT_VERSION_STRING_ABOVE
    2.27 +# Don't remove above line!
    2.28 +
    2.29 +config GMP_CHECK
    2.30 +    bool
    2.31 +    prompt "Check GMP"
    2.32 +    default y
    2.33 +    help
    2.34 +      It is highly recommended that 'make check' is run against the newly built
    2.35 +      GMP library. See http://gmplib.org/
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/config/companion_libs/mpfr.in	Sun May 03 21:10:15 2009 +0000
     3.3 @@ -0,0 +1,42 @@
     3.4 +# GMP options
     3.5 +
     3.6 +choice
     3.7 +    bool
     3.8 +    prompt "MPFR version"
     3.9 +
    3.10 +config MPFR_V_2_3_1
    3.11 +    bool
    3.12 +    prompt "2.3.1"
    3.13 +
    3.14 +config MPFR_V_2_3_2
    3.15 +    bool
    3.16 +    prompt "2.3.2"
    3.17 +
    3.18 +config MPFR_V_2_4_0
    3.19 +    bool
    3.20 +    prompt "2.4.0"
    3.21 +
    3.22 +config MPFR_V_2_4_1
    3.23 +    bool
    3.24 +    prompt "2.4.1"
    3.25 +
    3.26 +# CT_INSERT_VERSION_ABOVE
    3.27 +# Don't remove above line!
    3.28 +endchoice
    3.29 +
    3.30 +config MPFR_VERSION
    3.31 +    string
    3.32 +    default "2.3.1" if MPFR_V_2_3_1
    3.33 +    default "2.3.2" if MPFR_V_2_3_2
    3.34 +    default "2.4.0" if MPFR_V_2_4_0
    3.35 +    default "2.4.1" if MPFR_V_2_4_1
    3.36 +# CT_INSERT_VERSION_STRING_ABOVE
    3.37 +# Don't remove above line!
    3.38 +
    3.39 +config MPFR_CHECK
    3.40 +    bool
    3.41 +    prompt "Check MPFR"
    3.42 +    default y
    3.43 +    help
    3.44 +      It is highly recommended that 'make check' is run against the newly built
    3.45 +      MPFR library. See http://gmplib.org/
     4.1 --- a/config/config.in	Sat May 02 22:21:53 2009 +0000
     4.2 +++ b/config/config.in	Sun May 03 21:10:15 2009 +0000
     4.3 @@ -2,7 +2,7 @@
     4.4  source config/target.in
     4.5  source config/toolchain.in
     4.6  source config/kernel.in
     4.7 -source config/gmp_mpfr.in
     4.8 +source config/companion_libs.in
     4.9  source config/binutils.in
    4.10  source config/cc.in
    4.11  source config/libc.in
     5.1 --- a/config/gmp_mpfr.in	Sat May 02 22:21:53 2009 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,35 +0,0 @@
     5.4 -# GMP and MPFR libraries config options
     5.5 -
     5.6 -menu "GMP and MPFR"
     5.7 -
     5.8 -config GMP_MPFR
     5.9 -    bool
    5.10 -    prompt "GMP and MPFR"
    5.11 -    help
    5.12 -      Recent gcc needs both GMP and MPFR to build some frontends.
    5.13 -
    5.14 -      Say 'Y' here if you want to build those two libraries specifically
    5.15 -      for crosstool-NG.
    5.16 -
    5.17 -      The packages that can use GMP and MPFR are:
    5.18 -        - binutils
    5.19 -        - gcc
    5.20 -        - gdb
    5.21 -
    5.22 -config GMP_MPFR_TARGET
    5.23 -    bool
    5.24 -    prompt "Build libraries for the target"
    5.25 -    depends on GMP_MPFR
    5.26 -    depends on ! BARE_METAL
    5.27 -    default n
    5.28 -    help
    5.29 -      Also build libraries for the target. This can be usefull if you want
    5.30 -      to later build a compiler that will run on the target, or if you want
    5.31 -      to run gdb natively on the target.
    5.32 -
    5.33 -if GMP_MPFR
    5.34 -source config/gmp_mpfr/gmp.in
    5.35 -source config/gmp_mpfr/mpfr.in
    5.36 -endif
    5.37 -
    5.38 -endmenu
     6.1 --- a/config/gmp_mpfr/gmp.in	Sat May 02 22:21:53 2009 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,32 +0,0 @@
     6.4 -# GMP options
     6.5 -
     6.6 -choice
     6.7 -    bool
     6.8 -    prompt "GMP version"
     6.9 -
    6.10 -config GMP_V_4_2_2
    6.11 -    bool
    6.12 -    prompt "4.2.2"
    6.13 -
    6.14 -config GMP_V_4_2_4
    6.15 -    bool
    6.16 -    prompt "4.2.4"
    6.17 -
    6.18 -# CT_INSERT_VERSION_ABOVE
    6.19 -# Don't remove above line!
    6.20 -endchoice
    6.21 -
    6.22 -config GMP_VERSION
    6.23 -    string
    6.24 -    default "4.2.2" if GMP_V_4_2_2
    6.25 -    default "4.2.4" if GMP_V_4_2_4
    6.26 -# CT_INSERT_VERSION_STRING_ABOVE
    6.27 -# Don't remove above line!
    6.28 -
    6.29 -config GMP_CHECK
    6.30 -    bool
    6.31 -    prompt "Check GMP"
    6.32 -    default y
    6.33 -    help
    6.34 -      It is highly recommended that 'make check' is run against the newly built
    6.35 -      GMP library. See http://gmplib.org/
     7.1 --- a/config/gmp_mpfr/mpfr.in	Sat May 02 22:21:53 2009 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,42 +0,0 @@
     7.4 -# GMP options
     7.5 -
     7.6 -choice
     7.7 -    bool
     7.8 -    prompt "MPFR version"
     7.9 -
    7.10 -config MPFR_V_2_3_1
    7.11 -    bool
    7.12 -    prompt "2.3.1"
    7.13 -
    7.14 -config MPFR_V_2_3_2
    7.15 -    bool
    7.16 -    prompt "2.3.2"
    7.17 -
    7.18 -config MPFR_V_2_4_0
    7.19 -    bool
    7.20 -    prompt "2.4.0"
    7.21 -
    7.22 -config MPFR_V_2_4_1
    7.23 -    bool
    7.24 -    prompt "2.4.1"
    7.25 -
    7.26 -# CT_INSERT_VERSION_ABOVE
    7.27 -# Don't remove above line!
    7.28 -endchoice
    7.29 -
    7.30 -config MPFR_VERSION
    7.31 -    string
    7.32 -    default "2.3.1" if MPFR_V_2_3_1
    7.33 -    default "2.3.2" if MPFR_V_2_3_2
    7.34 -    default "2.4.0" if MPFR_V_2_4_0
    7.35 -    default "2.4.1" if MPFR_V_2_4_1
    7.36 -# CT_INSERT_VERSION_STRING_ABOVE
    7.37 -# Don't remove above line!
    7.38 -
    7.39 -config MPFR_CHECK
    7.40 -    bool
    7.41 -    prompt "Check MPFR"
    7.42 -    default y
    7.43 -    help
    7.44 -      It is highly recommended that 'make check' is run against the newly built
    7.45 -      MPFR library. See http://gmplib.org/
     8.1 --- a/scripts/addToolVersion.sh	Sat May 02 22:21:53 2009 +0000
     8.2 +++ b/scripts/addToolVersion.sh	Sun May 03 21:10:15 2009 +0000
     8.3 @@ -131,8 +131,8 @@
     8.4          --strace)   EXP=; OBS=; cat=STRACE;    tool=strace;   tool_prefix=debug;;
     8.5          --ltrace)   EXP=; OBS=; cat=LTRACE;    tool=ltrace;   tool_prefix=debug;;
     8.6          --libelf)   EXP=; OBS=; cat=LIBELF;    tool=libelf;   tool_prefix=tools;;
     8.7 -        --gmp)      EXP=; OBS=; cat=GMP;       tool=gmp;      tool_prefix=gmp_mpfr;;
     8.8 -        --mpfr)     EXP=; OBS=; cat=MPFR;      tool=mpfr;     tool_prefix=gmp_mpfr;;
     8.9 +        --gmp)      EXP=; OBS=; cat=GMP;       tool=gmp;      tool_prefix=companion_libs;;
    8.10 +        --mpfr)     EXP=; OBS=; cat=MPFR;      tool=mpfr;     tool_prefix=companion_libs;;
    8.11  
    8.12          # Tools options:
    8.13          -x|--experimental|+s)   EXP=1;;
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/scripts/build/companion_libs/gmp.sh	Sun May 03 21:10:15 2009 +0000
     9.3 @@ -0,0 +1,85 @@
     9.4 +# This file adds the functions to build the GMP library
     9.5 +# Copyright 2008 Yann E. MORIN
     9.6 +# Licensed under the GPL v2. See COPYING in the root of this package
     9.7 +
     9.8 +do_gmp_get() { :; }
     9.9 +do_gmp_extract() { :; }
    9.10 +do_gmp() { :; }
    9.11 +do_gmp_target() { :; }
    9.12 +
    9.13 +# Overide functions depending on configuration
    9.14 +if [ "${CT_GMP_MPFR}" = "y" ]; then
    9.15 +
    9.16 +# Download GMP
    9.17 +do_gmp_get() {
    9.18 +    CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
    9.19 +}
    9.20 +
    9.21 +# Extract GMP
    9.22 +do_gmp_extract() {
    9.23 +    CT_Extract "gmp-${CT_GMP_VERSION}"
    9.24 +    CT_Patch "gmp-${CT_GMP_VERSION}"
    9.25 +}
    9.26 +
    9.27 +do_gmp() {
    9.28 +    mkdir -p "${CT_BUILD_DIR}/build-gmp"
    9.29 +    cd "${CT_BUILD_DIR}/build-gmp"
    9.30 +
    9.31 +    CT_DoStep INFO "Installing GMP"
    9.32 +
    9.33 +    CT_DoLog EXTRA "Configuring GMP"
    9.34 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
    9.35 +    CT_DoExecLog ALL                                \
    9.36 +    "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    9.37 +        --build=${CT_BUILD}                         \
    9.38 +        --host=${CT_HOST}                           \
    9.39 +        --prefix="${CT_PREFIX_DIR}"                 \
    9.40 +        --disable-shared --enable-static            \
    9.41 +        --enable-fft --enable-mpbsd
    9.42 +
    9.43 +    CT_DoLog EXTRA "Building GMP"
    9.44 +    CT_DoExecLog ALL make ${PARALLELMFLAGS}
    9.45 +
    9.46 +    if [ "${CT_GMP_CHECK}" = "y" ]; then
    9.47 +        CT_DoLog EXTRA "Checking GMP"
    9.48 +        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
    9.49 +    fi
    9.50 +
    9.51 +    CT_DoLog EXTRA "Installing GMP"
    9.52 +    CT_DoExecLog ALL make install
    9.53 +
    9.54 +    CT_EndStep
    9.55 +}
    9.56 +
    9.57 +if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
    9.58 +
    9.59 +do_gmp_target() {
    9.60 +    mkdir -p "${CT_BUILD_DIR}/build-gmp-target"
    9.61 +    cd "${CT_BUILD_DIR}/build-gmp-target"
    9.62 +
    9.63 +    CT_DoStep INFO "Installing GMP for the target"
    9.64 +
    9.65 +    CT_DoLog EXTRA "Configuring GMP"
    9.66 +    CFLAGS="${CT_CFLAGS_FOR_TARGET}"                \
    9.67 +    CT_DoExecLog ALL                                \
    9.68 +    "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
    9.69 +        --build=${CT_BUILD}                         \
    9.70 +        --host=${CT_TARGET}                         \
    9.71 +        --prefix=/usr                               \
    9.72 +        --disable-shared --enable-static            \
    9.73 +        --enable-fft --enable-mpbsd
    9.74 +
    9.75 +    CT_DoLog EXTRA "Building GMP"
    9.76 +    CT_DoExecLog ALL make ${PARALLELMFLAGS}
    9.77 +
    9.78 +    # Not possible to check MPFR while X-compiling
    9.79 +
    9.80 +    CT_DoLog EXTRA "Installing GMP"
    9.81 +    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
    9.82 +
    9.83 +    CT_EndStep
    9.84 +}
    9.85 +
    9.86 +fi # CT_GMP_MPFR_TARGET == y
    9.87 +
    9.88 +fi # CT_GMP_MPFR == y
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/scripts/build/companion_libs/mpfr.sh	Sun May 03 21:10:15 2009 +0000
    10.3 @@ -0,0 +1,139 @@
    10.4 +# This file adds the functions to build the MPFR library
    10.5 +# Copyright 2008 Yann E. MORIN
    10.6 +# Licensed under the GPL v2. See COPYING in the root of this package
    10.7 +
    10.8 +do_mpfr_get() { :; }
    10.9 +do_mpfr_extract() { :; }
   10.10 +do_mpfr() { :; }
   10.11 +do_mpfr_target() { :; }
   10.12 +
   10.13 +# Overide function depending on configuration
   10.14 +if [ "${CT_GMP_MPFR}" = "y" ]; then
   10.15 +
   10.16 +# Download MPFR
   10.17 +do_mpfr_get() {
   10.18 +    CT_GetFile "mpfr-${CT_MPFR_VERSION}" http://www.mpfr.org/mpfr-current/  \
   10.19 +                                 http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
   10.20 +}
   10.21 +
   10.22 +# Extract MPFR
   10.23 +do_mpfr_extract() {
   10.24 +    CT_Extract "mpfr-${CT_MPFR_VERSION}"
   10.25 +    CT_Patch "mpfr-${CT_MPFR_VERSION}"
   10.26 +
   10.27 +    # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
   10.28 +    # same version number. Unfortunately, some tarballs of MPFR are not
   10.29 +    # built sanely, and thus ./configure fails on Gentoo.
   10.30 +    # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
   10.31 +    # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
   10.32 +    # This hack is not bad per se, but the MPFR guys would be better not to
   10.33 +    # do that in the future...
   10.34 +    # It seems that MPFR >= 2.4.0 do not need this...
   10.35 +    case "${CT_MPFR_VERSION}" in
   10.36 +        1.*|2.0.*|2.1.*|2.2.*|2.3.*)
   10.37 +            CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
   10.38 +            if [ ! -f .autotools.ct-ng ]; then
   10.39 +                CT_DoLog DEBUG "Re-building autotools files"
   10.40 +                CT_DoExecLog ALL autoreconf -fi
   10.41 +                # Starting with libtool-1.9f, config.{guess,sub} are no longer
   10.42 +                # installed without -i, but starting with libtool-2.2.6, they
   10.43 +                # are no longer removed without -i. Sight... Just use -i with
   10.44 +                # libtool >=2
   10.45 +                # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
   10.46 +                # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
   10.47 +                libtoolize_opt=
   10.48 +                case "$(libtoolize --version |head -n 1 |awk '{ print $(NF); }')" in
   10.49 +                    0.*)    ;;
   10.50 +                    1.*)    ;;
   10.51 +                    *)      libtoolize_opt=-i;;
   10.52 +                esac
   10.53 +                CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
   10.54 +                touch .autotools.ct-ng
   10.55 +            fi
   10.56 +            CT_Popd
   10.57 +            ;;
   10.58 +    esac
   10.59 +}
   10.60 +
   10.61 +do_mpfr() {
   10.62 +    mkdir -p "${CT_BUILD_DIR}/build-mpfr"
   10.63 +    cd "${CT_BUILD_DIR}/build-mpfr"
   10.64 +
   10.65 +    CT_DoStep INFO "Installing MPFR"
   10.66 +
   10.67 +    mpfr_opt=
   10.68 +    # Under Cygwin, we can't build a thread-safe library
   10.69 +    case "${CT_HOST}" in
   10.70 +        *-cygwin)   mpfr_opt="--disable-thread-safe";;
   10.71 +        *)          mpfr_opt="--enable-thread-safe";;
   10.72 +    esac
   10.73 +
   10.74 +    CT_DoLog EXTRA "Configuring MPFR"
   10.75 +    CC="${CT_HOST}-gcc"                                 \
   10.76 +    CFLAGS="${CT_CFLAGS_FOR_HOST}"                      \
   10.77 +    CT_DoExecLog ALL                                    \
   10.78 +    "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure"   \
   10.79 +        --build=${CT_BUILD}                             \
   10.80 +        --host=${CT_HOST}                               \
   10.81 +        --prefix="${CT_PREFIX_DIR}"                     \
   10.82 +        ${mpfr_opt}                                     \
   10.83 +        --disable-shared                                \
   10.84 +        --enable-static                                 \
   10.85 +        --with-gmp="${CT_PREFIX_DIR}"
   10.86 +
   10.87 +    CT_DoLog EXTRA "Building MPFR"
   10.88 +    CT_DoExecLog ALL make ${PARALLELMFLAGS}
   10.89 +
   10.90 +    if [ "${CT_MPFR_CHECK}" = "y" ]; then
   10.91 +        CT_DoLog EXTRA "Checking MPFR"
   10.92 +        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
   10.93 +    fi
   10.94 +
   10.95 +    CT_DoLog EXTRA "Installing MPFR"
   10.96 +    CT_DoExecLog ALL make install
   10.97 +
   10.98 +    CT_EndStep
   10.99 +}
  10.100 +
  10.101 +if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
  10.102 +
  10.103 +do_mpfr_target() {
  10.104 +    mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
  10.105 +    cd "${CT_BUILD_DIR}/build-mpfr-target"
  10.106 +
  10.107 +    CT_DoStep INFO "Installing MPFR for the target"
  10.108 +
  10.109 +    mpfr_opt=
  10.110 +    # Under Cygwin, we can't build a thread-safe library
  10.111 +    case "${CT_TARGET}" in
  10.112 +        *-cygwin)   mpfr_opt="--disable-thread-safe";;
  10.113 +        *)          mpfr_opt="--enable-thread-safe";;
  10.114 +    esac
  10.115 +
  10.116 +    CT_DoLog EXTRA "Configuring MPFR"
  10.117 +    CC="${CT_TARGET}-gcc"                               \
  10.118 +    CFLAGS="${CT_CFLAGS_FOR_TARGET}"                    \
  10.119 +    CT_DoExecLog ALL                                    \
  10.120 +    "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure"   \
  10.121 +        --build=${CT_BUILD}                             \
  10.122 +        --host=${CT_TARGET}                             \
  10.123 +        --prefix=/usr                                   \
  10.124 +        ${mpfr_opt}                                     \
  10.125 +        --disable-shared                                \
  10.126 +        --enable-static                                 \
  10.127 +        --with-gmp="${CT_SYSROOT_DIR}/usr"
  10.128 +
  10.129 +    CT_DoLog EXTRA "Building MPFR"
  10.130 +    CT_DoExecLog ALL make ${PARALLELMFLAGS}
  10.131 +
  10.132 +    # Not possible to check MPFR while X-compiling
  10.133 +
  10.134 +    CT_DoLog EXTRA "Installing MPFR"
  10.135 +    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
  10.136 +
  10.137 +    CT_EndStep
  10.138 +}
  10.139 +
  10.140 +fi # CT_GMP_MPFR_TARGET == y
  10.141 +
  10.142 +fi # CT_GMP_MPFR == y
    11.1 --- a/scripts/build/gmp.sh	Sat May 02 22:21:53 2009 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,85 +0,0 @@
    11.4 -# This file adds the functions to build the GMP library
    11.5 -# Copyright 2008 Yann E. MORIN
    11.6 -# Licensed under the GPL v2. See COPYING in the root of this package
    11.7 -
    11.8 -do_gmp_get() { :; }
    11.9 -do_gmp_extract() { :; }
   11.10 -do_gmp() { :; }
   11.11 -do_gmp_target() { :; }
   11.12 -
   11.13 -# Overide functions depending on configuration
   11.14 -if [ "${CT_GMP_MPFR}" = "y" ]; then
   11.15 -
   11.16 -# Download GMP
   11.17 -do_gmp_get() {
   11.18 -    CT_GetFile "gmp-${CT_GMP_VERSION}" {ftp,http}://{ftp.sunet.se/pub,ftp.gnu.org}/gnu/gmp
   11.19 -}
   11.20 -
   11.21 -# Extract GMP
   11.22 -do_gmp_extract() {
   11.23 -    CT_Extract "gmp-${CT_GMP_VERSION}"
   11.24 -    CT_Patch "gmp-${CT_GMP_VERSION}"
   11.25 -}
   11.26 -
   11.27 -do_gmp() {
   11.28 -    mkdir -p "${CT_BUILD_DIR}/build-gmp"
   11.29 -    cd "${CT_BUILD_DIR}/build-gmp"
   11.30 -
   11.31 -    CT_DoStep INFO "Installing GMP"
   11.32 -
   11.33 -    CT_DoLog EXTRA "Configuring GMP"
   11.34 -    CFLAGS="${CT_CFLAGS_FOR_HOST}"                  \
   11.35 -    CT_DoExecLog ALL                                \
   11.36 -    "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
   11.37 -        --build=${CT_BUILD}                         \
   11.38 -        --host=${CT_HOST}                           \
   11.39 -        --prefix="${CT_PREFIX_DIR}"                 \
   11.40 -        --disable-shared --enable-static            \
   11.41 -        --enable-fft --enable-mpbsd
   11.42 -
   11.43 -    CT_DoLog EXTRA "Building GMP"
   11.44 -    CT_DoExecLog ALL make ${PARALLELMFLAGS}
   11.45 -
   11.46 -    if [ "${CT_GMP_CHECK}" = "y" ]; then
   11.47 -        CT_DoLog EXTRA "Checking GMP"
   11.48 -        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
   11.49 -    fi
   11.50 -
   11.51 -    CT_DoLog EXTRA "Installing GMP"
   11.52 -    CT_DoExecLog ALL make install
   11.53 -
   11.54 -    CT_EndStep
   11.55 -}
   11.56 -
   11.57 -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
   11.58 -
   11.59 -do_gmp_target() {
   11.60 -    mkdir -p "${CT_BUILD_DIR}/build-gmp-target"
   11.61 -    cd "${CT_BUILD_DIR}/build-gmp-target"
   11.62 -
   11.63 -    CT_DoStep INFO "Installing GMP for the target"
   11.64 -
   11.65 -    CT_DoLog EXTRA "Configuring GMP"
   11.66 -    CFLAGS="${CT_CFLAGS_FOR_TARGET}"                \
   11.67 -    CT_DoExecLog ALL                                \
   11.68 -    "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
   11.69 -        --build=${CT_BUILD}                         \
   11.70 -        --host=${CT_TARGET}                         \
   11.71 -        --prefix=/usr                               \
   11.72 -        --disable-shared --enable-static            \
   11.73 -        --enable-fft --enable-mpbsd
   11.74 -
   11.75 -    CT_DoLog EXTRA "Building GMP"
   11.76 -    CT_DoExecLog ALL make ${PARALLELMFLAGS}
   11.77 -
   11.78 -    # Not possible to check MPFR while X-compiling
   11.79 -
   11.80 -    CT_DoLog EXTRA "Installing GMP"
   11.81 -    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
   11.82 -
   11.83 -    CT_EndStep
   11.84 -}
   11.85 -
   11.86 -fi # CT_GMP_MPFR_TARGET == y
   11.87 -
   11.88 -fi # CT_GMP_MPFR == y
    12.1 --- a/scripts/build/mpfr.sh	Sat May 02 22:21:53 2009 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,139 +0,0 @@
    12.4 -# This file adds the functions to build the MPFR library
    12.5 -# Copyright 2008 Yann E. MORIN
    12.6 -# Licensed under the GPL v2. See COPYING in the root of this package
    12.7 -
    12.8 -do_mpfr_get() { :; }
    12.9 -do_mpfr_extract() { :; }
   12.10 -do_mpfr() { :; }
   12.11 -do_mpfr_target() { :; }
   12.12 -
   12.13 -# Overide function depending on configuration
   12.14 -if [ "${CT_GMP_MPFR}" = "y" ]; then
   12.15 -
   12.16 -# Download MPFR
   12.17 -do_mpfr_get() {
   12.18 -    CT_GetFile "mpfr-${CT_MPFR_VERSION}" http://www.mpfr.org/mpfr-current/  \
   12.19 -                                 http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
   12.20 -}
   12.21 -
   12.22 -# Extract MPFR
   12.23 -do_mpfr_extract() {
   12.24 -    CT_Extract "mpfr-${CT_MPFR_VERSION}"
   12.25 -    CT_Patch "mpfr-${CT_MPFR_VERSION}"
   12.26 -
   12.27 -    # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
   12.28 -    # same version number. Unfortunately, some tarballs of MPFR are not
   12.29 -    # built sanely, and thus ./configure fails on Gentoo.
   12.30 -    # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
   12.31 -    # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
   12.32 -    # This hack is not bad per se, but the MPFR guys would be better not to
   12.33 -    # do that in the future...
   12.34 -    # It seems that MPFR >= 2.4.0 do not need this...
   12.35 -    case "${CT_MPFR_VERSION}" in
   12.36 -        1.*|2.0.*|2.1.*|2.2.*|2.3.*)
   12.37 -            CT_Pushd "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}"
   12.38 -            if [ ! -f .autotools.ct-ng ]; then
   12.39 -                CT_DoLog DEBUG "Re-building autotools files"
   12.40 -                CT_DoExecLog ALL autoreconf -fi
   12.41 -                # Starting with libtool-1.9f, config.{guess,sub} are no longer
   12.42 -                # installed without -i, but starting with libtool-2.2.6, they
   12.43 -                # are no longer removed without -i. Sight... Just use -i with
   12.44 -                # libtool >=2
   12.45 -                # See: http://sourceware.org/ml/crossgcc/2008-11/msg00046.html
   12.46 -                # and: http://sourceware.org/ml/crossgcc/2008-11/msg00048.html
   12.47 -                libtoolize_opt=
   12.48 -                case "$(libtoolize --version |head -n 1 |awk '{ print $(NF); }')" in
   12.49 -                    0.*)    ;;
   12.50 -                    1.*)    ;;
   12.51 -                    *)      libtoolize_opt=-i;;
   12.52 -                esac
   12.53 -                CT_DoExecLog ALL libtoolize -f ${libtoolize_opt}
   12.54 -                touch .autotools.ct-ng
   12.55 -            fi
   12.56 -            CT_Popd
   12.57 -            ;;
   12.58 -    esac
   12.59 -}
   12.60 -
   12.61 -do_mpfr() {
   12.62 -    mkdir -p "${CT_BUILD_DIR}/build-mpfr"
   12.63 -    cd "${CT_BUILD_DIR}/build-mpfr"
   12.64 -
   12.65 -    CT_DoStep INFO "Installing MPFR"
   12.66 -
   12.67 -    mpfr_opt=
   12.68 -    # Under Cygwin, we can't build a thread-safe library
   12.69 -    case "${CT_HOST}" in
   12.70 -        *-cygwin)   mpfr_opt="--disable-thread-safe";;
   12.71 -        *)          mpfr_opt="--enable-thread-safe";;
   12.72 -    esac
   12.73 -
   12.74 -    CT_DoLog EXTRA "Configuring MPFR"
   12.75 -    CC="${CT_HOST}-gcc"                                 \
   12.76 -    CFLAGS="${CT_CFLAGS_FOR_HOST}"                      \
   12.77 -    CT_DoExecLog ALL                                    \
   12.78 -    "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure"   \
   12.79 -        --build=${CT_BUILD}                             \
   12.80 -        --host=${CT_HOST}                               \
   12.81 -        --prefix="${CT_PREFIX_DIR}"                     \
   12.82 -        ${mpfr_opt}                                     \
   12.83 -        --disable-shared                                \
   12.84 -        --enable-static                                 \
   12.85 -        --with-gmp="${CT_PREFIX_DIR}"
   12.86 -
   12.87 -    CT_DoLog EXTRA "Building MPFR"
   12.88 -    CT_DoExecLog ALL make ${PARALLELMFLAGS}
   12.89 -
   12.90 -    if [ "${CT_MPFR_CHECK}" = "y" ]; then
   12.91 -        CT_DoLog EXTRA "Checking MPFR"
   12.92 -        CT_DoExecLog ALL make ${PARALLELMFLAGS} -s check
   12.93 -    fi
   12.94 -
   12.95 -    CT_DoLog EXTRA "Installing MPFR"
   12.96 -    CT_DoExecLog ALL make install
   12.97 -
   12.98 -    CT_EndStep
   12.99 -}
  12.100 -
  12.101 -if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
  12.102 -
  12.103 -do_mpfr_target() {
  12.104 -    mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
  12.105 -    cd "${CT_BUILD_DIR}/build-mpfr-target"
  12.106 -
  12.107 -    CT_DoStep INFO "Installing MPFR for the target"
  12.108 -
  12.109 -    mpfr_opt=
  12.110 -    # Under Cygwin, we can't build a thread-safe library
  12.111 -    case "${CT_TARGET}" in
  12.112 -        *-cygwin)   mpfr_opt="--disable-thread-safe";;
  12.113 -        *)          mpfr_opt="--enable-thread-safe";;
  12.114 -    esac
  12.115 -
  12.116 -    CT_DoLog EXTRA "Configuring MPFR"
  12.117 -    CC="${CT_TARGET}-gcc"                               \
  12.118 -    CFLAGS="${CT_CFLAGS_FOR_TARGET}"                    \
  12.119 -    CT_DoExecLog ALL                                    \
  12.120 -    "${CT_SRC_DIR}/mpfr-${CT_MPFR_VERSION}/configure"   \
  12.121 -        --build=${CT_BUILD}                             \
  12.122 -        --host=${CT_TARGET}                             \
  12.123 -        --prefix=/usr                                   \
  12.124 -        ${mpfr_opt}                                     \
  12.125 -        --disable-shared                                \
  12.126 -        --enable-static                                 \
  12.127 -        --with-gmp="${CT_SYSROOT_DIR}/usr"
  12.128 -
  12.129 -    CT_DoLog EXTRA "Building MPFR"
  12.130 -    CT_DoExecLog ALL make ${PARALLELMFLAGS}
  12.131 -
  12.132 -    # Not possible to check MPFR while X-compiling
  12.133 -
  12.134 -    CT_DoLog EXTRA "Installing MPFR"
  12.135 -    CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
  12.136 -
  12.137 -    CT_EndStep
  12.138 -}
  12.139 -
  12.140 -fi # CT_GMP_MPFR_TARGET == y
  12.141 -
  12.142 -fi # CT_GMP_MPFR == y
    13.1 --- a/scripts/crosstool-NG.sh.in	Sat May 02 22:21:53 2009 +0000
    13.2 +++ b/scripts/crosstool-NG.sh.in	Sun May 03 21:10:15 2009 +0000
    13.3 @@ -88,8 +88,8 @@
    13.4  . "${CT_LIB_DIR}/scripts/build/internals.sh"
    13.5  . "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
    13.6  . "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
    13.7 -. "${CT_LIB_DIR}/scripts/build/gmp.sh"
    13.8 -. "${CT_LIB_DIR}/scripts/build/mpfr.sh"
    13.9 +. "${CT_LIB_DIR}/scripts/build/companion_libs/gmp.sh"
   13.10 +. "${CT_LIB_DIR}/scripts/build/companion_libs/mpfr.sh"
   13.11  . "${CT_LIB_DIR}/scripts/build/binutils.sh"
   13.12  . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
   13.13  . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"