toolchain/external: use generic extract commands (branch yem/extract-cmds)
cover toolchain/external: use generic extract commands (branch yem/extract-cmds)
Hello All!
This series is an attempt at simplifying the way external toolchains are extracted.
Currently, external toolchains use custom extract commands, because they want to exclude a bumch of files during extraction, so as to save a bit of space (locales in some toolchains can account for up to 80% of the size of the toolchain as a whole).
And it turns out, gcc also wants to exclude a bunch of files (java and go, testsuites).
Using custom extract commands means that those packages (and critical ones, at that) can not benefit from the enhancements and fixes made to the generic commands, like the automatic triiping of components.
In this series:
- we first introduce the support for the exclusion list
- we always break/dereference hardlinks
- we make gcc use the exclusion list
- we then make the external toolchains use it (in two passes: one for the non-Blackfin case, one for it, as it is 'seecial')
- finaly, we introduce the Codescape MTI toolchain from Vincent
Thomas, there is a question for you in the second commit: would you care to explain what your goal was when you added --hard-dereference when extracting the Blackfin toolchains?
Regards,
Yann E. MORIN.
The following changes since commit 91f12b7e7a013e3db639e0fa44ac395ac46442f2:
tar: move package to 'system tools' (2015-09-01 22:28:49 +0200)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/extract-cmds
for you to fetch changes up to 8ea8baf0059c895f8df15fca5d3b9b70d41f7b53:
Add support for MIPS Codescape MTI GNU Linux toolchain (2015-09-03 00:31:19 +0200)
----------------------------------------------------------------
Vicente Olivert Riera (1):
Add support for MIPS Codescape MTI GNU Linux toolchain
Yann E. MORIN (5):
core/pkg-generic: allow packages to exclude files when extracting core/pkg-generic: always dereference hardlinks from archives package/gcc: use generic extract commands toolchain/external: use generic extract commands (!blackfin case) toolchain/external: use generic extract commands (blackfin case)
docs/manual/adding-packages-generic.txt | 4 ++ package/gcc/gcc-final/gcc-final.mk | 3 +- package/gcc/gcc-initial/gcc-initial.mk | 3 +- package/gcc/gcc.mk | 15 ++--- package/pkg-generic.mk | 6 +- toolchain/helpers.mk | 12 +++- toolchain/toolchain-external/Config.in | 52 +++++++++++++++++ .../toolchain-external/toolchain-external.hash | 4 ++ toolchain/toolchain-external/toolchain-external.mk | 68 ++++++++++++++-------- 9 files changed, 129 insertions(+), 38 deletions(-)
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. | '------------------------------^-------^------------------^--------------------'
RFC PATCH 1/6 core/pkg-generic: allow packages to exclude files when extracting
Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar.
Add a new variable that packages may set, to provide a space-separated list of patterns to exclude.
--- docs/manual/adding-packages-generic.txt | 4 ++++ package/pkg-generic.mk | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-)
docs/manual/adding-packages-generic.txt +4 -0
@@ -312,6 +312,10 @@ information is (assuming the package name is +libfoo+) : that have more than one leading component to strip, set this variable with the value to be passed to tar. Default: 1. +* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude + when extracting the archive. Each item from that list is passed as + a tar's +--exclude+ option. By default, empty. + * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package name) that are required for the current target package to compile. These dependencies are guaranteed to be compiled and
package/pkg-generic.mk +4 -1
@@ -476,7 +476,10 @@ $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned # default extract command $(2)_EXTRACT_CMDS ?= \ $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \ - $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -) + $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \ + -C $$($(2)_DIR) \ + $$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \ + $$(TAR_OPTIONS) -) # pre/post-steps hooks $(2)_PRE_DOWNLOAD_HOOKS ?=
Signature · 1 line
1.9.1
RFC PATCH 1/6 core/pkg-generic: allow packages to exclude files when extracting
Hi Yann,
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 11 lines
Currently, packages that need to exclude parts of the archives when extracting (e.g. to gain space), like gcc or toolchain-external, have to provide custom extract commands, just for the sake of adding a bunch of --exclude directives when calling tar.
Add a new variable that packages may set, to provide a space-separated list of patterns to exclude.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Vicente Olivert Riera <[email protected]>
Best regards,
Romain
Quoted 37 lines
--- docs/manual/adding-packages-generic.txt | 4 ++++ package/pkg-generic.mk | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-)docs/manual/adding-packages-generic.txt +4
-0@@ -312,6 +312,10 @@ information is (assuming the package name is +libfoo+) : that have more than one leading component to strip, set this variable with the value to be passed to tar. Default: 1. +* +LIBFOO_EXCLUDES+ is a space-separated list of patterns to exclude + when extracting the archive. Each item from that list is passed as + a tar's +--exclude+ option. By default, empty. + * +LIBFOO_DEPENDENCIES+ lists the dependencies (in terms of package name) that are required for the current target package to compile. These dependencies are guaranteed to be compiled andpackage/pkg-generic.mk +4
-1@@ -476,7 +476,10 @@ $(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned # default extract command $(2)_EXTRACT_CMDS ?= \ $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \ - $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) -C $$($(2)_DIR) $$(TAR_OPTIONS) -) + $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \ + -C $$($(2)_DIR) \ + $$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \ + $$(TAR_OPTIONS) -) # pre/post-steps hooks $(2)_PRE_DOWNLOAD_HOOKS ?=
RFC PATCH 2/6 core/pkg-generic: always dereference hardlinks from archives
In reply to Yann E. MORINCurrently, hardlinks in archives are extracted as hard-links on the filesystem.
While the vast majority of archives do not have hard-links in them, there are a few (the Blackfin prebuilt toolchains, most notably) that have hard-links, and for which we want to break the hard-linking on extract because [--see Thomas--]...
Since the case for hard-links in archives is very rare, we can probably accept the size impact of breaking hard-links always.
Note: This will come handy when the toolchains are converted to using the generic extract commands.
--- package/pkg-generic.mk | 1 + 1 file changed, 1 insertion(+)
package/pkg-generic.mk +1 -0
@@ -478,6 +478,7 @@ $(2)_EXTRACT_CMDS ?= \ $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \ $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \ -C $$($(2)_DIR) \ + --hard-dereference \ $$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \ $$(TAR_OPTIONS) -)
Signature · 1 line
1.9.1
RFC PATCH 3/6 package/gcc: use generic extract commands
In reply to Yann E. MORIN--- package/gcc/gcc-final/gcc-final.mk | 3 ++- package/gcc/gcc-initial/gcc-initial.mk | 3 ++- package/gcc/gcc.mk | 15 ++++----------- 3 files changed, 8 insertions(+), 13 deletions(-)
package/gcc/gcc-final/gcc-final.mk +2 -1
@@ -12,7 +12,8 @@ HOST_GCC_FINAL_DEPENDENCIES = \ $(HOST_GCC_COMMON_DEPENDENCIES) \ $(BR_LIBC) -HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) +HOST_GCC_FINAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES) +HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
package/gcc/gcc-initial/gcc-initial.mk +2 -1
@@ -10,7 +10,8 @@ GCC_INITIAL_SOURCE = $(GCC_SOURCE) HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES) -HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) +HOST_GCC_INITIAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES) +HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT
package/gcc/gcc.mk +4 -11
@@ -47,18 +47,11 @@ define HOST_GCC_APPLY_PATCHES $(HOST_GCC_APPLY_POWERPC_PATCH) endef -# -# Custom extract command to save disk space -# +HOST_GCC_TAR_EXCLUDES = \ + libjava/* libgo/* \ + gcc/testsuite/* libstdc++-v3/testsuite/* -define HOST_GCC_EXTRACT_CMDS - $(call suitable-extractor,$(GCC_SOURCE)) $(DL_DIR)/$(GCC_SOURCE) | \ - $(TAR) --strip-components=1 -C $(@D) \ - --exclude='libjava/*' \ - --exclude='libgo/*' \ - --exclude='gcc/testsuite/*' \ - --exclude='libstdc++-v3/testsuite/*' \ - $(TAR_OPTIONS) - +define HOST_GCC_FAKE_TESTSUITE mkdir -p $(@D)/libstdc++-v3/testsuite/ echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in
Signature · 1 line
1.9.1
RFC PATCH 3/6 package/gcc: use generic extract commands
Hi Yann,
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 3 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Vicente Olivert Riera <[email protected]>
Best regards,
Romain
Quoted 62 lines
--- package/gcc/gcc-final/gcc-final.mk | 3 ++- package/gcc/gcc-initial/gcc-initial.mk | 3 ++- package/gcc/gcc.mk | 15 ++++----------- 3 files changed, 8 insertions(+), 13 deletions(-)package/gcc/gcc-final/gcc-final.mk +2
-1@@ -12,7 +12,8 @@ HOST_GCC_FINAL_DEPENDENCIES = \ $(HOST_GCC_COMMON_DEPENDENCIES) \ $(BR_LIBC) -HOST_GCC_FINAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) +HOST_GCC_FINAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES) +HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACTpackage/gcc/gcc-initial/gcc-initial.mk +2
-1@@ -10,7 +10,8 @@ GCC_INITIAL_SOURCE = $(GCC_SOURCE) HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES) -HOST_GCC_INITIAL_EXTRACT_CMDS = $(HOST_GCC_EXTRACT_CMDS) +HOST_GCC_INITIAL_TAR_EXCLUDES = $(HOST_GCC_TAR_EXCLUDES) +HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACTpackage/gcc/gcc.mk +4
-11@@ -47,18 +47,11 @@ define HOST_GCC_APPLY_PATCHES $(HOST_GCC_APPLY_POWERPC_PATCH) endef -# -# Custom extract command to save disk space -# +HOST_GCC_TAR_EXCLUDES = \ + libjava/* libgo/* \ + gcc/testsuite/* libstdc++-v3/testsuite/* -define HOST_GCC_EXTRACT_CMDS - $(call suitable-extractor,$(GCC_SOURCE)) $(DL_DIR)/$(GCC_SOURCE) | \ - $(TAR) --strip-components=1 -C $(@D) \ - --exclude='libjava/*' \ - --exclude='libgo/*' \ - --exclude='gcc/testsuite/*' \ - --exclude='libstdc++-v3/testsuite/*' \ - $(TAR_OPTIONS) - +define HOST_GCC_FAKE_TESTSUITE mkdir -p $(@D)/libstdc++-v3/testsuite/ echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in
RFC PATCH 4/6 toolchain/external: use generic extract commands (!blackfin case)
In reply to Yann E. MORINNow that packages can provide a list of files to be excluded when extracting their archive, downloaded external toolchains are no longer special in this respect.
Still, those toolchains are currently extracted directly into their final location, $(HOST_DIR)/opt/ext-toolchain/ which means we still need a custom extract command.
Except, we don't really need it: we can just move the toolchain, after it's been extracted by the generic extract command, with a post-extract hook.
This means that:
- we now extract the toolchain with the generic extract command,
- the toolchain is thus extracted into $(@D) ,
- fixup commands are run against $(@D), as a post-extract hook,
instead of against $(HOST_DIR)/opt/ext-toolchain ,
- once this is done, we move $(@D)/* into the final location with a new post-extract hook.
Note: the blackfin case is special, and will be handled in a follow-up patch.
---
Note: ideally, this part should be a host-generic-package, which installs the toolchain as apart of its install commands, but that's much more intrusive, and can be postponed for a later patchset...
--- toolchain/toolchain-external/toolchain-external.mk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +10 -8
@@ -266,15 +266,15 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109),y) TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS - mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv7a/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ - rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ + mv $(@D)/arago-2011.09/armv7a/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ endef else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109),y) TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS - mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv5te/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ - rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ + mv $(@D)/arago-2011.09/armv5te/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ endef else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries
@@ -423,12 +423,14 @@ define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS endef else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) # Normal handling of toolchain tarball extraction. -define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS +TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* +define TOOLCHAIN_EXTERNAL_MOVE mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ - $(TAR) --strip-components=1 --exclude='usr/lib/locale/*' -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - - $(TOOLCHAIN_EXTERNAL_FIXUP_CMDS) + mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ endef +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \ + TOOLCHAIN_EXTERNAL_FIXUP_CMDS \ + TOOLCHAIN_EXTERNAL_MOVE endif # Returns the location of the libc.a file for the given compiler + flags
Signature · 1 line
1.9.1
RFC PATCH 4/6 toolchain/external: use generic extract commands (!blackfin case)
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 24 lines
Now that packages can provide a list of files to be excluded when extracting their archive, downloaded external toolchains are no longer special in this respect.
Still, those toolchains are currently extracted directly into their final location, $(HOST_DIR)/opt/ext-toolchain/ which means we still need a custom extract command.
Except, we don't really need it: we can just move the toolchain, after it's been extracted by the generic extract command, with a post-extract hook.
This means that:
- we now extract the toolchain with the generic extract command,
- the toolchain is thus extracted into $(@D) ,
- fixup commands are run against $(@D), as a post-extract hook,
instead of against $(HOST_DIR)/opt/ext-toolchain ,- once this is done, we move $(@D)/* into the final location with a new post-extract hook.
Quoted 6 lines
Note: the blackfin case is special, and will be handled in a follow-up patch.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Vicente Olivert Riera <[email protected]>
Best regards,
Romain
Quoted 53 lines
---
Note: ideally, this part should be a host-generic-package, which installs the toolchain as apart of its install commands, but that's much more intrusive, and can be postponed for a later patchset...--- toolchain/toolchain-external/toolchain-external.mk | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)toolchain/toolchain-external/toolchain-external.mk +10
-8@@ -266,15 +266,15 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109),y) TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS - mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv7a/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ - rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ + mv $(@D)/arago-2011.09/armv7a/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ endef else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109),y) TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 define TOOLCHAIN_EXTERNAL_FIXUP_CMDS - mv $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/armv5te/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ - rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/arago-2011.09/ + mv $(@D)/arago-2011.09/armv5te/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ endef else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries@@ -423,12 +423,14 @@ define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS endef else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) # Normal handling of toolchain tarball extraction. -define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS +TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* +define TOOLCHAIN_EXTERNAL_MOVE mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ - $(TAR) --strip-components=1 --exclude='usr/lib/locale/*' -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - - $(TOOLCHAIN_EXTERNAL_FIXUP_CMDS) + mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ endef +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \ + TOOLCHAIN_EXTERNAL_FIXUP_CMDS \ + TOOLCHAIN_EXTERNAL_MOVE endif # Returns the location of the libc.a file for the given compiler + flags
RFC PATCH 5/6 toolchain/external: use generic extract commands (blackfin case)
In reply to Yann E. MORINThe backfin toolchains come in two archives.
We extract the first (main) archive using the generic extract commands, while the second is extracted as a post-extract hook.
--- toolchain/toolchain-external/toolchain-external.mk | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-)
toolchain/toolchain-external/toolchain-external.mk +18 -15
@@ -253,6 +253,16 @@ define TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK ln -snf . $(TARGET_DIR)/usr/lib/aarch64-linux-gnu endef +# Special handling for Blackfin toolchain, because of the split in two +# tarballs, and the organization of tarball contents. The tarballs +# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, +# which themselves contain the toolchain. This is why we strip more +# components than usual. +define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ + $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - +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
@@ -340,14 +350,20 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz
@@ -408,21 +424,8 @@ TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y) -# Special handling for Blackfin toolchain, because of the split in two -# tarballs, and the organization of tarball contents. The tarballs -# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, -# which themselves contain the toolchain. This is why we strip more -# components than usual. -define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS - mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ - $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ - $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - -endef -else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) -# Normal handling of toolchain tarball extraction. +# Normal handling of downloaded toolchain tarball extraction. +ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* define TOOLCHAIN_EXTERNAL_MOVE mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
Signature · 1 line
1.9.1
RFC PATCH 5/6 toolchain/external: use generic extract commands (blackfin case)
Hi Yann,
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 8 lines
The backfin toolchains come in two archives.
We extract the first (main) archive using the generic extract commands, while the second is extracted as a post-extract hook.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Vicente Olivert Riera <[email protected]>
Best regards,
Romain
Quoted 71 lines
--- toolchain/toolchain-external/toolchain-external.mk | 33 ++++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-)toolchain/toolchain-external/toolchain-external.mk +18
-15@@ -253,6 +253,16 @@ define TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK ln -snf . $(TARGET_DIR)/usr/lib/aarch64-linux-gnu endef +# Special handling for Blackfin toolchain, because of the split in two +# tarballs, and the organization of tarball contents. The tarballs +# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, +# which themselves contain the toolchain. This is why we strip more +# components than usual. +define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ + $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - +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@@ -340,14 +350,20 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2012R2/2012R2-RC2/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2012R2-RC2.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2012R2-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2013R1/2013R1-RC1/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2013R1-RC1.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2013R1-RC1.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y) TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386 TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2 TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz@@ -408,21 +424,8 @@ TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1),y) -# Special handling for Blackfin toolchain, because of the split in two -# tarballs, and the organization of tarball contents. The tarballs -# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, -# which themselves contain the toolchain. This is why we strip more -# components than usual. -define TOOLCHAIN_EXTERNAL_EXTRACT_CMDS - mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) | \ - $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - - $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ - $(TAR) --strip-components=3 --hard-dereference -C $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) $(TAR_OPTIONS) - -endef -else ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) -# Normal handling of toolchain tarball extraction. +# Normal handling of downloaded toolchain tarball extraction. +ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* define TOOLCHAIN_EXTERNAL_MOVE mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)
RFC PATCH 6/6 Add support for MIPS Codescape MTI GNU Linux toolchain
In reply to Yann E. MORINFrom: Vicente Olivert Riera <[email protected]>
- 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.
[yann.morin.1998 at free.fr: no need to specify TOOLCHAIN_EXTERNAL_BIN
now that we use the generic extract commands]
---
Chamges v4 -> v5:
- Use 2015.06-05 version instead of 2015.06-04
Changes v3 -> v4:
- Use 2015.06-04 version instead of 2015.06-03.
- Add BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
Changes v2 -> v3:
- Use the generic extract-commands, only define the strip level (Yann)
--- toolchain/helpers.mk | 12 ++++- toolchain/toolchain-external/Config.in | 52 ++++++++++++++++++++++ .../toolchain-external/toolchain-external.hash | 4 ++ toolchain/toolchain-external/toolchain-external.mk | 17 +++++++ 4 files changed, 84 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 +52 -0
64 lines not on this page · raw message
toolchain/toolchain-external/toolchain-external.hash +4 -0
@@ -55,6 +55,10 @@ 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-04/ +sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f Codescape.GNU.Tools.Package.2015.06-05.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 +17 -0
@@ -263,6 +263,18 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - 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
@@ -294,6 +306,11 @@ 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-05 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2 +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
1.9.1
RFC PATCH 6/6 Add support for MIPS Codescape MTI GNU Linux toolchain
Dear Yann E. MORIN,
Quoted 173 lines · Yann E. MORIN
From: Vicente Olivert Riera <[email protected]>
- 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.Signed-off-by Vicente Olivert Riera <[email protected]>[yann.morin.1998 at free.fr: no need to specify
TOOLCHAIN_EXTERNAL_BIN
now that we use the generic extract commands]Signed-off-by Yann E. MORIN <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Chamges v4 -> v5:
- Use 2015.06-05 version instead of 2015.06-04Changes v3 -> v4:
- Use 2015.06-04 version instead of 2015.06-03.
- AddBR2_TOOLCHAIN_GCC_AT_LEAST_4_9Changes v2 -> v3:
- Use the generic extract-commands, only define the strip level (Yann)--- toolchain/helpers.mk | 12 ++++- toolchain/toolchain-external/Config.in | 52 ++++++++++++++++++++++ .../toolchain-external/toolchain-external.hash | 4 ++ toolchain/toolchain-external/toolchain-external.mk | 17 +++++++ 4 files changed, 84 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 +52
-0@@ -195,6 +195,57 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 This toolchain uses software-floating point. +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506 + bool "Codescape MTI GNU Linux Toolchain 2015.06" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_mips_32r2 || BR2_mips_64r2 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Codescape MTI GNU Linux Toolchain 2015.06 for the MIPS + architecture, from Imagination Technologies. It uses gcc + 4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel + headers 4.0. It has support for the following variants: + - MIPS32r2 - Big-Endian, O32 + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + - MIPS32r2 - Little-Endian, O32 + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + - MIPS32r2 - Big-Endian, 2008 NaN, O32 + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, 2008 NaN, O32 + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, 2008 NaN, O32, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008 -mmicromips' + - MIPS64r2 - Big-Endian, N32 + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + - MIPS64r2 - Little-Endian, N32 + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + - MIPS64r2 - Big-Endian, N64 + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + - MIPS64r2 - Little-Endian, N64 + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505 bool "Sourcery CodeBench MIPS 2015.05" depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el@@ -943,6 +994,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + default "mips-mti-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505toolchain/toolchain-external/toolchain-external.hash +4
-0@@ -55,6 +55,10 @@ 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-04/ +sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f Codescape.GNU.Tools.Package.2015.06-05.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.gztoolchain/toolchain-external/toolchain-external.mk +12
-0@@ -263,6 +263,18 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - 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@@ -294,6 +306,11 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y) TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/14.09/components/toolchain/binaries
toolchain/toolchain-external/toolchain-external.mk else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y) · line 316
Quoted 10 lines
toolchain/toolchain-external/toolchain-external.mk +5
-0TOOLCHAIN_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-05 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2 +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
I have applied the complete series and then built a rootfs using this toolchain, and everything went fine. I don't know if I have to add my "reviewed" and "tested" tags to every patch in the series...
Regards,
Vincent.
RFC PATCH 6/6 Add support for MIPS Codescape MTI GNU Linux toolchain
In reply to Yann E. MORINHi Yann, Vincente,
Le 03/09/2015 00:52, Yann E. MORIN a ?crit :
Quoted 51 lines
From: Vicente Olivert Riera <[email protected]>
- 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.Signed-off-by Vicente Olivert Riera <[email protected]>[yann.morin.1998 at free.fr: no need to specify
TOOLCHAIN_EXTERNAL_BIN
now that we use the generic extract commands]Signed-off-by Yann E. MORIN <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Chamges v4 -> v5:
- Use 2015.06-05 version instead of 2015.06-04Changes v3 -> v4:
- Use 2015.06-04 version instead of 2015.06-03.
- AddBR2_TOOLCHAIN_GCC_AT_LEAST_4_9Changes v2 -> v3:
- Use the generic extract-commands, only define the strip level (Yann)--- toolchain/helpers.mk | 12 ++++- toolchain/toolchain-external/Config.in | 52 ++++++++++++++++++++++ .../toolchain-external/toolchain-external.hash | 4 ++ toolchain/toolchain-external/toolchain-external.mk | 17 +++++++ 4 files changed, 84 insertions(+), 1 deletion(-)toolchain/helpers.mk +7
-0@@ -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
toolchain/helpers.mk copy_toolchain_sysroot = \ · line 157
Quoted 8 lines
toolchain/helpers.mk +4
-1@@ -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 \
Vincente, thanks for the explanation during the meeting :)
For the record:
The second part of the test (after the -a) check if ARCH_SYSROOT_DIR_CANON start with the same exact string than SYSROOT_DIR_CANON.
$${ARCH_SYSROOT_DIR_CANON:0:$${\#SYSROOT_DIR_CANON}} mean that we keep the N first characters from ARCH_SYSROOT_DIR_CANON, starting at character 0, where N is the length of SYSROOT_DIR_CANON.
So the test check if the two directories (arch-sysroot and sysroot) are in the same directory.
Best regards,
Romain
Quoted 124 lines
toolchain/helpers.mk +0
-0if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \ cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \ fi ; \toolchain/toolchain-external/Config.in +52
-0@@ -195,6 +195,57 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 This toolchain uses software-floating point. +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506 + bool "Codescape MTI GNU Linux Toolchain 2015.06" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_SOFT_FLOAT + depends on BR2_mips_32r2 || BR2_mips_64r2 + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Codescape MTI GNU Linux Toolchain 2015.06 for the MIPS + architecture, from Imagination Technologies. It uses gcc + 4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel + headers 4.0. It has support for the following variants: + - MIPS32r2 - Big-Endian, O32 + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + - MIPS32r2 - Little-Endian, O32 + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + - MIPS32r2 - Big-Endian, 2008 NaN, O32 + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, 2008 NaN, O32 + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, 2008 NaN, O32, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008 -mmicromips' + - MIPS64r2 - Big-Endian, N32 + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + - MIPS64r2 - Little-Endian, N32 + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + - MIPS64r2 - Big-Endian, N64 + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + - MIPS64r2 - Little-Endian, N64 + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505 bool "Sourcery CodeBench MIPS 2015.05" depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el@@ -943,6 +994,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + default "mips-mti-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS201506 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411 default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505toolchain/toolchain-external/toolchain-external.hash +4
-0@@ -55,6 +55,10 @@ 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-04/ +sha256 f2d12dde626b750987d37ba6c73c6e11839850add94b0d4e4cf77917c1b0944f Codescape.GNU.Tools.Package.2015.06-05.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.gztoolchain/toolchain-external/toolchain-external.mk +17
-0@@ -263,6 +263,18 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - 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@@ -294,6 +306,11 @@ 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-05 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.06-05.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2 +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
cover toolchain/external: use generic extract commands (branch yem/extract-cmds)
In reply to Yann E. MORINHi Yann,
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 26 lines
Hello All!
This series is an attempt at simplifying the way external toolchains are extracted.
Currently, external toolchains use custom extract commands, because they want to exclude a bumch of files during extraction, so as to save a bit of space (locales in some toolchains can account for up to 80% of the size of the toolchain as a whole).
And it turns out, gcc also wants to exclude a bunch of files (java and go, testsuites).
Using custom extract commands means that those packages (and critical ones, at that) can not benefit from the enhancements and fixes made to the generic commands, like the automatic triiping of components.
In this series:
- we first introduce the support for the exclusion list
- we always break/dereference hardlinks
- we make gcc use the exclusion list
- we then make the external toolchains use it (in two passes: one for the non-Blackfin case, one for it, as it is 'seecial')
- finaly, we introduce the Codescape MTI toolchain from Vincent
Quoted 4 lines
Thomas, there is a question for you in the second commit: would you care to explain what your goal was when you added --hard-dereference when extracting the Blackfin toolchains?
What do you think about a new Kconfig option that allow users to define a list of excluded files or directories.
Some toolchains (ie SourceryCodeBench standard) can bundle eclipse or other stuff that are not used in the build process.
Something like:
config BR2_TOOLCHAIN_EXTERNAL_EXCLUDES
string "Exclude unwanted directories from the toolchain archive" default ""
help
If some directories in the toolchain archive are not intended to be used in the build process, this option define a space-separated list of patterns to exclude when extracting the archive.
ifneq ($(BR2_TOOLCHAIN_EXTERNAL_EXCLUDES),) TOOLCHAIN_EXTERNAL_EXCLUDES = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_EXCLUDES)) endif
Thoughts ?
Best regards,
Romain
Quoted 2 lines
Regards,
Yann E. MORIN.
cover toolchain/external: use generic extract commands (branch yem/extract-cmds)
Quoted 50 lines · Romain Naour
Hi Yann,
Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
Quoted 26 lines
Hello All!
This series is an attempt at simplifying the way external toolchains are extracted.
Currently, external toolchains use custom extract commands, because they want to exclude a bumch of files during extraction, so as to save a bit of space (locales in some toolchains can account for up to 80% of the size of the toolchain as a whole).
And it turns out, gcc also wants to exclude a bunch of files (java and go, testsuites).
Using custom extract commands means that those packages (and critical ones, at that) can not benefit from the enhancements and fixes made to the generic commands, like the automatic triiping of components.
In this series:
- we first introduce the support for the exclusion list
- we always break/dereference hardlinks
- we make gcc use the exclusion list
- we then make the external toolchains use it (in two passes: one for the non-Blackfin case, one for it, as it is 'seecial')
- finaly, we introduce the Codescape MTI toolchain from VincentQuoted 4 lines
Thomas, there is a question for you in the second commit: would you care to explain what your goal was when you added --hard-dereference when extracting the Blackfin toolchains?
What do you think about a new
Kconfigoption that allow users to define a list of excluded files or directories.
Some toolchains (ie SourceryCodeBench standard) can bundle eclipse or other stuff that are not used in the build process.Something like:
config
BR2_TOOLCHAIN_EXTERNAL_EXCLUDES
string "Exclude unwanted directories from the toolchain archive" default ""
help
If some directories in the toolchain archive are not intended to be used in the build process, this option define a space-separated list of patterns to exclude when extracting the archive.
Quoted 5 lines
ifneq ($(BR2_TOOLCHAIN_EXTERNAL_EXCLUDES),)
TOOLCHAIN_EXTERNAL_EXCLUDES= $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_EXCLUDES)) endifThoughts ?
Sounds good to me. But it's only for the custom external toolchains, so it
should be named BR2_TOOLCHAIN_EXTERNAL_CUSTOM_EXCLUDES (yes, it sounds wrong, as if the excludes are custom, but it is what it is).
Regards,
Arnout
Quoted 12 lines
Best regards,
RomainQuoted 2 lines
Regards,
Yann E. MORIN._______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF