GMP and MPFR are no longer a sub-component of gcc (config-wise).
Build and install GMP and MPFR for the target.
Use the target GMP and MPFR to build the native gdb.
Have separate extra_config for cross gdb, native gdb and gdbserver.
Check native GMP and MPFR in //.
/trunk/scripts/build/debug/300-gdb.sh | 27 19 8 0 ++++++++++++++++-------
/trunk/scripts/build/gmp.sh | 47 39 8 0 ++++++++++++++++++++++++++++++++-------
/trunk/scripts/build/mpfr.sh | 49 40 9 0 +++++++++++++++++++++++++++++++++--------
/trunk/steps.mk | 2 2 0 0 ++
/trunk/config/cc/gcc.in | 18 1 17 0 +--------------
/trunk/config/debug/gdb.in | 6 1 5 0 +----
/trunk/config/config.in | 1 1 0 0 +
/trunk/config/gmp_mpfr.in | 34 34 0 0 ++++++++++++++++++++++++++++
8 files changed, 137 insertions(+), 47 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
5 do_print_filename() { :; }
7 do_mpfr_extract() { :; }
9 do_mpfr_target() { :; }
11 # Overide function depending on configuration
12 if [ "${CT_GMP_MPFR}" = "y" ]; then
15 [ "${CT_GMP_MPFR}" = "y" ] || return 0
16 echo "mpfr-${CT_MPFR_VERSION}"
21 CT_GetFile "${CT_MPFR_FILE}" http://www.mpfr.org/mpfr-current/ \
22 http://www.mpfr.org/mpfr-${CT_MPFR_VERSION}/
27 CT_ExtractAndPatch "${CT_MPFR_FILE}"
29 # OK, Gentoo have a sanity check that libtool.m4 and ltmain.sh have the
30 # same version number. Unfortunately, some tarballs of MPFR are not
31 # built sanely, and thus ./configure fails on Gentoo.
32 # See: http://sourceware.org/ml/crossgcc/2008-05/msg00080.html
33 # and: http://sourceware.org/ml/crossgcc/2008-06/msg00005.html
34 # This hack is not bad per se, but the MPFR guys would be better not to
35 # do that in the future...
36 CT_Pushd "${CT_SRC_DIR}/${CT_MPFR_FILE}"
37 if [ ! -f .autotools.ct-ng ]; then
38 CT_DoLog EXTRA "Re-building autotools files"
39 autoreconf -fi 2>&1 |CT_DoLog ALL
40 libtoolize -f 2>&1 |CT_DoLog ALL
41 touch .autotools.ct-ng
47 mkdir -p "${CT_BUILD_DIR}/build-mpfr"
48 cd "${CT_BUILD_DIR}/build-mpfr"
50 CT_DoStep INFO "Installing MPFR"
52 CT_DoLog EXTRA "Configuring MPFR"
53 CFLAGS="${CT_CFLAGS_FOR_HOST}" \
54 "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure" \
57 --prefix="${CT_PREFIX_DIR}" \
58 --enable-thread-safe \
59 --disable-shared --enable-static \
60 --with-gmp="${CT_PREFIX_DIR}" 2>&1 |CT_DoLog ALL
62 CT_DoLog EXTRA "Building MPFR"
63 make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
65 if [ "${CT_MPFR_CHECK}" = "y" ]; then
66 CT_DoLog EXTRA "Checking MPFR"
67 make ${PARALLELMFLAGS} -s check 2>&1 |CT_DoLog ALL
70 CT_DoLog EXTRA "Installing MPFR"
71 make install 2>&1 |CT_DoLog ALL
76 if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
79 mkdir -p "${CT_BUILD_DIR}/build-mpfr-target"
80 cd "${CT_BUILD_DIR}/build-mpfr-target"
82 CT_DoStep INFO "Installing MPFR for the target"
84 CT_DoLog EXTRA "Configuring MPFR"
85 CFLAGS="${CT_CFLAGS_FOR_TARGET}" \
86 "${CT_SRC_DIR}/${CT_MPFR_FILE}/configure" \
90 --enable-thread-safe \
91 --disable-shared --enable-static \
92 --with-gmp="${CT_SYSROOT_DIR}/usr" 2>&1 |CT_DoLog ALL
94 CT_DoLog EXTRA "Building MPFR"
95 make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
97 # Not possible to check MPFR while X-compiling
99 CT_DoLog EXTRA "Installing MPFR"
100 make DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL
105 fi # CT_GMP_MPFR_TARGET == y
107 fi # CT_GMP_MPFR == y