Skip to content

Commit e7204ce

Browse files
Build GDB for windows as a C application
Similar to ARC Linux, on Windows with Mingw there is a bug, where GDB, built as a C++ application, sometimes crashes when an exception is thrown in it. It seems that behaviour is somewhat different from ARC Linux case, because on Windows it seems that it doesn't crash in some cases where it crashes on ARC Linux. As a workaround, for now built GDB as a C application to avoid using exceptions. Signed-off-by: Anton Kolesov <[email protected]>
1 parent bd68bdf commit e7204ce

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build-elf32.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,19 @@ then
374374
fi
375375

376376
# GDB
377+
378+
# Similar to ARC Linux targets, on Windows there are issues with exceptions when
379+
# GDB is compiled as a C++ applications, so as a temporary measure disable C++
380+
# when doing canadian cross.
381+
if [ $IS_CROSS_COMPILING ]; then
382+
cxx_build=--disable-build-with-cxx
383+
else
384+
cxx_build=
385+
fi
386+
377387
build_dir_init gdb
378388
configure_elf32 gdb gdb --disable-ld --disable-gas --disable-binutils \
379-
--enable-targets=arc-linux-uclibc
389+
--enable-targets=arc-linux-uclibc $cxx_build
380390
make_target building all
381391
make_target installing ${HOST_INSTALL}-gdb
382392
if [ "$DO_PDF" = "--pdf" ]

0 commit comments

Comments
 (0)