From fab9efd8fad5c9a1b6a85816817f406c91702c56 Mon Sep 17 00:00:00 2001 From: "Kirill K. Smirnov" Date: Sun, 13 Aug 2023 14:14:26 +0300 Subject: [PATCH] gdb: fix build with recent ncurses For mingw host a special macro NCURSES_STATIC must be defined. Signed-off-by: Kirill K. Smirnov --- scripts/build/debug/300-gdb.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 174fcc10..e23298c7 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -69,10 +69,17 @@ do_debug_gdb_build() extra_config+=("--with-expat") extra_config+=("--without-libexpat-prefix") + # ct-ng always builds ncurses in cross mode as a static library. + # Starting from the patchset 20200718 ncurses defines a special macro + # NCURSES_STATIC for a static library. This is critical for mingw host + # platform. + # + # The problem is that the macro must be defined in a user program too, + # not just in ncurses. It won't hurt if we define it here. do_gdb_backend \ buildtype=cross \ host="${CT_HOST}" \ - cflags="${CT_CFLAGS_FOR_HOST}" \ + cflags="${CT_CFLAGS_FOR_HOST} -DNCURSES_STATIC" \ ldflags="${CT_LDFLAGS_FOR_HOST}" \ prefix="${CT_PREFIX_DIR}" \ static="${CT_GDB_CROSS_STATIC}" \