gdb/gdbserver: use -static --static for static build
Some checks failed
CI / crosstool (macos-13) (push) Has been cancelled
CI / crosstool (ubuntu-22.04) (push) Has been cancelled
CI / tarballs (ubuntu-22.04) (push) Has been cancelled
CI / toolchains (push) Has been cancelled

With gdb15.2 gdb uses libtool for linking, but gdbserver is not.
Should not break #2230 or #2053

Signed-off-by: Michał Zagórski <zagura6+github@gmail.com>
This commit is contained in:
Michał Zagórski 2024-11-21 00:55:31 +01:00 committed by Chris Packham
parent 9c444f4ca6
commit 71cfd2d094

View File

@ -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