38ffb0b77f0a2102fd6d7f2ef0b520b903b590df
[openwrt/staging/chunkeey.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2015 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-2015.06-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-2015.06-gdb/
16 PKG_MD5SUM:=d318829bfd2ed62714817f0d25706825
17 GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
18 else
19 PKG_VERSION:=7.10
20
21 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
22 PKG_SOURCE_URL:=@GNU/gdb
23 PKG_MD5SUM:=2a35bac41fa8e10bf04f3a0dd7f7f363
24 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
25 endif
26
27 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
28
29 HOST_BUILD_PARALLEL:=1
30
31 include $(INCLUDE_DIR)/toolchain-build.mk
32
33 HOST_CONFIGURE_VARS += \
34 gdb_cv_func_sigsetjmp=yes
35
36 HOST_CONFIGURE_ARGS = \
37 --prefix=$(TOOLCHAIN_DIR) \
38 --build=$(GNU_HOST_NAME) \
39 --host=$(GNU_HOST_NAME) \
40 --target=$(REAL_GNU_TARGET_NAME) \
41 --disable-werror \
42 --without-uiout \
43 --disable-tui --disable-gdbtk --without-x \
44 --without-included-gettext \
45 --enable-threads \
46 --with-expat \
47 --without-python \
48 --disable-binutils \
49 --disable-ld \
50 --disable-gas \
51 --disable-sim
52
53 define Host/Install
54 mkdir -p $(TOOLCHAIN_DIR)/bin
55 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
56 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
57 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
58 endef
59
60 define Host/Clean
61 rm -rf \
62 $(HOST_BUILD_DIR) \
63 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
64 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
65 endef
66
67 $(eval $(call HostBuild))