Makefile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. PKG_NAME:=gdb
  9. PKG_VERSION:=10.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=f82f1eceeec14a3afa2de8d9b0d3c91d5a3820e23e0a01bbb70ef9f0276b62c0
  14. PKG_BUILD_PARALLEL:=1
  15. PKG_INSTALL:=1
  16. PKG_LICENSE:=GPL-3.0+
  17. PKG_CPE_ID:=cpe:/a:gnu:gdb
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/gdb/Default
  20. SECTION:=devel
  21. CATEGORY:=Development
  22. DEPENDS:=+!USE_MUSL:libthread-db +zlib
  23. URL:=https://www.gnu.org/software/gdb/
  24. endef
  25. define Package/gdb
  26. $(call Package/gdb/Default)
  27. TITLE:=GNU Debugger
  28. DEPENDS+=+libreadline +libncurses +zlib
  29. endef
  30. define Package/gdb/description
  31. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  32. another program while it executes -- or what another program was doing at the
  33. moment it crashed.
  34. endef
  35. define Package/gdbserver
  36. $(call Package/gdb/Default)
  37. TITLE:=Remote server for GNU Debugger
  38. DEPENDS=@!arc
  39. endef
  40. define Package/gdbserver/description
  41. GDBSERVER is a program that allows you to run GDB on a different machine than the
  42. one which is running the program being debugged.
  43. endef
  44. # XXX: add --disable-werror to prevent build failure with arm
  45. CONFIGURE_ARGS+= \
  46. --with-system-readline \
  47. --with-system-zlib \
  48. --without-expat \
  49. --without-lzma \
  50. --disable-unit-tests \
  51. --disable-ubsan \
  52. --disable-sim \
  53. --disable-werror \
  54. --disable-source-highlight
  55. CONFIGURE_VARS+= \
  56. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  57. TARGET_LDFLAGS+= \
  58. -static-libstdc++ \
  59. -Wl,--gc-sections
  60. define Build/Install
  61. $(MAKE) -C $(PKG_BUILD_DIR) \
  62. DESTDIR="$(PKG_INSTALL_DIR)" \
  63. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  64. install-gdb install-gdbserver
  65. endef
  66. define Package/gdb/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  69. endef
  70. define Package/gdbserver/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  73. endef
  74. $(eval $(call BuildPackage,gdb))
  75. $(eval $(call BuildPackage,gdbserver))