summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-18 12:33:32 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-06-18 12:33:32 (GMT)
commita09a458bb9e3105d8c5de733110bcd3f703fa459 (patch)
tree6988aef617fa7eba2c9ccfd8cf1979fe2b28d0aa /scripts
parent1b822b4447ce4cf557398bc4a264b575636015af (diff)
Fix building native gdb: download, extract, patch, build and install the ncurses library (that is needed by gdb)
/trunk/scripts/build/debug/300-gdb.sh | 46 42 4 0 +++++++++++++++++++++++++++++++++++++---- /trunk/config/debug/gdb.in | 26 25 1 0 ++++++++++++++++++++++- 2 files changed, 67 insertions(+), 5 deletions(-)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/debug/300-gdb.sh46
1 files changed, 42 insertions, 4 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index aa26e97..c5f1f64 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -5,6 +5,7 @@ is_enabled="${CT_GDB}"
do_print_filename() {
[ "${CT_GDB}" = "y" ] || return 0
echo "gdb$(do_debug_gdb_suffix)"
+ [ "${CT_GDB_NATIVE}" = "y" ] && echo "ncurses-${CT_NCURSES_VERSION}"
}
do_debug_gdb_suffix() {
@@ -15,13 +16,19 @@ do_debug_gdb_suffix() {
}
do_debug_gdb_get() {
- CT_GetFile "gdb$(do_debug_gdb_suffix)" \
- {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
+ CT_GetFile "gdb$(do_debug_gdb_suffix)" \
+ {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
ftp://sources.redhat.com/pub/gdb/{{,old-}releases,snapshots/current}
+ if [ "${CT_GDB_NATIVE}" = "y" ]; then
+ CT_GetFile "ncurses-${CT_NCURSES_VERSION}" \
+ {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \
+ ftp://invisible-island.net/ncurses
+ fi
}
do_debug_gdb_extract() {
CT_ExtractAndPatch "gdb$(do_debug_gdb_suffix)"
+ [ "${CT_GDB_NATIVE}" = "y" ] && CT_ExtractAndPatch "ncurses-${CT_NCURSES_VERSION}"
}
do_debug_gdb_build() {
@@ -110,7 +117,38 @@ do_debug_gdb_build() {
fi
if [ "${CT_GDB_NATIVE}" = "y" ]; then
- CT_DoStep EXTRA "Installing native gdb"
+ CT_DoStep INFO "Installing native gdb"
+
+ CT_DoStep INFO "Installing ncurses library"
+ CT_DoLog EXTRA "Configuring ncurses"
+ mkdir -p "${CT_BUILD_DIR}/build-ncurses"
+ cd "${CT_BUILD_DIR}/build-ncurses"
+
+ ncurses_opts=
+ [ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts="${ncurses_opts} --without-cxx --without-cxx-binding"
+
+ "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
+ --build=${CT_BUILD} \
+ --host=${CT_TARGET} \
+ --with-build-cc=${CT_CC} \
+ --with-build-cpp=${CT_CC} \
+ --with-build-cflags="${CT_CFLAGS_FOR_HOST}" \
+ --prefix=/usr \
+ --with-shared \
+ --without-sysmouse \
+ --without-progs \
+ --enable-termcap \
+ --without-develop \
+ ${ncurses_opts} 2>&1 |CT_DoLog ALL
+
+ CT_DoLog EXTRA "Building ncurses"
+ make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
+
+ CT_DoLog EXTRA "Installing ncurses"
+ make DESTDIR="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL
+
+ CT_EndStep
+
CT_DoLog EXTRA "Configuring native gdb"
mkdir -p "${CT_BUILD_DIR}/build-gdb-native"
@@ -127,7 +165,7 @@ do_debug_gdb_build() {
--disable-gdbtk \
--without-x \
--disable-sim \
- --disable-gdbserver \
+ --disable-gdbserver \
--without-included-gettext \
${extra_config} 2>&1 |CT_DoLog ALL