Add support for MIPS Codescape MTI GNU Linux toolchain
PATCH v2 1/1 Add support for MIPS Codescape MTI GNU Linux toolchain
- Add support for MIPS Codescape MTI GNU Linux toolchain
- Add a hash value
- Add logic to 'toolchain/helpers.mk' to allow the SYSROOT_DIR and ARCH_SYSROOT_DIR sit side by side instead of nested.
- Add logic for creating the side-by-side symlink as a post install hook.
- Add logic to allow Buildroot finding the toolchain binaries under $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/2015.06-03/bin.
---
v1 -> v2: changes made according Yann E. Morin's review. Please see:
http://patchwork.ozlabs.org/patch/499460/
toolchain/helpers.mk | 12 ++++- toolchain/toolchain-external/Config.in | 51 ++++++++++++++++++++++ .../toolchain-external/toolchain-external.hash | 6 +++ toolchain/toolchain-external/toolchain-external.mk | 18 ++++++++ 4 files changed, 86 insertions(+), 1 deletion(-)
toolchain/helpers.mk +11 -1
@@ -116,6 +116,13 @@ copy_toolchain_lib_root = \ # non-default architecture variant is used. Without this, the # compiler fails to find libraries and headers. # +# * Note: this guesses that the ARCH_SYSROOT_DIR is nested into +# the SYSROOT_DIR, but that's not true for all toolchains (i.e. +# Codescape toolchains), so a post-install-staging hook will be +# needed to create the symlink when the sysroot dirs are not nested +# because there is not enough information here to determine whether +# the sysroot layout is nested or side-by-side. +# # Some toolchains (i.e Linaro binary toolchains) store support # libraries (libstdc++, libgcc_s) outside of the sysroot, so we simply # copy all the libraries from the "support lib directory" into our
@@ -144,7 +151,10 @@ copy_toolchain_sysroot = \ $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ fi ; \ done ; \ - if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \ + SYSROOT_DIR_CANON=`readlink -f $${SYSROOT_DIR}` ; \ + ARCH_SYSROOT_DIR_CANON=`readlink -f $${ARCH_SYSROOT_DIR}` ; \ + if [ $${SYSROOT_DIR_CANON} != $${ARCH_SYSROOT_DIR_CANON} \ + -a $${ARCH_SYSROOT_DIR_CANON:0:$${\#SYSROOT_DIR_CANON}} == $${SYSROOT_DIR_CANON} ] ; then \ if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \ cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \ fi ; \
toolchain/toolchain-external/Config.in +51 -0
63 lines not on this page · raw message
toolchain/toolchain-external/toolchain-external.hash +6 -0
@@ -55,6 +55,12 @@ sha256 0cffac0caea0eb3c8bdddfa14be011ce366680f40aeddbefc7cf23cb6d4f1891 gcc-lin sha256 4bc9d86390f8fa67a693ba4768ba5b12faaf7dd37c706c05ccd9321e765226e4 gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832 gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz +# Codescape toolchains from Imagination Technologies +# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-03/ +md5 80e98c7425e4c9f7df255f5098bf7a10 Codescape.GNU.Tools.Package.2015.06-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +# Locally calculated +sha256 c44857522fa80b99e6918cfe8ffa70100b78a124e97b0749e86c2b71a101e2fd Codescape.GNU.Tools.Package.2015.06-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz + # Synopsys DesignWare ARC toolchains sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3 arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10 arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
toolchain/toolchain-external/toolchain-external.mk +18 -0
@@ -144,6 +144,8 @@ endif else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/2015.06-03/bin else TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin endif
@@ -253,6 +255,18 @@ define TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK ln -snf . $(TARGET_DIR)/usr/lib/aarch64-linux-gnu endef +# The Codescape toolchain uses a sysroot layout that places them +# side-by-side instead of nested like multilibs. A symlink is needed +# much like for the nested sysroots which are handled in +# copy_toolchain_sysroot but there is not enough information in there +# to determine whether the sysroot layout was nested or side-by-side. +# Add the symlink here for now. +define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))"; \ + ARCH_SUBDIR=`basename $${ARCH_SYSROOT_DIR}`; \ + ln -snf . $(STAGING_DIR)/$${ARCH_SUBDIR} +endef + ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi TOOLCHAIN_EXTERNAL_SOURCE = arm-2013.05-24-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
@@ -284,6 +298,10 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y) +TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.06-03 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405),y) TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu TOOLCHAIN_EXTERNAL_SOURCE = mips-2014.05-27-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
2.3.6
PATCH v2 1/1 Add support for MIPS Codescape MTI GNU Linux toolchain
Vicente, All,
On 2015-07-23 20:19 +0200, Vicente Olivert Riera spake thusly:
Quoted 10 lines
- Add support for MIPS Codescape MTI GNU Linux toolchain
- Add a hash value
- Add logic to 'toolchain/helpers.mk' to allow theSYSROOT_DIRandARCH_SYSROOT_DIRsit side by side instead of nested.
- Add logic for creating the side-by-side symlink as a post install hook.
- Add logic to allow Buildroot finding the toolchain binaries under $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/2015.06-03/bin.Signed-off-by Vicente Olivert Riera <[email protected]>
Still, I ahve a question for Thomas...
toolchain/toolchain-external/toolchain-external.mk endif · line 148
Quoted 10 lines
toolchain/toolchain-external/toolchain-external.mk +2
-0@@ -144,6 +144,8 @@ endif else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/2015.06-03/bin
I wonder if we could not just use the _STRIP_COMPONENTS variable to get rid of that extra level...
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/1 Add support for MIPS Codescape MTI GNU Linux toolchain
Hello Yann,
Quoted 15 lines · Yann E. MORIN
Still, I ahve a question for Thomas...
toolchain/toolchain-external/toolchain-external.mk endif · line 148
Quoted 10 lines
toolchain/toolchain-external/toolchain-external.mk +2
-0@@ -144,6 +144,8 @@ endif else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/2015.06-03/binI wonder if we could not just use the
_STRIP_COMPONENTSvariable to get rid of that extra level...
That only work for regular packages living under $(TOPDIR)/package/.
I will send a patch to add the _STRIP_COMPONENTS for external toolchains, and then I will send a v3 of this one.
Regards,
Vincent.
PATCH v2 1/1 Add support for MIPS Codescape MTI GNU Linux toolchain
Hello Yann, Thomas, all,
Quoted 4 lines · Vicente Olivert Riera
That only work for regular packages living under $(TOPDIR)/package/.
I will send a patch to add the
_STRIP_COMPONENTSfor external toolchains, and then I will send a v3 of this one.
Done.
http://patchwork.ozlabs.org/patch/499562/
http://patchwork.ozlabs.org/patch/499563/
Regards,
Vincent.