X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=toolchain%2Fgdb%2FMakefile;h=19f49311591f99232478d0a7c48e1234863385e4;hb=372438e31eb9c31fcd0ac3d8c8f9b37d261aa3c2;hp=f122881a741c6f416ba428aeddd5fe67083e5da3;hpb=06265758beb1721526360aa01176dd70d8a9e1d4;p=openwrt.git diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile index f122881a74..19f4931159 100644 --- a/toolchain/gdb/Makefile +++ b/toolchain/gdb/Makefile @@ -1,59 +1,69 @@ -# $Id$ - +# +# Copyright (C) 2006-2016 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 - -# gdb client - -GDB_CLIENT_DIR:=$(TOOL_BUILD_DIR)/gdbclient-$(GDB_VERSION) - -$(GDB_CLIENT_DIR)/.configured: $(GDB_DIR)/.patched - 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 - cd $(STAGING_DIR)/bin && \ - ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb - -source: $(DL_DIR)/$(GDB_SOURCE) -prepare: $(GDB_DIR)/.patched -compile: -install: $(TARGET_CROSS)gdb -clean: FORCE - rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR) +PKG_NAME:=gdb + +ifeq ($(CONFIG_arc),y) +PKG_VERSION:=arc-2015.06-gdb + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2015.06-gdb/ +PKG_MD5SUM:=d318829bfd2ed62714817f0d25706825 +GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION) +else +PKG_VERSION:=7.10.1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=@GNU/gdb +PKG_MD5SUM:=39e654460c9cdd80200a29ac020cfe11 +GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION) +endif + +PATCH_DIR:=./patches/$(PKG_VERSION) + +HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR) + +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/toolchain-build.mk + +HOST_CONFIGURE_VARS += \ + gdb_cv_func_sigsetjmp=yes + +HOST_CONFIGURE_ARGS = \ + --prefix=$(TOOLCHAIN_DIR) \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --target=$(REAL_GNU_TARGET_NAME) \ + --disable-werror \ + --without-uiout \ + --disable-tui --disable-gdbtk --without-x \ + --without-included-gettext \ + --enable-threads \ + --with-expat \ + --without-python \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ + --disable-sim + +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))