summaryrefslogtreecommitdiffstats
path: root/openwrt/toolchain/gdb/Makefile
diff options
context:
space:
mode:
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-07 08:11:06 +0000
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-06-07 08:11:06 +0000
commit5a7eec1ada3871c5dee91abbb73d593fe3c38c8a (patch)
tree0fa920b4314b5a7908adf1bfa2ae199e4e418ad8 /openwrt/toolchain/gdb/Makefile
parent14d0f66cd28d2535a4c472f9df8c75acdc99f08a (diff)
add gdb-client to run on host to debug target.. (kgdb)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1166 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/toolchain/gdb/Makefile')
-rw-r--r--openwrt/toolchain/gdb/Makefile59
1 files changed, 59 insertions, 0 deletions
diff --git a/openwrt/toolchain/gdb/Makefile b/openwrt/toolchain/gdb/Makefile
new file mode 100644
index 000000000..4b0d6b3ce
--- /dev/null
+++ b/openwrt/toolchain/gdb/Makefile
@@ -0,0 +1,59 @@
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+GDB_NAME:=gdb
+GDB_SITE:=http://ftp.gnu.org/gnu/gdb
+GDB_VERSION:=6.3
+GDB_SOURCE:=$(GDB_NAME)-$(GDB_VERSION).tar.bz2
+GDB_CAT:=bzcat
+
+GDB_DIR:=$(TOOL_BUILD_DIR)/$(GDB_NAME)-$(GDB_VERSION)
+
+$(DL_DIR)/$(GDB_SOURCE):
+ $(WGET) -P $(DL_DIR) $(GDB_SITE)/$(GDB_SOURCE)
+
+$(GDB_DIR)/.patched: $(DL_DIR)/$(GDB_SOURCE)
+ $(GDB_CAT) $(DL_DIR)/$(GDB_SOURCE) | tar -C $(TOOL_BUILD_DIR) $(TAR_OPTIONS) -
+ $(PATCH) $(GDB_DIR) ./patches
+ # Copy a config.sub from gcc. This is only necessary until
+ # gdb's config.sub supports <arch>-linux-uclibc tuples.
+ # Should probably integrate this into the patch.
+ touch $(GDB_DIR)/.patched
+
+# gdb client
+
+GDB_CLIENT_DIR:=$(TOOL_BUILD_DIR)/gdbclient-$(GDB_VERSION)
+
+$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.unpacked
+ mkdir -p $(GDB_CLIENT_DIR)
+ (cd $(GDB_CLIENT_DIR); \
+ gdb_cv_func_sigsetjmp=yes \
+ $(GDB_DIR)/configure \
+ --prefix=$(STAGING_DIR) \
+ --build=$(GNU_HOST_NAME) \
+ --host=$(GNU_HOST_NAME) \
+ --target=$(REAL_GNU_TARGET_NAME) \
+ $(DISABLE_NLS) \
+ --without-uiout --disable-gdbmi \
+ --disable-tui --disable-gdbtk --without-x \
+ --without-included-gettext \
+ --enable-threads \
+ );
+ touch $(GDB_CLIENT_DIR)/.configured
+
+$(GDB_CLIENT_DIR)/gdb/gdb: $(GDB_CLIENT_DIR)/.configured
+ $(MAKE) -C $(GDB_CLIENT_DIR)
+ strip $(GDB_CLIENT_DIR)/gdb/gdb
+
+$(TARGET_CROSS)gdb: $(GDB_CLIENT_DIR)/gdb/gdb
+ install -c $(GDB_CLIENT_DIR)/gdb/gdb $(TARGET_CROSS)gdb
+ ln -fs ../../bin/$(REAL_GNU_TARGET_NAME)-gdb \
+ $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/bin/gdb
+
+source: $(DL_DIR)/$(GDB_SOURCE)
+prepare: $(GDB_DIR)/.patched
+compile:
+install: $(TARGET_CROSS)gdb
+clean:
+ rm -rf $(GDB_CLIENT_DIR)