2 # Copyright (C) 2006-2016 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR)/rules.mk
11 ifeq ($(CONFIG_arc),y)
12 PKG_VERSION:=arc-2016.09-gdb
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2016.09-gdb
16 PKG_HASH:=b7601f8953055c6768304da7f7ee48abc0fc0ad2bec8f93bbefb29780467f21d
17 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
18 PATCH_DIR:=./patches-arc
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
23 PKG_SOURCE_URL:=@GNU/gdb
24 PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186
25 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
28 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
30 HOST_BUILD_PARALLEL:=1
32 include $(INCLUDE_DIR)/toolchain-build.mk
34 HOST_CONFIGURE_VARS += \
35 gdb_cv_func_sigsetjmp=yes
37 HOST_CONFIGURE_ARGS = \
38 --prefix=$(TOOLCHAIN_DIR) \
39 --build=$(GNU_HOST_NAME) \
40 --host=$(GNU_HOST_NAME) \
41 --target=$(REAL_GNU_TARGET_NAME) \
44 --disable-tui --disable-gdbtk --without-x \
45 --without-included-gettext \
55 mkdir -p $(TOOLCHAIN_DIR)/bin
56 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
57 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
58 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
64 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
65 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
68 $(eval $(call HostBuild))