Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. PKG_CPE_ID:=cpe:/a:gnu:gdb
  15. GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
  17. HOST_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/toolchain-build.mk
  19. HOST_CONFIGURE_VARS += \
  20. acx_cv_cc_gcc_supports_ada=false \
  21. gdb_cv_func_sigsetjmp=yes
  22. HOST_CONFIGURE_ARGS = \
  23. --prefix=$(TOOLCHAIN_DIR) \
  24. --build=$(GNU_HOST_NAME) \
  25. --host=$(GNU_HOST_NAME) \
  26. --target=$(REAL_GNU_TARGET_NAME) \
  27. --with-gmp=$(STAGING_DIR_HOST) \
  28. --with-mpfr=$(STAGING_DIR_HOST) \
  29. --with-mpc=$(STAGING_DIR_HOST) \
  30. --with-expat=$(STAGING_DIR_HOST) \
  31. --disable-werror \
  32. --without-uiout \
  33. --enable-tui --disable-gdbtk --without-x \
  34. --without-included-gettext \
  35. --enable-threads \
  36. --disable-unit-tests \
  37. --disable-ubsan \
  38. --disable-binutils \
  39. --disable-ld \
  40. --disable-gas \
  41. --disable-sim
  42. ifneq ($(CONFIG_GDB_PYTHON),)
  43. HOST_CONFIGURE_ARGS+= --with-python
  44. else
  45. HOST_CONFIGURE_ARGS+= --without-python
  46. endif
  47. define Host/Install
  48. mkdir -p $(TOOLCHAIN_DIR)/bin
  49. $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  50. ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  51. strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
  52. mkdir -p $(TOOLCHAIN_DIR)/share/gdb
  53. -cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python $(TOOLCHAIN_DIR)/share/gdb/
  54. cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls $(TOOLCHAIN_DIR)/share/gdb/
  55. cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit $(TOOLCHAIN_DIR)/share/gdb/
  56. endef
  57. define Host/Clean
  58. rm -rf \
  59. $(HOST_BUILD_DIR) \
  60. $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
  61. $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
  62. endef
  63. $(eval $(call HostBuild))