2
0

Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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:=12.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/gdb
  13. PKG_HASH:=0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed
  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. acx_cv_cc_gcc_supports_ada=false \
  20. gdb_cv_func_sigsetjmp=yes
  21. HOST_CONFIGURE_ARGS = \
  22. --prefix=$(TOOLCHAIN_DIR) \
  23. --build=$(GNU_HOST_NAME) \
  24. --host=$(GNU_HOST_NAME) \
  25. --target=$(REAL_GNU_TARGET_NAME) \
  26. --with-gmp=$(STAGING_DIR_HOST) \
  27. --with-mpfr=$(STAGING_DIR_HOST) \
  28. --with-mpc=$(STAGING_DIR_HOST) \
  29. --with-expat=$(STAGING_DIR_HOST) \
  30. --disable-werror \
  31. --without-uiout \
  32. --enable-tui --disable-gdbtk --without-x \
  33. --without-included-gettext \
  34. --enable-threads \
  35. --disable-unit-tests \
  36. --disable-ubsan \
  37. --disable-binutils \
  38. --disable-ld \
  39. --disable-gas \
  40. --disable-sim
  41. ifneq ($(CONFIG_GDB_PYTHON),)
  42. HOST_CONFIGURE_ARGS+= --with-python
  43. else
  44. HOST_CONFIGURE_ARGS+= --without-python
  45. endif
  46. define Host/Install
  47. mkdir -p $(TOOLCHAIN_DIR)/bin
  48. $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  49. ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  50. strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  51. mkdir -p $(TOOLCHAIN_DIR)/share/gdb
  52. -cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python $(TOOLCHAIN_DIR)/share/gdb/
  53. cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls $(TOOLCHAIN_DIR)/share/gdb/
  54. cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit $(TOOLCHAIN_DIR)/share/gdb/
  55. endef
  56. define Host/Clean
  57. rm -rf \
  58. $(HOST_BUILD_DIR) \
  59. $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
  60. $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  61. endef
  62. $(eval $(call HostBuild))