toolchain/gdb: update to version 8.0.1
[openwrt/staging/chunkeey.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=gdb
10
11 ifeq ($(CONFIG_arc),y)
12 PKG_VERSION:=arc-2017.03-gdb
13
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-2017.03-gdb
16 PKG_HASH:=f47930161e9e99c46ab018dabbf56024739dda29c51f92495eaa0d4d7e3511f6
17 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
18 PATCH_DIR:=./patches-arc
19 else
20 PKG_VERSION:=8.0.1
21
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
23 PKG_SOURCE_URL:=@GNU/gdb
24 PKG_HASH:=3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3
25 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
26 endif
27
28 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
29
30 HOST_BUILD_PARALLEL:=1
31
32 include $(INCLUDE_DIR)/toolchain-build.mk
33
34 HOST_CONFIGURE_VARS += \
35 gdb_cv_func_sigsetjmp=yes
36
37 HOST_CONFIGURE_ARGS = \
38 --prefix=$(TOOLCHAIN_DIR) \
39 --build=$(GNU_HOST_NAME) \
40 --host=$(GNU_HOST_NAME) \
41 --target=$(REAL_GNU_TARGET_NAME) \
42 --disable-werror \
43 --without-uiout \
44 --disable-tui --disable-gdbtk --without-x \
45 --without-included-gettext \
46 --enable-threads \
47 --with-expat \
48 --without-python \
49 --disable-binutils \
50 --disable-ld \
51 --disable-gas \
52 --disable-sim
53
54 define Host/Install
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
59 endef
60
61 define Host/Clean
62 rm -rf \
63 $(HOST_BUILD_DIR) \
64 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
65 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
66 endef
67
68 $(eval $(call HostBuild))