Makefile 1.4 KB

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