mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-30 09:38:52 +00:00
debug/gdb: Fix compilation for Mingw hosts
GDB requires PDcurses instead of ncurses while running on Windows. So, do not always compile ncurses in case GDB needs to build. PDcurses is provided by an earlier build step and is not described in this file. Signed-off-by: Remy Bohmer <linux@bohmer.net> [yann.morin.1998@anciense.nib.fr: we already have a way to detect ncurses usage] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
8eb3b676c2
commit
eec696451e
@ -20,8 +20,11 @@ do_debug_gdb_parts() {
|
||||
|
||||
if [ "${CT_GDB_NATIVE}" = "y" ]; then
|
||||
do_gdb=y
|
||||
# GDB on Mingw depends on PDcurses, not ncurses
|
||||
if [ "${CT_MINGW32}" != "y" ]; then
|
||||
do_ncurses=y
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
do_debug_gdb_get() {
|
||||
@ -57,6 +60,8 @@ do_debug_gdb_extract() {
|
||||
do_debug_gdb_build() {
|
||||
local -a extra_config
|
||||
|
||||
do_debug_gdb_parts
|
||||
|
||||
gdb_src_dir="${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}"
|
||||
|
||||
# Version 6.3 and below behave badly with gdbmi
|
||||
@ -124,6 +129,8 @@ do_debug_gdb_build() {
|
||||
|
||||
CT_DoStep INFO "Installing native gdb"
|
||||
|
||||
# GDB on Mingw depends on PDcurses, not ncurses
|
||||
if [ "${do_ncurses}" = "y" ]; then
|
||||
CT_DoLog EXTRA "Building static target ncurses"
|
||||
|
||||
[ "${CT_CC_LANG_CXX}" = "y" ] || ncurses_opts+=("--without-cxx" "--without-cxx-binding")
|
||||
@ -180,6 +187,7 @@ do_debug_gdb_build() {
|
||||
|
||||
# We no longer need the temporary tic. Remove it
|
||||
CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/tic"
|
||||
fi # do_ncurses
|
||||
|
||||
CT_DoLog EXTRA "Configuring native gdb"
|
||||
|
||||
@ -241,11 +249,14 @@ do_debug_gdb_build() {
|
||||
|
||||
unset ac_cv_func_strncmp_works
|
||||
|
||||
# GDB on Mingw depends on PDcurses, not ncurses
|
||||
if [ "${CT_MINGW32}" != "y" ]; then
|
||||
CT_DoLog EXTRA "Cleaning up ncurses"
|
||||
cd "${CT_BUILD_DIR}/build-ncurses"
|
||||
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" uninstall
|
||||
|
||||
CT_DoExecLog DEBUG rm -rf "${CT_BUILD_DIR}/ncurses"
|
||||
fi
|
||||
|
||||
CT_EndStep # native gdb build
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user