X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e772a8b1a3b5cb5a2d4ad571526f66a2e18485a4..9f67405758d5164b2b635e4373eebba37f5bec6c:/toolchain/gdb/Makefile diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index 4b0d6b3ce..515b1f105 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -1,59 +1,54 @@ -# $Id$ - +# +# Copyright (C) 2006-2011 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# 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 -linux-uclibc tuples. - # Should probably integrate this into the patch. - touch $(GDB_DIR)/.patched +PKG_NAME:=gdb +PKG_VERSION:=linaro-7.2-2011.03-0 -# gdb client +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=747b655418058964451eff7c7a15013c +PKG_SOURCE_URL:=http://launchpad.net/gdb-linaro/7.2/7.2-2011.03-0/+download/ -GDB_CLIENT_DIR:=$(TOOL_BUILD_DIR)/gdbclient-$(GDB_VERSION) +include $(INCLUDE_DIR)/toolchain-build.mk -$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.unpacked - mkdir -p $(GDB_CLIENT_DIR) - (cd $(GDB_CLIENT_DIR); \ +define Host/Configure + (cd $(HOST_BUILD_DIR); \ gdb_cv_func_sigsetjmp=yes \ - $(GDB_DIR)/configure \ - --prefix=$(STAGING_DIR) \ + CFLAGS="-O2" \ + $(HOST_BUILD_DIR)/configure \ + --prefix=$(TOOLCHAIN_DIR) \ --build=$(GNU_HOST_NAME) \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ + --disable-werror \ $(DISABLE_NLS) \ - --without-uiout --disable-gdbmi \ + --without-uiout \ --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) +endef + +define Host/Compile + $(MAKE) -C $(HOST_BUILD_DIR) +endef + +define Host/Install + mkdir -p $(TOOLCHAIN_DIR)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb + ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb + strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb +endef + +define Host/Clean + rm -rf \ + $(HOST_BUILD_DIR) \ + $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \ + $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb +endef + +$(eval $(call HostBuild))