Skip to contentSkip to conversation

Toolchain updates and improvements

PATCH Superseded Thomas Petazzoni 3 participants 33 messages Sep 2, 2013 – Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

v2 cover Toolchain updates and improvements

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
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH v2 1/14 package/Makefile.in: fix incorrect comment

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

---
 package/Makefile.in | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
package/Makefile.in +1 -2
index 91ae1b9..0b1c33a 100644
@@ -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
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH v2 2/14 eglibc: libstdc++ is not part of the C library

In reply to Thomas Petazzoni

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.

---
 package/eglibc/eglibc.mk | 7 -------
 1 file changed, 7 deletions(-)
package/eglibc/eglibc.mk +0 -7
index 8873a06..fe12299 100644
@@ -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))
Signature · 1 line
1.8.1.2
#3 lore raw

PATCH v2 2/14 eglibc: libstdc++ is not part of the C library

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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 <[email protected]>

Committed, thanks.

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

PATCH v2 3/14 toolchain-internal: skip gcc-intermediate when possible

In reply to Thomas Petazzoni

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.

---
 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(-)
package/eglibc/eglibc.mk +3 -2
index fe12299..0ed908d 100644
@@ -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
 
package/gcc/Config.in.host +11 -0
index a6acaa2..7e6df2d 100644
@@ -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
package/gcc/gcc-initial/gcc-initial.mk +8 -0
index e468419..c3ab1ce 100644
@@ -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))
package/uclibc/Config.in +1 -0
index 92e04e9..037ca01 100644
@@ -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
package/uclibc/uclibc.mk +3 -2
index 39877bb..181a772 100644
@@ -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.
toolchain/Config.in +9 -0
index 53d2573..64cdf81 100644
@@ -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
Signature · 1 line
1.8.1.2
#5 lore raw

PATCH v2 3/14 toolchain-internal: skip gcc-intermediate when possible

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 4/14 gcc: fix Fortran support

In reply to Thomas Petazzoni

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.

---
 package/gcc/Config.in.host         | 8 ++++----
 package/gcc/gcc-final/gcc-final.mk | 6 +++++-
 2 files changed, 9 insertions(+), 5 deletions(-)
package/gcc/Config.in.host +4 -4
index 7e6df2d..b440ee2 100644
@@ -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
package/gcc/gcc-final/gcc-final.mk +5 -1
index b62dfe2..15adadd 100644
@@ -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
Signature · 1 line
1.8.1.2
#7 lore raw

PATCH v2 4/14 gcc: fix Fortran support

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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?

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

PATCH v2 4/14 gcc: fix Fortran support

Dear Peter Korsgaard,

Quoted 3 lines · Peter Korsgaard

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

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

PATCH v2 4/14 gcc: fix Fortran support

Thomas, Peter,

2013/9/16 Thomas Petazzoni <[email protected]>

Quoted 8 lines

Dear Peter Korsgaard,

Quoted 3 lines · Peter Korsgaard

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?

Quoted 7 lines

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,

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130916/87308e0c/attachment.html>
#10 lore raw

PATCH v2 4/14 gcc: fix Fortran support

Dear Samuel Martin,

Quoted 10 lines · Samuel Martin
Quoted 7 lines

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

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

PATCH v2 4/14 gcc: fix Fortran support

2013/9/16 Thomas Petazzoni <[email protected]>

Quoted 11 lines

Dear Samuel Martin,

Quoted 7 lines · Samuel Martin
Quoted 7 lines

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.

Quoted 9 lines
Quoted 3 lines

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

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130916/4bc65e0c/attachment-0001.html>
#12 lore raw

PATCH v2 5/14 gcc: fix Objective-C support

In reply to Thomas Petazzoni

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.

---
 package/gcc/Config.in.host         | 6 ++++--
 package/gcc/gcc-final/gcc-final.mk | 6 +++++-
 2 files changed, 9 insertions(+), 3 deletions(-)
package/gcc/Config.in.host +4 -2
index b440ee2..a7dbbb6 100644
@@ -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"
package/gcc/gcc-final/gcc-final.mk +5 -1
index 15adadd..b7efd67 100644
@@ -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
Signature · 1 line
1.8.1.2
#13 lore raw

PATCH v2 5/14 gcc: fix Objective-C support

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 6/14 gcc: move C++ support option next to Fortran/Objective-C

In reply to Thomas Petazzoni

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.

---
 package/gcc/Config.in.host                | 13 +++++++++++++
 toolchain/toolchain-buildroot/Config.in.2 | 13 -------------
 2 files changed, 13 insertions(+), 13 deletions(-)
package/gcc/Config.in.host +13 -0
index a7dbbb6..dbf0f20 100644
@@ -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
toolchain/toolchain-buildroot/Config.in.2 +0 -13
index bf27e6b..1371c31 100644
@@ -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
Signature · 1 line
1.8.1.2
#15 lore raw

PATCH v2 6/14 gcc: move C++ support option next to Fortran/Objective-C

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 7/14 toolchain: add support for glibc

In reply to Thomas Petazzoni

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.

---
 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%)
package/gcc/Config.in.host +1 -1
index dbf0f20..111da3b 100644
@@ -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
package/gcc/gcc-final/gcc-final.mk +2 -2
index b7efd67..d817de4 100644
@@ -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
package/glibc/glibc.mk renamed from package/eglibc/eglibc.mk +38 -24

103 lines not on this page · raw message

toolchain/toolchain-buildroot/Config.in +23 -1
index 7a26441..060b494 100644
@@ -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"
 
Signature · 1 line
1.8.1.2
#17 lore raw

PATCH v2 7/14 toolchain: add support for glibc

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 8/14 gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro

In reply to Thomas Petazzoni

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.

---
 package/gcc/gcc-final/gcc-final.mk | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
package/gcc/gcc-final/gcc-final.mk +1 -6
index d817de4..14ec06a 100644
@@ -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
Signature · 1 line
1.8.1.2
#19 lore raw

PATCH v2 8/14 gcc/gcc-final: use the common HOST_GCC_CONFIGURE_SYMLINK macro

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 9/14 gcc: force symlink creation

In reply to Thomas Petazzoni

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.

---
 package/gcc/gcc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/gcc.mk +1 -1
index cd6efed..20d6d14 100644
@@ -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
 
 #
Signature · 1 line
1.8.1.2
#21 lore raw

PATCH v2 9/14 gcc: force symlink creation

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 10/14 toolchain: refactor Stack Smashing Protection support

In reply to Thomas Petazzoni

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.

---
 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(-)
Config.in +17 -0
index cb246a4..8046d6e 100644
@@ -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
package/Makefile.in +1 -1
index 0b1c33a..3eaa2b2 100644
@@ -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
package/psmisc/psmisc.mk +2 -2
index 1340ee6..c18ba94 100644
@@ -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
 
package/uclibc/Config.in +10 -0
index 037ca01..eeb3b83 100644
@@ -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
toolchain/Config.in +1 -0
index 64cdf81..da9cd68 100644
@@ -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
toolchain/helpers.mk +2 -1
index 44b6018..0e270ee 100644
@@ -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
toolchain/toolchain-buildroot/Config.in.2 +0 -9
index 1371c31..df26079 100644
@@ -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
toolchain/toolchain-common.in +3 -0
index dc3bd2a..1085fb3 100644
@@ -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
toolchain/toolchain-external/Config.in +9 -0
index ad1f203..11edc98 100644
@@ -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
Signature · 1 line
1.8.1.2
#23 lore raw

PATCH v2 10/14 toolchain: refactor Stack Smashing Protection support

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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 <[email protected]>

Committed, thanks.

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

PATCH v2 11/14 toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in

In reply to Thomas Petazzoni

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.

---
 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
toolchain/Config.in +0 -1
index da9cd68..51c83d9 100644
@@ -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
toolchain/toolchain-buildroot/Config.in +1 -0
index 060b494..0ebbd6c 100644
@@ -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
toolchain/toolchain-buildroot/Config.in.2 deleted +0 -9
deleted file mode 100644
index df26079..0000000
@@ -1,9 +0,0 @@
-# Buildroot backend specific options
-
-if BR2_TOOLCHAIN_BUILDROOT
-
-comment "Toolchain Options"
-
-source "package/elf2flt/Config.in.host"
-
-endif
Signature · 1 line
1.8.1.2
#25 lore raw

PATCH v2 11/14 toolchain: move elf2flt option inclusion to toolchain-buildroot/Config.in

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 12/14 gcc: provide option to enable mudflap support

In reply to Thomas Petazzoni

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.

---
 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(-)
package/gcc/Config.in.host +15 -0
index 111da3b..d6c568d 100644
@@ -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.
package/gcc/gcc-final/gcc-final.mk +8 -0
index 14ec06a..58c84ab 100644
@@ -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
package/gcc/gcc.mk +7 -17
index 20d6d14..58eae30 100644
@@ -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
Signature · 1 line
1.8.1.2
#27 lore raw

PATCH v2 12/14 gcc: provide option to enable mudflap support

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 13/14 toolchain: update Linaro ARM external toolchains

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/Config.in   | 49 +++++++++++++++++---------------
 toolchain/toolchain-external/ext-tool.mk | 12 ++++----
 2 files changed, 32 insertions(+), 29 deletions(-)
toolchain/toolchain-external/Config.in +26 -23
index 11edc98..9c5d93c 100644
@@ -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
toolchain/toolchain-external/ext-tool.mk +6 -6
index 38f6e22..56b836a 100644
@@ -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
Signature · 1 line
1.8.1.2
#29 lore raw

PATCH v2 13/14 toolchain: update Linaro ARM external toolchains

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Thomas> Signed-off-by: Thomas Petazzoni <[email protected]> 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.

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

PATCH v2 14/14 toolchain: update Linaro AArch64 external toolchains

In reply to Thomas Petazzoni
---
 toolchain/toolchain-external/Config.in   | 14 +++++++-------
 toolchain/toolchain-external/ext-tool.mk | 12 ++++++------
 2 files changed, 13 insertions(+), 13 deletions(-)
toolchain/toolchain-external/Config.in +7 -7
index 9c5d93c..36587b5 100644
@@ -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
toolchain/toolchain-external/ext-tool.mk +6 -6
index 56b836a..a96ca06 100644
@@ -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)))
Signature · 1 line
1.8.1.2
#31 lore raw

PATCH v2 14/14 toolchain: update Linaro AArch64 external toolchains

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

Thomas> Signed-off-by: Thomas Petazzoni <[email protected]>

Committed, thanks.

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

v2 cover Toolchain updates and improvements

In reply to Thomas Petazzoni

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

Quoted 79 lines · Thomas Petazzoni

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