1.1 --- a/scripts/build/debug/300-gdb.sh Fri Jun 20 10:58:45 2008 +0000
1.2 +++ b/scripts/build/debug/300-gdb.sh Fri Jun 20 15:16:43 2008 +0000
1.3 @@ -51,12 +51,13 @@
1.4 mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
1.5 cd "${CT_BUILD_DIR}/build-gdb-cross"
1.6
1.7 + cross_extra_config="${extra_config}"
1.8 if [ "${CT_CC_GCC_GMP_MPFR}" = "y" ]; then
1.9 - extra_config="${extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.10 + cross_extra_config="${cross_extra_config} --with-gmp=${CT_PREFIX_DIR} --with-mpfr=${CT_PREFIX_DIR}"
1.11 fi
1.12 case "${CT_THREADS}" in
1.13 - none) extra_config="${extra_config} --disable-threads";;
1.14 - *) extra_config="${extra_config} --enable-threads";;
1.15 + none) cross_extra_config="${cross_extra_config} --disable-threads";;
1.16 + *) cross_extra_config="${cross_extra_config} --enable-threads";;
1.17 esac
1.18
1.19 CC_for_gdb=
1.20 @@ -66,6 +67,8 @@
1.21 LD_for_gdb="ld -static"
1.22 fi
1.23
1.24 + CT_DoLog DEBUG "Extra config passed: '${cross_extra_config# }'"
1.25 +
1.26 CC="${CC_for_gdb}" \
1.27 LD="${LD_for_gdb}" \
1.28 "${gdb_src_dir}/configure" \
1.29 @@ -74,7 +77,7 @@
1.30 --target=${CT_TARGET} \
1.31 --prefix="${CT_PREFIX_DIR}" \
1.32 --with-build-sysroot="${CT_SYSROOT_DIR}" \
1.33 - ${extra_config} 2>&1 |CT_DoLog ALL
1.34 + ${cross_extra_config} 2>&1 |CT_DoLog ALL
1.35
1.36 CT_DoLog EXTRA "Building cross-gdb"
1.37 make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
1.38 @@ -123,10 +126,14 @@
1.39 mkdir -p "${CT_BUILD_DIR}/build-gdb-native"
1.40 cd "${CT_BUILD_DIR}/build-gdb-native"
1.41
1.42 + native_extra_config="${extra_config}"
1.43 case "${CT_THREADS}" in
1.44 - none) extra_config="${extra_config} --disable-threads";;
1.45 - *) extra_config="${extra_config} --enable-threads";;
1.46 + none) native_extra_config="${native_extra_config} --disable-threads";;
1.47 + *) native_extra_config="${native_extra_config} --enable-threads";;
1.48 esac
1.49 + if [ "${CT_GMP_MPFR_TARGET}" = "y" ]; then
1.50 + native_extra_config="${native_extra_config} --with-gmp=${CT_SYSROOT_DIR}/usr --with-mpfr=${CT_SYSROOT_DIR}/usr"
1.51 + fi
1.52
1.53 CC_for_gdb=
1.54 LD_for_gdb=
1.55 @@ -137,6 +144,8 @@
1.56
1.57 export ac_cv_func_strncmp_works=yes
1.58
1.59 + CT_DoLog DEBUG "Extra config passed: '${native_extra_config# }'"
1.60 +
1.61 CC="${CC_for_gdb}" \
1.62 LD="${LD_for_gdb}" \
1.63 "${gdb_src_dir}/configure" \
1.64 @@ -153,7 +162,7 @@
1.65 --disable-werror \
1.66 --without-included-gettext \
1.67 --without-develop \
1.68 - ${extra_config} 2>&1 |CT_DoLog ALL
1.69 + ${native_extra_config} 2>&1 |CT_DoLog ALL
1.70
1.71 CT_DoLog EXTRA "Building native gdb"
1.72 make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL
1.73 @@ -186,6 +195,8 @@
1.74 gdbserver_LDFLAGS=-static
1.75 fi
1.76
1.77 + gdbserver_extra_config="${extra_config}"
1.78 +
1.79 LDFLAGS="${gdbserver_LDFLAGS}" \
1.80 "${gdb_src_dir}/gdb/gdbserver/configure" \
1.81 --build=${CT_BUILD} \
1.82 @@ -203,7 +214,7 @@
1.83 --without-x \
1.84 --without-included-gettext \
1.85 --without-develop \
1.86 - ${extra_config} 2>&1 |CT_DoLog ALL
1.87 + ${gdbserver_extra_config} 2>&1 |CT_DoLog ALL
1.88
1.89 CT_DoLog EXTRA "Building gdbserver"
1.90 make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL