c25d18199044500d5a20d8bda84e5798b59e6518
[openwrt/openwrt.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 PKG_VERSION:=8.3.1
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=@GNU/gdb
14 PKG_HASH:=1e55b4d7cdca7b34be12f4ceae651623aa73b2fd640152313f9f66a7149757c4
15 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
16
17 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
18
19 HOST_BUILD_PARALLEL:=1
20
21 include $(INCLUDE_DIR)/toolchain-build.mk
22
23 HOST_CONFIGURE_VARS += \
24 gdb_cv_func_sigsetjmp=yes
25
26 HOST_CONFIGURE_ARGS = \
27 --prefix=$(TOOLCHAIN_DIR) \
28 --build=$(GNU_HOST_NAME) \
29 --host=$(GNU_HOST_NAME) \
30 --target=$(REAL_GNU_TARGET_NAME) \
31 --disable-werror \
32 --without-uiout \
33 --enable-tui --disable-gdbtk --without-x \
34 --without-included-gettext \
35 --enable-threads \
36 --with-expat \
37 --without-python \
38 --disable-binutils \
39 --disable-ld \
40 --disable-gas \
41 --disable-sim
42
43 define Host/Install
44 mkdir -p $(TOOLCHAIN_DIR)/bin
45 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
46 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
47 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
48 endef
49
50 define Host/Clean
51 rm -rf \
52 $(HOST_BUILD_DIR) \
53 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
54 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
55 endef
56
57 $(eval $(call HostBuild))