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