From daf19e17615fdc58503ead8ebff252d7ade90fc0 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Sun, 29 Oct 2023 17:08:44 +1300 Subject: gdb: Use correct arguments for static linking As of version 13.x GDB uses libtool for linking instead of g++ these take different arguments for static linking. Commit 6146b5a6 ("use -all-static when building a static gdb") attempted to deal with this but had the effect of causing older GDB versions to fail to build statically. Add a new internal flag GDB_CC_LD_LIBTOOL and use this to decide whether to pass `-static` or `-all-static`. Fixes #2053 Signed-off-by: Chris Packham --- config/debug/gdb.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'config') 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 -- cgit v1.2.3