Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. ifeq ($(CONFIG_arc),y)
  10. PKG_VERSION:=arc-2016.03-gdb
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://github.com/foss-for-synopsys-dwc-arc-processors/binutils-gdb/archive/arc-2016.03-gdb
  13. PKG_MD5SUM:=775caaf6385c16f20b6f53c0a2b95f79
  14. GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
  15. else
  16. PKG_VERSION:=7.11
  17. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  18. PKG_SOURCE_URL:=@GNU/gdb
  19. PKG_MD5SUM:=b5c784685e1cde65ba135feea86b6d75
  20. GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
  21. endif
  22. PATCH_DIR:=./patches/$(PKG_VERSION)
  23. HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
  24. HOST_BUILD_PARALLEL:=1
  25. include $(INCLUDE_DIR)/toolchain-build.mk
  26. HOST_CONFIGURE_VARS += \
  27. gdb_cv_func_sigsetjmp=yes
  28. HOST_CONFIGURE_ARGS = \
  29. --prefix=$(TOOLCHAIN_DIR) \
  30. --build=$(GNU_HOST_NAME) \
  31. --host=$(GNU_HOST_NAME) \
  32. --target=$(REAL_GNU_TARGET_NAME) \
  33. --disable-werror \
  34. --without-uiout \
  35. --disable-tui --disable-gdbtk --without-x \
  36. --without-included-gettext \
  37. --enable-threads \
  38. --with-expat \
  39. --without-python \
  40. --disable-binutils \
  41. --disable-ld \
  42. --disable-gas \
  43. --disable-sim
  44. define Host/Install
  45. mkdir -p $(TOOLCHAIN_DIR)/bin
  46. $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  47. ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  48. strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  49. endef
  50. define Host/Clean
  51. rm -rf \
  52. $(HOST_BUILD_DIR) \
  53. $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
  54. $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  55. endef
  56. $(eval $(call HostBuild))