summaryrefslogtreecommitdiff
path: root/scripts/build/debug/300-gdb.sh
diff options
context:
space:
mode:
authorStephanos Ioannidis <root@stephanos.io>2020-05-26 07:34:31 (GMT)
committerStephanos Ioannidis <root@stephanos.io>2020-05-26 07:34:31 (GMT)
commit041427aec949a933cba415de9ae7fac29f7a7682 (patch)
tree84432973d424c72db49f29b8073c168cd833d515 /scripts/build/debug/300-gdb.sh
parentb07da3bb695366e3fbac27e7710f061d7362e0cd (diff)
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 <root@stephanos.io>
Diffstat (limited to 'scripts/build/debug/300-gdb.sh')
-rw-r--r--scripts/build/debug/300-gdb.sh1
1 files changed, 1 insertions, 0 deletions
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