From 50df064004cbfa92a18709be0ed5061dec7f247f Mon Sep 17 00:00:00 2001 From: Nye Liu Date: Fri, 16 Jun 2017 22:27:04 -0700 Subject: [PATCH] Add option to build gdbserver for target that does not require libstdc++.so --- config/debug/gdb.in.gdbserver | 9 +++++++++ scripts/build/debug/300-gdb.sh | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/config/debug/gdb.in.gdbserver b/config/debug/gdb.in.gdbserver index 73a04c70..db0884e7 100644 --- a/config/debug/gdb.in.gdbserver +++ b/config/debug/gdb.in.gdbserver @@ -40,6 +40,15 @@ config GDB_GDBSERVER_STATIC https://sourceware.org/bugzilla/show_bug.cgi?id=19617 https://sourceware.org/bugzilla/show_bug.cgi?id=21086 +config GDB_GDBSERVER_STATIC_LIBSTDCXX + bool + prompt "Link against static libstdc+++" + depends on !GDB_GDBSERVER_STATIC + default n + help + Say 'y' if you do not want gdbserver to require libstdc++.so on the + target. + config GDB_GDBSERVER_BUILD_IPA_LIB bool prompt "Build the IPA library" diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 52290f1b..e5276d0f 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -319,6 +319,10 @@ do_debug_gdb_build() { gdbserver_LDFLAGS=-static fi + if [ "${CT_GDB_GDBSERVER_STATIC_LIBSTDCXX}" = "y" ]; then + gdbserver_LDFLAGS+=" -static-libstdc++" + fi + gdbserver_extra_config=("${extra_config[@]}") # We may not have C++ language configured for target