Skip to content

Commit 9c072fa

Browse files
Build GDB as a C application
Due to STAR 9001066513 GDB crashes when throwing an exception. Due to a poor design GDB uses exceptions as a part of a normal execution flow to verify user input (for example it throws exception when file path is invalid or when typed symbol doesn't exist). Therefore for 2016.09 release it is required to disable build of GDB as a C++ application. This will not work for future releases, because GDB will stop supporting C builds. Signed-off-by: Anton Kolesov <[email protected]>
1 parent 62ab502 commit 9c072fa

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

build-uclibc.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,16 @@ if [ $DO_NATIVE_GDB = yes ]; then
666666

667667
build_dir_init native_gdb
668668

669+
# Due to STAR 9001066513 GDB crashes when throwing an exception. Due to a
670+
# poor design GDB uses exceptions as a part of a normal execution flow to
671+
# verify user input (for example it throws exception when file path is
672+
# invalid or when typed symbol doesn't exist). Therefore for 2016.09
673+
# release it is required to disable build of GDB as a C++ application.
674+
# This will not work for future releases, because GDB will stop supporting
675+
# C builds.
669676
config_path=$(calcConfigPath "${ARC_GNU}")/gdb
670677
configure_for_arc "$config_path" $triplet \
678+
--disable-build-with-cxx \
671679
--disable-gas --disable-ld --disable-binutils
672680
make_target building
673681

@@ -681,6 +689,7 @@ else
681689
build_dir_init gdbserver
682690
# Static options are same as when gdbserver is configured by the top-level
683691
# configure script.
692+
# See commment for native GDB about build-with-cxx.
684693
config_path=$(calcConfigPath "${ARC_GNU}")/gdb/gdb/gdbserver
685694
LDFLAGS="-static-libstdc++ -static-libgcc" \
686695
configure_for_arc "$config_path" $triplet --disable-build-with-cxx

0 commit comments

Comments
 (0)