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