You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.2 KiB

pciutils: backport patch to fix compilation with older binutils While building pciutils 3.8.0 for OpenWrt 21.02 includes target mvebu/cortex-a9, mvebu/cortex-a53 and powerpc/8540, it fails because of this error: -I<turris1x/ws/build/staging_dir/toolchain-powerpc_8548_gcc-8.4.0_musl/include> -c -o filter.o filter.c {standard input}: Assembler messages: {standard input}:6: Error: multiple versions [`pci_filter_init@@LIBPCI_3.8'|`pci_filter_init@LIBPCI_3.3'] for symbol `pci_filter_init_v38' {standard input}:8: Error: multiple versions [`pci_filter_parse_slot@@LIBPCI_3.8'|`pci_filter_parse_slot@LIBPCI_3.3'] for symbol `pci_filter_parse_slot_v38' {standard input}:10: Error: multiple versions [`pci_filter_parse_id@@LIBPCI_3.8'|`pci_filter_parse_id@LIBPCI_3.3'] for symbol `pci_filter_parse_id_v38' {standard input}:12: Error: multiple versions [`pci_filter_match@@LIBPCI_3.8'|`pci_filter_match@LIBPCI_3.3'] for symbol `pci_filter_match_v38' make[4]: *** [<builtin>: filter.o] Error 1 make[4]: Leaving directory '<turris1x/ws/build/build_dir/target-powerpc_8548_musl/pciutils-3.8.0/lib'> make[3]: *** [Makefile:70: lib/libpci.so.3.8.0] Error 2 make[3]: Leaving directory '<turris1x/ws/build/build_dir/target-powerpc_8548_musl/pciutils-3.8.0'> make[2]: *** [Makefile:88: <turris1x/ws/build/build_dir/target-powerpc_8548_musl/pciutils-3.8.0/.built]> Error 2 make[2]: Leaving directory '<turris1x/ws/build/feeds/packages/utils/pciutils'> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com> (cherry picked from commit f08dadd517e4ecd5c15d4016dd6261d9fee3d41b)
2 years ago
  1. #
  2. # Copyright (C) 2007-2017 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:=pciutils
  9. PKG_VERSION:=3.8.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/utils/pciutils
  13. PKG_HASH:=91edbd0429a84705c9ad156d4ff38ccc724d41ea54c4c5b88e38e996f8a34f05
  14. PKG_MAINTAINER:=Lucian Cristian <lucian.cristian@gmail.com>
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/pciutils
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=Linux PCI Utilities
  23. URL:=http://mj.ucw.cz/pciutils.shtml
  24. DEPENDS:=+libkmod +libpci +pciids
  25. endef
  26. define Package/pciutils/description
  27. contains collection of programs for inspecting and manipulating configuration
  28. of PCI devices
  29. endef
  30. define Package/libpci
  31. SECTION:=libs
  32. CATEGORY:=Libraries
  33. TITLE:=Linux PCI Libraries
  34. URL:=http://mj.ucw.cz/pciutils.shtml
  35. endef
  36. TARGET_CFLAGS += $(FPIC)
  37. MAKE_FLAGS += \
  38. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  39. PREFIX="/usr" \
  40. HOST="Linux" \
  41. HWDB="no" \
  42. ZLIB="no" \
  43. SHARED="yes"
  44. ifneq ($(CONFIG_USE_GLIBC),)
  45. TARGET_LDFLAGS += -lresolv
  46. endif
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/lib
  49. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpci.so.3 \
  50. $(PKG_INSTALL_DIR)/usr/lib/libpci.so
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib
  52. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  53. $(CP) $(PKG_BUILD_DIR)/lib/libpci.pc $(1)/usr/lib/pkgconfig
  54. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libpci.pc
  55. $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libpci.pc
  56. $(INSTALL_DIR) $(1)/usr/include/pci
  57. $(CP) $(foreach i,pci.h config.h header.h types.h, \
  58. $(PKG_BUILD_DIR)/lib/$(i)) $(1)/usr/include/pci
  59. endef
  60. define Package/pciutils/install
  61. $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lspci $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/setpci $(1)/usr/sbin/
  64. endef
  65. define Package/libpci/install
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
  68. endef
  69. $(eval $(call BuildPackage,libpci))
  70. $(eval $(call BuildPackage,pciutils))