diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-20 15:16:43 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-20 15:16:43 (GMT) |
commit | 1b00a301bd732441d6bf1ad5d7cc15c0e281b622 (patch) | |
tree | 4d4a46d2d3e8c8f1bd490a88d40bb19f24979b4c /scripts/build/debug/300-gdb.sh | |
parent | aec9074b72704cf76457bb02db8e564adb4da2aa (diff) |
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(-)
Diffstat (limited to 'scripts/build/debug/300-gdb.sh')
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 680375b..5de5862 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -51,12 +51,13 @@ do_debug_gdb_build() { mkdir -p "${CT_BUILD_DIR}/build-gdb-cross" cd "${CT_BUILD_DIR}/build-gdb-cross" + cross_extra_config="${extra_config}" if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then - extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" + cross_extra_config="${cross_extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}" fi case "${CT_THREADS}" in - none) extra_config="${extra_config} --disable-threads";; - *) extra_config="${extra_config} --enable-threads";; + none) cross_extra_config="${cross_extra_config} --disable-threads";; + *) cross_extra_config="${cross_extra_config} --enable-threads";; esac CC_for_gdb= @@ -66,6 +67,8 @@ do_debug_gdb_build() { LD_for_gdb="ld -static" fi + CT_DoLog DEBUG "Extra config passed: '${cross_extra_config# }'" + CC="${CC_for_gdb}" \ LD="${LD_for_gdb}" \ "${gdb_src_dir}/configure" \ @@ -74,7 +77,7 @@ do_debug_gdb_build() { --target=${CT_TARGET} \ --prefix="${CT_PREFIX_DIR}" \ --with-build-sysroot="${CT_SYSROOT_DIR}" \ - ${extra_config} 2>&1 |CT_DoLog ALL + ${cross_extra_config} 2>&1 |CT_DoLog ALL CT_DoLog EXTRA "Building cross-gdb" make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL @@ -123,10 +126,14 @@ do_debug_gdb_build() { mkdir -p "${CT_BUILD_DIR}/build-gdb-native" cd "${CT_BUILD_DIR}/build-gdb-native" + native_extra_config="${extra_config}" case "${CT_THREADS}" in - none) extra_config="${extra_config} --disable-threads";; - *) extra_config="${extra_config} --enable-threads";; + none) native_extra_config="${native_extra_config} --disable-threads";; + *) native_extra_config="${native_extra_config} --enable-threads";; esac + if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then + native_extra_config="${native_extra_config} --with-gmp=${CT_SYSROOT_DIR}/usr --with-mpfr=${CT_SYSROOT_DIR}/usr" + fi CC_for_gdb= LD_for_gdb= @@ -137,6 +144,8 @@ do_debug_gdb_build() { export ac_cv_func_strncmp_works=yes + CT_DoLog DEBUG "Extra config passed: '${native_extra_config# }'" + CC="${CC_for_gdb}" \ LD="${LD_for_gdb}" \ "${gdb_src_dir}/configure" \ @@ -153,7 +162,7 @@ do_debug_gdb_build() { --disable-werror \ --without-included-gettext \ --without-develop \ - ${extra_config} 2>&1 |CT_DoLog ALL + ${native_extra_config} 2>&1 |CT_DoLog ALL CT_DoLog EXTRA "Building native gdb" make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL @@ -186,6 +195,8 @@ do_debug_gdb_build() { gdbserver_LDFLAGS=-static fi + gdbserver_extra_config="${extra_config}" + LDFLAGS="${gdbserver_LDFLAGS}" \ "${gdb_src_dir}/gdb/gdbserver/configure" \ --build=${CT_BUILD} \ @@ -203,7 +214,7 @@ do_debug_gdb_build() { --without-x \ --without-included-gettext \ --without-develop \ - ${extra_config} 2>&1 |CT_DoLog ALL + ${gdbserver_extra_config} 2>&1 |CT_DoLog ALL CT_DoLog EXTRA "Building gdbserver" make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL |