procd: make mDNS TXT record parsing more solid
[openwrt/openwrt.git] / package / devel / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gdb
11 PKG_VERSION:=11.2
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@GNU/gdb
16 PKG_HASH:=1497c36a71881b8671a9a84a0ee40faab788ca30d7ba19d8463c3cc787152e32
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_INSTALL:=1
20 PKG_LICENSE:=GPL-3.0+
21 PKG_CPE_ID:=cpe:/a:gnu:gdb
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/nls.mk
25
26 define Package/gdb/Default
27 SECTION:=devel
28 CATEGORY:=Development
29 DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS)
30 URL:=https://www.gnu.org/software/gdb/
31 endef
32
33 define Package/gdb
34 $(call Package/gdb/Default)
35 TITLE:=GNU Debugger
36 DEPENDS+=+libreadline +libncurses +zlib +libgmp
37 endef
38
39 define Package/gdb/description
40 GDB, the GNU Project debugger, allows you to see what is going on `inside'
41 another program while it executes -- or what another program was doing at the
42 moment it crashed.
43 endef
44
45 define Package/gdbserver
46 $(call Package/gdb/Default)
47 TITLE:=Remote server for GNU Debugger
48 endef
49
50 define Package/gdbserver/description
51 GDBSERVER is a program that allows you to run GDB on a different machine than the
52 one which is running the program being debugged.
53 endef
54
55 # XXX: add --disable-werror to prevent build failure with arm
56 CONFIGURE_ARGS+= \
57 --with-system-readline \
58 --with-system-zlib \
59 --without-expat \
60 --without-lzma \
61 --disable-unit-tests \
62 --disable-ubsan \
63 --disable-sim \
64 --disable-werror \
65 --disable-source-highlight \
66 --without-mpc \
67 --without-mpfr \
68 --without-isl \
69 --without-xxhash \
70 --with-libgmp-prefix=$(STAGING_DIR)/usr
71
72 CONFIGURE_VARS+= \
73 ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
74
75 TARGET_LDFLAGS+= \
76 $(INTL_LDFLAGS) $(if $(INTL_FULL),-lintl) \
77 -static-libstdc++ \
78 -Wl,--gc-sections
79
80 define Build/Install
81 $(MAKE) -C $(PKG_BUILD_DIR) \
82 DESTDIR="$(PKG_INSTALL_DIR)" \
83 CPPFLAGS="$(TARGET_CPPFLAGS)" \
84 install-gdb install-gdbserver
85 endef
86
87 define Package/gdb/install
88 $(INSTALL_DIR) $(1)/usr/bin
89 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
90 endef
91
92 define Package/gdbserver/install
93 $(INSTALL_DIR) $(1)/usr/bin
94 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
95 endef
96
97 $(eval $(call BuildPackage,gdb))
98 $(eval $(call BuildPackage,gdbserver))