All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
@ 2015-09-02 22:51 ` Yann E. MORIN
  2015-10-03 14:46   ` Romain Naour
  2015-09-02 22:51 ` [Buildroot] [PATCH 2/6 RFC] core/pkg-generic: always dereference hardlinks from archives Yann E. MORIN
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

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" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 docs/manual/adding-packages-generic.txt | 4 ++++
 package/pkg-generic.mk                  | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index 4c12b42..e7a473c 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -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
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 6a7d97e..d1877a7 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -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         ?=
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 2/6 RFC] core/pkg-generic: always dereference hardlinks from archives
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
  2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
@ 2015-09-02 22:51 ` Yann E. MORIN
  2015-09-02 22:51 ` [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands Yann E. MORIN
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

Currently, 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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/pkg-generic.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index d1877a7..45b4218 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -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) -)
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds)
@ 2015-09-02 22:51 Yann E. MORIN
  2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

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(-)

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
  2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
  2015-09-02 22:51 ` [Buildroot] [PATCH 2/6 RFC] core/pkg-generic: always dereference hardlinks from archives Yann E. MORIN
@ 2015-09-02 22:51 ` Yann E. MORIN
  2015-10-03 14:49   ` Romain Naour
  2015-09-02 22:51 ` [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case) Yann E. MORIN
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 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(-)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 86b3c78..1d06d7e 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -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
diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
index 6bb7997..a86b25a 100644
--- a/package/gcc/gcc-initial/gcc-initial.mk
+++ b/package/gcc/gcc-initial/gcc-initial.mk
@@ -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
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 501fcea..b9e9323 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case)
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2015-09-02 22:51 ` [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands Yann E. MORIN
@ 2015-09-02 22:51 ` Yann E. MORIN
  2015-10-03 14:55   ` Romain Naour
  2015-09-02 22:51 ` [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case) Yann E. MORIN
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

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.

Note: the blackfin case is special, and will be handled in a follow-up
patch.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

---
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(-)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 3cb59c6..b14e0a1 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case)
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2015-09-02 22:51 ` [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case) Yann E. MORIN
@ 2015-09-02 22:51 ` Yann E. MORIN
  2015-10-03 14:55   ` Romain Naour
  2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
  2015-10-03 13:31 ` [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Romain Naour
  6 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:51 UTC (permalink / raw)
  To: buildroot

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" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 toolchain/toolchain-external/toolchain-external.mk | 33 ++++++++++++----------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index b14e0a1..6bc2fdc 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -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)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2015-09-02 22:51 ` [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case) Yann E. MORIN
@ 2015-09-02 22:52 ` Yann E. MORIN
  2015-09-03 14:06   ` Vicente Olivert Riera
  2015-10-03 14:58   ` Romain Naour
  2015-10-03 13:31 ` [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Romain Naour
  6 siblings, 2 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-09-02 22:52 UTC (permalink / raw)
  To: buildroot

From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

- 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.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
[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 <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
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(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 85a9407..9fa831d 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -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 ; \
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index e7aed2e..56ae84a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -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_MIPS201505
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 3980c62..247833c 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -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
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 6bc2fdc..bd45cbb 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -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
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain
  2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
@ 2015-09-03 14:06   ` Vicente Olivert Riera
  2015-10-03 14:58   ` Romain Naour
  1 sibling, 0 replies; 15+ messages in thread
From: Vicente Olivert Riera @ 2015-09-03 14:06 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,
On 09/02/2015 11:52 PM, Yann E. MORIN wrote:
> From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> 
> - 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.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> [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 <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> 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(-)
> 
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 85a9407..9fa831d 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -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 ; \
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index e7aed2e..56ae84a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -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_MIPS201505
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 3980c62..247833c 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -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
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 6bc2fdc..bd45cbb 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -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
> 

Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.org>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.org>

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.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds)
  2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
@ 2015-10-03 13:31 ` Romain Naour
  2015-10-03 14:06   ` Arnout Vandecappelle
  6 siblings, 1 reply; 15+ messages in thread
From: Romain Naour @ 2015-10-03 13:31 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> 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?
> 

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

> Regards,
> Yann E. MORIN.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds)
  2015-10-03 13:31 ` [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Romain Naour
@ 2015-10-03 14:06   ` Arnout Vandecappelle
  0 siblings, 0 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-10-03 14:06 UTC (permalink / raw)
  To: buildroot

On 03-10-15 14:31, Romain Naour wrote:
> Hi Yann,
> 
> Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
>> 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?
>>
> 
> 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 ?

 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


> 
> Best regards,
> Romain
> 
>> Regards,
>> Yann E. MORIN.
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
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

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting
  2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
@ 2015-10-03 14:46   ` Romain Naour
  0 siblings, 0 replies; 15+ messages in thread
From: Romain Naour @ 2015-10-03 14:46 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> 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" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

> ---
>  docs/manual/adding-packages-generic.txt | 4 ++++
>  package/pkg-generic.mk                  | 5 ++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
> index 4c12b42..e7a473c 100644
> --- a/docs/manual/adding-packages-generic.txt
> +++ b/docs/manual/adding-packages-generic.txt
> @@ -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
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 6a7d97e..d1877a7 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -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         ?=
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands
  2015-09-02 22:51 ` [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands Yann E. MORIN
@ 2015-10-03 14:49   ` Romain Naour
  0 siblings, 0 replies; 15+ messages in thread
From: Romain Naour @ 2015-10-03 14:49 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

> ---
>  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(-)
> 
> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
> index 86b3c78..1d06d7e 100644
> --- a/package/gcc/gcc-final/gcc-final.mk
> +++ b/package/gcc/gcc-final/gcc-final.mk
> @@ -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
> diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
> index 6bb7997..a86b25a 100644
> --- a/package/gcc/gcc-initial/gcc-initial.mk
> +++ b/package/gcc/gcc-initial/gcc-initial.mk
> @@ -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
> diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
> index 501fcea..b9e9323 100644
> --- a/package/gcc/gcc.mk
> +++ b/package/gcc/gcc.mk
> @@ -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
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case)
  2015-09-02 22:51 ` [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case) Yann E. MORIN
@ 2015-10-03 14:55   ` Romain Naour
  0 siblings, 0 replies; 15+ messages in thread
From: Romain Naour @ 2015-10-03 14:55 UTC (permalink / raw)
  To: buildroot

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> 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.
> 
> Note: the blackfin case is special, and will be handled in a follow-up
> patch.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

> 
> ---
> 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(-)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 3cb59c6..b14e0a1 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -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
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case)
  2015-09-02 22:51 ` [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case) Yann E. MORIN
@ 2015-10-03 14:55   ` Romain Naour
  0 siblings, 0 replies; 15+ messages in thread
From: Romain Naour @ 2015-10-03 14:55 UTC (permalink / raw)
  To: buildroot

Hi Yann,

Le 03/09/2015 00:51, Yann E. MORIN a ?crit :
> 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" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

> ---
>  toolchain/toolchain-external/toolchain-external.mk | 33 ++++++++++++----------
>  1 file changed, 18 insertions(+), 15 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index b14e0a1..6bc2fdc 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -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)
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain
  2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
  2015-09-03 14:06   ` Vicente Olivert Riera
@ 2015-10-03 14:58   ` Romain Naour
  1 sibling, 0 replies; 15+ messages in thread
From: Romain Naour @ 2015-10-03 14:58 UTC (permalink / raw)
  To: buildroot

Hi Yann, Vincente,

Le 03/09/2015 00:52, Yann E. MORIN a ?crit :
> From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> 
> - 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.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> [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 <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> 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(-)
> 
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 85a9407..9fa831d 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -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 \

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.

Reviewed-by: Romain Naour <romain.naour@openwide.fr>

Best regards,
Romain

>  		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
>  			cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
>  		fi ; \
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index e7aed2e..56ae84a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -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_MIPS201505
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 3980c62..247833c 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -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
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 6bc2fdc..bd45cbb 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -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
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-10-03 14:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-02 22:51 [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Yann E. MORIN
2015-09-02 22:51 ` [Buildroot] [PATCH 1/6 RFC] core/pkg-generic: allow packages to exclude files when extracting Yann E. MORIN
2015-10-03 14:46   ` Romain Naour
2015-09-02 22:51 ` [Buildroot] [PATCH 2/6 RFC] core/pkg-generic: always dereference hardlinks from archives Yann E. MORIN
2015-09-02 22:51 ` [Buildroot] [PATCH 3/6 RFC] package/gcc: use generic extract commands Yann E. MORIN
2015-10-03 14:49   ` Romain Naour
2015-09-02 22:51 ` [Buildroot] [PATCH 4/6 RFC] toolchain/external: use generic extract commands (!blackfin case) Yann E. MORIN
2015-10-03 14:55   ` Romain Naour
2015-09-02 22:51 ` [Buildroot] [PATCH 5/6 RFC] toolchain/external: use generic extract commands (blackfin case) Yann E. MORIN
2015-10-03 14:55   ` Romain Naour
2015-09-02 22:52 ` [Buildroot] [PATCH 6/6 RFC] Add support for MIPS Codescape MTI GNU Linux toolchain Yann E. MORIN
2015-09-03 14:06   ` Vicente Olivert Riera
2015-10-03 14:58   ` Romain Naour
2015-10-03 13:31 ` [Buildroot] [PATCH 0/6 RFC] toolchain/external: use generic extract commands (branch yem/extract-cmds) Romain Naour
2015-10-03 14:06   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.