From 041427aec949a933cba415de9ae7fac29f7a7682 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Tue, 26 May 2020 16:34:31 +0900 Subject: Enable static libgcc when CT_GDB_NATIVE_STATIC_LIBSTDCXX is set This commit updates the GDB build script to specify `-static-libgcc` when `CT_GDB_NATIVE_STATIC_LIBSTDCXX` is enabled. Both libgcc and libstdc++ are considered to be part of the "standard libraries," and should be specified by the same flag (the configuration symbol could potentially use a better name and/or further indirection). This also semantically aligns the `CT_GDB_NATIVE_STATIC_LIBSTDCXX` with the equivalent GCC configuration `CT_CC_GCC_STATIC_LIBSTDCXX`, which also enables static linking of both libgcc and libstdc++. Signed-off-by: Stephanos Ioannidis diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 16e58fe..b0ea29b 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -237,6 +237,7 @@ do_gdb_backend() ldflags+=" -static" fi if [ "${static_libstdcxx}" = "y" ]; then + ldflags+=" -static-libgcc" ldflags+=" -static-libstdc++" fi -- cgit v0.10.2-6-g49f6