ipq40xx: Enable the Engenius EAP1300
[openwrt/openwrt.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2020 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:=12.1
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
14 PKG_SOURCE_URL:=@GNU/gdb
15 PKG_HASH:=0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed
16 PKG_CPE_ID:=cpe:/a:gnu:gdb
17 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
18
19 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
20
21 HOST_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/toolchain-build.mk
24
25 HOST_CONFIGURE_VARS += \
26 acx_cv_cc_gcc_supports_ada=false \
27 gdb_cv_func_sigsetjmp=yes
28
29 HOST_CONFIGURE_ARGS = \
30 --prefix=$(TOOLCHAIN_DIR) \
31 --build=$(GNU_HOST_NAME) \
32 --host=$(GNU_HOST_NAME) \
33 --target=$(REAL_GNU_TARGET_NAME) \
34 --with-gmp=$(STAGING_DIR_HOST) \
35 --with-mpfr=$(STAGING_DIR_HOST) \
36 --with-mpc=$(STAGING_DIR_HOST) \
37 --with-expat=$(STAGING_DIR_HOST) \
38 --disable-werror \
39 --without-uiout \
40 --enable-tui --disable-gdbtk --without-x \
41 --without-included-gettext \
42 --enable-threads \
43 --disable-unit-tests \
44 --disable-ubsan \
45 --disable-binutils \
46 --disable-ld \
47 --disable-gas \
48 --disable-sim
49
50 ifneq ($(CONFIG_GDB_PYTHON),)
51 HOST_CONFIGURE_ARGS+= --with-python
52 else
53 HOST_CONFIGURE_ARGS+= --without-python
54 endif
55
56 define Host/Install
57 mkdir -p $(TOOLCHAIN_DIR)/bin
58 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
59 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
60 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
61 mkdir -p $(TOOLCHAIN_DIR)/share/gdb
62 -cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python $(TOOLCHAIN_DIR)/share/gdb/
63 cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls $(TOOLCHAIN_DIR)/share/gdb/
64 cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit $(TOOLCHAIN_DIR)/share/gdb/
65 endef
66
67 define Host/Clean
68 rm -rf \
69 $(HOST_BUILD_DIR) \
70 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
71 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
72 endef
73
74 $(eval $(call HostBuild))