* [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options
@ 2016-05-27 12:25 Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-27 12:25 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.
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
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] 10+ messages in thread
* [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency
2016-05-27 12:25 [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Vicente Olivert Riera
@ 2016-05-27 12:25 ` Vicente Olivert Riera
2016-05-27 17:44 ` Yann E. MORIN
2016-05-27 12:25 ` [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-27 12:25 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>
---
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] 10+ messages in thread
* [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y
2016-05-27 12:25 [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
@ 2016-05-27 12:25 ` Vicente Olivert Riera
2016-05-27 17:48 ` Yann E. MORIN
2016-05-27 12:25 ` [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
2016-05-27 17:34 ` [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Yann E. MORIN
3 siblings, 1 reply; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-27 12:25 UTC (permalink / raw)
To: buildroot
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
package/binutils/Config.in.host | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index efdc840..09d1602 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -2,25 +2,38 @@ 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"
+ 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] 10+ messages in thread
* [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST
2016-05-27 12:25 [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
@ 2016-05-27 12:25 ` Vicente Olivert Riera
2016-05-27 17:49 ` Yann E. MORIN
2016-05-27 17:34 ` [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Yann E. MORIN
3 siblings, 1 reply; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-27 12:25 UTC (permalink / raw)
To: buildroot
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
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] 10+ messages in thread
* [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options
2016-05-27 12:25 [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Vicente Olivert Riera
` (2 preceding siblings ...)
2016-05-27 12:25 ` [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
@ 2016-05-27 17:34 ` Yann E. MORIN
2016-05-31 10:38 ` Vicente Olivert Riera
3 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2016-05-27 17:34 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2016-05-27 13:25 +0100, Vicente Olivert Riera spake thusly:
> 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.
I'm not arguing whether the patches are good or not, but I'd like to
understand why we need those options.
As far as I can see, none of your patches make any package depend on any
of those new options.
Would you care to explain (in the commit log) why these are needed,
please?
Are you planning on making any existing package use them? If not, are
you planning to send new packages that will use them?
Thanks! ;-)
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> 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
Any specific reason, except it is a "round" number and more than 6-year
old, to pick 2.20 as the oldest we know of?
> +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
Otherwise:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> config BR2_TOOLCHAIN_HAS_SYNC_1
> bool
> default y
> --
> 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] 10+ messages in thread
* [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency
2016-05-27 12:25 ` [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
@ 2016-05-27 17:44 ` Yann E. MORIN
0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2016-05-27 17:44 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2016-05-27 13:25 +0100, Vicente Olivert Riera spake thusly:
> 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>
Regards,
Yann E. MORIN.
> ---
> 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
>
--
.-----------------.--------------------.------------------.--------------------.
| 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] 10+ messages in thread
* [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y
2016-05-27 12:25 ` [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
@ 2016-05-27 17:48 ` Yann E. MORIN
2016-05-31 10:39 ` Vicente Olivert Riera
0 siblings, 1 reply; 10+ messages in thread
From: Yann E. MORIN @ 2016-05-27 17:48 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2016-05-27 13:25 +0100, Vicente Olivert Riera spake thusly:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> package/binutils/Config.in.host | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
> index efdc840..09d1602 100644
> --- a/package/binutils/Config.in.host
> +++ b/package/binutils/Config.in.host
> @@ -2,25 +2,38 @@ 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"
> + 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
This patch does two things;
- add the binutils-at-least options
- change the way we handle the ARC stuff
It should be split in two patches.
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] 10+ messages in thread
* [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST
2016-05-27 12:25 ` [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
@ 2016-05-27 17:49 ` Yann E. MORIN
0 siblings, 0 replies; 10+ messages in thread
From: Yann E. MORIN @ 2016-05-27 17:49 UTC (permalink / raw)
To: buildroot
Vicente, All,
On 2016-05-27 13:25 +0100, Vicente Olivert Riera spake thusly:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> 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
>
--
.-----------------.--------------------.------------------.--------------------.
| 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] 10+ messages in thread
* [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options
2016-05-27 17:34 ` [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Yann E. MORIN
@ 2016-05-31 10:38 ` Vicente Olivert Riera
0 siblings, 0 replies; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 10:38 UTC (permalink / raw)
To: buildroot
Hello Yann,
first of all, thank you for your review.
Below are some inline comments.
On 27/05/16 18:34, Yann E. MORIN wrote:
> Vicente, All,
>
> On 2016-05-27 13:25 +0100, Vicente Olivert Riera spake thusly:
>> 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.
>
> I'm not arguing whether the patches are good or not, but I'd like to
> understand why we need those options.
>
> As far as I can see, none of your patches make any package depend on any
> of those new options.
>
> Would you care to explain (in the commit log) why these are needed,
> please?
I'll do it.
> Are you planning on making any existing package use them? If not, are
> you planning to send new packages that will use them?
Yes, to make valgrind dependant on certain version of binutils for MIPS.
Although all packages will benefit of these new options if necessary.
> Thanks! ;-)
>
>> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
>> ---
>> 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
>
> Any specific reason, except it is a "round" number and more than 6-year
> old, to pick 2.20 as the oldest we know of?
Because we have one toolchain that uses binutils-2.20:
BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A
Regards,
Vincent.
>> +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
>
> Otherwise:
>
> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>
> Regards,
> Yann E. MORIN.
>
>> config BR2_TOOLCHAIN_HAS_SYNC_1
>> bool
>> default y
>> --
>> 2.7.3
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y
2016-05-27 17:48 ` Yann E. MORIN
@ 2016-05-31 10:39 ` Vicente Olivert Riera
0 siblings, 0 replies; 10+ messages in thread
From: Vicente Olivert Riera @ 2016-05-31 10:39 UTC (permalink / raw)
To: buildroot
Hello Yann,
On 27/05/16 18:48, Yann E. MORIN wrote:
[...]
>
> This patch does two things;
>
> - add the binutils-at-least options
> - change the way we handle the ARC stuff
>
> It should be split in two patches.
no problem.
Regards,
Vincent.
> Regards,
> Yann E. MORIN.
>
>> endchoice
>>
>> --
>> 2.7.3
>>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-05-31 10:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-27 12:25 [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 2/4] toolchain-external: add support for binutils version dependency Vicente Olivert Riera
2016-05-27 17:44 ` Yann E. MORIN
2016-05-27 12:25 ` [Buildroot] [PATCH next 3/4] binutils: select the appropriate BR2_TOOLCHAIN_BINUTILS_AT_LEAST_X_Y Vicente Olivert Riera
2016-05-27 17:48 ` Yann E. MORIN
2016-05-31 10:39 ` Vicente Olivert Riera
2016-05-27 12:25 ` [Buildroot] [PATCH next 4/4] docs: add documentation for BR2_TOOLCHAIN_BINUTILS_AT_LEAST Vicente Olivert Riera
2016-05-27 17:49 ` Yann E. MORIN
2016-05-27 17:34 ` [Buildroot] [PATCH next 1/4] toolchain: add common binutils version hidden config options Yann E. MORIN
2016-05-31 10:38 ` 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.