This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2 of 2] debug/gdb: use libexpat


# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
# Date 1282553220 -7200
# Node ID 55055fd1b4b4f5a8d6467b959922cf7879fcecb7
# Parent  4f6e68510f9831ae9d89cf31a23c26a121fb6133
debug/gdb: use libexpat

gdb can use libexpat to parse target memory descriptions,
among other things. See:
  http://sourceware.org/ml/crossgcc/2010-08/msg00168.html

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>

diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -6,9 +6,13 @@
 # config options for this.
 CT_DEBUG_GDB_NCURSES_VERSION="5.7"
 
+# Ditto for the expat library
+CT_DEBUG_GDB_EXPAT_VERSION="2.0.1"
+
 do_debug_gdb_parts() {
     do_gdb=
     do_ncurses=
+    do_expat=
 
     if [ "${CT_GDB_CROSS}" = y ]; then
         do_gdb=y
@@ -24,6 +28,7 @@
         if [ "${CT_MINGW32}" != "y" ]; then
             do_ncurses=y
         fi
+        do_expat=y
     fi
 }
 
@@ -41,6 +46,11 @@
                    {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \
                    ftp://invisible-island.net/ncurses
     fi
+
+    if [ "${do_expat}" = "y" ]; then
+        CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz    \
+                   http://mesh.dl.sourceforge.net/sourceforge/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
+    fi
 }
 
 do_debug_gdb_extract() {
@@ -55,6 +65,11 @@
         CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
         CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}"
     fi
+
+    if [ "${do_expat}" = "y" ]; then
+        CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}"
+        CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}"
+    fi
 }
 
 do_debug_gdb_build() {
@@ -190,6 +205,27 @@
             gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib")
         fi # do_ncurses
 
+        if [ "${do_expat}" = "y" ]; then
+            CT_DoLog EXTRA "Building static target expat"
+
+            mkdir -p "${CT_BUILD_DIR}/expat-build"
+            cd "${CT_BUILD_DIR}/expat-build"
+
+            CT_DoExecLog ALL                                                \
+            "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure"   \
+                --build=${CT_BUILD}                                         \
+                --host=${CT_TARGET}                                         \
+                --prefix="${CT_BUILD_DIR}/static-target"                    \
+                --enable-static                                             \
+                --disable-shared
+
+            CT_DoExecLog ALL make ${PARALLELMFLAGS}
+            CT_DoExecLog ALL make install
+
+            native_extra_config+=("--with-expat")
+            native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target")
+        fi # do_expat
+
         CT_DoLog EXTRA "Configuring native gdb"
 
         mkdir -p "${CT_BUILD_DIR}/build-gdb-native"



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]