All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package
@ 2016-11-07  1:19 Arnout Vandecappelle
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
                   ` (23 more replies)
  0 siblings, 24 replies; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:19 UTC (permalink / raw)
  To: buildroot

I reworked Romain's series. I'm too tired now to write a proper cover
letter, but here it goes anyway :-)

I may have screwed up authorship or date of some of these patches. Oh
well, who cares :-P

Regards,
Arnout

---

The following changes since commit 6bb7430a20871ad4e3ccbc8c1992d60117214be2:

  Makefile: delete default rules (2016-11-05 23:34:26 +0100)

are available in the git repository at:

  http://github.com/arnout/buildroot external-toolchain

for you to fetch changes up to ad925c956093b8fcd04d084471b78f9ca074cbb9:

  toolchain-external: remove Arago toolchains (2016-11-07 02:15:06 +0100)

----------------------------------------------------------------
Arnout Vandecappelle (6):
      Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere
      toolchain-external: reorder the contents of toolchain-external.mk
      toolchain-external: move parts to pkg-toolchain-external.mk
      toolchain-external: introduce toolchain-external-package
      toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported
      toolchain-external: remove Arago toolchains

Romain Naour (1):
      toolchain-external-codesourcery-amd64: new package

Thomas Petazzoni (15):
      toolchain-external-linaro-aarch64: new package
      toolchain-external-codesourcery-aarch64: new package
      toolchain-external-linaro-arm: new package
      toolchain-external-codesourcery-arm: new package
      toolchain-external-linaro-armeb: new package
      toolchain-external-blackfin-uclinux: new package
      toolchain-external-codesourcery-mips: new package
      toolchain-external-codescape-img-mips: new package
      toolchain-external-codescape-mti-mips: new package
      toolchain-external-codesourcery-niosII: new package
      toolchain-external-codesourcery-sh: new package
      toolchain-external-codesourcery-x86: new package
      toolchain-external-musl-cross: new package
      toolchain-external-custom: new package
      toolchain-external-arc: new package

 Config.in.legacy                                                                                            |  16 +
 package/Makefile.in                                                                                         |   2 +-
 package/wine/wine.mk                                                                                        |   2 +-
 toolchain/toolchain-external/Config.in                                                                      | 982 ++++--------------------------------------------------
 toolchain/toolchain-external/pkg-toolchain-external.mk                                                      | 674 +++++++++++++++++++++++++++++++++++++
 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in                                  |  17 +
 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options                          |  10 +
 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash   |   3 +
 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk     |  33 ++
 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in                                |  62 ++++
 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options                        |   9 +
 .../toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash     |   3 +
 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk |  47 +++
 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in                                |  73 ++++
 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options                        |   9 +
 .../toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash     |   3 +
 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk |  47 +++
 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in                              |  17 +
 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options                      |   9 +
 .../toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash |   3 +
 .../toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk   |  22 ++
 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in                                |  24 ++
 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options                        |   9 +
 .../toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash     |   3 +
 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk |  12 +
 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in                                  |  35 ++
 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options                          |   9 +
 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash   |   3 +
 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk     |  13 +
 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in                                 |  93 ++++++
 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options                         |   9 +
 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash |   3 +
 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk   |  13 +
 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in                               |  17 +
 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options                       |   9 +
 .../toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash   |   3 +
 .../toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk     |  13 +
 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in                                   |  25 ++
 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options                           |   9 +
 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash     |   3 +
 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk       |  13 +
 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in                                  |  29 ++
 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options                          |   9 +
 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash   |   3 +
 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk     |  12 +
 toolchain/toolchain-external/toolchain-external-custom/Config.in                                            |   5 +
 toolchain/toolchain-external/toolchain-external-custom/Config.in.options                                    | 334 +++++++++++++++++++
 toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk                         |  15 +
 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in                                    |  15 +
 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options                            |   9 +
 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash       |   3 +
 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk         |  16 +
 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in                                        |  27 ++
 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options                                |   9 +
 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash               |   3 +
 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk                 |  16 +
 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in                                      |  26 ++
 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options                              |   9 +
 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash           |   3 +
 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk             |  16 +
 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in                                        |  30 ++
 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options                                |  19 ++
 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash               |  12 +
 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk                 |  12 +
 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in                                      |  20 ++
 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options                              |  10 +
 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash           |   5 +
 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk             |  24 ++
 toolchain/toolchain-external/toolchain-external.hash                                                        |  67 ----
 toolchain/toolchain-external/toolchain-external.mk                                                          | 792 +------------------------------------------
 70 files changed, 2145 insertions(+), 1766 deletions(-)
 create mode 100644 toolchain/toolchain-external/pkg-toolchain-external.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
 delete mode 100644 toolchain/toolchain-external/toolchain-external.hash

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

* [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
@ 2016-11-07  1:19 ` Arnout Vandecappelle
  2016-11-07 21:06   ` Romain Naour
  2016-11-09 21:51   ` Thomas Petazzoni
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk Arnout Vandecappelle
                   ` (22 subsequent siblings)
  23 siblings, 2 replies; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:19 UTC (permalink / raw)
  To: buildroot

The BR2_TOOLCHAIN_EXTERNAL_PREFIX variable is already qstripped and
stored in the TOOLCHAIN_EXTERNAL_PREFIX variable in
toolchain-external.mk, so use this variable everywhere.

This will be useful for a later patch that makes the derivation of
TOOLCHAIN_EXTERNAL_PREFIX a little more complex.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Arnout: split off into separate patch]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: split off into separate patch [Arnout]
---
 package/Makefile.in  | 2 +-
 package/wine/wine.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 5d591e9..bd73219 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -184,7 +184,7 @@ endif
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
 TARGET_CROSS = $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-
 else
-TARGET_CROSS = $(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
+TARGET_CROSS = $(HOST_DIR)/usr/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
 endif
 
 # Define TARGET_xx variables for all common binutils/gcc
diff --git a/package/wine/wine.mk b/package/wine/wine.mk
index d9a0ecf..47ba90a 100644
--- a/package/wine/wine.mk
+++ b/package/wine/wine.mk
@@ -34,7 +34,7 @@ WINE_CONF_OPTS = \
 # wrapper believes what the real gcc is named, and force the tuple of
 # the external toolchain, not the one we compute in GNU_TARGET_NAME.
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
-WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"
+WINE_CONF_OPTS += TARGETFLAGS="-b $(TOOLCHAIN_EXTERNAL_PREFIX)"
 endif
 
 ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
@ 2016-11-07  1:19 ` Arnout Vandecappelle
  2016-11-07 21:26   ` Romain Naour
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk Arnout Vandecappelle
                   ` (21 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:19 UTC (permalink / raw)
  To: buildroot

When the toolchain-external logic will be split into separate packages,
the order in which things are defined in toolchain-external.mk no
makes less sense. So reorder things in a more logical fashion.

Also add a few more comments to the different sections.

No functional changes at all. The output of 'make -qp' hasn't changed,
except for the order of arguments in
TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Arnout: split off into separate patch, slightly change some comments,
 reordered some parts]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: split off into separate patch [Arnout]
---
 toolchain/toolchain-external/toolchain-external.mk | 882 +++++++++++----------
 1 file changed, 460 insertions(+), 422 deletions(-)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index b7a36be..180a63d 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -63,79 +63,9 @@
 #  $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest
 #  of Buildroot is handled identical for the 2 toolchain types.
 
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-TOOLCHAIN_EXTERNAL_LIBS += libatomic.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.*
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_ARM_EABIHF),yy)
-TOOLCHAIN_EXTERNAL_LIBS += ld-linux-armhf.so.*
-else
-TOOLCHAIN_EXTERNAL_LIBS += ld*.so.*
-endif
-ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
-TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.*
-ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
-TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.*
-endif # gdbserver
-endif # ! no threads
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
-TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.*
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
-TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.*
-endif
-
-ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
-TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.*
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
-TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.*
-# fortran needs quadmath on x86 and x86_64
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
-TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so*
-endif
-endif
-
-TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
-
-# Details about sysroot directory selection.
-#
-# To find the sysroot directory, we use the trick of looking for the
-# 'libc.a' file with the -print-file-name gcc option, and then
-# mangling the path to find the base directory of the sysroot.
-#
-# Note that we do not use the -print-sysroot option, because it is
-# only available since gcc 4.4.x, and we only recently dropped support
-# for 4.2.x and 4.3.x.
-#
-# When doing this, we don't pass any option to gcc that could select a
-# multilib variant (such as -march) as we want the "main" sysroot,
-# which contains all variants of the C library in the case of multilib
-# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the
-# path of the cross-compiler, without the --sysroot=$(STAGING_DIR),
-# since what we want to find is the location of the original toolchain
-# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR.
-#
-# Then, multilib toolchains are a little bit more complicated, since
-# they in fact have multiple sysroots, one for each variant supported
-# by the toolchain. So we need to find the particular sysroot we're
-# interested in.
 #
-# To do so, we ask the compiler where its sysroot is by passing all
-# flags (including -march and al.), except the --sysroot flag since we
-# want to the compiler to tell us where its original sysroot
-# is. ARCH_SUBDIR will contain the subdirectory, in the main
-# SYSROOT_DIR, that corresponds to the selected architecture
-# variant. ARCH_SYSROOT_DIR will contain the full path to this
-# location.
+# Definitions of where the toolchain can be found
 #
-# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The
-# fact is that in multilib toolchains, the header files are often only
-# present in the main sysroot, and only the libraries are available in
-# each variant-specific sysroot directory.
-
 
 TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
 TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
@@ -164,8 +94,6 @@ endif
 # $(wildcard ...) here.
 TOOLCHAIN_EXTERNAL_SUFFIX = \
 	$(if $(wildcard $(TOOLCHAIN_EXTERNAL_BIN)/*.br_real),.br_real)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"'
 
 TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)-
 TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)
@@ -173,16 +101,52 @@ TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFF
 TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
 TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
 
-ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
-# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"'
+
+#
+# Definitions of the list of libraries that should be copied to the target.
+#
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
+TOOLCHAIN_EXTERNAL_LIBS += libatomic.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.*
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_ARM_EABIHF),yy)
+TOOLCHAIN_EXTERNAL_LIBS += ld-linux-armhf.so.*
 else
-# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"'
+TOOLCHAIN_EXTERNAL_LIBS += ld*.so.*
+endif
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.*
+ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
+TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.*
+endif # gdbserver
+endif # ! no threads
+endif
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
+TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.*
+endif
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.*
+endif
+
+ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
+TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.*
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
+TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.*
+# fortran needs quadmath on x86 and x86_64
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
+TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so*
 endif
+endif
+
+TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
+
 
+#
+# Definition of the CFLAGS to use with the external toolchain, as well as the
+# common toolchain wrapper build arguments
+#
 ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
 CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU))
 else
@@ -248,58 +212,420 @@ TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
 TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
 endif
 
-# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
-# So, add the musl-compat-headers package that will install those files,
-# into the staging directory:
-#   sys/queue.h:  header from NetBSD
-#   sys/cdefs.h:  minimalist header bundled in Buildroot
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
+TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
+	-DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"'
+
+ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
+# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path
+TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
+	-DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"'
+else
+# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path
+TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
+	-DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"'
 endif
 
-# 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}
+
+#
+# The following functions creates the symbolic links needed to get the
+# cross-compilation tools visible in $(HOST_DIR)/usr/bin. Some of
+# links are done directly to the corresponding tool in the external
+# toolchain installation directory, while some other links are done to
+# the toolchain wrapper (preprocessor, C, C++ and Fortran compiler)
+#
+# We skip gdb symlink when we are building our own gdb to prevent two
+# gdb's in $(HOST_DIR)/usr/bin.
+#
+# The LTO support in gcc creates wrappers for ar, ranlib and nm which load
+# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and
+# *-gcc-nm and should be used instead of the real programs when -flto is
+# used. However, we should not add the toolchain wrapper for them, and they
+# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
+# *-ranlib and *-nm.
+define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
+	$(Q)cd $(HOST_DIR)/usr/bin; \
+	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
+		base=$${i##*/}; \
+		case "$$base" in \
+		*-ar|*-ranlib|*-nm) \
+			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
+			;; \
+		*cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \
+			ln -sf toolchain-wrapper $$base; \
+			;; \
+		*gdb|*gdbtui) \
+			if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \
+				ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
+			fi \
+			;; \
+		*) \
+			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
+			;; \
+		esac; \
+	done
 endef
 
-# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
-# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
-# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
-# tools in the appropriate location.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
-ifeq ($(BR2_MIPS_OABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
-else ifeq ($(BR2_MIPS_NABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32
-else ifeq ($(BR2_MIPS_NABI64),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64
-endif
 
-define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
-	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
-	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
-endef
-endif
+# Various utility functions used by the external toolchain package
+# infrastructure. Those functions are mainly responsible for:
+#
+#   - installation the toolchain libraries to $(TARGET_DIR)
+#   - copying the toolchain sysroot to $(STAGING_DIR)
+#   - installing a gdbinit file
+#
+# Details about sysroot directory selection.
+#
+# To find the sysroot directory, we use the trick of looking for the
+# 'libc.a' file with the -print-file-name gcc option, and then
+# mangling the path to find the base directory of the sysroot.
+#
+# Note that we do not use the -print-sysroot option, because it is
+# only available since gcc 4.4.x, and we only recently dropped support
+# for 4.2.x and 4.3.x.
+#
+# When doing this, we don't pass any option to gcc that could select a
+# multilib variant (such as -march) as we want the "main" sysroot,
+# which contains all variants of the C library in the case of multilib
+# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the
+# path of the cross-compiler, without the --sysroot=$(STAGING_DIR),
+# since what we want to find is the location of the original toolchain
+# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR.
+#
+# Then, multilib toolchains are a little bit more complicated, since
+# they in fact have multiple sysroots, one for each variant supported
+# by the toolchain. So we need to find the particular sysroot we're
+# interested in.
+#
+# To do so, we ask the compiler where its sysroot is by passing all
+# flags (including -march and al.), except the --sysroot flag since we
+# want to the compiler to tell us where its original sysroot
+# is. ARCH_SUBDIR will contain the subdirectory, in the main
+# SYSROOT_DIR, that corresponds to the selected architecture
+# variant. ARCH_SYSROOT_DIR will contain the full path to this
+# location.
+#
+# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The
+# fact is that in multilib toolchains, the header files are often only
+# present in the main sysroot, and only the libraries are available in
+# each variant-specific sysroot directory.
 
-# 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) -
+
+# toolchain_find_sysroot returns the sysroot location for the given
+# compiler + flags. We need to handle cases where libc.a is in:
+#
+#  - lib/
+#  - usr/lib/
+#  - lib32/
+#  - lib64/
+#  - lib32-fp/ (Cavium toolchain)
+#  - lib64-fp/ (Cavium toolchain)
+#  - usr/lib/<tuple>/ (Linaro toolchain)
+#
+# And variations on these.
+define toolchain_find_sysroot
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
 endef
 
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
+# Returns the lib subdirectory for the given compiler + flags (i.e
+# typically lib32 or lib64 for some toolchains)
+define toolchain_find_libdir
+$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
+endef
+
+# Returns the location of the libc.a file for the given compiler + flags
+define toolchain_find_libc_a
+$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a))
+endef
+
+# Integration of the toolchain into Buildroot: find the main sysroot
+# and the variant-specific sysroot, then copy the needed libraries to
+# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers)
+# to $(STAGING_DIR).
+#
+# Variables are defined as follows:
+#
+#  LIBC_A_LOCATION:     location of the libc.a file in the default
+#                       multilib variant (allows to find the main
+#                       sysroot directory)
+#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/usr/lib/libc.a
+#
+#  SYSROOT_DIR:         the main sysroot directory, deduced from
+#                       LIBC_A_LOCATION by removing the
+#                       usr/lib[32|64]/libc.a part of the path.
+#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/
+#
+# ARCH_LIBC_A_LOCATION: location of the libc.a file in the selected
+#                       multilib variant (taking into account the
+#                       CFLAGS). Allows to find the sysroot of the
+#                       selected multilib variant.
+#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/libc.a
+#
+# ARCH_SYSROOT_DIR:     the sysroot of the selected multilib variant,
+#                       deduced from ARCH_LIBC_A_LOCATION by removing
+#                       usr/lib[32|64]/libc.a at the end of the path.
+#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/
+#
+# ARCH_LIB_DIR:         'lib', 'lib32' or 'lib64' depending on where libraries
+#                       are stored. Deduced from ARCH_LIBC_A_LOCATION by
+#                       looking at usr/lib??/libc.a.
+#                       Ex: lib
+#
+# ARCH_SUBDIR:          the relative location of the sysroot of the selected
+#                       multilib variant compared to the main sysroot.
+#			Ex: mips16/soft-float/el
+#
+# SUPPORT_LIB_DIR:      some toolchains, such as recent Linaro toolchains,
+#                       store GCC support libraries (libstdc++,
+#                       libgcc_s, etc.) outside of the sysroot. In
+#                       this case, SUPPORT_LIB_DIR is set to a
+#                       non-empty value, and points to the directory
+#                       where these support libraries are
+#                       available. Those libraries will be copied to
+#                       our sysroot, and the directory will also be
+#                       considered when searching libraries for copy
+#                       to the target filesystem.
+#
+# Please be very careful to check the major toolchain sources:
+# Buildroot, Crosstool-NG, CodeSourcery and Linaro
+# before doing any modification on the below logic.
+
+ifeq ($(BR2_STATIC_LIBS),)
+define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS
+	$(Q)$(call MESSAGE,"Copying external toolchain libraries to target...")
+	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
+		$(call copy_toolchain_lib_root,$$libs); \
+	done
+endef
+endif
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y)
+define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER
+	$(Q)$(call MESSAGE,"Copying gdbserver")
+	$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	gdbserver_found=0 ; \
+	for d in $${ARCH_SYSROOT_DIR}/usr \
+		 $${ARCH_SYSROOT_DIR}/../debug-root/usr \
+		 $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
+		 $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \
+		if test -f $${d}/bin/gdbserver ; then \
+			install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
+			gdbserver_found=1 ; \
+			break ; \
+		fi ; \
+	done ; \
+	if [ $${gdbserver_found} -eq 0 ] ; then \
+		echo "Could not find gdbserver in external toolchain" ; \
+		exit 1 ; \
+	fi
+endef
+endif
+
+define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
+	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
+	ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	SUPPORT_LIB_DIR="" ; \
+	if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
+		LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
+		if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \
+			SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
+		fi ; \
+	fi ; \
+	if [ "$${SYSROOT_DIR}" == "$${ARCH_SYSROOT_DIR}" ] ; then \
+		ARCH_SUBDIR="" ; \
+	elif [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \
+		SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \
+		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \
+	else \
+		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
+	fi ; \
+	$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
+	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
+endef
+
+# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib.
+# Note: the skeleton package additionally creates lib32->lib or lib64->lib
+# (as appropriate)
+#
+# $1: destination directory (TARGET_DIR / STAGING_DIR)
+create_lib_symlinks = \
+       $(Q)DESTDIR="$(strip $1)" ; \
+       ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+       if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \
+               ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
+               ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
+       fi
+
+define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
+       $(call create_lib_symlinks,$(STAGING_DIR))
+endef
+
+define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
+       $(call create_lib_symlinks,$(TARGET_DIR))
+endef
+
+#
+# Generate gdbinit file for use with Buildroot
+#
+define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
+	$(Q)if test -f $(TARGET_CROSS)gdb ; then \
+		$(call MESSAGE,"Installing gdbinit"); \
+		$(gen_gdbinit_file); \
+	fi
+endef
+
+# Various utility functions used by the external toolchain based on musl.
+
+# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
+# So, add the musl-compat-headers package that will install those files,
+# into the staging directory:
+#   sys/queue.h:  header from NetBSD
+#   sys/cdefs.h:  minimalist header bundled in Buildroot
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
+endif
+
+# With the musl C library, the libc.so library directly plays the role
+# of the dynamic library loader. We just need to create a symbolic
+# link to libc.so with the appropriate name.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+ifeq ($(BR2_i386),y)
+MUSL_ARCH = i386
+else ifeq ($(BR2_ARM_EABIHF),y)
+MUSL_ARCH = armhf
+else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
+MUSL_ARCH = mipsel-sf
+else ifeq ($(BR2_sh),y)
+MUSL_ARCH = sh
+else
+MUSL_ARCH = $(ARCH)
+endif
+define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
+	ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
+endef
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
+endif
+
+#
+# Various functions used by the external toolchain package
+# infrastructure to handle the Blackfin specific
+# BR2_BFIN_INSTALL_FDPIC_SHARED and BR2_BFIN_INSTALL_FLAT_SHARED
+# options.
+#
+
+# Special installation target used on the Blackfin architecture when
+# FDPIC is not the primary binary format being used, but the user has
+# nonetheless requested the installation of the FDPIC libraries to the
+# target filesystem.
+ifeq ($(BR2_BFIN_INSTALL_FDPIC_SHARED),y)
+define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC
+	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to staging...")
+	$(Q)FDPIC_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))/../../bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc ; \
+	FDPIC_SYSROOT_DIR="$(call toolchain_find_sysroot,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	FDPIC_LIB_DIR="$(call toolchain_find_libdir,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
+	FDPIC_SUPPORT_LIB_DIR="" ; \
+	if test `find $${FDPIC_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
+	        FDPIC_LIBSTDCPP_A_LOCATION=$$(LANG=C $${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
+	        if [ -e "$${FDPIC_LIBSTDCPP_A_LOCATION}" ]; then \
+	                FDPIC_SUPPORT_LIB_DIR=`readlink -f $${FDPIC_LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
+	        fi ; \
+	fi ; \
+	$(call copy_toolchain_sysroot,$${FDPIC_SYSROOT_DIR},$${FDPIC_SYSROOT_DIR},,$${FDPIC_LIB_DIR},$${FDPIC_SUPPORT_LIB_DIR})
+endef
+define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC
+	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...")
+	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
+		$(call copy_toolchain_lib_root,$$libs); \
+	done
+endef
+endif
+
+# Special installation target used on the Blackfin architecture when
+# shared FLAT is not the primary format being used, but the user has
+# nonetheless requested the installation of the shared FLAT libraries
+# to the target filesystem. The flat libraries are found and linked
+# according to the index in name "libN.so". Index 1 is reserved for
+# the standard C library. Customer libraries can use 4 and above.
+ifeq ($(BR2_BFIN_INSTALL_FLAT_SHARED),y)
+define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT
+	$(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...")
+	$(Q)FLAT_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))../../bfin-uclinux/bin/bfin-uclinux-gcc ; \
+	FLAT_LIBC_A_LOCATION=`$${FLAT_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -mid-shared-library -print-file-name=libc`; \
+	if [ -f $${FLAT_LIBC_A_LOCATION} -a ! -h $${FLAT_LIBC_A_LOCATION} ] ; then \
+	        $(INSTALL) -D $${FLAT_LIBC_A_LOCATION} $(TARGET_DIR)/lib/lib1.so; \
+	fi
+endef
+endif
+
+# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not
+# patched specifically for uClibc-ng, so it continues to generate
+# binaries that expect the dynamic loader to be named ld-uClibc.so.0,
+# like with the original uClibc. Therefore, we create an additional
+# symbolic link to make uClibc-ng systems work properly.
+define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
+	$(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \
+		ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \
+	fi
+	$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
+		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
+	fi
+endef
+
+TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
+TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
+
+# In fact, we don't need to download the toolchain, since it is already
+# available on the system, so force the site and source to be empty so
+# that nothing will be downloaded/extracted.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
+TOOLCHAIN_EXTERNAL_SITE =
+TOOLCHAIN_EXTERNAL_SOURCE =
+endif
+
+# 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
+
+# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
+# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
+# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
+# tools in the appropriate location.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
+ifeq ($(BR2_MIPS_OABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
+else ifeq ($(BR2_MIPS_NABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32
+else ifeq ($(BR2_MIPS_NABI64),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64
+endif
+
+define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
+	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
+	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
+	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
+endef
+endif
+
+# 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_ARM),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
 TOOLCHAIN_EXTERNAL_SOURCE = arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),y)
@@ -439,60 +765,21 @@ TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
 	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
 endif
 
-# In fact, we don't need to download the toolchain, since it is already
-# available on the system, so force the site and source to be empty so
-# that nothing will be downloaded/extracted.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
-TOOLCHAIN_EXTERNAL_SITE =
-TOOLCHAIN_EXTERNAL_SOURCE =
-endif
-
-TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
-
-TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
-
 # Normal handling of downloaded toolchain tarball extraction.
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
 TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
 
-# As a regular package, the toolchain gets extracted in $(@D), but
-# since it's actually a fairly special package, we need it to be moved
-# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
-define TOOLCHAIN_EXTERNAL_MOVE
-	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
-	TOOLCHAIN_EXTERNAL_MOVE
-endif
-
-# Returns the location of the libc.a file for the given compiler + flags
-define toolchain_find_libc_a
-$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a))
-endef
-
-# Returns the sysroot location for the given compiler + flags. We need
-# to handle cases where libc.a is in:
-#
-#  - lib/
-#  - usr/lib/
-#  - lib32/
-#  - lib64/
-#  - lib32-fp/ (Cavium toolchain)
-#  - lib64-fp/ (Cavium toolchain)
-#  - usr/lib/<tuple>/ (Linaro toolchain)
-#
-# And variations on these.
-define toolchain_find_sysroot
-$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
-endef
-
-# Returns the lib subdirectory for the given compiler + flags (i.e
-# typically lib32 or lib64 for some toolchains)
-define toolchain_find_libdir
-$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
+# As a regular package, the toolchain gets extracted in $(@D), but
+# since it's actually a fairly special package, we need it to be moved
+# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
+define TOOLCHAIN_EXTERNAL_MOVE
+	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
+	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
+	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
 endef
+TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
+	TOOLCHAIN_EXTERNAL_MOVE
+endif
 
 # Checks for an already installed toolchain: check the toolchain
 # location, check that it is usable, and then verify that it
@@ -528,255 +815,6 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
 	$(Q)$(call check_toolchain_ssp,$(TOOLCHAIN_EXTERNAL_CC))
 endef
 
-# With the musl C library, the libc.so library directly plays the role
-# of the dynamic library loader. We just need to create a symbolic
-# link to libc.so with the appropriate name.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
-ifeq ($(BR2_i386),y)
-MUSL_ARCH = i386
-else ifeq ($(BR2_ARM_EABIHF),y)
-MUSL_ARCH = armhf
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
-MUSL_ARCH = mipsel-sf
-else ifeq ($(BR2_sh),y)
-MUSL_ARCH = sh
-else
-MUSL_ARCH = $(ARCH)
-endif
-define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-	ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-endif
-
-# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib.
-# Note: the skeleton package additionally creates lib32->lib or lib64->lib
-# (as appropriate)
-#
-# $1: destination directory (TARGET_DIR / STAGING_DIR)
-create_lib_symlinks = \
-       $(Q)DESTDIR="$(strip $1)" ; \
-       ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-       if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \
-               ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
-               ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
-       fi
-
-define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
-       $(call create_lib_symlinks,$(STAGING_DIR))
-endef
-
-define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
-       $(call create_lib_symlinks,$(TARGET_DIR))
-endef
-
-# Integration of the toolchain into Buildroot: find the main sysroot
-# and the variant-specific sysroot, then copy the needed libraries to
-# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers)
-# to $(STAGING_DIR).
-#
-# Variables are defined as follows:
-#
-#  LIBC_A_LOCATION:     location of the libc.a file in the default
-#                       multilib variant (allows to find the main
-#                       sysroot directory)
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/usr/lib/libc.a
-#
-#  SYSROOT_DIR:         the main sysroot directory, deduced from
-#                       LIBC_A_LOCATION by removing the
-#                       usr/lib[32|64]/libc.a part of the path.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/
-#
-# ARCH_LIBC_A_LOCATION: location of the libc.a file in the selected
-#                       multilib variant (taking into account the
-#                       CFLAGS). Allows to find the sysroot of the
-#                       selected multilib variant.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/libc.a
-#
-# ARCH_SYSROOT_DIR:     the sysroot of the selected multilib variant,
-#                       deduced from ARCH_LIBC_A_LOCATION by removing
-#                       usr/lib[32|64]/libc.a at the end of the path.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/
-#
-# ARCH_LIB_DIR:         'lib', 'lib32' or 'lib64' depending on where libraries
-#                       are stored. Deduced from ARCH_LIBC_A_LOCATION by
-#                       looking at usr/lib??/libc.a.
-#                       Ex: lib
-#
-# ARCH_SUBDIR:          the relative location of the sysroot of the selected
-#                       multilib variant compared to the main sysroot.
-#			Ex: mips16/soft-float/el
-#
-# SUPPORT_LIB_DIR:      some toolchains, such as recent Linaro toolchains,
-#                       store GCC support libraries (libstdc++,
-#                       libgcc_s, etc.) outside of the sysroot. In
-#                       this case, SUPPORT_LIB_DIR is set to a
-#                       non-empty value, and points to the directory
-#                       where these support libraries are
-#                       available. Those libraries will be copied to
-#                       our sysroot, and the directory will also be
-#                       considered when searching libraries for copy
-#                       to the target filesystem.
-#
-# Please be very careful to check the major toolchain sources:
-# Buildroot, Crosstool-NG, CodeSourcery and Linaro
-# before doing any modification on the below logic.
-
-ifeq ($(BR2_STATIC_LIBS),)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS
-	$(Q)$(call MESSAGE,"Copying external toolchain libraries to target...")
-	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$$libs); \
-	done
-endef
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER
-	$(Q)$(call MESSAGE,"Copying gdbserver")
-	$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	gdbserver_found=0 ; \
-	for d in $${ARCH_SYSROOT_DIR}/usr \
-		 $${ARCH_SYSROOT_DIR}/../debug-root/usr \
-		 $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
-		 $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \
-		if test -f $${d}/bin/gdbserver ; then \
-			install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
-			gdbserver_found=1 ; \
-			break ; \
-		fi ; \
-	done ; \
-	if [ $${gdbserver_found} -eq 0 ] ; then \
-		echo "Could not find gdbserver in external toolchain" ; \
-		exit 1 ; \
-	fi
-endef
-endif
-
-define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
-	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
-	ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	SUPPORT_LIB_DIR="" ; \
-	if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
-		LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
-		if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \
-			SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
-		fi ; \
-	fi ; \
-	if [ "$${SYSROOT_DIR}" == "$${ARCH_SYSROOT_DIR}" ] ; then \
-		ARCH_SUBDIR="" ; \
-	elif [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \
-		SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \
-		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \
-	else \
-		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
-	fi ; \
-	$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
-	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
-endef
-
-# Special installation target used on the Blackfin architecture when
-# FDPIC is not the primary binary format being used, but the user has
-# nonetheless requested the installation of the FDPIC libraries to the
-# target filesystem.
-ifeq ($(BR2_BFIN_INSTALL_FDPIC_SHARED),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC
-	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to staging...")
-	$(Q)FDPIC_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))/../../bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc ; \
-	FDPIC_SYSROOT_DIR="$(call toolchain_find_sysroot,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	FDPIC_LIB_DIR="$(call toolchain_find_libdir,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	FDPIC_SUPPORT_LIB_DIR="" ; \
-	if test `find $${FDPIC_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
-	        FDPIC_LIBSTDCPP_A_LOCATION=$$(LANG=C $${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
-	        if [ -e "$${FDPIC_LIBSTDCPP_A_LOCATION}" ]; then \
-	                FDPIC_SUPPORT_LIB_DIR=`readlink -f $${FDPIC_LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
-	        fi ; \
-	fi ; \
-	$(call copy_toolchain_sysroot,$${FDPIC_SYSROOT_DIR},$${FDPIC_SYSROOT_DIR},,$${FDPIC_LIB_DIR},$${FDPIC_SUPPORT_LIB_DIR})
-endef
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC
-	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...")
-	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$$libs); \
-	done
-endef
-endif
-
-# Special installation target used on the Blackfin architecture when
-# shared FLAT is not the primary format being used, but the user has
-# nonetheless requested the installation of the shared FLAT libraries
-# to the target filesystem. The flat libraries are found and linked
-# according to the index in name "libN.so". Index 1 is reserved for
-# the standard C library. Customer libraries can use 4 and above.
-ifeq ($(BR2_BFIN_INSTALL_FLAT_SHARED),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT
-	$(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...")
-	$(Q)FLAT_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))../../bfin-uclinux/bin/bfin-uclinux-gcc ; \
-	FLAT_LIBC_A_LOCATION=`$${FLAT_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -mid-shared-library -print-file-name=libc`; \
-	if [ -f $${FLAT_LIBC_A_LOCATION} -a ! -h $${FLAT_LIBC_A_LOCATION} ] ; then \
-	        $(INSTALL) -D $${FLAT_LIBC_A_LOCATION} $(TARGET_DIR)/lib/lib1.so; \
-	fi
-endef
-endif
-
-# Build toolchain wrapper for preprocessor, C, C++ and Fortran compilers
-# and setup symlinks for everything else. Skip gdb symlink when we are
-# building our own gdb to prevent two gdb's in output/host/usr/bin.
-# The LTO support in gcc creates wrappers for ar, ranlib and nm which load
-# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and
-# *-gcc-nm and should be used instead of the real programs when -flto is
-# used. However, we should not add the toolchain wrapper for them, and they
-# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
-# *-ranlib and *-nm.
-define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
-	$(Q)cd $(HOST_DIR)/usr/bin; \
-	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
-		base=$${i##*/}; \
-		case "$$base" in \
-		*-ar|*-ranlib|*-nm) \
-			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			;; \
-		*cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \
-			ln -sf toolchain-wrapper $$base; \
-			;; \
-		*gdb|*gdbtui) \
-			if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \
-				ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			fi \
-			;; \
-		*) \
-			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			;; \
-		esac; \
-	done
-endef
-
-#
-# Generate gdbinit file for use with Buildroot
-#
-define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
-	$(Q)if test -f $(TARGET_CROSS)gdb ; then \
-		$(call MESSAGE,"Installing gdbinit"); \
-		$(gen_gdbinit_file); \
-	fi
-endef
-
-# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not
-# patched specifically for uClibc-ng, so it continues to generate
-# binaries that expect the dynamic loader to be named ld-uClibc.so.0,
-# like with the original uClibc. Therefore, we create an additional
-# symbolic link to make uClibc-ng systems work properly.
-define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
-	$(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \
-		ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \
-	fi
-	$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
-		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
-	fi
-endef
-
 TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_WRAPPER_BUILD)
 
 define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
-- 
2.10.2

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

* [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk Arnout Vandecappelle
@ 2016-11-07  1:19 ` Arnout Vandecappelle
  2016-11-07 21:34   ` Romain Naour
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package Arnout Vandecappelle
                   ` (20 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:19 UTC (permalink / raw)
  To: buildroot

pkg-toolchain-external.mk will be used later to define the
toolchain-external-package infra. Most of the variable and macro
definitions are shared with the legacy generic-package based
toolchain-external. Move these to pkg-toolchain-external.mk.

pkg-toolchain-external.mk is included implicitly by the include
toolchain/*/*.mk in the top-level Makefile. The order of inclusion is
not defined, but that doesn't matter because none of the variables
defined in pkg-toolchain-external.mk are used in conditions or in
rules in toolchain-external.mk, only in recursively-expanded
variables.

No functional changes at all. The output of 'make -qp' hasn't changed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
[Arnout: split off into separate patch]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: split off into separate patch [Arnout]
---
 ...chain-external.mk => pkg-toolchain-external.mk} | 288 +----------
 toolchain/toolchain-external/toolchain-external.mk | 570 +--------------------
 2 files changed, 11 insertions(+), 847 deletions(-)
 copy toolchain/toolchain-external/{toolchain-external.mk => pkg-toolchain-external.mk} (62%)

diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
similarity index 62%
copy from toolchain/toolchain-external/toolchain-external.mk
copy to toolchain/toolchain-external/pkg-toolchain-external.mk
index 180a63d..583b0d6 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -1,16 +1,12 @@
 ################################################################################
+# External toolchain package infrastructure
 #
-# toolchain-external
-#
-################################################################################
-
-#
-# This package implements the support for external toolchains, i.e
-# toolchains that are available pre-built, ready to use. Such toolchain
-# may either be readily available on the Web (Linaro, Sourcery
-# CodeBench, from processor vendors) or may be built with tools like
-# Crosstool-NG or Buildroot itself. So far, we have tested this
-# with:
+# This package infrastructure implements the support for external
+# toolchains, i.e toolchains that are available pre-built, ready to
+# use. Such toolchain may either be readily available on the Web
+# (Linaro, Sourcery CodeBench, from processor vendors) or may be built
+# with tools like Crosstool-NG or Buildroot itself. So far, we have
+# tested this with:
 #
 #  * Toolchains generated by Crosstool-NG
 #  * Toolchains generated by Buildroot
@@ -62,6 +58,7 @@
 #  This toolchain wrapper and symlinks are installed into
 #  $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest
 #  of Buildroot is handled identical for the 2 toolchain types.
+################################################################################
 
 #
 # Definitions of where the toolchain can be found
@@ -571,272 +568,3 @@ define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
 		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
 	fi
 endef
-
-TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
-TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
-
-# In fact, we don't need to download the toolchain, since it is already
-# available on the system, so force the site and source to be empty so
-# that nothing will be downloaded/extracted.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
-TOOLCHAIN_EXTERNAL_SITE =
-TOOLCHAIN_EXTERNAL_SOURCE =
-endif
-
-# 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
-
-# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
-# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
-# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
-# tools in the appropriate location.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
-ifeq ($(BR2_MIPS_OABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
-else ifeq ($(BR2_MIPS_NABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32
-else ifeq ($(BR2_MIPS_NABI64),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64
-endif
-
-define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
-	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
-	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
-endef
-endif
-
-# 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_ARM),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
-TOOLCHAIN_EXTERNAL_SOURCE = arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
-define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(@D)/arago-2011.09/armv7a/* $(@D)/
-	rm -rf $(@D)/arago-2011.09/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE),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
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
-define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(@D)/arago-2011.09/armv5te/* $(@D)/
-	rm -rf $(@D)/arago-2011.09/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/arm-linux-gnueabihf
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
-endif
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/armeb-linux-gnueabihf
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
-endif
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),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 = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
-endif
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
-	ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
-define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
-	ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
-TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
-TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-ifeq ($(BR2_arm)$(BR2_ARM_EABI),yy)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_arm)$(BR2_ARM_EABIHF),yy)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabihf-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_armeb),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-armeb-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_i386),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-i486-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mips),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mips-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-sf-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_powerpc),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-powerpc-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_sh4),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_sh4eb),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4eb-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_x86_64),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-x86_64-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-endif
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y)
-TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12
-ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
-TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = arc700
-else
-TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = archs
-endif
-ifeq ($(BR2_arcle),y)
-TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = le
-else
-TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
-endif
-TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
-else
-# Custom toolchain
-TOOLCHAIN_EXTERNAL_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
-TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
-# We can't check hashes for custom downloaded toolchains
-BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
-endif
-
-# Some toolchain vendors have a regular file naming pattern.
-# For them, mass-define _ACTUAL_SOURCE_TARBALL based _SITE.
-ifneq ($(findstring sourcery.mentor.com/public/gnu_toolchain,$(TOOLCHAIN_EXTERNAL_SITE)),)
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
-	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
-endif
-
-# Normal handling of downloaded toolchain tarball extraction.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
-TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
-
-# As a regular package, the toolchain gets extracted in $(@D), but
-# since it's actually a fairly special package, we need it to be moved
-# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
-define TOOLCHAIN_EXTERNAL_MOVE
-	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
-	TOOLCHAIN_EXTERNAL_MOVE
-endif
-
-# Checks for an already installed toolchain: check the toolchain
-# location, check that it is usable, and then verify that it
-# matches the configuration provided in Buildroot: ABI, C++ support,
-# kernel headers version, type of C library and all C library features.
-define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
-	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
-	$(Q)$(call check_unusable_toolchain,$(TOOLCHAIN_EXTERNAL_CC))
-	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
-	$(call check_kernel_headers_version,\
-		$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
-		$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
-	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
-		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
-	if test "$(BR2_arm)" = "y" ; then \
-		$(call check_arm_abi,\
-			"$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
-			$(TOOLCHAIN_EXTERNAL_READELF)) ; \
-	fi ; \
-	if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
-		$(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
-	fi ; \
-	if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
-		$(call check_fortran,$(TOOLCHAIN_EXTERNAL_FC)) ; \
-	fi ; \
-	if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
-		$(call check_uclibc,$${SYSROOT_DIR}) ; \
-	elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
-		$(call check_musl,$${SYSROOT_DIR}) ; \
-	else \
-		$(call check_glibc,$${SYSROOT_DIR}) ; \
-	fi
-	$(Q)$(call check_toolchain_ssp,$(TOOLCHAIN_EXTERNAL_CC))
-endef
-
-TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_WRAPPER_BUILD)
-
-define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
-	$(TOOLCHAIN_WRAPPER_INSTALL)
-	$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
-endef
-
-# Even though we're installing things in both the staging, the host
-# and the target directory, we do everything within the
-# install-staging step, arbitrarily.
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
-	$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT)
-	$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
-endef
-
-$(eval $(generic-package))
-
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 180a63d..be1b5e4 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -4,573 +4,9 @@
 #
 ################################################################################
 
-#
-# This package implements the support for external toolchains, i.e
-# toolchains that are available pre-built, ready to use. Such toolchain
-# may either be readily available on the Web (Linaro, Sourcery
-# CodeBench, from processor vendors) or may be built with tools like
-# Crosstool-NG or Buildroot itself. So far, we have tested this
-# with:
-#
-#  * Toolchains generated by Crosstool-NG
-#  * Toolchains generated by Buildroot
-#  * Toolchains provided by Linaro for the ARM and AArch64
-#    architectures
-#  * Sourcery CodeBench toolchains (from Mentor Graphics) for the ARM,
-#    MIPS, PowerPC, x86, x86_64 and NIOS 2 architectures. For the MIPS
-#    toolchain, the -muclibc variant isn't supported yet, only the
-#    default glibc-based variant is.
-#  * Analog Devices toolchains for the Blackfin architecture
-#  * Xilinx toolchains for the Microblaze architecture
-#  * Synopsys DesignWare toolchains for ARC cores
-#
-# The basic principle is the following
-#
-#  1. If the toolchain is not pre-installed, download and extract it
-#  in $(TOOLCHAIN_EXTERNAL_INSTALL_DIR). Otherwise,
-#  $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) points to were the toolchain has
-#  already been installed by the user.
-#
-#  2. For all external toolchains, perform some checks on the
-#  conformity between the toolchain configuration described in the
-#  Buildroot menuconfig system, and the real configuration of the
-#  external toolchain. This is for example important to make sure that
-#  the Buildroot configuration system knows whether the toolchain
-#  supports RPC, IPv6, locales, large files, etc. Unfortunately, these
-#  things cannot be detected automatically, since the value of these
-#  options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at
-#  configuration time because these options are used as dependencies
-#  for other options. And at configuration time, we are not able to
-#  retrieve the external toolchain configuration.
-#
-#  3. Copy the libraries needed at runtime to the target directory,
-#  $(TARGET_DIR). Obviously, things such as the C library, the dynamic
-#  loader and a few other utility libraries are needed if dynamic
-#  applications are to be executed on the target system.
-#
-#  4. Copy the libraries and headers to the staging directory. This
-#  will allow all further calls to gcc to be made using --sysroot
-#  $(STAGING_DIR), which greatly simplifies the compilation of the
-#  packages when using external toolchains. So in the end, only the
-#  cross-compiler binaries remains external, all libraries and headers
-#  are imported into the Buildroot tree.
-#
-#  5. Build a toolchain wrapper which executes the external toolchain
-#  with a number of arguments (sysroot/march/mtune/..) hardcoded,
-#  so we're sure the correct configuration is always used and the
-#  toolchain behaves similar to an internal toolchain.
-#  This toolchain wrapper and symlinks are installed into
-#  $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest
-#  of Buildroot is handled identical for the 2 toolchain types.
-
-#
-# Definitions of where the toolchain can be found
-#
-
-TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))
-TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
-TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-else
-TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH))
-endif
-
-ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),)
-ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),)
-# if no path set, figure it out from path
-TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc))
-endif
-else
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),y)
-TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin
-else
-TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin
-endif
-endif
-
-# If this is a buildroot toolchain, it already has a wrapper which we want to
-# bypass. Since this is only evaluated after it has been extracted, we can use
-# $(wildcard ...) here.
-TOOLCHAIN_EXTERNAL_SUFFIX = \
-	$(if $(wildcard $(TOOLCHAIN_EXTERNAL_BIN)/*.br_real),.br_real)
-
-TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)-
-TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX)
-TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX)
-TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
-TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
-
-
-#
-# Definitions of the list of libraries that should be copied to the target.
-#
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
-TOOLCHAIN_EXTERNAL_LIBS += libatomic.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.*
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_ARM_EABIHF),yy)
-TOOLCHAIN_EXTERNAL_LIBS += ld-linux-armhf.so.*
-else
-TOOLCHAIN_EXTERNAL_LIBS += ld*.so.*
-endif
-ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
-TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.*
-ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),)
-TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.*
-endif # gdbserver
-endif # ! no threads
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
-TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* libmvec.so.*
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
-TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.*
-endif
-
-ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
-TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.*
-endif
-
-ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
-TOOLCHAIN_EXTERNAL_LIBS += libgfortran.so.*
-# fortran needs quadmath on x86 and x86_64
-ifeq ($(BR2_TOOLCHAIN_HAS_LIBQUADMATH),y)
-TOOLCHAIN_EXTERNAL_LIBS += libquadmath.so*
-endif
-endif
-
-TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
-
-
-#
-# Definition of the CFLAGS to use with the external toolchain, as well as the
-# common toolchain wrapper build arguments
-#
-ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),)
-CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU))
-else
-CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION))
-endif
-CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH))
-CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI))
-CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU))
-CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
-CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE))
-
-# march/mtune/floating point mode needs to be passed to the external toolchain
-# to select the right multilib variant
-ifeq ($(BR2_x86_64),y)
-TOOLCHAIN_EXTERNAL_CFLAGS += -m64
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_64
-endif
-ifneq ($(CC_TARGET_ARCH_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"'
-endif
-ifneq ($(CC_TARGET_CPU_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"'
-endif
-ifneq ($(CC_TARGET_ABI_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
-endif
-ifneq ($(CC_TARGET_FPU_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"'
-endif
-ifneq ($(CC_TARGET_FLOAT_ABI_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(CC_TARGET_FLOAT_ABI_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(CC_TARGET_FLOAT_ABI_)"'
-endif
-ifneq ($(CC_TARGET_MODE_),)
-TOOLCHAIN_EXTERNAL_CFLAGS += -m$(CC_TARGET_MODE_)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MODE='"$(CC_TARGET_MODE_)"'
-endif
-ifeq ($(BR2_BINFMT_FLAT),y)
-TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_BINFMT_FLAT
-endif
-ifeq ($(BR2_mipsel)$(BR2_mips64el),y)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN
-TOOLCHAIN_EXTERNAL_CFLAGS += -EL
-endif
-ifeq ($(BR2_mips)$(BR2_mips64),y)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN
-TOOLCHAIN_EXTERNAL_CFLAGS += -EB
-endif
-ifeq ($(BR2_arceb),y)
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARC_TARGET_BIG_ENDIAN
-TOOLCHAIN_EXTERNAL_CFLAGS += -EB
-endif
-
-TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
-
-ifeq ($(BR2_SOFT_FLOAT),y)
-TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
-endif
-
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"'
-
-ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),)
-# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"'
-else
-# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path
-TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \
-	-DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"'
-endif
-
-
-#
-# The following functions creates the symbolic links needed to get the
-# cross-compilation tools visible in $(HOST_DIR)/usr/bin. Some of
-# links are done directly to the corresponding tool in the external
-# toolchain installation directory, while some other links are done to
-# the toolchain wrapper (preprocessor, C, C++ and Fortran compiler)
-#
-# We skip gdb symlink when we are building our own gdb to prevent two
-# gdb's in $(HOST_DIR)/usr/bin.
-#
-# The LTO support in gcc creates wrappers for ar, ranlib and nm which load
-# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and
-# *-gcc-nm and should be used instead of the real programs when -flto is
-# used. However, we should not add the toolchain wrapper for them, and they
-# match the *cc-* pattern. Therefore, an additional case is added for *-ar,
-# *-ranlib and *-nm.
-define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
-	$(Q)cd $(HOST_DIR)/usr/bin; \
-	for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \
-		base=$${i##*/}; \
-		case "$$base" in \
-		*-ar|*-ranlib|*-nm) \
-			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			;; \
-		*cc|*cc-*|*++|*++-*|*cpp|*-gfortran) \
-			ln -sf toolchain-wrapper $$base; \
-			;; \
-		*gdb|*gdbtui) \
-			if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \
-				ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			fi \
-			;; \
-		*) \
-			ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \
-			;; \
-		esac; \
-	done
-endef
-
-
-# Various utility functions used by the external toolchain package
-# infrastructure. Those functions are mainly responsible for:
-#
-#   - installation the toolchain libraries to $(TARGET_DIR)
-#   - copying the toolchain sysroot to $(STAGING_DIR)
-#   - installing a gdbinit file
-#
-# Details about sysroot directory selection.
-#
-# To find the sysroot directory, we use the trick of looking for the
-# 'libc.a' file with the -print-file-name gcc option, and then
-# mangling the path to find the base directory of the sysroot.
-#
-# Note that we do not use the -print-sysroot option, because it is
-# only available since gcc 4.4.x, and we only recently dropped support
-# for 4.2.x and 4.3.x.
-#
-# When doing this, we don't pass any option to gcc that could select a
-# multilib variant (such as -march) as we want the "main" sysroot,
-# which contains all variants of the C library in the case of multilib
-# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the
-# path of the cross-compiler, without the --sysroot=$(STAGING_DIR),
-# since what we want to find is the location of the original toolchain
-# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR.
-#
-# Then, multilib toolchains are a little bit more complicated, since
-# they in fact have multiple sysroots, one for each variant supported
-# by the toolchain. So we need to find the particular sysroot we're
-# interested in.
-#
-# To do so, we ask the compiler where its sysroot is by passing all
-# flags (including -march and al.), except the --sysroot flag since we
-# want to the compiler to tell us where its original sysroot
-# is. ARCH_SUBDIR will contain the subdirectory, in the main
-# SYSROOT_DIR, that corresponds to the selected architecture
-# variant. ARCH_SYSROOT_DIR will contain the full path to this
-# location.
-#
-# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The
-# fact is that in multilib toolchains, the header files are often only
-# present in the main sysroot, and only the libraries are available in
-# each variant-specific sysroot directory.
-
-
-# toolchain_find_sysroot returns the sysroot location for the given
-# compiler + flags. We need to handle cases where libc.a is in:
-#
-#  - lib/
-#  - usr/lib/
-#  - lib32/
-#  - lib64/
-#  - lib32-fp/ (Cavium toolchain)
-#  - lib64-fp/ (Cavium toolchain)
-#  - usr/lib/<tuple>/ (Linaro toolchain)
-#
-# And variations on these.
-define toolchain_find_sysroot
-$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::')
-endef
-
-# Returns the lib subdirectory for the given compiler + flags (i.e
-# typically lib32 or lib64 for some toolchains)
-define toolchain_find_libdir
-$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:')
-endef
-
-# Returns the location of the libc.a file for the given compiler + flags
-define toolchain_find_libc_a
-$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a))
-endef
-
-# Integration of the toolchain into Buildroot: find the main sysroot
-# and the variant-specific sysroot, then copy the needed libraries to
-# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers)
-# to $(STAGING_DIR).
-#
-# Variables are defined as follows:
-#
-#  LIBC_A_LOCATION:     location of the libc.a file in the default
-#                       multilib variant (allows to find the main
-#                       sysroot directory)
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/usr/lib/libc.a
-#
-#  SYSROOT_DIR:         the main sysroot directory, deduced from
-#                       LIBC_A_LOCATION by removing the
-#                       usr/lib[32|64]/libc.a part of the path.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/
-#
-# ARCH_LIBC_A_LOCATION: location of the libc.a file in the selected
-#                       multilib variant (taking into account the
-#                       CFLAGS). Allows to find the sysroot of the
-#                       selected multilib variant.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/libc.a
-#
-# ARCH_SYSROOT_DIR:     the sysroot of the selected multilib variant,
-#                       deduced from ARCH_LIBC_A_LOCATION by removing
-#                       usr/lib[32|64]/libc.a at the end of the path.
-#                       Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/
-#
-# ARCH_LIB_DIR:         'lib', 'lib32' or 'lib64' depending on where libraries
-#                       are stored. Deduced from ARCH_LIBC_A_LOCATION by
-#                       looking at usr/lib??/libc.a.
-#                       Ex: lib
-#
-# ARCH_SUBDIR:          the relative location of the sysroot of the selected
-#                       multilib variant compared to the main sysroot.
-#			Ex: mips16/soft-float/el
-#
-# SUPPORT_LIB_DIR:      some toolchains, such as recent Linaro toolchains,
-#                       store GCC support libraries (libstdc++,
-#                       libgcc_s, etc.) outside of the sysroot. In
-#                       this case, SUPPORT_LIB_DIR is set to a
-#                       non-empty value, and points to the directory
-#                       where these support libraries are
-#                       available. Those libraries will be copied to
-#                       our sysroot, and the directory will also be
-#                       considered when searching libraries for copy
-#                       to the target filesystem.
-#
-# Please be very careful to check the major toolchain sources:
-# Buildroot, Crosstool-NG, CodeSourcery and Linaro
-# before doing any modification on the below logic.
-
-ifeq ($(BR2_STATIC_LIBS),)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS
-	$(Q)$(call MESSAGE,"Copying external toolchain libraries to target...")
-	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$$libs); \
-	done
-endef
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER
-	$(Q)$(call MESSAGE,"Copying gdbserver")
-	$(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	gdbserver_found=0 ; \
-	for d in $${ARCH_SYSROOT_DIR}/usr \
-		 $${ARCH_SYSROOT_DIR}/../debug-root/usr \
-		 $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \
-		 $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \
-		if test -f $${d}/bin/gdbserver ; then \
-			install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \
-			gdbserver_found=1 ; \
-			break ; \
-		fi ; \
-	done ; \
-	if [ $${gdbserver_found} -eq 0 ] ; then \
-		echo "Could not find gdbserver in external toolchain" ; \
-		exit 1 ; \
-	fi
-endef
-endif
-
-define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS
-	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
-	ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	SUPPORT_LIB_DIR="" ; \
-	if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
-		LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
-		if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \
-			SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
-		fi ; \
-	fi ; \
-	if [ "$${SYSROOT_DIR}" == "$${ARCH_SYSROOT_DIR}" ] ; then \
-		ARCH_SUBDIR="" ; \
-	elif [ "`dirname $${ARCH_SYSROOT_DIR}`" = "`dirname $${SYSROOT_DIR}`" ] ; then \
-		SYSROOT_DIR_DIRNAME=`dirname $${SYSROOT_DIR}`/ ; \
-		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR_DIRNAME}(.*)/$$:\1:"` ; \
-	else \
-		ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
-	fi ; \
-	$(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \
-	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR})
-endef
-
-# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib.
-# Note: the skeleton package additionally creates lib32->lib or lib64->lib
-# (as appropriate)
-#
-# $1: destination directory (TARGET_DIR / STAGING_DIR)
-create_lib_symlinks = \
-       $(Q)DESTDIR="$(strip $1)" ; \
-       ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-       if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \
-               ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \
-               ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \
-       fi
-
-define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK
-       $(call create_lib_symlinks,$(STAGING_DIR))
-endef
-
-define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK
-       $(call create_lib_symlinks,$(TARGET_DIR))
-endef
-
-#
-# Generate gdbinit file for use with Buildroot
-#
-define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT
-	$(Q)if test -f $(TARGET_CROSS)gdb ; then \
-		$(call MESSAGE,"Installing gdbinit"); \
-		$(gen_gdbinit_file); \
-	fi
-endef
-
-# Various utility functions used by the external toolchain based on musl.
-
-# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
-# So, add the musl-compat-headers package that will install those files,
-# into the staging directory:
-#   sys/queue.h:  header from NetBSD
-#   sys/cdefs.h:  minimalist header bundled in Buildroot
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
-endif
-
-# With the musl C library, the libc.so library directly plays the role
-# of the dynamic library loader. We just need to create a symbolic
-# link to libc.so with the appropriate name.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
-ifeq ($(BR2_i386),y)
-MUSL_ARCH = i386
-else ifeq ($(BR2_ARM_EABIHF),y)
-MUSL_ARCH = armhf
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
-MUSL_ARCH = mipsel-sf
-else ifeq ($(BR2_sh),y)
-MUSL_ARCH = sh
-else
-MUSL_ARCH = $(ARCH)
-endif
-define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-	ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-endif
-
-#
-# Various functions used by the external toolchain package
-# infrastructure to handle the Blackfin specific
-# BR2_BFIN_INSTALL_FDPIC_SHARED and BR2_BFIN_INSTALL_FLAT_SHARED
-# options.
-#
-
-# Special installation target used on the Blackfin architecture when
-# FDPIC is not the primary binary format being used, but the user has
-# nonetheless requested the installation of the FDPIC libraries to the
-# target filesystem.
-ifeq ($(BR2_BFIN_INSTALL_FDPIC_SHARED),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC
-	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to staging...")
-	$(Q)FDPIC_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))/../../bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc ; \
-	FDPIC_SYSROOT_DIR="$(call toolchain_find_sysroot,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	FDPIC_LIB_DIR="$(call toolchain_find_libdir,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \
-	FDPIC_SUPPORT_LIB_DIR="" ; \
-	if test `find $${FDPIC_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \
-	        FDPIC_LIBSTDCPP_A_LOCATION=$$(LANG=C $${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \
-	        if [ -e "$${FDPIC_LIBSTDCPP_A_LOCATION}" ]; then \
-	                FDPIC_SUPPORT_LIB_DIR=`readlink -f $${FDPIC_LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \
-	        fi ; \
-	fi ; \
-	$(call copy_toolchain_sysroot,$${FDPIC_SYSROOT_DIR},$${FDPIC_SYSROOT_DIR},,$${FDPIC_LIB_DIR},$${FDPIC_SUPPORT_LIB_DIR})
-endef
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC
-	$(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...")
-	$(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$$libs); \
-	done
-endef
-endif
-
-# Special installation target used on the Blackfin architecture when
-# shared FLAT is not the primary format being used, but the user has
-# nonetheless requested the installation of the shared FLAT libraries
-# to the target filesystem. The flat libraries are found and linked
-# according to the index in name "libN.so". Index 1 is reserved for
-# the standard C library. Customer libraries can use 4 and above.
-ifeq ($(BR2_BFIN_INSTALL_FLAT_SHARED),y)
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT
-	$(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...")
-	$(Q)FLAT_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))../../bfin-uclinux/bin/bfin-uclinux-gcc ; \
-	FLAT_LIBC_A_LOCATION=`$${FLAT_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -mid-shared-library -print-file-name=libc`; \
-	if [ -f $${FLAT_LIBC_A_LOCATION} -a ! -h $${FLAT_LIBC_A_LOCATION} ] ; then \
-	        $(INSTALL) -D $${FLAT_LIBC_A_LOCATION} $(TARGET_DIR)/lib/lib1.so; \
-	fi
-endef
-endif
-
-# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not
-# patched specifically for uClibc-ng, so it continues to generate
-# binaries that expect the dynamic loader to be named ld-uClibc.so.0,
-# like with the original uClibc. Therefore, we create an additional
-# symbolic link to make uClibc-ng systems work properly.
-define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
-	$(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \
-		ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \
-	fi
-	$(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \
-		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
-	fi
-endef
+# All the definition that are common between the toolchain-external
+# generic package and the toolchain-external-package infrastructure
+# can be found in pkg-toolchain-external.mk
 
 TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
 TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
-- 
2.10.2

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (2 preceding siblings ...)
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk Arnout Vandecappelle
@ 2016-11-07  1:19 ` Arnout Vandecappelle
  2016-11-07 22:16   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package Arnout Vandecappelle
                   ` (19 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:19 UTC (permalink / raw)
  To: buildroot

The toolchain-external-package infrastructure is just a copy of the
toolchain-external commands, replacing TOOLCHAIN_EXTERNAL by $(2)
and adding double-dollars everywhere.

toolchain-external itself is converted to a virtual package, but it
is faked a little to make sue the toolchains that haven't been
converted to toolchain-external-package yet keep on working.

The TOOLCHAIN_EXTERNAL_MOVE commands don't have to be redefined
for every toolchain-external-package instance, so that is moved
out into the common part of pkg-toolchain-external.mk.

The musl-compat-headers dependency stays in the toolchain-external
package itself.

The musl ld link is duplicated in the legacy toolchain-external and
the toolchain-external-package, because they have separate hooks.

The handling of TOOLCHAIN_EXTERNAL_BIN deserves some special attention,
because its value will be different for different
toolchain-external-package instances. However, the value only depends
on variables that are set by Kconfig (BR2_TOOLCHAIN_EXTERNAL_PREFIX
and BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD) so it can easily be used in
the generic part. So we don't have to do anything specific for this
variable after all.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Romain Naour <romain.naour@gmail.com>
---
v4: Move all variables out of the toolchain-external-package infra,
    except for those that are explicitly needed by that infra.
---
 toolchain/toolchain-external/Config.in             |   8 ++
 .../toolchain-external/pkg-toolchain-external.mk   | 124 +++++++++++++++++++--
 toolchain/toolchain-external/toolchain-external.mk |  48 ++++++--
 3 files changed, 159 insertions(+), 21 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 5324599..65a4216 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -667,6 +667,14 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL
 	# Compatibility headers: cdefs.h, queue.h
 	select BR2_PACKAGE_MUSL_COMPAT_HEADERS
 
+# Make sure the virtual-package infra checks the provider
+config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
+	bool
+	default y
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	string
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
index 583b0d6..3cac520 100644
--- a/toolchain/toolchain-external/pkg-toolchain-external.mk
+++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
@@ -98,6 +98,17 @@ TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFF
 TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
 TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
 
+# Normal handling of downloaded toolchain tarball extraction.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
+# As a regular package, the toolchain gets extracted in $(@D), but
+# since it's actually a fairly special package, we need it to be moved
+# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
+define TOOLCHAIN_EXTERNAL_MOVE
+	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
+	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
+	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
+endef
+endif
 
 #
 # Definitions of the list of libraries that should be copied to the target.
@@ -474,15 +485,6 @@ endef
 
 # Various utility functions used by the external toolchain based on musl.
 
-# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
-# So, add the musl-compat-headers package that will install those files,
-# into the staging directory:
-#   sys/queue.h:  header from NetBSD
-#   sys/cdefs.h:  minimalist header bundled in Buildroot
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
-endif
-
 # With the musl C library, the libc.so library directly plays the role
 # of the dynamic library loader. We just need to create a symbolic
 # link to libc.so with the appropriate name.
@@ -501,7 +503,6 @@ endif
 define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
 	ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
 endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
 endif
 
 #
@@ -568,3 +569,106 @@ define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
 		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
 	fi
 endef
+
+
+################################################################################
+# inner-toolchain-external-package -- defines the generic installation rules
+# for external toolchain packages
+#
+#  argument 1 is the lowercase package name
+#  argument 2 is the uppercase package name, including a HOST_ prefix
+#             for host packages
+#  argument 3 is the uppercase package name, without the HOST_ prefix
+#             for host packages
+#  argument 4 is the type (target or host)
+################################################################################
+define inner-toolchain-external-package
+
+$(2)_INSTALL_STAGING = YES
+$(2)_ADD_TOOLCHAIN_DEPENDENCY = NO
+
+# In fact, we don't need to download the toolchain, since it is already
+# available on the system, so force the site and source to be empty so
+# that nothing will be downloaded/extracted.
+ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
+$(2)_SITE =
+$(2)_SOURCE =
+endif
+
+ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
+$(2)_EXCLUDES = usr/lib/locale/*
+
+$(2)_POST_EXTRACT_HOOKS += \
+	TOOLCHAIN_EXTERNAL_MOVE
+endif
+
+# Checks for an already installed toolchain: check the toolchain
+# location, check that it is usable, and then verify that it
+# matches the configuration provided in Buildroot: ABI, C++ support,
+# kernel headers version, type of C library and all C library features.
+define $(2)_CONFIGURE_CMDS
+	$$(Q)$$(call check_cross_compiler_exists,$$(TOOLCHAIN_EXTERNAL_CC))
+	$$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
+	$$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
+	$$(call check_kernel_headers_version,\
+		$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
+		$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
+	$$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\
+		$$(call qstrip,$$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
+	if test "$$(BR2_arm)" = "y" ; then \
+		$$(call check_arm_abi,\
+			"$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)",\
+			$$(TOOLCHAIN_EXTERNAL_READELF)) ; \
+	fi ; \
+	if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
+		$$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \
+	fi ; \
+	if test "$$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
+		$$(call check_fortran,$$(TOOLCHAIN_EXTERNAL_FC)) ; \
+	fi ; \
+	if test "$$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
+		$$(call check_uclibc,$$$${SYSROOT_DIR}) ; \
+	elif test "$$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
+		$$(call check_musl,$$$${SYSROOT_DIR}) ; \
+	else \
+		$$(call check_glibc,$$$${SYSROOT_DIR}) ; \
+	fi
+	$$(Q)$$(call check_toolchain_ssp,$$(TOOLCHAIN_EXTERNAL_CC))
+endef
+
+$(2)_TOOLCHAIN_WRAPPER_ARGS += $$(TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS)
+
+$(2)_BUILD_CMDS = $$(TOOLCHAIN_WRAPPER_BUILD)
+
+define $(2)_INSTALL_STAGING_CMDS
+	$$(TOOLCHAIN_WRAPPER_INSTALL)
+	$$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
+endef
+
+ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+$(2)_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
+endif
+
+# Even though we're installing things in both the staging, the host
+# and the target directory, we do everything within the
+# install-staging step, arbitrarily.
+define $(2)_INSTALL_TARGET_CMDS
+	$$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
+	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT)
+	$$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
+endef
+
+# Call the generic package infrastructure to generate the necessary
+# make targets
+$(call inner-generic-package,$(1),$(2),$(3),$(4))
+
+endef
+
+toolchain-external-package = $(call inner-toolchain-external-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index be1b5e4..bcbcb2e 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -4,12 +4,31 @@
 #
 ################################################################################
 
+TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
+
+# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
+# So, add the musl-compat-headers package that will install those files,
+# into the staging directory:
+#   sys/queue.h:  header from NetBSD
+#   sys/cdefs.h:  minimalist header bundled in Buildroot
+ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
+TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
+endif
+
 # All the definition that are common between the toolchain-external
 # generic package and the toolchain-external-package infrastructure
 # can be found in pkg-toolchain-external.mk
 
+# Legacy toolchains that don't use the toolchain-external-package infrastructure
+# yet. We can recognise that because no provider is set.
+ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL)),)
+
+# Now we are the provider. However, we can't set it to ourselves or we'll get a
+# circular dependency. Let's set it to a target that we always depend on
+# instead.
+BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL = skeleton
+
 TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
-TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
 
 # In fact, we don't need to download the toolchain, since it is already
 # available on the system, so force the site and source to be empty so
@@ -201,18 +220,9 @@ TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
 	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
 endif
 
-# Normal handling of downloaded toolchain tarball extraction.
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
 TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
 
-# As a regular package, the toolchain gets extracted in $(@D), but
-# since it's actually a fairly special package, we need it to be moved
-# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
-define TOOLCHAIN_EXTERNAL_MOVE
-	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
-	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
-endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
 	TOOLCHAIN_EXTERNAL_MOVE
 endif
@@ -262,6 +272,10 @@ define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
 	$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
 endef
 
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
+TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
+endif
+
 # Even though we're installing things in both the staging, the host
 # and the target directory, we do everything within the
 # install-staging step, arbitrarily.
@@ -274,5 +288,17 @@ define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
 	$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
 endef
 
-$(eval $(generic-package))
+endif # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+
 
+# Since a virtual package is just a generic package, we can still
+# define commands for the legacy toolchains.
+$(eval $(virtual-package))
+
+# Ensure the external-toolchain package has a prefix defined.
+# This comes after the virtual-package definition, which checks the provider.
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
+ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),)
+$(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error)
+endif
+endif
-- 
2.10.2

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

* [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (3 preceding siblings ...)
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:23   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: " Arnout Vandecappelle
                   ` (18 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Linaro external toolchain for
the AArch64 architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 30 ++++++++++------------
 .../toolchain-external-linaro-aarch64/Config.in    | 15 +++++++++++
 .../Config.in.options                              |  9 +++++++
 .../toolchain-external-linaro-aarch64.hash         |  3 +++
 .../toolchain-external-linaro-aarch64.mk           | 16 ++++++++++++
 .../toolchain-external/toolchain-external.hash     |  4 +--
 toolchain/toolchain-external/toolchain-external.mk |  9 ++-----
 7 files changed, 59 insertions(+), 27 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 65a4216..096f435 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -8,6 +8,12 @@ choice
 comment "glibc toolchains only available with shared lib support"
 	depends on BR2_STATIC_LIBS
 
+# Kept toolchains sorted by architecture in order to use some toolchain
+# as default choice
+
+# Aarch64 (use Linaro toolchain by default)
+source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
+
 comment "Linaro toolchains available for Cortex-A + EABIhf"
 	depends on BR2_arm || BR2_armeb
 	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
@@ -485,22 +491,6 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
-	bool "Linaro AArch64 2016.05"
-	depends on BR2_aarch64
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Toolchain for the AArch64 architecture, from
-	  http://www.linaro.org/engineering/armv8/
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	bool "CodeSourcery AArch64 2014.11"
 	depends on BR2_aarch64
@@ -628,7 +618,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	default "aarch64-amd-linux-gnu"  if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
 	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
@@ -675,6 +664,13 @@ config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
 config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
 	string
 
+# Kept toolchains sorted as in the choice above
+# The toolchain Config.in.options must define
+# BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
+
+# Aarch64
+source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
new file mode 100644
index 0000000..662f7d7
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
@@ -0,0 +1,15 @@
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
+	bool "Linaro AArch64 2016.05"
+	depends on BR2_aarch64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_HAS_FORTRAN
+	help
+	  Toolchain for the AArch64 architecture, from
+	  http://www.linaro.org/engineering/armv8/
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
new file mode 100644
index 0000000..099c6c0
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "aarch64-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-linaro-aarch64"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
new file mode 100644
index 0000000..7a2c038
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d43227248f282a652da42322fcf4abfd3021f2a2f62e0cf6e242d82f55966ba9  gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
+sha256 1941dcf6229d6706bcb89b7976d5d43d170efdd17c27d5fe1738e7ecf22adc37  gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
new file mode 100644
index 0000000..a0543a7
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# toolchain-external-linaro-aarch64
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION = 2016.05
+TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)/aarch64-linux-gnu
+
+ifeq ($(HOSTARCH),x86)
+TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-i686_aarch64-linux-gnu.tar.xz
+else
+TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-x86_64_aarch64-linux-gnu.tar.xz
+endif
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 41c2ab3..fd1bc6d 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -34,13 +34,11 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
 sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
 sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
 
-# ARM and Aarch64 toolchains from Linaro
+# ARM toolchains from Linaro
 sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
 sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
 sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
 sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
-sha256 d43227248f282a652da42322fcf4abfd3021f2a2f62e0cf6e242d82f55966ba9  gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
-sha256 1941dcf6229d6706bcb89b7976d5d43d170efdd17c27d5fe1738e7ecf22adc37  gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
 
 # Codescape toolchains from Imagination Technologies
 # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index bcbcb2e..8a3e4da 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -148,13 +148,6 @@ 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 = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
-endif
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
@@ -302,3 +295,5 @@ ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),)
 $(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error)
 endif
 endif
+
+include toolchain/toolchain-external/*/*.mk
-- 
2.10.2

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

* [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (4 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:25   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: " Arnout Vandecappelle
                   ` (17 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the AArch64 architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 21 ++-------------------
 .../Config.in                                      | 17 +++++++++++++++++
 .../Config.in.options                              |  9 +++++++++
 .../toolchain-external-codesourcery-aarch64.hash   |  3 +++
 .../toolchain-external-codesourcery-aarch64.mk     | 22 ++++++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  3 ---
 toolchain/toolchain-external/toolchain-external.mk | 11 -----------
 7 files changed, 53 insertions(+), 33 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 096f435..ecf9618 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -13,6 +13,7 @@ comment "glibc toolchains only available with shared lib support"
 
 # Aarch64 (use Linaro toolchain by default)
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
 
 comment "Linaro toolchains available for Cortex-A + EABIhf"
 	depends on BR2_arm || BR2_armeb
@@ -491,24 +492,6 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
-	bool "CodeSourcery AArch64 2014.11"
-	depends on BR2_aarch64
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
-	help
-	  Sourcery CodeBench toolchain for the AArch64 architecture,
-	  from Mentor Graphics. It uses gcc 4.9.1, binutils
-	  2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers
-	  3.16.2.
-
 config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	bool "Musl 1.1.12 toolchain"
 	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
@@ -618,7 +601,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "aarch64-amd-linux-gnu"  if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
 	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
@@ -670,6 +652,7 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
 
 # Aarch64
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
new file mode 100644
index 0000000..2fbb218
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
@@ -0,0 +1,17 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
+	bool "CodeSourcery AArch64 2014.11"
+	depends on BR2_aarch64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	help
+	  Sourcery CodeBench toolchain for the AArch64 architecture,
+	  from Mentor Graphics. It uses gcc 4.9.1, binutils
+	  2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers
+	  3.16.2.
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
new file mode 100644
index 0000000..1eab839
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "aarch64-amd-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-aarch64"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
new file mode 100644
index 0000000..f7d3f29
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
+sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
new file mode 100644
index 0000000..bc58c44
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# toolchain-external-codesourcery-aarch64
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION = 2014.11-95
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SOURCE = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_ACTUAL_SOURCE_TARBALL = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
+	ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
+endef
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
+
+define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
+	ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
+endef
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index fd1bc6d..666cd02 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -21,9 +21,6 @@ sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-20
 # AMD64
 sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
 sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
-# Aarch64
-sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2
 # MIPS
 sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 8a3e4da..2571539 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -148,17 +148,6 @@ 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_CODESOURCERY_AARCH64),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
-	ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
-define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
-	ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
-endef
-TOOLCHAIN_EXTERNAL_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (5 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:26   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: " Arnout Vandecappelle
                   ` (16 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Linaro external toolchain for the
ARM architecture.

The legacy implementation is removed.

The comment about availability is duplicated for arm and armeb.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 32 +++++-----------------
 .../toolchain-external-linaro-arm/Config.in        | 27 ++++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-linaro-arm.hash             |  3 ++
 .../toolchain-external-linaro-arm.mk               | 16 +++++++++++
 .../toolchain-external/toolchain-external.hash     |  2 --
 toolchain/toolchain-external/toolchain-external.mk |  7 -----
 7 files changed, 62 insertions(+), 34 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index ecf9618..bffb9fd 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -15,34 +15,14 @@ comment "glibc toolchains only available with shared lib support"
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
 
+# ARM (use Linaro toolchain by default)
+source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
+
 comment "Linaro toolchains available for Cortex-A + EABIhf"
-	depends on BR2_arm || BR2_armeb
+	depends on BR2_armeb
 	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
 	depends on !BR2_STATIC_LIBS
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
-	bool "Linaro ARM 2016.05"
-	depends on BR2_arm
-	depends on BR2_ARM_CPU_ARMV7A
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_ARM_EABIHF
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Linaro toolchain for the ARM architecture. It uses Linaro
-	  GCC 2016.05 (based on gcc 5.3.1), Linaro GDB 2016.05 (based on
-	  GDB 7.11.1), glibc 2.21, Binutils 2016.05 (based on 2.25). It
-	  generates code that runs on all Cortex-A profile devices,
-	  but tuned for the Cortex-A9. The code generated is Thumb 2,
-	  with the hard floating point calling convention, and uses
-	  the VFPv3-D16 FPU instructions.
-
 config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	bool "Linaro armeb 2016.05"
 	depends on BR2_armeb
@@ -596,7 +576,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
 	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
-	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
 	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
@@ -654,6 +633,9 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
 
+# ARM
+source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
new file mode 100644
index 0000000..bf8649a
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
@@ -0,0 +1,27 @@
+comment "Linaro toolchains available for Cortex-A + EABIhf"
+	depends on BR2_arm
+	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
+	depends on !BR2_STATIC_LIBS
+
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
+	bool "Linaro ARM 2016.05"
+	depends on BR2_arm
+	depends on BR2_ARM_CPU_ARMV7A
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_ARM_EABIHF
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_HAS_FORTRAN
+	help
+	  Linaro toolchain for the ARM architecture. It uses Linaro
+	  GCC 2016.05 (based on gcc 5.3.1), Linaro GDB 2016.05 (based on
+	  GDB 7.11.1), glibc 2.21, Binutils 2016.05 (based on 2.25). It
+	  generates code that runs on all Cortex-A profile devices,
+	  but tuned for the Cortex-A9. The code generated is Thumb 2,
+	  with the hard floating point calling convention, and uses
+	  the VFPv3-D16 FPU instructions.
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
new file mode 100644
index 0000000..dcbc659
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "arm-linux-gnueabihf"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-linaro-arm"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
new file mode 100644
index 0000000..8106426
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
+sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
new file mode 100644
index 0000000..64918ca
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# toolchain-external-linaro-arm
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION = 2016.05
+TOOLCHAIN_EXTERNAL_LINARO_ARM_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)/arm-linux-gnueabihf
+
+ifeq ($(HOSTARCH),x86)
+TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-i686_arm-linux-gnueabihf.tar.xz
+else
+TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-x86_64_arm-linux-gnueabihf.tar.xz
+endif
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 666cd02..945bf21 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -32,8 +32,6 @@ sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2
 sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
 
 # ARM toolchains from Linaro
-sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
-sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
 sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
 sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
 
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 2571539..410ff18 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -101,13 +101,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/arm-linux-gnueabihf
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
-endif
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
 TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/armeb-linux-gnueabihf
 ifeq ($(HOSTARCH),x86)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (6 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:28   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported Arnout Vandecappelle
                   ` (15 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the ARM architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 37 ++--------------------
 .../toolchain-external-codesourcery-arm/Config.in  | 33 +++++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-codesourcery-arm.hash       |  3 ++
 .../toolchain-external-codesourcery-arm.mk         | 13 ++++++++
 .../toolchain-external/toolchain-external.hash     |  3 --
 toolchain/toolchain-external/toolchain-external.mk |  5 +--
 7 files changed, 61 insertions(+), 42 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index bffb9fd..dfc8e70 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -17,6 +17,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
 
 # ARM (use Linaro toolchain by default)
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
 
 comment "Linaro toolchains available for Cortex-A + EABIhf"
 	depends on BR2_armeb
@@ -45,40 +46,6 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	  generated is Thumb 2, with the hard floating point calling
 	  convention, and uses the VFPv3-D16 FPU instructions.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
-	bool "Sourcery CodeBench ARM 2014.05"
-	depends on BR2_arm
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_ARM_EABI
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-	help
-	  Sourcery CodeBench toolchain for the ARM architecture, from
-	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
-	  2.18 and gdb 7.7.50, kernel headers 3.13. It has support
-	  for the following variants:
-	    - ARMv5TE, little endian, soft-float, glibc
-	      Select ARM926T, ARM10T, XScale or another ARMv5 core
-	      Select BR2_SOFT_FLOAT
-	    - ARMv4T, little endian, soft-float, glibc
-	      Select ARM720T, ARM920T, ARM922T or another ARMv4 core
-	      Select BR2_SOFT_FLOAT
-	    - ARMv7-A, Thumb 2, little endian, soft-float, glibc
-	      Select Cortex-A8, Cortex-A9 or another ARMv7-A core
-	      Select BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mthumb
-
-comment "Sourcery CodeBench toolchains available for the EABI ABI"
-	depends on BR2_arm
-	depends on !BR2_ARM_EABI
-	depends on !BR2_STATIC_LIBS
-
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -577,7 +544,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
-	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
@@ -635,6 +601,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
 
 # ARM
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
new file mode 100644
index 0000000..037985b
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
@@ -0,0 +1,33 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
+	bool "Sourcery CodeBench ARM 2014.05"
+	depends on BR2_arm
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_ARM_EABI
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	help
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
+	  2.18 and gdb 7.7.50, kernel headers 3.13. It has support
+	  for the following variants:
+	    - ARMv5TE, little endian, soft-float, glibc
+	      Select ARM926T, ARM10T, XScale or another ARMv5 core
+	      Select BR2_SOFT_FLOAT
+	    - ARMv4T, little endian, soft-float, glibc
+	      Select ARM720T, ARM920T, ARM922T or another ARMv4 core
+	      Select BR2_SOFT_FLOAT
+	    - ARMv7-A, Thumb 2, little endian, soft-float, glibc
+	      Select Cortex-A8, Cortex-A9 or another ARMv7-A core
+	      Select BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mthumb
+
+comment "Sourcery CodeBench toolchains available for the EABI ABI"
+	depends on BR2_arm
+	depends on !BR2_ARM_EABI
+	depends on !BR2_STATIC_LIBS
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
new file mode 100644
index 0000000..7f3654d
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "arm-none-linux-gnueabi"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-arm"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
new file mode 100644
index 0000000..535f4aa
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e  arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d  arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
new file mode 100644
index 0000000..f96a0e0
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# toolchain-external-codesourcery-arm
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION = 2014.05-29
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SOURCE = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_ACTUAL_SOURCE_TARBALL = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 945bf21..d2cf44b 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -6,9 +6,6 @@ sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfi
 sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
 
 # Mentor's Sourcery CodeBench Lite toolchains
-# ARM
-sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e  arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d  arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2
 # NiosII
 sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
 sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 410ff18..f8d22b4 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -80,10 +80,7 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
 		$(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
 endef
 
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
-TOOLCHAIN_EXTERNAL_SOURCE = arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),y)
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
 TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
-- 
2.10.2

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

* [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (7 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:35   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package Arnout Vandecappelle
                   ` (14 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

It's gcc 4.8.3 which doesn't support those cores yet.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: new patch
---
 .../toolchain-external/toolchain-external-codesourcery-arm/Config.in    | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
index 037985b..3cdfc86 100644
--- a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
@@ -3,6 +3,8 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	depends on BR2_arm
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on BR2_ARM_EABI
+	# Unsupported ARM cores
+	depends on !BR2_cortex_a12 && !BR2_cortex_a17
 	depends on !BR2_STATIC_LIBS
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_TOOLCHAIN_HAS_SSP
-- 
2.10.2

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

* [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (8 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:37   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: " Arnout Vandecappelle
                   ` (13 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Linaro external toolchain for the
ARM Big-endian architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 32 ++++------------------
 .../toolchain-external-linaro-armeb/Config.in      | 26 ++++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-linaro-armeb.hash           |  3 ++
 .../toolchain-external-linaro-armeb.mk             | 16 +++++++++++
 .../toolchain-external/toolchain-external.hash     |  4 ---
 toolchain/toolchain-external/toolchain-external.mk |  7 -----
 7 files changed, 59 insertions(+), 38 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index dfc8e70..a19e41a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -19,32 +19,8 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
 
-comment "Linaro toolchains available for Cortex-A + EABIhf"
-	depends on BR2_armeb
-	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
-	depends on !BR2_STATIC_LIBS
-
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
-	bool "Linaro armeb 2016.05"
-	depends on BR2_armeb
-	depends on BR2_ARM_CPU_ARMV7A
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_ARM_EABIHF
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	help
-	  Linaro toolchain for the ARM big endian architecture. It
-	  uses Linaro GCC 2016.05 (based on gcc 5.3.1), Linaro GDB
-	  2016.05 (based on GDB 7.11.1), glibc 2.21, Binutils 2016.05
-	  (based on 2.25). It generates code that runs on all Cortex-A
-	  profile devices, but tuned for the Cortex-A9. The code
-	  generated is Thumb 2, with the hard floating point calling
-	  convention, and uses the VFPv3-D16 FPU instructions.
+# ARM big-endian
+source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
 
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
@@ -543,7 +519,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
 	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
-	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
@@ -603,6 +578,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
 
+# ARM big-endian
+source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
new file mode 100644
index 0000000..ed84c47
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
@@ -0,0 +1,26 @@
+comment "Linaro toolchains available for Cortex-A + EABIhf"
+	depends on BR2_armeb
+	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
+	depends on !BR2_STATIC_LIBS
+
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
+	bool "Linaro armeb 2016.05"
+	depends on BR2_armeb
+	depends on BR2_ARM_CPU_ARMV7A
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_ARM_EABIHF
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	help
+	  Linaro toolchain for the ARM big endian architecture. It
+	  uses Linaro GCC 2016.05 (based on gcc 5.3.1), Linaro GDB
+	  2016.05 (based on GDB 7.11.1), glibc 2.21, Binutils 2016.05
+	  (based on 2.25). It generates code that runs on all Cortex-A
+	  profile devices, but tuned for the Cortex-A9. The code
+	  generated is Thumb 2, with the hard floating point calling
+	  convention, and uses the VFPv3-D16 FPU instructions.
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
new file mode 100644
index 0000000..225e90f
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "armeb-linux-gnueabihf"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-linaro-armeb"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
new file mode 100644
index 0000000..7952b50
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
+sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
new file mode 100644
index 0000000..cf2f3ad
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
@@ -0,0 +1,16 @@
+################################################################################
+#
+# toolchain-external-linaro-armeb
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION = 2016.05
+TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)/armeb-linux-gnueabihf
+
+ifeq ($(HOSTARCH),x86)
+TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-i686_armeb-linux-gnueabihf.tar.xz
+else
+TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-x86_64_armeb-linux-gnueabihf.tar.xz
+endif
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index d2cf44b..3740ca4 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -28,10 +28,6 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
 sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
 sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
 
-# ARM toolchains from Linaro
-sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
-sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
-
 # Codescape toolchains from Imagination Technologies
 # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
 sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index f8d22b4..7dfcac3 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -98,13 +98,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/armeb-linux-gnueabihf
-ifeq ($(HOSTARCH),x86)
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
-else
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
-endif
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
-- 
2.10.2

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

* [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (9 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:42   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: " Arnout Vandecappelle
                   ` (12 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Analog Devices external toolchain
for the Blackfin architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.

NOTE busybox build test failed when both FDPIC and FLAT shared libs
are installed, but this also fails on master. So not my problem :-P
---
 toolchain/toolchain-external/Config.in             | 26 ++++-------------
 .../toolchain-external-blackfin-uclinux/Config.in  | 17 +++++++++++
 .../Config.in.options                              | 10 +++++++
 .../toolchain-external-blackfin-uclinux.hash       |  3 ++
 .../toolchain-external-blackfin-uclinux.mk         | 33 ++++++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  4 ---
 toolchain/toolchain-external/toolchain-external.mk | 16 -----------
 7 files changed, 69 insertions(+), 40 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index a19e41a..f8e04f5 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -22,6 +22,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.
 # ARM big-endian
 source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
 
+# Blackfin
+source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -397,24 +400,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	  Other architecture variants (beyond Pentium-4/Xeon) are
 	  supported as well, but glibc is not optimised for it.
 
-config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
-	bool "Blackfin.uclinux.org 2014R1"
-	depends on BR2_bfin
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_USE_WCHAR
-	select BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Toolchain for the Blackfin architecture, from
-	  http://blackfin.uclinux.org.
-
 config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	bool "Musl 1.1.12 toolchain"
 	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
@@ -526,8 +511,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
-	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FLAT
-	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FDPIC
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
 	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
 	default "mips-img-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
@@ -581,6 +564,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.
 # ARM big-endian
 source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
 
+# Blackfin
+source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
new file mode 100644
index 0000000..8b299e8
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
@@ -0,0 +1,17 @@
+config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
+	bool "Blackfin.uclinux.org 2014R1"
+	depends on BR2_bfin
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+	select BR2_TOOLCHAIN_HAS_FORTRAN
+	help
+	  Toolchain for the Blackfin architecture, from
+	  http://blackfin.uclinux.org.
diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
new file mode 100644
index 0000000..3b7f457
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
@@ -0,0 +1,10 @@
+if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "bfin-uclinux" if BR2_BINFMT_FLAT
+	default "bfin-linux-uclibc" if BR2_BINFMT_FDPIC
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-blackfin-uclinux"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
new file mode 100644
index 0000000..b320d94
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfin-toolchain-2014R1-RC2.i386.tar.bz2
+sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
new file mode 100644
index 0000000..0a48220
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
@@ -0,0 +1,33 @@
+################################################################################
+#
+# toolchain-external-blackfin-uclinux
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR = 2014R1
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION = $(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR)-RC2
+
+ifeq ($(BR2_BINFMT_FLAT),y)
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SUBDIR = bfin-uclinux
+else
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SUBDIR = bfin-linux-uclibc
+endif
+
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SITE = http://downloads.sourceforge.net/project/adi-toolchain/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR)/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION)/i386
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SOURCE = blackfin-toolchain-$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION).i386.tar.bz2
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION).i386.tar.bz2
+
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_STRIP_COMPONENTS = 3
+
+# 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_UCLINUX_UCLIBC_EXTRA_EXTRACT
+	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS) | \
+		$(TAR) --strip-components=3 -C $(@D) $(TAR_OPTIONS) -
+endef
+TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_UCLIBC_EXTRA_EXTRACT
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 3740ca4..16c2e19 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -1,10 +1,6 @@
 ######################################
 # Next hashes are all locally computed
 
-# Blackfin toolchains from Analog Devices
-sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfin-toolchain-2014R1-RC2.i386.tar.bz2
-sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
-
 # Mentor's Sourcery CodeBench Lite toolchains
 # NiosII
 sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 7dfcac3..4b21b4f 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -70,16 +70,6 @@ define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
 endef
 endif
 
-# 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_ARAGO_ARMV7A),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
@@ -125,12 +115,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
 TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
 TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),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_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (10 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:43   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: " Arnout Vandecappelle
                   ` (11 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the MIPS architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 101 ++-------------------
 .../toolchain-external-codesourcery-mips/Config.in |  93 +++++++++++++++++++
 .../Config.in.options                              |   9 ++
 .../toolchain-external-codesourcery-mips.hash      |   3 +
 .../toolchain-external-codesourcery-mips.mk        |  13 +++
 .../toolchain-external/toolchain-external.hash     |   3 -
 toolchain/toolchain-external/toolchain-external.mk |   3 -
 7 files changed, 124 insertions(+), 101 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index f8e04f5..1f49975 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -25,6 +25,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
 # Blackfin
 source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in"
 
+# MIPS (use codesourcery toolchain by default)
+source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -70,100 +73,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
-	bool "Sourcery CodeBench MIPS 2016.05"
-	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
-	depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2
-	# Unsupported MIPS cores
-	depends on !BR2_mips_interaptiv
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_MIPS_NABI32
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	help
-	  Sourcery CodeBench toolchain for the MIPS architecture, from
-	  Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
-	  2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It
-	  has support for the following variants:
-	    - MIPS32r2 - Big-Endian, 2008 NaN, O32
-	      Select MIPS (big endian) core
-	      Disable BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
-	    - MIPS32r2 - Big-Endian, O32
-	      Select MIPS (big endian) core
-	      Disable BR2_SOFT_FLOAT
-	    - MIPS32r2 - Big-Endian, O32, MIPS16
-	      Select MIPS (big endian) core
-	      Disable BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mips16
-	    - MIPS32r2 - Big-Endian, Soft-Float, O32
-	      Select MIPS (big endian) core
-	      Select BR2_SOFT_FLOAT
-	    - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16
-	      Select MIPS (big endian) core
-	      Select BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mips16
-	    - MIPS32r2 - Little-Endian, 2008 NaN, O32
-	      Select MIPS (little endian) core
-	      Disable BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
-	    - MIPS32r2 - Little-Endian, O32
-	      Select MIPS (little endian) core
-	      Disable BR2_SOFT_FLOAT
-	    - MIPS32r2 - Little-Endian, O32, MIPS16
-	      Select MIPS (little endian) core
-	      Disable BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mips16
-	    - MIPS32r2 - Little-Endian, Soft-Float, O32
-	      Select MIPS (little endian) core
-	      Select BR2_SOFT_FLOAT
-	    - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16
-	      Select MIPS (little endian) core
-	      Select BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mips16
-	    - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS
-	      Select MIPS (little endian) core
-	      Select BR2_SOFT_FLOAT
-	      Set BR2_TARGET_OPTIMIZATION to -mmicromips
-	    - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32
-	      Not usable in Buildroot yet.
-	    - MIPS32r2 - uClibc, Big-Endian, O32
-	      Not usable in Buildroot yet.
-	    - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32
-	      Not usable in Buildroot yet.
-	    - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32
-	      Not usable in Buildroot yet.
-	    - MIPS32r2 - uClibc, Little-Endian, O32
-	      Not usable in Buildroot yet.
-	    - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32
-	      Not usable in Buildroot yet.
-	    - MIPS64r2 - Big-Endian, N64
-	      Select MIPS64 (big endian) core
-	      Select the n64 ABI
-	      Disable BR2_SOFT_FLOAT
-	    - MIPS64r2 - Big-Endian, Soft-Float, N64
-	      Select MIPS64 (big endian) core
-	      Select the n64 ABI
-	      Select BR2_SOFT_FLOAT
-	    - MIPS64r2 - Little-Endian, N64
-	      Select MIPS64 (little endian) core
-	      Select the n64 ABI
-	      Disable BR2_SOFT_FLOAT
-	    - MIPS64r2 - Little-Endian, Soft-Float, N64
-	      Select MIPS64 (little endian) core
-	      Select the n64 ABI
-	      Select BR2_SOFT_FLOAT
-
-comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
-	depends on BR2_MIPS_NABI32
-	depends on !BR2_STATIC_LIBS
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
 	bool "Codescape IMG GNU Linux Toolchain 2016.05"
 	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
@@ -506,7 +415,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
 	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
@@ -567,6 +475,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.o
 # Blackfin
 source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options"
 
+# MIPS
+source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
new file mode 100644
index 0000000..6a13ae6
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
@@ -0,0 +1,93 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
+	bool "Sourcery CodeBench MIPS 2016.05"
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2
+	# Unsupported MIPS cores
+	depends on !BR2_mips_interaptiv
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_MIPS_NABI32
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	help
+	  Sourcery CodeBench toolchain for the MIPS architecture, from
+	  Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
+	  2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It
+	  has support for the following variants:
+	    - MIPS32r2 - Big-Endian, 2008 NaN, O32
+	      Select MIPS (big endian) core
+	      Disable BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
+	    - MIPS32r2 - Big-Endian, O32
+	      Select MIPS (big endian) core
+	      Disable BR2_SOFT_FLOAT
+	    - MIPS32r2 - Big-Endian, O32, MIPS16
+	      Select MIPS (big endian) core
+	      Disable BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mips16
+	    - MIPS32r2 - Big-Endian, Soft-Float, O32
+	      Select MIPS (big endian) core
+	      Select BR2_SOFT_FLOAT
+	    - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16
+	      Select MIPS (big endian) core
+	      Select BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mips16
+	    - MIPS32r2 - Little-Endian, 2008 NaN, O32
+	      Select MIPS (little endian) core
+	      Disable BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
+	    - MIPS32r2 - Little-Endian, O32
+	      Select MIPS (little endian) core
+	      Disable BR2_SOFT_FLOAT
+	    - MIPS32r2 - Little-Endian, O32, MIPS16
+	      Select MIPS (little endian) core
+	      Disable BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mips16
+	    - MIPS32r2 - Little-Endian, Soft-Float, O32
+	      Select MIPS (little endian) core
+	      Select BR2_SOFT_FLOAT
+	    - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16
+	      Select MIPS (little endian) core
+	      Select BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mips16
+	    - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS
+	      Select MIPS (little endian) core
+	      Select BR2_SOFT_FLOAT
+	      Set BR2_TARGET_OPTIMIZATION to -mmicromips
+	    - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32
+	      Not usable in Buildroot yet.
+	    - MIPS32r2 - uClibc, Big-Endian, O32
+	      Not usable in Buildroot yet.
+	    - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32
+	      Not usable in Buildroot yet.
+	    - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32
+	      Not usable in Buildroot yet.
+	    - MIPS32r2 - uClibc, Little-Endian, O32
+	      Not usable in Buildroot yet.
+	    - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32
+	      Not usable in Buildroot yet.
+	    - MIPS64r2 - Big-Endian, N64
+	      Select MIPS64 (big endian) core
+	      Select the n64 ABI
+	      Disable BR2_SOFT_FLOAT
+	    - MIPS64r2 - Big-Endian, Soft-Float, N64
+	      Select MIPS64 (big endian) core
+	      Select the n64 ABI
+	      Select BR2_SOFT_FLOAT
+	    - MIPS64r2 - Little-Endian, N64
+	      Select MIPS64 (little endian) core
+	      Select the n64 ABI
+	      Disable BR2_SOFT_FLOAT
+	    - MIPS64r2 - Little-Endian, Soft-Float, N64
+	      Select MIPS64 (little endian) core
+	      Select the n64 ABI
+	      Select BR2_SOFT_FLOAT
+
+comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
+	depends on BR2_MIPS_NABI32
+	depends on !BR2_STATIC_LIBS
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
new file mode 100644
index 0000000..677cc67
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "mips-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-mips"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
new file mode 100644
index 0000000..2d80338
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
new file mode 100644
index 0000000..5117d47
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# toolchain-external-codesourcery-mips
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION = 2016.05-8
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SOURCE = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_ACTUAL_SOURCE_TARBALL = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 16c2e19..1a0ff72 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -14,9 +14,6 @@ sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-20
 # AMD64
 sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
 sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
-# MIPS
-sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
-sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
 
 # ARM toolchains from Texas Instrument's Arago project
 # There is one source file that covers both binary distributions.
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 4b21b4f..e7bc754 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -88,9 +88,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
-- 
2.10.2

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

* [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (11 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:20   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: " Arnout Vandecappelle
                   ` (10 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Codescape IMG external toolchain
for the MIPS architecture.

The legacy implementation is removed.

The Codescape hacks for IMG and MTI are duplicated.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 66 +---------------------
 .../Config.in                                      | 62 ++++++++++++++++++++
 .../Config.in.options                              |  9 +++
 .../toolchain-external-codescape-img-mips.hash     |  3 +
 .../toolchain-external-codescape-img-mips.mk       | 47 +++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  1 -
 toolchain/toolchain-external/toolchain-external.mk |  8 +--
 7 files changed, 124 insertions(+), 72 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 1f49975..c76941a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -27,6 +27,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
 
 # MIPS (use codesourcery toolchain by default)
 source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
+source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
 
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
@@ -73,69 +74,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
-	bool "Codescape IMG GNU Linux Toolchain 2016.05"
-	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT)
-	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
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Codescape IMG GNU Linux Toolchain 2015.10 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:
-	    - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (big endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Disable 'Use soft-float'
-	    - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (big endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Enable 'Use soft-float'
-	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Disable 'Use soft-float'
-	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Enable 'Use soft-float'
-	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Disable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
-	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r6' Target Architecture Variant
-	      Enable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
-	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI
-	      Select 'MIPS64 (big endian)' Target Architecture
-	      Select 'mips 64r6' Target Architecture Variant
-	      Select 'n32' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI
-	      Select 'MIPS64 (little endian)' Target Architecture
-	      Select 'mips 64r6' Target Architecture Variant
-	      Select 'n32' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI
-	      Select 'MIPS64 (big endian)' Target Architecture
-	      Select 'mips 64r6' Target Architecture Variant
-	      Select 'n64' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI
-	      Select 'MIPS64 (little endian)' Target Architecture
-	      Select 'mips 64r6' Target Architecture Variant
-	      Select 'n64' Target ABI
-	      Disable 'Use soft-float'
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
 	bool "Codescape MTI GNU Linux Toolchain 2016.05"
 	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
@@ -421,7 +359,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
 	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
-	default "mips-img-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
 	default "mips-mti-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
 	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
 	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
@@ -477,6 +414,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
 
 # MIPS
 source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
+source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
new file mode 100644
index 0000000..1f0d4d1
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
@@ -0,0 +1,62 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
+	bool "Codescape IMG GNU Linux Toolchain 2016.05"
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT)
+	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
+	select BR2_TOOLCHAIN_HAS_FORTRAN
+	help
+	  Codescape IMG GNU Linux Toolchain 2015.10 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:
+	    - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Disable 'Use soft-float'
+	    - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Enable 'Use soft-float'
+	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Disable 'Use soft-float'
+	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Enable 'Use soft-float'
+	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Disable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
+	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r6' Target Architecture Variant
+	      Enable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
+	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n32' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n32' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n64' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r6' Target Architecture Variant
+	      Select 'n64' Target ABI
+	      Disable 'Use soft-float'
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
new file mode 100644
index 0000000..3eaa2a9
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "mips-img-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codescape-img-mips"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
new file mode 100644
index 0000000..e4ae9e1
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
@@ -0,0 +1,3 @@
+# Codescape toolchains from Imagination Technologies
+# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
+sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
new file mode 100644
index 0000000..b4decfb
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
@@ -0,0 +1,47 @@
+################################################################################
+#
+# toolchain-external-codescape-img-mips
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION = 2016.05-03
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION)
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STRIP_COMPONENTS = 2
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
+
+# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
+# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
+# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
+# tools in the appropriate location.
+ifeq ($(BR2_MIPS_OABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = o32
+else ifeq ($(BR2_MIPS_NABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n32
+else ifeq ($(BR2_MIPS_NABI64),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n64
+endif
+
+define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS
+	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
+	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
+	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
+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_IMG_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
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_POST_INSTALL_STAGING_HOOKS += \
+	TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS \
+	TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 1a0ff72..962263c 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -23,7 +23,6 @@ sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-t
 
 # Codescape toolchains from Imagination Technologies
 # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
-sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
 sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
 
 # Synopsys DesignWare ARC toolchains
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index e7bc754..2acf9dd 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -54,7 +54,7 @@ endef
 # sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
 # -> sbin-<abi> so that the rest of Buildroot can find the toolchain
 # tools in the appropriate location.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
 ifeq ($(BR2_MIPS_OABI32),y)
 TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
 else ifeq ($(BR2_MIPS_NABI32),y)
@@ -100,12 +100,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
 TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
 TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
 TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
-- 
2.10.2

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

* [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (12 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:23   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: " Arnout Vandecappelle
                   ` (9 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Codescape MTI external toolchain
for the MIPS architecture.

The legacy implementation is removed.

The Codescape hacks for IMG and MTI are duplicated.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 77 +---------------------
 .../Config.in                                      | 73 ++++++++++++++++++++
 .../Config.in.options                              |  9 +++
 .../toolchain-external-codescape-mti-mips.hash     |  3 +
 .../toolchain-external-codescape-mti-mips.mk       | 47 +++++++++++++
 .../toolchain-external/toolchain-external.hash     |  4 --
 toolchain/toolchain-external/toolchain-external.mk | 38 -----------
 7 files changed, 134 insertions(+), 117 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index c76941a..d2e1d3b 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -28,6 +28,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
 # MIPS (use codesourcery toolchain by default)
 source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
+source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in"
 
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
@@ -74,80 +75,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
-	bool "Codescape MTI GNU Linux Toolchain 2016.05"
-	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \
-		BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT)
-	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
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Codescape MTI GNU Linux Toolchain 2015.10 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, Hard-Float, Legacy NaN, o32 ABI
-	      Select 'MIPS (big endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Disable 'Use soft-float'
-	    - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (big endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Disable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
-	    - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI
-	      Select 'MIPS (big endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Enable 'Use soft-float'
-	    - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Disable 'Use soft-float'
-	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Disable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
-	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Enable 'Use soft-float'
-	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Enable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
-	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS
-	      Select 'MIPS (little endian)' Target Architecture
-	      Select 'mips 32r2' Target Architecture Variant
-	      Disable 'Use soft-float'
-	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
-	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI
-	      Select 'MIPS64 (big endian)' Target Architecture
-	      Select 'mips 64r2' Target Architecture Variant
-	      Select 'n32' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI
-	      Select 'MIPS64 (little endian)' Target Architecture
-	      Select 'mips 64r2' Target Architecture Variant
-	      Select 'n32' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI
-	      Select 'MIPS64 (big endian)' Target Architecture
-	      Select 'mips 64r2' Target Architecture Variant
-	      Select 'n64' Target ABI
-	      Disable 'Use soft-float'
-	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI
-	      Select 'MIPS64 (little endian)' Target Architecture
-	      Select 'mips 64r2' Target Architecture Variant
-	      Select 'n64' Target ABI
-	      Disable 'Use soft-float'
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	bool "Sourcery CodeBench Nios-II 2016.05"
 	depends on BR2_nios2
@@ -359,7 +286,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
 	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
-	default "mips-mti-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
 	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
 	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
 	default "mips-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT)
@@ -415,6 +341,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
 # MIPS
 source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
+source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options"
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
new file mode 100644
index 0000000..f899467
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
@@ -0,0 +1,73 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
+	bool "Codescape MTI GNU Linux Toolchain 2016.05"
+	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \
+		BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT)
+	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
+	select BR2_TOOLCHAIN_HAS_FORTRAN
+	help
+	  Codescape MTI GNU Linux Toolchain 2015.10 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, Hard-Float, Legacy NaN, o32 ABI
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Disable 'Use soft-float'
+	    - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Disable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
+	    - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI
+	      Select 'MIPS (big endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Enable 'Use soft-float'
+	    - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Disable 'Use soft-float'
+	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Disable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
+	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Enable 'Use soft-float'
+	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Enable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
+	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS
+	      Select 'MIPS (little endian)' Target Architecture
+	      Select 'mips 32r2' Target Architecture Variant
+	      Disable 'Use soft-float'
+	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
+	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r2' Target Architecture Variant
+	      Select 'n32' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r2' Target Architecture Variant
+	      Select 'n32' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI
+	      Select 'MIPS64 (big endian)' Target Architecture
+	      Select 'mips 64r2' Target Architecture Variant
+	      Select 'n64' Target ABI
+	      Disable 'Use soft-float'
+	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI
+	      Select 'MIPS64 (little endian)' Target Architecture
+	      Select 'mips 64r2' Target Architecture Variant
+	      Select 'n64' Target ABI
+	      Disable 'Use soft-float'
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
new file mode 100644
index 0000000..464c9b8
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "mips-mti-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codescape-mti-mips"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
new file mode 100644
index 0000000..0d785f2
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
@@ -0,0 +1,3 @@
+# Codescape toolchains from Imagination Technologies
+# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
+sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
new file mode 100644
index 0000000..e5733ca
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
@@ -0,0 +1,47 @@
+################################################################################
+#
+# toolchain-external-codescape-mti-mips
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION = 2016.05-03
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STRIP_COMPONENTS = 2
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
+
+# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
+# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
+# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
+# tools in the appropriate location.
+ifeq ($(BR2_MIPS_OABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = o32
+else ifeq ($(BR2_MIPS_NABI32),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n32
+else ifeq ($(BR2_MIPS_NABI64),y)
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n64
+endif
+
+define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS
+	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
+	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
+	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
+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_MTI_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
+
+TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_POST_INSTALL_STAGING_HOOKS += \
+	TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS \
+	TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 962263c..83859e7 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -21,10 +21,6 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
 sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
 sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
 
-# Codescape toolchains from Imagination Technologies
-# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
-sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
-
 # Synopsys DesignWare ARC toolchains
 sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz
 sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10  arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 2acf9dd..31a53d2 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -38,38 +38,6 @@ TOOLCHAIN_EXTERNAL_SITE =
 TOOLCHAIN_EXTERNAL_SOURCE =
 endif
 
-# 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
-
-# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
-# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
-# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
-# tools in the appropriate location.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
-ifeq ($(BR2_MIPS_OABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
-else ifeq ($(BR2_MIPS_NABI32),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32
-else ifeq ($(BR2_MIPS_NABI64),y)
-TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64
-endif
-
-define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
-	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
-	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
-endef
-endif
-
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
@@ -100,12 +68,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
 TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
-TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
-TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
-TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (13 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:30   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: " Arnout Vandecappelle
                   ` (8 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the nios-II architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 25 ++++++----------------
 .../Config.in                                      | 17 +++++++++++++++
 .../Config.in.options                              |  9 ++++++++
 .../toolchain-external-codesourcery-niosII.hash    |  3 +++
 .../toolchain-external-codesourcery-niosII.mk      | 13 +++++++++++
 .../toolchain-external/toolchain-external.hash     |  3 ---
 toolchain/toolchain-external/toolchain-external.mk |  3 ---
 7 files changed, 48 insertions(+), 25 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index d2e1d3b..e628279 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -30,6 +30,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config
 source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in"
 
+# NIOSII
+source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -75,24 +78,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
-	bool "Sourcery CodeBench Nios-II 2016.05"
-	depends on BR2_nios2
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1
-	help
-	  Sourcery CodeBench toolchain for the Nios-II architecture,
-	  from Mentor Graphics. It uses gcc 5.3, binutils 2.25.51,
-	  glibc 2.23, gdb 7.10.50 and kernel headers 4.4.
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	bool "Sourcery CodeBench SH 2012.09"
 	depends on BR2_sh4a || BR2_sh4aeb
@@ -280,7 +265,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
@@ -343,6 +327,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config
 source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options"
 
+# NIOSII
+source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
new file mode 100644
index 0000000..54eed8c
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
@@ -0,0 +1,17 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
+	bool "Sourcery CodeBench Nios-II 2016.05"
+	depends on BR2_nios2
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1
+	help
+	  Sourcery CodeBench toolchain for the Nios-II architecture,
+	  from Mentor Graphics. It uses gcc 5.3, binutils 2.25.51,
+	  glibc 2.23, gdb 7.10.50 and kernel headers 4.4.
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
new file mode 100644
index 0000000..07cc5ed
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "nios2-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-niosII"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
new file mode 100644
index 0000000..a60c49f
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
+sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
new file mode 100644
index 0000000..3eb6679
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# toolchain-external-codesourcery-niosII
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2016.05-10
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SOURCE = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_ACTUAL_SOURCE_TARBALL = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 83859e7..5c98fe3 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -2,9 +2,6 @@
 # Next hashes are all locally computed
 
 # Mentor's Sourcery CodeBench Lite toolchains
-# NiosII
-sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
-sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
 # SuperH
 sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
 sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 31a53d2..fde0564 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
-TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y)
 TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
-- 
2.10.2

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

* [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (14 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:32   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: " Arnout Vandecappelle
                   ` (7 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the SuperH 4a architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 33 ++++------------------
 .../toolchain-external-codesourcery-sh/Config.in   | 25 ++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-codesourcery-sh.hash        |  3 ++
 .../toolchain-external-codesourcery-sh.mk          | 13 +++++++++
 .../toolchain-external/toolchain-external.hash     |  3 --
 toolchain/toolchain-external/toolchain-external.mk |  3 --
 7 files changed, 56 insertions(+), 33 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index e628279..8e06b05 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -33,6 +33,9 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
 # NIOSII
 source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
 
+# SH4a
+source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -78,32 +81,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
-	bool "Sourcery CodeBench SH 2012.09"
-	depends on BR2_sh4a || BR2_sh4aeb
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
-	help
-	  Sourcery CodeBench toolchain for the SuperH architecture,
-	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
-	  glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers
-	  3.5.4. It has support for the following variants:
-	    - SH4A, glibc, little endian
-	      Default.
-	    - SH4A, glibc, big endian
-	      Add -mb to BR2_TARGET_OPTIMIZATION
-	    - SH4A, uClibc, little endian
-	      Not usable in Buildroot yet.
-	    - SH4A, uClibc, big endian
-	      Not usable in Buildroot yet.
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	bool "Sourcery CodeBench AMD64 2015.11"
 	depends on BR2_x86_64
@@ -265,7 +242,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
@@ -330,6 +306,9 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
 # NIOSII
 source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
 
+# SH4a
+source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
new file mode 100644
index 0000000..a47dab7
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
@@ -0,0 +1,25 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
+	bool "Sourcery CodeBench SH 2012.09"
+	depends on BR2_sh4a || BR2_sh4aeb
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	help
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
+	  glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers
+	  3.5.4. It has support for the following variants:
+	    - SH4A, glibc, little endian
+	      Default.
+	    - SH4A, glibc, big endian
+	      Add -mb to BR2_TARGET_OPTIMIZATION
+	    - SH4A, uClibc, little endian
+	      Not usable in Buildroot yet.
+	    - SH4A, uClibc, big endian
+	      Not usable in Buildroot yet.
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
new file mode 100644
index 0000000..90061ce
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "sh-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-sh"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
new file mode 100644
index 0000000..ff2ba5f
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
+sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
new file mode 100644
index 0000000..5370bb2
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# toolchain-external-sourcery-sh
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION = 2012.09-61
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SOURCE = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_ACTUAL_SOURCE_TARBALL = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 5c98fe3..18b3e1a 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -2,9 +2,6 @@
 # Next hashes are all locally computed
 
 # Mentor's Sourcery CodeBench Lite toolchains
-# SuperH
-sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
-sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
 # x86
 sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
 sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index fde0564..9aabab6 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
 TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
-- 
2.10.2

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

* [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (15 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:34   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: " Arnout Vandecappelle
                   ` (6 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Romain Naour <romain.naour@gmail.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the AMD-64 architecture.

The legacy implementation is removed.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 32 ++++------------------
 .../Config.in                                      | 24 ++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-codesourcery-amd64.hash     |  3 ++
 .../toolchain-external-codesourcery-amd64.mk       | 12 ++++++++
 .../toolchain-external/toolchain-external.hash     |  3 --
 toolchain/toolchain-external/toolchain-external.mk |  3 --
 7 files changed, 54 insertions(+), 32 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 8e06b05..2689c91 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -36,6 +36,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Conf
 # SH4a
 source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in"
 
+# x86/x86_64 (use amd64 toolchain by default for AMD64)
+source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -81,31 +84,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
-	bool "Sourcery CodeBench AMD64 2015.11"
-	depends on BR2_x86_64
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	depends on BR2_x86_jaguar || BR2_x86_steamroller
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	help
-	  Sourcery CodeBench toolchain for the amd64 (x86_64)
-	  architectures, from Mentor Graphics. It uses gcc 5.2,
-	  binutils 2.25.51, glibc 2.22, gdb 7.10.50 and kernel headers
-	  4.2. It has support for the following variants:
-	    - AMD Puma/Jaguar (family 16h), glibc
-	    Default for x86_64, nothing special to do.
-	    - AMD Steamroller (family 15h), glibc
-	    Select a steamroller core.
-	  No other architecture variants are supported since glibc
-	  is optimized for one of these two baselines.
-
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	bool "Sourcery CodeBench x86/x86_64 2012.09"
 	depends on BR2_i386 || BR2_x86_64
@@ -243,7 +221,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
-	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
 	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
 	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
@@ -309,6 +286,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Conf
 # SH4a
 source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options"
 
+# x86/x86_64
+source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
new file mode 100644
index 0000000..86486c8
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
@@ -0,0 +1,24 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
+	bool "Sourcery CodeBench AMD64 2015.11"
+	depends on BR2_x86_64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_x86_jaguar || BR2_x86_steamroller
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	help
+	  Sourcery CodeBench toolchain for the amd64 (x86_64)
+	  architectures, from Mentor Graphics. It uses gcc 5.2,
+	  binutils 2.25.51, glibc 2.22, gdb 7.10.50 and kernel headers
+	  4.2. It has support for the following variants:
+	    - AMD Puma/Jaguar (family 16h), glibc
+	    Default for x86_64, nothing special to do.
+	    - AMD Steamroller (family 15h), glibc
+	    Select a steamroller core.
+	  No other architecture variants are supported since glibc
+	  is optimized for one of these two baselines.
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
new file mode 100644
index 0000000..2ab2302
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "x86_64-amd-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-amd64"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
new file mode 100644
index 0000000..ea5f300
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
+sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
new file mode 100644
index 0000000..4b8e31c
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
@@ -0,0 +1,12 @@
+################################################################################
+#
+# toolchain-external-codesourcery-amd64
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION = 2015.11-139
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SOURCE = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_ACTUAL_SOURCE_TARBALL = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 18b3e1a..b873abe 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -5,9 +5,6 @@
 # x86
 sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
 sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
-# AMD64
-sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
-sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
 
 # ARM toolchains from Texas Instrument's Arago project
 # There is one source file that covers both binary distributions.
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 9aabab6..3cb9024 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -59,9 +59,6 @@ TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
 TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
 TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (16 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:35   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: " Arnout Vandecappelle
                   ` (5 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Sourcery CodeBench external
toolchain for the i386/x86_64 architecture.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 33 ++--------------------
 .../toolchain-external-codesourcery-x86/Config.in  | 29 +++++++++++++++++++
 .../Config.in.options                              |  9 ++++++
 .../toolchain-external-codesourcery-x86.hash       |  3 ++
 .../toolchain-external-codesourcery-x86.mk         | 12 ++++++++
 .../toolchain-external/toolchain-external.hash     |  5 ----
 toolchain/toolchain-external/toolchain-external.mk |  3 --
 7 files changed, 55 insertions(+), 39 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 2689c91..cddfca8 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -38,6 +38,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
 
 # x86/x86_64 (use amd64 toolchain by default for AMD64)
 source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in"
 
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
@@ -84,36 +85,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
-	bool "Sourcery CodeBench x86/x86_64 2012.09"
-	depends on BR2_i386 || BR2_x86_64
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_STATIC_LIBS
-	depends on !BR2_x86_jaguar
-	depends on !BR2_x86_steamroller
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
-	help
-	  Sourcery CodeBench toolchain for the x86/x86_64
-	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
-	  binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers
-	  3.5.4. It has support for the following variants:
-	    - Intel Pentium 4, glibc, 32 bits
-	      Default for x86, nothing special to do.
-	    - Intel Atom, glibc, 32 bits
-	      Select an Atom core
-	    - Intel Xeon, glibc, 64 bits
-	      Default for x86_64, nothing special to do.
-	    - Intel Core 2, glibc, 64 bits
-	      Select a Core 2 core
-	  Other architecture variants (beyond Pentium-4/Xeon) are
-	  supported as well, but glibc is not optimised for it.
-
 config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	bool "Musl 1.1.12 toolchain"
 	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
@@ -220,7 +191,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
 	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
 	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
@@ -288,6 +258,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
 
 # x86/x86_64
 source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
+source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options"
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
new file mode 100644
index 0000000..bcbdd26
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
@@ -0,0 +1,29 @@
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
+	bool "Sourcery CodeBench x86/x86_64 2012.09"
+	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	depends on !BR2_STATIC_LIBS
+	depends on !BR2_x86_jaguar
+	depends on !BR2_x86_steamroller
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	help
+	  Sourcery CodeBench toolchain for the x86/x86_64
+	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
+	  binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers
+	  3.5.4. It has support for the following variants:
+	    - Intel Pentium 4, glibc, 32 bits
+	      Default for x86, nothing special to do.
+	    - Intel Atom, glibc, 32 bits
+	      Select an Atom core
+	    - Intel Xeon, glibc, 64 bits
+	      Default for x86_64, nothing special to do.
+	    - Intel Core 2, glibc, 64 bits
+	      Select a Core 2 core
+	  Other architecture variants (beyond Pentium-4/Xeon) are
+	  supported as well, but glibc is not optimised for it.
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
new file mode 100644
index 0000000..65b62f3
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
@@ -0,0 +1,9 @@
+if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "i686-pc-linux-gnu"
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-codesourcery-x86"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
new file mode 100644
index 0000000..a003f7a
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
+sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
new file mode 100644
index 0000000..5ee6991
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
@@ -0,0 +1,12 @@
+################################################################################
+#
+# toolchain-external-codesourcery-x86
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
+TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION = 2012.09-62
+TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SOURCE = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i386-linux.tar.bz2
+TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_ACTUAL_SOURCE_TARBALL = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index b873abe..8926bf8 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -1,11 +1,6 @@
 ######################################
 # Next hashes are all locally computed
 
-# Mentor's Sourcery CodeBench Lite toolchains
-# x86
-sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
-sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
-
 # ARM toolchains from Texas Instrument's Arago project
 # There is one source file that covers both binary distributions.
 sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 3cb9024..7e4539e 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
-TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
-TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
 TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
 TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (17 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:40   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 20/22] toolchain-external-custom: " Arnout Vandecappelle
                   ` (4 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the pre-built Musl external
toolchains.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 48 +++-------------------
 .../toolchain-external-musl-cross/Config.in        | 30 ++++++++++++++
 .../Config.in.options                              | 19 +++++++++
 .../toolchain-external-musl-cross.hash}            | 17 +-------
 .../toolchain-external-musl-cross.mk               | 12 ++++++
 .../toolchain-external/toolchain-external.hash     | 13 ------
 toolchain/toolchain-external/toolchain-external.mk | 26 ------------
 7 files changed, 68 insertions(+), 97 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
 copy toolchain/toolchain-external/{toolchain-external.hash => toolchain-external-musl-cross/toolchain-external-musl-cross.hash} (51%)
 create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index cddfca8..5188e1a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -40,6 +40,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
 source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in"
 
+# Musl based toolchains (after all the others)
+source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -85,37 +88,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
-	bool "Musl 1.1.12 toolchain"
-	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
-		(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4 && BR2_USE_MMU) || \
-		(BR2_armeb && BR2_ARM_EABI && !BR2_ARM_CPU_ARMV7A && BR2_USE_MMU) || \
-		BR2_i386 || (BR2_mips && !BR2_SOFT_FLOAT) || \
-		BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || \
-		BR2_sh4 || BR2_sh4eb || \
-		BR2_x86_64
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	# Unsupported MIPS cores
-	depends on !BR2_mips_interaptiv && !BR2_mips_m5100 && !BR2_mips_m5101
-	# Unsupported for MIPS R6
-	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
-	select BR2_TOOLCHAIN_EXTERNAL_MUSL
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-	help
-	  Toolchain based on the Musl C library, provided by the
-	  musl-cross project. It uses gcc 5.3, binutils 2.25.1 and
-	  musl 1.1.12. It does not have a cross debugger included.
-
-	  The ARM soft-float toolchain is built for ARMv4t, while the
-	  ARM hard-float toolchain is built for ARMv5t.
-	  The x86 toolchain is built for i486.
-
-	  http://musl.codu.org/
-
 config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
 	bool "Synopsys ARC 2014.12 toolchain"
 	depends on BR2_arc
@@ -191,17 +163,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
-	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
-	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
-	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
-	default "mips-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT)
-	default "mipsel-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && !BR2_SOFT_FLOAT)
-	default "mipsel-sf-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && BR2_SOFT_FLOAT)
-	default "powerpc-linux-musl"     if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_powerpc
-	default "sh4-linux-musl"         if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4
-	default "sh4eb-linux-musl"       if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4eb
-	default "x86_64-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_x86_64
 	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \
 					 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
@@ -260,6 +221,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
 source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options"
 
+# Musl based toolchains
+source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options"
+
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
new file mode 100644
index 0000000..5cffa2d
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
@@ -0,0 +1,30 @@
+config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
+	bool "Musl 1.1.12 toolchain"
+	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
+		(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4 && BR2_USE_MMU) || \
+		(BR2_armeb && BR2_ARM_EABI && !BR2_ARM_CPU_ARMV7A && BR2_USE_MMU) || \
+		BR2_i386 || (BR2_mips && !BR2_SOFT_FLOAT) || \
+		BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || \
+		BR2_sh4 || BR2_sh4eb || \
+		BR2_x86_64
+	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
+	# Unsupported MIPS cores
+	depends on !BR2_mips_interaptiv && !BR2_mips_m5100 && !BR2_mips_m5101
+	# Unsupported for MIPS R6
+	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
+	select BR2_TOOLCHAIN_EXTERNAL_MUSL
+	select BR2_TOOLCHAIN_HAS_SSP
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	help
+	  Toolchain based on the Musl C library, provided by the
+	  musl-cross project. It uses gcc 5.3, binutils 2.25.1 and
+	  musl 1.1.12. It does not have a cross debugger included.
+
+	  The ARM soft-float toolchain is built for ARMv4t, while the
+	  ARM hard-float toolchain is built for ARMv5t.
+	  The x86 toolchain is built for i486.
+
+	  http://musl.codu.org/
diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
new file mode 100644
index 0000000..cd12355
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
@@ -0,0 +1,19 @@
+if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "arm-linux-musleabi"	 if BR2_arm && BR2_ARM_EABI
+	default "arm-linux-musleabihf"	 if BR2_arm && BR2_ARM_EABIHF
+	default "armeb-linux-musleabi"	 if BR2_armeb
+	default "i486-linux-musl"	 if BR2_i386
+	default "mips-linux-musl"	 if (BR2_mips && !BR2_SOFT_FLOAT)
+	default "mipsel-linux-musl"	 if (BR2_mipsel && !BR2_SOFT_FLOAT)
+	default "mipsel-sf-linux-musl"	 if (BR2_mipsel && BR2_SOFT_FLOAT)
+	default "powerpc-linux-musl"     if BR2_powerpc
+	default "sh4-linux-musl"         if BR2_sh4
+	default "sh4eb-linux-musl"       if BR2_sh4eb
+	default "x86_64-linux-musl"	 if BR2_x86_64
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-musl-cross"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
similarity index 51%
copy from toolchain/toolchain-external/toolchain-external.hash
copy to toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
index 8926bf8..beef8fd 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
@@ -1,19 +1,4 @@
-######################################
-# Next hashes are all locally computed
-
-# ARM toolchains from Texas Instrument's Arago project
-# There is one source file that covers both binary distributions.
-sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
-sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
-sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
-
-# 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
-sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
-sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
-
-# Prebuilt musl toolchains from musl-cross
+# Locally calculated
 sha256 e32c23d0b83639fc10ad06666ec086b66453b9be44415fe1a818c3c3b526dfb1  crossx86-armeb-linux-musleabi-1.1.12.tar.xz
 sha256 eb81bd5d6ada454c6e854b18bfa8dc801333782152166f6cab9fb7cd11692987  crossx86-arm-linux-musleabi-1.1.12.tar.xz
 sha256 a050da284ff22d291ae71dfc249ebdedb18334b8d626804760ce7d5963e392e6  crossx86-arm-linux-musleabihf-1.1.12.tar.xz
diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
new file mode 100644
index 0000000..966505b
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
@@ -0,0 +1,12 @@
+################################################################################
+#
+# toolchain-external-musl-cross
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION = 1.1.12
+TOOLCHAIN_EXTERNAL_MUSL_CROSS_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION)
+
+TOOLCHAIN_EXTERNAL_MUSL_CROSS_SOURCE = crossx86-$(TOOLCHAIN_EXTERNAL_PREFIX)-$(TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION).tar.xz
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index 8926bf8..a286ef2 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -12,16 +12,3 @@ sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu
 sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10  arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
 sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
 sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
-
-# Prebuilt musl toolchains from musl-cross
-sha256 e32c23d0b83639fc10ad06666ec086b66453b9be44415fe1a818c3c3b526dfb1  crossx86-armeb-linux-musleabi-1.1.12.tar.xz
-sha256 eb81bd5d6ada454c6e854b18bfa8dc801333782152166f6cab9fb7cd11692987  crossx86-arm-linux-musleabi-1.1.12.tar.xz
-sha256 a050da284ff22d291ae71dfc249ebdedb18334b8d626804760ce7d5963e392e6  crossx86-arm-linux-musleabihf-1.1.12.tar.xz
-sha256 18d07f5c8f4cfe373461cf21cf7b1bfefa820a37e96a69b68e0f315d528b4286  crossx86-i486-linux-musl-1.1.12.tar.xz
-sha256 1c1480c2618097e402fe804c1431fbd49b0d43520af81d4c1a695a2fa13a3922  crossx86-mipsel-linux-musl-1.1.12.tar.xz
-sha256 f0a8b3eb0566138ab3cc77bc09648be15bc325da974ec98b9e67f2fb82be3295  crossx86-mipsel-sf-linux-musl-1.1.12.tar.xz
-sha256 6a99989c3dff56776981f6760b2c54dcb9e4032be1d649968bb06c04f2e64177  crossx86-mips-linux-musl-1.1.12.tar.xz
-sha256 c082adc3e8b0750bb22ca82628524fd525fd77f534517ac5a66e7ac5a297ee6e  crossx86-powerpc-linux-musl-1.1.12.tar.xz
-sha256 8c6c9ebb54040e47947b4d3af6823d01fef2bb6ee81b18903c801030c066092b  crossx86-sh4eb-linux-musl-1.1.12.tar.xz
-sha256 ae9a0a5a60226aa086a56628cfd5c1d283c9dffdca37891d7e6adc2bd21ac2e0  crossx86-sh4-linux-musl-1.1.12.tar.xz
-sha256 27e0ea1043a58aebeadf1dacd67e47fd0b5c19fc36f42c9374e5fa3308df09c6  crossx86-x86_64-linux-musl-1.1.12.tar.xz
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 7e4539e..0680473 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -56,32 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
-TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
-TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
-ifeq ($(BR2_arm)$(BR2_ARM_EABI),yy)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_arm)$(BR2_ARM_EABIHF),yy)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabihf-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_armeb),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-armeb-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_i386),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-i486-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mips),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mips-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-sf-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_powerpc),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-powerpc-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_sh4),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_sh4eb),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4eb-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-else ifeq ($(BR2_x86_64),y)
-TOOLCHAIN_EXTERNAL_SOURCE = crossx86-x86_64-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
-endif
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y)
 TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12
 ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
-- 
2.10.2

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

* [Buildroot] [PATCH v4 20/22] toolchain-external-custom: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (18 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:49   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 21/22] toolchain-external-arc: " Arnout Vandecappelle
                   ` (3 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package to support custom external toolchains.

The legacy implementation is removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 351 +--------------------
 .../toolchain-external-custom/Config.in            |   5 +
 .../toolchain-external-custom/Config.in.options    | 334 ++++++++++++++++++++
 .../toolchain-external-custom.mk                   |  15 +
 toolchain/toolchain-external/toolchain-external.mk |   6 -
 5 files changed, 361 insertions(+), 350 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 5188e1a..e592ec2 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -43,6 +43,11 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.
 # Musl based toolchains (after all the others)
 source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
 
+# Kept last, so it remains the non-default choice, unless there isn't
+# any available toolchain profile for the currently selected
+# architecture.
+source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
+
 config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	bool "Arago ARMv7 2011.09"
 	depends on BR2_arm
@@ -109,12 +114,6 @@ config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
 	  Toolchain for the ARC cores, from
 	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
 
-config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
-	bool "Custom toolchain"
-	help
-	  Use this option to use a custom toolchain pre-installed on
-	  your system.
-
 endchoice
 
 choice
@@ -146,25 +145,12 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
 	help
 	  Path to where the external toolchain is installed.
 
-config BR2_TOOLCHAIN_EXTERNAL_URL
-	string "Toolchain URL"
-	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
-	help
-	  URL of the custom toolchain tarball to download and install.
-
-config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
-	string "Toolchain prefix"
-	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM
-	default "$(ARCH)-linux"
-
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
 	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
 	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \
-					 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	bool
@@ -224,331 +210,8 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.
 # Musl based toolchains
 source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options"
 
-if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
-
-choice
-	bool "External toolchain gcc version"
-	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
-	help
-	  Set to the gcc version that is used by your external
-	  toolchain.
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_6
-	bool "6.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_5
-	bool "5.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
-	bool "4.9.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
-	bool "4.8.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
-	bool "4.7.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
-	bool "4.6.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
-	bool "4.5.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
-	bool "4.4.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
-
-config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
-	bool "4.3.x"
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
-
-endchoice
-
-choice
-	bool "External toolchain kernel headers series"
-	default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
-	help
-	  Set to the kernel headers version that were used to build
-	  this external toolchain.
-
-	  This is used to hide/show some packages that have strict
-	  requirements on the version of kernel headers.
-
-	  If unsure what version your toolchain is using, you can look
-	  at the value of LINUX_VERSION_CODE in linux/version.h in your
-	  toolchain. The Linux version is M.m.p, with:
-	    M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF
-	    m = ( LINUX_VERSION_CODE >> 8  ) & 0xFF
-	    p = ( LINUX_VERSION_CODE >> 0  ) & 0xFF
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8
-	bool "4.8.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7
-	bool "4.7.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6
-	bool "4.6.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5
-	bool "4.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4
-	bool "4.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3
-	bool "4.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2
-	bool "4.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1
-	bool "4.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0
-	bool "4.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19
-	bool "3.19.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18
-	bool "3.18.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17
-	bool "3.17.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
-	bool "3.16.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
-	bool "3.15.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
-	bool "3.14.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
-	bool "3.13.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
-	bool "3.12.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
-	bool "3.11.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
-	bool "3.10.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
-	bool "3.9.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
-	bool "3.8.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
-	bool "3.7.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
-	bool "3.6.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
-	bool "3.5.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
-	bool "3.4.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
-	bool "3.3.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
-	bool "3.2.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
-	bool "3.1.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
-	bool "3.0.x"
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
-
-config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
-	bool "2.6.x"
-
-endchoice
-
-choice
-	prompt "External toolchain C library"
-	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
-
-config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
-	bool "uClibc/uClibc-ng"
-	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
-	# For the time being, we assume that all custom external
-	# toolchains have shadow password support.
-	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
-	help
-	  Select this option if your external toolchain uses the
-	  uClibc (available from http://www.uclibc.org/)
-	  or uClibc-ng (available from http://www.uclibc-ng.org)
-	  C library.
-
-config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
-	bool "glibc/eglibc"
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	help
-	  Select this option if your external toolchain uses the GNU C
-	  library (available from https://www.gnu.org/software/libc/)
-	  or its variant the eglibc library (http://www.eglibc.org/).
-
-	  Note: eglibc is a variant of glibc that (among other things)
-	  can be configured to exclude some of its features. Using a
-	  toolchain with eglibc configured to exclude key features may
-	  cause build failures to some packages.
-
-comment "glibc only available with shared lib support"
-	depends on BR2_STATIC_LIBS
-
-config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
-	bool "musl"
-	select BR2_TOOLCHAIN_EXTERNAL_MUSL
-	help
-	  Select this option if your external toolchain uses the
-	  'musl' C library, available from http://www.musl-libc.org/.
-
-endchoice
-
-if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
-
-config BR2_TOOLCHAIN_EXTERNAL_WCHAR
-	bool "Toolchain has WCHAR support?"
-	select BR2_USE_WCHAR
-	help
-	  Select this option if your external toolchain supports
-	  WCHAR. If you don't know, leave the default value, Buildroot
-	  will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_LOCALE
-	bool "Toolchain has locale support?"
-	select BR2_TOOLCHAIN_EXTERNAL_WCHAR
-	select BR2_ENABLE_LOCALE
-	help
-	  Select this option if your external toolchain has locale
-	  support. If you don't know, leave the default value,
-	  Buildroot will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
-	bool "Toolchain has threads support?"
-	select BR2_TOOLCHAIN_HAS_THREADS
-	default y
-	help
-	  Select this option if your external toolchain has thread
-	  support. If you don't know, leave the default value,
-	  Buildroot will tell you if it's correct or not.
-
-if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
-
-config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
-	bool "Toolchain has threads debugging support?"
-	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
-	default y
-	help
-	  Select this option if your external toolchain has thread
-	  debugging support. If you don't know, leave the default
-	  value, Buildroot will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
-	bool "Toolchain has NPTL threads support?"
-	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	default y
-	help
-	  Select this option if your external toolchain uses the NPTL
-	  (Native Posix Thread Library) implementation of Posix
-	  threads. If you don't know, leave the default value,
-	  Buildroot will tell you if it's correct or not.
-
-endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
-
-endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
-
-config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
-	bool "Toolchain has SSP support?"
-	select BR2_TOOLCHAIN_HAS_SSP
-	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	default y if BR2_TOOLCHAIN_EXTERNAL_MUSL
-	help
-	  Selection this option if your external toolchain has Stack
-	  Smashing Protection support enabled. If you don't know,
-	  leave the default value, Buildroot will tell you if it's
-	  correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
-	bool "Toolchain has RPC support?"
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL
-	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	help
-	  Select this option if your external toolchain supports
-	  RPC. If you don't know, leave the default value, Buildroot
-	  will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_CXX
-	bool "Toolchain has C++ support?"
-	select BR2_INSTALL_LIBSTDCPP
-	help
-	  Select this option if your external toolchain has C++
-	  support. If you don't know, leave the default value,
-	  Buildroot will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
-	bool "Toolchain has Fortran support?"
-	select BR2_TOOLCHAIN_HAS_FORTRAN
-	help
-	  Select this option if your external toolchain has Fortran
-	  support. If you don't know, leave the default value,
-	  Buildroot will tell you if it's correct or not.
-
-config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
-	string "Extra toolchain libraries to be copied to target"
-	help
-	  If your external toolchain provides extra libraries that
-	  need to be copied to the target filesystem, enter them
-	  here, separated by spaces.
-
-endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+# Custom toolchains
+source "toolchain/toolchain-external/toolchain-external-custom/Config.in.options"
 
 config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
 	bool "Copy gdb server to the Target"
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in b/toolchain/toolchain-external/toolchain-external-custom/Config.in
new file mode 100644
index 0000000..a913feb
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in
@@ -0,0 +1,5 @@
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+	bool "Custom toolchain"
+	help
+	  Use this option to use a custom toolchain pre-installed on
+	  your system.
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
new file mode 100644
index 0000000..cdc2555
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
@@ -0,0 +1,334 @@
+if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-custom"
+
+config BR2_TOOLCHAIN_EXTERNAL_URL
+	string "Toolchain URL"
+	depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
+	help
+	  URL of the custom toolchain tarball to download and install.
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
+	string "Toolchain prefix"
+	default "$(ARCH)-linux"
+
+choice
+	bool "External toolchain gcc version"
+	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
+	help
+	  Set to the gcc version that is used by your external
+	  toolchain.
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_6
+	bool "6.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_5
+	bool "5.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
+	bool "4.9.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
+	bool "4.8.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
+	bool "4.7.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
+	bool "4.6.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
+	bool "4.5.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
+	bool "4.4.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
+	bool "4.3.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+
+endchoice
+
+choice
+	bool "External toolchain kernel headers series"
+	default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
+	help
+	  Set to the kernel headers version that were used to build
+	  this external toolchain.
+
+	  This is used to hide/show some packages that have strict
+	  requirements on the version of kernel headers.
+
+	  If unsure what version your toolchain is using, you can look
+	  at the value of LINUX_VERSION_CODE in linux/version.h in your
+	  toolchain. The Linux version is M.m.p, with:
+	    M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF
+	    m = ( LINUX_VERSION_CODE >> 8  ) & 0xFF
+	    p = ( LINUX_VERSION_CODE >> 0  ) & 0xFF
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8
+	bool "4.8.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7
+	bool "4.7.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6
+	bool "4.6.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5
+	bool "4.5.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4
+	bool "4.4.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3
+	bool "4.3.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2
+	bool "4.2.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1
+	bool "4.1.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0
+	bool "4.0.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19
+	bool "3.19.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18
+	bool "3.18.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17
+	bool "3.17.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
+	bool "3.16.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
+	bool "3.15.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
+	bool "3.14.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
+	bool "3.13.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
+	bool "3.12.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
+	bool "3.11.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
+	bool "3.10.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
+	bool "3.9.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
+	bool "3.8.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
+	bool "3.7.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
+	bool "3.6.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
+	bool "3.5.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
+	bool "3.4.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
+	bool "3.3.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
+	bool "3.2.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
+	bool "3.1.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
+	bool "3.0.x"
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+
+config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
+	bool "2.6.x"
+
+endchoice
+
+choice
+	prompt "External toolchain C library"
+	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+	bool "uClibc/uClibc-ng"
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	# For the time being, we assume that all custom external
+	# toolchains have shadow password support.
+	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+	help
+	  Select this option if your external toolchain uses the
+	  uClibc (available from http://www.uclibc.org/)
+	  or uClibc-ng (available from http://www.uclibc-ng.org)
+	  C library.
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
+	bool "glibc/eglibc"
+	depends on !BR2_STATIC_LIBS
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	help
+	  Select this option if your external toolchain uses the GNU C
+	  library (available from https://www.gnu.org/software/libc/)
+	  or its variant the eglibc library (http://www.eglibc.org/).
+
+	  Note: eglibc is a variant of glibc that (among other things)
+	  can be configured to exclude some of its features. Using a
+	  toolchain with eglibc configured to exclude key features may
+	  cause build failures to some packages.
+
+comment "(e)glibc only available with shared lib support"
+	depends on BR2_STATIC_LIBS
+
+config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
+	bool "musl (experimental)"
+	select BR2_TOOLCHAIN_EXTERNAL_MUSL
+	help
+	  Select this option if your external toolchain uses the
+	  'musl' C library, available from http://www.musl-libc.org/.
+
+endchoice
+
+if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_WCHAR
+	bool "Toolchain has WCHAR support?"
+	select BR2_USE_WCHAR
+	help
+	  Select this option if your external toolchain supports
+	  WCHAR. If you don't know, leave the default value, Buildroot
+	  will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_LOCALE
+	bool "Toolchain has locale support?"
+	select BR2_TOOLCHAIN_EXTERNAL_WCHAR
+	select BR2_ENABLE_LOCALE
+	help
+	  Select this option if your external toolchain has locale
+	  support. If you don't know, leave the default value,
+	  Buildroot will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
+	bool "Toolchain has threads support?"
+	select BR2_TOOLCHAIN_HAS_THREADS
+	default y
+	help
+	  Select this option if your external toolchain has thread
+	  support. If you don't know, leave the default value,
+	  Buildroot will tell you if it's correct or not.
+
+if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
+
+config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
+	bool "Toolchain has threads debugging support?"
+	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+	default y
+	help
+	  Select this option if your external toolchain has thread
+	  debugging support. If you don't know, leave the default
+	  value, Buildroot will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
+	bool "Toolchain has NPTL threads support?"
+	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	default y
+	help
+	  Select this option if your external toolchain uses the NPTL
+	  (Native Posix Thread Library) implementation of Posix
+	  threads. If you don't know, leave the default value,
+	  Buildroot will tell you if it's correct or not.
+
+endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
+
+endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
+
+config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
+	bool "Toolchain has SSP support?"
+	select BR2_TOOLCHAIN_HAS_SSP
+	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	default y if BR2_TOOLCHAIN_EXTERNAL_MUSL
+	help
+	  Selection this option if your external toolchain has Stack
+	  Smashing Protection support enabled. If you don't know,
+	  leave the default value, Buildroot will tell you if it's
+	  correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
+	bool "Toolchain has RPC support?"
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL
+	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	help
+	  Select this option if your external toolchain supports
+	  RPC. If you don't know, leave the default value, Buildroot
+	  will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTERNAL_CXX
+	bool "Toolchain has C++ support?"
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Select this option if your external toolchain has C++
+	  support. If you don't know, leave the default value,
+	  Buildroot will tell you if it's correct or not.
+
+config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
+	string "Extra toolchain libraries to be copied to target"
+	help
+	  If your external toolchain provides extra libraries that
+	  need to be copied to the target filesystem, enter them
+	  here, separated by spaces. They will be copied to the
+	  target's /lib directory.
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
new file mode 100644
index 0000000..c4ae612
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# toolchain-external-custom
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_CUSTOM_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
+TOOLCHAIN_EXTERNAL_CUSTOM_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
+
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),y)
+# We can't check hashes for custom downloaded toolchains
+BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
+endif
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 0680473..e13d240 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -69,12 +69,6 @@ else
 TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
 endif
 TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
-else
-# Custom toolchain
-TOOLCHAIN_EXTERNAL_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
-TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
-# We can't check hashes for custom downloaded toolchains
-BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
 endif
 
 # Some toolchain vendors have a regular file naming pattern.
-- 
2.10.2

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

* [Buildroot] [PATCH v4 21/22] toolchain-external-arc: new package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (19 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 20/22] toolchain-external-custom: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-22 21:51   ` Romain Naour
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains Arnout Vandecappelle
                   ` (2 subsequent siblings)
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

This commit adds a new package for the Synopsys external toolchain for
the ARC architecture.

The legacy implementation is removed.

Note that this toolchain is marked as BROKEN, but 2016.09 seems about
to be released so maybe it will be unbroken soon.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v4: add PREFIX definition, remove legacy implementation.
---
 toolchain/toolchain-external/Config.in             | 29 +++++-----------------
 .../toolchain-external-synopsys-arc/Config.in      | 20 +++++++++++++++
 .../Config.in.options                              | 10 ++++++++
 .../toolchain-external-synopsys-arc.hash           |  5 ++++
 .../toolchain-external-synopsys-arc.mk             | 24 ++++++++++++++++++
 .../toolchain-external/toolchain-external.hash     |  6 -----
 toolchain/toolchain-external/toolchain-external.mk | 13 ----------
 7 files changed, 65 insertions(+), 42 deletions(-)
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
 create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index e592ec2..fb33703 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -15,6 +15,9 @@ comment "glibc toolchains only available with shared lib support"
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
 
+# ARC
+source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in"
+
 # ARM (use Linaro toolchain by default)
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
@@ -93,27 +96,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
 	  This toolchain uses software-floating point.
 
-config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
-	bool "Synopsys ARC 2014.12 toolchain"
-	depends on BR2_arc
-	depends on BR2_HOSTARCH = "x86_64"
-	# does not provide IPv6, and lacks many uClibc features
-	# expected by Buildroot. The next Synopsys toolchain version
-	# should fix those problems.
-	depends on BROKEN
-	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_ENABLE_LOCALE
-	select BR2_USE_WCHAR
-	select BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
-	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
-	help
-	  Toolchain for the ARC cores, from
-	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
-
 endchoice
 
 choice
@@ -147,8 +129,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
 
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
-	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
-	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 
@@ -182,6 +162,9 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
 source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
 
+# ARC
+source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options"
+
 # ARM
 source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
 source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
new file mode 100644
index 0000000..641eca8
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
@@ -0,0 +1,20 @@
+config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
+	bool "Synopsys ARC 2014.12 toolchain"
+	depends on BR2_arc
+	depends on BR2_HOSTARCH = "x86_64"
+	# does not provide IPv6, and lacks many uClibc features
+	# expected by Buildroot. The next Synopsys toolchain version
+	# should fix those problems.
+	depends on BROKEN
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	select BR2_ENABLE_LOCALE
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	help
+	  Toolchain for the ARC cores, from
+	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
new file mode 100644
index 0000000..ceb7dd0
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
@@ -0,0 +1,10 @@
+if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
+
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	default "arc-linux"		 if BR2_arcle
+	default "arceb-linux"		 if BR2_arceb
+
+config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
+	default "toolchain-external-synopsys-arc"
+
+endif
diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
new file mode 100644
index 0000000..b684cce
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+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
+sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
+sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
new file mode 100644
index 0000000..14ea5e3
--- /dev/null
+++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
@@ -0,0 +1,24 @@
+################################################################################
+#
+# toolchain-external-synopsys-arc
+#
+################################################################################
+
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2014.12
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)
+
+ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = arc700
+else
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = archs
+endif
+
+ifeq ($(BR2_arcle),y)
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = le
+else
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = be
+endif
+
+TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SOURCE = arc_gnu_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
+
+$(eval $(toolchain-external-package))
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
index a286ef2..cc93998 100644
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ b/toolchain/toolchain-external/toolchain-external.hash
@@ -6,9 +6,3 @@
 sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
 sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
 sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
-
-# 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
-sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
-sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index e13d240..53f5583 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -56,19 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	rm -rf $(@D)/arago-2011.09/
 endef
 TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y)
-TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12
-ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
-TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = arc700
-else
-TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = archs
-endif
-ifeq ($(BR2_arcle),y)
-TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = le
-else
-TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
-endif
-TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
 endif
 
 # Some toolchain vendors have a regular file naming pattern.
-- 
2.10.2

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

* [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (20 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 21/22] toolchain-external-arc: " Arnout Vandecappelle
@ 2016-11-07  1:20 ` Arnout Vandecappelle
  2016-11-07 22:49   ` Romain Naour
  2016-11-07  9:39 ` [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Romain NAOUR
  2016-11-23 21:39 ` Thomas Petazzoni
  23 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-07  1:20 UTC (permalink / raw)
  To: buildroot

The Arago toolchains are no longer maintained and haven't been updated
for a long time.

With this removal, all the legacy toolchain-external support can be
removed as well.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 Config.in.legacy                                   |  16 +++
 toolchain/toolchain-external/Config.in             |  53 +--------
 .../toolchain-external/toolchain-external.hash     |   8 --
 toolchain/toolchain-external/toolchain-external.mk | 123 ---------------------
 4 files changed, 19 insertions(+), 181 deletions(-)
 delete mode 100644 toolchain/toolchain-external/toolchain-external.hash

diff --git a/Config.in.legacy b/Config.in.legacy
index 8c41b05..ccf06c0 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -143,6 +143,22 @@ comment "----------------------------------------------------"
 endif
 
 ###############################################################################
+comment "Legacy options removed in 2017.02"
+
+config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
+	bool "Arago ARMv7 2011.09 removed"
+	select BR2_LEGACY
+	help
+	  The Arago toolchains are every old and not updated anymore.
+
+config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
+	bool "Arago ARMv5 2011.09 removed"
+	select BR2_LEGACY
+	help
+	  The Arago toolchains are every old and not updated anymore.
+
+
+###############################################################################
 comment "Legacy options removed in 2016.11"
 
 config BR2_PACKAGE_PHP_SAPI_CLI_CGI
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index fb33703..2c39e5a 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -51,51 +51,6 @@ source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
 # architecture.
 source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
 
-config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
-	bool "Arago ARMv7 2011.09"
-	depends on BR2_arm
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on BR2_ARM_CPU_ARMV7A
-	depends on BR2_ARM_EABI
-	depends on BR2_ARM_CPU_HAS_VFPV3
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
-	# kernel headers: 2.6.31
-	help
-	  Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3,
-	  binutils 2.20.1, glibc 2.12, gdb 7.2.
-
-	  This toolchain uses -mfloat-abi=softfp (i.e can use FPU
-	  instructions, but passes floating point function arguments
-	  in integer registers), and requires a VFPv3 floating point
-	  unit to work properly. This unit is available on most
-	  Cortex-A ARM processors, but not all.
-
-config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-	bool "Arago ARMv5 2011.09"
-	depends on BR2_arm
-	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
-	depends on !BR2_ARM_CPU_ARMV4
-	depends on BR2_ARM_EABI
-	depends on !BR2_STATIC_LIBS
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_TOOLCHAIN_HAS_SSP
-	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_INSTALL_LIBSTDCPP
-	select BR2_HOSTARCH_NEEDS_IA32_LIBS
-	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
-	# kernel headers: 2.6.31
-	help
-	  Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc
-	  4.5.3, binutils 2.20.1, glibc 2.12, gdb 7.2.
-
-	  This toolchain uses software-floating point.
-
 endchoice
 
 choice
@@ -127,11 +82,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
 	help
 	  Path to where the external toolchain is installed.
 
-config BR2_TOOLCHAIN_EXTERNAL_PREFIX
-	string
-	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
-	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
-
 config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	bool
 	select BR2_TOOLCHAIN_USES_GLIBC
@@ -154,6 +104,9 @@ config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
 config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
 	string
 
+config BR2_TOOLCHAIN_EXTERNAL_PREFIX
+	string
+
 # Kept toolchains sorted as in the choice above
 # The toolchain Config.in.options must define
 # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
deleted file mode 100644
index cc93998..0000000
--- a/toolchain/toolchain-external/toolchain-external.hash
+++ /dev/null
@@ -1,8 +0,0 @@
-######################################
-# Next hashes are all locally computed
-
-# ARM toolchains from Texas Instrument's Arago project
-# There is one source file that covers both binary distributions.
-sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
-sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
-sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 53f5583..48de1e7 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -15,129 +15,6 @@ ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
 TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
 endif
 
-# All the definition that are common between the toolchain-external
-# generic package and the toolchain-external-package infrastructure
-# can be found in pkg-toolchain-external.mk
-
-# Legacy toolchains that don't use the toolchain-external-package infrastructure
-# yet. We can recognise that because no provider is set.
-ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL)),)
-
-# Now we are the provider. However, we can't set it to ourselves or we'll get a
-# circular dependency. Let's set it to a target that we always depend on
-# instead.
-BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL = skeleton
-
-TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
-
-# In fact, we don't need to download the toolchain, since it is already
-# available on the system, so force the site and source to be empty so
-# that nothing will be downloaded/extracted.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
-TOOLCHAIN_EXTERNAL_SITE =
-TOOLCHAIN_EXTERNAL_SOURCE =
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
-define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(@D)/arago-2011.09/armv7a/* $(@D)/
-	rm -rf $(@D)/arago-2011.09/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE),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
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
-define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-	mv $(@D)/arago-2011.09/armv5te/* $(@D)/
-	rm -rf $(@D)/arago-2011.09/
-endef
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
-endif
-
-# Some toolchain vendors have a regular file naming pattern.
-# For them, mass-define _ACTUAL_SOURCE_TARBALL based _SITE.
-ifneq ($(findstring sourcery.mentor.com/public/gnu_toolchain,$(TOOLCHAIN_EXTERNAL_SITE)),)
-TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
-	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
-endif
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
-TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
-
-TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
-	TOOLCHAIN_EXTERNAL_MOVE
-endif
-
-# Checks for an already installed toolchain: check the toolchain
-# location, check that it is usable, and then verify that it
-# matches the configuration provided in Buildroot: ABI, C++ support,
-# kernel headers version, type of C library and all C library features.
-define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
-	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
-	$(Q)$(call check_unusable_toolchain,$(TOOLCHAIN_EXTERNAL_CC))
-	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
-	$(call check_kernel_headers_version,\
-		$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
-		$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
-	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
-		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
-	if test "$(BR2_arm)" = "y" ; then \
-		$(call check_arm_abi,\
-			"$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
-			$(TOOLCHAIN_EXTERNAL_READELF)) ; \
-	fi ; \
-	if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
-		$(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
-	fi ; \
-	if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
-		$(call check_fortran,$(TOOLCHAIN_EXTERNAL_FC)) ; \
-	fi ; \
-	if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
-		$(call check_uclibc,$${SYSROOT_DIR}) ; \
-	elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
-		$(call check_musl,$${SYSROOT_DIR}) ; \
-	else \
-		$(call check_glibc,$${SYSROOT_DIR}) ; \
-	fi
-	$(Q)$(call check_toolchain_ssp,$(TOOLCHAIN_EXTERNAL_CC))
-endef
-
-TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_WRAPPER_BUILD)
-
-define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
-	$(TOOLCHAIN_WRAPPER_INSTALL)
-	$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
-endef
-
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
-TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
-endif
-
-# Even though we're installing things in both the staging, the host
-# and the target directory, we do everything within the
-# install-staging step, arbitrarily.
-define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
-	$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
-	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT)
-	$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
-endef
-
-endif # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
-
-
-# Since a virtual package is just a generic package, we can still
-# define commands for the legacy toolchains.
 $(eval $(virtual-package))
 
 # Ensure the external-toolchain package has a prefix defined.
-- 
2.10.2

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

* [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (21 preceding siblings ...)
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains Arnout Vandecappelle
@ 2016-11-07  9:39 ` Romain NAOUR
  2016-11-23 21:39 ` Thomas Petazzoni
  23 siblings, 0 replies; 55+ messages in thread
From: Romain NAOUR @ 2016-11-07  9:39 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 2016-11-07 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :

> I reworked Romain's series. I'm too tired now to write a proper cover
> letter, but here it goes anyway :-)
> 
> I may have screwed up authorship or date of some of these patches. Oh
> well, who cares :-P

Thank you for the rework.
I've started to review it yesterday on your github, I'll finish ASAP.

Best regards,
Romain

> 
> Regards,
> Arnout
> 
> ---
> 
> The following changes since commit
> 6bb7430a20871ad4e3ccbc8c1992d60117214be2:
> 
> Makefile: delete default rules (2016-11-05 23:34:26 +0100)
> 
> are available in the git repository at:
> 
> http://github.com/arnout/buildroot [1] external-toolchain
> 
> for you to fetch changes up to 
> ad925c956093b8fcd04d084471b78f9ca074cbb9:
> 
> toolchain-external: remove Arago toolchains (2016-11-07 02:15:06 
> +0100)
> 
> ----------------------------------------------------------------
> Arnout Vandecappelle (6):
> Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere
> toolchain-external: reorder the contents of toolchain-external.mk
> toolchain-external: move parts to pkg-toolchain-external.mk
> toolchain-external: introduce toolchain-external-package
> toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not
> supported
> toolchain-external: remove Arago toolchains
> 
> Romain Naour (1):
> toolchain-external-codesourcery-amd64: new package
> 
> Thomas Petazzoni (15):
> toolchain-external-linaro-aarch64: new package
> toolchain-external-codesourcery-aarch64: new package
> toolchain-external-linaro-arm: new package
> toolchain-external-codesourcery-arm: new package
> toolchain-external-linaro-armeb: new package
> toolchain-external-blackfin-uclinux: new package
> toolchain-external-codesourcery-mips: new package
> toolchain-external-codescape-img-mips: new package
> toolchain-external-codescape-mti-mips: new package
> toolchain-external-codesourcery-niosII: new package
> toolchain-external-codesourcery-sh: new package
> toolchain-external-codesourcery-x86: new package
> toolchain-external-musl-cross: new package
> toolchain-external-custom: new package
> toolchain-external-arc: new package
> 
> Config.in.legacy | 16 +
> package/Makefile.in | 2 +-
> package/wine/wine.mk | 2 +-
> toolchain/toolchain-external/Config.in | 982
> ++++--------------------------------------------------
> toolchain/toolchain-external/pkg-toolchain-external.mk | 674
> +++++++++++++++++++++++++++++++++++++
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
> | 17 +
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
> | 10 +
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
> | 33 ++
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
> | 62 ++++
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
> | 9 +
> 
.../toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
> | 47 +++
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
> | 73 ++++
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
> | 9 +
> 
.../toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
> | 47 +++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> | 17 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
> | 9 +
> 
.../toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
> | 3 +
> 
.../toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
> | 22 ++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
> | 24 ++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
> | 9 +
> 
.../toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
> | 12 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> | 35 ++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
> | 13 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
> | 93 ++++++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
> | 13 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
> | 17 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
> | 9 +
> 
.../toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
> | 3 +
> 
.../toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
> | 13 +
> toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
> | 25 ++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
> | 13 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
> | 29 ++
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
> | 12 +
> toolchain/toolchain-external/toolchain-external-custom/Config.in | 5 +
> toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> | 334 +++++++++++++++++++
> 
toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
> | 15 +
> toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
> | 15 +
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
> | 16 +
> toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in |
> 27 ++
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
> | 16 +
> toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in 
> |
> 26 ++
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
> | 9 +
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
> | 3 +
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
> | 16 +
> toolchain/toolchain-external/toolchain-external-musl-cross/Config.in |
> 30 ++
> 
toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
> | 19 ++
> 
toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
> | 12 +
> 
toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
> | 12 +
> toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in 
> |
> 20 ++
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
> | 10 +
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
> | 5 +
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
> | 24 ++
> toolchain/toolchain-external/toolchain-external.hash | 67 ----
> toolchain/toolchain-external/toolchain-external.mk | 792
> +------------------------------------------
> 70 files changed, 2145 insertions(+), 1766 deletions(-)
> create mode 100644
> toolchain/toolchain-external/pkg-toolchain-external.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-custom/Config.in
> create mode 100644
> toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
> create mode 100644
> toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
> create mode 100644
> 
toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
> delete mode 100644 
> toolchain/toolchain-external/toolchain-external.hash
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot [2]


Links:
------
[1] http://github.com/arnout/buildroot
[2] http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
@ 2016-11-07 21:06   ` Romain Naour
  2016-11-09 21:51   ` Thomas Petazzoni
  1 sibling, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 21:06 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> The BR2_TOOLCHAIN_EXTERNAL_PREFIX variable is already qstripped and
> stored in the TOOLCHAIN_EXTERNAL_PREFIX variable in
> toolchain-external.mk, so use this variable everywhere.
> 
> This will be useful for a later patch that makes the derivation of
> TOOLCHAIN_EXTERNAL_PREFIX a little more complex.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> [Arnout: split off into separate patch]
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain


> ---
> v4: split off into separate patch [Arnout]
> ---
>  package/Makefile.in  | 2 +-
>  package/wine/wine.mk | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 5d591e9..bd73219 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -184,7 +184,7 @@ endif
>  ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
>  TARGET_CROSS = $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-
>  else
> -TARGET_CROSS = $(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))-
> +TARGET_CROSS = $(HOST_DIR)/usr/bin/$(TOOLCHAIN_EXTERNAL_PREFIX)-
>  endif
>  
>  # Define TARGET_xx variables for all common binutils/gcc
> diff --git a/package/wine/wine.mk b/package/wine/wine.mk
> index d9a0ecf..47ba90a 100644
> --- a/package/wine/wine.mk
> +++ b/package/wine/wine.mk
> @@ -34,7 +34,7 @@ WINE_CONF_OPTS = \
>  # wrapper believes what the real gcc is named, and force the tuple of
>  # the external toolchain, not the one we compute in GNU_TARGET_NAME.
>  ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
> -WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))"
> +WINE_CONF_OPTS += TARGETFLAGS="-b $(TOOLCHAIN_EXTERNAL_PREFIX)"
>  endif
>  
>  ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy)
> 

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

* [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk Arnout Vandecappelle
@ 2016-11-07 21:26   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 21:26 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> When the toolchain-external logic will be split into separate packages,
> the order in which things are defined in toolchain-external.mk no
> makes less sense. So reorder things in a more logical fashion.
> 
> Also add a few more comments to the different sections.
> 
> No functional changes at all. The output of 'make -qp' hasn't changed,
> except for the order of arguments in
> TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> [Arnout: split off into separate patch, slightly change some comments,
>  reordered some parts]
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

I reviewed as carefully as possible, It should be fine.

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

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

* [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk Arnout Vandecappelle
@ 2016-11-07 21:34   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 21:34 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> pkg-toolchain-external.mk will be used later to define the
> toolchain-external-package infra. Most of the variable and macro
> definitions are shared with the legacy generic-package based
> toolchain-external. Move these to pkg-toolchain-external.mk.
> 
> pkg-toolchain-external.mk is included implicitly by the include
> toolchain/*/*.mk in the top-level Makefile. The order of inclusion is
> not defined, but that doesn't matter because none of the variables
> defined in pkg-toolchain-external.mk are used in conditions or in
> rules in toolchain-external.mk, only in recursively-expanded
> variables.
> 
> No functional changes at all. The output of 'make -qp' hasn't changed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> [Arnout: split off into separate patch]
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package Arnout Vandecappelle
@ 2016-11-07 22:16   ` Romain Naour
  2016-11-08  1:00     ` Arnout Vandecappelle
  0 siblings, 1 reply; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:16 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> The toolchain-external-package infrastructure is just a copy of the
> toolchain-external commands, replacing TOOLCHAIN_EXTERNAL by $(2)
> and adding double-dollars everywhere.
> 
> toolchain-external itself is converted to a virtual package, but it
> is faked a little to make sue the toolchains that haven't been
> converted to toolchain-external-package yet keep on working.
> 
> The TOOLCHAIN_EXTERNAL_MOVE commands don't have to be redefined
> for every toolchain-external-package instance, so that is moved
> out into the common part of pkg-toolchain-external.mk.
> 
> The musl-compat-headers dependency stays in the toolchain-external
> package itself.
> 
> The musl ld link is duplicated in the legacy toolchain-external and
> the toolchain-external-package, because they have separate hooks.
> 
> The handling of TOOLCHAIN_EXTERNAL_BIN deserves some special attention,
> because its value will be different for different
> toolchain-external-package instances. However, the value only depends
> on variables that are set by Kconfig (BR2_TOOLCHAIN_EXTERNAL_PREFIX
> and BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD) so it can easily be used in
> the generic part. So we don't have to do anything specific for this
> variable after all.

About the TOOLCHAIN_EXTERNAL_BIN definition for ADI bfin toolchains
(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX), I dropped it in my series but it
looks suspicious how it can worked for me...

The tarballs contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories,
which themselves contain the toolchain, so we still need to add the toolchain
prefix...

> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Romain Naour <romain.naour@gmail.com>
> ---
> v4: Move all variables out of the toolchain-external-package infra,
>     except for those that are explicitly needed by that infra.
> ---
>  toolchain/toolchain-external/Config.in             |   8 ++
>  .../toolchain-external/pkg-toolchain-external.mk   | 124 +++++++++++++++++++--
>  toolchain/toolchain-external/toolchain-external.mk |  48 ++++++--
>  3 files changed, 159 insertions(+), 21 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 5324599..65a4216 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -667,6 +667,14 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL
>  	# Compatibility headers: cdefs.h, queue.h
>  	select BR2_PACKAGE_MUSL_COMPAT_HEADERS
>  
> +# Make sure the virtual-package infra checks the provider
> +config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
> +	bool
> +	default y
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	string
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/pkg-toolchain-external.mk b/toolchain/toolchain-external/pkg-toolchain-external.mk
> index 583b0d6..3cac520 100644
> --- a/toolchain/toolchain-external/pkg-toolchain-external.mk
> +++ b/toolchain/toolchain-external/pkg-toolchain-external.mk
> @@ -98,6 +98,17 @@ TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFF
>  TOOLCHAIN_EXTERNAL_FC = $(TOOLCHAIN_EXTERNAL_CROSS)gfortran$(TOOLCHAIN_EXTERNAL_SUFFIX)
>  TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX)
>  
> +# Normal handling of downloaded toolchain tarball extraction.
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
> +# As a regular package, the toolchain gets extracted in $(@D), but
> +# since it's actually a fairly special package, we need it to be moved
> +# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
> +define TOOLCHAIN_EXTERNAL_MOVE
> +	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
> +	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
> +	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
> +endef
> +endif
>  
>  #
>  # Definitions of the list of libraries that should be copied to the target.
> @@ -474,15 +485,6 @@ endef
>  
>  # Various utility functions used by the external toolchain based on musl.
>  
> -# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
> -# So, add the musl-compat-headers package that will install those files,
> -# into the staging directory:
> -#   sys/queue.h:  header from NetBSD
> -#   sys/cdefs.h:  minimalist header bundled in Buildroot
> -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> -TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
> -endif
> -
>  # With the musl C library, the libc.so library directly plays the role
>  # of the dynamic library loader. We just need to create a symbolic
>  # link to libc.so with the appropriate name.
> @@ -501,7 +503,6 @@ endif
>  define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
>  	ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1
>  endef
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
>  endif
>  
>  #
> @@ -568,3 +569,106 @@ define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO
>  		ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \
>  	fi
>  endef
> +
> +
> +################################################################################
> +# inner-toolchain-external-package -- defines the generic installation rules
> +# for external toolchain packages
> +#
> +#  argument 1 is the lowercase package name
> +#  argument 2 is the uppercase package name, including a HOST_ prefix
> +#             for host packages
> +#  argument 3 is the uppercase package name, without the HOST_ prefix
> +#             for host packages
> +#  argument 4 is the type (target or host)
> +################################################################################
> +define inner-toolchain-external-package
> +
> +$(2)_INSTALL_STAGING = YES
> +$(2)_ADD_TOOLCHAIN_DEPENDENCY = NO
> +
> +# In fact, we don't need to download the toolchain, since it is already
> +# available on the system, so force the site and source to be empty so
> +# that nothing will be downloaded/extracted.
> +ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
> +$(2)_SITE =
> +$(2)_SOURCE =
> +endif
> +
> +ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
> +$(2)_EXCLUDES = usr/lib/locale/*
> +
> +$(2)_POST_EXTRACT_HOOKS += \
> +	TOOLCHAIN_EXTERNAL_MOVE
> +endif
> +
> +# Checks for an already installed toolchain: check the toolchain
> +# location, check that it is usable, and then verify that it
> +# matches the configuration provided in Buildroot: ABI, C++ support,
> +# kernel headers version, type of C library and all C library features.
> +define $(2)_CONFIGURE_CMDS
> +	$$(Q)$$(call check_cross_compiler_exists,$$(TOOLCHAIN_EXTERNAL_CC))
> +	$$(Q)$$(call check_unusable_toolchain,$$(TOOLCHAIN_EXTERNAL_CC))
> +	$$(Q)SYSROOT_DIR="$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC))" ; \
> +	$$(call check_kernel_headers_version,\
> +		$$(call toolchain_find_sysroot,$$(TOOLCHAIN_EXTERNAL_CC)),\
> +		$$(call qstrip,$$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
> +	$$(call check_gcc_version,$$(TOOLCHAIN_EXTERNAL_CC),\
> +		$$(call qstrip,$$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
> +	if test "$$(BR2_arm)" = "y" ; then \
> +		$$(call check_arm_abi,\
> +			"$$(TOOLCHAIN_EXTERNAL_CC) $$(TOOLCHAIN_EXTERNAL_CFLAGS)",\
> +			$$(TOOLCHAIN_EXTERNAL_READELF)) ; \
> +	fi ; \
> +	if test "$$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
> +		$$(call check_cplusplus,$$(TOOLCHAIN_EXTERNAL_CXX)) ; \
> +	fi ; \
> +	if test "$$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
> +		$$(call check_fortran,$$(TOOLCHAIN_EXTERNAL_FC)) ; \
> +	fi ; \
> +	if test "$$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
> +		$$(call check_uclibc,$$$${SYSROOT_DIR}) ; \
> +	elif test "$$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
> +		$$(call check_musl,$$$${SYSROOT_DIR}) ; \
> +	else \
> +		$$(call check_glibc,$$$${SYSROOT_DIR}) ; \
> +	fi
> +	$$(Q)$$(call check_toolchain_ssp,$$(TOOLCHAIN_EXTERNAL_CC))
> +endef
> +
> +$(2)_TOOLCHAIN_WRAPPER_ARGS += $$(TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS)
> +
> +$(2)_BUILD_CMDS = $$(TOOLCHAIN_WRAPPER_BUILD)
> +
> +define $(2)_INSTALL_STAGING_CMDS
> +	$$(TOOLCHAIN_WRAPPER_INSTALL)
> +	$$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
> +endef
> +
> +ifeq ($$(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
> +$(2)_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
> +endif
> +
> +# Even though we're installing things in both the staging, the host
> +# and the target directory, we do everything within the
> +# install-staging step, arbitrarily.
> +define $(2)_INSTALL_TARGET_CMDS
> +	$$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
> +	$$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT)
> +	$$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
> +endef
> +
> +# Call the generic package infrastructure to generate the necessary
> +# make targets
> +$(call inner-generic-package,$(1),$(2),$(3),$(4))
> +
> +endef
> +
> +toolchain-external-package = $(call inner-toolchain-external-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index be1b5e4..bcbcb2e 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -4,12 +4,31 @@
>  #
>  ################################################################################
>  
> +TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
> +


> +# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
> +# So, add the musl-compat-headers package that will install those files,
> +# into the staging directory:
> +#   sys/queue.h:  header from NetBSD
> +#   sys/cdefs.h:  minimalist header bundled in Buildroot
> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> +TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
> +endif

This hunk has moved to phg-toolchain-external.mk in patch 3/22 and now come back
to toolchain-external.mk with this patch.

Otherwise:
Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> +
>  # All the definition that are common between the toolchain-external
>  # generic package and the toolchain-external-package infrastructure
>  # can be found in pkg-toolchain-external.mk
>  
> +# Legacy toolchains that don't use the toolchain-external-package infrastructure
> +# yet. We can recognise that because no provider is set.
> +ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL)),)
> +
> +# Now we are the provider. However, we can't set it to ourselves or we'll get a
> +# circular dependency. Let's set it to a target that we always depend on
> +# instead.
> +BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL = skeleton
> +
>  TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
> -TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO
>  
>  # In fact, we don't need to download the toolchain, since it is already
>  # available on the system, so force the site and source to be empty so
> @@ -201,18 +220,9 @@ TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
>  	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
>  endif
>  
> -# Normal handling of downloaded toolchain tarball extraction.
>  ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
>  TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
>  
> -# As a regular package, the toolchain gets extracted in $(@D), but
> -# since it's actually a fairly special package, we need it to be moved
> -# into TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR.
> -define TOOLCHAIN_EXTERNAL_MOVE
> -	rm -rf $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
> -	mkdir -p $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)
> -	mv $(@D)/* $(TOOLCHAIN_EXTERNAL_DOWNLOAD_INSTALL_DIR)/
> -endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
>  	TOOLCHAIN_EXTERNAL_MOVE
>  endif
> @@ -262,6 +272,10 @@ define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
>  	$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
>  endef
>  
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
> +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
> +endif
> +
>  # Even though we're installing things in both the staging, the host
>  # and the target directory, we do everything within the
>  # install-staging step, arbitrarily.
> @@ -274,5 +288,17 @@ define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
>  	$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
>  endef
>  
> -$(eval $(generic-package))
> +endif # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +
>  
> +# Since a virtual package is just a generic package, we can still
> +# define commands for the legacy toolchains.
> +$(eval $(virtual-package))
> +
> +# Ensure the external-toolchain package has a prefix defined.
> +# This comes after the virtual-package definition, which checks the provider.
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
> +ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),)
> +$(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error)
> +endif
> +endif
> 

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

* [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package Arnout Vandecappelle
@ 2016-11-07 22:23   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:23 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Linaro external toolchain for
> the AArch64 architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 30 ++++++++++------------
>  .../toolchain-external-linaro-aarch64/Config.in    | 15 +++++++++++
>  .../Config.in.options                              |  9 +++++++
>  .../toolchain-external-linaro-aarch64.hash         |  3 +++
>  .../toolchain-external-linaro-aarch64.mk           | 16 ++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  4 +--
>  toolchain/toolchain-external/toolchain-external.mk |  9 ++-----
>  7 files changed, 59 insertions(+), 27 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 65a4216..096f435 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -8,6 +8,12 @@ choice
>  comment "glibc toolchains only available with shared lib support"
>  	depends on BR2_STATIC_LIBS
>  
> +# Kept toolchains sorted by architecture in order to use some toolchain
> +# as default choice
> +
> +# Aarch64 (use Linaro toolchain by default)
> +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
> +
>  comment "Linaro toolchains available for Cortex-A + EABIhf"
>  	depends on BR2_arm || BR2_armeb
>  	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
> @@ -485,22 +491,6 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
>  	  Toolchain for the Blackfin architecture, from
>  	  http://blackfin.uclinux.org.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
> -	bool "Linaro AArch64 2016.05"
> -	depends on BR2_aarch64
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Toolchain for the AArch64 architecture, from
> -	  http://www.linaro.org/engineering/armv8/
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
>  	bool "CodeSourcery AArch64 2014.11"
>  	depends on BR2_aarch64
> @@ -628,7 +618,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
>  	default "aarch64-amd-linux-gnu"  if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
>  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
>  	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
> @@ -675,6 +664,13 @@ config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
>  config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
>  	string
>  
> +# Kept toolchains sorted as in the choice above
> +# The toolchain Config.in.options must define
> +# BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +
> +# Aarch64
> +source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
> new file mode 100644
> index 0000000..662f7d7
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in
> @@ -0,0 +1,15 @@
> +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
> +	bool "Linaro AArch64 2016.05"
> +	depends on BR2_aarch64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	select BR2_TOOLCHAIN_HAS_FORTRAN
> +	help
> +	  Toolchain for the AArch64 architecture, from
> +	  http://www.linaro.org/engineering/armv8/
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
> new file mode 100644
> index 0000000..099c6c0
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "aarch64-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-linaro-aarch64"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
> new file mode 100644
> index 0000000..7a2c038
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 d43227248f282a652da42322fcf4abfd3021f2a2f62e0cf6e242d82f55966ba9  gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
> +sha256 1941dcf6229d6706bcb89b7976d5d43d170efdd17c27d5fe1738e7ecf22adc37  gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
> new file mode 100644
> index 0000000..a0543a7
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-aarch64/toolchain-external-linaro-aarch64.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# toolchain-external-linaro-aarch64
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION = 2016.05
> +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)/aarch64-linux-gnu
> +
> +ifeq ($(HOSTARCH),x86)
> +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-i686_aarch64-linux-gnu.tar.xz
> +else
> +TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_AARCH64_VERSION)-x86_64_aarch64-linux-gnu.tar.xz
> +endif
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 41c2ab3..fd1bc6d 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -34,13 +34,11 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
>  sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
>  sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
>  
> -# ARM and Aarch64 toolchains from Linaro
> +# ARM toolchains from Linaro
>  sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
>  sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
>  sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
>  sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
> -sha256 d43227248f282a652da42322fcf4abfd3021f2a2f62e0cf6e242d82f55966ba9  gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
> -sha256 1941dcf6229d6706bcb89b7976d5d43d170efdd17c27d5fe1738e7ecf22adc37  gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
>  
>  # Codescape toolchains from Imagination Technologies
>  # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index bcbcb2e..8a3e4da 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -148,13 +148,6 @@ 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 = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/aarch64-linux-gnu
> -ifeq ($(HOSTARCH),x86)
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_aarch64-linux-gnu.tar.xz
> -else
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz
> -endif
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> @@ -302,3 +295,5 @@ ifeq ($(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)),)
>  $(error No prefix selected for external toolchain package $(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL). Configuration error)
>  endif
>  endif
> +
> +include toolchain/toolchain-external/*/*.mk
> 

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

* [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: " Arnout Vandecappelle
@ 2016-11-07 22:25   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:25 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the AArch64 architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 21 ++-------------------
>  .../Config.in                                      | 17 +++++++++++++++++
>  .../Config.in.options                              |  9 +++++++++
>  .../toolchain-external-codesourcery-aarch64.hash   |  3 +++
>  .../toolchain-external-codesourcery-aarch64.mk     | 22 ++++++++++++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  3 ---
>  toolchain/toolchain-external/toolchain-external.mk | 11 -----------
>  7 files changed, 53 insertions(+), 33 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 096f435..ecf9618 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -13,6 +13,7 @@ comment "glibc toolchains only available with shared lib support"
>  
>  # Aarch64 (use Linaro toolchain by default)
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
>  
>  comment "Linaro toolchains available for Cortex-A + EABIhf"
>  	depends on BR2_arm || BR2_armeb
> @@ -491,24 +492,6 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
>  	  Toolchain for the Blackfin architecture, from
>  	  http://blackfin.uclinux.org.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
> -	bool "CodeSourcery AArch64 2014.11"
> -	depends on BR2_aarch64
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> -	help
> -	  Sourcery CodeBench toolchain for the AArch64 architecture,
> -	  from Mentor Graphics. It uses gcc 4.9.1, binutils
> -	  2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers
> -	  3.16.2.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
>  	bool "Musl 1.1.12 toolchain"
>  	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
> @@ -618,7 +601,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "aarch64-amd-linux-gnu"  if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
>  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
>  	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
>  	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
> @@ -670,6 +652,7 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
>  
>  # Aarch64
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
>  
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> new file mode 100644
> index 0000000..2fbb218
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
> +	bool "CodeSourcery AArch64 2014.11"
> +	depends on BR2_aarch64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +	help
> +	  Sourcery CodeBench toolchain for the AArch64 architecture,
> +	  from Mentor Graphics. It uses gcc 4.9.1, binutils
> +	  2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers
> +	  3.16.2.
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
> new file mode 100644
> index 0000000..1eab839
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "aarch64-amd-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-aarch64"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
> new file mode 100644
> index 0000000..f7d3f29
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> +sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
> new file mode 100644
> index 0000000..bc58c44
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/toolchain-external-codesourcery-aarch64.mk
> @@ -0,0 +1,22 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-aarch64
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION = 2014.11-95
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_SOURCE = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_ACTUAL_SOURCE_TARBALL = aarch64-amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
> +	ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
> +endef
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
> +
> +define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
> +	ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
> +endef
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index fd1bc6d..666cd02 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -21,9 +21,6 @@ sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-20
>  # AMD64
>  sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
> -# Aarch64
> -sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716  aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2
>  # MIPS
>  sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 8a3e4da..2571539 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -148,17 +148,6 @@ 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_CODESOURCERY_AARCH64),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
> -	ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1
> -endef
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP
> -define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
> -	ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1
> -endef
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
>  TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
>  TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> 

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

* [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: " Arnout Vandecappelle
@ 2016-11-07 22:26   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:26 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Linaro external toolchain for the
> ARM architecture.
> 
> The legacy implementation is removed.
> 
> The comment about availability is duplicated for arm and armeb.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 32 +++++-----------------
>  .../toolchain-external-linaro-arm/Config.in        | 27 ++++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-linaro-arm.hash             |  3 ++
>  .../toolchain-external-linaro-arm.mk               | 16 +++++++++++
>  .../toolchain-external/toolchain-external.hash     |  2 --
>  toolchain/toolchain-external/toolchain-external.mk |  7 -----
>  7 files changed, 62 insertions(+), 34 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index ecf9618..bffb9fd 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -15,34 +15,14 @@ comment "glibc toolchains only available with shared lib support"
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
>  
> +# ARM (use Linaro toolchain by default)
> +source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
> +
>  comment "Linaro toolchains available for Cortex-A + EABIhf"
> -	depends on BR2_arm || BR2_armeb
> +	depends on BR2_armeb
>  	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
>  	depends on !BR2_STATIC_LIBS
>  
> -config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
> -	bool "Linaro ARM 2016.05"
> -	depends on BR2_arm
> -	depends on BR2_ARM_CPU_ARMV7A
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_ARM_EABIHF
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Linaro toolchain for the ARM architecture. It uses Linaro
> -	  GCC 2016.05 (based on gcc 5.3.1), Linaro GDB 2016.05 (based on
> -	  GDB 7.11.1), glibc 2.21, Binutils 2016.05 (based on 2.25). It
> -	  generates code that runs on all Cortex-A profile devices,
> -	  but tuned for the Cortex-A9. The code generated is Thumb 2,
> -	  with the hard floating point calling convention, and uses
> -	  the VFPv3-D16 FPU instructions.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
>  	bool "Linaro armeb 2016.05"
>  	depends on BR2_armeb
> @@ -596,7 +576,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	string
>  	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
> -	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
>  	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
>  	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
> @@ -654,6 +633,9 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
>  
> +# ARM
> +source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
> new file mode 100644
> index 0000000..bf8649a
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in
> @@ -0,0 +1,27 @@
> +comment "Linaro toolchains available for Cortex-A + EABIhf"
> +	depends on BR2_arm
> +	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
> +	depends on !BR2_STATIC_LIBS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
> +	bool "Linaro ARM 2016.05"
> +	depends on BR2_arm
> +	depends on BR2_ARM_CPU_ARMV7A
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on BR2_ARM_EABIHF
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	select BR2_TOOLCHAIN_HAS_FORTRAN
> +	help
> +	  Linaro toolchain for the ARM architecture. It uses Linaro
> +	  GCC 2016.05 (based on gcc 5.3.1), Linaro GDB 2016.05 (based on
> +	  GDB 7.11.1), glibc 2.21, Binutils 2016.05 (based on 2.25). It
> +	  generates code that runs on all Cortex-A profile devices,
> +	  but tuned for the Cortex-A9. The code generated is Thumb 2,
> +	  with the hard floating point calling convention, and uses
> +	  the VFPv3-D16 FPU instructions.
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
> new file mode 100644
> index 0000000..dcbc659
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "arm-linux-gnueabihf"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-linaro-arm"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
> new file mode 100644
> index 0000000..8106426
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
> +sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
> new file mode 100644
> index 0000000..64918ca
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-arm/toolchain-external-linaro-arm.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# toolchain-external-linaro-arm
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION = 2016.05
> +TOOLCHAIN_EXTERNAL_LINARO_ARM_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)/arm-linux-gnueabihf
> +
> +ifeq ($(HOSTARCH),x86)
> +TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-i686_arm-linux-gnueabihf.tar.xz
> +else
> +TOOLCHAIN_EXTERNAL_LINARO_ARM_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARM_VERSION)-x86_64_arm-linux-gnueabihf.tar.xz
> +endif
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 666cd02..945bf21 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -32,8 +32,6 @@ sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2
>  sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
>  
>  # ARM toolchains from Linaro
> -sha256 f1421c580ce977226f4fefc9c409b3b423260cc65a6e9dc6da88bb3478a521a0  gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
> -sha256 987941c9fffdf56ffcbe90e8984673c16648c477b537fcf43add22fa62f161cd  gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
>  sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
>  sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
>  
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 2571539..410ff18 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -101,13 +101,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/arm-linux-gnueabihf
> -ifeq ($(HOSTARCH),x86)
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_arm-linux-gnueabihf.tar.xz
> -else
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf.tar.xz
> -endif
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/armeb-linux-gnueabihf
>  ifeq ($(HOSTARCH),x86)
> 

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

* [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: " Arnout Vandecappelle
@ 2016-11-07 22:28   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:28 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the ARM architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 37 ++--------------------
>  .../toolchain-external-codesourcery-arm/Config.in  | 33 +++++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-codesourcery-arm.hash       |  3 ++
>  .../toolchain-external-codesourcery-arm.mk         | 13 ++++++++
>  .../toolchain-external/toolchain-external.hash     |  3 --
>  toolchain/toolchain-external/toolchain-external.mk |  5 +--
>  7 files changed, 61 insertions(+), 42 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index bffb9fd..dfc8e70 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -17,6 +17,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
>  
>  # ARM (use Linaro toolchain by default)
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
>  
>  comment "Linaro toolchains available for Cortex-A + EABIhf"
>  	depends on BR2_armeb
> @@ -45,40 +46,6 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
>  	  generated is Thumb 2, with the hard floating point calling
>  	  convention, and uses the VFPv3-D16 FPU instructions.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
> -	bool "Sourcery CodeBench ARM 2014.05"
> -	depends on BR2_arm
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_ARM_EABI
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> -	help
> -	  Sourcery CodeBench toolchain for the ARM architecture, from
> -	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
> -	  2.18 and gdb 7.7.50, kernel headers 3.13. It has support
> -	  for the following variants:
> -	    - ARMv5TE, little endian, soft-float, glibc
> -	      Select ARM926T, ARM10T, XScale or another ARMv5 core
> -	      Select BR2_SOFT_FLOAT
> -	    - ARMv4T, little endian, soft-float, glibc
> -	      Select ARM720T, ARM920T, ARM922T or another ARMv4 core
> -	      Select BR2_SOFT_FLOAT
> -	    - ARMv7-A, Thumb 2, little endian, soft-float, glibc
> -	      Select Cortex-A8, Cortex-A9 or another ARMv7-A core
> -	      Select BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mthumb
> -
> -comment "Sourcery CodeBench toolchains available for the EABI ABI"
> -	depends on BR2_arm
> -	depends on !BR2_ARM_EABI
> -	depends on !BR2_STATIC_LIBS
> -
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -577,7 +544,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
> -	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
> @@ -635,6 +601,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
>  
>  # ARM
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
>  
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> new file mode 100644
> index 0000000..037985b
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> @@ -0,0 +1,33 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
> +	bool "Sourcery CodeBench ARM 2014.05"
> +	depends on BR2_arm
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on BR2_ARM_EABI
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> +	help
> +	  Sourcery CodeBench toolchain for the ARM architecture, from
> +	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
> +	  2.18 and gdb 7.7.50, kernel headers 3.13. It has support
> +	  for the following variants:
> +	    - ARMv5TE, little endian, soft-float, glibc
> +	      Select ARM926T, ARM10T, XScale or another ARMv5 core
> +	      Select BR2_SOFT_FLOAT
> +	    - ARMv4T, little endian, soft-float, glibc
> +	      Select ARM720T, ARM920T, ARM922T or another ARMv4 core
> +	      Select BR2_SOFT_FLOAT
> +	    - ARMv7-A, Thumb 2, little endian, soft-float, glibc
> +	      Select Cortex-A8, Cortex-A9 or another ARMv7-A core
> +	      Select BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mthumb
> +
> +comment "Sourcery CodeBench toolchains available for the EABI ABI"
> +	depends on BR2_arm
> +	depends on !BR2_ARM_EABI
> +	depends on !BR2_STATIC_LIBS
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
> new file mode 100644
> index 0000000..7f3654d
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "arm-none-linux-gnueabi"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-arm"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
> new file mode 100644
> index 0000000..535f4aa
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e  arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
> +sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d  arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
> new file mode 100644
> index 0000000..f96a0e0
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/toolchain-external-codesourcery-arm.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-arm
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION = 2014.05-29
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_SOURCE = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_ACTUAL_SOURCE_TARBALL = arm-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 945bf21..d2cf44b 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -6,9 +6,6 @@ sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfi
>  sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
>  
>  # Mentor's Sourcery CodeBench Lite toolchains
> -# ARM
> -sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e  arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
> -sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d  arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2
>  # NiosII
>  sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 410ff18..f8d22b4 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -80,10 +80,7 @@ define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT
>  		$(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) -
>  endef
>  
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi
> -TOOLCHAIN_EXTERNAL_SOURCE = arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),y)
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
>  TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
> 

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

* [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported Arnout Vandecappelle
@ 2016-11-07 22:35   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:35 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> It's gcc 4.8.3 which doesn't support those cores yet.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Good catch :)

cortex-A17 was added with gcc5 and cortex-A12 with gcc4.9
https://gcc.gnu.org/gcc-5/changes.html
https://gcc.gnu.org/gcc-4.9/changes.html

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: new patch
> ---
>  .../toolchain-external/toolchain-external-codesourcery-arm/Config.in    | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> index 037985b..3cdfc86 100644
> --- a/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in
> @@ -3,6 +3,8 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
>  	depends on BR2_arm
>  	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
>  	depends on BR2_ARM_EABI
> +	# Unsupported ARM cores
> +	depends on !BR2_cortex_a12 && !BR2_cortex_a17
>  	depends on !BR2_STATIC_LIBS
>  	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
>  	select BR2_TOOLCHAIN_HAS_SSP
> 

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

* [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package Arnout Vandecappelle
@ 2016-11-07 22:37   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:37 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Linaro external toolchain for the
> ARM Big-endian architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 32 ++++------------------
>  .../toolchain-external-linaro-armeb/Config.in      | 26 ++++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-linaro-armeb.hash           |  3 ++
>  .../toolchain-external-linaro-armeb.mk             | 16 +++++++++++
>  .../toolchain-external/toolchain-external.hash     |  4 ---
>  toolchain/toolchain-external/toolchain-external.mk |  7 -----
>  7 files changed, 59 insertions(+), 38 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index dfc8e70..a19e41a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -19,32 +19,8 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
>  
> -comment "Linaro toolchains available for Cortex-A + EABIhf"
> -	depends on BR2_armeb
> -	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
> -	depends on !BR2_STATIC_LIBS
> -
> -config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
> -	bool "Linaro armeb 2016.05"
> -	depends on BR2_armeb
> -	depends on BR2_ARM_CPU_ARMV7A
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_ARM_EABIHF
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	help
> -	  Linaro toolchain for the ARM big endian architecture. It
> -	  uses Linaro GCC 2016.05 (based on gcc 5.3.1), Linaro GDB
> -	  2016.05 (based on GDB 7.11.1), glibc 2.21, Binutils 2016.05
> -	  (based on 2.25). It generates code that runs on all Cortex-A
> -	  profile devices, but tuned for the Cortex-A9. The code
> -	  generated is Thumb 2, with the hard floating point calling
> -	  convention, and uses the VFPv3-D16 FPU instructions.
> +# ARM big-endian
> +source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
>  
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
> @@ -543,7 +519,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	string
>  	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
> -	default "armeb-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
> @@ -603,6 +578,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Con
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
>  
> +# ARM big-endian
> +source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
> new file mode 100644
> index 0000000..ed84c47
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in
> @@ -0,0 +1,26 @@
> +comment "Linaro toolchains available for Cortex-A + EABIhf"
> +	depends on BR2_armeb
> +	depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF
> +	depends on !BR2_STATIC_LIBS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
> +	bool "Linaro armeb 2016.05"
> +	depends on BR2_armeb
> +	depends on BR2_ARM_CPU_ARMV7A
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on BR2_ARM_EABIHF
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	help
> +	  Linaro toolchain for the ARM big endian architecture. It
> +	  uses Linaro GCC 2016.05 (based on gcc 5.3.1), Linaro GDB
> +	  2016.05 (based on GDB 7.11.1), glibc 2.21, Binutils 2016.05
> +	  (based on 2.25). It generates code that runs on all Cortex-A
> +	  profile devices, but tuned for the Cortex-A9. The code
> +	  generated is Thumb 2, with the hard floating point calling
> +	  convention, and uses the VFPv3-D16 FPU instructions.
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
> new file mode 100644
> index 0000000..225e90f
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "armeb-linux-gnueabihf"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-linaro-armeb"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
> new file mode 100644
> index 0000000..7952b50
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
> +sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
> diff --git a/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
> new file mode 100644
> index 0000000..cf2f3ad
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-linaro-armeb/toolchain-external-linaro-armeb.mk
> @@ -0,0 +1,16 @@
> +################################################################################
> +#
> +# toolchain-external-linaro-armeb
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION = 2016.05
> +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)/armeb-linux-gnueabihf
> +
> +ifeq ($(HOSTARCH),x86)
> +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-i686_armeb-linux-gnueabihf.tar.xz
> +else
> +TOOLCHAIN_EXTERNAL_LINARO_ARMEB_SOURCE = gcc-linaro-5.3.1-$(TOOLCHAIN_EXTERNAL_LINARO_ARMEB_VERSION)-x86_64_armeb-linux-gnueabihf.tar.xz
> +endif
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index d2cf44b..3740ca4 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -28,10 +28,6 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
>  sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
>  sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
>  
> -# ARM toolchains from Linaro
> -sha256 f6e9c0d3320760fe8f89e9ec3acdd7b4da7eff889c094b4a2acc286fd46f334f  gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
> -sha256 6cf41c8944be56279cc14992aa075174b7a4c5938502536266eaaeef048f9440  gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
> -
>  # Codescape toolchains from Imagination Technologies
>  # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
>  sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index f8d22b4..7dfcac3 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -98,13 +98,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.05/armeb-linux-gnueabihf
> -ifeq ($(HOSTARCH),x86)
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-i686_armeb-linux-gnueabihf.tar.xz
> -else
> -TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3.1-2016.05-x86_64_armeb-linux-gnueabihf.tar.xz
> -endif
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
> 

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

* [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: " Arnout Vandecappelle
@ 2016-11-07 22:42   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:42 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Analog Devices external toolchain
> for the Blackfin architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v4: add PREFIX definition, remove legacy implementation.
> 
> NOTE busybox build test failed when both FDPIC and FLAT shared libs
> are installed, but this also fails on master. So not my problem :-P

Well, I hope that the Waldemar's work on bfin will allow to drop this toolchain
soon :p

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain


> ---
>  toolchain/toolchain-external/Config.in             | 26 ++++-------------
>  .../toolchain-external-blackfin-uclinux/Config.in  | 17 +++++++++++
>  .../Config.in.options                              | 10 +++++++
>  .../toolchain-external-blackfin-uclinux.hash       |  3 ++
>  .../toolchain-external-blackfin-uclinux.mk         | 33 ++++++++++++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  4 ---
>  toolchain/toolchain-external/toolchain-external.mk | 16 -----------
>  7 files changed, 69 insertions(+), 40 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index a19e41a..f8e04f5 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -22,6 +22,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.
>  # ARM big-endian
>  source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
>  
> +# Blackfin
> +source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -397,24 +400,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	  Other architecture variants (beyond Pentium-4/Xeon) are
>  	  supported as well, but glibc is not optimised for it.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
> -	bool "Blackfin.uclinux.org 2014R1"
> -	depends on BR2_bfin
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_USE_WCHAR
> -	select BR2_TOOLCHAIN_HAS_THREADS
> -	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Toolchain for the Blackfin architecture, from
> -	  http://blackfin.uclinux.org.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
>  	bool "Musl 1.1.12 toolchain"
>  	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
> @@ -526,8 +511,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
>  	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
> -	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FLAT
> -	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FDPIC
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
>  	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
>  	default "mips-img-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
> @@ -581,6 +564,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.
>  # ARM big-endian
>  source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.options"
>  
> +# Blackfin
> +source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
> new file mode 100644
> index 0000000..8b299e8
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
> +	bool "Blackfin.uclinux.org 2014R1"
> +	depends on BR2_bfin
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_USE_WCHAR
> +	select BR2_TOOLCHAIN_HAS_THREADS
> +	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
> +	select BR2_TOOLCHAIN_HAS_FORTRAN
> +	help
> +	  Toolchain for the Blackfin architecture, from
> +	  http://blackfin.uclinux.org.
> diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
> new file mode 100644
> index 0000000..3b7f457
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options
> @@ -0,0 +1,10 @@
> +if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "bfin-uclinux" if BR2_BINFMT_FLAT
> +	default "bfin-linux-uclibc" if BR2_BINFMT_FDPIC
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-blackfin-uclinux"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
> new file mode 100644
> index 0000000..b320d94
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfin-toolchain-2014R1-RC2.i386.tar.bz2
> +sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
> new file mode 100644
> index 0000000..0a48220
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-blackfin-uclinux/toolchain-external-blackfin-uclinux.mk
> @@ -0,0 +1,33 @@
> +################################################################################
> +#
> +# toolchain-external-blackfin-uclinux
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR = 2014R1
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION = $(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR)-RC2
> +
> +ifeq ($(BR2_BINFMT_FLAT),y)
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SUBDIR = bfin-uclinux
> +else
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SUBDIR = bfin-linux-uclibc
> +endif
> +
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SITE = http://downloads.sourceforge.net/project/adi-toolchain/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION_MAJOR)/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION)/i386
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_SOURCE = blackfin-toolchain-$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION).i386.tar.bz2
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_VERSION).i386.tar.bz2
> +
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_STRIP_COMPONENTS = 3
> +
> +# 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_UCLINUX_UCLIBC_EXTRA_EXTRACT
> +	$(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_EXTRA_DOWNLOADS) | \
> +		$(TAR) --strip-components=3 -C $(@D) $(TAR_OPTIONS) -
> +endef
> +TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_UCLIBC_EXTRA_EXTRACT
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 3740ca4..16c2e19 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -1,10 +1,6 @@
>  ######################################
>  # Next hashes are all locally computed
>  
> -# Blackfin toolchains from Analog Devices
> -sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0  blackfin-toolchain-2014R1-RC2.i386.tar.bz2
> -sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857  blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2
> -
>  # Mentor's Sourcery CodeBench Lite toolchains
>  # NiosII
>  sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 7dfcac3..4b21b4f 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -70,16 +70,6 @@ define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
>  endef
>  endif
>  
> -# 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_ARAGO_ARMV7A),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
> @@ -125,12 +115,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.
>  TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
>  TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
>  TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),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_MUSL_CROSS),y)
>  TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
>  TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> 

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

* [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: " Arnout Vandecappelle
@ 2016-11-07 22:43   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:43 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the MIPS architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v4: add PREFIX definition, remove legacy implementation.

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  toolchain/toolchain-external/Config.in             | 101 ++-------------------
>  .../toolchain-external-codesourcery-mips/Config.in |  93 +++++++++++++++++++
>  .../Config.in.options                              |   9 ++
>  .../toolchain-external-codesourcery-mips.hash      |   3 +
>  .../toolchain-external-codesourcery-mips.mk        |  13 +++
>  .../toolchain-external/toolchain-external.hash     |   3 -
>  toolchain/toolchain-external/toolchain-external.mk |   3 -
>  7 files changed, 124 insertions(+), 101 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index f8e04f5..1f49975 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -25,6 +25,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in"
>  # Blackfin
>  source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in"
>  
> +# MIPS (use codesourcery toolchain by default)
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -70,100 +73,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
> -	bool "Sourcery CodeBench MIPS 2016.05"
> -	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> -	depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2
> -	# Unsupported MIPS cores
> -	depends on !BR2_mips_interaptiv
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_MIPS_NABI32
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	help
> -	  Sourcery CodeBench toolchain for the MIPS architecture, from
> -	  Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
> -	  2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It
> -	  has support for the following variants:
> -	    - MIPS32r2 - Big-Endian, 2008 NaN, O32
> -	      Select MIPS (big endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
> -	    - MIPS32r2 - Big-Endian, O32
> -	      Select MIPS (big endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	    - MIPS32r2 - Big-Endian, O32, MIPS16
> -	      Select MIPS (big endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mips16
> -	    - MIPS32r2 - Big-Endian, Soft-Float, O32
> -	      Select MIPS (big endian) core
> -	      Select BR2_SOFT_FLOAT
> -	    - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16
> -	      Select MIPS (big endian) core
> -	      Select BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mips16
> -	    - MIPS32r2 - Little-Endian, 2008 NaN, O32
> -	      Select MIPS (little endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
> -	    - MIPS32r2 - Little-Endian, O32
> -	      Select MIPS (little endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	    - MIPS32r2 - Little-Endian, O32, MIPS16
> -	      Select MIPS (little endian) core
> -	      Disable BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mips16
> -	    - MIPS32r2 - Little-Endian, Soft-Float, O32
> -	      Select MIPS (little endian) core
> -	      Select BR2_SOFT_FLOAT
> -	    - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16
> -	      Select MIPS (little endian) core
> -	      Select BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mips16
> -	    - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS
> -	      Select MIPS (little endian) core
> -	      Select BR2_SOFT_FLOAT
> -	      Set BR2_TARGET_OPTIMIZATION to -mmicromips
> -	    - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS32r2 - uClibc, Big-Endian, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS32r2 - uClibc, Little-Endian, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32
> -	      Not usable in Buildroot yet.
> -	    - MIPS64r2 - Big-Endian, N64
> -	      Select MIPS64 (big endian) core
> -	      Select the n64 ABI
> -	      Disable BR2_SOFT_FLOAT
> -	    - MIPS64r2 - Big-Endian, Soft-Float, N64
> -	      Select MIPS64 (big endian) core
> -	      Select the n64 ABI
> -	      Select BR2_SOFT_FLOAT
> -	    - MIPS64r2 - Little-Endian, N64
> -	      Select MIPS64 (little endian) core
> -	      Select the n64 ABI
> -	      Disable BR2_SOFT_FLOAT
> -	    - MIPS64r2 - Little-Endian, Soft-Float, N64
> -	      Select MIPS64 (little endian) core
> -	      Select the n64 ABI
> -	      Select BR2_SOFT_FLOAT
> -
> -comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
> -	depends on BR2_MIPS_NABI32
> -	depends on !BR2_STATIC_LIBS
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
>  	bool "Codescape IMG GNU Linux Toolchain 2016.05"
>  	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> @@ -506,7 +415,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
>  	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
>  	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
>  	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
> @@ -567,6 +475,9 @@ source "toolchain/toolchain-external/toolchain-external-linaro-armeb/Config.in.o
>  # Blackfin
>  source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in.options"
>  
> +# MIPS
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
> new file mode 100644
> index 0000000..6a13ae6
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in
> @@ -0,0 +1,93 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
> +	bool "Sourcery CodeBench MIPS 2016.05"
> +	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +	depends on BR2_MIPS_CPU_MIPS32R2 || BR2_MIPS_CPU_MIPS64R2
> +	# Unsupported MIPS cores
> +	depends on !BR2_mips_interaptiv
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_MIPS_NABI32
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	help
> +	  Sourcery CodeBench toolchain for the MIPS architecture, from
> +	  Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
> +	  2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It
> +	  has support for the following variants:
> +	    - MIPS32r2 - Big-Endian, 2008 NaN, O32
> +	      Select MIPS (big endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
> +	    - MIPS32r2 - Big-Endian, O32
> +	      Select MIPS (big endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	    - MIPS32r2 - Big-Endian, O32, MIPS16
> +	      Select MIPS (big endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mips16
> +	    - MIPS32r2 - Big-Endian, Soft-Float, O32
> +	      Select MIPS (big endian) core
> +	      Select BR2_SOFT_FLOAT
> +	    - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16
> +	      Select MIPS (big endian) core
> +	      Select BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mips16
> +	    - MIPS32r2 - Little-Endian, 2008 NaN, O32
> +	      Select MIPS (little endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mnan=2008
> +	    - MIPS32r2 - Little-Endian, O32
> +	      Select MIPS (little endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	    - MIPS32r2 - Little-Endian, O32, MIPS16
> +	      Select MIPS (little endian) core
> +	      Disable BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mips16
> +	    - MIPS32r2 - Little-Endian, Soft-Float, O32
> +	      Select MIPS (little endian) core
> +	      Select BR2_SOFT_FLOAT
> +	    - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16
> +	      Select MIPS (little endian) core
> +	      Select BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mips16
> +	    - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS
> +	      Select MIPS (little endian) core
> +	      Select BR2_SOFT_FLOAT
> +	      Set BR2_TARGET_OPTIMIZATION to -mmicromips
> +	    - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS32r2 - uClibc, Big-Endian, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS32r2 - uClibc, Little-Endian, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32
> +	      Not usable in Buildroot yet.
> +	    - MIPS64r2 - Big-Endian, N64
> +	      Select MIPS64 (big endian) core
> +	      Select the n64 ABI
> +	      Disable BR2_SOFT_FLOAT
> +	    - MIPS64r2 - Big-Endian, Soft-Float, N64
> +	      Select MIPS64 (big endian) core
> +	      Select the n64 ABI
> +	      Select BR2_SOFT_FLOAT
> +	    - MIPS64r2 - Little-Endian, N64
> +	      Select MIPS64 (little endian) core
> +	      Select the n64 ABI
> +	      Disable BR2_SOFT_FLOAT
> +	    - MIPS64r2 - Little-Endian, Soft-Float, N64
> +	      Select MIPS64 (little endian) core
> +	      Select the n64 ABI
> +	      Select BR2_SOFT_FLOAT
> +
> +comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64"
> +	depends on BR2_MIPS_NABI32
> +	depends on !BR2_STATIC_LIBS
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
> new file mode 100644
> index 0000000..677cc67
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "mips-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-mips"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
> new file mode 100644
> index 0000000..2d80338
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
> +sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
> new file mode 100644
> index 0000000..5117d47
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-mips/toolchain-external-codesourcery-mips.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-mips
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION = 2016.05-8
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_SOURCE = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_ACTUAL_SOURCE_TARBALL = mips-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 16c2e19..1a0ff72 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -14,9 +14,6 @@ sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-20
>  # AMD64
>  sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
> -# MIPS
> -sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397  mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff  mips-2016.05-8-mips-linux-gnu.src.tar.bz2
>  
>  # ARM toolchains from Texas Instrument's Arago project
>  # There is one source file that covers both binary distributions.
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 4b21b4f..e7bc754 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -88,9 +88,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
> 

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

* [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains Arnout Vandecappelle
@ 2016-11-07 22:49   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-07 22:49 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

I skipped previous patches that looks good. I'll send a reviewed tag latter.

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> The Arago toolchains are no longer maintained and haven't been updated
> for a long time.
> 
> With this removal, all the legacy toolchain-external support can be
> removed as well.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
>  Config.in.legacy                                   |  16 +++
>  toolchain/toolchain-external/Config.in             |  53 +--------
>  .../toolchain-external/toolchain-external.hash     |   8 --
>  toolchain/toolchain-external/toolchain-external.mk | 123 ---------------------
>  4 files changed, 19 insertions(+), 181 deletions(-)
>  delete mode 100644 toolchain/toolchain-external/toolchain-external.hash
> 
> diff --git a/Config.in.legacy b/Config.in.legacy
> index 8c41b05..ccf06c0 100644
> --- a/Config.in.legacy
> +++ b/Config.in.legacy
> @@ -143,6 +143,22 @@ comment "----------------------------------------------------"
>  endif
>  
>  ###############################################################################
> +comment "Legacy options removed in 2017.02"
> +
> +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
> +	bool "Arago ARMv7 2011.09 removed"
> +	select BR2_LEGACY
> +	help
> +	  The Arago toolchains are every old and not updated anymore.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> +	bool "Arago ARMv5 2011.09 removed"
> +	select BR2_LEGACY
> +	help
> +	  The Arago toolchains are every old and not updated anymore.
> +
> +
> +###############################################################################
>  comment "Legacy options removed in 2016.11"
>  
>  config BR2_PACKAGE_PHP_SAPI_CLI_CGI
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index fb33703..2c39e5a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -51,51 +51,6 @@ source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
>  # architecture.
>  source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
>  
> -config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
> -	bool "Arago ARMv7 2011.09"
> -	depends on BR2_arm
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_ARM_CPU_ARMV7A
> -	depends on BR2_ARM_EABI
> -	depends on BR2_ARM_CPU_HAS_VFPV3
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> -	# kernel headers: 2.6.31
> -	help
> -	  Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3,
> -	  binutils 2.20.1, glibc 2.12, gdb 7.2.
> -
> -	  This toolchain uses -mfloat-abi=softfp (i.e can use FPU
> -	  instructions, but passes floating point function arguments
> -	  in integer registers), and requires a VFPv3 floating point
> -	  unit to work properly. This unit is available on most
> -	  Cortex-A ARM processors, but not all.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	bool "Arago ARMv5 2011.09"
> -	depends on BR2_arm
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_ARM_CPU_ARMV4
> -	depends on BR2_ARM_EABI
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> -	# kernel headers: 2.6.31
> -	help
> -	  Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc
> -	  4.5.3, binutils 2.20.1, glibc 2.12, gdb 7.2.
> -
> -	  This toolchain uses software-floating point.
> -
>  endchoice
>  
>  choice
> @@ -127,11 +82,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
>  	help
>  	  Path to where the external toolchain is installed.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> -	string
> -	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
> -	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -
>  config BR2_TOOLCHAIN_EXTERNAL_GLIBC
>  	bool
>  	select BR2_TOOLCHAIN_USES_GLIBC
> @@ -154,6 +104,9 @@ config BR2_PACKAGE_HAS_TOOLCHAIN_EXTERNAL
>  config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
>  	string
>  
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	string
> +
>  # Kept toolchains sorted as in the choice above
>  # The toolchain Config.in.options must define
>  # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL and BR2_TOOLCHAIN_EXTERNAL_PREFIX
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> deleted file mode 100644
> index cc93998..0000000
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ /dev/null
> @@ -1,8 +0,0 @@
> -######################################
> -# Next hashes are all locally computed
> -
> -# ARM toolchains from Texas Instrument's Arago project
> -# There is one source file that covers both binary distributions.
> -sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
> -sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
> -sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 53f5583..48de1e7 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -15,129 +15,6 @@ ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
>  TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
>  endif
>  
> -# All the definition that are common between the toolchain-external
> -# generic package and the toolchain-external-package infrastructure
> -# can be found in pkg-toolchain-external.mk
> -
> -# Legacy toolchains that don't use the toolchain-external-package infrastructure
> -# yet. We can recognise that because no provider is set.
> -ifeq ($(call qstrip,$(BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL)),)
> -
> -# Now we are the provider. However, we can't set it to ourselves or we'll get a
> -# circular dependency. Let's set it to a target that we always depend on
> -# instead.
> -BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL = skeleton
> -
> -TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES
> -
> -# In fact, we don't need to download the toolchain, since it is already
> -# available on the system, so force the site and source to be empty so
> -# that nothing will be downloaded/extracted.
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y)
> -TOOLCHAIN_EXTERNAL_SITE =
> -TOOLCHAIN_EXTERNAL_SOURCE =
> -endif
> -
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
> -TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
> -define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -	mv $(@D)/arago-2011.09/armv7a/* $(@D)/
> -	rm -rf $(@D)/arago-2011.09/
> -endef
> -TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE),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
> -TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2
> -define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -	mv $(@D)/arago-2011.09/armv5te/* $(@D)/
> -	rm -rf $(@D)/arago-2011.09/
> -endef
> -TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -endif
> -
> -# Some toolchain vendors have a regular file naming pattern.
> -# For them, mass-define _ACTUAL_SOURCE_TARBALL based _SITE.
> -ifneq ($(findstring sourcery.mentor.com/public/gnu_toolchain,$(TOOLCHAIN_EXTERNAL_SITE)),)
> -TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \
> -	$(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE)))
> -endif
> -
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
> -TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/*
> -
> -TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \
> -	TOOLCHAIN_EXTERNAL_MOVE
> -endif
> -
> -# Checks for an already installed toolchain: check the toolchain
> -# location, check that it is usable, and then verify that it
> -# matches the configuration provided in Buildroot: ABI, C++ support,
> -# kernel headers version, type of C library and all C library features.
> -define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
> -	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
> -	$(Q)$(call check_unusable_toolchain,$(TOOLCHAIN_EXTERNAL_CC))
> -	$(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \
> -	$(call check_kernel_headers_version,\
> -		$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
> -		$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
> -	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
> -		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
> -	if test "$(BR2_arm)" = "y" ; then \
> -		$(call check_arm_abi,\
> -			"$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
> -			$(TOOLCHAIN_EXTERNAL_READELF)) ; \
> -	fi ; \
> -	if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \
> -		$(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \
> -	fi ; \
> -	if test "$(BR2_TOOLCHAIN_HAS_FORTRAN)" = "y" ; then \
> -		$(call check_fortran,$(TOOLCHAIN_EXTERNAL_FC)) ; \
> -	fi ; \
> -	if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \
> -		$(call check_uclibc,$${SYSROOT_DIR}) ; \
> -	elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \
> -		$(call check_musl,$${SYSROOT_DIR}) ; \
> -	else \
> -		$(call check_glibc,$${SYSROOT_DIR}) ; \
> -	fi
> -	$(Q)$(call check_toolchain_ssp,$(TOOLCHAIN_EXTERNAL_CC))
> -endef
> -
> -TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_WRAPPER_BUILD)
> -
> -define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS
> -	$(TOOLCHAIN_WRAPPER_INSTALL)
> -	$(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT)
> -endef
> -
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y)
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK
> -endif
> -
> -# Even though we're installing things in both the staging, the host
> -# and the target directory, we do everything within the
> -# install-staging step, arbitrarily.
> -define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS
> -	$(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC)
> -	$(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT)
> -	$(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO)
> -endef
> -
> -endif # BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> -
> -
> -# Since a virtual package is just a generic package, we can still
> -# define commands for the legacy toolchains.
>  $(eval $(virtual-package))
>  
>  # Ensure the external-toolchain package has a prefix defined.
> 

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-07 22:16   ` Romain Naour
@ 2016-11-08  1:00     ` Arnout Vandecappelle
  2016-11-08  8:20       ` Thomas Petazzoni
  0 siblings, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-08  1:00 UTC (permalink / raw)
  To: buildroot



On 07-11-16 23:16, Romain Naour wrote:
> Le 07/11/2016 ? 02:19, Arnout Vandecappelle (Essensium/Mind) a ?crit :
>> The toolchain-external-package infrastructure is just a copy of the
>> toolchain-external commands, replacing TOOLCHAIN_EXTERNAL by $(2)
>> and adding double-dollars everywhere.
>>
>> toolchain-external itself is converted to a virtual package, but it
>> is faked a little to make sue the toolchains that haven't been
>> converted to toolchain-external-package yet keep on working.
>>
>> The TOOLCHAIN_EXTERNAL_MOVE commands don't have to be redefined
>> for every toolchain-external-package instance, so that is moved
>> out into the common part of pkg-toolchain-external.mk.
>>
>> The musl-compat-headers dependency stays in the toolchain-external
>> package itself.
>>
>> The musl ld link is duplicated in the legacy toolchain-external and
>> the toolchain-external-package, because they have separate hooks.
>>
>> The handling of TOOLCHAIN_EXTERNAL_BIN deserves some special attention,
>> because its value will be different for different
>> toolchain-external-package instances. However, the value only depends
>> on variables that are set by Kconfig (BR2_TOOLCHAIN_EXTERNAL_PREFIX
>> and BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD) so it can easily be used in
>> the generic part. So we don't have to do anything specific for this
>> variable after all.
> 
> About the TOOLCHAIN_EXTERNAL_BIN definition for ADI bfin toolchains
> (BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX), I dropped it in my series but it
> looks suspicious how it can worked for me...
> 
> The tarballs contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories,
> which themselves contain the toolchain, so we still need to add the toolchain
> prefix...

 Yes, the ADI blackfin toolchains are a kind of multilib toolchain, but instead
of multilib it's actually two toolchains installed side by side.

 I'm thinking to either:
- drop support for ADI blackfin toolchains, since our internal toolchain works
fine now and we have lots of autobuilder exceptions for this toolchain; and/or
- remove BR2_BFIN_INSTALL_FDPIC/FLAT_SHARED, which will allow us to install only
one of the two toolchains and thus avoids the issue entirely.

[snip]
>> +# musl does not provide an implementation for sys/queue.h or sys/cdefs.h.
>> +# So, add the musl-compat-headers package that will install those files,
>> +# into the staging directory:
>> +#   sys/queue.h:  header from NetBSD
>> +#   sys/cdefs.h:  minimalist header bundled in Buildroot
>> +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
>> +TOOLCHAIN_EXTERNAL_DEPENDENCIES += musl-compat-headers
>> +endif
> 
> This hunk has moved to phg-toolchain-external.mk in patch 3/22 and now come back
> to toolchain-external.mk with this patch.

 I realized that. It's a bit of historical accident, because I already had patch
2 and 3 moving this hunk around, and then in patch 4 I realized it was the wrong
place all along. But then I thought it was actually useful to have this hunk
explicitly to draw attention to it, because it is a bit special: it's about the
toolchain-external virtual package, while all the rest of the variables are
about the toolchain-external-* packages.

 I even considered renaming all the variables in pkg-toolchain-external to
something else, to make the distinction clear, but then it was 2am and I gave up :-)

 Hm, it's 2am now as well... Time to give up!

 Regards,
 Arnout

> 
> Otherwise:
> Reviewed-by: Romain Naour <romain.naour@gmail.com>
> 
> Best regards,
> Romain
> 
[snip]

-- 
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] 55+ messages in thread

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-08  1:00     ` Arnout Vandecappelle
@ 2016-11-08  8:20       ` Thomas Petazzoni
  2016-11-08 12:30         ` Arnout Vandecappelle
  2016-11-11 11:19         ` Arnout Vandecappelle
  0 siblings, 2 replies; 55+ messages in thread
From: Thomas Petazzoni @ 2016-11-08  8:20 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 8 Nov 2016 02:00:46 +0100, Arnout Vandecappelle wrote:

> > The tarballs contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories,
> > which themselves contain the toolchain, so we still need to add the toolchain
> > prefix...  
> 
>  Yes, the ADI blackfin toolchains are a kind of multilib toolchain, but instead
> of multilib it's actually two toolchains installed side by side.
> 
>  I'm thinking to either:
> - drop support for ADI blackfin toolchains, since our internal toolchain works
> fine now and we have lots of autobuilder exceptions for this toolchain; and/or

Let's do this. They are ancient (gcc 4.3, very old uClibc, etc.). They
were kind of useful in that they forced us to test a very old gcc, very
old uClibc, very old binutils, but I agree they have a lot of quirks,
and I'm not sure they are really actively used by our users.

Should we instead try to have some ancient ARM toolchain, in order to
keep testing old gcc, old binutils, etc. ? But even the ct-ng
toolchains that are quite old are causing a number of problems, and
have autobuilder exceptions.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-08  8:20       ` Thomas Petazzoni
@ 2016-11-08 12:30         ` Arnout Vandecappelle
  2016-11-08 15:38           ` Thomas Petazzoni
  2016-11-11 11:19         ` Arnout Vandecappelle
  1 sibling, 1 reply; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-08 12:30 UTC (permalink / raw)
  To: buildroot



On 08-11-16 09:20, Thomas Petazzoni wrote:
> Should we instead try to have some ancient ARM toolchain, in order to
> keep testing old gcc, old binutils, etc. ? But even the ct-ng
> toolchains that are quite old are causing a number of problems, and
> have autobuilder exceptions.

 That would be useful if such a toolchain uncovers problems that we can fix in
Buildroot. If all it does is to add autobuilder exceptions, there isn't much
point... Well, the other thing we can do is to add *_AT_LEAST_NNN options,
that's true.

 Those autobuilder exceptions for ct-ng, what kind of errors are they for? Not
something covered by *_AT_LEAST? Like bugs in libc, for which we don't have
_AT_LEAST?


 Regards,
 Arnout

-- 
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] 55+ messages in thread

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-08 12:30         ` Arnout Vandecappelle
@ 2016-11-08 15:38           ` Thomas Petazzoni
  2016-11-08 20:53             ` Arnout Vandecappelle
  0 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2016-11-08 15:38 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 8 Nov 2016 13:30:16 +0100, Arnout Vandecappelle wrote:

>  That would be useful if such a toolchain uncovers problems that we can fix in
> Buildroot. If all it does is to add autobuilder exceptions, there isn't much
> point... Well, the other thing we can do is to add *_AT_LEAST_NNN options,
> that's true.

Yes, that's what I'm thinking of: it allows us to realize when a
package needs gcc 4.7 or 4.8, or when some fairly recent kernel headers
are needed, for example. If all we test is gcc 4.9 with 4.0 kernel
headers, then all our users that are stuck with 4.7 (or older
toolchains) with 3.0 kernel headers will have a really bad experience.

>  Those autobuilder exceptions for ct-ng, what kind of errors are they for? Not
> something covered by *_AT_LEAST? Like bugs in libc, for which we don't have
> _AT_LEAST?

Looking quickly at the autobuild-run exceptions, we have:

 - Toolchains with gcc affected by various PRs

 - Toolchains with too old eglibc (2.18)

 - Toolchains that fail to build this or that package, with no
   documented reason (might be explained in the commit log, though).

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-08 15:38           ` Thomas Petazzoni
@ 2016-11-08 20:53             ` Arnout Vandecappelle
  0 siblings, 0 replies; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-08 20:53 UTC (permalink / raw)
  To: buildroot



On 08-11-16 16:38, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 8 Nov 2016 13:30:16 +0100, Arnout Vandecappelle wrote:
> 
>>  That would be useful if such a toolchain uncovers problems that we can fix in
>> Buildroot. If all it does is to add autobuilder exceptions, there isn't much
>> point... Well, the other thing we can do is to add *_AT_LEAST_NNN options,
>> that's true.
> 
> Yes, that's what I'm thinking of: it allows us to realize when a
> package needs gcc 4.7 or 4.8, or when some fairly recent kernel headers
> are needed, for example. If all we test is gcc 4.9 with 4.0 kernel
> headers, then all our users that are stuck with 4.7 (or older
> toolchains) with 3.0 kernel headers will have a really bad experience.

 For things which we don't test in the autobuilders, I think we should retire
the _AT_LEAST_ option. What is the use of having an option that tells you which
packages will work with gcc 4.6, if we actually have no idea if those packages
will work with gcc 4.6? So indeed, removing the blackfin toolchain would mean
removing gcc 4.3, 4.4, 4.5, 4.6 and 4.7 (the lowest option is actually useless
because it is always set).

 Anyway, the Blackfin toolchain is now the only one with gcc < 4.7, but this
toolchain wasn't really great for testing gcc compatibility, because many
packages are already excluded due to its various other arch limitations.

 Ideally we should generate a gcc 4.5 - headers 3.0 - glibc 2.19 based toolchain
for a few architectures. We can use 2015.02 for that. uClibc is not so
interesting because older versions can break in so many ways, and because less
packages are tested with it.

> 
>>  Those autobuilder exceptions for ct-ng, what kind of errors are they for? Not
>> something covered by *_AT_LEAST? Like bugs in libc, for which we don't have
>> _AT_LEAST?
> 
> Looking quickly at the autobuild-run exceptions, we have:
> 
>  - Toolchains with gcc affected by various PRs

 But that should be handled with _AT_LEAST, no?

> 
>  - Toolchains with too old eglibc (2.18)
> 
>  - Toolchains that fail to build this or that package, with no
>    documented reason (might be explained in the commit log, though).

 Yeah, I've taken a look at the commit logs and it's usually because of too old
uclibc.

 I also noticed that the majority of the exceptions are for toolchains that are
no longer in toolchain-configs.csv...

 Regards,
 Arnout

-- 
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] 55+ messages in thread

* [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere
  2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
  2016-11-07 21:06   ` Romain Naour
@ 2016-11-09 21:51   ` Thomas Petazzoni
  1 sibling, 0 replies; 55+ messages in thread
From: Thomas Petazzoni @ 2016-11-09 21:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 7 Nov 2016 02:19:56 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The BR2_TOOLCHAIN_EXTERNAL_PREFIX variable is already qstripped and
> stored in the TOOLCHAIN_EXTERNAL_PREFIX variable in
> toolchain-external.mk, so use this variable everywhere.
> 
> This will be useful for a later patch that makes the derivation of
> TOOLCHAIN_EXTERNAL_PREFIX a little more complex.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> [Arnout: split off into separate patch]
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
> v4: split off into separate patch [Arnout]
> ---
>  package/Makefile.in  | 2 +-
>  package/wine/wine.mk | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package
  2016-11-08  8:20       ` Thomas Petazzoni
  2016-11-08 12:30         ` Arnout Vandecappelle
@ 2016-11-11 11:19         ` Arnout Vandecappelle
  1 sibling, 0 replies; 55+ messages in thread
From: Arnout Vandecappelle @ 2016-11-11 11:19 UTC (permalink / raw)
  To: buildroot



On 08-11-16 09:20, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 8 Nov 2016 02:00:46 +0100, Arnout Vandecappelle wrote:
> 
>>> The tarballs contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories,
>>> which themselves contain the toolchain, so we still need to add the toolchain
>>> prefix...  
>>
>>  Yes, the ADI blackfin toolchains are a kind of multilib toolchain, but instead
>> of multilib it's actually two toolchains installed side by side.
>>
>>  I'm thinking to either:
>> - drop support for ADI blackfin toolchains, since our internal toolchain works
>> fine now and we have lots of autobuilder exceptions for this toolchain; and/or
> 
> Let's do this. They are ancient (gcc 4.3, very old uClibc, etc.). They
> were kind of useful in that they forced us to test a very old gcc, very
> old uClibc, very old binutils, but I agree they have a lot of quirks,
> and I'm not sure they are really actively used by our users.

 Did you mean that I should respin the series with the ADI toolchains dropped
completely, or that it is something that we can do later?

 Regards,
 Arnout

> 
> Should we instead try to have some ancient ARM toolchain, in order to
> keep testing old gcc, old binutils, etc. ? But even the ct-ng
> toolchains that are quite old are causing a number of problems, and
> have autobuilder exceptions.
> 
> Best regards,
> 
> Thomas
> 

-- 
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] 55+ messages in thread

* [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: " Arnout Vandecappelle
@ 2016-11-22 21:20   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:20 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Codescape IMG external toolchain
> for the MIPS architecture.
> 
> The legacy implementation is removed.
> 
> The Codescape hacks for IMG and MTI are duplicated.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 66 +---------------------
>  .../Config.in                                      | 62 ++++++++++++++++++++
>  .../Config.in.options                              |  9 +++
>  .../toolchain-external-codescape-img-mips.hash     |  3 +
>  .../toolchain-external-codescape-img-mips.mk       | 47 +++++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  1 -
>  toolchain/toolchain-external/toolchain-external.mk |  8 +--
>  7 files changed, 124 insertions(+), 72 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 1f49975..c76941a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -27,6 +27,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
>  
>  # MIPS (use codesourcery toolchain by default)
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
> +source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
>  
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
> @@ -73,69 +74,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
> -	bool "Codescape IMG GNU Linux Toolchain 2016.05"
> -	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT)
> -	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
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Codescape IMG GNU Linux Toolchain 2015.10 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:
> -	    - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (big endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	    - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (big endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> -	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r6' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> -	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI
> -	      Select 'MIPS64 (big endian)' Target Architecture
> -	      Select 'mips 64r6' Target Architecture Variant
> -	      Select 'n32' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI
> -	      Select 'MIPS64 (little endian)' Target Architecture
> -	      Select 'mips 64r6' Target Architecture Variant
> -	      Select 'n32' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI
> -	      Select 'MIPS64 (big endian)' Target Architecture
> -	      Select 'mips 64r6' Target Architecture Variant
> -	      Select 'n64' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI
> -	      Select 'MIPS64 (little endian)' Target Architecture
> -	      Select 'mips 64r6' Target Architecture Variant
> -	      Select 'n64' Target ABI
> -	      Disable 'Use soft-float'
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
>  	bool "Codescape MTI GNU Linux Toolchain 2016.05"
>  	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> @@ -421,7 +359,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
>  	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
> -	default "mips-img-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
>  	default "mips-mti-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
>  	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
>  	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
> @@ -477,6 +414,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
>  
>  # MIPS
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
> +source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
>  
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
> new file mode 100644
> index 0000000..1f0d4d1
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in
> @@ -0,0 +1,62 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
> +	bool "Codescape IMG GNU Linux Toolchain 2016.05"
> +	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on BR2_MIPS_CPU_MIPS32R6 || (BR2_MIPS_CPU_MIPS64R6 && !BR2_MIPS_SOFT_FLOAT)
> +	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
> +	select BR2_TOOLCHAIN_HAS_FORTRAN
> +	help
> +	  Codescape IMG GNU Linux Toolchain 2015.10 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:
> +	    - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (big endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	    - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (big endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	    - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> +	    - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r6' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> +	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI
> +	      Select 'MIPS64 (big endian)' Target Architecture
> +	      Select 'mips 64r6' Target Architecture Variant
> +	      Select 'n32' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI
> +	      Select 'MIPS64 (little endian)' Target Architecture
> +	      Select 'mips 64r6' Target Architecture Variant
> +	      Select 'n32' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI
> +	      Select 'MIPS64 (big endian)' Target Architecture
> +	      Select 'mips 64r6' Target Architecture Variant
> +	      Select 'n64' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI
> +	      Select 'MIPS64 (little endian)' Target Architecture
> +	      Select 'mips 64r6' Target Architecture Variant
> +	      Select 'n64' Target ABI
> +	      Disable 'Use soft-float'
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
> new file mode 100644
> index 0000000..3eaa2a9
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "mips-img-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codescape-img-mips"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
> new file mode 100644
> index 0000000..e4ae9e1
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.hash
> @@ -0,0 +1,3 @@
> +# Codescape toolchains from Imagination Technologies
> +# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
> +sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
> new file mode 100644
> index 0000000..b4decfb
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-img-mips/toolchain-external-codescape-img-mips.mk
> @@ -0,0 +1,47 @@
> +################################################################################
> +#
> +# toolchain-external-codescape-img-mips
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION = 2016.05-03
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STRIP_COMPONENTS = 2
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_VERSION).for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
> +
> +# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
> +# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
> +# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
> +# tools in the appropriate location.
> +ifeq ($(BR2_MIPS_OABI32),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = o32
> +else ifeq ($(BR2_MIPS_NABI32),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n32
> +else ifeq ($(BR2_MIPS_NABI64),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX = n64
> +endif
> +
> +define TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS
> +	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
> +	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
> +	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
> +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_IMG_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
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_POST_INSTALL_STAGING_HOOKS += \
> +	TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_STAGING_FIXUPS \
> +	TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS_SYMLINK
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 1a0ff72..962263c 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -23,7 +23,6 @@ sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-t
>  
>  # Codescape toolchains from Imagination Technologies
>  # From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
> -sha256 e3c1f292ac6a9f12480af431c85a7ed9dfa011a52fd62a50be3363ec6b9bc872  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
>  sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
>  
>  # Synopsys DesignWare ARC toolchains
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index e7bc754..2acf9dd 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -54,7 +54,7 @@ endef
>  # sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
>  # -> sbin-<abi> so that the rest of Buildroot can find the toolchain
>  # tools in the appropriate location.
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
>  ifeq ($(BR2_MIPS_OABI32),y)
>  TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
>  else ifeq ($(BR2_MIPS_NABI32),y)
> @@ -100,12 +100,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
> -TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
> -TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
>  TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
>  TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
> 

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

* [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: " Arnout Vandecappelle
@ 2016-11-22 21:23   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:23 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Codescape MTI external toolchain
> for the MIPS architecture.
> 
> The legacy implementation is removed.
> 
> The Codescape hacks for IMG and MTI are duplicated.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 77 +---------------------
>  .../Config.in                                      | 73 ++++++++++++++++++++
>  .../Config.in.options                              |  9 +++
>  .../toolchain-external-codescape-mti-mips.hash     |  3 +
>  .../toolchain-external-codescape-mti-mips.mk       | 47 +++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  4 --
>  toolchain/toolchain-external/toolchain-external.mk | 38 -----------
>  7 files changed, 134 insertions(+), 117 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index c76941a..d2e1d3b 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -28,6 +28,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
>  # MIPS (use codesourcery toolchain by default)
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
> +source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in"
>  
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
> @@ -74,80 +75,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
> -	bool "Codescape MTI GNU Linux Toolchain 2016.05"
> -	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \
> -		BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT)
> -	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
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Codescape MTI GNU Linux Toolchain 2015.10 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, Hard-Float, Legacy NaN, o32 ABI
> -	      Select 'MIPS (big endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	    - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (big endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
> -	    - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI
> -	      Select 'MIPS (big endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	    - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
> -	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Enable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> -	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS
> -	      Select 'MIPS (little endian)' Target Architecture
> -	      Select 'mips 32r2' Target Architecture Variant
> -	      Disable 'Use soft-float'
> -	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> -	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI
> -	      Select 'MIPS64 (big endian)' Target Architecture
> -	      Select 'mips 64r2' Target Architecture Variant
> -	      Select 'n32' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI
> -	      Select 'MIPS64 (little endian)' Target Architecture
> -	      Select 'mips 64r2' Target Architecture Variant
> -	      Select 'n32' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI
> -	      Select 'MIPS64 (big endian)' Target Architecture
> -	      Select 'mips 64r2' Target Architecture Variant
> -	      Select 'n64' Target ABI
> -	      Disable 'Use soft-float'
> -	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI
> -	      Select 'MIPS64 (little endian)' Target Architecture
> -	      Select 'mips 64r2' Target Architecture Variant
> -	      Select 'n64' Target ABI
> -	      Disable 'Use soft-float'
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
>  	bool "Sourcery CodeBench Nios-II 2016.05"
>  	depends on BR2_nios2
> @@ -359,7 +286,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
>  	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
> -	default "mips-mti-linux-gnu"     if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
>  	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
>  	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
>  	default "mips-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT)
> @@ -415,6 +341,7 @@ source "toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.
>  # MIPS
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
> +source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options"
>  
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
> new file mode 100644
> index 0000000..f899467
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in
> @@ -0,0 +1,73 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
> +	bool "Codescape MTI GNU Linux Toolchain 2016.05"
> +	depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on BR2_MIPS_CPU_MIPS32R2 || (BR2_MIPS_CPU_MIPS64R2 && !BR2_MIPS_SOFT_FLOAT) || \
> +		BR2_MIPS_CPU_MIPS32R5 || (BR2_MIPS_CPU_MIPS64R5 && !BR2_MIPS_SOFT_FLOAT)
> +	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
> +	select BR2_TOOLCHAIN_HAS_FORTRAN
> +	help
> +	  Codescape MTI GNU Linux Toolchain 2015.10 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, Hard-Float, Legacy NaN, o32 ABI
> +	      Select 'MIPS (big endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	    - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (big endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
> +	    - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI
> +	      Select 'MIPS (big endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	    - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mnan=2008'
> +	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	    - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Enable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> +	    - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS
> +	      Select 'MIPS (little endian)' Target Architecture
> +	      Select 'mips 32r2' Target Architecture Variant
> +	      Disable 'Use soft-float'
> +	      Set BR2_TARGET_OPTIMIZATION to '-mmicromips'
> +	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI
> +	      Select 'MIPS64 (big endian)' Target Architecture
> +	      Select 'mips 64r2' Target Architecture Variant
> +	      Select 'n32' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI
> +	      Select 'MIPS64 (little endian)' Target Architecture
> +	      Select 'mips 64r2' Target Architecture Variant
> +	      Select 'n32' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI
> +	      Select 'MIPS64 (big endian)' Target Architecture
> +	      Select 'mips 64r2' Target Architecture Variant
> +	      Select 'n64' Target ABI
> +	      Disable 'Use soft-float'
> +	    - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI
> +	      Select 'MIPS64 (little endian)' Target Architecture
> +	      Select 'mips 64r2' Target Architecture Variant
> +	      Select 'n64' Target ABI
> +	      Disable 'Use soft-float'
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
> new file mode 100644
> index 0000000..464c9b8
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "mips-mti-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codescape-mti-mips"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
> new file mode 100644
> index 0000000..0d785f2
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.hash
> @@ -0,0 +1,3 @@
> +# Codescape toolchains from Imagination Technologies
> +# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
> +sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
> new file mode 100644
> index 0000000..e5733ca
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codescape-mti-mips/toolchain-external-codescape-mti-mips.mk
> @@ -0,0 +1,47 @@
> +################################################################################
> +#
> +# toolchain-external-codescape-mti-mips
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION = 2016.05-03
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STRIP_COMPONENTS = 2
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SOURCE = Codescape.GNU.Tools.Package.$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_VERSION).for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
> +
> +# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
> +# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
> +# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
> +# tools in the appropriate location.
> +ifeq ($(BR2_MIPS_OABI32),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = o32
> +else ifeq ($(BR2_MIPS_NABI32),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n32
> +else ifeq ($(BR2_MIPS_NABI64),y)
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX = n64
> +endif
> +
> +define TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS
> +	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
> +	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
> +	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
> +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_MTI_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
> +
> +TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_POST_INSTALL_STAGING_HOOKS += \
> +	TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_STAGING_FIXUPS \
> +	TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS_SYMLINK
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 962263c..83859e7 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -21,10 +21,6 @@ sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2
>  sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
>  sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
>  
> -# Codescape toolchains from Imagination Technologies
> -# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03/downloads.html
> -sha256 10b8ab6d7c492abc19ecabafedc6bc5f12ff88107a3cb76dc452b3a9522d9c56  Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
> -
>  # Synopsys DesignWare ARC toolchains
>  sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz
>  sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10  arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 2acf9dd..31a53d2 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -38,38 +38,6 @@ TOOLCHAIN_EXTERNAL_SITE =
>  TOOLCHAIN_EXTERNAL_SOURCE =
>  endif
>  
> -# 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
> -
> -# Special fixup for Codescape MIPS toolchains, that have bin-<abi> and
> -# sbin-<abi> directories. We create symlinks bin -> bin-<abi> and sbin
> -# -> sbin-<abi> so that the rest of Buildroot can find the toolchain
> -# tools in the appropriate location.
> -ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
> -ifeq ($(BR2_MIPS_OABI32),y)
> -TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32
> -else ifeq ($(BR2_MIPS_NABI32),y)
> -TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32
> -else ifeq ($(BR2_MIPS_NABI64),y)
> -TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64
> -endif
> -
> -define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
> -	rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin
> -	ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin
> -	ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin
> -endef
> -endif
> -
>  ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),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
> @@ -100,12 +68,6 @@ TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2016.05-03
> -TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2016.05-03.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_SYMLINK
> -TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS
> -TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
>  TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
>  TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> 

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

* [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: " Arnout Vandecappelle
@ 2016-11-22 21:30   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:30 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the nios-II architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

For this package I preferred to use toolchain-external-codesourcery-nios2 as
package name but since we want to keep the Kconfig symbol
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII, we have to use
toolchain-external-codesourcery-niosII.
Otherwise we hit the dependency chain check from the main Makefile
(toolchain-external-codesourcery-nios2 is in the dependency chain of
toolchain-external that has added it to its _DEPENDENCIES variable without
selecting it or depending on it from Config.in)

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 25 ++++++----------------
>  .../Config.in                                      | 17 +++++++++++++++
>  .../Config.in.options                              |  9 ++++++++
>  .../toolchain-external-codesourcery-niosII.hash    |  3 +++
>  .../toolchain-external-codesourcery-niosII.mk      | 13 +++++++++++
>  .../toolchain-external/toolchain-external.hash     |  3 ---
>  toolchain/toolchain-external/toolchain-external.mk |  3 ---
>  7 files changed, 48 insertions(+), 25 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index d2e1d3b..e628279 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -30,6 +30,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config
>  source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in"
>  
> +# NIOSII
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -75,24 +78,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
> -	bool "Sourcery CodeBench Nios-II 2016.05"
> -	depends on BR2_nios2
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1
> -	help
> -	  Sourcery CodeBench toolchain for the Nios-II architecture,
> -	  from Mentor Graphics. It uses gcc 5.3, binutils 2.25.51,
> -	  glibc 2.23, gdb 7.10.50 and kernel headers 4.4.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
>  	bool "Sourcery CodeBench SH 2012.09"
>  	depends on BR2_sh4a || BR2_sh4aeb
> @@ -280,7 +265,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "nios2-linux-gnu"        if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
>  	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
>  	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
> @@ -343,6 +327,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-mips/Config
>  source "toolchain/toolchain-external/toolchain-external-codescape-img-mips/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Config.in.options"
>  
> +# NIOSII
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
> new file mode 100644
> index 0000000..54eed8c
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in
> @@ -0,0 +1,17 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
> +	bool "Sourcery CodeBench Nios-II 2016.05"
> +	depends on BR2_nios2
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1
> +	help
> +	  Sourcery CodeBench toolchain for the Nios-II architecture,
> +	  from Mentor Graphics. It uses gcc 5.3, binutils 2.25.51,
> +	  glibc 2.23, gdb 7.10.50 and kernel headers 4.4.
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
> new file mode 100644
> index 0000000..07cc5ed
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "nios2-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-niosII"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
> new file mode 100644
> index 0000000..a60c49f
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
> +sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
> new file mode 100644
> index 0000000..3eb6679
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-niosII/toolchain-external-codesourcery-niosII.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-niosII
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION = 2016.05-10
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SITE = http://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_SOURCE = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_ACTUAL_SOURCE_TARBALL = sourceryg++-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 83859e7..5c98fe3 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -2,9 +2,6 @@
>  # Next hashes are all locally computed
>  
>  # Mentor's Sourcery CodeBench Lite toolchains
> -# NiosII
> -sha256 750639290744adda931c81fa2cd2ffc2bde972488047824dcfaa53c42562191d  sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -sha256 3dc1c2685c0472059547dd7becb5dc991541b8176af39fa7aa5f601d38b9879a  sourceryg++-2016.05-10-nios2-linux-gnu.src.tar.bz2
>  # SuperH
>  sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 31a53d2..fde0564 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y)
> -TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2016.05-10-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
> 

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

* [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: " Arnout Vandecappelle
@ 2016-11-22 21:32   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:32 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the SuperH 4a architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 33 ++++------------------
>  .../toolchain-external-codesourcery-sh/Config.in   | 25 ++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-codesourcery-sh.hash        |  3 ++
>  .../toolchain-external-codesourcery-sh.mk          | 13 +++++++++
>  .../toolchain-external/toolchain-external.hash     |  3 --
>  toolchain/toolchain-external/toolchain-external.mk |  3 --
>  7 files changed, 56 insertions(+), 33 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index e628279..8e06b05 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -33,6 +33,9 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
>  # NIOSII
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in"
>  
> +# SH4a
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -78,32 +81,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
> -	bool "Sourcery CodeBench SH 2012.09"
> -	depends on BR2_sh4a || BR2_sh4aeb
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> -	help
> -	  Sourcery CodeBench toolchain for the SuperH architecture,
> -	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
> -	  glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers
> -	  3.5.4. It has support for the following variants:
> -	    - SH4A, glibc, little endian
> -	      Default.
> -	    - SH4A, glibc, big endian
> -	      Add -mb to BR2_TARGET_OPTIMIZATION
> -	    - SH4A, uClibc, little endian
> -	      Not usable in Buildroot yet.
> -	    - SH4A, uClibc, big endian
> -	      Not usable in Buildroot yet.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
>  	bool "Sourcery CodeBench AMD64 2015.11"
>  	depends on BR2_x86_64
> @@ -265,7 +242,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
>  	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
> @@ -330,6 +306,9 @@ source "toolchain/toolchain-external/toolchain-external-codescape-mti-mips/Confi
>  # NIOSII
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Config.in.options"
>  
> +# SH4a
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
> new file mode 100644
> index 0000000..a47dab7
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in
> @@ -0,0 +1,25 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
> +	bool "Sourcery CodeBench SH 2012.09"
> +	depends on BR2_sh4a || BR2_sh4aeb
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> +	help
> +	  Sourcery CodeBench toolchain for the SuperH architecture,
> +	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
> +	  glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers
> +	  3.5.4. It has support for the following variants:
> +	    - SH4A, glibc, little endian
> +	      Default.
> +	    - SH4A, glibc, big endian
> +	      Add -mb to BR2_TARGET_OPTIMIZATION
> +	    - SH4A, uClibc, little endian
> +	      Not usable in Buildroot yet.
> +	    - SH4A, uClibc, big endian
> +	      Not usable in Buildroot yet.
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
> new file mode 100644
> index 0000000..90061ce
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "sh-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-sh"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
> new file mode 100644
> index 0000000..ff2ba5f
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
> +sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
> new file mode 100644
> index 0000000..5370bb2
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-sh/toolchain-external-codesourcery-sh.mk
> @@ -0,0 +1,13 @@
> +################################################################################
> +#
> +# toolchain-external-sourcery-sh
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION = 2012.09-61
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_SOURCE = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_ACTUAL_SOURCE_TARBALL = renesas-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_SH_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 5c98fe3..18b3e1a 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -2,9 +2,6 @@
>  # Next hashes are all locally computed
>  
>  # Mentor's Sourcery CodeBench Lite toolchains
> -# SuperH
> -sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802  renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004  renesas-2012.09-61-sh-linux-gnu.src.tar.bz2
>  # x86
>  sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
>  sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index fde0564..9aabab6 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
> 

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

* [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: " Arnout Vandecappelle
@ 2016-11-22 21:34   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:34 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Romain Naour <romain.naour@gmail.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the AMD-64 architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 32 ++++------------------
>  .../Config.in                                      | 24 ++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-codesourcery-amd64.hash     |  3 ++
>  .../toolchain-external-codesourcery-amd64.mk       | 12 ++++++++
>  .../toolchain-external/toolchain-external.hash     |  3 --
>  toolchain/toolchain-external/toolchain-external.mk |  3 --
>  7 files changed, 54 insertions(+), 32 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 8e06b05..2689c91 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -36,6 +36,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Conf
>  # SH4a
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in"
>  
> +# x86/x86_64 (use amd64 toolchain by default for AMD64)
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -81,31 +84,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
> -	bool "Sourcery CodeBench AMD64 2015.11"
> -	depends on BR2_x86_64
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	depends on BR2_x86_jaguar || BR2_x86_steamroller
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	help
> -	  Sourcery CodeBench toolchain for the amd64 (x86_64)
> -	  architectures, from Mentor Graphics. It uses gcc 5.2,
> -	  binutils 2.25.51, glibc 2.22, gdb 7.10.50 and kernel headers
> -	  4.2. It has support for the following variants:
> -	    - AMD Puma/Jaguar (family 16h), glibc
> -	    Default for x86_64, nothing special to do.
> -	    - AMD Steamroller (family 15h), glibc
> -	    Select a steamroller core.
> -	  No other architecture variants are supported since glibc
> -	  is optimized for one of these two baselines.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	bool "Sourcery CodeBench x86/x86_64 2012.09"
>  	depends on BR2_i386 || BR2_x86_64
> @@ -243,7 +221,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
> -	default "x86_64-amd-linux-gnu"   if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
>  	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
>  	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
> @@ -309,6 +286,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-niosII/Conf
>  # SH4a
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.in.options"
>  
> +# x86/x86_64
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
> new file mode 100644
> index 0000000..86486c8
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in
> @@ -0,0 +1,24 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
> +	bool "Sourcery CodeBench AMD64 2015.11"
> +	depends on BR2_x86_64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	depends on BR2_x86_jaguar || BR2_x86_steamroller
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	help
> +	  Sourcery CodeBench toolchain for the amd64 (x86_64)
> +	  architectures, from Mentor Graphics. It uses gcc 5.2,
> +	  binutils 2.25.51, glibc 2.22, gdb 7.10.50 and kernel headers
> +	  4.2. It has support for the following variants:
> +	    - AMD Puma/Jaguar (family 16h), glibc
> +	    Default for x86_64, nothing special to do.
> +	    - AMD Steamroller (family 15h), glibc
> +	    Select a steamroller core.
> +	  No other architecture variants are supported since glibc
> +	  is optimized for one of these two baselines.
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
> new file mode 100644
> index 0000000..2ab2302
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "x86_64-amd-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-amd64"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
> new file mode 100644
> index 0000000..ea5f300
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> +sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
> new file mode 100644
> index 0000000..4b8e31c
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-amd64/toolchain-external-codesourcery-amd64.mk
> @@ -0,0 +1,12 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-amd64
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION = 2015.11-139
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_SOURCE = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i686-pc-linux-gnu.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_ACTUAL_SOURCE_TARBALL = amd-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 18b3e1a..b873abe 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -5,9 +5,6 @@
>  # x86
>  sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
>  sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
> -# AMD64
> -sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e  amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
> -sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de  amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2
>  
>  # ARM toolchains from Texas Instrument's Arago project
>  # There is one source file that covers both binary distributions.
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 9aabab6..3cb9024 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -59,9 +59,6 @@ TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
>  TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
>  TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
>  TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> 

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

* [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: " Arnout Vandecappelle
@ 2016-11-22 21:35   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:35 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Sourcery CodeBench external
> toolchain for the i386/x86_64 architecture.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 33 ++--------------------
>  .../toolchain-external-codesourcery-x86/Config.in  | 29 +++++++++++++++++++
>  .../Config.in.options                              |  9 ++++++
>  .../toolchain-external-codesourcery-x86.hash       |  3 ++
>  .../toolchain-external-codesourcery-x86.mk         | 12 ++++++++
>  .../toolchain-external/toolchain-external.hash     |  5 ----
>  toolchain/toolchain-external/toolchain-external.mk |  3 --
>  7 files changed, 55 insertions(+), 39 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 2689c91..cddfca8 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -38,6 +38,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
>  
>  # x86/x86_64 (use amd64 toolchain by default for AMD64)
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in"
>  
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
> @@ -84,36 +85,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
> -	bool "Sourcery CodeBench x86/x86_64 2012.09"
> -	depends on BR2_i386 || BR2_x86_64
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	depends on !BR2_STATIC_LIBS
> -	depends on !BR2_x86_jaguar
> -	depends on !BR2_x86_steamroller
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> -	help
> -	  Sourcery CodeBench toolchain for the x86/x86_64
> -	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
> -	  binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers
> -	  3.5.4. It has support for the following variants:
> -	    - Intel Pentium 4, glibc, 32 bits
> -	      Default for x86, nothing special to do.
> -	    - Intel Atom, glibc, 32 bits
> -	      Select an Atom core
> -	    - Intel Xeon, glibc, 64 bits
> -	      Default for x86_64, nothing special to do.
> -	    - Intel Core 2, glibc, 64 bits
> -	      Select a Core 2 core
> -	  Other architecture variants (beyond Pentium-4/Xeon) are
> -	  supported as well, but glibc is not optimised for it.
> -
>  config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
>  	bool "Musl 1.1.12 toolchain"
>  	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
> @@ -220,7 +191,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
>  	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
>  	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
>  	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
> @@ -288,6 +258,7 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
>  
>  # x86/x86_64
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
> +source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options"
>  
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
> new file mode 100644
> index 0000000..bcbdd26
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in
> @@ -0,0 +1,29 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
> +	bool "Sourcery CodeBench x86/x86_64 2012.09"
> +	depends on BR2_i386 || BR2_x86_64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	depends on !BR2_STATIC_LIBS
> +	depends on !BR2_x86_jaguar
> +	depends on !BR2_x86_steamroller
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> +	help
> +	  Sourcery CodeBench toolchain for the x86/x86_64
> +	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
> +	  binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers
> +	  3.5.4. It has support for the following variants:
> +	    - Intel Pentium 4, glibc, 32 bits
> +	      Default for x86, nothing special to do.
> +	    - Intel Atom, glibc, 32 bits
> +	      Select an Atom core
> +	    - Intel Xeon, glibc, 64 bits
> +	      Default for x86_64, nothing special to do.
> +	    - Intel Core 2, glibc, 64 bits
> +	      Select a Core 2 core
> +	  Other architecture variants (beyond Pentium-4/Xeon) are
> +	  supported as well, but glibc is not optimised for it.
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
> new file mode 100644
> index 0000000..65b62f3
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options
> @@ -0,0 +1,9 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "i686-pc-linux-gnu"
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-codesourcery-x86"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
> new file mode 100644
> index 0000000..a003f7a
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
> +sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
> new file mode 100644
> index 0000000..5ee6991
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-codesourcery-x86/toolchain-external-codesourcery-x86.mk
> @@ -0,0 +1,12 @@
> +################################################################################
> +#
> +# toolchain-external-codesourcery-x86
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SITE = https://sourcery.mentor.com/public/gnu_toolchain/$(TOOLCHAIN_EXTERNAL_PREFIX)
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION = 2012.09-62
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_SOURCE = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX)-i386-linux.tar.bz2
> +TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_ACTUAL_SOURCE_TARBALL = ia32-$(TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_VERSION)-$(TOOLCHAIN_EXTERNAL_PREFIX).src.tar.bz2
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index b873abe..8926bf8 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -1,11 +1,6 @@
>  ######################################
>  # Next hashes are all locally computed
>  
> -# Mentor's Sourcery CodeBench Lite toolchains
> -# x86
> -sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458  ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
> -sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717  ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2
> -
>  # ARM toolchains from Texas Instrument's Arago project
>  # There is one source file that covers both binary distributions.
>  sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 3cb9024..7e4539e 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -56,9 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu
> -TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
>  TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
>  TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> 

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

* [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: " Arnout Vandecappelle
@ 2016-11-22 21:40   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:40 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the pre-built Musl external
> toolchains.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 48 +++-------------------
>  .../toolchain-external-musl-cross/Config.in        | 30 ++++++++++++++
>  .../Config.in.options                              | 19 +++++++++
>  .../toolchain-external-musl-cross.hash}            | 17 +-------
>  .../toolchain-external-musl-cross.mk               | 12 ++++++
>  .../toolchain-external/toolchain-external.hash     | 13 ------
>  toolchain/toolchain-external/toolchain-external.mk | 26 ------------
>  7 files changed, 68 insertions(+), 97 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
>  copy toolchain/toolchain-external/{toolchain-external.hash => toolchain-external-musl-cross/toolchain-external-musl-cross.hash} (51%)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index cddfca8..5188e1a 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -40,6 +40,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in"
>  
> +# Musl based toolchains (after all the others)
> +source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -85,37 +88,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
> -	bool "Musl 1.1.12 toolchain"
> -	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
> -		(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4 && BR2_USE_MMU) || \
> -		(BR2_armeb && BR2_ARM_EABI && !BR2_ARM_CPU_ARMV7A && BR2_USE_MMU) || \
> -		BR2_i386 || (BR2_mips && !BR2_SOFT_FLOAT) || \
> -		BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || \
> -		BR2_sh4 || BR2_sh4eb || \
> -		BR2_x86_64
> -	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> -	# Unsupported MIPS cores
> -	depends on !BR2_mips_interaptiv && !BR2_mips_m5100 && !BR2_mips_m5101
> -	# Unsupported for MIPS R6
> -	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
> -	select BR2_TOOLCHAIN_EXTERNAL_MUSL
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -	help
> -	  Toolchain based on the Musl C library, provided by the
> -	  musl-cross project. It uses gcc 5.3, binutils 2.25.1 and
> -	  musl 1.1.12. It does not have a cross debugger included.
> -
> -	  The ARM soft-float toolchain is built for ARMv4t, while the
> -	  ARM hard-float toolchain is built for ARMv5t.
> -	  The x86 toolchain is built for i486.
> -
> -	  http://musl.codu.org/
> -
>  config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
>  	bool "Synopsys ARC 2014.12 toolchain"
>  	depends on BR2_arc
> @@ -191,17 +163,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default "arm-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI
> -	default "arm-linux-musleabihf"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF
> -	default "armeb-linux-musleabi"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb
> -	default "i486-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386
> -	default "mips-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT)
> -	default "mipsel-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && !BR2_SOFT_FLOAT)
> -	default "mipsel-sf-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && BR2_SOFT_FLOAT)
> -	default "powerpc-linux-musl"     if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_powerpc
> -	default "sh4-linux-musl"         if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4
> -	default "sh4eb-linux-musl"       if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4eb
> -	default "x86_64-linux-musl"	 if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_x86_64
>  	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \
>  					 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
> @@ -260,6 +221,9 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-sh/Config.i
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-amd64/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.in.options"
>  
> +# Musl based toolchains
> +source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options"
> +
>  if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  choice
> diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
> new file mode 100644
> index 0000000..5cffa2d
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in
> @@ -0,0 +1,30 @@
> +config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
> +	bool "Musl 1.1.12 toolchain"
> +	depends on (BR2_arm && BR2_ARM_EABI && BR2_USE_MMU) || \
> +		(BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4 && BR2_USE_MMU) || \
> +		(BR2_armeb && BR2_ARM_EABI && !BR2_ARM_CPU_ARMV7A && BR2_USE_MMU) || \
> +		BR2_i386 || (BR2_mips && !BR2_SOFT_FLOAT) || \
> +		BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || \
> +		BR2_sh4 || BR2_sh4eb || \
> +		BR2_x86_64
> +	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
> +	# Unsupported MIPS cores
> +	depends on !BR2_mips_interaptiv && !BR2_mips_m5100 && !BR2_mips_m5101
> +	# Unsupported for MIPS R6
> +	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
> +	select BR2_TOOLCHAIN_EXTERNAL_MUSL
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_HOSTARCH_NEEDS_IA32_LIBS
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +	help
> +	  Toolchain based on the Musl C library, provided by the
> +	  musl-cross project. It uses gcc 5.3, binutils 2.25.1 and
> +	  musl 1.1.12. It does not have a cross debugger included.
> +
> +	  The ARM soft-float toolchain is built for ARMv4t, while the
> +	  ARM hard-float toolchain is built for ARMv5t.
> +	  The x86 toolchain is built for i486.
> +
> +	  http://musl.codu.org/
> diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
> new file mode 100644
> index 0000000..cd12355
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options
> @@ -0,0 +1,19 @@
> +if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "arm-linux-musleabi"	 if BR2_arm && BR2_ARM_EABI
> +	default "arm-linux-musleabihf"	 if BR2_arm && BR2_ARM_EABIHF
> +	default "armeb-linux-musleabi"	 if BR2_armeb
> +	default "i486-linux-musl"	 if BR2_i386
> +	default "mips-linux-musl"	 if (BR2_mips && !BR2_SOFT_FLOAT)
> +	default "mipsel-linux-musl"	 if (BR2_mipsel && !BR2_SOFT_FLOAT)
> +	default "mipsel-sf-linux-musl"	 if (BR2_mipsel && BR2_SOFT_FLOAT)
> +	default "powerpc-linux-musl"     if BR2_powerpc
> +	default "sh4-linux-musl"         if BR2_sh4
> +	default "sh4eb-linux-musl"       if BR2_sh4eb
> +	default "x86_64-linux-musl"	 if BR2_x86_64
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-musl-cross"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
> similarity index 51%
> copy from toolchain/toolchain-external/toolchain-external.hash
> copy to toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
> index 8926bf8..beef8fd 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.hash
> @@ -1,19 +1,4 @@
> -######################################
> -# Next hashes are all locally computed
> -
> -# ARM toolchains from Texas Instrument's Arago project
> -# There is one source file that covers both binary distributions.
> -sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
> -sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
> -sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
> -
> -# 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
> -sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
> -sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
> -
> -# Prebuilt musl toolchains from musl-cross
> +# Locally calculated
>  sha256 e32c23d0b83639fc10ad06666ec086b66453b9be44415fe1a818c3c3b526dfb1  crossx86-armeb-linux-musleabi-1.1.12.tar.xz
>  sha256 eb81bd5d6ada454c6e854b18bfa8dc801333782152166f6cab9fb7cd11692987  crossx86-arm-linux-musleabi-1.1.12.tar.xz
>  sha256 a050da284ff22d291ae71dfc249ebdedb18334b8d626804760ce7d5963e392e6  crossx86-arm-linux-musleabihf-1.1.12.tar.xz
> diff --git a/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
> new file mode 100644
> index 0000000..966505b
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-musl-cross/toolchain-external-musl-cross.mk
> @@ -0,0 +1,12 @@
> +################################################################################
> +#
> +# toolchain-external-musl-cross
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION = 1.1.12
> +TOOLCHAIN_EXTERNAL_MUSL_CROSS_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION)
> +
> +TOOLCHAIN_EXTERNAL_MUSL_CROSS_SOURCE = crossx86-$(TOOLCHAIN_EXTERNAL_PREFIX)-$(TOOLCHAIN_EXTERNAL_MUSL_CROSS_VERSION).tar.xz
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index 8926bf8..a286ef2 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -12,16 +12,3 @@ sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3  arc_gnu
>  sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10  arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz
>  sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
>  sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
> -
> -# Prebuilt musl toolchains from musl-cross
> -sha256 e32c23d0b83639fc10ad06666ec086b66453b9be44415fe1a818c3c3b526dfb1  crossx86-armeb-linux-musleabi-1.1.12.tar.xz
> -sha256 eb81bd5d6ada454c6e854b18bfa8dc801333782152166f6cab9fb7cd11692987  crossx86-arm-linux-musleabi-1.1.12.tar.xz
> -sha256 a050da284ff22d291ae71dfc249ebdedb18334b8d626804760ce7d5963e392e6  crossx86-arm-linux-musleabihf-1.1.12.tar.xz
> -sha256 18d07f5c8f4cfe373461cf21cf7b1bfefa820a37e96a69b68e0f315d528b4286  crossx86-i486-linux-musl-1.1.12.tar.xz
> -sha256 1c1480c2618097e402fe804c1431fbd49b0d43520af81d4c1a695a2fa13a3922  crossx86-mipsel-linux-musl-1.1.12.tar.xz
> -sha256 f0a8b3eb0566138ab3cc77bc09648be15bc325da974ec98b9e67f2fb82be3295  crossx86-mipsel-sf-linux-musl-1.1.12.tar.xz
> -sha256 6a99989c3dff56776981f6760b2c54dcb9e4032be1d649968bb06c04f2e64177  crossx86-mips-linux-musl-1.1.12.tar.xz
> -sha256 c082adc3e8b0750bb22ca82628524fd525fd77f534517ac5a66e7ac5a297ee6e  crossx86-powerpc-linux-musl-1.1.12.tar.xz
> -sha256 8c6c9ebb54040e47947b4d3af6823d01fef2bb6ee81b18903c801030c066092b  crossx86-sh4eb-linux-musl-1.1.12.tar.xz
> -sha256 ae9a0a5a60226aa086a56628cfd5c1d283c9dffdca37891d7e6adc2bd21ac2e0  crossx86-sh4-linux-musl-1.1.12.tar.xz
> -sha256 27e0ea1043a58aebeadf1dacd67e47fd0b5c19fc36f42c9374e5fa3308df09c6  crossx86-x86_64-linux-musl-1.1.12.tar.xz
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 7e4539e..0680473 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -56,32 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y)
> -TOOLCHAIN_EXTERNAL_VERSION = 1.1.12
> -TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION)
> -ifeq ($(BR2_arm)$(BR2_ARM_EABI),yy)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_arm)$(BR2_ARM_EABIHF),yy)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabihf-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_armeb),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-armeb-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_i386),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-i486-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_mips),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mips-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-sf-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_powerpc),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-powerpc-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_sh4),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_sh4eb),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4eb-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -else ifeq ($(BR2_x86_64),y)
> -TOOLCHAIN_EXTERNAL_SOURCE = crossx86-x86_64-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz
> -endif
>  else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y)
>  TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12
>  ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
> 

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

* [Buildroot] [PATCH v4 20/22] toolchain-external-custom: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 20/22] toolchain-external-custom: " Arnout Vandecappelle
@ 2016-11-22 21:49   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:49 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package to support custom external toolchains.
> 
> The legacy implementation is removed.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 351 +--------------------
>  .../toolchain-external-custom/Config.in            |   5 +
>  .../toolchain-external-custom/Config.in.options    | 334 ++++++++++++++++++++
>  .../toolchain-external-custom.mk                   |  15 +
>  toolchain/toolchain-external/toolchain-external.mk |   6 -
>  5 files changed, 361 insertions(+), 350 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-custom/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index 5188e1a..e592ec2 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -43,6 +43,11 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.
>  # Musl based toolchains (after all the others)
>  source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in"
>  
> +# Kept last, so it remains the non-default choice, unless there isn't
> +# any available toolchain profile for the currently selected
> +# architecture.
> +source "toolchain/toolchain-external/toolchain-external-custom/Config.in"
> +
>  config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	bool "Arago ARMv7 2011.09"
>  	depends on BR2_arm
> @@ -109,12 +114,6 @@ config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
>  	  Toolchain for the ARC cores, from
>  	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
>  
> -config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> -	bool "Custom toolchain"
> -	help
> -	  Use this option to use a custom toolchain pre-installed on
> -	  your system.
> -
>  endchoice
>  
>  choice
> @@ -146,25 +145,12 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
>  	help
>  	  Path to where the external toolchain is installed.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_URL
> -	string "Toolchain URL"
> -	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
> -	help
> -	  URL of the custom toolchain tarball to download and install.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
> -	string "Toolchain prefix"
> -	depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> -	default "$(ARCH)-linux"
> -
>  config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	string
>  	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
>  	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
> -	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \
> -					 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GLIBC
>  	bool
> @@ -224,331 +210,8 @@ source "toolchain/toolchain-external/toolchain-external-codesourcery-x86/Config.
>  # Musl based toolchains
>  source "toolchain/toolchain-external/toolchain-external-musl-cross/Config.in.options"
>  
> -if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> -
> -choice
> -	bool "External toolchain gcc version"
> -	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
> -	help
> -	  Set to the gcc version that is used by your external
> -	  toolchain.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_6
> -	bool "6.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_5
> -	bool "5.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
> -	bool "4.9.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
> -	bool "4.8.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
> -	bool "4.7.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
> -	bool "4.6.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
> -	bool "4.5.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
> -	bool "4.4.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
> -
> -config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
> -	bool "4.3.x"
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
> -
> -endchoice
> -
> -choice
> -	bool "External toolchain kernel headers series"
> -	default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
> -	help
> -	  Set to the kernel headers version that were used to build
> -	  this external toolchain.
> -
> -	  This is used to hide/show some packages that have strict
> -	  requirements on the version of kernel headers.
> -
> -	  If unsure what version your toolchain is using, you can look
> -	  at the value of LINUX_VERSION_CODE in linux/version.h in your
> -	  toolchain. The Linux version is M.m.p, with:
> -	    M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF
> -	    m = ( LINUX_VERSION_CODE >> 8  ) & 0xFF
> -	    p = ( LINUX_VERSION_CODE >> 0  ) & 0xFF
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8
> -	bool "4.8.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7
> -	bool "4.7.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6
> -	bool "4.6.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5
> -	bool "4.5.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4
> -	bool "4.4.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3
> -	bool "4.3.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2
> -	bool "4.2.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1
> -	bool "4.1.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0
> -	bool "4.0.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19
> -	bool "3.19.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18
> -	bool "3.18.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17
> -	bool "3.17.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
> -	bool "3.16.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
> -	bool "3.15.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
> -	bool "3.14.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
> -	bool "3.13.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
> -	bool "3.12.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
> -	bool "3.11.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
> -	bool "3.10.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
> -	bool "3.9.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
> -	bool "3.8.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
> -	bool "3.7.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
> -	bool "3.6.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
> -	bool "3.5.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
> -	bool "3.4.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
> -	bool "3.3.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
> -	bool "3.2.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
> -	bool "3.1.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
> -	bool "3.0.x"
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
> -	bool "2.6.x"
> -
> -endchoice
> -
> -choice
> -	prompt "External toolchain C library"
> -	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> -
> -config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> -	bool "uClibc/uClibc-ng"
> -	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> -	# For the time being, we assume that all custom external
> -	# toolchains have shadow password support.
> -	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
> -	help
> -	  Select this option if your external toolchain uses the
> -	  uClibc (available from http://www.uclibc.org/)
> -	  or uClibc-ng (available from http://www.uclibc-ng.org)
> -	  C library.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
> -	bool "glibc/eglibc"
> -	depends on !BR2_STATIC_LIBS
> -	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	help
> -	  Select this option if your external toolchain uses the GNU C
> -	  library (available from https://www.gnu.org/software/libc/)
> -	  or its variant the eglibc library (http://www.eglibc.org/).
> -
> -	  Note: eglibc is a variant of glibc that (among other things)
> -	  can be configured to exclude some of its features. Using a
> -	  toolchain with eglibc configured to exclude key features may
> -	  cause build failures to some packages.
> -
> -comment "glibc only available with shared lib support"
> -	depends on BR2_STATIC_LIBS
> -
> -config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
> -	bool "musl"
> -	select BR2_TOOLCHAIN_EXTERNAL_MUSL
> -	help
> -	  Select this option if your external toolchain uses the
> -	  'musl' C library, available from http://www.musl-libc.org/.
> -
> -endchoice
> -
> -if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> -
> -config BR2_TOOLCHAIN_EXTERNAL_WCHAR
> -	bool "Toolchain has WCHAR support?"
> -	select BR2_USE_WCHAR
> -	help
> -	  Select this option if your external toolchain supports
> -	  WCHAR. If you don't know, leave the default value, Buildroot
> -	  will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_LOCALE
> -	bool "Toolchain has locale support?"
> -	select BR2_TOOLCHAIN_EXTERNAL_WCHAR
> -	select BR2_ENABLE_LOCALE
> -	help
> -	  Select this option if your external toolchain has locale
> -	  support. If you don't know, leave the default value,
> -	  Buildroot will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> -	bool "Toolchain has threads support?"
> -	select BR2_TOOLCHAIN_HAS_THREADS
> -	default y
> -	help
> -	  Select this option if your external toolchain has thread
> -	  support. If you don't know, leave the default value,
> -	  Buildroot will tell you if it's correct or not.
> -
> -if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
> -	bool "Toolchain has threads debugging support?"
> -	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> -	default y
> -	help
> -	  Select this option if your external toolchain has thread
> -	  debugging support. If you don't know, leave the default
> -	  value, Buildroot will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
> -	bool "Toolchain has NPTL threads support?"
> -	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
> -	default y
> -	help
> -	  Select this option if your external toolchain uses the NPTL
> -	  (Native Posix Thread Library) implementation of Posix
> -	  threads. If you don't know, leave the default value,
> -	  Buildroot will tell you if it's correct or not.
> -
> -endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> -
> -endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> -
> -config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
> -	bool "Toolchain has SSP support?"
> -	select BR2_TOOLCHAIN_HAS_SSP
> -	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	default y if BR2_TOOLCHAIN_EXTERNAL_MUSL
> -	help
> -	  Selection this option if your external toolchain has Stack
> -	  Smashing Protection support enabled. If you don't know,
> -	  leave the default value, Buildroot will tell you if it's
> -	  correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
> -	bool "Toolchain has RPC support?"
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL
> -	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
> -	help
> -	  Select this option if your external toolchain supports
> -	  RPC. If you don't know, leave the default value, Buildroot
> -	  will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_CXX
> -	bool "Toolchain has C++ support?"
> -	select BR2_INSTALL_LIBSTDCPP
> -	help
> -	  Select this option if your external toolchain has C++
> -	  support. If you don't know, leave the default value,
> -	  Buildroot will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTERNAL_FORTRAN
> -	bool "Toolchain has Fortran support?"
> -	select BR2_TOOLCHAIN_HAS_FORTRAN
> -	help
> -	  Select this option if your external toolchain has Fortran
> -	  support. If you don't know, leave the default value,
> -	  Buildroot will tell you if it's correct or not.
> -
> -config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
> -	string "Extra toolchain libraries to be copied to target"
> -	help
> -	  If your external toolchain provides extra libraries that
> -	  need to be copied to the target filesystem, enter them
> -	  here, separated by spaces.
> -
> -endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> +# Custom toolchains
> +source "toolchain/toolchain-external/toolchain-external-custom/Config.in.options"
>  
>  config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
>  	bool "Copy gdb server to the Target"
> diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in b/toolchain/toolchain-external/toolchain-external-custom/Config.in
> new file mode 100644
> index 0000000..a913feb
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in
> @@ -0,0 +1,5 @@
> +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> +	bool "Custom toolchain"
> +	help
> +	  Use this option to use a custom toolchain pre-installed on
> +	  your system.
> diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> new file mode 100644
> index 0000000..cdc2555
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
> @@ -0,0 +1,334 @@
> +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-custom"
> +
> +config BR2_TOOLCHAIN_EXTERNAL_URL
> +	string "Toolchain URL"
> +	depends on BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD
> +	help
> +	  URL of the custom toolchain tarball to download and install.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
> +	string "Toolchain prefix"
> +	default "$(ARCH)-linux"
> +
> +choice
> +	bool "External toolchain gcc version"
> +	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
> +	help
> +	  Set to the gcc version that is used by your external
> +	  toolchain.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_6
> +	bool "6.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_5
> +	bool "5.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
> +	bool "4.9.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
> +	bool "4.8.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
> +	bool "4.7.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
> +	bool "4.6.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
> +	bool "4.5.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
> +	bool "4.4.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
> +
> +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
> +	bool "4.3.x"
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
> +
> +endchoice
> +
> +choice
> +	bool "External toolchain kernel headers series"
> +	default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
> +	help
> +	  Set to the kernel headers version that were used to build
> +	  this external toolchain.
> +
> +	  This is used to hide/show some packages that have strict
> +	  requirements on the version of kernel headers.
> +
> +	  If unsure what version your toolchain is using, you can look
> +	  at the value of LINUX_VERSION_CODE in linux/version.h in your
> +	  toolchain. The Linux version is M.m.p, with:
> +	    M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF
> +	    m = ( LINUX_VERSION_CODE >> 8  ) & 0xFF
> +	    p = ( LINUX_VERSION_CODE >> 0  ) & 0xFF
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_8
> +	bool "4.8.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_8
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_7
> +	bool "4.7.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_7
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_6
> +	bool "4.6.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_6
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5
> +	bool "4.5.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4
> +	bool "4.4.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3
> +	bool "4.3.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2
> +	bool "4.2.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1
> +	bool "4.1.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0
> +	bool "4.0.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19
> +	bool "3.19.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18
> +	bool "3.18.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17
> +	bool "3.17.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16
> +	bool "3.16.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15
> +	bool "3.15.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14
> +	bool "3.14.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13
> +	bool "3.13.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12
> +	bool "3.12.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11
> +	bool "3.11.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10
> +	bool "3.10.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9
> +	bool "3.9.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8
> +	bool "3.8.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7
> +	bool "3.7.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6
> +	bool "3.6.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5
> +	bool "3.5.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4
> +	bool "3.4.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3
> +	bool "3.3.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2
> +	bool "3.2.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1
> +	bool "3.1.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0
> +	bool "3.0.x"
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
> +	bool "2.6.x"
> +
> +endchoice
> +
> +choice
> +	prompt "External toolchain C library"
> +	default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> +
> +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> +	bool "uClibc/uClibc-ng"
> +	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> +	# For the time being, we assume that all custom external
> +	# toolchains have shadow password support.
> +	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
> +	help
> +	  Select this option if your external toolchain uses the
> +	  uClibc (available from http://www.uclibc.org/)
> +	  or uClibc-ng (available from http://www.uclibc-ng.org)
> +	  C library.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC
> +	bool "glibc/eglibc"
> +	depends on !BR2_STATIC_LIBS
> +	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	help
> +	  Select this option if your external toolchain uses the GNU C
> +	  library (available from https://www.gnu.org/software/libc/)
> +	  or its variant the eglibc library (http://www.eglibc.org/).
> +
> +	  Note: eglibc is a variant of glibc that (among other things)
> +	  can be configured to exclude some of its features. Using a
> +	  toolchain with eglibc configured to exclude key features may
> +	  cause build failures to some packages.
> +
> +comment "(e)glibc only available with shared lib support"
> +	depends on BR2_STATIC_LIBS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL
> +	bool "musl (experimental)"
> +	select BR2_TOOLCHAIN_EXTERNAL_MUSL
> +	help
> +	  Select this option if your external toolchain uses the
> +	  'musl' C library, available from http://www.musl-libc.org/.
> +
> +endchoice
> +
> +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> +
> +config BR2_TOOLCHAIN_EXTERNAL_WCHAR
> +	bool "Toolchain has WCHAR support?"
> +	select BR2_USE_WCHAR
> +	help
> +	  Select this option if your external toolchain supports
> +	  WCHAR. If you don't know, leave the default value, Buildroot
> +	  will tell you if it's correct or not.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_LOCALE
> +	bool "Toolchain has locale support?"
> +	select BR2_TOOLCHAIN_EXTERNAL_WCHAR
> +	select BR2_ENABLE_LOCALE
> +	help
> +	  Select this option if your external toolchain has locale
> +	  support. If you don't know, leave the default value,
> +	  Buildroot will tell you if it's correct or not.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> +	bool "Toolchain has threads support?"
> +	select BR2_TOOLCHAIN_HAS_THREADS
> +	default y
> +	help
> +	  Select this option if your external toolchain has thread
> +	  support. If you don't know, leave the default value,
> +	  Buildroot will tell you if it's correct or not.
> +
> +if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
> +	bool "Toolchain has threads debugging support?"
> +	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> +	default y
> +	help
> +	  Select this option if your external toolchain has thread
> +	  debugging support. If you don't know, leave the default
> +	  value, Buildroot will tell you if it's correct or not.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL
> +	bool "Toolchain has NPTL threads support?"
> +	select BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +	default y
> +	help
> +	  Select this option if your external toolchain uses the NPTL
> +	  (Native Posix Thread Library) implementation of Posix
> +	  threads. If you don't know, leave the default value,
> +	  Buildroot will tell you if it's correct or not.
> +
> +endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS
> +
> +endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
> +
> +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
> +	bool "Toolchain has SSP support?"
> +	select BR2_TOOLCHAIN_HAS_SSP
> +	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	default y if BR2_TOOLCHAIN_EXTERNAL_MUSL
> +	help
> +	  Selection this option if your external toolchain has Stack
> +	  Smashing Protection support enabled. If you don't know,
> +	  leave the default value, Buildroot will tell you if it's
> +	  correct or not.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
> +	bool "Toolchain has RPC support?"
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL
> +	default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +	help
> +	  Select this option if your external toolchain supports
> +	  RPC. If you don't know, leave the default value, Buildroot
> +	  will tell you if it's correct or not.
> +
> +config BR2_TOOLCHAIN_EXTERNAL_CXX
> +	bool "Toolchain has C++ support?"
> +	select BR2_INSTALL_LIBSTDCPP
> +	help
> +	  Select this option if your external toolchain has C++
> +	  support. If you don't know, leave the default value,
> +	  Buildroot will tell you if it's correct or not.
> +
> +config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS
> +	string "Extra toolchain libraries to be copied to target"
> +	help
> +	  If your external toolchain provides extra libraries that
> +	  need to be copied to the target filesystem, enter them
> +	  here, separated by spaces. They will be copied to the
> +	  target's /lib directory.
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
> new file mode 100644
> index 0000000..c4ae612
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-custom/toolchain-external-custom.mk
> @@ -0,0 +1,15 @@
> +################################################################################
> +#
> +# toolchain-external-custom
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_CUSTOM_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
> +TOOLCHAIN_EXTERNAL_CUSTOM_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
> +
> +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CUSTOM),y)
> +# We can't check hashes for custom downloaded toolchains
> +BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
> +endif
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index 0680473..e13d240 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -69,12 +69,6 @@ else
>  TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
>  endif
>  TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
> -else
> -# Custom toolchain
> -TOOLCHAIN_EXTERNAL_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))))
> -TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
> -# We can't check hashes for custom downloaded toolchains
> -BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE)
>  endif
>  
>  # Some toolchain vendors have a regular file naming pattern.
> 

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

* [Buildroot] [PATCH v4 21/22] toolchain-external-arc: new package
  2016-11-07  1:20 ` [Buildroot] [PATCH v4 21/22] toolchain-external-arc: " Arnout Vandecappelle
@ 2016-11-22 21:51   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-22 21:51 UTC (permalink / raw)
  To: buildroot

Le 07/11/2016 ? 02:20, Arnout Vandecappelle (Essensium/Mind) a ?crit :
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> This commit adds a new package for the Synopsys external toolchain for
> the ARC architecture.
> 
> The legacy implementation is removed.
> 
> Note that this toolchain is marked as BROKEN, but 2016.09 seems about
> to be released so maybe it will be unbroken soon.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain

> ---
> v4: add PREFIX definition, remove legacy implementation.
> ---
>  toolchain/toolchain-external/Config.in             | 29 +++++-----------------
>  .../toolchain-external-synopsys-arc/Config.in      | 20 +++++++++++++++
>  .../Config.in.options                              | 10 ++++++++
>  .../toolchain-external-synopsys-arc.hash           |  5 ++++
>  .../toolchain-external-synopsys-arc.mk             | 24 ++++++++++++++++++
>  .../toolchain-external/toolchain-external.hash     |  6 -----
>  toolchain/toolchain-external/toolchain-external.mk | 13 ----------
>  7 files changed, 65 insertions(+), 42 deletions(-)
>  create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
>  create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
>  create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
>  create mode 100644 toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
> 
> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
> index e592ec2..fb33703 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -15,6 +15,9 @@ comment "glibc toolchains only available with shared lib support"
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in"
>  
> +# ARC
> +source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in"
> +
>  # ARM (use Linaro toolchain by default)
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in"
> @@ -93,27 +96,6 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
>  	  This toolchain uses software-floating point.
>  
> -config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
> -	bool "Synopsys ARC 2014.12 toolchain"
> -	depends on BR2_arc
> -	depends on BR2_HOSTARCH = "x86_64"
> -	# does not provide IPv6, and lacks many uClibc features
> -	# expected by Buildroot. The next Synopsys toolchain version
> -	# should fix those problems.
> -	depends on BROKEN
> -	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> -	select BR2_INSTALL_LIBSTDCPP
> -	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> -	select BR2_ENABLE_LOCALE
> -	select BR2_USE_WCHAR
> -	select BR2_TOOLCHAIN_HAS_THREADS
> -	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> -	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> -	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> -	help
> -	  Toolchain for the ARC cores, from
> -	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
> -
>  endchoice
>  
>  choice
> @@ -147,8 +129,6 @@ config BR2_TOOLCHAIN_EXTERNAL_PATH
>  
>  config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>  	string
> -	default "arc-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle
> -	default "arceb-linux"		 if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
>  	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
>  
> @@ -182,6 +162,9 @@ config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
>  source "toolchain/toolchain-external/toolchain-external-linaro-aarch64/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-aarch64/Config.in.options"
>  
> +# ARC
> +source "toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options"
> +
>  # ARM
>  source "toolchain/toolchain-external/toolchain-external-linaro-arm/Config.in.options"
>  source "toolchain/toolchain-external/toolchain-external-codesourcery-arm/Config.in.options"
> diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
> new file mode 100644
> index 0000000..641eca8
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
> +	bool "Synopsys ARC 2014.12 toolchain"
> +	depends on BR2_arc
> +	depends on BR2_HOSTARCH = "x86_64"
> +	# does not provide IPv6, and lacks many uClibc features
> +	# expected by Buildroot. The next Synopsys toolchain version
> +	# should fix those problems.
> +	depends on BROKEN
> +	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
> +	select BR2_INSTALL_LIBSTDCPP
> +	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
> +	select BR2_ENABLE_LOCALE
> +	select BR2_USE_WCHAR
> +	select BR2_TOOLCHAIN_HAS_THREADS
> +	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
> +	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
> +	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
> +	help
> +	  Toolchain for the ARC cores, from
> +	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
> diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
> new file mode 100644
> index 0000000..ceb7dd0
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/Config.in.options
> @@ -0,0 +1,10 @@
> +if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
> +
> +config BR2_TOOLCHAIN_EXTERNAL_PREFIX
> +	default "arc-linux"		 if BR2_arcle
> +	default "arceb-linux"		 if BR2_arceb
> +
> +config BR2_PACKAGE_PROVIDES_TOOLCHAIN_EXTERNAL
> +	default "toolchain-external-synopsys-arc"
> +
> +endif
> diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
> new file mode 100644
> index 0000000..b684cce
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.hash
> @@ -0,0 +1,5 @@
> +# Locally calculated
> +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
> +sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
> +sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
> new file mode 100644
> index 0000000..14ea5e3
> --- /dev/null
> +++ b/toolchain/toolchain-external/toolchain-external-synopsys-arc/toolchain-external-synopsys-arc.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# toolchain-external-synopsys-arc
> +#
> +################################################################################
> +
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION = 2014.12
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)
> +
> +ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = arc700
> +else
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_CORE = archs
> +endif
> +
> +ifeq ($(BR2_arcle),y)
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = le
> +else
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_ENDIANESS = be
> +endif
> +
> +TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_SOURCE = arc_gnu_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_VERSION)_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
> +
> +$(eval $(toolchain-external-package))
> diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash
> index a286ef2..cc93998 100644
> --- a/toolchain/toolchain-external/toolchain-external.hash
> +++ b/toolchain/toolchain-external/toolchain-external.hash
> @@ -6,9 +6,3 @@
>  sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7  arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2
>  sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070  arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2
>  sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b  arago-toolchain-2011.09-sources.tar.bz2
> -
> -# 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
> -sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7  arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz
> -sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd  arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz
> diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
> index e13d240..53f5583 100644
> --- a/toolchain/toolchain-external/toolchain-external.mk
> +++ b/toolchain/toolchain-external/toolchain-external.mk
> @@ -56,19 +56,6 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
>  	rm -rf $(@D)/arago-2011.09/
>  endef
>  TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS
> -else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y)
> -TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12
> -ifeq ($(BR2_arc750d)$(BR2_arc770d),y)
> -TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = arc700
> -else
> -TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = archs
> -endif
> -ifeq ($(BR2_arcle),y)
> -TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = le
> -else
> -TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be
> -endif
> -TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz
>  endif
>  
>  # Some toolchain vendors have a regular file naming pattern.
> 

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

* [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package
  2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
                   ` (22 preceding siblings ...)
  2016-11-07  9:39 ` [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Romain NAOUR
@ 2016-11-23 21:39 ` Thomas Petazzoni
  2016-11-23 22:15   ` Romain Naour
  23 siblings, 1 reply; 55+ messages in thread
From: Thomas Petazzoni @ 2016-11-23 21:39 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 7 Nov 2016 02:19:55 +0100, Arnout Vandecappelle
(Essensium/Mind) wrote:

> The following changes since commit 6bb7430a20871ad4e3ccbc8c1992d60117214be2:
> 
>   Makefile: delete default rules (2016-11-05 23:34:26 +0100)
> 
> are available in the git repository at:
> 
>   http://github.com/arnout/buildroot external-toolchain
> 
> for you to fetch changes up to ad925c956093b8fcd04d084471b78f9ca074cbb9:
> 
>   toolchain-external: remove Arago toolchains (2016-11-07 02:15:06 +0100)

I've applied the entire patch series. I've looked at the result after
applying all of them, and it looks good to me overall. Considering the
amount of things being moved/changed, I'm sure we'll find some issues
here and there, but the only way is really to apply those patches and
see what breaks.

If there are people using external toolchains, then it would be nice if
they could give a test to the next branch right now, and report any
issue with toolchain handling.

Thanks Arnout and Romain for having picked up and finished my initial
work!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package
  2016-11-23 21:39 ` Thomas Petazzoni
@ 2016-11-23 22:15   ` Romain Naour
  0 siblings, 0 replies; 55+ messages in thread
From: Romain Naour @ 2016-11-23 22:15 UTC (permalink / raw)
  To: buildroot

Hi all,

Le 23/11/2016 ? 22:39, Thomas Petazzoni a ?crit :
> Hello,
> 
> On Mon, 7 Nov 2016 02:19:55 +0100, Arnout Vandecappelle
> (Essensium/Mind) wrote:
> 
>> The following changes since commit 6bb7430a20871ad4e3ccbc8c1992d60117214be2:
>>
>>   Makefile: delete default rules (2016-11-05 23:34:26 +0100)
>>
>> are available in the git repository at:
>>
>>   http://github.com/arnout/buildroot external-toolchain
>>
>> for you to fetch changes up to ad925c956093b8fcd04d084471b78f9ca074cbb9:
>>
>>   toolchain-external: remove Arago toolchains (2016-11-07 02:15:06 +0100)
> 
> I've applied the entire patch series. I've looked at the result after
> applying all of them, and it looks good to me overall. Considering the
> amount of things being moved/changed, I'm sure we'll find some issues
> here and there, but the only way is really to apply those patches and
> see what breaks.
> 
> If there are people using external toolchains, then it would be nice if
> they could give a test to the next branch right now, and report any
> issue with toolchain handling.
> 
> Thanks Arnout and Romain for having picked up and finished my initial
> work!

Thanks Arnout for the final respin :)

Romain

> 
> Thomas
> 

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

end of thread, other threads:[~2016-11-23 22:15 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07  1:19 [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Arnout Vandecappelle
2016-11-07  1:19 ` [Buildroot] [PATCH v4 01/22] Use already qstripped BR2_TOOLCHAIN_EXTERNAL_PREFIX everywhere Arnout Vandecappelle
2016-11-07 21:06   ` Romain Naour
2016-11-09 21:51   ` Thomas Petazzoni
2016-11-07  1:19 ` [Buildroot] [PATCH v4 02/22] toolchain-external: reorder the contents of toolchain-external.mk Arnout Vandecappelle
2016-11-07 21:26   ` Romain Naour
2016-11-07  1:19 ` [Buildroot] [PATCH v4 03/22] toolchain-external: move parts to pkg-toolchain-external.mk Arnout Vandecappelle
2016-11-07 21:34   ` Romain Naour
2016-11-07  1:19 ` [Buildroot] [PATCH v4 04/22] toolchain-external: introduce toolchain-external-package Arnout Vandecappelle
2016-11-07 22:16   ` Romain Naour
2016-11-08  1:00     ` Arnout Vandecappelle
2016-11-08  8:20       ` Thomas Petazzoni
2016-11-08 12:30         ` Arnout Vandecappelle
2016-11-08 15:38           ` Thomas Petazzoni
2016-11-08 20:53             ` Arnout Vandecappelle
2016-11-11 11:19         ` Arnout Vandecappelle
2016-11-07  1:20 ` [Buildroot] [PATCH v4 05/22] toolchain-external-linaro-aarch64: new package Arnout Vandecappelle
2016-11-07 22:23   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 06/22] toolchain-external-codesourcery-aarch64: " Arnout Vandecappelle
2016-11-07 22:25   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 07/22] toolchain-external-linaro-arm: " Arnout Vandecappelle
2016-11-07 22:26   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 08/22] toolchain-external-codesourcery-arm: " Arnout Vandecappelle
2016-11-07 22:28   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 09/22] toolchain-external-codesourcery-arm: Cortex-A12 and Cortex-A17 not supported Arnout Vandecappelle
2016-11-07 22:35   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 10/22] toolchain-external-linaro-armeb: new package Arnout Vandecappelle
2016-11-07 22:37   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 11/22] toolchain-external-blackfin-uclinux: " Arnout Vandecappelle
2016-11-07 22:42   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 12/22] toolchain-external-codesourcery-mips: " Arnout Vandecappelle
2016-11-07 22:43   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 13/22] toolchain-external-codescape-img-mips: " Arnout Vandecappelle
2016-11-22 21:20   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 14/22] toolchain-external-codescape-mti-mips: " Arnout Vandecappelle
2016-11-22 21:23   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 15/22] toolchain-external-codesourcery-niosII: " Arnout Vandecappelle
2016-11-22 21:30   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 16/22] toolchain-external-codesourcery-sh: " Arnout Vandecappelle
2016-11-22 21:32   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 17/22] toolchain-external-codesourcery-amd64: " Arnout Vandecappelle
2016-11-22 21:34   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 18/22] toolchain-external-codesourcery-x86: " Arnout Vandecappelle
2016-11-22 21:35   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 19/22] toolchain-external-musl-cross: " Arnout Vandecappelle
2016-11-22 21:40   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 20/22] toolchain-external-custom: " Arnout Vandecappelle
2016-11-22 21:49   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 21/22] toolchain-external-arc: " Arnout Vandecappelle
2016-11-22 21:51   ` Romain Naour
2016-11-07  1:20 ` [Buildroot] [PATCH v4 22/22] toolchain-external: remove Arago toolchains Arnout Vandecappelle
2016-11-07 22:49   ` Romain Naour
2016-11-07  9:39 ` [Buildroot] [PATCH v4 00/22] Splitting the toolchain-external package Romain NAOUR
2016-11-23 21:39 ` Thomas Petazzoni
2016-11-23 22:15   ` Romain Naour

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.