aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/debug/gdb.in5
-rw-r--r--scripts/build/debug/300-gdb.sh6
2 files changed, 10 insertions, 1 deletions
diff --git a/config/debug/gdb.in b/config/debug/gdb.in
index 68599d55..d39ac6cd 100644
--- a/config/debug/gdb.in
+++ b/config/debug/gdb.in
@@ -18,3 +18,8 @@ config GDB_DEP_NO_STD_FUTURE
config GDB_GDBSERVER_TOPLEVEL
def_bool y
depends on GDB_10_or_later
+
+# As of GDB 13.x libtool is used for linking
+config GDB_CC_LD_LIBTOOL
+ def_bool y
+ depends on GDB_13_or_later
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 8860b541..de8d1b14 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -348,7 +348,11 @@ do_gdb_backend()
"${extra_config[@]}" \
if [ "${static}" = "y" ]; then
- extra_make_flags+=("LDFLAGS=${ldflags} -all-static")
+ if [ "${GDB_CC_LD_LIBTOOL}" = "y" ]; then
+ extra_make_flags+=("LDFLAGS=${ldflags} -all-static")
+ else
+ extra_make_flags+=("LDFLAGS=${ldflags} -static")
+ fi
CT_DoLog EXTRA "Prepare gdb for static build"
CT_DoExecLog ALL make ${CT_JOBSFLAGS} configure-host
fi