From 71cfd2d094dfc44b8e0d233cabeb75d536f46d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zag=C3=B3rski?= Date: Thu, 21 Nov 2024 00:55:31 +0100 Subject: [PATCH] gdb/gdbserver: use -static --static for static build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With gdb15.2 gdb uses libtool for linking, but gdbserver is not. Should not break #2230 or #2053 Signed-off-by: Michał Zagórski --- scripts/build/debug/300-gdb.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 67c7069e..508ba25f 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -354,7 +354,9 @@ do_gdb_backend() if [ "${static}" = "y" ]; then if [ "${CT_GDB_CC_LD_LIBTOOL}" = "y" ]; then - extra_make_flags+=("LDFLAGS=${ldflags} -all-static") + # gdb is linked with libtool, but gdbserver is not + # Both linker accept -static --static and create static binaries + extra_make_flags+=("LDFLAGS=${ldflags} -static --static") else extra_make_flags+=("LDFLAGS=${ldflags} -static") fi