summaryrefslogtreecommitdiff
path: root/scripts/build/debug/300-gdb.sh
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2021-09-16 15:24:14 (GMT)
committerChris Packham <judge.packham@gmail.com>2021-09-19 07:46:49 (GMT)
commit58c347c7819d8e400a79188d4cb3008c19451d3b (patch)
treeaa9ac6bbafd7d083920d0cf2e042438bb03fe610 /scripts/build/debug/300-gdb.sh
parent7daa182506baf30adb35752369cf352ac2383c3b (diff)
gdb: Realy decouple building of native/target GDB & gdbserver
Back in the day gdbserver was treated as a subproject of GDB and even was located in "gdb/gdbserver" and so to build gdbserver we had to go into "gdb/gdbserver" and there run configure. That way full GDB was out of the picture. Now starting from GDB 10.1 where gdbserver was promoted to the top-level we're supposed to run top-level's configure script for all the tools provided by the unified binutils-gdb tree. That said if we only want to build gdbserver (and that's what we want since we build one tool at a build step) we have to be explicit: ----------------->8---------------- --enable-gdbserver --disable--gdb ----------------->8---------------- Ah, and so far we used to build full native GDB when only wanted gdbserver if it was GDB v10.x ;) Ironically full native/target GDB also enabled gdbserver by default so we need to also disable it explicitly with "--disable-gdbserver". Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'scripts/build/debug/300-gdb.sh')
-rw-r--r--scripts/build/debug/300-gdb.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 2ef0c71..ad9bb88 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -116,6 +116,12 @@ do_debug_gdb_build()
native_extra_config+=("--program-prefix=")
+ # gdbserver gets enabled by default with gdb
+ # since gdbserver was promoted to top-level
+ if [ "${CT_GDB_GDBSERVER_TOPLEVEL}" = "y" ]; then
+ native_extra_config+=("--disable-gdbserver")
+ fi
+
# GDB on Mingw depends on PDcurses, not ncurses
if [ "${CT_MINGW32}" != "y" ]; then
native_extra_config+=("--with-curses")
@@ -185,6 +191,8 @@ do_debug_gdb_build()
if [ "${CT_GDB_GDBSERVER_TOPLEVEL}" != "y" ]; then
subdir=gdb/gdbserver/
+ else
+ native_extra_config+=("--disable-gdb")
fi
CT_DoStep INFO "Installing gdb server"