All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options
@ 2016-05-31 11:11 Vicente Olivert Riera
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 2/7] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:11 UTC (permalink / raw)
  To: buildroot

This commit adds a number of hidden Config.in options, that will be used
to handle dependencies on the binutils 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.

These options will be helpful when we need to make packages depend on
certain version of binutils. Further patches will do this for gcc and
valgrind packages.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
 - Explain in the commit log why we need these options. (Yann)

 toolchain/toolchain-common.in | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index 1fe28a9..deede7b 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -327,6 +327,45 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST
 	default "4.4"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4
 	default "4.3"	if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
 
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
+	bool
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_21
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_22
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_21
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_22
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
+
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
+	bool
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
+
+# This order guarantees that the highest version is set, as kconfig
+# stops affecting a value on the first matching default.
+config BR2_TOOLCHAIN_BINUTILS_AT_LEAST
+	string
+	default "2.26" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
+	default "2.25" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
+	default "2.24" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
+	default "2.23" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
+	default "2.22" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_22
+	default "2.21" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_21
+	default "2.20" if BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
+
 config BR2_TOOLCHAIN_HAS_SYNC_1
 	bool
 	default y
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 2/7] toolchain-external: add support for binutils version dependency
  2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
@ 2016-05-31 11:11 ` Vicente Olivert Riera
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically Vicente Olivert Riera
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:11 UTC (permalink / raw)
  To: buildroot

This commit wires up the binutils 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_BINUTILS_AT_LEAST_* option.

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

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

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
 - Nothing.

 toolchain/helpers.mk                               | 30 ++++++++++++
 toolchain/toolchain-external/Config.in             | 57 ++++++++++++++++++++++
 toolchain/toolchain-external/toolchain-external.mk |  2 +
 3 files changed, 89 insertions(+)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index d28a2ca..1221ada 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -149,6 +149,36 @@ check_kernel_headers_version = \
 	fi
 
 #
+# Check the specific binutils version actually matches the version in
+# the toolchain. We use readelf for that purpose.
+#
+# $1: path to readelf
+# $2: expected readelf version
+#
+# Some details about the sed expression:
+# - 1!d
+#   - delete if not line 1
+#
+# - 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
+#
+check_binutils_version = \
+	expected_version="$(strip $2)" ; \
+	if [ -z "$${expected_version}" ]; then \
+		printf "Internal error, binutils version unknown (no BINUTILS_AT_LEAST_X_Y selected)\n"; \
+		exit 1 ; \
+	fi; \
+	real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;'` ; \
+	if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \
+		printf "Incorrect selection of binutils version: expected %s.x, got %s\n" \
+			"$${expected_version}" "$${real_version}" ; \
+		exit 1 ; \
+	fi
+
+#
 # Check the specific gcc version actually matches the version in the
 # toolchain
 #
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index ce2d91e..316a6af 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -26,6 +26,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
 	  GCC 2014.09 (based on gcc 4.9), Linaro GDB 2013.10 (based on
@@ -48,6 +49,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Linaro toolchain for the ARM architecture. It uses Linaro
 	  GCC 2016.02 (based on gcc 5.3), Linaro GDB 2016.02 (based on
@@ -70,6 +72,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Linaro toolchain for the ARM big endian architecture. It
 	  uses Linaro GCC 2014.09 (based on gcc 4.9), Linaro GDB
@@ -92,6 +95,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Linaro toolchain for the ARM big endian architecture. It
 	  uses Linaro GCC 2016.02 (based on gcc 5.3), Linaro GDB
@@ -113,6 +117,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Sourcery CodeBench toolchain for the ARM architecture, from
 	  Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc
@@ -147,6 +152,7 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
 	# kernel headers: 2.6.31
 	help
 	  Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3,
@@ -170,6 +176,7 @@ config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE
 	select BR2_INSTALL_LIBSTDCPP
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
 	# kernel headers: 2.6.31
 	help
 	  Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc
@@ -190,6 +197,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Sourcery CodeBench toolchain for the MIPS architecture, from
 	  Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc
@@ -278,6 +286,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Codescape IMG GNU Linux Toolchain 2015.10 for the MIPS
 	  architecture, from Imagination Technologies. It uses gcc
@@ -340,6 +349,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Codescape MTI GNU Linux Toolchain 2015.10 for the MIPS
 	  architecture, from Imagination Technologies. It uses gcc
@@ -413,6 +423,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1
 	help
 	  Sourcery CodeBench toolchain for the Nios-II architecture,
@@ -430,6 +441,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
 	help
 	  Sourcery CodeBench toolchain for the SuperH architecture,
 	  from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51,
@@ -456,6 +468,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Sourcery CodeBench toolchain for the amd64 (x86_64)
 	  architectures, from Mentor Graphics. It uses gcc 5.2,
@@ -481,6 +494,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
 	help
 	  Sourcery CodeBench toolchain for the x86/x86_64
 	  architectures, from Mentor Graphics. It uses gcc 4.7.2,
@@ -510,6 +524,7 @@ config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_21
 	help
 	  Toolchain for the Blackfin architecture, from
 	  http://blackfin.uclinux.org.
@@ -525,6 +540,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Toolchain for the AArch64 architecture, from
 	  http://www.linaro.org/engineering/armv8/
@@ -540,6 +556,7 @@ config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Toolchain for the AArch64 architecture, from
 	  http://www.linaro.org/engineering/armv8/
@@ -555,6 +572,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 	help
 	  Sourcery CodeBench toolchain for the AArch64 architecture,
 	  from Mentor Graphics. It uses gcc 4.9.1, binutils
@@ -578,6 +596,7 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS
 	select BR2_HOSTARCH_NEEDS_IA32_LIBS
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_5
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 	help
 	  Toolchain based on the Musl C library, provided by the
 	  musl-cross project. It uses gcc 5.3, binutils 2.25.1 and
@@ -606,6 +625,7 @@ config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC
 	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
 	select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
 	help
 	  Toolchain for the ARC cores, from
 	  https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases
@@ -708,6 +728,43 @@ config BR2_TOOLCHAIN_EXTERNAL_MUSL
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 
 choice
+	bool "External toolchain binutils version"
+	default BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_20
+	help
+	  Set to the binutils version that is used by your external
+	  toolchain.
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_26
+	bool "2.26.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_25
+	bool "2.25.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_24
+	bool "2.24.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_23
+	bool "2.23.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_23
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_22
+	bool "2.22.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_22
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_21
+	bool "2.21.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_21
+
+config BR2_TOOLCHAIN_EXTERNAL_BINUTILS_2_20
+	bool "2.20.x"
+	select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_20
+
+endchoice
+
+choice
 	bool "External toolchain gcc version"
 	default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3
 	help
diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk
index 3d71ef4..952667d 100644
--- a/toolchain/toolchain-external/toolchain-external.mk
+++ b/toolchain/toolchain-external/toolchain-external.mk
@@ -505,6 +505,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_binutils_version,$(TOOLCHAIN_EXTERNAL_READELF),\
+		$(call qstrip,$(BR2_TOOLCHAIN_BINUTILS_AT_LEAST))); \
 	$(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\
 		$(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \
 	if test "$(BR2_arm)" = "y" ; then \
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically
  2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 2/7] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
@ 2016-05-31 11:11 ` Vicente Olivert Riera
  2016-06-07 21:13   ` Yann E. MORIN
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Changes v1 -> v2:
 - This patch didn't exist in v1.

 package/binutils/Config.in.host | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index efdc840..c7cf094 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -2,25 +2,34 @@ comment "Binutils Options"
 
 choice
 	prompt "Binutils Version"
-	depends on !BR2_arc
 	default BR2_BINUTILS_VERSION_2_25_X
 	help
 	  Select the version of binutils you wish to use.
 
 	config BR2_BINUTILS_VERSION_2_24_X
+		bool "binutils 2.24"
+		# ARC support is not upstream yet
+		depends on !BR2_arc
 		# supported, but broken on Nios-II and powerpc64le
 		depends on !BR2_nios2 && !BR2_powerpc64le
 		# Unsupported for MIPS R6
 		depends on !BR2_mips_32r6 && !BR2_mips_64r6
 		# Unsupported ARM cores
 		depends on !BR2_cortex_a17
-		bool "binutils 2.24"
 
 	config BR2_BINUTILS_VERSION_2_25_X
 		bool "binutils 2.25.1"
+		# ARC support is not upstream yet
+		depends on !BR2_arc
 
 	config BR2_BINUTILS_VERSION_2_26_X
 		bool "binutils 2.26"
+		# ARC support is not upstream yet
+		depends on !BR2_arc
+
+	config BR2_BINUTILS_VERSION_ARC
+		bool "arc-2016.03"
+		depends on BR2_arc
 
 endchoice
 
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y
  2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 2/7] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically Vicente Olivert Riera
@ 2016-05-31 11:11 ` Vicente Olivert Riera
  2016-06-07 21:15   ` Yann E. MORIN
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 5/7] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
Changes v1 -> v2:
 - Split the patch in two (Yann):
   - change the way we handle the ARC stuff (patch 3/7, previous one)
   - add the binutils-at-least options (patch 4/7 , this one)

 package/binutils/Config.in.host | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index c7cf094..09d1602 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -16,20 +16,24 @@ choice
 		depends on !BR2_mips_32r6 && !BR2_mips_64r6
 		# Unsupported ARM cores
 		depends on !BR2_cortex_a17
+		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
 
 	config BR2_BINUTILS_VERSION_2_25_X
 		bool "binutils 2.25.1"
 		# ARC support is not upstream yet
 		depends on !BR2_arc
+		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
 
 	config BR2_BINUTILS_VERSION_2_26_X
 		bool "binutils 2.26"
 		# ARC support is not upstream yet
 		depends on !BR2_arc
+		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
 
 	config BR2_BINUTILS_VERSION_ARC
 		bool "arc-2016.03"
 		depends on BR2_arc
+		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
 
 endchoice
 
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 5/7] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST
  2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
                   ` (2 preceding siblings ...)
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
@ 2016-05-31 11:11 ` Vicente Olivert Riera
  2016-05-31 11:13 ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Vicente Olivert Riera
  2016-06-08 21:21 ` [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Thomas Petazzoni
  5 siblings, 0 replies; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:11 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Changes v1 -> v2:
 - Nothing.

 docs/manual/adding-packages-directory.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 5537032..f3baa9b 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -294,6 +294,12 @@ use in the comment.
 ** Comment string: +headers >= X.Y+ and/or `headers <= X.Y` (replace
    +X.Y+ with the proper version)
 
+* Binutils version
+** Dependency symbol: +BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +toolchain/toolchain-common.in+)
+** Comment string: +binutils >= X.Y+ and/or `binutils <= 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+)
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination
@ 2016-05-31 11:13 ` Vicente Olivert Riera
  2016-05-31 11:13   ` [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25 Vicente Olivert Riera
  2016-06-07 21:23   ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Yann E. MORIN
  0 siblings, 2 replies; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:13 UTC (permalink / raw)
  To: buildroot

Commit 2fda0dd7d491e6e926ace1cd09ad2fb241356232 disabled the gcc-4.8 +
binutils-2.25 + MIPS combination. But now that we have BINUTILS_AT_LEAST
options we can use them in order to disable all combinations for future
versions of binutils.

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/gcc/Config.in.host | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 61d3dbe..4e45029 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -42,8 +42,8 @@ choice
 		depends on !BR2_cortex_a12 && !BR2_cortex_a17
 		# Broken or unsupported PPC cores
 		depends on !BR2_powerpc_power8
-		# gcc-4.8.x + binutils-2.25 is broken for MIPS
-		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X)
+		# gcc-4.8.x + binutils >= 2.25 is broken for MIPS
+		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25)
 		# Unsupported for MIPS R6
 		depends on !BR2_mips_32r6 && !BR2_mips_64r6
 		select BR2_GCC_NEEDS_MPC
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25
  2016-05-31 11:13 ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Vicente Olivert Riera
@ 2016-05-31 11:13   ` Vicente Olivert Riera
  2016-06-07 21:38     ` Yann E. MORIN
  2016-06-07 21:23   ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Yann E. MORIN
  1 sibling, 1 reply; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 11:13 UTC (permalink / raw)
  To: buildroot

As stated here [1], recent changes on the MIPS binutils sources have
made it necessary for GCC to pass the -msoft-float to the assembler. Due
to that, valgrind fails to build for MIPS soft-float when using a
version of GCC >= 4.9 and binutils >= 2.25 because its using some
hard-float instructions. The combination of GCC-4.8.x and binutils >=
2.25 is not possible as its disabled in package/gcc/Config.in.host.

1: https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00905.html

Fixes:
  http://autobuild.buildroot.net/results/5f5/5f576c7f8d56058a19ed0e7ff4b1ec620bcafb65/

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/valgrind/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in
index 21b2608..3093809 100644
--- a/package/valgrind/Config.in
+++ b/package/valgrind/Config.in
@@ -8,6 +8,7 @@ config BR2_PACKAGE_VALGRIND
 		   BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
 		   BR2_x86_64
 	depends on !BR2_STATIC_LIBS
+	depends on !(BR2_MIPS_SOFT_FLOAT && BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25)
 	help
 	  Tool for debugging and profiling Linux programs.
 
-- 
2.7.3

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

* [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically Vicente Olivert Riera
@ 2016-06-07 21:13   ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2016-06-07 21:13 UTC (permalink / raw)
  To: buildroot

Vicente, All,

On 2016-05-31 12:11 +0100, Vicente Olivert Riera spake thusly:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> Changes v1 -> v2:
>  - This patch didn't exist in v1.
> 
>  package/binutils/Config.in.host | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
> index efdc840..c7cf094 100644
> --- a/package/binutils/Config.in.host
> +++ b/package/binutils/Config.in.host
> @@ -2,25 +2,34 @@ comment "Binutils Options"
>  
>  choice
>  	prompt "Binutils Version"
> -	depends on !BR2_arc
>  	default BR2_BINUTILS_VERSION_2_25_X
>  	help
>  	  Select the version of binutils you wish to use.
>  
>  	config BR2_BINUTILS_VERSION_2_24_X
> +		bool "binutils 2.24"
> +		# ARC support is not upstream yet
> +		depends on !BR2_arc
>  		# supported, but broken on Nios-II and powerpc64le
>  		depends on !BR2_nios2 && !BR2_powerpc64le
>  		# Unsupported for MIPS R6
>  		depends on !BR2_mips_32r6 && !BR2_mips_64r6
>  		# Unsupported ARM cores
>  		depends on !BR2_cortex_a17
> -		bool "binutils 2.24"
>  
>  	config BR2_BINUTILS_VERSION_2_25_X
>  		bool "binutils 2.25.1"
> +		# ARC support is not upstream yet
> +		depends on !BR2_arc
>  
>  	config BR2_BINUTILS_VERSION_2_26_X
>  		bool "binutils 2.26"
> +		# ARC support is not upstream yet
> +		depends on !BR2_arc
> +
> +	config BR2_BINUTILS_VERSION_ARC
> +		bool "arc-2016.03"
> +		depends on BR2_arc

As discussed on IRC, you should also use this new symbol to set the
default value (not a patch!):

     config BR2_BINUTILS_VERSION
         string
    -    default "arc-2016.03" if BR2_arc
    +    default "arc-2016.03" if BR2_BINUTILS_VERSION_ARC
         default "2.24"        if BR2_BINUTILS_VERSION_2_24_X
         default "2.25.1"      if BR2_BINUTILS_VERSION_2_25_X
         default "2.26"        if BR2_BINUTILS_VERSION_2_26_X

With that added, you can add my:

    Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  endchoice
>  
> -- 
> 2.7.3
> 

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

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

* [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y
  2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
@ 2016-06-07 21:15   ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2016-06-07 21:15 UTC (permalink / raw)
  To: buildroot

Vicente, All,

On 2016-05-31 12:11 +0100, Vicente Olivert Riera spake thusly:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

On the assumption that you know what you're doing, and that the ARCH
binutils is really a 2.26:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
> Changes v1 -> v2:
>  - Split the patch in two (Yann):
>    - change the way we handle the ARC stuff (patch 3/7, previous one)
>    - add the binutils-at-least options (patch 4/7 , this one)
> 
>  package/binutils/Config.in.host | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
> index c7cf094..09d1602 100644
> --- a/package/binutils/Config.in.host
> +++ b/package/binutils/Config.in.host
> @@ -16,20 +16,24 @@ choice
>  		depends on !BR2_mips_32r6 && !BR2_mips_64r6
>  		# Unsupported ARM cores
>  		depends on !BR2_cortex_a17
> +		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_24
>  
>  	config BR2_BINUTILS_VERSION_2_25_X
>  		bool "binutils 2.25.1"
>  		# ARC support is not upstream yet
>  		depends on !BR2_arc
> +		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25
>  
>  	config BR2_BINUTILS_VERSION_2_26_X
>  		bool "binutils 2.26"
>  		# ARC support is not upstream yet
>  		depends on !BR2_arc
> +		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
>  
>  	config BR2_BINUTILS_VERSION_ARC
>  		bool "arc-2016.03"
>  		depends on BR2_arc
> +		select BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_26
>  
>  endchoice
>  
> -- 
> 2.7.3
> 

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

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

* [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination
  2016-05-31 11:13 ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Vicente Olivert Riera
  2016-05-31 11:13   ` [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25 Vicente Olivert Riera
@ 2016-06-07 21:23   ` Yann E. MORIN
  1 sibling, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2016-06-07 21:23 UTC (permalink / raw)
  To: buildroot

Vicente, All,

On 2016-05-31 12:13 +0100, Vicente Olivert Riera spake thusly:
> Commit 2fda0dd7d491e6e926ace1cd09ad2fb241356232 disabled the gcc-4.8 +
> binutils-2.25 + MIPS combination. But now that we have BINUTILS_AT_LEAST
> options we can use them in order to disable all combinations for future
> versions of binutils.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
>  package/gcc/Config.in.host | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
> index 61d3dbe..4e45029 100644
> --- a/package/gcc/Config.in.host
> +++ b/package/gcc/Config.in.host
> @@ -42,8 +42,8 @@ choice
>  		depends on !BR2_cortex_a12 && !BR2_cortex_a17
>  		# Broken or unsupported PPC cores
>  		depends on !BR2_powerpc_power8
> -		# gcc-4.8.x + binutils-2.25 is broken for MIPS
> -		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X)
> +		# gcc-4.8.x + binutils >= 2.25 is broken for MIPS
> +		depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25)

Hmm, this again does two things:
  - use the new biunutils-at-least options,
  - also disable binutils 2.26 (which was not disabled previously)

But OK, I guess you know what you're doing, regarding MIPS! ;-)

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  		# Unsupported for MIPS R6
>  		depends on !BR2_mips_32r6 && !BR2_mips_64r6
>  		select BR2_GCC_NEEDS_MPC
> -- 
> 2.7.3
> 

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

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

* [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25
  2016-05-31 11:13   ` [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25 Vicente Olivert Riera
@ 2016-06-07 21:38     ` Yann E. MORIN
  0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2016-06-07 21:38 UTC (permalink / raw)
  To: buildroot

Vicente, All,

On 2016-05-31 12:13 +0100, Vicente Olivert Riera spake thusly:
> As stated here [1], recent changes on the MIPS binutils sources have
> made it necessary for GCC to pass the -msoft-float to the assembler. Due
> to that, valgrind fails to build for MIPS soft-float when using a
> version of GCC >= 4.9 and binutils >= 2.25 because its using some
> hard-float instructions. The combination of GCC-4.8.x and binutils >=
> 2.25 is not possible as its disabled in package/gcc/Config.in.host.
> 
> 1: https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00905.html
> 
> Fixes:
>   http://autobuild.buildroot.net/results/5f5/5f576c7f8d56058a19ed0e7ff4b1ec620bcafb65/
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
>  package/valgrind/Config.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in
> index 21b2608..3093809 100644
> --- a/package/valgrind/Config.in
> +++ b/package/valgrind/Config.in
> @@ -8,6 +8,7 @@ config BR2_PACKAGE_VALGRIND
>  		   BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \
>  		   BR2_x86_64
>  	depends on !BR2_STATIC_LIBS
> +	depends on !(BR2_MIPS_SOFT_FLOAT && BR2_TOOLCHAIN_BINUTILS_AT_LEAST_2_25)

Your commit log talks about the combination of gcc >= 4.8 *with*
binutils >= 2.25.

However, here, you only hide for binutils >= 2.25.

And we still have gcc-4.7 (albeit deprecated). Is it known broken with
the gcc-4.7 and binutils >= 2.25 combination too?

So, except for this deprecated gcc-4.7, what matters is only the
binutils version. There is no need to talk about the gcc version in the
commit log (except maybe to state taht we don't care about the
deprecated gcc-4.7).

Otherwise:

Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

>  	help
>  	  Tool for debugging and profiling Linux programs.
>  
> -- 
> 2.7.3
> 

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

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

* [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options
  2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
                   ` (4 preceding siblings ...)
  2016-05-31 11:13 ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Vicente Olivert Riera
@ 2016-06-08 21:21 ` Thomas Petazzoni
  2016-06-17 11:54   ` Vicente Olivert Riera
  5 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2016-06-08 21:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 31 May 2016 12:11:12 +0100, Vicente Olivert Riera wrote:
> This commit adds a number of hidden Config.in options, that will be used
> to handle dependencies on the binutils 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.
> 
> These options will be helpful when we need to make packages depend on
> certain version of binutils. Further patches will do this for gcc and
> valgrind packages.
> 
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

I was about to apply this series, but in fact, I'm going to reject it,
as I believe the annoyance / benefit ratio is not good.

You are introducing those binutils version selectors to solve two
problems:

 * The fact that gcc 4.8 does not work on MIPS with binutils >= 2.25.
   binutils 2.25 is already our default, and as soon as binutils 2.27
   is released, 2.26 will be the default, and 2.24 will be removed,
   leaving in fact no way to select gcc 4.8 on MIPS.

   So I would prefer that we simply disallow gcc 4.8 on MIPS completely.

 * The fact that Valgrind doesn't work on MIPS soft-float with binutils
   >= 2.25. Same comment here: just disable Valgrind on MIPS soft-float
   and that's it.

Normally, the version option are used to indicate that something
*works* only after a certain version (like kernel headers >= 3.10, or
gcc >= 4.9).

But here, you're using the options in the opposite way: to say that
anything after binutils 2.25 (included) is broken. With 2.24 going away
in the near future, I rather prefer the above solutions that to add
those additional binutils version options.

So could you instead submit patches that:

 1/ Disallow gcc 4.8 on MIPS
 2/ Disallow valgrind on MIPS soft-float

Thanks!

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

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

* [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options
  2016-06-08 21:21 ` [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Thomas Petazzoni
@ 2016-06-17 11:54   ` Vicente Olivert Riera
  0 siblings, 0 replies; 13+ messages in thread
From: Vicente Olivert Riera @ 2016-06-17 11:54 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On 08/06/16 22:21, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 31 May 2016 12:11:12 +0100, Vicente Olivert Riera wrote:
>> This commit adds a number of hidden Config.in options, that will be used
>> to handle dependencies on the binutils 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.
>>
>> These options will be helpful when we need to make packages depend on
>> certain version of binutils. Further patches will do this for gcc and
>> valgrind packages.
>>
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> 
> I was about to apply this series, but in fact, I'm going to reject it,
> as I believe the annoyance / benefit ratio is not good.
> 
> You are introducing those binutils version selectors to solve two
> problems:
> 
>  * The fact that gcc 4.8 does not work on MIPS with binutils >= 2.25.
>    binutils 2.25 is already our default, and as soon as binutils 2.27
>    is released, 2.26 will be the default, and 2.24 will be removed,
>    leaving in fact no way to select gcc 4.8 on MIPS.
> 
>    So I would prefer that we simply disallow gcc 4.8 on MIPS completely.
> 
>  * The fact that Valgrind doesn't work on MIPS soft-float with binutils
>    >= 2.25. Same comment here: just disable Valgrind on MIPS soft-float
>    and that's it.

not only that. I think it's useful to know which gcc version a toolchain
has. That's why we have GCC_AT_LEAST options.
Also, I think it's useful to know which linux headers a toolchain has.
That's why we have HEADERS_AT_LEAST options.

And I also think it would be good to know which binutils version a
toolchain has, with BINUTILS_AT_LEAST options. And probably it would be
good to know which C library version as well, with GLIBC_AT_LEAST,
UCLIBC_AT_LEAST and MUSL_AT_LEAST.

Regards,

Vincent.


> Normally, the version option are used to indicate that something
> *works* only after a certain version (like kernel headers >= 3.10, or
> gcc >= 4.9).
> 
> But here, you're using the options in the opposite way: to say that
> anything after binutils 2.25 (included) is broken. With 2.24 going away
> in the near future, I rather prefer the above solutions that to add
> those additional binutils version options.
> 
> So could you instead submit patches that:
> 
>  1/ Disallow gcc 4.8 on MIPS
>  2/ Disallow valgrind on MIPS soft-float
> 
> Thanks!
> 
> Thomas
> 

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

end of thread, other threads:[~2016-06-17 11:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31 11:11 [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Vicente Olivert Riera
2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 2/7] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 3/7] binutils: handle ARC more atomically Vicente Olivert Riera
2016-06-07 21:13   ` Yann E. MORIN
2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 4/7] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
2016-06-07 21:15   ` Yann E. MORIN
2016-05-31 11:11 ` [Buildroot] [PATCH v2 next 5/7] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
2016-05-31 11:13 ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Vicente Olivert Riera
2016-05-31 11:13   ` [Buildroot] [PATCH v2 next 7/7] valgrind: disable for MIPS soft-float when using binutils >= 2.25 Vicente Olivert Riera
2016-06-07 21:38     ` Yann E. MORIN
2016-06-07 21:23   ` [Buildroot] [PATCH v2 next 6/7] Disable gcc-4.8 + binutils >= 2.25 + MIPS combination Yann E. MORIN
2016-06-08 21:21 ` [Buildroot] [PATCH v2 next 1/7] toolchain: add common binutils version hidden config options Thomas Petazzoni
2016-06-17 11:54   ` Vicente Olivert Riera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.