toolchain-external-codescape-mti-mips.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ################################################################################
  2. #
  3. # toolchain-external-codescape-mti-mips
  4. #
  5. ################################################################################
  6. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION = 2016.05-03
  7. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION)
  8. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STRIP_COMPONENTS = 2
  9. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
  10. # Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
  11. # sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
  12. # -> sbin-<abi> so that the rest of Buildroot can find the toolchain
  13. # tools in the appropriate location.
  14. ifeq ($(BR2_MIPS_OABI32),y)
  15. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = o32
  16. else ifeq ($(BR2_MIPS_NABI32),y)
  17. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n32
  18. else ifeq ($(BR2_MIPS_NABI64),y)
  19. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n64
  20. endif
  21. define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS
  22. rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
  23. ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
  24. ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
  25. endef
  26. # The Codescape toolchain uses a sysroot layout that places them
  27. # side-by-side instead of nested like multilibs. A symlink is needed
  28. # much like for the nested sysroots which are handled in
  29. # copy_toolchain_sysroot but there is not enough information in there
  30. # to determine whether the sysroot layout was nested or side-by-side.
  31. # Add the symlink here for now.
  32. define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
  33. $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \
  34. ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \
  35. ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR}
  36. endef
  37. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_POST_INSTALL_STAGING_HOOKS += \
  38. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS \
  39. TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
  40. $(eval $(toolchain-external-package))