1
0

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-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_HASH:=6a91f86cc487c1548d3f5d4f29f7226d2019c0db8a63633aeabd5914a340f3f9
  14. GDB_DIR:=binutils-$(PKG_NAME)-$(PKG_VERSION)
  15. PATCH_DIR:=./patches-arc
  16. else
  17. PKG_VERSION:=7.12.1
  18. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  19. PKG_SOURCE_URL:=@GNU/gdb
  20. PKG_HASH:=4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186
  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. --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))