Patchwork [PATCHv4,3/4] gdb: install gdbserver into the SDK

mail settings
Submitter Thomas Petazzoni
Date April 7, 2013, 10:04 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/234470/
State Superseded
Headers show


Thomas Petazzoni - April 7, 2013, 10:04 a.m.
In order for a Buildroot toolchain to be usable as an external
toolchain, we should copy the target gdbserver somewhere into
$(HOST_DIR). In order to match what Crosstool-NG does (and therefore
to match something the external toolchain logic already understands),
we install gdbserver in

Signed-off-by: Thomas Petazzoni <>
This replaces
 package/gdb/ |   14 ++++++++++++++
 1 file changed, 14 insertions(+)


diff --git a/package/gdb/ b/package/gdb/
index 24ce9bf..cec64d5 100644
--- a/package/gdb/
+++ b/package/gdb/
@@ -78,6 +78,20 @@  endef
+# This installs the gdbserver somewhere into the $(HOST_DIR) so that
+# it becomes an integral part of the SDK, if the toolchain generated
+# by Buildroot is later used as an external toolchain. We install it
+# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG
+# does.
+	$(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \
+		$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver
 # A few notes:
 #  * --target, because we're doing a cross build rather than a real
 #    host build.