1.1 --- a/scripts/build/debug/300-gdb.sh Tue Mar 03 17:41:59 2009 +0000
1.2 +++ b/scripts/build/debug/300-gdb.sh Sun Apr 19 16:17:11 2009 +0000
1.3 @@ -135,20 +135,55 @@
1.4 CT_DoStep INFO "Installing native gdb"
1.5
1.6 CT_DoStep INFO "Installing ncurses library"
1.7 - CT_DoLog EXTRA "Configuring ncurses"
1.8 - mkdir -p "${CT_BUILD_DIR}/build-ncurses"
1.9 - cd "${CT_BUILD_DIR}/build-ncurses"
1.10
1.11 ncurses_opts=
1.12 [ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts="${ncurses_opts} --without-cxx --without-cxx-binding"
1.13 [ "${CT_CC_LANG_ADA}" = "y" ] || ncurses_opts="${ncurses_opts} --without-ada"
1.14
1.15 + CT_DoStep INFO "Installing native ncurses tic"
1.16 + CT_DoLog EXTRA "Configuring ncurses tic"
1.17 + mkdir -p "${CT_BUILD_DIR}/build-ncurses-build-tic"
1.18 + cd "${CT_BUILD_DIR}/build-ncurses-build-tic"
1.19 +
1.20 + # Use build = CT_REAL_BUILD so that configure thinks it is
1.21 + # cross-compiling, and thus will use the ${CT_BUILD}-*
1.22 + # tools instead of searching for the native ones...
1.23 + CT_DoExecLog ALL \
1.24 + "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
1.25 + --build=${CT_REAL_BUILD} \
1.26 + --host=${CT_BUILD} \
1.27 + --prefix=/usr \
1.28 + --without-shared \
1.29 + --enable-symlinks \
1.30 + --with-build-cc=${CT_REAL_BUILD}-gcc \
1.31 + --with-build-cpp=${CT_REAL_BUILD}-gcc \
1.32 + --with-build-cflags="${CT_CFLAGS_FOR_HOST}" \
1.33 + ${ncurses_opts}
1.34 +
1.35 + # Under some operating systems (eg. Winblows), there is an
1.36 + # extension appended to executables. Find that.
1.37 + tic_ext=$(grep -E '^x[[:space:]]*=' progs/Makefile |sed -r -e 's/^.*=[[:space:]]*//;')
1.38 +
1.39 + CT_DoLog EXTRA "Building ncurses tic"
1.40 + CT_DoExecLog ALL make ${PARALLELMFLAGS} -C include
1.41 + CT_DoExecLog ALL make ${PARALLELMFLAGS} -C progs "tic${tic_ext}"
1.42 +
1.43 + CT_DoLog EXTRA "Installing ncurses tic"
1.44 + CT_DoExecLog ALL install -d -m 0755 "${CT_PREFIX_DIR}/bin"
1.45 + CT_DoExecLog ALL install -m 0755 "progs/tic${tic_ext}" "${CT_PREFIX_DIR}/bin"
1.46 +
1.47 + CT_EndStep # tic build
1.48 +
1.49 + CT_DoLog EXTRA "Configuring ncurses"
1.50 + mkdir -p "${CT_BUILD_DIR}/build-ncurses"
1.51 + cd "${CT_BUILD_DIR}/build-ncurses"
1.52 +
1.53 CT_DoExecLog ALL \
1.54 "${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
1.55 --build=${CT_BUILD} \
1.56 --host=${CT_TARGET} \
1.57 - --with-build-cc=${CT_CC} \
1.58 - --with-build-cpp=${CT_CC} \
1.59 + --with-build-cc=${CT_BUILD}-gcc \
1.60 + --with-build-cpp=${CT_BUILD}-gcc \
1.61 --with-build-cflags="${CT_CFLAGS_FOR_HOST}" \
1.62 --prefix=/usr \
1.63 --with-shared \
1.64 @@ -164,7 +199,10 @@
1.65 mkdir -p "${CT_SYSROOT_DIR}/usr/bin"
1.66 CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
1.67
1.68 - CT_EndStep
1.69 + # We no longer need the temporary tic. Remove it
1.70 + CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/tic"
1.71 +
1.72 + CT_EndStep # ncurses build
1.73
1.74 CT_DoLog EXTRA "Configuring native gdb"
1.75
1.76 @@ -222,7 +260,7 @@
1.77
1.78 unset ac_cv_func_strncmp_works
1.79
1.80 - CT_EndStep
1.81 + CT_EndStep # native gdb build
1.82 fi
1.83
1.84 if [ "${CT_GDB_GDBSERVER}" = "y" ]; then