Skip to contentSkip to conversation

Pull request for branch for-2011.11/ext-toolchain-updates

GIT PULL New Thomas Petazzoni 6 participants 30 messages Oct 2, 2011 – Oct 9, 2011

lore
Share & tools
lore
#0 lore raw

The following changes since commit 8511728696a298ccdb8b902b60ab398d8f67e745:

gnutls: bump to version 2.10.5 (2011-09-30 08:26:08 +0200)

are available in the git repository at:
http://free-electrons.com/~thomas/buildroot.git for-2011.11/ext-toolchain-updates

Mike Frysinger (1):
toolchain: speed up sysroot lib copying

Thomas De Schampheleire (1):
toolchain-external: allow specifying extra external libraries

Thomas Petazzoni (7):
external toolchain: slightly optimize the copy of the toolchain sysroot
ext-toolchain: Add CodeSourcery SH uClinux 2011.03
ext-toolchain: Bump version of CodeSourcery MIPS 2011.03
ext-toolchain: Add CodeSourcery SH GNU/Linux 2011.03
ext-toolchain: Add CodeSoucery x86 GNU/Linux 2010.09
ext-toolchain: Take into account Mentor Graphics acquisition of CodeSoucery
external-toolchain: Slightly optimize toolchain extraction

 toolchain/helpers.mk                     |   11 ++-
 toolchain/toolchain-external/Config.in   |  157 ++++++++++++++++++++----------
 toolchain/toolchain-external/ext-tool.mk |   17 +++-
 3 files changed, 128 insertions(+), 57 deletions(-)

Thanks,

Signature · 1 line
Thomas Petazzoni
#1 lore raw

PATCH 1/9 external toolchain: slightly optimize the copy of the toolchain sysroot

The sysroot of an ARM CodeSourcery toolchain takes about 1.4 GB of space, but 1.1+ GB of this space consists in locale-related information which Buildroot doesn't use. By skipping the copy of those unused files, we save quite a bit of time while importing the toolchain sysroot.

---
 toolchain/helpers.mk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
toolchain/helpers.mk +4 -1
index 4d90d15..7f3efaa 100644
@@ -79,6 +79,9 @@ copy_toolchain_lib_root = \
 #    non-default architecture variant is used. Without this, the
 #    compiler fails to find libraries and headers.
 #
+# Note that the 'locale' directories are not copied. They are huge
+# (400+MB) in CodeSourcery toolchains, and they are not really useful.
+#
 # $1: main sysroot directory of the toolchain
 # $2: arch specific sysroot directory of the toolchain
 # $3: arch specific subdirectory in the sysroot
@@ -89,7 +92,7 @@ copy_toolchain_sysroot = \
 	ARCH_SUBDIR="$(strip $3)"; \
 	for i in etc lib sbin usr ; do \
 		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
-			cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+			rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
 		fi ; \
 	done ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Thomas Petazzoni

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

---
 toolchain/toolchain-external/Config.in   |    8 ++++++++
 toolchain/toolchain-external/ext-tool.mk |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +8 -0
index ff7e8db..b6fa9bd 100644
@@ -322,6 +322,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CXX
 	  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 # BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 endif # BR2_TOOLCHAIN_EXTERNAL
toolchain/toolchain-external/ext-tool.mk +1 -0
index b9d932f..bac39cf 100644
@@ -51,6 +51,7 @@
 #  of Buildroot is handled identical for the 2 toolchain types.
 
 LIB_EXTERNAL_LIBS=ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so libnsl.so libresolv.so librt.so libutil.so
+LIB_EXTERNAL_LIBS+=$(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS))
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y)
 LIB_EXTERNAL_LIBS+=libnss_files.so libnss_dns.so
 endif
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 3/9 ext-toolchain: Add CodeSourcery SH uClinux 2011.03

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/Config.in   |   17 +++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +17 -0
index b6fa9bd..ac712ba 100644
@@ -152,6 +152,22 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
+	bool "CodeSourcery SH 2011.03"
+	depends on BR2_sh2a
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_LARGEFILE
+	select BR2_INET_RPC
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the SuperH architecture, from CodeSourcery. It
+	  uses gcc 4.5.2, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
+	  kernel headers 2.6.38. It has support for
+	  the following variants:
+            - SH2A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	bool "CodeSourcery SH 2010.09"
 	depends on BR2_sh2a
@@ -223,6 +239,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
+	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
toolchain/toolchain-external/ext-tool.mk +3 -0
index bac39cf..48c11eb 100644
@@ -191,6 +191,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7859/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y)
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package8749/public/sh-uclinux/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
 TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/
 TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
Signature · 1 line
1.7.4.1
#14 lore raw

PATCH 4/9 ext-toolchain: Bump version of CodeSourcery MIPS 2011.03

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
toolchain/toolchain-external/ext-tool.mk +2 -2
index 48c11eb..c8a214d 100644
@@ -180,8 +180,8 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package7401/public/mips-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=mips-4.4-303-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103),y)
-TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package8715/public/mips-linux-gnu/
-TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-53-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package9055/public/mips-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-93-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/power/portal/package7703/public/powerpc-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
1.7.4.1
#16 lore raw

PATCH 5/9 ext-toolchain: Add CodeSourcery SH GNU/Linux 2011.03

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +16 -0
index ac712ba..c50acc8 100644
@@ -137,6 +137,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
             - e500mc glibc, 32 bits
             - 970 glibc hard-float, 64 bits
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
+	bool "CodeSourcery SH 2011.03"
+	depends on BR2_sh4a || BR2_sh4aeb
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the SuperH architecture, from CodeSourcery. It
+	  uses gcc 4.5.2, binutils 2.20, glibc 2.13, uClibc 0.9.30,
+	  gdb 7.2.50 and kernel headers 2.6.38. It has support for
+	  the following variants:
+            - SH4A, glibc, little endian
+            - SH4A, glibc, big endian
+            - SH4A, uClibc, little endian
+            - SH4A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	bool "CodeSourcery SH 2010.09"
 	depends on BR2_sh4a || BR2_sh4aeb
@@ -238,6 +253,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
+	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
toolchain/toolchain-external/ext-tool.mk +3 -0
index c8a214d..2662520 100644
@@ -188,6 +188,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-g
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7783/public/sh-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103),y)
+TOOLCHAIN_EXTERNAL_SITE=https://sourcery.mentor.com/sgpp/lite/superh/portal/package8759/public/sh-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-37-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7859/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2
Signature · 1 line
1.7.4.1
#19 lore raw

PATCH 6/9 ext-toolchain: Add CodeSoucery x86 GNU/Linux 2010.09

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +16 -0
index c50acc8..9fbc224 100644
@@ -199,6 +199,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	  the following variants:
             - SH2A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
+	bool "CodeSourcery x86/x86_64 2010.09"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the x86/x86_64 architectures, from
+	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
+	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
+	  the following variants:
+	    - Intel Pentium 4, glibc, 32 bits
+            - Intel Atom, glibc, 32 bits
+            - Intel Xeon, glibc, 64 bits
+            - Intel Core 2, glibc, 64 bits
+
 config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1
 	bool "Blackfin.uclinux.org 2010RC1"
 	depends on BR2_bfin
@@ -256,6 +271,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
+	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
toolchain/toolchain-external/ext-tool.mk +3 -0
index 2662520..6e34e05 100644
@@ -197,6 +197,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package8749/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009),y)
+TOOLCHAIN_EXTERNAL_SITE=https://sourcery.mentor.com/sgpp/lite/ia32/portal/package7682/public/i686-pc-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=ia32-2010.09-44-i686-pc-linux-gnu-i386-linux.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
 TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/
 TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
Signature · 1 line
1.7.4.1
#21 lore raw

PATCH 7/9 ext-toolchain: Take into account Mentor Graphics acquisition of CodeSoucery

In reply to Thomas Petazzoni

Now that CodeSourcery has been bought by Mentor Graphics, the toolchains are named "Sourcery CodeBench". We rename the config short description and adjust the help text, but we keep the option name in order not to break existing configurations.

---
 toolchain/toolchain-external/Config.in |  130 ++++++++++++++++----------------
 1 files changed, 65 insertions(+), 65 deletions(-)
toolchain/toolchain-external/Config.in +65 -65
index 9fbc224..0a4b922 100644
@@ -4,85 +4,85 @@ choice
 	prompt "Toolchain"
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
-	bool "CodeSourcery ARM 2011.03"
+	bool "Sourcery CodeBench ARM 2011.03"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20.51, glibc 2.13 and gdb 7.2.50,
-	  kernel headers 2.6.38. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, glibc
+	  2.13 and gdb 7.2.50, kernel headers 2.6.38. It has support
+	  for the following variants:
             - ARMv5TE, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
-	bool "CodeSourcery ARM 2010.09"
+	bool "Sourcery CodeBench ARM 2010.09"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, glibc 2.11 and gdb 7.2.50,
-	  kernel headers 2.6.35.2. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.5.1, binutils 2.20, glibc
+	  2.11 and gdb 7.2.50, kernel headers 2.6.35.2. It has support
+	  for the following variants:
             - ARMv5TE, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
-	bool "CodeSourcery ARM 2010q1"
+	bool "Sourcery CodeBench ARM 2010q1"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.11, gdb 7.0.50 and
-	  kernel headers 2.6.32. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.11, gdb 7.0.50 and kernel headers 2.6.32. It has support
+	  for the following variants:
              - ARMv5T, little endian, soft-float, glibc
              - ARMv4T, little endian, soft-float, glibc
              - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
-	bool "CodeSourcery ARM 2009q3"
+	bool "Sourcery CodeBench ARM 2009q3"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.10 and gdb 6.8 and
-	  kernel headers 2.6.30. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.10 and gdb 6.8 and kernel headers 2.6.30. It has support
+	  for the following variants:
             - ARMv5T, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
-	bool "CodeSourcery ARM 2009q1"
+	bool "Sourcery CodeBench ARM 2009q1"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.3.3, binutils 2.19, glibc 2.8 and gdb 6.8 and
-	  kernel headers 2.6.30. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.3.3, binutils 2.19, glibc 2.8
+	  and gdb 6.8 and kernel headers 2.6.30. It has support for
+	  the following variants:
             - ARMv5T, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
-	bool "CodeSourcery MIPS 2011.03"
+	bool "Sourcery CodeBench MIPS 2011.03"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the MIPS architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20.51, glibc 2.13, uClibc 0.9.30
-	  and gdb 7.2.50, kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the MIPS architecture, from
+	  Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, glibc
+	  2.13, uClibc 0.9.30 and gdb 7.2.50, kernel headers
+	  2.6.38. It has support for the following variants:
             - MIPS32 O32 big endian glibc
             - MIPS32 O32 little endian glibc
             - MIPS32 big endian soft float glibc
@@ -97,15 +97,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
             - MIPS32 little endian soft float uclibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
-	bool "CodeSourcery MIPS 4.4"
+	bool "Sourcery CodeBench MIPS 4.4"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the MIPS architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.11, uClibc 0.9.30 and
-	  gdb 7.0, kernel headers 2.6.32. It has support for the
-	  following variants:
+	  Sourcery CodeBench toolchain for the MIPS architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.11, uClibc 0.9.30 and gdb 7.0, kernel headers 2.6.32. It
+	  has support for the following variants:
             - MIPS32 O32 big endian glibc
             - MIPS32 O32 little endian glibc
             - MIPS32 big endian soft float glibc
@@ -120,15 +120,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
             - MIPS32 little endian soft float uclibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
-	bool "CodeSourcery PowerPC 2010.09"
+	bool "Sourcery CodeBench PowerPC 2010.09"
 	depends on BR2_powerpc
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the PowerPC architecture, from
-	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the PowerPC architecture,
+	  from Sourcery CodeBench. It uses gcc 4.5.1, binutils 2.20,
+	  glibc 2.11, gdb 7.2.50 and kernel headers 2.6.35.2. It has
+	  support for the following variants:
             - 603 glibc, 32 bits
             - 603 soft float glibc, 32 bits
             - e600 altivec glibc, 32 bits
@@ -138,37 +138,37 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
             - 970 glibc hard-float, 64 bits
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
-	bool "CodeSourcery SH 2011.03"
+	bool "Sourcery CodeBench SH 2011.03"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20, glibc 2.13, uClibc 0.9.30,
-	  gdb 7.2.50 and kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20,
+	  glibc 2.13, uClibc 0.9.30, gdb 7.2.50 and kernel headers
+	  2.6.38. It has support for the following variants:
             - SH4A, glibc, little endian
             - SH4A, glibc, big endian
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
-	bool "CodeSourcery SH 2010.09"
+	bool "Sourcery CodeBench SH 2010.09"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20,
+	  glibc 2.11, uClibc 0.9.30, gdb 7.2.50 and kernel headers
+	  2.6.35.2. It has support for the following variants:
             - SH4A, glibc, little endian
             - SH4A, glibc, big endian
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
-	bool "CodeSourcery SH 2011.03"
+	bool "Sourcery CodeBench SH 2011.03"
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
@@ -177,14 +177,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
-	  kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20,
+	  uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.38. It has
+	  support for the following variants:
             - SH2A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
-	bool "CodeSourcery SH 2010.09"
+	bool "Sourcery CodeBench SH 2010.09"
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
@@ -193,22 +193,22 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
-	  kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20,
+	  uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.35.2. It
+	  has support for the following variants:
             - SH2A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
-	bool "CodeSourcery x86/x86_64 2010.09"
+	bool "Sourcery CodeBench x86/x86_64 2010.09"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the x86/x86_64 architectures, from
-	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the x86/x86_64
+	  architectures, from Mentor Graphics. It uses gcc 4.5.1,
+	  binutils 2.20, glibc 2.11, gdb 7.2.50 and kernel headers
+	  2.6.35.2. It has support for the following variants:
 	    - Intel Pentium 4, glibc, 32 bits
             - Intel Atom, glibc, 32 bits
             - Intel Xeon, glibc, 64 bits
Signature · 1 line
1.7.4.1
#23 lore raw

PATCH 8/9 external-toolchain: Slightly optimize toolchain extraction

In reply to Thomas Petazzoni

Some CodeSourcery toolchains contain a huge number of locales that are now useful, even though they account for 70-80% of the total toolchain size. By skipping the extraction of those useless locales, we make the toolchain extraction process slightly faster, and also make the output directory size a lot smaller (host/opt/ is 213 MB instead of 1.5 GB with a 2010.09 ARM CodeSourcery toolchain).

---
 toolchain/toolchain-external/ext-tool.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
toolchain/toolchain-external/ext-tool.mk +2 -1
index 6e34e05..8ea2813 100644
@@ -250,7 +250,8 @@ $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE):
 
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)
 	mkdir -p $(@D)
-	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | \
+		$(TAR) $(TAR_STRIP_COMPONENTS)=1 --exclude=usr/lib/locale/* -C $(@D) $(TAR_OPTIONS) -
 	$(Q)touch $@
 endif
 
Signature · 1 line
1.7.4.1
#25 lore raw

PATCH 9/9 toolchain: speed up sysroot lib copying

In reply to Thomas Petazzoni

From: Mike Frysinger <[email protected]>

The copy_toolchain_lib_root helper searches the entire sysroot, but is only interested in files in certain subdirs. So rather than waste time in walking the entire tree, walk the few subdirs at the depth level we are actually going to be poaching files from.

---
 toolchain/helpers.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
toolchain/helpers.mk +3 -3
index 7f3efaa..1a72ae5 100644
@@ -22,9 +22,9 @@ copy_toolchain_lib_root = \
 	DESTDIR="$(strip $3)" ; \
  \
 	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
-		find -L . -path "./lib/$${LIB}.*"     -o \
-			  -path "./usr/lib/$${LIB}.*" -o \
-			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+		find -L \
+			$(for d in lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do test -e "$d" && echo $d) \
+			-maxdepth 1 -name "$${LIB}.*" \
 		)` ; \
 	for FILE in $${LIBS} ; do \
 		LIB=`basename $${FILE}`; \
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/9 external toolchain: slightly optimize the copy of the toolchain sysroot

In reply to Thomas Petazzoni

Thomas, All,

Quoted 7 lines · On Sunday 02 October 2011 21:20:09 Thomas Petazzoni wrote:

The sysroot of an ARM CodeSourcery toolchain takes about 1.4 GB of space, but 1.1+ GB of this space consists in locale-related information which Buildroot doesn't use. By skipping the copy of those unused files, we save quite a bit of time while importing the toolchain sysroot.

We may however add a new option to let the user select that behavior. If the user wants locales on its system, we should allow for that. But that's to be in another patch.

Quoted 28 lines
---
 toolchain/helpers.mk |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
toolchain/helpers.mk +4 -1
index 4d90d15..7f3efaa 100644
@@ -79,6 +79,9 @@ copy_toolchain_lib_root = \
 #    non-default architecture variant is used. Without this, the
 #    compiler fails to find libraries and headers.
 #
+# Note that the 'locale' directories are not copied. They are huge
+# (400+MB) in CodeSourcery toolchains, and they are not really useful.
+#
 # $1: main sysroot directory of the toolchain
 # $2: arch specific sysroot directory of the toolchain
 # $3: arch specific subdirectory in the sysroot
@@ -89,7 +92,7 @@ copy_toolchain_sysroot = \
 	ARCH_SUBDIR="$(strip $3)"; \
 	for i in etc lib sbin usr ; do \
 		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
-			cp -a $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
+			rsync -au --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
 		fi ; \
 	done ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#4 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Thomas Petazzoni

Thomas?, All,

Quoted 4 lines · On Sunday 02 October 2011 21:20:10 Thomas Petazzoni wrote:

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

What kind of libraries are we talking about here? Things such as libz.so, or like libnss_*.so ?

There are a few cases I can think of:

- the library/ies are available as standard buildroot package/s (eg. libz.so)
--> then that's a no-no, or there would be conflicts with buildroot's
own builds

- the library/ies is/are not part of buildroot, and but is/are used by a buildroot package (eg. libwhatever.so)
--> then we should also copy the headers

- the library/ies is/are system libs from the toolchain (eg. libnss_*.so) --> the library/ies should be copied by a generic toolchain hook, which works for all kind of toolchain backends (internal, external, or ct-ng)

So, I'm not really sure we should allow that without further explanations. (and there was no more in Thomas' original post on the suject...)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH 3/9 ext-toolchain: Add CodeSourcery SH uClinux 2011.03

In reply to Thomas Petazzoni

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:11 Thomas Petazzoni wrote:
Quoted 16 lines
---
 toolchain/toolchain-external/Config.in   |   17 +++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +3 -0
index b6fa9bd..ac712ba 100644
@@ -152,6 +152,22 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
+	bool "CodeSourcery SH 2011.03"
+	depends on BR2_sh2a

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 · line 167

Quoted 10 lines
toolchain/toolchain-external/Config.in +10 -0
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_LARGEFILE
+	select BR2_INET_RPC
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the SuperH architecture, from CodeSourcery. It
+	  uses gcc 4.5.2, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
+	  kernel headers 2.6.38. It has support for the following variants:

Nit-picking: no need to line-break above, the line is still les than 80-char wide.

Quoted 28 lines
toolchain/toolchain-external/Config.in +3 -0
+            - SH2A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	bool "CodeSourcery SH 2010.09"
 	depends on BR2_sh2a
@@ -223,6 +239,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
+	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
toolchain/toolchain-external/ext-tool.mk +3 -0
index bac39cf..48c11eb 100644
@@ -191,6 +191,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7859/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y)
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package8749/public/sh-uclinux/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
 TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/
 TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#15 lore raw

PATCH 4/9 ext-toolchain: Bump version of CodeSourcery MIPS 2011.03

In reply to Thomas Petazzoni

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:12 Thomas Petazzoni wrote:
Quoted 20 lines
---
 toolchain/toolchain-external/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
toolchain/toolchain-external/ext-tool.mk +2 -2
index 48c11eb..c8a214d 100644
@@ -180,8 +180,8 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package7401/public/mips-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=mips-4.4-303-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103),y)
-TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package8715/public/mips-linux-gnu/
-TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-53-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package9055/public/mips-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-93-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/power/portal/package7703/public/powerpc-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#12 lore raw

PATCH 3/9 ext-toolchain: Add CodeSourcery SH uClinux 2011.03

In reply to Yann E. MORIN
Quoted 6 lines · On Sunday 02 October 2011 23:50:02 Yann E. MORIN wrote:

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:11 Thomas Petazzoni wrote:

No, wait, I withdraw my Rev'ed-by for now...
I spotted an inconsistency in the order of the patches...

Quoted 60 lines
Quoted 16 lines
---
 toolchain/toolchain-external/Config.in   |   17 +++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 20 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +3 -0
index b6fa9bd..ac712ba 100644
@@ -152,6 +152,22 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
+	bool "CodeSourcery SH 2011.03"
+	depends on BR2_sh2a

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009 · line 167

Quoted 10 lines
toolchain/toolchain-external/Config.in +10 -0
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_LARGEFILE
+	select BR2_INET_RPC
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the SuperH architecture, from CodeSourcery. It
+	  uses gcc 4.5.2, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
+	  kernel headers 2.6.38. It has support for the following variants:

Nit-picking: no need to line-break above, the line is still les than 80-char wide.

Quoted 28 lines
toolchain/toolchain-external/Config.in +3 -0
+            - SH2A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	bool "CodeSourcery SH 2010.09"
 	depends on BR2_sh2a
@@ -223,6 +239,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
+	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
toolchain/toolchain-external/ext-tool.mk +3 -0
index bac39cf..48c11eb 100644
@@ -191,6 +191,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7859/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y)
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package8749/public/sh-uclinux/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
 TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/
 TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH 3/9 ext-toolchain: Add CodeSourcery SH uClinux 2011.03

Thomas, All,

Quoted 10 lines · On Monday 03 October 2011 00:13:20 Yann E. MORIN wrote:
Quoted 6 lines · On Sunday 02 October 2011 23:50:02 Yann E. MORIN wrote:

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:11 Thomas Petazzoni wrote:

No, wait, I withdraw my Rev'ed-by for now...
I spotted an inconsistency in the order of the patches...

OK, forget it, my bad. Now, for good:

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#17 lore raw

PATCH 5/9 ext-toolchain: Add CodeSourcery SH GNU/Linux 2011.03

In reply to Thomas Petazzoni

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:13 Thomas Petazzoni wrote:

But see below...

Quoted 32 lines
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +15 -0
index ac712ba..c50acc8 100644
@@ -137,6 +137,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
             - e500mc glibc, 32 bits
             - 970 glibc hard-float, 64 bits
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
+	bool "CodeSourcery SH 2011.03"
+	depends on BR2_sh4a || BR2_sh4aeb
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the SuperH architecture, from CodeSourcery. It
+	  uses gcc 4.5.2, binutils 2.20, glibc 2.13, uClibc 0.9.30,
+	  gdb 7.2.50 and kernel headers 2.6.38. It has support for
+	  the following variants:
+            - SH4A, glibc, little endian
+            - SH4A, glibc, big endian
+            - SH4A, uClibc, little endian
+            - SH4A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	bool "CodeSourcery SH 2010.09"
 	depends on BR2_sh4a || BR2_sh4aeb

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 258

Quoted 6 lines
toolchain/toolchain-external/Config.in +1 -0
@@ -238,6 +253,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
+	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103

There is inconsistency in the SH? namings:
- sh4a: _SH201009
- sh2a: _SH2A_201009

Notice for sh2a we have an underscore between variant and version, but not sh4a. Also, for sh2a, we have the full variant name, not for sh4a.

That's what caused my confusion earlier. Maybe we could clean this up in a separate patch?

Quoted 6 lines
toolchain/toolchain-external/Config.in +0 -0
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
toolchain/toolchain-external/ext-tool.mk +0 -0
index c8a214d..2662520 100644

toolchain/toolchain-external/ext-tool.mk TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-g · line 196

Quoted 9 lines
toolchain/toolchain-external/ext-tool.mk +3 -0
@@ -188,6 +188,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=freescale-2010.09-55-powerpc-linux-gnu-i686-pc-linux-g
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7783/public/sh-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-45-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103),y)
+TOOLCHAIN_EXTERNAL_SITE=https://sourcery.mentor.com/sgpp/lite/superh/portal/package8759/public/sh-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-37-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package7859/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz2

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#20 lore raw

PATCH 6/9 ext-toolchain: Add CodeSoucery x86 GNU/Linux 2010.09

In reply to Thomas Petazzoni

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:14 Thomas Petazzoni wrote:
Quoted 54 lines
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)
toolchain/toolchain-external/Config.in +16 -0
index c50acc8..9fbc224 100644
@@ -199,6 +199,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	  the following variants:
             - SH2A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
+	bool "CodeSourcery x86/x86_64 2010.09"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Toolchain for the x86/x86_64 architectures, from
+	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
+	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
+	  the following variants:
+	    - Intel Pentium 4, glibc, 32 bits
+            - Intel Atom, glibc, 32 bits
+            - Intel Xeon, glibc, 64 bits
+            - Intel Core 2, glibc, 64 bits
+
 config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1
 	bool "Blackfin.uclinux.org 2010RC1"
 	depends on BR2_bfin
@@ -256,6 +271,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "sh-linux-gnu"           if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	default "sh-uclinux"             if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
+	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
 	default "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && !BR2_BFIN_FDPIC
 	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
toolchain/toolchain-external/ext-tool.mk +3 -0
index 2662520..6e34e05 100644
@@ -197,6 +197,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2010.09-60-sh-uclinux-i686-pc-linux-gnu.tar.bz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/superh/portal/package8749/public/sh-uclinux/
 TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009),y)
+TOOLCHAIN_EXTERNAL_SITE=https://sourcery.mentor.com/sgpp/lite/ia32/portal/package7682/public/i686-pc-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=ia32-2010.09-44-i686-pc-linux-gnu-i386-linux.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
 TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8378/
 TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#22 lore raw

PATCH 7/9 ext-toolchain: Take into account Mentor Graphics acquisition of CodeSoucery

In reply to Thomas Petazzoni

Thomas, All,

Quoted 6 lines · On Sunday 02 October 2011 21:20:15 Thomas Petazzoni wrote:

Now that CodeSourcery has been bought by Mentor Graphics, the toolchains are named "Sourcery CodeBench". We rename the config short description and adjust the help text, but we keep the option name in order not to break existing configurations.

Quoted 268 lines
---
 toolchain/toolchain-external/Config.in |  130 ++++++++++++++++----------------
 1 files changed, 65 insertions(+), 65 deletions(-)
toolchain/toolchain-external/Config.in +65 -65
index 9fbc224..0a4b922 100644
@@ -4,85 +4,85 @@ choice
 	prompt "Toolchain"
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
-	bool "CodeSourcery ARM 2011.03"
+	bool "Sourcery CodeBench ARM 2011.03"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20.51, glibc 2.13 and gdb 7.2.50,
-	  kernel headers 2.6.38. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, glibc
+	  2.13 and gdb 7.2.50, kernel headers 2.6.38. It has support
+	  for the following variants:
             - ARMv5TE, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
-	bool "CodeSourcery ARM 2010.09"
+	bool "Sourcery CodeBench ARM 2010.09"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, glibc 2.11 and gdb 7.2.50,
-	  kernel headers 2.6.35.2. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.5.1, binutils 2.20, glibc
+	  2.11 and gdb 7.2.50, kernel headers 2.6.35.2. It has support
+	  for the following variants:
             - ARMv5TE, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
-	bool "CodeSourcery ARM 2010q1"
+	bool "Sourcery CodeBench ARM 2010q1"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.11, gdb 7.0.50 and
-	  kernel headers 2.6.32. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.11, gdb 7.0.50 and kernel headers 2.6.32. It has support
+	  for the following variants:
              - ARMv5T, little endian, soft-float, glibc
              - ARMv4T, little endian, soft-float, glibc
              - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
-	bool "CodeSourcery ARM 2009q3"
+	bool "Sourcery CodeBench ARM 2009q3"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.10 and gdb 6.8 and
-	  kernel headers 2.6.30. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.10 and gdb 6.8 and kernel headers 2.6.30. It has support
+	  for the following variants:
             - ARMv5T, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
-	bool "CodeSourcery ARM 2009q1"
+	bool "Sourcery CodeBench ARM 2009q1"
 	depends on BR2_arm
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the ARM architecture, from CodeSourcery. It
-	  uses gcc 4.3.3, binutils 2.19, glibc 2.8 and gdb 6.8 and
-	  kernel headers 2.6.30. It has support for the following
-	  variants:
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.3.3, binutils 2.19, glibc 2.8
+	  and gdb 6.8 and kernel headers 2.6.30. It has support for
+	  the following variants:
             - ARMv5T, little endian, soft-float, glibc
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
-	bool "CodeSourcery MIPS 2011.03"
+	bool "Sourcery CodeBench MIPS 2011.03"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the MIPS architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20.51, glibc 2.13, uClibc 0.9.30
-	  and gdb 7.2.50, kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the MIPS architecture, from
+	  Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51, glibc
+	  2.13, uClibc 0.9.30 and gdb 7.2.50, kernel headers
+	  2.6.38. It has support for the following variants:
             - MIPS32 O32 big endian glibc
             - MIPS32 O32 little endian glibc
             - MIPS32 big endian soft float glibc
@@ -97,15 +97,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
             - MIPS32 little endian soft float uclibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
-	bool "CodeSourcery MIPS 4.4"
+	bool "Sourcery CodeBench MIPS 4.4"
 	depends on BR2_mips || BR2_mipsel
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the MIPS architecture, from CodeSourcery. It
-	  uses gcc 4.4.1, binutils 2.19, glibc 2.11, uClibc 0.9.30 and
-	  gdb 7.0, kernel headers 2.6.32. It has support for the
-	  following variants:
+	  Sourcery CodeBench toolchain for the MIPS architecture, from
+	  Mentor Graphics. It uses gcc 4.4.1, binutils 2.19, glibc
+	  2.11, uClibc 0.9.30 and gdb 7.0, kernel headers 2.6.32. It
+	  has support for the following variants:
             - MIPS32 O32 big endian glibc
             - MIPS32 O32 little endian glibc
             - MIPS32 big endian soft float glibc
@@ -120,15 +120,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
             - MIPS32 little endian soft float uclibc
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
-	bool "CodeSourcery PowerPC 2010.09"
+	bool "Sourcery CodeBench PowerPC 2010.09"
 	depends on BR2_powerpc
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the PowerPC architecture, from
-	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the PowerPC architecture,
+	  from Sourcery CodeBench. It uses gcc 4.5.1, binutils 2.20,
+	  glibc 2.11, gdb 7.2.50 and kernel headers 2.6.35.2. It has
+	  support for the following variants:
             - 603 glibc, 32 bits
             - 603 soft float glibc, 32 bits
             - e600 altivec glibc, 32 bits
@@ -138,37 +138,37 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
             - 970 glibc hard-float, 64 bits
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
-	bool "CodeSourcery SH 2011.03"
+	bool "Sourcery CodeBench SH 2011.03"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20, glibc 2.13, uClibc 0.9.30,
-	  gdb 7.2.50 and kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20,
+	  glibc 2.13, uClibc 0.9.30, gdb 7.2.50 and kernel headers
+	  2.6.38. It has support for the following variants:
             - SH4A, glibc, little endian
             - SH4A, glibc, big endian
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
-	bool "CodeSourcery SH 2010.09"
+	bool "Sourcery CodeBench SH 2010.09"
 	depends on BR2_sh4a || BR2_sh4aeb
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, glibc 2.11, uClibc 0.9.30,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20,
+	  glibc 2.11, uClibc 0.9.30, gdb 7.2.50 and kernel headers
+	  2.6.35.2. It has support for the following variants:
             - SH4A, glibc, little endian
             - SH4A, glibc, big endian
             - SH4A, uClibc, little endian
             - SH4A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
-	bool "CodeSourcery SH 2011.03"
+	bool "Sourcery CodeBench SH 2011.03"
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
@@ -177,14 +177,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.2, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
-	  kernel headers 2.6.38. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20,
+	  uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.38. It has
+	  support for the following variants:
             - SH2A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
-	bool "CodeSourcery SH 2010.09"
+	bool "Sourcery CodeBench SH 2010.09"
 	depends on BR2_sh2a
 	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	select BR2_LARGEFILE
@@ -193,22 +193,22 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the SuperH architecture, from CodeSourcery. It
-	  uses gcc 4.5.1, binutils 2.20, uClibc 0.9.30, gdb 7.2.50 and
-	  kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the SuperH architecture,
+	  from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20,
+	  uClibc 0.9.30, gdb 7.2.50 and kernel headers 2.6.35.2. It
+	  has support for the following variants:
             - SH2A, uClibc, big endian
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOUCERY_X86_201009
-	bool "CodeSourcery x86/x86_64 2010.09"
+	bool "Sourcery CodeBench x86/x86_64 2010.09"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	select BR2_INSTALL_LIBSTDCPP
 	help
-	  Toolchain for the x86/x86_64 architectures, from
-	  CodeSourcery. It uses gcc 4.5.1, binutils 2.20, glibc 2.11,
-	  gdb 7.2.50 and kernel headers 2.6.35.2. It has support for
-	  the following variants:
+	  Sourcery CodeBench toolchain for the x86/x86_64
+	  architectures, from Mentor Graphics. It uses gcc 4.5.1,
+	  binutils 2.20, glibc 2.11, gdb 7.2.50 and kernel headers
+	  2.6.35.2. It has support for the following variants:
 	    - Intel Pentium 4, glibc, 32 bits
             - Intel Atom, glibc, 32 bits
             - Intel Xeon, glibc, 64 bits
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#24 lore raw

PATCH 8/9 external-toolchain: Slightly optimize toolchain extraction

In reply to Thomas Petazzoni

Thomas, All,

Quoted 2 lines · On Sunday 02 October 2011 21:20:16 Thomas Petazzoni wrote:

Some CodeSourcery toolchains contain a huge number of locales that are now useful, even though they account for 70-80% of the total toolchain

^^^
You meant 'not usefull', maybe?

Quoted 15 lines

size. By skipping the extraction of those useless locales, we make the toolchain extraction process slightly faster, and also make the output directory size a lot smaller (host/opt/ is 213 MB instead of 1.5 GB with a 2010.09 ARM CodeSourcery toolchain).

---
 toolchain/toolchain-external/ext-tool.mk |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
toolchain/toolchain-external/ext-tool.mk +0 -0
index 6e34e05..8ea2813 100644

toolchain/toolchain-external/ext-tool.mk $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE): · line 254

Quoted 6 lines
toolchain/toolchain-external/ext-tool.mk +2 -1
@@ -250,7 +250,8 @@ $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE):
 
 $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE)
 	mkdir -p $(@D)
-	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | $(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -
+	$(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | \
+		$(TAR) $(TAR_STRIP_COMPONENTS)=1 --exclude=usr/lib/locale/* -C $(@D) $(TAR_OPTIONS) -

You should quote the asterisk, we do not want it to expand in the shell, but in tar's pattern expansion.

toolchain/toolchain-external/ext-tool.mk $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE): · line 257

Quoted 3 lines
toolchain/toolchain-external/ext-tool.mk +0 -0
 	$(Q)touch $@
 endif
 

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#26 lore raw

PATCH 9/9 toolchain: speed up sysroot lib copying

In reply to Thomas Petazzoni

Thomas, Mike, All,

Quoted 17 lines · On Sunday 02 October 2011 21:20:17 Thomas Petazzoni wrote:

From: Mike Frysinger <[email protected]>

The copy_toolchain_lib_root helper searches the entire sysroot, but is only interested in files in certain subdirs. So rather than waste time in walking the entire tree, walk the few subdirs at the depth level we are actually going to be poaching files from.

---
 toolchain/helpers.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
toolchain/helpers.mk +0 -0
index 7f3efaa..1a72ae5 100644

toolchain/helpers.mk copy_toolchain_lib_root = \ · line 26

Quoted 8 lines
toolchain/helpers.mk +2 -3
@@ -22,9 +22,9 @@ copy_toolchain_lib_root = \
 	DESTDIR="$(strip $3)" ; \
  \
 	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
-		find -L . -path "./lib/$${LIB}.*"     -o \
-			  -path "./usr/lib/$${LIB}.*" -o \
-			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+		find -L \
+			$(for d in lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do test -e "$d" && echo $d) \

Just by reading the above line:

1) You need to double the '$' here, as it must be interpreted by the shell, not by make.

2) Also, the 'for' construct is missing the final 'done':
for ...; do ...; done

3) You should test for a directory, not for mere existence: test -d "$$d"

4) And you also need to quote the second '$$d', as you do when testing for its existence (granteed, not really needed, it's not gonna have a space in it, ever, but for consistency, either you quote both, or you quote none; I prefer quoting).

So (sorry if the line gets wrapped):
$$(for d in lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do test -e "$$d" && echo "$$d"; done) \

toolchain/helpers.mk copy_toolchain_lib_root = \ · line 30

Quoted 4 lines
toolchain/helpers.mk +1 -0
+			-maxdepth 1 -name "$${LIB}.*" \
 		)` ; \
 	for FILE in $${LIBS} ; do \
 		LIB=`basename $${FILE}`; \

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Yann E. MORIN

(now properly to the list)
Hi Yann,

Quoted 22 lines · Yann E. MORIN

Thomas?, All,

Quoted 4 lines · On Sunday 02 October 2011 21:20:10 Thomas Petazzoni wrote:

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

What kind of libraries are we talking about here? Things such as libz.so, or like libnss_*.so ?

There are a few cases I can think of:

?- the library/ies are available as standard buildroot package/s ? (eg. libz.so)
? --> then that's a no-no, or there would be conflicts with buildroot's ? ? ? own builds

?- the library/ies is/are not part of buildroot, and but is/are used by ? a buildroot package (eg. libwhatever.so)
? --> then we should also copy the headers

Quoted 7 lines

?- the library/ies is/are system libs from the toolchain (eg. libnss_*.so) ? --> the library/ies should be copied by a generic toolchain hook, which ? ? ? works for all kind of toolchain backends (internal, external, or ? ? ? ct-ng)

So, I'm not really sure we should allow that without further explanations. (and there was no more in Thomas' original post on the suject...)

I should have been more verbose.

uClibc supports the 'backtrace' functionality. I'm not sure whether it already is in 0.9.32, but it certainly is in the repository. When you enable the functionality in the uClibc configuration, a library libubacktrace.so is generated. Application code that uses the backtrace() or backtrace_symbols() functions, need to link with this library and thus it needs to be copied from the toolchain.

The appropriate header is located next to the other toolchain headers, which are already copied by default:
usr/powerpc-linux/sysroot/usr/include/execinfo.h

Depending on the uClibc configuration, less or more libraries may need to be copied. I can imagine that a similar thing is needed for other C libraries. Hence this generic option I added.

Given this background information, how do you feel about this patch?

Thanks,
Thomas

#18 lore raw

PATCH 5/9 ext-toolchain: Add CodeSourcery SH GNU/Linux 2011.03

In reply to Yann E. MORIN

Hi Yann,

Quoted 3 lines

From: "Yann E. MORIN" <[email protected]>
To: buildroot at busybox.net
Cc: Thomas Petazzoni <[email protected]>,

buildroot at uclibc.org

Quoted 2 lines

Date: 02/10/2011 23:45
Subject: Re: [Buildroot] [PATCH 5/9] ext-toolchain: Add CodeSourcery SH

GNU/Linux 2011.03

Quoted 8 lines

Sent by: buildroot-bounces at busybox.net

Thomas, All,

Quoted 1 line · On Sunday 02 October 2011 21:20:13 Thomas Petazzoni wrote:
Quoted 8 lines

But see below...

Review

Quoted 6 lines
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/toolchain/toolchain-external/Config.in

Quoted 4 lines

toolchain/toolchain-external/Config.in config

Quoted 4 lines

index ac712ba..c50acc8 100644

toolchain/toolchain-external/Config.in +0 -0
@@ -137,6 +137,21 @@ config 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009

Quoted 15 lines
Quoted 15 lines
toolchain/toolchain-external/Config.in +12 -0
             - e500mc glibc, 32 bits
             - 970 glibc hard-float, 64 bits
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
+   bool "CodeSourcery SH 2011.03"
+   depends on BR2_sh4a || BR2_sh4aeb
+   select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+   select BR2_INSTALL_LIBSTDCPP
+   help
+     Toolchain for the SuperH architecture, from CodeSourcery. It
+     uses gcc 4.5.2, binutils 2.20, glibc 2.13, uClibc 0.9.30,
+     gdb 7.2.50 and kernel headers 2.6.38. It has support for
+     the following variants:
+            - SH4A, glibc, little endian
+            - SH4A, glibc, big endian
Quoted 8 lines

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 253

Quoted 8 lines
toolchain/toolchain-external/Config.in +3 -0
+            - SH4A, uClibc, little endian
+            - SH4A, uClibc, big endian
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
    bool "CodeSourcery SH 2010.09"
    depends on BR2_sh4a || BR2_sh4aeb
@@ -238,6 +253,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
    default "mips-linux-gnu"         if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103

Quoted 1 line

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 254

Quoted 1 line
toolchain/toolchain-external/Config.in +0 -0
    default "powerpc-linux-gnu"      if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009

Quoted 1 line

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 255

Quoted 1 line
toolchain/toolchain-external/Config.in +0 -0
    default "sh-linux-gnu"           if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009

Quoted 1 line

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 256

Quoted 1 line
toolchain/toolchain-external/Config.in +1 -0
+   default "sh-linux-gnu"           if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103

Quoted 1 line

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 257

Quoted 1 line
toolchain/toolchain-external/Config.in +0 -0
    default "sh-uclinux"             if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009

Quoted 1 line

toolchain/toolchain-external/Config.in config BR2_TOOLCHAIN_EXTERNAL_PREFIX · line 258

Quoted 1 line
toolchain/toolchain-external/Config.in +0 -0
    default "sh-uclinux"             if 

BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201103

Quoted 7 lines

There is inconsistency in the SH? namings:
- sh4a: _SH201009
- sh2a: _SH2A_201009

Notice for sh2a we have an underscore between variant and version, but

not

Quoted 4 lines

sh4a. Also, for sh2a, we have the full variant name, not for sh4a.

That's what caused my confusion earlier. Maybe we could clean this up in a separate patch?

The SH2A toolchain is just for SH2A uclibc, but the other SH toolchains should work for all other SH architectures.

All SH toolchains other than SH2A should probably be like this:
config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
bool "CodeSourcery SH 2010.09"
depends on !BR2_sh2a

However, I don't think anything other than SH2A and SH4A have been used with Buildroot for a long while.

Thanks
Phil

#27 lore raw

PATCH 9/9 toolchain: speed up sysroot lib copying

In reply to Yann E. MORIN
Quoted 26 lines · Yann E. MORIN

Thomas, Mike, All,

Quoted 23 lines · On Sunday 02 October 2011 21:20:17 Thomas Petazzoni wrote:

From: Mike Frysinger <[email protected]>

The copy_toolchain_lib_root helper searches the entire sysroot, but is only interested in files in certain subdirs. So rather than waste time in walking the entire tree, walk the few subdirs at the depth level we are actually going to be poaching files from.

---

 toolchain/helpers.mk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
toolchain/helpers.mk +0 -0
index 7f3efaa..1a72ae5 100644
@@ -22,9 +22,9 @@ copy_toolchain_lib_root = \
 
 	DESTDIR="$(strip $3)" ; \
 
  \
 
Quoted 7 lines

toolchain/helpers.mk copy_toolchain_lib_root = \

Quoted 7 lines
toolchain/helpers.mk +2 -3
 	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
 
-		find -L . -path "./lib/$${LIB}.*"     -o \
-			  -path "./usr/lib/$${LIB}.*" -o \
-			  -path "./usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*/$${LIB}.*" \
+		find -L \
+			$(for d in lib* usr/lib* 

usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do

Quoted 12 lines
Quoted 1 line

test -e "$d" && echo $d) \

Just by reading the above line:

1) You need to double the '$' here, as it must be interpreted by the shell, not by make.

2) Also, the 'for' construct is missing the final 'done':
for ...; do ...; done

3) You should test for a directory, not for mere existence: test -d "$$d"

Quoted 8 lines

4) And you also need to quote the second '$$d', as you do when testing for its existence (granteed, not really needed, it's not gonna have a space in it, ever, but for consistency, either you quote both, or you quote none; I prefer quoting).

So (sorry if the line gets wrapped):
$$(for d in lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib*; do test
-e "$$d" && echo "$$d"; done) \

But in fact, all of the above is unnecessary. lib, usr/lib and
usr/<prefix>/lib should exist anyway, and the shell will only expand the * to existing files or directories. If you want to limit to directories you can simply say

find -L lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib* \

Quoted 2 lines

toolchain/helpers.mk copy_toolchain_lib_root = \ · line 27

Quoted 2 lines
toolchain/helpers.mk +1 -0
+			-maxdepth 1 -name "$${LIB}.*" \

But just to be safe, you can add a 2>/dev/null

Oh and the exit code of find is fortunately ignored, else you'd have to add a
|| true as well.

So, my proposal is one line less:

+ find -L lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib* \
+ -maxdepth 1 -name "$${LIB}.*" 2>/dev/null || true \

Note: completely untested

Quoted 9 lines

toolchain/helpers.mk copy_toolchain_lib_root = \ · line 30

Quoted 6 lines
toolchain/helpers.mk +0 -0
 		)` ; \
 
 	for FILE in $${LIBS} ; do \
 
 		LIB=`basename $${FILE}`; \

Regards,
Yann E. MORIN.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43
#6 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Thomas De Schampheleire

Thomas?, All,

Quoted 10 lines · On Monday 03 October 2011 09:21:59 Thomas De Schampheleire wrote:
Quoted 8 lines · Yann E. MORIN
Quoted 4 lines · On Sunday 02 October 2011 21:20:10 Thomas Petazzoni wrote:

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

What kind of libraries are we talking about here? Things such as libz.so, or like libnss_*.so ?

[--SNIP--]

Quoted 5 lines
Quoted 2 lines

So, I'm not really sure we should allow that without further explanations. (and there was no more in Thomas' original post on the suject...)

uClibc supports the 'backtrace' functionality. I'm not sure whether it already is in 0.9.32,

Yes, it is.

Quoted 5 lines

but it certainly is in the repository. When you
enable the functionality in the uClibc configuration, a library libubacktrace.so is generated. Application code that uses the backtrace() or backtrace_symbols() functions, need to link with this library and thus it needs to be copied from the toolchain.

If an application is linked against libubactrace, then it should have a NEEDED entry for it, no? Or is it dlopen-ed on-demand?

That's what I find odd with how buildroot populates the rootfs. It has a somewhat-hard-coded list of libraries to copy. That list is lamost unconditionally constructed.

The proper way to handle this would be to scan all the executables aferward, looking at the DT_NEEDED flag in the ELF header, and copying the missing libraries.

Of course, this is tricky, because of the way buildroot handles the sysroot. Every time the compiler is called, the sysroot is overloaded to point to the staging area. This totaly highjacks the purpose of the sysroot.

In that case, there is no need to pre-populate the rootfs with the libraries from the sysroot, it should be done only at the end.

For example., that's what the 'populate' script in crosstool-NG is for:
create a copy of the rootfs, and scan the sysroot for missing libraries.

Quoted 3 lines

The appropriate header is located next to the other toolchain headers, which are already copied by default:
usr/powerpc-linux/sysroot/usr/include/execinfo.h

Yes, because it is a system library, so it is copied as part of the initial staging filling.

Quoted 5 lines

Depending on the uClibc configuration, less or more libraries may need to be copied. I can imagine that a similar thing is needed for other C libraries. Hence this generic option I added.

Given this background information, how do you feel about this patch?

Sadly, this has to go in for now. I'll be creating a new thread with an alternate proposal, but it will require a bit more work, so I'll Ack this for now.

Currently, this hack applies only to custom external toolchain, because none of the "automatic" external toolchain currently bundles uClibc-0.9.32.

Thanks for the explanations.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#9 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Thomas Petazzoni

Thomas and Thomas, All,

Quoted 6 lines · On Sunday 02 October 2011 21:20:10 Thomas Petazzoni wrote:

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

In reply to Yann E. MORIN

Hello Yann,

Quoted 22 lines · Yann E. MORIN

Thomas?, All,

Quoted 10 lines · On Monday 03 October 2011 09:21:59 Thomas De Schampheleire wrote:
Quoted 8 lines · Yann E. MORIN
Quoted 4 lines · On Sunday 02 October 2011 21:20:10 Thomas Petazzoni wrote:

From: Thomas De Schampheleire <[email protected]>

Custom toolchains may provide extra libraries that need to be copied to the target. This patch adds a configuration option for this.

What kind of libraries are we talking about here? Things such as libz.so, or like libnss_*.so ?

[--SNIP--]

Quoted 5 lines
Quoted 2 lines

So, I'm not really sure we should allow that without further explanations. (and there was no more in Thomas' original post on the suject...)

uClibc supports the 'backtrace' functionality. I'm not sure whether it already is in 0.9.32,

Yes, it is.

Quoted 8 lines
Quoted 5 lines

but it certainly is in the repository. When you
enable the functionality in the uClibc configuration, a library libubacktrace.so is generated. Application code that uses the backtrace() or backtrace_symbols() functions, need to link with this library and thus it needs to be copied from the toolchain.

If an application is linked against libubactrace, then it should have a NEEDED entry for it, no? Or is it dlopen-ed on-demand?

I can confirm that there is an appropriate NEEDED entry in the application.

Quoted 9 lines

That's what I find odd with how buildroot populates the rootfs. It has a somewhat-hard-coded list of libraries to copy. That list is lamost unconditionally constructed.

The proper way to handle this would be to scan all the executables aferward, looking at the DT_NEEDED flag in the ELF header, and copying the missing libraries.

Quoted 6 lines

Of course, this is tricky, because of the way buildroot handles the sysroot. Every time the compiler is called, the sysroot is overloaded to point to the staging area. This totaly highjacks the purpose of the sysroot.

In that case, there is no need to pre-populate the rootfs with the libraries from the sysroot, it should be done only at the end.

Note that this step would need to be done at each 'make' execution, to cater for external applications that were copied to the rootfs manually (which is precisely my case).

Quoted 15 lines

For example., that's what the 'populate' script in crosstool-NG is for:
create a copy of the rootfs, and scan the sysroot for missing libraries.

Quoted 3 lines

The appropriate header is located next to the other toolchain headers, which are already copied by default:
usr/powerpc-linux/sysroot/usr/include/execinfo.h

Yes, because it is a system library, so it is copied as part of the initial staging filling.

Quoted 4 lines

Depending on the uClibc configuration, less or more libraries may need to be copied. I can imagine that a similar thing is needed for other C libraries. Hence this generic option I added.

Quoted 5 lines
Quoted 1 line

Given this background information, how do you feel about this patch?

Sadly, this has to go in for now. I'll be creating a new thread with an alternate proposal, but it will require a bit more work, so I'll Ack this for now.

Ok. Thanks for your ack.

Quoted 2 lines

Currently, this hack applies only to custom external toolchain, because none of the "automatic" external toolchain currently bundles uClibc-0.9.32.

I think this would be stated more correctly as:
"... because none of the automatic external toolchains currently add libraries that are not present in the explicit LIB_EXTERNAL_LIB / USR_LIB_EXTERNAL_LIB variables."

Best regards,
Thomas

#8 lore raw

PATCH 2/9 toolchain-external: allow specifying extra external libraries

Thomas?, All,

Quoted 5 lines · On Wednesday 05 October 2011 08:20:15 Thomas De Schampheleire wrote:
Quoted 2 lines · Yann E. MORIN

If an application is linked against libubactrace, then it should have a NEEDED entry for it, no? Or is it dlopen-ed on-demand?

I can confirm that there is an appropriate NEEDED entry in the application.

OK, thanks for checking out.

Quoted 8 lines
Quoted 8 lines

The proper way to handle this would be to scan all the executables aferward, looking at the DT_NEEDED flag in the ELF header, and copying the missing libraries.

Of course, this is tricky, because of the way buildroot handles the sysroot. Every time the compiler is called, the sysroot is overloaded to point to the staging area. This totaly highjacks the purpose of the sysroot.

Quoted 5 lines
Quoted 2 lines

In that case, there is no need to pre-populate the rootfs with the libraries from the sysroot, it should be done only at the end.

Note that this step would need to be done at each 'make' execution, to cater for external applications that were copied to the rootfs manually (which is precisely my case).

Indeed. That's exactly what I was thinking.

Quoted 4 lines
Quoted 3 lines

Sadly, this has to go in for now. I'll be creating a new thread with an alternate proposal, but it will require a bit more work, so I'll Ack this for now.

Ok. Thanks for your ack.

Cheers! :-)

Quoted 7 lines
Quoted 2 lines

Currently, this hack applies only to custom external toolchain, because none of the "automatic" external toolchain currently bundles uClibc-0.9.32.

I think this would be stated more correctly as:
"... because none of the automatic external toolchains currently add libraries that are not present in the explicit LIB_EXTERNAL_LIB / USR_LIB_EXTERNAL_LIB variables."

Yeah. I should follow a new policy: TL;DP: too late, don't post! ;-)

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#28 lore raw
In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The following changes since commit 8511728696a298ccdb8b902b60ab398d8f67e745:
Thomas> gnutls: bump to version 2.10.5 (2011-09-30 08:26:08 +0200)

Thanks everyone, committed patches 1..7 (remaining 2 has open comments).

Thomas, care to fixup and resend patch 8+9?

Signature · 1 line
Bye, Peter Korsgaard
#29 lore raw

Le Sun, 09 Oct 2011 21:40:23 +0200,
Peter Korsgaard <[email protected]> a ?crit :

Quoted 3 lines

Thanks everyone, committed patches 1..7 (remaining 2 has open comments).

Thomas, care to fixup and resend patch 8+9?

Yes, sure. I had rebased the whole series and fixed patches 8 and 9, and was about to send them, but I have apparently some e-mails issues, as I'm no longer receiving messages from the list. I'll try to fix those problems tomorrow.

Regards,

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com