Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements
@ 2013-09-02 16:06 Thomas Petazzoni
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 01/14] package/Makefile.in: fix incorrect comment Thomas Petazzoni
                   ` (14 more replies)
  0 siblings, 15 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

Hello,

Here is a set of updates/improvements to the internal toolchain
backend (with some impacts on the external toolchain one). Mainly it:

 * Allows to build the toolchain with only two passes of gcc build as
   opposed to three. Of course, this is only possible in the
   appropriate situations. This patch had already been posted
   previously to the list, and was rebased on top of current master.

 * Fixes Fortran and Objective-C support, moves the C++ option close
   to the one for Fortran and Objective-C.

 * Adds support for glibc, in addition to eglibc. Note that as
   suggested by Arnout, I'm proposing a single package to handle both
   libraries.

 * Refactors the Stack Smashing Protection support.

 * Refactors the Mudflap support in the internal toolchain backend, by
   providing a Config.in option to enable it. It is now disabled by
   default.

 * Update the Linaro ARM and AArchr64 toolchains.

 * Makes a small number of related cleanups.

Changes since v1:

 * Use psmisc --disable-harden-flags only when BR2_TOOLCHAIN_HAS_SSP
   is false, as suggested by Arnout.

 * Simplify the mudflap stuff by only providing an option in the
   internal gcc backend to enable or disable it. We no longer provide
   a global "Build options" to add -fmudflap when building all
   packages as it is too complicated and probably not that useful.

 * Add updates to Linaro toolchains.

Thomas

Thomas Petazzoni (14):
  package/Makefile.in: fix incorrect comment
  eglibc: libstdc++ is not part of the C library
  toolchain-internal: skip gcc-intermediate when possible
  gcc: fix Fortran support
  gcc: fix Objective-C support
  gcc: move C++ support option next to Fortran/Objective-C
  toolchain: add support for glibc
  gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro
  gcc: force symlink creation
  toolchain: refactor Stack Smashing Protection support
  toolchain: move elf2flt option inclusion to
    toolchain-buildroot/Config.in
  gcc: provide option to enable mudflap support
  toolchain: update Linaro ARM external toolchains
  toolchain: update Linaro AArch64 external toolchains

 Config.in                                    | 17 +++++++
 package/Makefile.in                          |  5 +-
 package/gcc/Config.in.host                   | 55 ++++++++++++++++++---
 package/gcc/gcc-final/gcc-final.mk           | 31 ++++++++----
 package/gcc/gcc-initial/gcc-initial.mk       |  8 ++++
 package/gcc/gcc.mk                           | 26 ++++------
 package/{eglibc/eglibc.mk => glibc/glibc.mk} | 70 +++++++++++++++------------
 package/psmisc/psmisc.mk                     |  4 +-
 package/uclibc/Config.in                     | 11 +++++
 package/uclibc/uclibc.mk                     |  5 +-
 toolchain/Config.in                          | 11 ++++-
 toolchain/helpers.mk                         |  3 +-
 toolchain/toolchain-buildroot/Config.in      | 25 +++++++++-
 toolchain/toolchain-buildroot/Config.in.2    | 31 ------------
 toolchain/toolchain-common.in                |  3 ++
 toolchain/toolchain-external/Config.in       | 72 ++++++++++++++++------------
 toolchain/toolchain-external/ext-tool.mk     | 24 +++++-----
 17 files changed, 252 insertions(+), 149 deletions(-)
 rename package/{eglibc/eglibc.mk => glibc/glibc.mk} (58%)
 delete mode 100644 toolchain/toolchain-buildroot/Config.in.2

-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 01/14] package/Makefile.in: fix incorrect comment
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library Thomas Petazzoni
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The TARGET_{CC,CXX,LD,...} variables no longer contain any --sysroot
option, since we're now using a toolchain wrapper for external
toolchains.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/Makefile.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 91ae1b9..0b1c33a 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -143,8 +143,7 @@ endif
 # Quotes are needed for spaces et al in path components.
 TARGET_PATH="$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin/:$(PATH)"
 
-# Define TARGET_xx variables for all common binutils/gcc tools by
-# including the --sysroot option where necessary.
+# Define TARGET_xx variables for all common binutils/gcc
 TARGET_AR       = $(TARGET_CROSS)ar
 TARGET_AS       = $(TARGET_CROSS)as
 TARGET_CC       = $(TARGET_CROSS)gcc
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 01/14] package/Makefile.in: fix incorrect comment Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:05   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible Thomas Petazzoni
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

For some reason, the eglibc.mk file was trying to install libstdc++.so
from eglibc to the target. But the C++ standard library is provided by
GCC, not by the C library.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/eglibc/eglibc.mk | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/package/eglibc/eglibc.mk b/package/eglibc/eglibc.mk
index 8873a06..fe12299 100644
--- a/package/eglibc/eglibc.mk
+++ b/package/eglibc/eglibc.mk
@@ -89,17 +89,10 @@ ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
 EGLIBC_LIBS_LIB += libthread_db.so
 endif
 
-ifeq ($(BR2_INSTALL_LIBSTDCPP),y)
-EGLIBC_LIBS_USR_LIB += libstdc++.so
-endif
-
 define EGLIBC_INSTALL_TARGET_CMDS
 	for libs in $(EGLIBC_LIBS_LIB); do \
 		$(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \
 	done
-	for libs in $(EGLIBC_LIBS_USR_LIB); do \
-		$(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/usr/lib) ; \
-	done
 endef
 
 $(eval $(autotools-package))
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 01/14] package/Makefile.in: fix incorrect comment Thomas Petazzoni
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:05   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support Thomas Petazzoni
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

When NPTL support was introduced, gcc required a three stages build
process. Since gcc 4.7, this is no longer necessary, and it is
possible to get back to a two stages build process. This patch takes
advantage of this, by doing a two stages build process when possible.

We introduce a few hidden kconfig options:

 * BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD, which is set by the gcc
   Config.in logic to indicate that the compiler might need a three
   stages build. Currently, all versions prior to 4.7.x are selecting
   this kconfig option.

 * BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD, which indicates whether
   the C library might need a three stages build. This is the case for
   eglibc, and uClibc when NPTL is enabled.

 * BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD finally is enabled when both
   of the previous options are enabled. It indicates that a three
   stages build is actually needed.

In addition to those options, the uClibc/gcc build logic is changed to
take use only a two stages build process when possible.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/eglibc/eglibc.mk               |  5 +++--
 package/gcc/Config.in.host             | 11 +++++++++++
 package/gcc/gcc-initial/gcc-initial.mk |  8 ++++++++
 package/uclibc/Config.in               |  1 +
 package/uclibc/uclibc.mk               |  5 +++--
 toolchain/Config.in                    |  9 +++++++++
 6 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/package/eglibc/eglibc.mk b/package/eglibc/eglibc.mk
index fe12299..0ed908d 100644
--- a/package/eglibc/eglibc.mk
+++ b/package/eglibc/eglibc.mk
@@ -14,8 +14,9 @@ EGLIBC_LICENSE_FILES = libc/COPYING libc/COPYING.LIB libc/LICENSES
 # cross-compiler and the kernel headers
 EGLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk
 
-# Before eglibc is built, we must have the second stage cross-compiler
-eglibc-build: host-gcc-intermediate
+# Before eglibc is built, we must have the second stage
+# cross-compiler, for some gcc versions
+eglibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate)
 
 EGLIBC_SUBDIR = build
 
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index a6acaa2..7e6df2d 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -3,6 +3,12 @@ comment "GCC Options"
 config BR2_GCC_NEEDS_MPC
 	bool
 
+# Until gcc 4.7, a three stage build process was needed when using
+# NPTL. This hidden option tells whether gcc is a version that
+# requires this three stage build process.
+config BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+	bool
+
 choice
 	prompt "GCC compiler Version"
 	default BR2_GCC_VERSION_4_4_X if BR2_sparc_sparchfleon || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleon || BR2_sparc_sparcsfleonv8
@@ -16,11 +22,13 @@ choice
 	config BR2_GCC_VERSION_4_2_2_AVR32_2_1_5
 		depends on BR2_avr32
 		bool "gcc 4.2.2-avr32-2.1.5"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_3_X
 		depends on !BR2_arc && !BR2_avr32 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a8 && !BR2_cortex_a9 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_e300c2 && !BR2_powerpc_e300c3 && !BR2_powerpc_e500mc && !BR2_powerpc_464 && !BR2_powerpc_464fp && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
 		depends on !BR2_ARM_EABIHF
 		bool "gcc 4.3.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_4_X
 		depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a5 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_x86_atom && !BR2_powerpc_476 && !BR2_powerpc_476fp && !BR2_fa526 && !BR2_pj4
@@ -29,6 +37,7 @@ choice
 		depends on !BR2_ARM_EABIHF
 		# VFPv4 support appeared in gcc 4.5
 		depends on !BR2_ARM_FPU_VFPV4 && !BR2_ARM_FPU_VFPV4D16
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_5_X
 		depends on !BR2_arc && !BR2_avr32 && !BR2_cortex_a7 && !BR2_cortex_a15 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_fa526 && !BR2_pj4
@@ -36,11 +45,13 @@ choice
 		# ARM EABIhf support appeared in gcc 4.6
 		depends on !BR2_ARM_EABIHF
 		bool "gcc 4.5.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_6_X
 		depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_cortex_a7 && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
 		select BR2_GCC_NEEDS_MPC
 		bool "gcc 4.6.x"
+		select BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
 
 	config BR2_GCC_VERSION_4_7_X
 		depends on !BR2_arc && !BR2_avr32 && !BR2_bfin && !BR2_sparc_sparchfleon && !BR2_sparc_sparchfleonv8 && !BR2_sparc_sparcsfleon && !BR2_sparc_sparcsfleonv8 && !BR2_pj4
diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk
index e468419..c3ab1ce 100644
--- a/package/gcc/gcc-initial/gcc-initial.mk
+++ b/package/gcc/gcc-initial/gcc-initial.mk
@@ -29,6 +29,7 @@ HOST_GCC_INITIAL_CONF_OPT = \
 	--enable-languages=c \
 	--disable-shared \
 	--without-headers \
+	--disable-threads \
 	--with-newlib \
 	--disable-largefile \
 	--disable-nls \
@@ -37,4 +38,11 @@ HOST_GCC_INITIAL_CONF_OPT = \
 HOST_GCC_INITIAL_MAKE_OPT = all-gcc
 HOST_GCC_INITIAL_INSTALL_OPT = install-gcc
 
+ifeq ($(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),)
+ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
+HOST_GCC_INITIAL_MAKE_OPT += all-target-libgcc
+HOST_GCC_INITIAL_INSTALL_OPT += install-target-libgcc
+endif
+endif
+
 $(eval $(host-autotools-package))
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 92e04e9..037ca01 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -115,6 +115,7 @@ choice
 	config BR2_PTHREADS_NATIVE
 		bool "Native POSIX Threading (NPTL)"
 		select BR2_TOOLCHAIN_HAS_THREADS
+		select BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD
 		depends on !BR2_arc
 		depends on !BR2_avr32
 		depends on !BR2_bfin
diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk
index 39877bb..181a772 100644
--- a/package/uclibc/uclibc.mk
+++ b/package/uclibc/uclibc.mk
@@ -22,8 +22,9 @@ UCLIBC_INSTALL_STAGING = YES
 # cross-compiler and the kernel headers
 UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers
 
-# Before uClibc is built, we must have the second stage cross-compiler
-uclibc-build: host-gcc-intermediate
+# Before uClibc is built, we must have the second stage
+# cross-compiler, for some gcc versions, and when NPTL is used.
+uclibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate)
 
 # specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config
 # setting.
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 53d2573..64cdf81 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -1,5 +1,13 @@
 menu "Toolchain"
 
+config BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD
+	bool
+	default y if BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD && \
+		BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD
+
+config BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD
+	bool
+
 # Should be selected for glibc or eglibc
 config BR2_TOOLCHAIN_USES_GLIBC
 	bool
@@ -10,6 +18,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+	select BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD
 
 config BR2_TOOLCHAIN_USES_UCLIBC
 	bool
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:07   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support Thomas Petazzoni
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

This commit fixes the Fortran support in the gcc package by making
sure that the runtime Fortran library is properly installed to the
target.

It also takes this opportunity to slightly reword the Config.in option
help text, to no longer mention gcc < 4.2 since they are no longer
supported in Buildroot, and to have a more meaningful explanation.

Finally, it fixes the gcc-final.mk code to use the correct
BR2_INSTALL_FORTRAN option rather than the non-existing
BR2_GCC_CROSS_FORTRAN option, to decide whether Fortran support should
be enabled or not in the cross-compiler.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/Config.in.host         | 8 ++++----
 package/gcc/gcc-final/gcc-final.mk | 6 +++++-
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 7e6df2d..b440ee2 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -119,13 +119,13 @@ config BR2_INSTALL_OBJC
 	  Build/install Objective-C compiler and runtime?
 
 config BR2_INSTALL_FORTRAN
-	bool "Build/install Fortran compiler and runtime?"
+	bool "Enable Fortran support"
 	depends on !BR2_avr32
 	select BR2_PACKAGE_LIBMPFR
 	help
-	  Build/install Fortran compiler and runtime?
-	  Note that it is highly recommended NOT to use gfortran
-	  from gcc older than 4.2.0
+	  Enable the support for the Fortran language in the
+	  cross-compiler, and install the Fortran runtime to the
+	  target.
 
 config BR2_GCC_ENABLE_TLS
 	bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index b62dfe2..15adadd 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -34,7 +34,7 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_FINAL_CONFIGURE_SYMLINK
 # Languages supported by the cross-compiler
 GCC_FINAL_CROSS_LANGUAGES-y = c
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
-GCC_FINAL_CROSS_LANGUAGES-$(BR2_GCC_CROSS_FORTRAN) += fortran
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_FORTRAN) += fortran
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_GCC_CROSS_OBJC)    += objc
 GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
 
@@ -113,6 +113,10 @@ ifeq ($(BR2_GCC_ENABLE_OPENMP),y)
 HOST_GCC_FINAL_USR_LIBS += libgomp
 endif
 
+ifeq ($(BR2_INSTALL_FORTRAN),y)
+HOST_GCC_FINAL_USR_LIBS += libgfortran
+endif
+
 ifneq ($(HOST_GCC_FINAL_USR_LIBS),)
 define HOST_GCC_FINAL_INSTALL_USR_LIBS
 	mkdir -p $(TARGET_DIR)/usr/lib
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (3 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:07   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C Thomas Petazzoni
                   ` (9 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

This commit fixes the Objective-C support in the gcc package by making
sure that the runtime Objective-C library is properly installed to the
target.

It also takes this opportunity to slightly reword the Config.in option
help text to have a more meaningful explanation.

Finally, it fixes the gcc-final.mk code to use the correct
BR2_INSTALL_OBJC option rather than the non-existing
BR2_GCC_CROSS_OBJC option, to decide whether Objective-C support
should be enabled or not in the cross-compiler.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/Config.in.host         | 6 ++++--
 package/gcc/gcc-final/gcc-final.mk | 6 +++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index b440ee2..a7dbbb6 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -113,10 +113,12 @@ config BR2_EXTRA_GCC_CONFIG_OPTIONS
 	  initial, gcc intermediate and gcc final passes.
 
 config BR2_INSTALL_OBJC
-	bool "Build/install Objective-C compiler and runtime?"
+	bool "Enable Objective-C support"
 	depends on !BR2_avr32
 	help
-	  Build/install Objective-C compiler and runtime?
+	  Enable the support for the Objective-C language in the
+	  cross-compiler, and install the Objective-C runtime to the
+	  target.
 
 config BR2_INSTALL_FORTRAN
 	bool "Enable Fortran support"
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 15adadd..b7efd67 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -35,7 +35,7 @@ HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_FINAL_CONFIGURE_SYMLINK
 GCC_FINAL_CROSS_LANGUAGES-y = c
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++
 GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_FORTRAN) += fortran
-GCC_FINAL_CROSS_LANGUAGES-$(BR2_GCC_CROSS_OBJC)    += objc
+GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_OBJC)    += objc
 GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y))
 
 HOST_GCC_FINAL_CONF_OPT = \
@@ -117,6 +117,10 @@ ifeq ($(BR2_INSTALL_FORTRAN),y)
 HOST_GCC_FINAL_USR_LIBS += libgfortran
 endif
 
+ifeq ($(BR2_INSTALL_OBJC),y)
+HOST_GCC_FINAL_USR_LIBS += libobjc
+endif
+
 ifneq ($(HOST_GCC_FINAL_USR_LIBS),)
 define HOST_GCC_FINAL_INSTALL_USR_LIBS
 	mkdir -p $(TARGET_DIR)/usr/lib
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (4 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:07   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc Thomas Petazzoni
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The option to enable C++ support was still located in
toolchain/toolchain-buildroot/Config.in.2, with misc other toolchain
options. It seems more logical to have this option with the other
options to select the languages supported by the cross-compiler, so we
move it next to the Fortran/Objective-C options in
package/gcc/Config.in.host.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/Config.in.host                | 13 +++++++++++++
 toolchain/toolchain-buildroot/Config.in.2 | 13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index a7dbbb6..dbf0f20 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -112,6 +112,19 @@ config BR2_EXTRA_GCC_CONFIG_OPTIONS
 	  include. Those options are applied for all of the gcc
 	  initial, gcc intermediate and gcc final passes.
 
+config BR2_TOOLCHAIN_BUILDROOT_CXX
+	bool "Enable C++ support"
+	select BR2_INSTALL_LIBSTDCPP
+	depends on !(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && \
+		     BR2_TOOLCHAIN_BUILDROOT_LOCALE)
+	help
+	  Enable this option if you want your toolchain to support the
+	  C++ language and you want C++ libraries to be installed on
+	  your target system.
+
+comment "C++ support broken in uClibc with locale enabled with gcc 4.2"
+	depends on BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && BR2_TOOLCHAIN_BUILDROOT_LOCALE
+
 config BR2_INSTALL_OBJC
 	bool "Enable Objective-C support"
 	depends on !BR2_avr32
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index bf27e6b..1371c31 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -4,19 +4,6 @@ if BR2_TOOLCHAIN_BUILDROOT
 
 comment "Toolchain Options"
 
-config BR2_TOOLCHAIN_BUILDROOT_CXX
-	bool "Enable C++ support"
-	select BR2_INSTALL_LIBSTDCPP
-	depends on !(BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && \
-		     BR2_TOOLCHAIN_BUILDROOT_LOCALE)
-	help
-	  Enable this option if you want your toolchain to support the
-	  C++ language and you want C++ libraries to be installed on
-	  your target system.
-
-comment "C++ support broken in uClibc with locale enabled with gcc 4.2"
-	depends on BR2_GCC_VERSION_4_2_2_AVR32_2_1_5 && BR2_TOOLCHAIN_BUILDROOT_LOCALE
-
 config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
 	bool "Enable stack protection support"
 	help
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (5 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:07   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro Thomas Petazzoni
                   ` (7 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The support for eglibc 2.17 was added to the internal toolchain
backend for 2013.08. This commit now adds glibc 2.18 support to the
internal toolchain backend.

Since the building procedure is very similar to the one of eglibc, we
have renamed the 'eglibc' package to 'glibc', and made it capable of
handling either glibc or eglibc.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/Config.in.host                   |  2 +-
 package/gcc/gcc-final/gcc-final.mk           |  4 +-
 package/{eglibc/eglibc.mk => glibc/glibc.mk} | 62 +++++++++++++++++-----------
 toolchain/toolchain-buildroot/Config.in      | 24 ++++++++++-
 4 files changed, 64 insertions(+), 28 deletions(-)
 rename package/{eglibc/eglibc.mk => glibc/glibc.mk} (59%)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index dbf0f20..111da3b 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -145,7 +145,7 @@ config BR2_INSTALL_FORTRAN
 config BR2_GCC_ENABLE_TLS
 	bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
 	default y
-	depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+	depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC
 	help
 	  Enable the compiler to generate code for accessing
 	  thread local storage variables
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index b7efd67..d817de4 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -77,11 +77,11 @@ endef
 
 HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_SIMPLE_SYMLINKS
 
-# In gcc 4.7.x, the ARM EABIhf library loader path for eglibc was not
+# In gcc 4.7.x, the ARM EABIhf library loader path for (e)glibc was not
 # correct, so we create a symbolic link to make things work
 # properly. eglibc installs the library loader as ld-linux-armhf.so.3,
 # but gcc creates binaries that reference ld-linux.so.3.
-ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),yyyy)
+ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_USES_GLIBC),yyyy)
 define HOST_GCC_FINAL_LD_LINUX_LINK
 	ln -sf ld-linux-armhf.so.3 $(TARGET_DIR)/lib/ld-linux.so.3
 	ln -sf ld-linux-armhf.so.3 $(STAGING_DIR)/lib/ld-linux.so.3
diff --git a/package/eglibc/eglibc.mk b/package/glibc/glibc.mk
similarity index 59%
rename from package/eglibc/eglibc.mk
rename to package/glibc/glibc.mk
index 0ed908d..4dd2e63 100644
--- a/package/eglibc/eglibc.mk
+++ b/package/glibc/glibc.mk
@@ -1,32 +1,46 @@
 ################################################################################
 #
-# eglibc
+# glibc/eglibc
 #
 ################################################################################
 
-EGLIBC_VERSION = 2.17-svnr22064
-EGLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/
-EGLIBC_SOURCE = eglibc-$(EGLIBC_VERSION).tar.bz2
-EGLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library)
-EGLIBC_LICENSE_FILES = libc/COPYING libc/COPYING.LIB libc/LICENSES
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y)
+GLIBC_VERSION = 2.17-svnr22064
+GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc/
+GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2
+GLIBC_SRC_SUBDIR = libc
+else
+GLIBC_VERSION = 2.18
+GLIBC_SITE = $(BR2_GNU_MIRROR)/libc
+GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz
+GLIBC_SRC_SUBDIR = .
+endif
+
+GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library)
+GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES)
 
-# Before eglibc is configured, we must have the first stage
+# Before (e)glibc is configured, we must have the first stage
 # cross-compiler and the kernel headers
-EGLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk
+GLIBC_DEPENDENCIES = host-gcc-initial linux-headers
+
+# eglibc also needs host-gawk
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y)
+GLIBC_DEPENDENCIES += host-gawk
+endif
 
-# Before eglibc is built, we must have the second stage
+# Before (e)glibc is built, we must have the second stage
 # cross-compiler, for some gcc versions
-eglibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate)
+glibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate)
 
-EGLIBC_SUBDIR = build
+GLIBC_SUBDIR = build
 
-EGLIBC_INSTALL_STAGING = YES
+GLIBC_INSTALL_STAGING = YES
 
-EGLIBC_INSTALL_STAGING_OPT = install_root=$(STAGING_DIR) install
+GLIBC_INSTALL_STAGING_OPT = install_root=$(STAGING_DIR) install
 
 # Thumb build is broken, build in ARM mode
 ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
-EGLIBC_EXTRA_CFLAGS += -marm
+GLIBC_EXTRA_CFLAGS += -marm
 endif
 
 # Even though we use the autotools-package infrastructure, we have to
@@ -38,16 +52,16 @@ endif
 #  2. We have to execute the configure script with bash and not sh.
 #
 # Note that as mentionned in
-# http://patches.openembedded.org/patch/38849/, eglibc must be built
-# with -O2, so we pass our own CFLAGS and CXXFLAGS below.
-define EGLIBC_CONFIGURE_CMDS
+# http://patches.openembedded.org/patch/38849/, eglibc/glibc must be
+# built with -O2, so we pass our own CFLAGS and CXXFLAGS below.
+define GLIBC_CONFIGURE_CMDS
 	mkdir -p $(@D)/build
 	# Do the configuration
 	(cd $(@D)/build; \
 		$(TARGET_CONFIGURE_OPTS) \
-		CFLAGS="-O2 $(EGLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \
-		CXXFLAGS="-O2 $(EGLIBC_EXTRA_CFLAGS)" \
-		$(SHELL) $(@D)/libc/configure \
+		CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \
+		CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \
+		$(SHELL) $(@D)/$(GLIBC_SRC_SUBDIR)/configure \
 		ac_cv_path_BASH_SHELL=/bin/bash \
 		libc_cv_forced_unwind=yes \
 		--target=$(GNU_TARGET_NAME) \
@@ -81,17 +95,17 @@ endef
 # to install the libraries, and nothing more.
 #
 
-EGLIBC_LIBS_LIB = \
+GLIBC_LIBS_LIB = \
 	ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so	   \
 	libnsl.so libpthread.so libresolv.so librt.so libutil.so   \
 	libnss_files.so libnss_dns.so
 
 ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
-EGLIBC_LIBS_LIB += libthread_db.so
+GLIBC_LIBS_LIB += libthread_db.so
 endif
 
-define EGLIBC_INSTALL_TARGET_CMDS
-	for libs in $(EGLIBC_LIBS_LIB); do \
+define GLIBC_INSTALL_TARGET_CMDS
+	for libs in $(GLIBC_LIBS_LIB); do \
 		$(call copy_toolchain_lib_root,$(STAGING_DIR)/,,lib,$$libs,/lib) ; \
 	done
 endef
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 7a26441..060b494 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -35,12 +35,34 @@ config BR2_TOOLCHAIN_BUILDROOT_EGLIBC
 
 	  http://eglibc.org
 
+config BR2_TOOLCHAIN_BUILDROOT_GLIBC
+	bool "glibc (experimental)"
+	depends on BR2_arm    || BR2_armeb    || BR2_aarch64 || \
+		   BR2_i386   || BR2_mips     || BR2_mipsel  || \
+		   BR2_mips64 || BR2_mips64el || BR2_powerpc || \
+		   BR2_sh     || BR2_sh64     || BR2_sparc   || \
+		   BR2_x86_64
+	select BR2_TOOLCHAIN_USES_GLIBC
+	# our glibc.mk enables RPC support
+	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
+	help
+	  This option selects glibc as the C library for the
+	  cross-compilation toolchain.
+
+	  The glibc support in the Buildroot toolchain backend is
+	  very recent, and therefore marked experimental.
+
+	  http://www.gnu.org/software/libc/
+
 endchoice
 
 config BR2_TOOLCHAIN_BUILDROOT_LIBC
 	string
 	default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC
-	default "eglibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+	# Both glibc and eglibc are handled by the package called
+	# 'glibc'
+	default "glibc"  if BR2_TOOLCHAIN_BUILDROOT_EGLIBC
+	default "glibc"  if BR2_TOOLCHAIN_BUILDROOT_GLIBC
 
 source "package/uclibc/Config.in"
 
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (6 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:08   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 09/14] gcc: force symlink creation Thomas Petazzoni
                   ` (6 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

Each stage of the gcc build needs to make a small dance before the
configuration step to create a build sub-directory and a symbolic link
to the configure script. The common gcc.mk had a
HOST_GCC_CONFIGURE_SYMLINK already used by the gcc-initial and
gcc-intermediate steps, but the gcc-final step wasn't using it.

This commit fixes this inconsistency, and therefore removes the
HOST_GCC_FINAL_CONFIGURE_SYMLINK macro.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/gcc-final/gcc-final.mk | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index d817de4..14ec06a 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -24,12 +24,7 @@ HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES
 # subdirectory in the gcc sources, and build from there.
 HOST_GCC_FINAL_SUBDIR = build
 
-define HOST_GCC_FINAL_CONFIGURE_SYMLINK
-	mkdir -p $(@D)/build
-	ln -s ../configure $(@D)/build/configure
-endef
-
-HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_FINAL_CONFIGURE_SYMLINK
+HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK
 
 # Languages supported by the cross-compiler
 GCC_FINAL_CROSS_LANGUAGES-y = c
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 09/14] gcc: force symlink creation
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (7 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:08   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support Thomas Petazzoni
                   ` (5 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The HOST_GCC_CONFIGURE_SYMLINK creates a symbolic link
$(@D)/build/configure -> $(@D)/configure for each build step of
gcc. However, it was only using 'ln -s' and not 'ln -sf', which was
causing problems when doing 'make host-gcc-final-reconfigure' for
example, because the configure commands (including this macro) are
being re-executed, but the symbolic link already exists.

Changing this symbolic link creation to 'ln -sf' fixes this problem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index cd6efed..20d6d14 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -76,7 +76,7 @@ endef
 
 define HOST_GCC_CONFIGURE_SYMLINK
 	mkdir -p $(@D)/build
-	ln -s ../configure $(@D)/build/configure
+	ln -sf ../configure $(@D)/build/configure
 endef
 
 #
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (8 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 09/14] gcc: force symlink creation Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:25   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in Thomas Petazzoni
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

This commit refactors how Stack Smashing Protection support is handled
in Buildroot:

 *) It turns the BR2_TOOLCHAIN_BUILDROOT_USE_SSP option into an option
    that only enables the SSP support in uClibc, when using the internal
    toolchain backend.

 *) It adds an hidden BR2_TOOLCHAIN_HAS_SSP option that gets enabled
    when the toolchain has SSP support. Here we have the usual dance:
    glibc/eglibc in internal/external backend always select this
    option, in the case of uClibc/internal, it gets selected when
    BR2_TOOLCHAIN_BUILDROOT_USE_SSP is enabled, in the case of
    uClibc/external, there is a new configuration option that the user
    must select (or not) depending on whether the toolchain has SSP
    support.

 *) It adds a new options BR2_ENABLE_SSP in the "Build options" menu,
    to enable the usage of SSP support, by adding
    -fstack-protector-all to the CFLAGS.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 Config.in                                 | 17 +++++++++++++++++
 package/Makefile.in                       |  2 +-
 package/psmisc/psmisc.mk                  |  4 ++--
 package/uclibc/Config.in                  | 10 ++++++++++
 toolchain/Config.in                       |  1 +
 toolchain/helpers.mk                      |  3 ++-
 toolchain/toolchain-buildroot/Config.in.2 |  9 ---------
 toolchain/toolchain-common.in             |  3 +++
 toolchain/toolchain-external/Config.in    |  9 +++++++++
 9 files changed, 45 insertions(+), 13 deletions(-)

diff --git a/Config.in b/Config.in
index cb246a4..8046d6e 100644
--- a/Config.in
+++ b/Config.in
@@ -398,6 +398,23 @@ config BR2_OPTIMIZE_S
 
 endchoice
 
+config BR2_ENABLE_SSP
+	bool "build code with Stack Smashing Protection"
+	depends on BR2_TOOLCHAIN_HAS_SSP
+	help
+	  Enable stack smashing protection support using GCCs
+	  -fstack-protector-all option.
+
+	  See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
+          for details.
+
+	  Note that this requires the toolchain to have SSP
+	  support. This is always the case for glibc and eglibc
+	  toolchain, but is optional in uClibc toolchains.
+
+comment "enabling Stack Smashing Protection requires support in the toolchain"
+	depends on !BR2_TOOLCHAIN_HAS_SSP
+
 config BR2_PREFER_STATIC_LIB
 	bool "prefer static libraries"
 	help
diff --git a/package/Makefile.in b/package/Makefile.in
index 0b1c33a..3eaa2b2 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -129,7 +129,7 @@ TARGET_CFLAGS += -msep-data
 TARGET_CXXFLAGS += -msep-data
 endif
 
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
+ifeq ($(BR2_ENABLE_SSP),y)
 TARGET_CFLAGS += -fstack-protector-all
 TARGET_CXXFLAGS += -fstack-protector-all
 endif
diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk
index 1340ee6..c18ba94 100644
--- a/package/psmisc/psmisc.mk
+++ b/package/psmisc/psmisc.mk
@@ -10,8 +10,8 @@ PSMISC_LICENSE = GPLv2
 PSMISC_LICENSE_FILES = COPYING
 PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 
-ifneq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y)
-# Don't force -fstack-protector
+ifeq ($(BR2_TOOLCHAIN_HAS_SSP),)
+# Don't force -fstack-protector when SSP is not available in toolchain
 PSMISC_CONF_OPT = --disable-harden-flags
 endif
 
diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in
index 037ca01..eeb3b83 100644
--- a/package/uclibc/Config.in
+++ b/package/uclibc/Config.in
@@ -130,6 +130,16 @@ config BR2_PTHREAD_DEBUG
 	help
 	  Build the thread library with debugging enabled.
 
+config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
+	bool "Enable stack protection support"
+	select BR2_TOOLCHAIN_HAS_SSP
+	help
+	  Enable stack smashing protection support using GCCs
+	  -fstack-protector-all option in uClibc.
+
+	  See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
+	  for details.
+
 config BR2_UCLIBC_INSTALL_UTILS
 	bool "Compile and install uClibc utilities"
 	depends on !BR2_bfin
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 64cdf81..da9cd68 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -18,6 +18,7 @@ config BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+	select BR2_TOOLCHAIN_HAS_SSP
 	select BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD
 
 config BR2_TOOLCHAIN_USES_UCLIBC
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 44b6018..0e270ee 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -258,7 +258,8 @@ check_uclibc = \
 	$(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\
 	$(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\
-	$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support)
+	$(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\
+	$(call check_uclibc_feature,__UCLIBC_HAS_SSP__,BR2_TOOLCHAIN_HAS_SSP,$${UCLIBC_CONFIG_FILE},Stack Smashing Protection support)
 
 #
 # Check that the Buildroot configuration of the ABI matches the
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
index 1371c31..df26079 100644
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ b/toolchain/toolchain-buildroot/Config.in.2
@@ -4,15 +4,6 @@ if BR2_TOOLCHAIN_BUILDROOT
 
 comment "Toolchain Options"
 
-config BR2_TOOLCHAIN_BUILDROOT_USE_SSP
-	bool "Enable stack protection support"
-	help
-	  Enable stack smashing protection support using GCCs
-	  -fstack-protector-all option.
-
-	  See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt
-	  for details.
-
 source "package/elf2flt/Config.in.host"
 
 endif
diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index dc3bd2a..1085fb3 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -32,6 +32,9 @@ config BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	bool
 
+config BR2_TOOLCHAIN_HAS_SSP
+	bool
+
 config BR2_ENABLE_LOCALE_PURGE
 	bool "Purge unwanted locales"
 	help
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index ad1f203..11edc98 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -921,6 +921,15 @@ config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG
 	  debugging support. If you don't know, leave the default
 	  value, Buildroot will tell you if it's correct or not.
 
+config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP
+	bool "Toolchain has SSP support?"
+	select BR2_TOOLCHAIN_HAS_SSP
+	help
+	  Selection this option if your external toolchain has Stack
+	  Smashing Protection support enabled. If you don't know,
+	  leave the default value, Buildroot will tell you if it's
+	  correct or not.
+
 endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC
 
 config BR2_TOOLCHAIN_EXTERNAL_INET_RPC
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (9 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:25   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support Thomas Petazzoni
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The only remaining thing in toolchain-buildroot/Config.in.2 is the
inclusion of the elf2flt option. It doesn't really make sense to have
a separate Config.in file for that, so let's move this to
toolchain-buildroot/Config.in.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 toolchain/Config.in                       | 1 -
 toolchain/toolchain-buildroot/Config.in   | 1 +
 toolchain/toolchain-buildroot/Config.in.2 | 9 ---------
 3 files changed, 1 insertion(+), 10 deletions(-)
 delete mode 100644 toolchain/toolchain-buildroot/Config.in.2

diff --git a/toolchain/Config.in b/toolchain/Config.in
index da9cd68..51c83d9 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -62,6 +62,5 @@ source "toolchain/toolchain-buildroot/Config.in"
 source "toolchain/toolchain-external/Config.in"
 source "toolchain/toolchain-crosstool-ng/Config.in"
 source "toolchain/toolchain-common.in"
-source "toolchain/toolchain-buildroot/Config.in.2"
 
 endmenu
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 060b494..0ebbd6c 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -68,4 +68,5 @@ source "package/uclibc/Config.in"
 
 source "package/binutils/Config.in.host"
 source "package/gcc/Config.in.host"
+source "package/elf2flt/Config.in.host"
 endif
diff --git a/toolchain/toolchain-buildroot/Config.in.2 b/toolchain/toolchain-buildroot/Config.in.2
deleted file mode 100644
index df26079..0000000
--- a/toolchain/toolchain-buildroot/Config.in.2
+++ /dev/null
@@ -1,9 +0,0 @@
-# Buildroot backend specific options
-
-if BR2_TOOLCHAIN_BUILDROOT
-
-comment "Toolchain Options"
-
-source "package/elf2flt/Config.in.host"
-
-endif
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (10 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:28   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains Thomas Petazzoni
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

The mudflap library is only useful if one uses the -fmudflap gcc
option, to do more checks on pointers/arrays. This commit adds an
option to enable/disable mudflap support at the gcc level. By default,
it is disabled, which saves a little bit of build time compared to the
default of gcc which consists in enabling mudflap support.

Since mudflap is now disabled by default, and ensured to be enabled on
some platforms where it is not available, some gcc.mk code that was
used to disable mudflap in problematic configurations can be removed.

Whether -fmudflap is used when building is left to the user.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/gcc/Config.in.host         | 15 +++++++++++++++
 package/gcc/gcc-final/gcc-final.mk |  8 ++++++++
 package/gcc/gcc.mk                 | 24 +++++++-----------------
 3 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 111da3b..d6c568d 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -155,3 +155,18 @@ config BR2_GCC_ENABLE_OPENMP
 	depends on !BR2_PTHREADS_NONE && !BR2_avr32 && !BR2_arc
 	help
 	  Enable OpenMP support for the compiler
+
+config BR2_GCC_ENABLE_LIBMUDFLAP
+	bool "Enable libmudflap support"
+	# There are architectures, or specific configurations for
+	# which mudflap is not supported.
+	depends on !BR2_avr32 && !BR2_bfin && !BR2_ARM_INSTRUCTIONS_THUMB &&!BR2_powerpc_SPE
+	help
+	  libmudflap is a gcc library used for the mudflap pointer
+	  debugging functionality. It is only needed if you intend to
+	  use the -fmudflap gcc flag.
+
+	  See http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging and
+	  the help of the gcc -fmudflap option for more details.
+
+	  If you're unsure, leave this option disabled.
diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
index 14ec06a..58c84ab 100644
--- a/package/gcc/gcc-final/gcc-final.mk
+++ b/package/gcc/gcc-final/gcc-final.mk
@@ -116,6 +116,14 @@ ifeq ($(BR2_INSTALL_OBJC),y)
 HOST_GCC_FINAL_USR_LIBS += libobjc
 endif
 
+ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+HOST_GCC_FINAL_USR_LIBS += libmudflapth
+else
+HOST_GCC_FINAL_USR_LIBS += libmudflap
+endif
+endif
+
 ifneq ($(HOST_GCC_FINAL_USR_LIBS),)
 define HOST_GCC_FINAL_INSTALL_USR_LIBS
 	mkdir -p $(TARGET_DIR)/usr/lib
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 20d6d14..58eae30 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -119,6 +119,12 @@ else
 HOST_GCC_COMMON_CONF_OPT += --disable-tls
 endif
 
+ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y)
+HOST_GCC_COMMON_CONF_OPT += --enable-libmudflap
+else
+HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
+endif
+
 ifeq ($(BR2_PTHREADS_NONE),y)
 HOST_GCC_COMMON_CONF_OPT += \
 	--disable-threads \
@@ -192,25 +198,9 @@ HOST_GCC_COMMON_CONF_OPT += \
 	--with-bugurl="http://bugs.buildroot.net/"
 endif
 
-# AVR32 GCC special configuration
-ifeq ($(BR2_avr32),y)
-HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
-endif
-
-# ARM Thumb and mudflap aren't friends
-ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
-HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
-endif
-
-# Blackfin doesn't do mudflap
-ifeq ($(BR2_bfin),y)
-HOST_GCC_COMMON_CONF_OPT += --disable-libmudflap
-endif
-
-# Disable mudflap and enable proper double/long double for SPE ABI
+# Enable proper double/long double for SPE ABI
 ifeq ($(BR2_powerpc_SPE),y)
 HOST_GCC_COMMON_CONF_OPT += \
-	--disable-libmudflap \
 	--enable-e500_double \
 	--with-long-double-128
 endif
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (11 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:32   ` Peter Korsgaard
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 " Thomas Petazzoni
  2013-09-15 19:20 ` [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

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

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 11edc98..9c5d93c 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -3,8 +3,8 @@ if BR2_TOOLCHAIN_EXTERNAL
 choice
 	prompt "Toolchain"
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
-	bool "Linaro 2013.06"
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08
+	bool "Linaro 2013.08"
 	depends on BR2_arm
 	depends on BR2_GCC_TARGET_ARCH = "armv7-a"
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
@@ -15,16 +15,17 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
-	  GCC 2013.06 (based on gcc 4.8), Linaro GDB 2013.06 (based on
-	  GDB 7.6), eglibc 2.15. It generates code that runs on all
-	  Cortex-A profile devices, but tuned for the Cortex-A9. The
-	  code generated is Thumb 2, with the hard floating point
-	  calling convention, and uses the VFPv3-D16 FPU instructions.
+	  GCC 2013.08 (based on gcc 4.8), Linaro GDB 2013.05 (based on
+	  GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It
+	  generates code that runs on all Cortex-A profile devices,
+	  but tuned for the Cortex-A9. The code generated is Thumb 2,
+	  with the hard floating point calling convention, and uses
+	  the VFPv3-D16 FPU instructions.
 
 	  To use this toolchain, you must disable soft float usage.
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_05
-	bool "Linaro 2013.05"
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07
+	bool "Linaro 2013.07"
 	depends on BR2_arm
 	depends on BR2_GCC_TARGET_ARCH = "armv7-a"
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
@@ -35,16 +36,17 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_05
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
-	  GCC 2013.05 (based on gcc 4.8), Linaro GDB 2013.05 (based on
-	  GDB 7.6), eglibc 2.15. It generates code that runs on all
-	  Cortex-A profile devices, but tuned for the Cortex-A9. The
-	  code generated is Thumb 2, with the hard floating point
-	  calling convention, and uses the VFPv3-D16 FPU instructions.
+	  GCC 2013.07 (based on gcc 4.8), Linaro GDB 2013.05 (based on
+	  GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It
+	  generates code that runs on all Cortex-A profile devices,
+	  but tuned for the Cortex-A9. The code generated is Thumb 2,
+	  with the hard floating point calling convention, and uses
+	  the VFPv3-D16 FPU instructions.
 
 	  To use this toolchain, you must disable soft float usage.
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_04
-	bool "Linaro 2013.04"
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
+	bool "Linaro 2013.06"
 	depends on BR2_arm
 	depends on BR2_GCC_TARGET_ARCH = "armv7-a"
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
@@ -55,11 +57,12 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_04
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
-	  GCC 2013.04 (based on gcc 4.7), Linaro GDB 2012.12 (based on
-	  GDB 7.5), eglibc 2.15. It generates code that runs on all
-	  Cortex-A profile devices, but tuned for the Cortex-A9. The
-	  code generated is Thumb 2, with the hard floating point
-	  calling convention, and uses the VFPv3-D16 FPU instructions.
+	  GCC 2013.06 (based on gcc 4.8), Linaro GDB 2013.05 (based on
+	  GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It
+	  generates code that runs on all Cortex-A profile devices,
+	  but tuned for the Cortex-A9. The code generated is Thumb 2,
+	  with the hard floating point calling convention, and uses
+	  the VFPv3-D16 FPU instructions.
 
 	  To use this toolchain, you must disable soft float usage.
 
@@ -800,9 +803,9 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 
 config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	string
+	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08
+	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07
 	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
-	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_05
-	default "arm-linux-gnueabihf"	 if BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_04
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201109
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201203
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 38f6e22..56b836a 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -229,15 +229,15 @@ define TOOLCHAIN_EXTERNAL_FIXUP_CMDS
 	mv $(@D)/arago-2011.09/armv5te/* $(@D)/
 	rm -rf $(@D)/arago-2011.09/
 endef
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_04),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.04/components/toolchain/binaries/
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux.tar.xz
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_05),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.05/components/toolchain/binaries/
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.05_linux.tar.xz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06),y)
 TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.06/components/toolchain/binaries/
 TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux.tar.xz
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_07),y)
+TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.07/components/toolchain/binaries/
+TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08),y)
+TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.08/components/toolchain/binaries/
+TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux.tar.xz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201203),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu/
 TOOLCHAIN_EXTERNAL_SOURCE = mips-2012.03-63-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 external toolchains
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (12 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains Thomas Petazzoni
@ 2013-09-02 16:06 ` Thomas Petazzoni
  2013-09-15 21:32   ` Peter Korsgaard
  2013-09-15 19:20 ` [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
  14 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-02 16:06 UTC (permalink / raw)
  To: buildroot

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

diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 9c5d93c..36587b5 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -717,8 +717,8 @@ config BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2
 	  Toolchain for the Microblaze architecture, from
 	  http://wiki.xilinx.com/mb-gnu-tools
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_06
-	bool "Linaro AArch64 13.06"
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08
+	bool "Linaro AArch64 13.08"
 	depends on BR2_aarch64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
@@ -729,8 +729,8 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_06
 	  Toolchain for the AArch64 architecture, from
 	  http://www.linaro.org/engineering/armv8/
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_05
-	bool "Linaro AArch64 13.05"
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07
+	bool "Linaro AArch64 13.07"
 	depends on BR2_aarch64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	select BR2_TOOLCHAIN_EXTERNAL_GLIBC
@@ -741,7 +741,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_05
 	  Toolchain for the AArch64 architecture, from
 	  http://www.linaro.org/engineering/armv8/
 
-config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_04
+config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_06
 	bool "Linaro AArch64 13.04"
 	depends on BR2_aarch64
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
@@ -811,9 +811,9 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 	default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109
 	default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109
+	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08
+	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07
 	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_06
-	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_05
-	default "aarch64-linux-gnu"      if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_04
 	default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_14_3
 	default "microblazeel-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEEL_V2
 	default "microblaze-unknown-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_14_3
diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk
index 56b836a..a96ca06 100644
--- a/toolchain/toolchain-external/ext-tool.mk
+++ b/toolchain/toolchain-external/ext-tool.mk
@@ -301,15 +301,15 @@ TOOLCHAIN_EXTERNAL_SOURCE = lin32-microblaze-unknown-linux-gnu_14.3_early.tar.xz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILINX_MICROBLAZEBE_V2),y)
 TOOLCHAIN_EXTERNAL_SITE = http://sources.buildroot.net/
 TOOLCHAIN_EXTERNAL_SOURCE = microblaze-unknown-linux-gnu.tgz
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_04),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.04/components/toolchain/binaries/
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.7-2013.04-20130415_linux.tar.xz
-else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_05),y)
-TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.05/components/toolchain/binaries/
-TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.05_linux.tar.xz
 else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_06),y)
 TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/13.06/components/toolchain/binaries/
 TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.06_linux.tar.xz
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_07),y)
+TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.07/components/toolchain/binaries/
+TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.07-1_linux.tar.xz
+else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64_13_08),y)
+TOOLCHAIN_EXTERNAL_SITE = http://releases.linaro.org/13.08/components/toolchain/binaries/
+TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.8-2013.08_linux.tar.xz
 else
 # Custom toolchain
 TOOLCHAIN_EXTERNAL_SITE = $(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))
-- 
1.8.1.2

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

* [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements
  2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
                   ` (13 preceding siblings ...)
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 " Thomas Petazzoni
@ 2013-09-15 19:20 ` Thomas Petazzoni
  14 siblings, 0 replies; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-15 19:20 UTC (permalink / raw)
  To: buildroot

Peter,

I haven't received any comments on the v2 of this patch series, and it
still applies cleanly on current master. Would it be possible to apply
it?

It's some toolchain stuff, so as usual it's pretty 'dangerous', so I'd
prefer to have it merged sooner rather than later, and also because I'd
like after that one to get the patch set that fixes the toolchain
'make source' merged.

Thanks!

Thomas

On Mon,  2 Sep 2013 18:06:26 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> Here is a set of updates/improvements to the internal toolchain
> backend (with some impacts on the external toolchain one). Mainly it:
> 
>  * Allows to build the toolchain with only two passes of gcc build as
>    opposed to three. Of course, this is only possible in the
>    appropriate situations. This patch had already been posted
>    previously to the list, and was rebased on top of current master.
> 
>  * Fixes Fortran and Objective-C support, moves the C++ option close
>    to the one for Fortran and Objective-C.
> 
>  * Adds support for glibc, in addition to eglibc. Note that as
>    suggested by Arnout, I'm proposing a single package to handle both
>    libraries.
> 
>  * Refactors the Stack Smashing Protection support.
> 
>  * Refactors the Mudflap support in the internal toolchain backend, by
>    providing a Config.in option to enable it. It is now disabled by
>    default.
> 
>  * Update the Linaro ARM and AArchr64 toolchains.
> 
>  * Makes a small number of related cleanups.
> 
> Changes since v1:
> 
>  * Use psmisc --disable-harden-flags only when BR2_TOOLCHAIN_HAS_SSP
>    is false, as suggested by Arnout.
> 
>  * Simplify the mudflap stuff by only providing an option in the
>    internal gcc backend to enable or disable it. We no longer provide
>    a global "Build options" to add -fmudflap when building all
>    packages as it is too complicated and probably not that useful.
> 
>  * Add updates to Linaro toolchains.
> 
> Thomas
> 
> Thomas Petazzoni (14):
>   package/Makefile.in: fix incorrect comment
>   eglibc: libstdc++ is not part of the C library
>   toolchain-internal: skip gcc-intermediate when possible
>   gcc: fix Fortran support
>   gcc: fix Objective-C support
>   gcc: move C++ support option next to Fortran/Objective-C
>   toolchain: add support for glibc
>   gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro
>   gcc: force symlink creation
>   toolchain: refactor Stack Smashing Protection support
>   toolchain: move elf2flt option inclusion to
>     toolchain-buildroot/Config.in
>   gcc: provide option to enable mudflap support
>   toolchain: update Linaro ARM external toolchains
>   toolchain: update Linaro AArch64 external toolchains
> 
>  Config.in                                    | 17 +++++++
>  package/Makefile.in                          |  5 +-
>  package/gcc/Config.in.host                   | 55 ++++++++++++++++++---
>  package/gcc/gcc-final/gcc-final.mk           | 31 ++++++++----
>  package/gcc/gcc-initial/gcc-initial.mk       |  8 ++++
>  package/gcc/gcc.mk                           | 26 ++++------
>  package/{eglibc/eglibc.mk => glibc/glibc.mk} | 70 +++++++++++++++------------
>  package/psmisc/psmisc.mk                     |  4 +-
>  package/uclibc/Config.in                     | 11 +++++
>  package/uclibc/uclibc.mk                     |  5 +-
>  toolchain/Config.in                          | 11 ++++-
>  toolchain/helpers.mk                         |  3 +-
>  toolchain/toolchain-buildroot/Config.in      | 25 +++++++++-
>  toolchain/toolchain-buildroot/Config.in.2    | 31 ------------
>  toolchain/toolchain-common.in                |  3 ++
>  toolchain/toolchain-external/Config.in       | 72 ++++++++++++++++------------
>  toolchain/toolchain-external/ext-tool.mk     | 24 +++++-----
>  17 files changed, 252 insertions(+), 149 deletions(-)
>  rename package/{eglibc/eglibc.mk => glibc/glibc.mk} (58%)
>  delete mode 100644 toolchain/toolchain-buildroot/Config.in.2
> 



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

* [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library Thomas Petazzoni
@ 2013-09-15 21:05   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:05 UTC (permalink / raw)
  To: buildroot

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

 Thomas> For some reason, the eglibc.mk file was trying to install libstdc++.so
 Thomas> from eglibc to the target. But the C++ standard library is provided by
 Thomas> GCC, not by the C library.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible Thomas Petazzoni
@ 2013-09-15 21:05   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:05 UTC (permalink / raw)
  To: buildroot

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

 Thomas> When NPTL support was introduced, gcc required a three stages build
 Thomas> process. Since gcc 4.7, this is no longer necessary, and it is
 Thomas> possible to get back to a two stages build process. This patch takes
 Thomas> advantage of this, by doing a two stages build process when possible.

 Thomas> We introduce a few hidden kconfig options:

 Thomas>  * BR2_GCC_VERSION_NEEDS_THREE_STAGE_BUILD, which is set by the gcc
 Thomas>    Config.in logic to indicate that the compiler might need a three
 Thomas>    stages build. Currently, all versions prior to 4.7.x are selecting
 Thomas>    this kconfig option.

 Thomas>  * BR2_TOOLCHAIN_LIBC_NEEDS_THREE_STAGE_BUILD, which indicates whether
 Thomas>    the C library might need a three stages build. This is the case for
 Thomas>    eglibc, and uClibc when NPTL is enabled.

 Thomas>  * BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD finally is enabled when both
 Thomas>    of the previous options are enabled. It indicates that a three
 Thomas>    stages build is actually needed.

 Thomas> In addition to those options, the uClibc/gcc build logic is changed to
 Thomas> take use only a two stages build process when possible.

I removed 'take' here and committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support Thomas Petazzoni
@ 2013-09-15 21:07   ` Peter Korsgaard
  2013-09-16 15:38     ` Thomas Petazzoni
  0 siblings, 1 reply; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:07 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This commit fixes the Fortran support in the gcc package by making
 Thomas> sure that the runtime Fortran library is properly installed to the
 Thomas> target.

 Thomas> It also takes this opportunity to slightly reword the Config.in option
 Thomas> help text, to no longer mention gcc < 4.2 since they are no longer
 Thomas> supported in Buildroot, and to have a more meaningful explanation.

 Thomas> Finally, it fixes the gcc-final.mk code to use the correct
 Thomas> BR2_INSTALL_FORTRAN option rather than the non-existing
 Thomas> BR2_GCC_CROSS_FORTRAN option, to decide whether Fortran support should
 Thomas> be enabled or not in the cross-compiler.

Committed, thanks.

I wonder if we shouldn't deprecate fortran (and objc) support and get
rid of them. Is there really a use case for them? Any interesting sw
that needs them?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support Thomas Petazzoni
@ 2013-09-15 21:07   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:07 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This commit fixes the Objective-C support in the gcc package by making
 Thomas> sure that the runtime Objective-C library is properly installed to the
 Thomas> target.

 Thomas> It also takes this opportunity to slightly reword the Config.in option
 Thomas> help text to have a more meaningful explanation.

 Thomas> Finally, it fixes the gcc-final.mk code to use the correct
 Thomas> BR2_INSTALL_OBJC option rather than the non-existing
 Thomas> BR2_GCC_CROSS_OBJC option, to decide whether Objective-C support
 Thomas> should be enabled or not in the cross-compiler.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C Thomas Petazzoni
@ 2013-09-15 21:07   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:07 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The option to enable C++ support was still located in
 Thomas> toolchain/toolchain-buildroot/Config.in.2, with misc other toolchain
 Thomas> options. It seems more logical to have this option with the other
 Thomas> options to select the languages supported by the cross-compiler, so we
 Thomas> move it next to the Fortran/Objective-C options in
 Thomas> package/gcc/Config.in.host.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc Thomas Petazzoni
@ 2013-09-15 21:07   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:07 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The support for eglibc 2.17 was added to the internal toolchain
 Thomas> backend for 2013.08. This commit now adds glibc 2.18 support to the
 Thomas> internal toolchain backend.

 Thomas> Since the building procedure is very similar to the one of eglibc, we
 Thomas> have renamed the 'eglibc' package to 'glibc', and made it capable of
 Thomas> handling either glibc or eglibc.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro Thomas Petazzoni
@ 2013-09-15 21:08   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:08 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Each stage of the gcc build needs to make a small dance before the
 Thomas> configuration step to create a build sub-directory and a symbolic link
 Thomas> to the configure script. The common gcc.mk had a
 Thomas> HOST_GCC_CONFIGURE_SYMLINK already used by the gcc-initial and
 Thomas> gcc-intermediate steps, but the gcc-final step wasn't using it.

 Thomas> This commit fixes this inconsistency, and therefore removes the
 Thomas> HOST_GCC_FINAL_CONFIGURE_SYMLINK macro.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 09/14] gcc: force symlink creation
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 09/14] gcc: force symlink creation Thomas Petazzoni
@ 2013-09-15 21:08   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:08 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The HOST_GCC_CONFIGURE_SYMLINK creates a symbolic link
 Thomas> $(@D)/build/configure -> $(@D)/configure for each build step of
 Thomas> gcc. However, it was only using 'ln -s' and not 'ln -sf', which was
 Thomas> causing problems when doing 'make host-gcc-final-reconfigure' for
 Thomas> example, because the configure commands (including this macro) are
 Thomas> being re-executed, but the symbolic link already exists.

 Thomas> Changing this symbolic link creation to 'ln -sf' fixes this problem.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support Thomas Petazzoni
@ 2013-09-15 21:25   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:25 UTC (permalink / raw)
  To: buildroot

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

 Thomas> This commit refactors how Stack Smashing Protection support is handled
 Thomas> in Buildroot:

 Thomas>  *) It turns the BR2_TOOLCHAIN_BUILDROOT_USE_SSP option into an option
 Thomas>     that only enables the SSP support in uClibc, when using the internal
 Thomas>     toolchain backend.

 Thomas>  *) It adds an hidden BR2_TOOLCHAIN_HAS_SSP option that gets enabled
 Thomas>     when the toolchain has SSP support. Here we have the usual dance:
 Thomas>     glibc/eglibc in internal/external backend always select this
 Thomas>     option, in the case of uClibc/internal, it gets selected when
 Thomas>     BR2_TOOLCHAIN_BUILDROOT_USE_SSP is enabled, in the case of
 Thomas>     uClibc/external, there is a new configuration option that the user
 Thomas>     must select (or not) depending on whether the toolchain has SSP
 Thomas>     support.

 Thomas>  *) It adds a new options BR2_ENABLE_SSP in the "Build options" menu,
 Thomas>     to enable the usage of SSP support, by adding
 Thomas>     -fstack-protector-all to the CFLAGS.

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in Thomas Petazzoni
@ 2013-09-15 21:25   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:25 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The only remaining thing in toolchain-buildroot/Config.in.2 is the
 Thomas> inclusion of the elf2flt option. It doesn't really make sense to have
 Thomas> a separate Config.in file for that, so let's move this to
 Thomas> toolchain-buildroot/Config.in.

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support Thomas Petazzoni
@ 2013-09-15 21:28   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:28 UTC (permalink / raw)
  To: buildroot

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

 Thomas> The mudflap library is only useful if one uses the -fmudflap gcc
 Thomas> option, to do more checks on pointers/arrays. This commit adds an
 Thomas> option to enable/disable mudflap support at the gcc level. By default,
 Thomas> it is disabled, which saves a little bit of build time compared to the
 Thomas> default of gcc which consists in enabling mudflap support.

 Thomas> Since mudflap is now disabled by default, and ensured to be enabled on

.. and ensure to NEVER be enabled on

 Thomas> some platforms where it is not available, some gcc.mk code that was

I dropped 'some'.

 Thomas> +
 Thomas> +config BR2_GCC_ENABLE_LIBMUDFLAP
 Thomas> +	bool "Enable libmudflap support"
 Thomas> +	# There are architectures, or specific configurations for
 Thomas> +	# which mudflap is not supported.
 Thomas> +	depends on !BR2_avr32 && !BR2_bfin && !BR2_ARM_INSTRUCTIONS_THUMB &&!BR2_powerpc_SPE

Space missing before !BR2_powerpc_SPE

Committed with this fixed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains Thomas Petazzoni
@ 2013-09-15 21:32   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:32 UTC (permalink / raw)
  To: buildroot

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

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

 Thomas> diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
 Thomas> index 11edc98..9c5d93c 100644
 Thomas> --- a/toolchain/toolchain-external/Config.in
 Thomas> +++ b/toolchain/toolchain-external/Config.in
 Thomas> @@ -3,8 +3,8 @@ if BR2_TOOLCHAIN_EXTERNAL
 Thomas>  choice
 Thomas>  	prompt "Toolchain"
 
 Thomas> -config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
 Thomas> -	bool "Linaro 2013.06"
 Thomas> +config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_08
 Thomas> +	bool "Linaro 2013.08"
 Thomas>  	depends on BR2_arm
 Thomas>  	depends on BR2_GCC_TARGET_ARCH = "armv7-a"
 Thomas>  	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 Thomas> @@ -15,16 +15,17 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_2013_06
 Thomas>  	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 Thomas>  	help
 Thomas>  	  Linaro toolchain for the ARM architecture. It uses Linaro
 Thomas> -	  GCC 2013.06 (based on gcc 4.8), Linaro GDB 2013.06 (based on
 Thomas> -	  GDB 7.6), eglibc 2.15. It generates code that runs on all
 Thomas> -	  Cortex-A profile devices, but tuned for the Cortex-A9. The
 Thomas> -	  code generated is Thumb 2, with the hard floating point
 Thomas> -	  calling convention, and uses the VFPv3-D16 FPU instructions.
 Thomas> +	  GCC 2013.08 (based on gcc 4.8), Linaro GDB 2013.05 (based on
 Thomas> +	  GDB 7.6), eglibc 2.17, Binutils 2013.06 (based on 2.23). It
 Thomas> +	  generates code that runs on all Cortex-A profile devices,
 Thomas> +	  but tuned for the Cortex-A9. The code generated is Thumb 2,
 Thomas> +	  with the hard floating point calling convention, and uses
 Thomas> +	  the VFPv3-D16 FPU instructions.

Not a problem with this change - But hmm, did 2013.06 reall use a newer
gdb version than 2013.08? Not as far as I can see on:

http://www.linaro.org/downloads/1306

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 external toolchains
  2013-09-02 16:06 ` [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 " Thomas Petazzoni
@ 2013-09-15 21:32   ` Peter Korsgaard
  0 siblings, 0 replies; 33+ messages in thread
From: Peter Korsgaard @ 2013-09-15 21:32 UTC (permalink / raw)
  To: buildroot

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

 Thomas> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-15 21:07   ` Peter Korsgaard
@ 2013-09-16 15:38     ` Thomas Petazzoni
  2013-09-16 15:53       ` Samuel Martin
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-16 15:38 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Sun, 15 Sep 2013 23:07:04 +0200, Peter Korsgaard wrote:

> I wonder if we shouldn't deprecate fortran (and objc) support and get
> rid of them. Is there really a use case for them? Any interesting sw
> that needs them?

I have no idea. I believe Objective-C is completely useless. However, I
believe Fortran *might* be useful for some scientific applications that
could be used on embedded devices. But the fact that no-one ever
complained about our Fortran support being broken (the runtime library
was never copied to the target) is a fairly strong indication that
nobody is using this.

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-16 15:38     ` Thomas Petazzoni
@ 2013-09-16 15:53       ` Samuel Martin
  2013-09-16 16:02         ` Thomas Petazzoni
  0 siblings, 1 reply; 33+ messages in thread
From: Samuel Martin @ 2013-09-16 15:53 UTC (permalink / raw)
  To: buildroot

Thomas, Peter,


2013/9/16 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

> Dear Peter Korsgaard,
>
> On Sun, 15 Sep 2013 23:07:04 +0200, Peter Korsgaard wrote:
>
> > I wonder if we shouldn't deprecate fortran (and objc) support and get
> > rid of them. Is there really a use case for them? Any interesting sw
> > that needs them?
>
> I have no idea. I believe Objective-C is completely useless. However, I
> believe Fortran *might* be useful for some scientific applications that
> could be used on embedded devices. But the fact that no-one ever
> complained about our Fortran support being broken (the runtime library
> was never copied to the target) is a fairly strong indication that
> nobody is using this.
>
I confirm.
I have not checked recently, but few versions ago, fortan was needed to
build opencv.


Regards,


-- 
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130916/87308e0c/attachment.html>

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-16 15:53       ` Samuel Martin
@ 2013-09-16 16:02         ` Thomas Petazzoni
  2013-09-16 16:21           ` Samuel Martin
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Petazzoni @ 2013-09-16 16:02 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Mon, 16 Sep 2013 17:53:53 +0200, Samuel Martin wrote:

> > I have no idea. I believe Objective-C is completely useless. However, I
> > believe Fortran *might* be useful for some scientific applications that
> > could be used on embedded devices. But the fact that no-one ever
> > complained about our Fortran support being broken (the runtime library
> > was never copied to the target) is a fairly strong indication that
> > nobody is using this.
> >
> I confirm.
> I have not checked recently, but few versions ago, fortan was needed to
> build opencv.

Doh? Where is this information coming from? There might be a Fortran
API to OpenCV, but I really doubt that Fortran is a requirement to
build OpenCV, because we don't enable Fortran in any of our
configurations, and still OpenCV builds fine.

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

* [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support
  2013-09-16 16:02         ` Thomas Petazzoni
@ 2013-09-16 16:21           ` Samuel Martin
  0 siblings, 0 replies; 33+ messages in thread
From: Samuel Martin @ 2013-09-16 16:21 UTC (permalink / raw)
  To: buildroot

2013/9/16 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

> Dear Samuel Martin,
>
> On Mon, 16 Sep 2013 17:53:53 +0200, Samuel Martin wrote:
>
> > > I have no idea. I believe Objective-C is completely useless. However, I
> > > believe Fortran *might* be useful for some scientific applications that
> > > could be used on embedded devices. But the fact that no-one ever
> > > complained about our Fortran support being broken (the runtime library
> > > was never copied to the target) is a fairly strong indication that
> > > nobody is using this.
> > >
> > I confirm.
> > I have not checked recently, but few versions ago, fortan was needed to
> > build opencv.
>
> Doh? Where is this information coming from? There might be a Fortran
> API to OpenCV, but I really doubt that Fortran is a requirement to
> build OpenCV, because we don't enable Fortran in any of our
> configurations, and still OpenCV builds fine.
>

Well, after checking, fortran seems not need anymore to build opencv, for
at least 2 years...


-- 
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130916/4bc65e0c/attachment-0001.html>

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

end of thread, other threads:[~2013-09-16 16:21 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 16:06 [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni
2013-09-02 16:06 ` [Buildroot] [PATCHv2 01/14] package/Makefile.in: fix incorrect comment Thomas Petazzoni
2013-09-02 16:06 ` [Buildroot] [PATCHv2 02/14] eglibc: libstdc++ is not part of the C library Thomas Petazzoni
2013-09-15 21:05   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 03/14] toolchain-internal: skip gcc-intermediate when possible Thomas Petazzoni
2013-09-15 21:05   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 04/14] gcc: fix Fortran support Thomas Petazzoni
2013-09-15 21:07   ` Peter Korsgaard
2013-09-16 15:38     ` Thomas Petazzoni
2013-09-16 15:53       ` Samuel Martin
2013-09-16 16:02         ` Thomas Petazzoni
2013-09-16 16:21           ` Samuel Martin
2013-09-02 16:06 ` [Buildroot] [PATCHv2 05/14] gcc: fix Objective-C support Thomas Petazzoni
2013-09-15 21:07   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 06/14] gcc: move C++ support option next to Fortran/Objective-C Thomas Petazzoni
2013-09-15 21:07   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 07/14] toolchain: add support for glibc Thomas Petazzoni
2013-09-15 21:07   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 08/14] gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro Thomas Petazzoni
2013-09-15 21:08   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 09/14] gcc: force symlink creation Thomas Petazzoni
2013-09-15 21:08   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 10/14] toolchain: refactor Stack Smashing Protection support Thomas Petazzoni
2013-09-15 21:25   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 11/14] toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in Thomas Petazzoni
2013-09-15 21:25   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 12/14] gcc: provide option to enable mudflap support Thomas Petazzoni
2013-09-15 21:28   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 13/14] toolchain: update Linaro ARM external toolchains Thomas Petazzoni
2013-09-15 21:32   ` Peter Korsgaard
2013-09-02 16:06 ` [Buildroot] [PATCHv2 14/14] toolchain: update Linaro AArch64 " Thomas Petazzoni
2013-09-15 21:32   ` Peter Korsgaard
2013-09-15 19:20 ` [Buildroot] [PATCHv2 00/14] Toolchain updates and improvements Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox