1
0

Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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:=12.1
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed
  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. include $(INCLUDE_DIR)/nls.mk
  20. define Package/gdb/Default
  21. SECTION:=devel
  22. CATEGORY:=Development
  23. DEPENDS:=+!USE_MUSL:libthread-db $(ICONV_DEPENDS) $(INTL_DEPENDS)
  24. URL:=https://www.gnu.org/software/gdb/
  25. endef
  26. define Package/gdb
  27. $(call Package/gdb/Default)
  28. TITLE:=GNU Debugger
  29. DEPENDS+=+libreadline +libncurses +zlib +libgmp
  30. endef
  31. define Package/gdb/description
  32. GDB, the GNU Project debugger, allows you to see what is going on `inside'
  33. another program while it executes -- or what another program was doing at the
  34. moment it crashed.
  35. endef
  36. define Package/gdbserver
  37. $(call Package/gdb/Default)
  38. TITLE:=Remote server for GNU Debugger
  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. --without-mpc \
  56. --without-mpfr \
  57. --without-isl \
  58. --without-xxhash \
  59. --with-libgmp-prefix=$(STAGING_DIR)/usr
  60. CONFIGURE_VARS+= \
  61. ac_cv_search_tgetent="$(TARGET_LDFLAGS) -lncurses -lreadline"
  62. TARGET_LDFLAGS+= \
  63. $(INTL_LDFLAGS) $(if $(INTL_FULL),-lintl) \
  64. -static-libstdc++ \
  65. -Wl,--gc-sections
  66. define Build/Install
  67. $(MAKE) -C $(PKG_BUILD_DIR) \
  68. DESTDIR="$(PKG_INSTALL_DIR)" \
  69. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  70. install-gdb install-gdbserver
  71. endef
  72. define Package/gdb/install
  73. $(INSTALL_DIR) $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/
  75. endef
  76. define Package/gdbserver/install
  77. $(INSTALL_DIR) $(1)/usr/bin
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdbserver $(1)/usr/bin/
  79. endef
  80. $(eval $(call BuildPackage,gdb))
  81. $(eval $(call BuildPackage,gdbserver))