Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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-2017.09-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-2017.09-gdb
  13. PKG_HASH:=7e3c2a763bf500a40c5c4591a7e22c591dafc1f214b1d514895c1096e85c883a
  14. GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
  15. PATCH_DIR:=./patches-arc
  16. else
  17. PKG_VERSION:=8.2.1
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  19. PKG_SOURCE_URL:=@GNU/gdb
  20. PKG_HASH:=0a6a432907a03c5c8eaad3c3cffd50c00a40c3a5e3c4039440624bae703f2202
  21. GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
  22. endif
  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. --enable-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))