summaryrefslogtreecommitdiffstats
path: root/toolchain/toolchain-external
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2012-03-14 23:49:57 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-03-15 23:04:39 +0100
commitc56b58b4b71a5fd87d6d3d61e08a627c968acda1 (patch)
treeef52a2f0f6c3162c1538d9c74c1f8e271913ff78 /toolchain/toolchain-external
parentc85f7f4082e480485e8a0f1549615b5b680d96ff (diff)
downloadbuildroot-novena-c56b58b4b71a5fd87d6d3d61e08a627c968acda1.tar.gz
buildroot-novena-c56b58b4b71a5fd87d6d3d61e08a627c968acda1.zip
debug: provide an option to copy the gdbserver to the target
When an external toolchain is used, it is very likely that it contains a pre-built version of a gdbserver that has the same version as the cross-gdb included in the external toolchain. So, we now provide an option that allows to copy this pre-built gdbserver to the target. As the location of the gdbserver in the external toolchain is not standardized, we only support the CodeSourcery and Crosstool-NG layouts for the moment. Other locations can be added later. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/toolchain-external')
-rw-r--r--toolchain/toolchain-external/ext-tool.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index dbd39b068..31ba50f97 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -375,6 +375,20 @@ $(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
$(call create_lib64_symlinks) ; \
fi ; \
+ if test x"$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY)" == x"y"; then \
+ gdbserver_found=0 ; \
+ for d in $${ARCH_SYSROOT_DIR} $${ARCH_SYSROOT_DIR}/../debug-root/ ; do \
+ if test -f $${d}/usr/bin/gdbserver ; then \
+ install -m 0755 -D $${d}/usr/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
+ gdbserver_found=1 ; \
+ break ; \
+ fi ; \
+ done ; \
+ if [ $${gdbserver_found} -eq 0 ] ; then \
+ echo "Could not find gdbserver in external toolchain" ; \
+ exit 1 ; \
+ fi ; \
+ fi ; \
touch $@
# Build toolchain wrapper for preprocessor, C and C++ compiler, and setup