All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates
@ 2012-01-03 20:22 Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
                   ` (15 more replies)
  0 siblings, 16 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Hello,

What follows is a set of patches doing various improvements and
updates to the external toolchain support:

 * Fixes to the x86_64 handling of BR2_GCC_TARGET_ARCH and addition of
   the Atom processor variant. Those changes are needed to make a
   better usage of the Sourcery CodeBench x86/x86_64 toolchain (i.e,
   allow the selection of the available multilib variants).

 * Improve the logic to copy libraries from the toolchain to the
   staging directory and the target directory to handle the directory
   organization of the Sourcery CodeBench x86/x86_64 toolchain.

 * Improve the same logic to support multilib toolchains with multilib
   variants in directories of multiple levels. For example, the MIPS
   Sourcery CodeBench toolchain has many multilib variants, and some
   of them are in directories like mips16/soft-float/el/. This
   requires a small modification of the way we create the symlink that
   allows to fake the original sysroot location.

 * Expand the external toolchain wrapper to include
   BR2_TARGET_OPTIMIZATION.

 * Various updates to the available external toolchains: add ARM
   Sourcery CodeBench 2011.03, update the MIPS Sourcery CodeBench
   2011.03, add the PowerPC Sourcery CodeBench 2011.03, add the
   x86/x86_64 Sourcery CodeBench 2011.09, add the Blackfin 2011R1-RC4
   toolchain.

 * Document how to use the various multilib variants available.

 * Adjust the uClibc detection logic to support static-only
   toolchains.

Best regards,

Thomas Petazzoni

The following changes since commit 5528286147492aafa8740c09db63290042b79cb0:

  rt-tests: fix build issues on uClibc (2012-01-03 09:15:17 +0100)

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

Thomas Petazzoni (14):
      Add x86_64 variants to BR2_GCC_TARGET_ARCH
      Add the Atom processor in the list of supported x86/x86_64 processors
      Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain
      Support multilib variants in sub-subdirectories
      Expand external toolchain wrapper to custom flags
      external-toolchain: remove 2009q1 ARM Sourcery toolchain
      external-toolchain: add Sourcery CodeBench ARM 2011.09
      external-toolchain: bump MIPS 2011.03 from -93 to -110
      external-toolchain: add Sourcery CodeBench PowerPC 2011.03
      external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09
      external-toolchain: Blackfin.uclinux.org 2011R1-RC4
      external-toolchain: details on selecting the multilib variants
      external-toolchain: run checks even on extracted toolchains
      external-toolchain: adjust check for uClibc static toolchains

 target/Config.in.arch                              |   15 ++
 toolchain/helpers.mk                               |   30 ++-
 toolchain/toolchain-external/Config.in             |  205 ++++++++++++++++++--
 toolchain/toolchain-external/ext-tool.mk           |   97 +++++++---
 .../toolchain-external/ext-toolchain-wrapper.c     |    3 +
 5 files changed, 302 insertions(+), 48 deletions(-)

Thanks,
-- 
Thomas Petazzoni

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

* [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-16  8:40   ` Arnout Vandecappelle
  2012-01-03 20:22 ` [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors Thomas Petazzoni
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

With the Sourcery CodeBench IA32/AMD64 toolchain, the proper -march=
switch must be passed. So, on x86_64, we make sure that
BR2_GCC_TARGET_ARCH gets defined to the correct value, just as we do
on x86.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 target/Config.in.arch |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index 5e9fad4..7faa010 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -659,6 +659,11 @@ config BR2_GCC_TARGET_ARCH
 	default athlon-4	if BR2_x86_athlon_4
 	default winchip-c6	if BR2_x86_winchip_c6
 	default winchip2	if BR2_x86_winchip2
+	default nocona		if BR2_x86_64_nocona
+	default core2		if BR2_x86_64_core2
+	default k8		if BR2_x86_64_opteron
+	default k8-sse3		if BR2_x86_64_opteron_sse3
+	default barcelona	if BR2_x86_64_barcelona
 	default c3		if BR2_x86_c3
 	default c3-2		if BR2_x86_c32
 	default geode		if BR2_x86_geode
-- 
1.7.4.1

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

* [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-04  8:44   ` Peter Korsgaard
  2012-01-03 20:22 ` [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain Thomas Petazzoni
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

This allows to easily select the corresponding Atom multilib variant
in the Sourcery CodeBench toolchain.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 target/Config.in.arch |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index 7faa010..b5ff694 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -266,6 +266,8 @@ config BR2_x86_nocona
 	bool "nocona"
 config BR2_x86_core2
 	bool "core2"
+config BR2_x86_atom
+	bool "atom"
 config BR2_x86_k6
 	bool "k6"
 config BR2_x86_k6_2
@@ -311,6 +313,8 @@ config BR2_x86_64_nocona
 	bool "nocona"
 config BR2_x86_64_core2
 	bool "core2"
+config BR2_x86_64_atom
+	bool "atom"
 endchoice
 
 choice
@@ -482,6 +486,7 @@ config BR2_ARCH
 	default "i686"		if BR2_x86_pentiumpro
 	default "i686"		if BR2_x86_nocona
 	default "i686"		if BR2_x86_core2
+	default "i686"		if BR2_x86_atom
 	default "i686"		if BR2_x86_opteron
 	default "i686"		if BR2_x86_opteron_sse3
 	default "i686"		if BR2_x86_barcelona
@@ -507,6 +512,7 @@ config BR2_ARCH
 	default "x86_64"	if BR2_x86_64_generic
 	default "x86_64"	if BR2_x86_64_nocona
 	default "x86_64"	if BR2_x86_64_core2
+	default "x86_64"	if BR2_x86_64_atom
 	default "x86_64"	if BR2_x86_64_opteron
 	default "x86_64"	if BR2_x86_64_opteron_sse3
 	default "x86_64"	if BR2_x86_64_barcelona
@@ -536,6 +542,7 @@ config BR2_GCC_TARGET_TUNE
 	default prescott	if BR2_x86_prescott
 	default nocona		if BR2_x86_nocona
 	default core2		if BR2_x86_core2
+	default atom		if BR2_x86_atom
 	default k8		if BR2_x86_opteron
 	default k8-sse3		if BR2_x86_opteron_sse3
 	default barcelona	if BR2_x86_barcelona
@@ -551,6 +558,7 @@ config BR2_GCC_TARGET_TUNE
 	default generic		if BR2_x86_64_generic
 	default nocona		if BR2_x86_64_nocona
 	default core2		if BR2_x86_64_core2
+	default atom		if BR2_x86_64_atom
 	default k8		if BR2_x86_64_opteron
 	default k8-sse3		if BR2_x86_64_opteron_sse3
 	default barcelona	if BR2_x86_64_barcelona
@@ -650,6 +658,7 @@ config BR2_GCC_TARGET_ARCH
 	default prescott	if BR2_x86_prescott
 	default nocona		if BR2_x86_nocona
 	default core2		if BR2_x86_core2
+	default atom		if BR2_x86_atom
 	default k8		if BR2_x86_opteron
 	default k8-sse3		if BR2_x86_opteron_sse3
 	default barcelona	if BR2_x86_barcelona
@@ -661,6 +670,7 @@ config BR2_GCC_TARGET_ARCH
 	default winchip2	if BR2_x86_winchip2
 	default nocona		if BR2_x86_64_nocona
 	default core2		if BR2_x86_64_core2
+	default atom		if BR2_x86_64_atom
 	default k8		if BR2_x86_64_opteron
 	default k8-sse3		if BR2_x86_64_opteron_sse3
 	default barcelona	if BR2_x86_64_barcelona
-- 
1.7.4.1

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

* [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-04  7:48   ` Thomas De Schampheleire
  2012-01-03 20:22 ` [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories Thomas Petazzoni
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

The IA32 Sourcery CodeBench toolchain has a relatively special
structure, with the following multilib variants:

 * Intel Pentium 4, 32 bits, the multilib variant is in ./ relative to
   the main sysroot, with the libraries in the lib/ directory.

 * Intel Xeon Nocona, 64 bits, the multilib variant is in ./ relative
   to the main sysroot, with the libraries in the lib64/ directory.

 * Intel Atom 32 bits, the multilib variant is in atom/ relative to
   the main sysroot, with the libraries in the lib/ directory.

 * Intel Core 2 64 bits, the multilib variant is in core2/ relative to
   the main sysroot, with the libraries in lib64/ directory.

So the first two variants are in the same sysroot, only the name of
the directory for the libraries is different.

Therefore, we introduce a new ARCH_LIB_DIR variable, which contains
either 'lib' or 'lib64'. This variable is defined according to the
location of the libc.a file for the selected multilib variant, and is
then used when copying the libraries to the target and to the staging
directory.

In addition to this, we no longer use the -print-multi-directory to
get the ARCH_SUBDIR, since in the case of the 64 bits variants of this
toolchain, it returns just '64' and not a real path. Instead, we
simply compute the difference between the arch-specific sysroot and
the main sysroot.

We also take that opportunity to expand the documentation on the
meaning of the different variables.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/helpers.mk                     |   19 ++++++----
 toolchain/toolchain-external/ext-tool.mk |   57 +++++++++++++++++++++++-------
 2 files changed, 56 insertions(+), 20 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 65cc998..4c3f240 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -10,19 +10,22 @@
 # Most toolchains have their libraries either in /lib or /usr/lib
 # relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
 # have basic libraries in /lib, and libstdc++/libgcc_s in
-# /usr/<target-name>/lib(64).
+# /usr/<target-name>/lib(64). Thanks to ARCH_LIB_DIR we also take into
+# account toolchains that have the libraries in lib64 and usr/lib64.
 #
 # $1: arch specific sysroot directory
-# $2: library name
-# $3: destination directory of the libary, relative to $(TARGET_DIR)
+# $2: library directory ('lib' or 'lib64') from which libraries must be copied
+# $3: library name
+# $4: destination directory of the libary, relative to $(TARGET_DIR)
 #
 copy_toolchain_lib_root = \
 	ARCH_SYSROOT_DIR="$(strip $1)"; \
-	LIB="$(strip $2)"; \
-	DESTDIR="$(strip $3)" ; \
+	ARCH_LIB_DIR="$(strip $2)" ; \
+	LIB="$(strip $3)"; \
+	DESTDIR="$(strip $4)" ; \
  \
 	LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
-		find -L lib* usr/lib* usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib* \
+		find -L $${ARCH_LIB_DIR} usr/$${ARCH_LIB_DIR} usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
 			-maxdepth 1 -name "$${LIB}.*" 2>/dev/null \
 		)` ; \
 	for FILE in $${LIBS} ; do \
@@ -84,12 +87,14 @@ copy_toolchain_lib_root = \
 # $1: main sysroot directory of the toolchain
 # $2: arch specific sysroot directory of the toolchain
 # $3: arch specific subdirectory in the sysroot
+# $4: directory of libraries ('lib' or 'lib64')
 #
 copy_toolchain_sysroot = \
 	SYSROOT_DIR="$(strip $1)"; \
 	ARCH_SYSROOT_DIR="$(strip $2)"; \
 	ARCH_SUBDIR="$(strip $3)"; \
-	for i in etc lib sbin usr ; do \
+	ARCH_LIB_DIR="$(strip $4)" ; \
+	for i in etc $${ARCH_LIB_DIR} sbin usr ; do \
 		if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
 			rsync -au --chmod=Du+w --exclude 'usr/lib/locale' $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
 		fi ; \
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 2ac4973..1e62201 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -267,10 +267,8 @@ endif
 $(STAMP_DIR)/ext-toolchain-checked:
 	@echo "Checking external toolchain settings"
 	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
-	$(Q)SYSROOT_DIR=`$(TOOLCHAIN_EXTERNAL_CC) -print-sysroot 2>/dev/null` ; \
-	if test -z "$${SYSROOT_DIR}" ; then \
-		SYSROOT_DIR=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \
-	fi ; \
+	LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
+	SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/libc\.a::'` ; \
 	if test -z "$${SYSROOT_DIR}" ; then \
 		@echo "External toolchain doesn't support --sysroot. Cannot use." ; \
 		exit 1 ; \
@@ -292,27 +290,60 @@ $(STAMP_DIR)/ext-toolchain-checked:
 # 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[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[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' 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
+
 $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
-	$(Q)SYSROOT_DIR=`$(TOOLCHAIN_EXTERNAL_CC) -print-sysroot 2>/dev/null` ; \
-	if test -z "$${SYSROOT_DIR}" ; then \
-		SYSROOT_DIR=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a) |sed -r -e 's:usr/lib/libc\.a::;'` ; \
-	fi ; \
+	LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
+	SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/libc\.a::'` ; \
 	if test -z "$${SYSROOT_DIR}" ; then \
 		@echo "External toolchain doesn't support --sysroot. Cannot use." ; \
 		exit 1 ; \
 	fi ; \
-	ARCH_SUBDIR=`$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-multi-directory` ; \
-	ARCH_SYSROOT_DIR=$${SYSROOT_DIR}/$${ARCH_SUBDIR} ; \
+	ARCH_LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libc.a)` ; \
+	ARCH_SYSROOT_DIR=`echo $${ARCH_LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/libc\.a::'` ; \
+	ARCH_LIB_DIR=`echo $${ARCH_LIBC_A_LOCATION} | sed -r -e 's:.*/usr/(lib(64)?)/libc.a:\1:'` ; \
+	ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
 	mkdir -p $(TARGET_DIR)/lib ; \
 	echo "Copy external toolchain libraries to target..." ; \
 	for libs in $(LIB_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib); \
+		$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${ARCH_LIB_DIR},$$libs,/lib); \
 	done ; \
 	for libs in $(USR_LIB_EXTERNAL_LIBS); do \
-		$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib); \
+		$(call copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib); \
 	done ; \
 	echo "Copy external toolchain sysroot to staging..." ; \
-	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR}) ; \
+	$(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR}) ; \
 	if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
 		$(call create_lib64_symlinks) ; \
 	fi ; \
-- 
1.7.4.1

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

* [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-04  7:55   ` Thomas De Schampheleire
  2012-01-03 20:22 ` [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags Thomas Petazzoni
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

When an external toolchain has multiple variants organized in
sub-directories, Buildroot only copies the selected sysroot and not
all sysroots. In order to make this work, Buildroot creates a symbolic
link of the name of the original selected sysroot to the main sysroot
to trick the compiler so that it finds its libraries at the expected
location.

I.e, if the toolchain as the following organization (example take on
the ARM CodeSourcery toolchain) :

     .	    	for ARMv5T
     armv4  	for ARMv4T
     thumb2 	for ARMv7-A/Thumb

and ARMv4T is selected, then Buildroot will copy the contents of
armv4t/ from the toolchain into its $(STAGING_DIR) and then create a
$(STAGING_DIR)/armv4t symbolic link to $(STAGING_DIR).

However, our logic to do so only works when there was one directory
level for multilib sysroots. But in the MIPS CodeSourcery toolchain
there are multiple levels. For example, the MIPS16 soft-float
little-endian sysroot variant is in mips16/soft-float/el/ compared to
the main sysroot.

This patch improves our logic to support this case. The logic is a bit
more complicated as we don't want to create a symbolic link to an
absolute path, but a symbolic link to a relative path, because we want
the host/ directory to be relocatable.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/helpers.mk |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 4c3f240..3f4818f 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -103,7 +103,14 @@ copy_toolchain_sysroot = \
 		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
 			cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \
 		fi ; \
-		ln -s . $(STAGING_DIR)/$${ARCH_SUBDIR} ; \
+		mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \
+		relpath="./" ; \
+		nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \
+		for slash in `seq 1 $${nbslashs}` ; do \
+			relpath=$${relpath}"../" ; \
+		done ; \
+		ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \
+		echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} -> $${relpath}" ; \
 	fi ; \
 	find $(STAGING_DIR) -type d | xargs chmod 755
 
-- 
1.7.4.1

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

* [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-24  5:28   ` Baruch Siach
  2012-01-03 20:22 ` [Buildroot] [PATCH 06/14] external-toolchain: remove 2009q1 ARM Sourcery toolchain Thomas Petazzoni
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

The BR2_TARGET_OPTIMIZATION flags were not used by the external
toolchain wrapper, which broke the multilib selection logic of
multilib external toolchains. It also simplifies the compilation of
external programs since all flags are properly passed automatically by
the toolchain wrapper.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/ext-tool.mk           |    8 ++++++++
 .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 1e62201..b768c0b 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -150,6 +150,14 @@ TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
 TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
 endif
 
+ifneq ($(BR2_TARGET_OPTIMIZATION),)
+TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
+# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each
+# flag is a separate argument when used in execv() by the external
+# toolchain wrapper.
+TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)'
+endif
+
 ifeq ($(BR2_SOFT_FLOAT),y)
 TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
 TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
index cc404f3..719f13b 100644
--- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
+++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
@@ -40,6 +40,9 @@ static char *predef_args[] = {
 #ifdef BR_VFPFLOAT
 	"-mfpu=vfp",
 #endif /* BR_VFPFLOAT */
+#ifdef BR_ADDITIONAL_CFLAGS
+	BR_ADDITIONAL_CFLAGS
+#endif
 };
 
 static const char *get_basename(const char *name)
-- 
1.7.4.1

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

* [Buildroot] [PATCH 06/14] external-toolchain: remove 2009q1 ARM Sourcery toolchain
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 07/14] external-toolchain: add Sourcery CodeBench ARM 2011.09 Thomas Petazzoni
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

We are going to add one more ARM Sourcery toolchain version, so it's
time to remove the oldest version.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   15 ---------------
 toolchain/toolchain-external/ext-tool.mk |    5 +----
 2 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index eadfe50..f983727 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -59,20 +59,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
             - ARMv4T, little endian, soft-float, glibc
             - ARMv7-A, Thumb 2, little endian, soft-float, glibc
 
-config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
-	bool "Sourcery CodeBench ARM 2009q1"
-	depends on BR2_arm
-	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
-	select BR2_INSTALL_LIBSTDCPP
-	help
-	  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 "Sourcery CodeBench MIPS 2011.03"
 	depends on BR2_mips || BR2_mipsel
@@ -262,7 +248,6 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
-	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index b768c0b..1864fe9 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -174,10 +174,7 @@ else
 TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(STAMP_DIR)/ext-toolchain-checked
 endif
 
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q1),y)
-TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/
-TOOLCHAIN_EXTERNAL_SOURCE=arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3),y)
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/arm/portal/package5383/public/arm-none-linux-gnueabi/
 TOOLCHAIN_EXTERNAL_SOURCE=arm-2009q3-67-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1),y)
-- 
1.7.4.1

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

* [Buildroot] [PATCH 07/14] external-toolchain: add Sourcery CodeBench ARM 2011.09
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 06/14] external-toolchain: remove 2009q1 ARM Sourcery toolchain Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 08/14] external-toolchain: bump MIPS 2011.03 from -93 to -110 Thomas Petazzoni
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   15 +++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index f983727..8e5d53f 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -3,6 +3,20 @@ if BR2_TOOLCHAIN_EXTERNAL
 choice
 	prompt "Toolchain"
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
+	bool "Sourcery CodeBench ARM 2011.09"
+	depends on BR2_arm
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Sourcery CodeBench toolchain for the ARM architecture, from
+	  Mentor Graphics. It uses gcc 4.6.1, binutils 2.21.53, glibc
+	  2.13 and gdb 7.2.50, kernel headers 3.0.1. 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_ARM201103
 	bool "Sourcery CodeBench ARM 2011.03"
 	depends on BR2_arm
@@ -252,6 +266,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
+	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 1864fe9..873f389 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -186,6 +186,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=arm-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gn
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103),y)
 TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/arm/portal/package8739/public/arm-none-linux-gnueabi/
 TOOLCHAIN_EXTERNAL_SOURCE=arm-2011.03-41-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109),y)
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi/
+TOOLCHAIN_EXTERNAL_SOURCE=arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
 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
-- 
1.7.4.1

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

* [Buildroot] [PATCH 08/14] external-toolchain: bump MIPS 2011.03 from -93 to -110
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 07/14] external-toolchain: add Sourcery CodeBench ARM 2011.09 Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03 Thomas Petazzoni
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/ext-tool.mk |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 873f389..92723af 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -193,8 +193,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/package9055/public/mips-linux-gnu/
-TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-93-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/sgpp/lite/mips/portal/package9469/public/mips-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-110-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
-- 
1.7.4.1

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

* [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 08/14] external-toolchain: bump MIPS 2011.03 from -93 to -110 Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-04  8:09   ` Thomas De Schampheleire
  2012-01-03 20:22 ` [Buildroot] [PATCH 10/14] external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09 Thomas Petazzoni
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   19 +++++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 8e5d53f..271f838 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -119,6 +119,24 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
             - MIPS32 big endian soft float uclibc
             - MIPS32 little endian soft float uclibc
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
+	bool "Sourcery CodeBench PowerPC 2011.03"
+	depends on BR2_powerpc
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Sourcery CodeBench toolchain for the PowerPC architecture,
+	  from Sourcery CodeBench. It uses gcc 4.5.2, binutils 2.20.51,
+	  glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has
+	  support for the following variants:
+            - 603 glibc, 32 bits
+            - 603 soft float glibc, 32 bits
+            - e600 altivec glibc, 32 bits
+            - e500v1 glibc, 32 bits
+            - e500v2 glibc, 32 bits
+            - e500mc glibc, 32 bits
+            - 970 glibc hard-float, 64 bits
+
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	bool "Sourcery CodeBench PowerPC 2010.09"
 	depends on BR2_powerpc
@@ -270,6 +288,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
 	default "mips-linux-gnu"         if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+	default "powerpc-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	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
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 92723af..9346dc0 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -198,6 +198,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-110-mips-linux-gnu-i686-pc-linux-gnu.tar.
 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
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103),y)
+TOOLCHAIN_EXTERNAL_SITE=http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2
 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
-- 
1.7.4.1

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

* [Buildroot] [PATCH 10/14] external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03 Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 11/14] external-toolchain: Blackfin.uclinux.org 2011R1-RC4 Thomas Petazzoni
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   16 ++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    3 +++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 271f838..3221d3d 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -219,6 +219,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH2A_201009
 	  has support for the following variants:
             - SH2A, uClibc, big endian
 
+config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
+	bool "Sourcery CodeBench x86/x86_64 2011.09"
+	depends on BR2_i386 || BR2_x86_64
+	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	help
+	  Sourcery CodeBench toolchain for the x86/x86_64
+	  architectures, from Mentor Graphics. It uses gcc 4.6.1,
+	  binutils 2.21.53, glibc 2.13, gdb 7.2.50 and kernel headers
+	  3.0.1. 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_CODESOURCERY_X86_201009
 	bool "Sourcery CodeBench x86/x86_64 2010.09"
 	depends on BR2_i386 || BR2_x86_64
@@ -294,6 +309,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	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_CODESOURCERY_X86_201009
+	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
 	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) \
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 9346dc0..7432074 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -216,6 +216,9 @@ TOOLCHAIN_EXTERNAL_SOURCE=renesas-2011.03-36-sh-uclinux-i686-pc-linux-gnu.tar.bz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_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_CODESOURCERY_X86_201109),y)
+TOOLCHAIN_EXTERNAL_SITE=https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu/
+TOOLCHAIN_EXTERNAL_SOURCE=ia32-2011.09-24-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
-- 
1.7.4.1

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

* [Buildroot] [PATCH 11/14] external-toolchain: Blackfin.uclinux.org 2011R1-RC4
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 10/14] external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09 Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 12/14] external-toolchain: details on selecting the multilib variants Thomas Petazzoni
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in   |   17 +++++++++++++++++
 toolchain/toolchain-external/ext-tool.mk |    8 +++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 3221d3d..b7330a0 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -249,6 +249,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201009
             - Intel Xeon, glibc, 64 bits
             - Intel Core 2, glibc, 64 bits
 
+config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1
+	bool "Blackfin.uclinux.org 2011R1-RC4"
+	depends on BR2_bfin
+	select BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_INSTALL_LIBSTDCPP
+	select BR2_LARGEFILE
+	select BR2_INET_IPV6
+	select BR2_INET_RPC
+	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+	help
+	  Toolchain for the Blackfin architecture, from
+	  http://blackfin.uclinux.org.
+
 config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1
 	bool "Blackfin.uclinux.org 2010RC1"
 	depends on BR2_bfin
@@ -312,6 +327,8 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "i686-pc-linux-gnu"	 if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
 	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 "bfin-uclinux"		 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && !BR2_BFIN_FDPIC
+	default "bfin-linux-uclibc"	 if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1 && BR2_BFIN_FDPIC
 	default $(BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX) \
 					 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 7432074..16135ed 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -225,6 +225,12 @@ TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2010R1-RC4.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_SITE_2   = http://blackfin.uclinux.org/gf/download/frsrelease/501/8386/
 TOOLCHAIN_EXTERNAL_SOURCE_2 = blackfin-toolchain-uclibc-full-2010R1-RC4.i386.tar.bz2
 TOOLCHAIN_EXTERNAL_SOURCE   = $(TOOLCHAIN_EXTERNAL_SOURCE_1) $(TOOLCHAIN_EXTERNAL_SOURCE_2)
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1),y)
+TOOLCHAIN_EXTERNAL_SITE_1   = http://blackfin.uclinux.org/gf/download/frsrelease/531/9509/
+TOOLCHAIN_EXTERNAL_SOURCE_1 = blackfin-toolchain-2011R1-RC4.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_SITE_2   = http://blackfin.uclinux.org/gf/download/frsrelease/531/9517/
+TOOLCHAIN_EXTERNAL_SOURCE_2 = blackfin-toolchain-uclibc-full-2011R1-RC4.i386.tar.bz2
+TOOLCHAIN_EXTERNAL_SOURCE   = $(TOOLCHAIN_EXTERNAL_SOURCE_1) $(TOOLCHAIN_EXTERNAL_SOURCE_2)
 else
 # A value must be set (even if unused), otherwise the
 # $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) rule would override the main
@@ -237,7 +243,7 @@ endif
 # contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories,
 # which themselves contain the toolchain. This is why we strip more
 # components than usual.
-ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1),y)
+ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2010RC1)$(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1),y)
 $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1):
 	$(call DOWNLOAD,$(TOOLCHAIN_EXTERNAL_SITE_1),$(TOOLCHAIN_EXTERNAL_SOURCE_1))
 
-- 
1.7.4.1

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

* [Buildroot] [PATCH 12/14] external-toolchain: details on selecting the multilib variants
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 11/14] external-toolchain: Blackfin.uclinux.org 2011R1-RC4 Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 13/14] external-toolchain: run checks even on extracted toolchains Thomas Petazzoni
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

Each multilib variant need to be selected using a special combination
of flags, requiring specific choices of the Buildroot options. This
commit documents those configuration choices to make it easier to use
the various multilib variants.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/Config.in |  123 ++++++++++++++++++++++++++++++++
 1 files changed, 123 insertions(+), 0 deletions(-)

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index b7330a0..ce07eec 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -14,8 +14,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 	  2.13 and gdb 7.2.50, kernel headers 3.0.1. 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
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
 	bool "Sourcery CodeBench ARM 2011.03"
@@ -28,8 +35,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201103
 	  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
+              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
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
 	bool "Sourcery CodeBench ARM 2010.09"
@@ -42,8 +56,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201009
 	  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
+	      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
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
 	bool "Sourcery CodeBench ARM 2010q1"
@@ -56,8 +77,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2010Q1
 	  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
+               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
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
 	bool "Sourcery CodeBench ARM 2009q3"
@@ -70,8 +98,15 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3
 	  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
+              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
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	bool "Sourcery CodeBench MIPS 2011.03"
@@ -84,17 +119,43 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
 	  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
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
             - MIPS32 O32 little endian glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL
             - MIPS32 big endian soft float glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
             - MIPS32 little endian soft float glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL
             - MIPS32 big endian microMIPS glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -mips16
             - MIPS32 little endian microMIPS glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL -mips16
             - MIPS32 big endian soft float microMIPS glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -mips16
             - MIPS32 little endian soft float microMIPS glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL -mips16
             - MIPS32 big endian uclibc
+              Not usable in Buildroot yet.
             - MIPS32 little endian uclibc
+              Not usable in Buildroot yet.
             - MIPS32 big endian soft float uclibc
+              Not usable in Buildroot yet.
             - MIPS32 little endian soft float uclibc
+              Not usable in Buildroot yet.
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
 	bool "Sourcery CodeBench MIPS 4.4"
@@ -107,17 +168,43 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
 	  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
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
             - MIPS32 O32 little endian glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL
             - MIPS32 big endian soft float glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
             - MIPS32 little endian soft float glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL
             - MIPS32 big endian microMIPS glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -mips16
             - MIPS32 little endian microMIPS glibc
+              Select a MIPS generic core
+              Disable BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL -mips16
             - MIPS32 big endian soft float microMIPS glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -mips16
             - MIPS32 little endian soft float microMIPS glibc
+              Select a MIPS generic core
+              Select BR2_SOFT_FLOAT
+              Set BR2_TARGET_OPTIMIZATION to -EL -mips16
             - MIPS32 big endian uclibc
+              Not usable in Buildroot yet.
             - MIPS32 little endian uclibc
+              Not usable in Buildroot yet.
             - MIPS32 big endian soft float uclibc
+              Not usable in Buildroot yet.
             - MIPS32 little endian soft float uclibc
+              Not usable in Buildroot yet.
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	bool "Sourcery CodeBench PowerPC 2011.03"
@@ -130,12 +217,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	  glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has
 	  support for the following variants:
             - 603 glibc, 32 bits
+	      Select a generic PowerPC core
+	      Disable BR2_SOFT_FLOAT
             - 603 soft float glibc, 32 bits
+	      Select a generic PowerPC core
+	      Enable BR2_SOFT_FLOAT
             - e600 altivec glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te600
             - e500v1 glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500v1
             - e500v2 glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500v2
             - e500mc glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500mc
             - 970 glibc hard-float, 64 bits
+              Set BR2_TARGET_OPTIMIZATION to -m64
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	bool "Sourcery CodeBench PowerPC 2010.09"
@@ -148,12 +244,21 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	  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
+	      Select a generic PowerPC core
+	      Disable BR2_SOFT_FLOAT
             - 603 soft float glibc, 32 bits
+	      Select a generic PowerPC core
+	      Enable BR2_SOFT_FLOAT
             - e600 altivec glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te600
             - e500v1 glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500v1
             - e500v2 glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500v2
             - e500mc glibc, 32 bits
+              Set BR2_TARGET_OPTIMIZATION to -te500mc
             - 970 glibc hard-float, 64 bits
+              Set BR2_TARGET_OPTIMIZATION to -m64
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	bool "Sourcery CodeBench SH 2011.03"
@@ -166,9 +271,13 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	  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
+              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_SH201009
 	bool "Sourcery CodeBench SH 2010.09"
@@ -181,9 +290,13 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201009
 	  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
+              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_SH2A_201103
 	bool "Sourcery CodeBench SH 2011.03"
@@ -230,9 +343,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
 	  binutils 2.21.53, glibc 2.13, gdb 7.2.50 and kernel headers
 	  3.0.1. It has support for the following variants:
 	    - Intel Pentium 4, glibc, 32 bits
+              Default, nothing special to do.
             - Intel Atom, glibc, 32 bits
+              Select an Atom core
             - Intel Xeon, glibc, 64 bits
+              Set BR2_TARGET_OPTIMIZATION to -m64
             - Intel Core 2, glibc, 64 bits
+              Select a Core 2 core
+              Set BR2_TARGET_OPTIMIZATION to -m64
 
 config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201009
 	bool "Sourcery CodeBench x86/x86_64 2010.09"
@@ -245,9 +363,14 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201009
 	  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
+              Default, nothing special to do.
             - Intel Atom, glibc, 32 bits
+              Select an Atom core
             - Intel Xeon, glibc, 64 bits
+              Set BR2_TARGET_OPTIMIZATION to -m64
             - Intel Core 2, glibc, 64 bits
+              Select a Core 2 core
+              Set BR2_TARGET_OPTIMIZATION to -m64
 
 config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2011R1
 	bool "Blackfin.uclinux.org 2011R1-RC4"
-- 
1.7.4.1

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

* [Buildroot] [PATCH 13/14] external-toolchain: run checks even on extracted toolchains
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 12/14] external-toolchain: details on selecting the multilib variants Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-03 20:22 ` [Buildroot] [PATCH 14/14] external-toolchain: adjust check for uClibc static toolchains Thomas Petazzoni
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

When the mechanism that allows Buildroot to download external
toolchains automatically was added, all the sanity checks on the
external toolchains were not performed. This commit re-enables those
checks that we already do on external toolchains that are not
downloaded/extracted by Buildroot. This makes the toolchain checks
more consistent accross various configurations.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/toolchain-external/ext-tool.mk |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 16135ed..4f7a567 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -170,8 +170,6 @@ endif
 
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y)
 TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(TOOLCHAIN_EXTERNAL_DIR)/.extracted
-else
-TOOLCHAIN_EXTERNAL_DEPENDENCIES = $(STAMP_DIR)/ext-toolchain-checked
 endif
 
 ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM2009Q3),y)
@@ -284,7 +282,7 @@ endif
 # location, check that it supports sysroot, and then verify that it
 # matches the configuration provided in Buildroot: ABI, C++ support,
 # type of C library and all C library features.
-$(STAMP_DIR)/ext-toolchain-checked:
+$(STAMP_DIR)/ext-toolchain-checked: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
 	@echo "Checking external toolchain settings"
 	$(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
 	LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
@@ -343,8 +341,8 @@ $(STAMP_DIR)/ext-toolchain-checked:
 #                       multilib variant compared to the main sysroot.
 #			Ex: mips16/soft-float/el
 
-$(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
-	LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
+$(STAMP_DIR)/ext-toolchain-installed: $(STAMP_DIR)/ext-toolchain-checked
+	@LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a)` ; \
 	SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e 's:usr/lib(64)?/libc\.a::'` ; \
 	if test -z "$${SYSROOT_DIR}" ; then \
 		@echo "External toolchain doesn't support --sysroot. Cannot use." ; \
-- 
1.7.4.1

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

* [Buildroot] [PATCH 14/14] external-toolchain: adjust check for uClibc static toolchains
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 13/14] external-toolchain: run checks even on extracted toolchains Thomas Petazzoni
@ 2012-01-03 20:22 ` Thomas Petazzoni
  2012-01-04  8:16 ` [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas De Schampheleire
  2012-01-16  8:42 ` Arnout Vandecappelle
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-03 20:22 UTC (permalink / raw)
  To: buildroot

The current check for uClibc toolchain was verifying that a
ld-uClibc.so dynamic loader was present. However, with static-only
uClibc toolchains, this does not work. Instead, we check for an
uClibc-specific header file in the sysroot.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/helpers.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 3f4818f..6e7f1f4 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -196,7 +196,7 @@ check_uclibc_feature = \
 #
 check_uclibc = \
 	SYSROOT_DIR="$(strip $1)"; \
-	if ! test -f $${SYSROOT_DIR}/lib/ld*-uClibc.so.* ; then \
+	if ! test -f $${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; then \
 		echo "Incorrect selection of the C library"; \
 		exit -1; \
 	fi; \
-- 
1.7.4.1

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

* [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain
  2012-01-03 20:22 ` [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain Thomas Petazzoni
@ 2012-01-04  7:48   ` Thomas De Schampheleire
  2012-01-04  8:21     ` Thomas Petazzoni
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas De Schampheleire @ 2012-01-04  7:48 UTC (permalink / raw)
  To: buildroot

On Tue, Jan 3, 2012 at 9:22 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> The IA32 Sourcery CodeBench toolchain has a relatively special
> structure, with the following multilib variants:
>
>  * Intel Pentium 4, 32 bits, the multilib variant is in ./ relative to
>   the main sysroot, with the libraries in the lib/ directory.
>
>  * Intel Xeon Nocona, 64 bits, the multilib variant is in ./ relative
>   to the main sysroot, with the libraries in the lib64/ directory.
>
>  * Intel Atom 32 bits, the multilib variant is in atom/ relative to
>   the main sysroot, with the libraries in the lib/ directory.
>
>  * Intel Core 2 64 bits, the multilib variant is in core2/ relative to
>   the main sysroot, with the libraries in lib64/ directory.
>
> So the first two variants are in the same sysroot, only the name of
> the directory for the libraries is different.
>
> Therefore, we introduce a new ARCH_LIB_DIR variable, which contains
> either 'lib' or 'lib64'. This variable is defined according to the
> location of the libc.a file for the selected multilib variant, and is
> then used when copying the libraries to the target and to the staging
> directory.
>
> In addition to this, we no longer use the -print-multi-directory to
> get the ARCH_SUBDIR, since in the case of the 64 bits variants of this
> toolchain, it returns just '64' and not a real path. Instead, we
> simply compute the difference between the arch-specific sysroot and
> the main sysroot.
>
> We also take that opportunity to expand the documentation on the
> meaning of the different variables.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/helpers.mk                     |   19 ++++++----
>  toolchain/toolchain-external/ext-tool.mk |   57
> +++++++++++++++++++++++-------
>  2 files changed, 56 insertions(+), 20 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 65cc998..4c3f240 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -10,19 +10,22 @@
>  # Most toolchains have their libraries either in /lib or /usr/lib
>  # relative to their ARCH_SYSROOT_DIR. Buildroot toolchains, however,
>  # have basic libraries in /lib, and libstdc++/libgcc_s in
> -# /usr/<target-name>/lib(64).
> +# /usr/<target-name>/lib(64). Thanks to ARCH_LIB_DIR we also take into
> +# account toolchains that have the libraries in lib64 and usr/lib64.
>  #
>  # $1: arch specific sysroot directory
> -# $2: library name
> -# $3: destination directory of the libary, relative to $(TARGET_DIR)
> +# $2: library directory ('lib' or 'lib64') from which libraries must be
> copied
> +# $3: library name
> +# $4: destination directory of the libary, relative to $(TARGET_DIR)
>  #
>  copy_toolchain_lib_root = \
>        ARCH_SYSROOT_DIR="$(strip $1)"; \
> -       LIB="$(strip $2)"; \
> -       DESTDIR="$(strip $3)" ; \
> +       ARCH_LIB_DIR="$(strip $2)" ; \
> +       LIB="$(strip $3)"; \
> +       DESTDIR="$(strip $4)" ; \
>  \
>        LIBS=`(cd $${ARCH_SYSROOT_DIR}; \
> -               find -L lib* usr/lib*
> usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/lib* \
> +               find -L $${ARCH_LIB_DIR} usr/$${ARCH_LIB_DIR}
> usr/$(TOOLCHAIN_EXTERNAL_PREFIX)/$${ARCH_LIB_DIR} \
>                        -maxdepth 1 -name "$${LIB}.*" 2>/dev/null \
>                )` ; \
>        for FILE in $${LIBS} ; do \
> @@ -84,12 +87,14 @@ copy_toolchain_lib_root = \
>  # $1: main sysroot directory of the toolchain
>  # $2: arch specific sysroot directory of the toolchain
>  # $3: arch specific subdirectory in the sysroot
> +# $4: directory of libraries ('lib' or 'lib64')
>  #
>  copy_toolchain_sysroot = \
>        SYSROOT_DIR="$(strip $1)"; \
>        ARCH_SYSROOT_DIR="$(strip $2)"; \
>        ARCH_SUBDIR="$(strip $3)"; \
> -       for i in etc lib sbin usr ; do \
> +       ARCH_LIB_DIR="$(strip $4)" ; \
> +       for i in etc $${ARCH_LIB_DIR} sbin usr ; do \
>                if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \
>                        rsync -au --chmod=Du+w --exclude 'usr/lib/locale'
> $${ARCH_SYSROOT_DIR}/$$i $(STAGING_DIR)/ ; \
>                fi ; \
> diff --git a/toolchain/toolchain-external/ext-tool.mkb/toolchain/toolchain-external/
> ext-tool.mk
> index 2ac4973..1e62201 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -267,10 +267,8 @@ endif
>  $(STAMP_DIR)/ext-toolchain-checked:
>        @echo "Checking external toolchain settings"
>        $(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC))
> -       $(Q)SYSROOT_DIR=`$(TOOLCHAIN_EXTERNAL_CC) -print-sysroot
> 2>/dev/null` ; \
> -       if test -z "$${SYSROOT_DIR}" ; then \
> -               SYSROOT_DIR=`readlink -f $$(LANG=C
> $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a) |sed -r -e
> 's:usr/lib/libc\.a::;'` ; \
> -       fi ; \
> +       LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC)
> -print-file-name=libc.a)` ; \
> +       SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e
> 's:usr/lib(64)?/libc\.a::'` ; \
>        if test -z "$${SYSROOT_DIR}" ; then \
>                @echo "External toolchain doesn't support --sysroot. Cannot
> use." ; \
>                exit 1 ; \
>

Is it intentional that you removed $(Q) here?


> @@ -292,27 +290,60 @@ $(STAMP_DIR)/ext-toolchain-checked:
>  # 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[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[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' 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
> +
>  $(STAMP_DIR)/ext-toolchain-installed: $(TOOLCHAIN_EXTERNAL_DEPENDENCIES)
> -       $(Q)SYSROOT_DIR=`$(TOOLCHAIN_EXTERNAL_CC) -print-sysroot
> 2>/dev/null` ; \
> -       if test -z "$${SYSROOT_DIR}" ; then \
> -               SYSROOT_DIR=`readlink -f $$(LANG=C
> $(TOOLCHAIN_EXTERNAL_CC) -print-file-name=libc.a) |sed -r -e
> 's:usr/lib/libc\.a::;'` ; \
> -       fi ; \
> +       LIBC_A_LOCATION=`readlink -f $$(LANG=C $(TOOLCHAIN_EXTERNAL_CC)
> -print-file-name=libc.a)` ; \
> +       SYSROOT_DIR=`echo $${LIBC_A_LOCATION} | sed -r -e
> 's:usr/lib(64)?/libc\.a::'` ; \
>

Same here.


>        if test -z "$${SYSROOT_DIR}" ; then \
>                @echo "External toolchain doesn't support --sysroot. Cannot
> use." ; \
>                exit 1 ; \
>        fi ; \
> -       ARCH_SUBDIR=`$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)
> -print-multi-directory` ; \
> -       ARCH_SYSROOT_DIR=$${SYSROOT_DIR}/$${ARCH_SUBDIR} ; \
> +       ARCH_LIBC_A_LOCATION=`readlink -f $$(LANG=C
> $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)
> -print-file-name=libc.a)` ; \
> +       ARCH_SYSROOT_DIR=`echo $${ARCH_LIBC_A_LOCATION} | sed -r -e
> 's:usr/lib(64)?/libc\.a::'` ; \
> +       ARCH_LIB_DIR=`echo $${ARCH_LIBC_A_LOCATION} | sed -r -e
> 's:.*/usr/(lib(64)?)/libc.a:\1:'` ; \
> +       ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e
> "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
>        mkdir -p $(TARGET_DIR)/lib ; \
>        echo "Copy external toolchain libraries to target..." ; \
>        for libs in $(LIB_EXTERNAL_LIBS); do \
> -               $(call
> copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/lib); \
> +               $(call
> copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${ARCH_LIB_DIR},$$libs,/lib);
> \
>        done ; \
>        for libs in $(USR_LIB_EXTERNAL_LIBS); do \
> -               $(call
> copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$$libs,/usr/lib); \
> +               $(call
> copy_toolchain_lib_root,$${ARCH_SYSROOT_DIR},$${ARCH_LIB_DIR},$$libs,/usr/lib);
> \
>        done ; \
>        echo "Copy external toolchain sysroot to staging..." ; \
> -       $(call
> copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR})
> ; \
> +       $(call
> copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR})
> ; \
>        if [ -L $${ARCH_SYSROOT_DIR}/lib64 ] ; then \
>                $(call create_lib64_symlinks) ; \
>        fi ; \
> --
> 1.7.4.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120104/164b6865/attachment-0001.html>

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

* [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories
  2012-01-03 20:22 ` [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories Thomas Petazzoni
@ 2012-01-04  7:55   ` Thomas De Schampheleire
  2012-01-04  8:24     ` Thomas Petazzoni
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas De Schampheleire @ 2012-01-04  7:55 UTC (permalink / raw)
  To: buildroot

On Tue, Jan 3, 2012 at 9:22 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> When an external toolchain has multiple variants organized in
> sub-directories, Buildroot only copies the selected sysroot and not
> all sysroots. In order to make this work, Buildroot creates a symbolic
> link of the name of the original selected sysroot to the main sysroot
> to trick the compiler so that it finds its libraries at the expected
> location.
>
> I.e, if the toolchain as the following organization (example take on
> the ARM CodeSourcery toolchain) :
>
>     .          for ARMv5T
>     armv4      for ARMv4T
>     thumb2     for ARMv7-A/Thumb
>
> and ARMv4T is selected, then Buildroot will copy the contents of
> armv4t/ from the toolchain into its $(STAGING_DIR) and then create a
> $(STAGING_DIR)/armv4t symbolic link to $(STAGING_DIR).
>
> However, our logic to do so only works when there was one directory
> level for multilib sysroots. But in the MIPS CodeSourcery toolchain
> there are multiple levels. For example, the MIPS16 soft-float
> little-endian sysroot variant is in mips16/soft-float/el/ compared to
> the main sysroot.
>
> This patch improves our logic to support this case. The logic is a bit
> more complicated as we don't want to create a symbolic link to an
> absolute path, but a symbolic link to a relative path, because we want
> the host/ directory to be relocatable.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/helpers.mk |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
> index 4c3f240..3f4818f 100644
> --- a/toolchain/helpers.mk
> +++ b/toolchain/helpers.mk
> @@ -103,7 +103,14 @@ copy_toolchain_sysroot = \
>                if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
>                        cp -a $${SYSROOT_DIR}/usr/include
> $(STAGING_DIR)/usr ; \
>                fi ; \
> -               ln -s . $(STAGING_DIR)/$${ARCH_SUBDIR} ; \
> +               mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \
> +               relpath="./" ; \
> +               nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc
> -c` ; \
> +               for slash in `seq 1 $${nbslashs}` ; do \
> +                       relpath=$${relpath}"../" ; \
> +               done ; \
> +               ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \
> +               echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} ->
> $${relpath}" ; \
>        fi ; \
>        find $(STAGING_DIR) -type d | xargs chmod 755
>
>
Can we be sure that ARCH_SUBDIR never contains a trailing slash?
It comes from:
ARCH_SUBDIR=`$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)
-print-multi-directory`

If not (I don't know myself), then we should remove that first as it would
result in nbslashs to be too big.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120104/263a3a35/attachment.html>

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

* [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03
  2012-01-03 20:22 ` [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03 Thomas Petazzoni
@ 2012-01-04  8:09   ` Thomas De Schampheleire
  2012-01-04  8:24     ` Thomas Petazzoni
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas De Schampheleire @ 2012-01-04  8:09 UTC (permalink / raw)
  To: buildroot

On Tue, Jan 3, 2012 at 9:22 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/toolchain-external/Config.in   |   19 +++++++++++++++++++
>  toolchain/toolchain-external/ext-tool.mk |    3 +++
>  2 files changed, 22 insertions(+), 0 deletions(-)
>
> diff --git a/toolchain/toolchain-external/Config.in
> b/toolchain/toolchain-external/Config.in
> index 8e5d53f..271f838 100644
> --- a/toolchain/toolchain-external/Config.in
> +++ b/toolchain/toolchain-external/Config.in
> @@ -119,6 +119,24 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
>             - MIPS32 big endian soft float uclibc
>             - MIPS32 little endian soft float uclibc
>
> +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
> +       bool "Sourcery CodeBench PowerPC 2011.03"
> +       depends on BR2_powerpc
> +       select BR2_TOOLCHAIN_EXTERNAL_GLIBC
> +       select BR2_INSTALL_LIBSTDCPP
> +       help
> +         Sourcery CodeBench toolchain for the PowerPC architecture,
> +         from Sourcery CodeBench. It uses gcc 4.5.2, binutils 2.20.51,
>

Didn't you mean 'from Mentor Graphics' here?



> +         glibc 2.13, gdb 7.2.50 and kernel headers 2.6.38. It has
> +         support for the following variants:
> +            - 603 glibc, 32 bits
> +            - 603 soft float glibc, 32 bits
> +            - e600 altivec glibc, 32 bits
> +            - e500v1 glibc, 32 bits
> +            - e500v2 glibc, 32 bits
> +            - e500mc glibc, 32 bits
> +            - 970 glibc hard-float, 64 bits
> +
>  config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
>        bool "Sourcery CodeBench PowerPC 2010.09"
>        depends on BR2_powerpc
> @@ -270,6 +288,7 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
>        default "mips-linux-gnu"         if
> BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS44
>        default "mips-linux-gnu"         if
> BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201103
>        default "powerpc-linux-gnu"      if
> BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
> +       default "powerpc-linux-gnu"      if
> BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
>        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
> diff --git a/toolchain/toolchain-external/ext-tool.mkb/toolchain/toolchain-external/
> ext-tool.mk
> index 92723af..9346dc0 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -198,6 +198,9 @@
> TOOLCHAIN_EXTERNAL_SOURCE=mips-2011.03-110-mips-linux-gnu-i686-pc-linux-gnu.tar.
>  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
> +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103),y)
> +TOOLCHAIN_EXTERNAL_SITE=
> http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/
>
> +TOOLCHAIN_EXTERNAL_SOURCE=freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2<http://sourcery.mentor.com/public/gnu_toolchain/powerpc-linux-gnu/%0A+TOOLCHAIN_EXTERNAL_SOURCE=freescale-2011.03-38-powerpc-linux-gnu-i686-pc-linux-gnu.tar.bz2>
>  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
> --
> 1.7.4.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120104/f857e8a6/attachment.html>

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

* [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2012-01-03 20:22 ` [Buildroot] [PATCH 14/14] external-toolchain: adjust check for uClibc static toolchains Thomas Petazzoni
@ 2012-01-04  8:16 ` Thomas De Schampheleire
  2012-01-16  8:42 ` Arnout Vandecappelle
  15 siblings, 0 replies; 29+ messages in thread
From: Thomas De Schampheleire @ 2012-01-04  8:16 UTC (permalink / raw)
  To: buildroot

On Tue, Jan 3, 2012 at 9:22 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> What follows is a set of patches doing various improvements and
> updates to the external toolchain support:
>
>  * Fixes to the x86_64 handling of BR2_GCC_TARGET_ARCH and addition of
>   the Atom processor variant. Those changes are needed to make a
>   better usage of the Sourcery CodeBench x86/x86_64 toolchain (i.e,
>   allow the selection of the available multilib variants).
>
>  * Improve the logic to copy libraries from the toolchain to the
>   staging directory and the target directory to handle the directory
>   organization of the Sourcery CodeBench x86/x86_64 toolchain.
>
>  * Improve the same logic to support multilib toolchains with multilib
>   variants in directories of multiple levels. For example, the MIPS
>   Sourcery CodeBench toolchain has many multilib variants, and some
>   of them are in directories like mips16/soft-float/el/. This
>   requires a small modification of the way we create the symlink that
>   allows to fake the original sysroot location.
>
>  * Expand the external toolchain wrapper to include
>   BR2_TARGET_OPTIMIZATION.
>
>  * Various updates to the available external toolchains: add ARM
>   Sourcery CodeBench 2011.03, update the MIPS Sourcery CodeBench
>   2011.03, add the PowerPC Sourcery CodeBench 2011.03, add the
>   x86/x86_64 Sourcery CodeBench 2011.09, add the Blackfin 2011R1-RC4
>   toolchain.
>
>  * Document how to use the various multilib variants available.
>
>  * Adjust the uClibc detection logic to support static-only
>   toolchains.
>
> Best regards,
>
> Thomas Petazzoni
>
> The following changes since commit
> 5528286147492aafa8740c09db63290042b79cb0:
>
>  rt-tests: fix build issues on uClibc (2012-01-03 09:15:17 +0100)
>
> are available in the git repository at:
>  http://free-electrons.com/~thomas/buildroot.gitfor-2012.02/ext-toolchain-updates
>
> Thomas Petazzoni (14):
>      Add x86_64 variants to BR2_GCC_TARGET_ARCH
>      Add the Atom processor in the list of supported x86/x86_64 processors
>      Improve external toolchain logic to support IA32 Sourcery CodeBench
> toolchain
>      Support multilib variants in sub-subdirectories
>      Expand external toolchain wrapper to custom flags
>      external-toolchain: remove 2009q1 ARM Sourcery toolchain
>      external-toolchain: add Sourcery CodeBench ARM 2011.09
>      external-toolchain: bump MIPS 2011.03 from -93 to -110
>      external-toolchain: add Sourcery CodeBench PowerPC 2011.03
>      external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09
>      external-toolchain: Blackfin.uclinux.org 2011R1-RC4
>      external-toolchain: details on selecting the multilib variants
>      external-toolchain: run checks even on extracted toolchains
>      external-toolchain: adjust check for uClibc static toolchains
>
>  target/Config.in.arch                              |   15 ++
>  toolchain/helpers.mk                               |   30 ++-
>  toolchain/toolchain-external/Config.in             |  205
> ++++++++++++++++++--
>  toolchain/toolchain-external/ext-tool.mk           |   97 +++++++---
>  .../toolchain-external/ext-toolchain-wrapper.c     |    3 +
>  5 files changed, 302 insertions(+), 48 deletions(-)
>
>
Entire series not tested, but:
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120104/68a52819/attachment-0001.html>

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

* [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain
  2012-01-04  7:48   ` Thomas De Schampheleire
@ 2012-01-04  8:21     ` Thomas Petazzoni
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-04  8:21 UTC (permalink / raw)
  To: buildroot

Le Wed, 4 Jan 2012 08:48:37 +0100,
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :

> Is it intentional that you removed $(Q) here?

No (in both locations). Thanks for noticing, I'll fix it.

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

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

* [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories
  2012-01-04  7:55   ` Thomas De Schampheleire
@ 2012-01-04  8:24     ` Thomas Petazzoni
  2012-01-04  8:37       ` Thomas De Schampheleire
  0 siblings, 1 reply; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-04  8:24 UTC (permalink / raw)
  To: buildroot

Le Wed, 4 Jan 2012 08:55:51 +0100,
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :

> Can we be sure that ARCH_SUBDIR never contains a trailing slash?
> It comes from:
> ARCH_SUBDIR=`$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)
> -print-multi-directory`

Hum, it no longer comes from -print-multi-directory as per 03/14.
ARCH_SUBDIR is computed as follows:

+	ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \

As you can see, the sed expression removes the trailing slash.

Is this correct?

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

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

* [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03
  2012-01-04  8:09   ` Thomas De Schampheleire
@ 2012-01-04  8:24     ` Thomas Petazzoni
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-04  8:24 UTC (permalink / raw)
  To: buildroot

Le Wed, 4 Jan 2012 09:09:15 +0100,
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :

> Didn't you mean 'from Mentor Graphics' here?

Yes, will fix. But I guess it's broken in other places as well since I
just copy/pasted :)

Best regards,

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

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

* [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories
  2012-01-04  8:24     ` Thomas Petazzoni
@ 2012-01-04  8:37       ` Thomas De Schampheleire
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas De Schampheleire @ 2012-01-04  8:37 UTC (permalink / raw)
  To: buildroot

On Wed, Jan 4, 2012 at 9:24 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Le Wed, 4 Jan 2012 08:55:51 +0100,
> Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> a ?crit :
>
> > Can we be sure that ARCH_SUBDIR never contains a trailing slash?
> > It comes from:
> > ARCH_SUBDIR=`$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)
> > -print-multi-directory`
>
> Hum, it no longer comes from -print-multi-directory as per 03/14.
> ARCH_SUBDIR is computed as follows:
>
> +       ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e
> "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \
>
> As you can see, the sed expression removes the trailing slash.
>
> Is this correct?
>

Ok, I took the ARCH_SUBDIR from an unpatched repo not realizing it changed
as well. My bad..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120104/274bd227/attachment.html>

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

* [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors
  2012-01-03 20:22 ` [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors Thomas Petazzoni
@ 2012-01-04  8:44   ` Peter Korsgaard
  2012-01-04  8:50     ` Thomas Petazzoni
  0 siblings, 1 reply; 29+ messages in thread
From: Peter Korsgaard @ 2012-01-04  8:44 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> This allows to easily select the corresponding Atom multilib variant
 Thomas> in the Sourcery CodeBench toolchain.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Thomas> ---
 Thomas>  target/Config.in.arch |   10 ++++++++++
 Thomas>  1 files changed, 10 insertions(+), 0 deletions(-)

 Thomas> diff --git a/target/Config.in.arch b/target/Config.in.arch
 Thomas> index 7faa010..b5ff694 100644
 Thomas> --- a/target/Config.in.arch
 Thomas> +++ b/target/Config.in.arch
 Thomas> @@ -266,6 +266,8 @@ config BR2_x86_nocona
 Thomas>  	bool "nocona"
 Thomas>  config BR2_x86_core2
 Thomas>  	bool "core2"
 Thomas> +config BR2_x86_atom
 Thomas> +	bool "atom"

Atom support was only added to GCC in 4.5, so please add a comment
mentioning this similar to how we do it for Cortex A8/A9.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors
  2012-01-04  8:44   ` Peter Korsgaard
@ 2012-01-04  8:50     ` Thomas Petazzoni
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-04  8:50 UTC (permalink / raw)
  To: buildroot

Le Wed, 04 Jan 2012 09:44:09 +0100,
Peter Korsgaard <jacmet@uclibc.org> a ?crit :

> Atom support was only added to GCC in 4.5, so please add a comment
> mentioning this similar to how we do it for Cortex A8/A9.

Ok, will do, thanks.

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

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

* [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH
  2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
@ 2012-01-16  8:40   ` Arnout Vandecappelle
  0 siblings, 0 replies; 29+ messages in thread
From: Arnout Vandecappelle @ 2012-01-16  8:40 UTC (permalink / raw)
  To: buildroot

On Tuesday 03 January 2012 21:22:42 Thomas Petazzoni wrote:
> With the Sourcery CodeBench IA32/AMD64 toolchain, the proper -march=
> switch must be passed. So, on x86_64, we make sure that
> BR2_GCC_TARGET_ARCH gets defined to the correct value, just as we do
> on x86.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 This one will be useful for me even for buildroot-built toolchains...

 Regards,
 Arnout

> ---
>  target/Config.in.arch |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/target/Config.in.arch b/target/Config.in.arch
> index 5e9fad4..7faa010 100644
> --- a/target/Config.in.arch
> +++ b/target/Config.in.arch
> @@ -659,6 +659,11 @@ config BR2_GCC_TARGET_ARCH
>  	default athlon-4	if BR2_x86_athlon_4
>  	default winchip-c6	if BR2_x86_winchip_c6
>  	default winchip2	if BR2_x86_winchip2
> +	default nocona		if BR2_x86_64_nocona
> +	default core2		if BR2_x86_64_core2
> +	default k8		if BR2_x86_64_opteron
> +	default k8-sse3		if BR2_x86_64_opteron_sse3
> +	default barcelona	if BR2_x86_64_barcelona
>  	default c3		if BR2_x86_c3
>  	default c3-2		if BR2_x86_c32
>  	default geode		if BR2_x86_geode
> 

-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates
  2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
                   ` (14 preceding siblings ...)
  2012-01-04  8:16 ` [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas De Schampheleire
@ 2012-01-16  8:42 ` Arnout Vandecappelle
  2012-01-16 17:22   ` Thomas Petazzoni
  15 siblings, 1 reply; 29+ messages in thread
From: Arnout Vandecappelle @ 2012-01-16  8:42 UTC (permalink / raw)
  To: buildroot

On Tuesday 03 January 2012 21:22:41 Thomas Petazzoni wrote:
> Hello,
> 
> What follows is a set of patches doing various improvements and
> updates to the external toolchain support:

 For the whole series:
Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 with Codesourcery 2011.09 on Atom.


 Regards,
 Arnout


-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates
  2012-01-16  8:42 ` Arnout Vandecappelle
@ 2012-01-16 17:22   ` Thomas Petazzoni
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Petazzoni @ 2012-01-16 17:22 UTC (permalink / raw)
  To: buildroot

Le Mon, 16 Jan 2012 09:42:10 +0100,
Arnout Vandecappelle <arnout@mind.be> a ?crit :

>  For the whole series:
> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>  with Codesourcery 2011.09 on Atom.

I am away this week, but I have updated this series to take into
account the few comments that were made. Next version will be sent next
week.

Best regards,

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

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

* [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags
  2012-01-03 20:22 ` [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags Thomas Petazzoni
@ 2012-01-24  5:28   ` Baruch Siach
  0 siblings, 0 replies; 29+ messages in thread
From: Baruch Siach @ 2012-01-24  5:28 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Tue, Jan 03, 2012 at 09:22:46PM +0100, Thomas Petazzoni wrote:
> The BR2_TARGET_OPTIMIZATION flags were not used by the external
> toolchain wrapper, which broke the multilib selection logic of
> multilib external toolchains. It also simplifies the compilation of
> external programs since all flags are properly passed automatically by
> the toolchain wrapper.

This patch supersedes the one from Matias Garcia 
(http://lists.busybox.net/pipermail/buildroot/2011-July/043944.html) and fixes 
the multiple arguments problem mentioned by Peter 
(http://lists.busybox.net/pipermail/buildroot/2011-July/044639.html). I've 
used it to build an e500v2 based filesystem with the CodeSourcery toolchain.

Tested-by: Baruch Siach <baruch@tkos.co.il>

Thanks,

baruch

> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  toolchain/toolchain-external/ext-tool.mk           |    8 ++++++++
>  .../toolchain-external/ext-toolchain-wrapper.c     |    3 +++
>  2 files changed, 11 insertions(+), 0 deletions(-)
> 
> diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
> index 1e62201..b768c0b 100644
> --- a/toolchain/toolchain-external/ext-tool.mk
> +++ b/toolchain/toolchain-external/ext-tool.mk
> @@ -150,6 +150,14 @@ TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_)
>  TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"'
>  endif
>  
> +ifneq ($(BR2_TARGET_OPTIMIZATION),)
> +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION))
> +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each
> +# flag is a separate argument when used in execv() by the external
> +# toolchain wrapper.
> +TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)",)'
> +endif
> +
>  ifeq ($(BR2_SOFT_FLOAT),y)
>  TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float
>  TOOLCHAIN_EXTERNAL_WRAPPER_ARGS += -DBR_SOFTFLOAT=1
> diff --git a/toolchain/toolchain-external/ext-toolchain-wrapper.c b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> index cc404f3..719f13b 100644
> --- a/toolchain/toolchain-external/ext-toolchain-wrapper.c
> +++ b/toolchain/toolchain-external/ext-toolchain-wrapper.c
> @@ -40,6 +40,9 @@ static char *predef_args[] = {
>  #ifdef BR_VFPFLOAT
>  	"-mfpu=vfp",
>  #endif /* BR_VFPFLOAT */
> +#ifdef BR_ADDITIONAL_CFLAGS
> +	BR_ADDITIONAL_CFLAGS
> +#endif
>  };
>  
>  static const char *get_basename(const char *name)

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

end of thread, other threads:[~2012-01-24  5:28 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-03 20:22 [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 01/14] Add x86_64 variants to BR2_GCC_TARGET_ARCH Thomas Petazzoni
2012-01-16  8:40   ` Arnout Vandecappelle
2012-01-03 20:22 ` [Buildroot] [PATCH 02/14] Add the Atom processor in the list of supported x86/x86_64 processors Thomas Petazzoni
2012-01-04  8:44   ` Peter Korsgaard
2012-01-04  8:50     ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 03/14] Improve external toolchain logic to support IA32 Sourcery CodeBench toolchain Thomas Petazzoni
2012-01-04  7:48   ` Thomas De Schampheleire
2012-01-04  8:21     ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 04/14] Support multilib variants in sub-subdirectories Thomas Petazzoni
2012-01-04  7:55   ` Thomas De Schampheleire
2012-01-04  8:24     ` Thomas Petazzoni
2012-01-04  8:37       ` Thomas De Schampheleire
2012-01-03 20:22 ` [Buildroot] [PATCH 05/14] Expand external toolchain wrapper to custom flags Thomas Petazzoni
2012-01-24  5:28   ` Baruch Siach
2012-01-03 20:22 ` [Buildroot] [PATCH 06/14] external-toolchain: remove 2009q1 ARM Sourcery toolchain Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 07/14] external-toolchain: add Sourcery CodeBench ARM 2011.09 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 08/14] external-toolchain: bump MIPS 2011.03 from -93 to -110 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 09/14] external-toolchain: add Sourcery CodeBench PowerPC 2011.03 Thomas Petazzoni
2012-01-04  8:09   ` Thomas De Schampheleire
2012-01-04  8:24     ` Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 10/14] external-toolchain: add Sourcery CodeBench x86/x86_64 2011.09 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 11/14] external-toolchain: Blackfin.uclinux.org 2011R1-RC4 Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 12/14] external-toolchain: details on selecting the multilib variants Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 13/14] external-toolchain: run checks even on extracted toolchains Thomas Petazzoni
2012-01-03 20:22 ` [Buildroot] [PATCH 14/14] external-toolchain: adjust check for uClibc static toolchains Thomas Petazzoni
2012-01-04  8:16 ` [Buildroot] [pull request] Pull request for branch for-2012.02/ext-toolchain-updates Thomas De Schampheleire
2012-01-16  8:42 ` Arnout Vandecappelle
2012-01-16 17:22   ` Thomas Petazzoni

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.