scripts/build/debug/300-gdb.sh
changeset 2101 f27cfe7ed56d
parent 2100 f9fcfc002c8a
child 2154 250cdcc86441
     1.1 --- a/scripts/build/debug/300-gdb.sh	Mon Aug 23 14:32:16 2010 +0200
     1.2 +++ b/scripts/build/debug/300-gdb.sh	Mon Aug 23 10:47:00 2010 +0200
     1.3 @@ -6,9 +6,13 @@
     1.4  # config options for this.
     1.5  CT_DEBUG_GDB_NCURSES_VERSION="5.7"
     1.6  
     1.7 +# Ditto for the expat library
     1.8 +CT_DEBUG_GDB_EXPAT_VERSION="2.0.1"
     1.9 +
    1.10  do_debug_gdb_parts() {
    1.11      do_gdb=
    1.12      do_ncurses=
    1.13 +    do_expat=
    1.14  
    1.15      if [ "${CT_GDB_CROSS}" = y ]; then
    1.16          do_gdb=y
    1.17 @@ -24,6 +28,7 @@
    1.18          if [ "${CT_MINGW32}" != "y" ]; then
    1.19              do_ncurses=y
    1.20          fi
    1.21 +        do_expat=y
    1.22      fi
    1.23  }
    1.24  
    1.25 @@ -41,6 +46,11 @@
    1.26                     {ftp,http}://ftp.gnu.org/pub/gnu/ncurses \
    1.27                     ftp://invisible-island.net/ncurses
    1.28      fi
    1.29 +
    1.30 +    if [ "${do_expat}" = "y" ]; then
    1.31 +        CT_GetFile "expat-${CT_DEBUG_GDB_EXPAT_VERSION}" .tar.gz    \
    1.32 +                   http://mesh.dl.sourceforge.net/sourceforge/expat/expat/${CT_DEBUG_GDB_EXPAT_VERSION}
    1.33 +    fi
    1.34  }
    1.35  
    1.36  do_debug_gdb_extract() {
    1.37 @@ -55,6 +65,11 @@
    1.38          CT_Extract "ncurses-${CT_DEBUG_GDB_NCURSES_VERSION}"
    1.39          CT_Patch "ncurses" "${CT_DEBUG_GDB_NCURSES_VERSION}"
    1.40      fi
    1.41 +
    1.42 +    if [ "${do_expat}" = "y" ]; then
    1.43 +        CT_Extract "expat-${CT_DEBUG_GDB_EXPAT_VERSION}"
    1.44 +        CT_Patch "expat" "${CT_DEBUG_GDB_EXPAT_VERSION}"
    1.45 +    fi
    1.46  }
    1.47  
    1.48  do_debug_gdb_build() {
    1.49 @@ -190,6 +205,27 @@
    1.50              gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib")
    1.51          fi # do_ncurses
    1.52  
    1.53 +        if [ "${do_expat}" = "y" ]; then
    1.54 +            CT_DoLog EXTRA "Building static target expat"
    1.55 +
    1.56 +            mkdir -p "${CT_BUILD_DIR}/expat-build"
    1.57 +            cd "${CT_BUILD_DIR}/expat-build"
    1.58 +
    1.59 +            CT_DoExecLog ALL                                                \
    1.60 +            "${CT_SRC_DIR}/expat-${CT_DEBUG_GDB_EXPAT_VERSION}/configure"   \
    1.61 +                --build=${CT_BUILD}                                         \
    1.62 +                --host=${CT_TARGET}                                         \
    1.63 +                --prefix="${CT_BUILD_DIR}/static-target"                    \
    1.64 +                --enable-static                                             \
    1.65 +                --disable-shared
    1.66 +
    1.67 +            CT_DoExecLog ALL make ${PARALLELMFLAGS}
    1.68 +            CT_DoExecLog ALL make install
    1.69 +
    1.70 +            native_extra_config+=("--with-expat")
    1.71 +            native_extra_config+=("--with-libexpat-prefix=${CT_BUILD_DIR}/static-target")
    1.72 +        fi # do_expat
    1.73 +
    1.74          CT_DoLog EXTRA "Configuring native gdb"
    1.75  
    1.76          mkdir -p "${CT_BUILD_DIR}/build-gdb-native"