Skip to contentSkip to conversation

Add gcc version dependency mechanism

PATCH New Thomas Petazzoni 3 participants 28 messages Aug 4, 2015 – Aug 12, 2015 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover Add gcc version dependency mechanism

Hello,

We are getting more and more packages that use C11 or C++11 support, or otherwise have some dependency on features available only since certain gcc versions.

While doing dependencies on the features themselves (like C++11 support, or C11 support) would be better, it is actually not very
practical: C++11 support has only been gradually introduced in gcc. So while a certain version of gcc may have sufficient C++11 support for a given package, it may not be the case for another package using more advanced C++11 features, supported only in a later gcc version. Since we don't want to add gazillions of gcc feature options, let's support this by using gcc versions instead.

The patches are fairly straightforward and follow to the letter the version dependency mechanism used for kernel headers.

The first four patches introduce the gcc version dependency mechanism itself, the fifth patch solves the libsigrok build failures currently affecting the autobuilders, and the last four patches refactor existing packages to use the gcc version dependency mechanism.

This set of patches is also available at:

http://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=gcc-version

Thanks!

Thomas

Thomas Petazzoni (9):
toolchain: add common gcc version hidden config options
gcc: select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option
toolchain-external: add support for gcc version dependency docs/manual: document gcc version dependencies
libsigrok: depends on gcc >= 4.7
upmpdcli: update to use the gcc version dependency mechanism
zmqpp: update to use the gcc version dependency mechanism
libupnpp: update to use the gcc version dependency mechanism
mpd: update to use the gcc version dependency mechanism

 docs/manual/adding-packages-directory.txt          |  6 ++
 package/gcc/Config.in.host                         |  7 +++
 package/libsigrok/Config.in                        | 11 ++--
 package/libupnpp/Config.in                         | 11 +---
 package/mpd/Config.in                              |  9 +--
 package/pulseview/Config.in                        |  9 +--
 package/sigrok-cli/Config.in                       |  6 +-
 package/upmpdcli/Config.in                         | 15 +----
 package/zmqpp/Config.in                            | 11 ++--
 toolchain/helpers.mk                               | 22 +++++++
 toolchain/toolchain-common.in                      | 44 ++++++++++++++
 toolchain/toolchain-external/Config.in             | 70 ++++++++++++++++++++++
 toolchain/toolchain-external/toolchain-external.mk |  2 +
 13 files changed, 175 insertions(+), 48 deletions(-)
Signature · 1 line
2.5.0
#1 lore raw

PATCH 1/9 toolchain: add common gcc version hidden config options

This commit adds a number of hidden Config.in options, that will be used to handle dependencies on the gcc version. We mimic the model that was used for the kernel headers dependency mechanism.

These hidden options will be selected by the internal and external toolchain backend logic respectively, in follow-up commits.

---
 toolchain/toolchain-common.in | 44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
toolchain/toolchain-common.in +44 -0
index b7a11a4..4be55c3 100644
@@ -254,3 +254,47 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST
 	default "3.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 	default "3.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 	default "2.6"
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+	bool
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+# This order guarantees that the highest version is set, as kconfig
+# stops affecting a value on the first matching default.
+config BR2_TOOLCHAIN_GCC_AT_LEAST
+	string
+	default "5"	if BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	default "4.9"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	default "4.8"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	default "4.7"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	default "4.6"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+	default "4.5"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	default "4.4"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+	default "4.3"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
Signature · 1 line
2.5.0
#2 lore raw

PATCH 1/9 toolchain: add common gcc version hidden config options

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 8 lines

This commit adds a number of hidden Config.in options, that will be used to handle dependencies on the gcc version. We mimic the model that was used for the kernel headers dependency mechanism.

These hidden options will be selected by the internal and external toolchain backend logic respectively, in follow-up commits.

Regards,
Yann E. MORIN.

Quoted 63 lines
---
 toolchain/toolchain-common.in | 44 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
toolchain/toolchain-common.in +44 -0
index b7a11a4..4be55c3 100644
@@ -254,3 +254,47 @@ config BR2_TOOLCHAIN_HEADERS_AT_LEAST
 	default "3.1"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 	default "3.0"  if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
 	default "2.6"
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+	bool
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+config BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+# This order guarantees that the highest version is set, as kconfig
+# stops affecting a value on the first matching default.
+config BR2_TOOLCHAIN_GCC_AT_LEAST
+	string
+	default "5"	if BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	default "4.9"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	default "4.8"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	default "4.7"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	default "4.6"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+	default "4.5"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	default "4.4"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+	default "4.3"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
Signature · 6 lines
2.5.0

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

PATCH 2/9 gcc: select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option

In reply to Thomas Petazzoni

This commit wires up the gcc version dependency mechanism in the internal toolchain backend by making the gcc version choice in the gcc package Config.in.host select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option.

---
 package/gcc/Config.in.host | 7 +++++++
 1 file changed, 7 insertions(+)
package/gcc/Config.in.host +7 -0
index 93c9032..baa7956 100644
@@ -34,6 +34,7 @@ choice
 		# musl patches only for gcc 4.7+
 		depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 
 	config BR2_GCC_VERSION_4_7_X
 		bool "gcc 4.7.x"
@@ -50,6 +51,7 @@ choice
 		# Broken or unsupported x86 cores
 		depends on !BR2_x86_jaguar && !BR2_x86_steamroller
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 
 	config BR2_GCC_VERSION_4_8_X
 		bool "gcc 4.8.x"
@@ -64,12 +66,15 @@ choice
 		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X)
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
 	config BR2_GCC_VERSION_4_8_ARC
 		bool "gcc 4.8-arc"
 		# Only supported architecture
 		depends on BR2_arc
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 
 	config BR2_GCC_VERSION_4_9_X
 		bool "gcc 4.9.x"
@@ -78,6 +83,7 @@ choice
 		# PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 	config BR2_GCC_VERSION_5_X
 		bool "gcc 5.x"
@@ -85,6 +91,7 @@ choice
 		depends on !BR2_arc
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_5
 
 endchoice
 
Signature · 1 line
2.5.0
#4 lore raw

PATCH 2/9 gcc: select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 6 lines

This commit wires up the gcc version dependency mechanism in the internal toolchain backend by making the gcc version choice in the gcc package Config.in.host select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option.

Regards,
Yann E. MORIN.

Quoted 63 lines
---
 package/gcc/Config.in.host | 7 +++++++
 1 file changed, 7 insertions(+)
package/gcc/Config.in.host +7 -0
index 93c9032..baa7956 100644
@@ -34,6 +34,7 @@ choice
 		# musl patches only for gcc 4.7+
 		depends on !BR2_TOOLCHAIN_BUILDROOT_MUSL
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 
 	config BR2_GCC_VERSION_4_7_X
 		bool "gcc 4.7.x"
@@ -50,6 +51,7 @@ choice
 		# Broken or unsupported x86 cores
 		depends on !BR2_x86_jaguar && !BR2_x86_steamroller
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 
 	config BR2_GCC_VERSION_4_8_X
 		bool "gcc 4.8.x"
@@ -64,12 +66,15 @@ choice
 		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X)
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
 	config BR2_GCC_VERSION_4_8_ARC
 		bool "gcc 4.8-arc"
 		# Only supported architecture
 		depends on BR2_arc
 		select BR2_GCC_NEEDS_MPC
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 
 	config BR2_GCC_VERSION_4_9_X
 		bool "gcc 4.9.x"
@@ -78,6 +83,7 @@ choice
 		# PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 	config BR2_GCC_VERSION_5_X
 		bool "gcc 5.x"
@@ -85,6 +91,7 @@ choice
 		depends on !BR2_arc
 		select BR2_GCC_NEEDS_MPC
 		select BR2_GCC_SUPPORTS_GRAPHITE
+		select BR2_TOOLCHAIN_GCC_AT_LEAST_5
 
 endchoice
 
Signature · 6 lines
2.5.0

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

PATCH 3/9 toolchain-external: add support for gcc version dependency

In reply to Thomas Petazzoni

This commit wires up the gcc version dependency mechanism in the external toolchain backend. To do so, it:

* Changes the definition of all pre-defined external toolchain profiles to select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option.

* For custom external toolchains, provides a visible Config.in "choice" to select the gcc version used in the external toolchain.

* Adds a new check_gcc_version function, that verifies that the real gcc version found in the external toolchain matches the one declared in the Buildroot configuration.

---
 toolchain/helpers.mk                               | 22 +++++++
 toolchain/toolchain-external/Config.in             | 70 ++++++++++++++++++++++
 toolchain/toolchain-external/toolchain-external.mk |  2 +
 3 files changed, 94 insertions(+)
toolchain/helpers.mk +22 -0
index 895f3f1..038939c 100644
@@ -175,6 +175,28 @@ check_kernel_headers_version = \
 	fi
 
 #
+# Check the specific gcc version actually matches the version in the
+# toolchain
+#
+# $1: path to gcc
+# $2: expected gcc version
+#
+# The first 'sed' removes everything but the last word of the line,
+# which contains the gcc version.
+#
+# The second 'sed' removes the last digit of the version (i.e 4.9.3
+# becomes 4.9 and 5.1 becomes 5), which allows to match on the gcc
+# major version only.
+#
+check_gcc_version = \
+	expected_version="$(strip $2)" ; \
+	real_version=`$(1) --version | head -1 | sed 's%.* %%g' | sed 's%\(.*\)\.[0-9]%\1%'` ; \
+	if [ "$${real_version}" != "$${expected_version}" ] ; then \
+		echo "Incorrect selection of gcc version: expected $${expected_version}, got $${real_version}" ; \
+		exit 1 ; \
+	fi
+
+#
 # Check the availability of a particular glibc feature. This function
 # is used to check toolchain options that are always supported by
 # glibc, so we simply check that the corresponding option is properly
toolchain/toolchain-external/Config.in +70 -0

250 lines not on this page · raw message

toolchain/toolchain-external/toolchain-external.mk +2 -0
index 5ce4d33..3cb59c6 100644
@@ -473,6 +473,8 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
 	$(call check_kernel_headers_version,\
 		$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
 		$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
+	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
+		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
 	if test "$(BR2_arm)" = "y" ; then \
 		$(call check_arm_abi,\
 			"$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
Signature · 1 line
2.5.0
#6 lore raw

PATCH 3/9 toolchain-external: add support for gcc version dependency

Thomas, all,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 27 lines

This commit wires up the gcc version dependency mechanism in the external toolchain backend. To do so, it:

* Changes the definition of all pre-defined external toolchain profiles to select the appropriate BR2_TOOLCHAIN_GCC_AT_LEAST_* option.

* For custom external toolchains, provides a visible Config.in "choice" to select the gcc version used in the external toolchain.

* Adds a new check_gcc_version function, that verifies that the real gcc version found in the external toolchain matches the one declared in the Buildroot configuration.

---
 toolchain/helpers.mk                               | 22 +++++++
 toolchain/toolchain-external/Config.in             | 70 ++++++++++++++++++++++
 toolchain/toolchain-external/toolchain-external.mk |  2 +
 3 files changed, 94 insertions(+)
toolchain/helpers.mk +0 -0
index 895f3f1..038939c 100644
@@ -175,6 +175,28 @@ check_kernel_headers_version = \
 	fi

toolchain/helpers.mk check_kernel_headers_version = \ · line 185

Quoted 10 lines
toolchain/helpers.mk +8 -0
 
 #
+# Check the specific gcc version actually matches the version in the
+# toolchain
+#
+# $1: path to gcc
+# $2: expected gcc version
+#
+# The first 'sed' removes everything but the last word of the line,
+# which contains the gcc version.

That's not true for the BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 toolchain:

    $ ./host/opt/ext-toolchain/bin/aarch64-linux-gnu-gcc --version
    aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 -
    Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)

Here's a better sed-expr that should match it too, as well as the other gcc versions; we'll make the assumption that the version string is right after the first closing parenthesis:

    sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$//;'

Explanations;

- 1!d
- delete if not line 1 (i.e. your 'head -n1')

- s/^[^)]+\) ([^[:space:]]+).*/\1/
- eat all until the first ')' character followed by a space
- match as many non-space chars as possible
- eat all the remaining chars on the line
- replace by the matched expression

- s/\.[[:digit:]]+$//
- eat a dot followed by as many digits as possible up to the end of line
- replace with nothing

Notes:
- it's an extended regexp, because [...] is not valid in a standard

    regexp, and doing without it is much more complex;

- it's a single sed invocation, no need for head or many sed calls.

Regards,
Yann E. MORIN.

Quoted 320 lines
toolchain/helpers.mk +13 -0
+# The second 'sed' removes the last digit of the version (i.e 4.9.3
+# becomes 4.9 and 5.1 becomes 5), which allows to match on the gcc
+# major version only.
+#
+check_gcc_version = \
+	expected_version="$(strip $2)" ; \
+	real_version=`$(1) --version | head -1 | sed 's%.* %%g' | sed 's%\(.*\)\.[0-9]%\1%'` ; \
+	if [ "$${real_version}" != "$${expected_version}" ] ; then \
+		echo "Incorrect selection of gcc version: expected $${expected_version}, got $${real_version}" ; \
+		exit 1 ; \
+	fi
+
+#
 # Check the availability of a particular glibc feature. This function
 # is used to check toolchain options that are always supported by
 # glibc, so we simply check that the corresponding option is properly
toolchain/toolchain-external/Config.in +70 -0
index e70989e..310ea99 100644
@@ -18,6 +18,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
 	  GCC 2014.09 (based on gcc 4.9), Linaro GDB 2013.10 (based on
@@ -44,6 +45,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  Linaro toolchain for the ARM big endian architecture. It
 	  uses Linaro GCC 2014.09 (based on gcc 4.9), Linaro GDB
@@ -69,6 +71,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201405
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
 	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
@@ -98,6 +101,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201311
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
 	  Mentor Graphics. It uses gcc 4.8.1, binutils 2.23.52, glibc
@@ -126,6 +130,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM201305
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
 	  Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52, glibc
@@ -159,6 +164,7 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A_201109
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	# kernel headers: 2.6.31
 	help
 	  Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3,
@@ -181,6 +187,7 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE_201109
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	# kernel headers: 2.6.31
 	help
 	  Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc
@@ -199,6 +206,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201505
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
 	  Mentor Graphics. It uses gcc 4.9.2, binutils 2.24.51, glibc
@@ -284,6 +292,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201411
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
 	  Mentor Graphics. It uses gcc 4.9.1, binutils 2.24.51, glibc
@@ -369,6 +378,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
 	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
@@ -457,6 +467,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the Nios-II architecture,
 	  from Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51,
@@ -472,6 +483,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sourcery CodeBench toolchain for the Nios-II architecture,
 	  from Mentor Graphics. It uses gcc 4.7.3, binutils 2.23.52,
@@ -488,6 +500,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201203
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	help
 	  Sourcery CodeBench toolchain for the PowerPC architecture,
 	  from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53,
@@ -505,6 +518,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	# kernel headers: 2.6.38
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	help
 	  Sourcery CodeBench toolchain for the PowerPC architecture,
 	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20.51,
@@ -537,6 +551,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	# kernel headers: 2.6.35
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	help
 	  Sourcery CodeBench toolchain for the PowerPC architecture,
 	  from Mentor Graphics. It uses gcc 4.5.1, binutils 2.20,
@@ -569,6 +584,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201209
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
 	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
@@ -592,6 +608,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201203
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
 	  from Mentor Graphics. It uses gcc 4.6.3, binutils 2.21.53,
@@ -616,6 +633,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH201103
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	# kernel headers: 2.6.38
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
 	  from Mentor Graphics. It uses gcc 4.5.2, binutils 2.20,
@@ -641,6 +659,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64_201405
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the amd64 (x86_64)
 	  architectures, from Mentor Graphics. It uses gcc 4.8.3,
@@ -665,6 +684,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201209
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
 	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
@@ -692,6 +712,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201203
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
 	  architectures, from Mentor Graphics. It uses gcc 4.6.3,
@@ -720,6 +741,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201109
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
 	  architectures, from Mentor Graphics. It uses gcc 4.6.1,
@@ -748,6 +770,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 	help
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
@@ -764,6 +787,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 	help
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
@@ -780,6 +804,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 	help
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
@@ -794,6 +819,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 	help
 	  Toolchain for the AArch64 architecture, from
 	  http://www.linaro.org/engineering/armv8/
@@ -808,6 +834,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Sourcery CodeBench toolchain for the AArch64 architecture,
 	  from Mentor Graphics. It uses gcc 4.8.3, binutils 2.24,
@@ -823,6 +850,7 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	help
 	  Toolchain based on the Musl C library, provided by the
 	  musl-cross project. It uses gcc 4.9.2, binutils 2.25 and
@@ -849,6 +877,7 @@ config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC_2014_12
 	select BR2_TOOLCHAIN_HAS_THREADS
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	help
 	  Toolchain for the ARC cores, from
 	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
@@ -965,6 +994,47 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
+	bool "External toolchain gcc version"
+	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
+	help
+	  Set to the gcc version that is used by your external
+	  toolchain.
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_5
+	bool "5.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9
+	bool "4.9.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8
+	bool "4.8.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7
+	bool "4.7.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6
+	bool "4.6.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5
+	bool "4.5.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4
+	bool "4.4.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
+
+config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
+	bool "4.3.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+
+endchoice
+
+choice
 	bool "External toolchain kernel headers series"
 	default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD
 	help
toolchain/toolchain-external/toolchain-external.mk +2 -0
index 5ce4d33..3cb59c6 100644
@@ -473,6 +473,8 @@ define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
 	$(call check_kernel_headers_version,\
 		$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\
 		$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \
+	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
+		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
 	if test "$(BR2_arm)" = "y" ; then \
 		$(call check_arm_abi,\
 			"$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\
Signature · 6 lines
2.5.0

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

PATCH 3/9 toolchain-external: add support for gcc version dependency

Dear Yann E. MORIN,

Quoted 23 lines · Yann E. MORIN

That's not true for the BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 toolchain:

    $ ./host/opt/ext-toolchain/bin/aarch64-linux-gnu-gcc --version
    aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 -
    Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)

Here's a better sed-expr that should match it too, as well as the other gcc versions; we'll make the assumption that the version string is right after the first closing parenthesis:

    sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$//;'

Explanations;

- 1!d
- delete if not line 1 (i.e. your 'head -n1')

- s/^[^)]+\) ([^[:space:]]+).*/\1/
- eat all until the first ')' character followed by a space
- match as many non-space chars as possible
- eat all the remaining chars on the line
- replace by the matched expression

Quoted 4 lines

- s/\.[[:digit:]]+$//
- eat a dot followed by as many digits as possible up to the end of line
- replace with nothing

Thanks! I've used your regexp, and also copy/pasted your explanation into the code. I just had to replace $ by $$ to cope with make escaping.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH 3/9 toolchain-external: add support for gcc version dependency

Dear Thomas Petazzoni, Yann Y. Marin,

Quoted 37 lines · Thomas Petazzoni

Dear Yann E. MORIN,

Quoted 27 lines · Yann E. MORIN

That's not true for the BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 toolchain:

    $ ./host/opt/ext-toolchain/bin/aarch64-linux-gnu-gcc --version
    aarch64-linux-gnu-gcc (crosstool-NG linaro-1.13.1-4.9-2014.09 -
    Linaro GCC 4.9-2014.09) 4.9.2 20140904 (prerelease)

Here's a better sed-expr that should match it too, as well as the other
gcc versions; we'll make the assumption that the version string is right
after the first closing parenthesis:

    sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/; 

s/\.[[:digit:]]+$//;'

Explanations;

- 1!d
- delete if not line 1 (i.e. your 'head -n1')

- s/^[^)]+\) ([^[:space:]]+).*/\1/
- eat all until the first ')' character followed by a space
- match as many non-space chars as possible
- eat all the remaining chars on the line
- replace by the matched expression

Quoted 5 lines

- s/\.[[:digit:]]+$//
- eat a dot followed by as many digits as possible up to the
end
of line
- replace with nothing

Quoted 3 lines

Thanks! I've used your regexp, and also copy/pasted your explanation into the code. I just had to replace $ by $$ to cope with make escaping.

This regex does not produce the version string 5 for my GCC 5.2 toolchain built with BR and included as external toolchain.

$ output/host/usr/bin/arm-linux-gcc --version
    arm-linux-gcc (Buildroot 2015.08-rc1-01365-gec8cd42) 5.2.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There
    is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.
$ output/host/usr/bin/arm-linux-gcc --version | sed -r -e '1!d;
s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$$//;'
    5.2

Best regards
J?rg Krause

#9 lore raw

PATCH 3/9 toolchain-external: add support for gcc version dependency

Dear J?rg Krause,

Quoted 15 lines · J?rg Krause
Quoted 3 lines

Thanks! I've used your regexp, and also copy/pasted your explanation into the code. I just had to replace $ by $$ to cope with make escaping.

This regex does not produce the version string 5 for my GCC 5.2 toolchain built with BR and included as external toolchain.

$ output/host/usr/bin/arm-linux-gcc --version
    arm-linux-gcc (Buildroot 2015.08-rc1-01365-gec8cd42) 5.2.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There
    is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
    PURPOSE.
Quoted 3 lines
$ output/host/usr/bin/arm-linux-gcc --version | sed -r -e '1!d;
s/^[^)]+\) ([^[:space:]]+).*/\1/; s/\.[[:digit:]]+$$//;'
    5.2

Hum, that's because the version number if 5.2.0, and we're removing only one digit at the end. It's weird, because I'm pretty sure I tested with a gcc 5.x toolchain, and I remember it was working fine. But the version reported by gcc was 5.1, not 5.1.0.

Did maybe gcc 5.1 report 5.1, while gcc 5.2 reports 5.2.0 ?

If that's the case, then I don't see any other possibilities than having a different case for gcc 4.x and gcc >= 5.x.

Yann ?

Thanks for the report,

Thomas

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#12 lore raw

PATCH 3/9 toolchain-external: add support for gcc version dependency

Dear Carlos Santos,

Quoted 7 lines · Carlos Santos

The problem goes away if I add BR2_TOOLCHAIN_EXTERNAL_GCC_4_8=y to my custom defconfig. It was missing in the original file but the absence was harmless.

Anyone using an external toolchain will face the same problem, so I think it's important to emphasize the consequences of the change in the release notes.

There is no need for that, the error message tells you that the selection of the gcc version is incorrect. It is exactly the same sort of checks that is used to validate the selected C library, etc.

The mechanism to specify the gcc version has been added very recently, so that's why you're seeing the problem now.

If you hand-edit your defconfig, you're supposed to know what you're doing. Otherwise, 'make menuconfig' will show an option to select the gcc version used in your external toolchain.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#13 lore raw

PATCH 4/9 docs/manual: document gcc version dependencies

In reply to Thomas Petazzoni

This commit updates the Buildroot manual to document how to detail the gcc version dependencies in Config.in comments of packages, like we do for kernel headers version.

---
 docs/manual/adding-packages-directory.txt | 6 ++++++
 1 file changed, 6 insertions(+)
docs/manual/adding-packages-directory.txt +6 -0
index 8f585d4..b66e447 100644
@@ -277,6 +277,12 @@ use in the comment.
 ** Comment string: +headers >= X.Y+ and/or `headers <= X.Y` (replace
    +X.Y+ with the proper version)
 
+* GCC version
+** Dependency symbol: +BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +toolchain/toolchain-common.in+)
+** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
+   +X.Y+ with the proper version)
+
 * C library
 ** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+,
    +BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+
Signature · 1 line
2.5.0
#14 lore raw

PATCH 4/9 docs/manual: document gcc version dependencies

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 5 lines

This commit updates the Buildroot manual to document how to detail the gcc version dependencies in Config.in comments of packages, like we do for kernel headers version.

However, see a comment below...

Quoted 9 lines
---
 docs/manual/adding-packages-directory.txt | 6 ++++++
 1 file changed, 6 insertions(+)
docs/manual/adding-packages-directory.txt +0 -0
index 8f585d4..b66e447 100644

docs/manual/adding-packages-directory.txt use in the comment. · line 283

Quoted 7 lines
docs/manual/adding-packages-directory.txt +4 -0
@@ -277,6 +277,12 @@ use in the comment.
 ** Comment string: +headers >= X.Y+ and/or `headers <= X.Y` (replace
    +X.Y+ with the proper version)
 
+* GCC version
+** Dependency symbol: +BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +toolchain/toolchain-common.in+)
+** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace

One of the condition is between ++ and the other between ``. I konow you just replicated what was done for the kernel headers, but wuld it not be better to use only ++ (or only ``, I don't mind) but not both?

And fix the kernel one@the same time, maybe (or in a separate patch)?

Regards,
Yann E. MORIN.

Quoted 12 lines
docs/manual/adding-packages-directory.txt +2 -0
+   +X.Y+ with the proper version)
+
 * C library
 ** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+,
    +BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+
Signature · 6 lines
2.5.0

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

PATCH 4/9 docs/manual: document gcc version dependencies

Dear Yann E. MORIN,

Quoted 8 lines · Yann E. MORIN

docs/manual/adding-packages-directory.txt use in the comment. · line 283

Quoted 4 lines
docs/manual/adding-packages-directory.txt +4 -0
+* GCC version
+** Dependency symbol: +BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +toolchain/toolchain-common.in+)
+** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace

One of the condition is between ++ and the other between ``. I konow you just replicated what was done for the kernel headers, but wuld it not be better to use only ++ (or only ``, I don't mind) but not both?

There is actually a good reason for that: if you use +...+ for +gcc <= X.Y+, then the <= gets replaced by the <= mathematic character rather than being the two characters < and =.

So I've kept the special use of ... for the time being.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#16 lore raw

PATCH 4/9 docs/manual: document gcc version dependencies

Thomas, All,

On 2015-08-05 11:05 +0200, Thomas Petazzoni spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 8 lines

docs/manual/adding-packages-directory.txt use in the comment. · line 283

Quoted 4 lines
docs/manual/adding-packages-directory.txt +4 -0
+* GCC version
+** Dependency symbol: +BR2_TOOLCHAIN_GCC_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +toolchain/toolchain-common.in+)
+** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace

One of the condition is between ++ and the other between ``. I konow you just replicated what was done for the kernel headers, but wuld it not be better to use only ++ (or only ``, I don't mind) but not both?

Quoted 3 lines

There is actually a good reason for that: if you use +...+ for +gcc <= X.Y+, then the <= gets replaced by the <= mathematic character rather than being the two characters < and =.

Ah, right. Now I remember why they were different. Still, we should not mix the two possibilities, and just use `` since that's what works.

Quoted 1 line

So I've kept the special use of ... for the time being.

Yep, good.

I'll prepare a patch to fix that.

Regards,
Yann E. MORIN.

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

PATCH 5/9 libsigrok: depends on gcc >= 4.7

In reply to Thomas Petazzoni

Until recently, only the C++ bindings of libsigrok needed a recent compiler because they are written in C++11. However, now, libsigrok itself is written in C11, which is only available since gcc 4.7.

So, this commit replaces the CodeSourcery-specific exclusions by a proper dependency on gcc >= 4.7.

The sigrok-cli and pulseview packages, which select libsigrok, are also updated accordingly.

---
 package/libsigrok/Config.in  | 11 ++++-------
 package/pulseview/Config.in  |  9 +++------
 package/sigrok-cli/Config.in |  6 ++++--
 3 files changed, 11 insertions(+), 15 deletions(-)
package/libsigrok/Config.in +4 -7
index 8bd7d99..6ef3776 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSIGROK
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
+	# std=c11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Libsigrok is a shared library written in C, which provides
 	  the basic hardware access drivers for logic analyzers and
@@ -22,20 +24,15 @@ config BR2_PACKAGE_LIBSIGROKCXX
 	bool "build C++ bindings"
 	select BR2_PACKAGE_GLIBMM
 	depends on BR2_INSTALL_LIBSTDCPP
-	# CS powerpc g++ are too old. libsigrokcxx needs C++11
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	help
 	  Build libsigrok C++ bindings as well.
 
 comment "C++ bindings need a toolchain w/ C++"
 	depends on BR2_PACKAGE_LIBSIGROK
 	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 
 endif
 
-comment "libsigrok needs a toolchain w/ wchar, threads"
+comment "libsigrok needs a toolchain w/ wchar, threads, gcc >= 4.7"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
package/pulseview/Config.in +3 -6
index 2fb844b..e6ddc21 100644
@@ -17,18 +17,15 @@ config BR2_PACKAGE_PULSEVIEW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
 	# libsigrok
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  PulseView is a Qt based logic analyzer, oscilloscope
 	  and MSO GUI for sigrok.
 
 	  http://sigrok.org/wiki/PulseView
 
-comment "pulseview needs a toolchain w/ wchar, threads, C++"
+comment "pulseview needs a toolchain w/ wchar, threads, C++, gcc >= 4.7"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_QT5
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
package/sigrok-cli/Config.in +4 -2
index 4e7f137..b8eb60d 100644
@@ -5,12 +5,14 @@ config BR2_PACKAGE_SIGROK_CLI
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
+	# libsigrok
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sigrok-cli is a command-line frontend for the sigrok
 	  software suite.
 
 	  http://sigrok.org/wiki/Sigrok-cli
 
-comment "sigrok-cli needs a toolchain w/ wchar, threads"
+comment "sigrok-cli needs a toolchain w/ wchar, threads, gcc >= 4.7"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
Signature · 1 line
2.5.0
#18 lore raw

PATCH 5/9 libsigrok: depends on gcc >= 4.7

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 3 lines

Until recently, only the C++ bindings of libsigrok needed a recent compiler because they are written in C++11. However, now, libsigrok itself is written in C11, which is only available since gcc 4.7.

Here are a few autobuild failures for this: ;-)

    http://autobuild.buildroot.org/results/1d7/1d75497009f1e3b06236b3409fd768dcf7956b87/
    http://autobuild.buildroot.org/results/563/563378e3f6320980153c8c972ceba5e913fe933f/

With those added to the commit log;

Note that I have not even attempted to build it with a gcc-4.7 to validate. This is only a review...

Regards,
Yann E. MORIN.

Quoted 103 lines

So, this commit replaces the CodeSourcery-specific exclusions by a proper dependency on gcc >= 4.7.

The sigrok-cli and pulseview packages, which select libsigrok, are also updated accordingly.

---
 package/libsigrok/Config.in  | 11 ++++-------
 package/pulseview/Config.in  |  9 +++------
 package/sigrok-cli/Config.in |  6 ++++--
 3 files changed, 11 insertions(+), 15 deletions(-)
package/libsigrok/Config.in +4 -7
index 8bd7d99..6ef3776 100644
@@ -6,6 +6,8 @@ config BR2_PACKAGE_LIBSIGROK
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
+	# std=c11
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Libsigrok is a shared library written in C, which provides
 	  the basic hardware access drivers for logic analyzers and
@@ -22,20 +24,15 @@ config BR2_PACKAGE_LIBSIGROKCXX
 	bool "build C++ bindings"
 	select BR2_PACKAGE_GLIBMM
 	depends on BR2_INSTALL_LIBSTDCPP
-	# CS powerpc g++ are too old. libsigrokcxx needs C++11
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 	help
 	  Build libsigrok C++ bindings as well.
 
 comment "C++ bindings need a toolchain w/ C++"
 	depends on BR2_PACKAGE_LIBSIGROK
 	depends on !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
 
 endif
 
-comment "libsigrok needs a toolchain w/ wchar, threads"
+comment "libsigrok needs a toolchain w/ wchar, threads, gcc >= 4.7"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
package/pulseview/Config.in +3 -6
index 2fb844b..e6ddc21 100644
@@ -17,18 +17,15 @@ config BR2_PACKAGE_PULSEVIEW
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
 	# libsigrok
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  PulseView is a Qt based logic analyzer, oscilloscope
 	  and MSO GUI for sigrok.
 
 	  http://sigrok.org/wiki/PulseView
 
-comment "pulseview needs a toolchain w/ wchar, threads, C++"
+comment "pulseview needs a toolchain w/ wchar, threads, C++, gcc >= 4.7"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_QT5
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 && \
-		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
package/sigrok-cli/Config.in +4 -2
index 4e7f137..b8eb60d 100644
@@ -5,12 +5,14 @@ config BR2_PACKAGE_SIGROK_CLI
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
+	# libsigrok
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
 	help
 	  Sigrok-cli is a command-line frontend for the sigrok
 	  software suite.
 
 	  http://sigrok.org/wiki/Sigrok-cli
 
-comment "sigrok-cli needs a toolchain w/ wchar, threads"
+comment "sigrok-cli needs a toolchain w/ wchar, threads, gcc >= 4.7"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
Signature · 6 lines
2.5.0

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

PATCH 5/9 libsigrok: depends on gcc >= 4.7

Dear Yann E. MORIN,

Quoted 2 lines · Yann E. MORIN

Note that I have not even attempted to build it with a gcc-4.7 to validate. This is only a review...

I did build it with a gcc 4.7 toolchain, and it built fine. Actually, all the patches adding the gcc version dependency have been tested with one gcc having exactly the version of the dependency.

Thanks for the review!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#20 lore raw

PATCH 6/9 upmpdcli: update to use the gcc version dependency mechanism

In reply to Thomas Petazzoni

This commit updates the upmpdcli Config.in file to use the newly introduced gcc version dependency mechanism to depend on gcc >= 4.6 instead of open-coding dependencies on specific toolchains.

---
 package/upmpdcli/Config.in | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
package/upmpdcli/Config.in +3 -12
index 0fe3d10..848c6af 100644
@@ -4,11 +4,7 @@ config BR2_PACKAGE_UPMPDCLI
 	select BR2_PACKAGE_LIBUPNPP
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnpp -> libupnp
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # Ditto
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	# libupnpp triggers the _gp link issue
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
@@ -19,12 +15,7 @@ config BR2_PACKAGE_UPMPDCLI
 
 	  http://www.lesbonscomptes.com/upmpdcli/
 
-comment "upmpdcli needs a toolchain w/ C++, threads"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # Ditto
+comment "upmpdcli needs a toolchain w/ C++, threads, gcc >= 4.6"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
Signature · 1 line
2.5.0
#21 lore raw

PATCH 6/9 upmpdcli: update to use the gcc version dependency mechanism

Thoms, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 5 lines

This commit updates the upmpdcli Config.in file to use the newly introduced gcc version dependency mechanism to depend on gcc >= 4.6 instead of open-coding dependencies on specific toolchains.

Regards,
Yann E. MORIN.

Quoted 43 lines
---
 package/upmpdcli/Config.in | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
package/upmpdcli/Config.in +3 -12
index 0fe3d10..848c6af 100644
@@ -4,11 +4,7 @@ config BR2_PACKAGE_UPMPDCLI
 	select BR2_PACKAGE_LIBUPNPP
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnpp -> libupnp
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # Ditto
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	# libupnpp triggers the _gp link issue
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
@@ -19,12 +15,7 @@ config BR2_PACKAGE_UPMPDCLI
 
 	  http://www.lesbonscomptes.com/upmpdcli/
 
-comment "upmpdcli needs a toolchain w/ C++, threads"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # Ditto
+comment "upmpdcli needs a toolchain w/ C++, threads, gcc >= 4.6"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
Signature · 6 lines
2.5.0

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

PATCH 7/9 zmqpp: update to use the gcc version dependency mechanism

In reply to Thomas Petazzoni

This commit updates the zmqpp Config.in file to use the newly introduced gcc version dependency mechanism to depend on gcc >= 4.6 instead of open-coding dependencies on specific toolchains.

---
 package/zmqpp/Config.in | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
package/zmqpp/Config.in +4 -7
index 0aaeda3..756c810 100644
@@ -1,10 +1,7 @@
 config BR2_PACKAGE_ZMQPP
 	bool "zmqpp"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # c++0x support
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # c++0x support
+	# c++0x support
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # util-linux
 	depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq
@@ -17,9 +14,9 @@ config BR2_PACKAGE_ZMQPP
 
 	  http://github.com/benjamg/zmqpp
 
-comment "zmqpp needs a toolchain w/ C++, wchar, threads"
+comment "zmqpp needs a toolchain w/ C++, wchar, threads, gcc >= 4.6"
 	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \
-		BR2_TOOLCHAIN_HAS_THREADS)
+		BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_GCC_AT_LEAST_4_6)
 
 if BR2_PACKAGE_ZMQPP
 
Signature · 1 line
2.5.0
#23 lore raw

PATCH 7/9 zmqpp: update to use the gcc version dependency mechanism

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 27 lines

This commit updates the zmqpp Config.in file to use the newly introduced gcc version dependency mechanism to depend on gcc >= 4.6 instead of open-coding dependencies on specific toolchains.

---
 package/zmqpp/Config.in | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
package/zmqpp/Config.in +2 -5
index 0aaeda3..756c810 100644
@@ -1,10 +1,7 @@
 config BR2_PACKAGE_ZMQPP
 	bool "zmqpp"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 # c++0x support
-	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009 # c++0x support
+	# c++0x support
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # util-linux
 	depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq

package/zmqpp/Config.in config BR2_PACKAGE_ZMQPP · line 19

Quoted 8 lines
package/zmqpp/Config.in +2 -2
@@ -17,9 +14,9 @@ config BR2_PACKAGE_ZMQPP
 
 	  http://github.com/benjamg/zmqpp
 
-comment "zmqpp needs a toolchain w/ C++, wchar, threads"
+comment "zmqpp needs a toolchain w/ C++, wchar, threads, gcc >= 4.6"
 	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \
-		BR2_TOOLCHAIN_HAS_THREADS)
+		BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_GCC_AT_LEAST_4_6)

Don;t you want to take that opportunity to rewrite that with the more usual !foo || !bar || !buz syntax?

Regards,
Yann E. MORIN.

Quoted 9 lines
package/zmqpp/Config.in +0 -0
 if BR2_PACKAGE_ZMQPP
 
Signature · 6 lines
2.5.0

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

PATCH 7/9 zmqpp: update to use the gcc version dependency mechanism

Dear Yann E. MORIN,

Quoted 2 lines · Yann E. MORIN

Don;t you want to take that opportunity to rewrite that with the more usual !foo || !bar || !buz syntax?

I've done that as a separate commit. Note that some of us still use the depends on !(foo && bar && buz) form, but I agree that depends on !foo || !bar || !buz is a lot clearer.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#25 lore raw

PATCH 8/9 libupnpp: update to use the gcc version dependency mechanism

In reply to Thomas Petazzoni

This commit changes the libupnp Config.in to use the gcc version dependency mechanism. The only reverse dependency of libupnpp is upmpdcli, which has already been updated, and requires >= 4.6, while libupnpp only requires >= 4.5.

---
 package/libupnpp/Config.in | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
package/libupnpp/Config.in +3 -8
index a0565fe..8af0cda 100644
@@ -5,9 +5,7 @@ config BR2_PACKAGE_LIBUPNPP
 	select BR2_PACKAGE_LIBUPNP
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	# Triggers the _gp link issue
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
@@ -17,10 +15,7 @@ config BR2_PACKAGE_LIBUPNPP
 
 	  http://www.lesbonscomptes.com/upmpdcli/
 
-comment "libupnpp needs a toolchain w/ C++, threads"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
+comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.5"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
Signature · 1 line
2.5.0
#26 lore raw

PATCH 8/9 libupnpp: update to use the gcc version dependency mechanism

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 6 lines

This commit changes the libupnp Config.in to use the gcc version dependency mechanism. The only reverse dependency of libupnpp is upmpdcli, which has already been updated, and requires >= 4.6, while libupnpp only requires >= 4.5.

Regards,
Yann E. MORIN.

Quoted 39 lines
---
 package/libupnpp/Config.in | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
package/libupnpp/Config.in +3 -8
index a0565fe..8af0cda 100644
@@ -5,9 +5,7 @@ config BR2_PACKAGE_LIBUPNPP
 	select BR2_PACKAGE_LIBUPNP
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
 	# Triggers the _gp link issue
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
@@ -17,10 +15,7 @@ config BR2_PACKAGE_LIBUPNPP
 
 	  http://www.lesbonscomptes.com/upmpdcli/
 
-comment "libupnpp needs a toolchain w/ C++, threads"
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2014R1 # Too old gcc
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2013R1 # Ditto
-	depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX_2012R2 # Ditto
+comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.5"
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201305
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII201405
-	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
Signature · 6 lines
2.5.0

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

PATCH 9/9 mpd: update to use the gcc version dependency mechanism

In reply to Thomas Petazzoni

mpd requires at least gcc 4.6, so use the newly introduced gcc version dependency mechanism instead of open-coded toolchain dependencies.

---
 package/mpd/Config.in | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
package/mpd/Config.in +3 -6
index 65b46df..28962f7 100644
@@ -4,9 +4,7 @@ menuconfig BR2_PACKAGE_MPD
 	depends on BR2_USE_WCHAR # libglib2, flac
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
-	# sparc & CS powerpc gcc are too old
-	depends on !BR2_sparc
-	depends on !(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 || BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009)
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBGLIB2
@@ -297,9 +295,8 @@ config BR2_PACKAGE_MPD_UPNP
 
 endif
 
-comment "mpd needs a toolchain w/ C++, threads, wchar"
+comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.6"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
-	depends on !BR2_sparc
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
Signature · 1 line
2.5.0
#28 lore raw

PATCH 9/9 mpd: update to use the gcc version dependency mechanism

Thomas, All,

On 2015-08-04 20:00 +0200, Thomas Petazzoni spake thusly:

Quoted 4 lines

mpd requires at least gcc 4.6, so use the newly introduced gcc version dependency mechanism instead of open-coded toolchain dependencies.

Regards,
Yann E. MORIN.

Quoted 38 lines
---
 package/mpd/Config.in | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
package/mpd/Config.in +3 -6
index 65b46df..28962f7 100644
@@ -4,9 +4,7 @@ menuconfig BR2_PACKAGE_MPD
 	depends on BR2_USE_WCHAR # libglib2, flac
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_MMU # libglib2
-	# sparc & CS powerpc gcc are too old
-	depends on !BR2_sparc
-	depends on !(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201103 || BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC201009)
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBGLIB2
@@ -297,9 +295,8 @@ config BR2_PACKAGE_MPD_UPNP
 
 endif
 
-comment "mpd needs a toolchain w/ C++, threads, wchar"
+comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.6"
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS
-	depends on !BR2_sparc
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
Signature · 6 lines
2.5.0

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

cover Add gcc version dependency mechanism

In reply to Thomas Petazzoni

Hello all,

Quoted 3 lines · Thomas Petazzoni

We are getting more and more packages that use C11 or C++11 support, or otherwise have some dependency on features available only since certain gcc versions.

Since having such a version dependency mechanism was quite important to resolve some of the build failures we have, I merged since before -rc1. I've applied all patches, taking into account the reviews from Yann.

I have also fixed the autobuilder external toolchain configurations to add the corresponding options:

http://git.buildroot.net/buildroot-test/commit/?id=18e955cac54a01bab2e1ace375bd9cc7ad53a8c9

Thomas

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