toolchain-external: support gcc < 4.3
We currently support gcc as old as 4.3. However, Buildroot works perfectly well with even older gcc versions (tested with 4.1). So we can add an option BR2_TOOLCHAIN_EXTERNAL_GCC_OLD to support that. The help text of this option is written with plenty of discouragement.
We use _OLD and not something like _PRE_4_3, because at some point we will likely remove the 4.3 option and what would then require a name change.
We don't set any _AT_LEAST option in this case because it's no use - there is no lower bound on the version in this case. We therefore leave BR2_TOOLCHAIN_GCC_AT_LEAST empty (the implicit default). When it is empty, we don't do a version check at all in check_gcc_version. Indeed, it makes perfect sense to not set any BR2_TOOLCHAIN_GCC_AT_LEAST option.
---
This patch conflicts with the external toolchain rework - I'll rebase the one which "looses" in the first-to-be-committed contest.
We should also remove the 4.3 and 4.4 options, because they are currently unused and also untested in the autobuilders.
I think something similar should be done for kernel headers.
--- toolchain/helpers.mk | 3 +-- toolchain/toolchain-external/Config.in | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-)
toolchain/helpers.mk +1 -2
@@ -145,8 +145,7 @@ check_kernel_headers_version = \ check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ - printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ - exit 1 ; \ + exit 0 ; \ fi; \ real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;'` ; \ if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \
toolchain/toolchain-external/Config.in +11 -0
@@ -712,6 +712,17 @@ config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3 bool "4.3.x" select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 +config BR2_TOOLCHAIN_EXTERNAL_GCC_OLD + bool "older" + help + Use this option if your GCC version is older than any of the + above. + + Note that the Buildroot community doesn't do any testing with + such old toolchains. Some packages may fail to build in + surprising ways, or the generated root filesystem may not + work at all. Use such old toolchains at your own risk. + endchoice choice
Signature · 1 line
2.10.2
Hello,
Quoted 2 lines · Arnout Vandecappelle (Essensium/Mind)
We should also remove the 4.3 and 4.4 options, because they are currently unused and also untested in the autobuilders.
The Blackfin ADI toolchains use gcc 4.3, if I remember correctly.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 9 lines · Thomas Petazzoni
Hello,
Quoted 2 lines · Arnout Vandecappelle (Essensium/Mind)
We should also remove the 4.3 and 4.4 options, because they are currently unused and also untested in the autobuilders.
The Blackfin ADI toolchains use gcc 4.3, if I remember correctly.
Sorry, let me correct my statement: because they are currently unused by any
package and will very soon be untested in the autobuilders.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Hello,
Quoted 4 lines · Arnout Vandecappelle
Quoted 1 line
The Blackfin ADI toolchains use gcc 4.3, if I remember correctly.
Sorry, let me correct my statement: because they are currently unused by any
package and will very soon be untested in the autobuilders.
Huh?
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in: select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3
So it's definitely used, at least until we remove the ADI Blackfin toolchain.
Bets regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 9 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · Arnout Vandecappelle
Quoted 1 line
The Blackfin ADI toolchains use gcc 4.3, if I remember correctly.
Sorry, let me correct my statement: because they are currently unused by any
package and will very soon be untested in the autobuilders.
Quoted 6 lines
Huh?
toolchain/toolchain-external/toolchain-external-blackfin-uclinux/Config.in: select
BR2_TOOLCHAIN_GCC_AT_LEAST_4_3So it's definitely used, at least until we remove the ADI Blackfin toolchain.
When I say package, I mean: no package depends on _AT_LEAST_4_3 or _4_4.
And the ADI Blackfin removal patch is coming up :-)
Regards,
Arnout
Quoted 5 lines
Bets regards,
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Hello,
Quoted 2 lines · Arnout Vandecappelle (Essensium/Mind)
This patch conflicts with the external toolchain rework - I'll rebase the one which "looses" in the first-to-be-committed contest.
external toolchain rework committed :)
Quoted 5 lines
We should also remove the 4.3 and 4.4 options, because they are currently unused and also untested in the autobuilders.
I think something similar should be done for kernel headers.
We already have something like this: we haveBR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD.
Quoted 9 lines
toolchain/helpers.mk | 3 +-- toolchain/toolchain-external/Config.in | 11 +++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-)toolchain/helpers.mk +0
-0
toolchain/helpers.mk check_kernel_headers_version = \ · line 148
Quoted 6 lines
toolchain/helpers.mk +1
-2@@ -145,8 +145,7 @@ check_kernel_headers_version = \ check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ - printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ - exit 1 ; \ + exit 0 ; \
Why?
Assuming you will respin, I've marked this one as Changes Requested.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
On 23-11-16 23:21, Thomas Petazzoni wrote:
[snip]
Quoted 5 lines
Quoted 5 lines
toolchain/helpers.mk +0
-0@@ -145,8 +145,7 @@ check_kernel_headers_version = \
Quoted 8 lines
toolchain/helpers.mk check_kernel_headers_version = \ · line 148
Quoted 6 lines
toolchain/helpers.mk +1
-2check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ - printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ - exit 1 ; \ + exit 0 ; \Why?
As stated in the commit log:
When [BR2_TOOLCHAIN_GCC_AT_LEAST] is
empty, we don't do a version check at all in check_gcc_version.
Perhaps I should add to that "(previously we errored out)".
Regards,
Arnout
Quoted 7 lines
Assuming you will respin, I've marked this one as Changes Requested.
Thanks!
Thomas
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Hello,
Quoted 16 lines · Arnout Vandecappelle
On 23-11-16 23:21, Thomas Petazzoni wrote:
[snip]Quoted 5 lines
Quoted 5 lines
toolchain/helpers.mk +0
-0@@ -145,8 +145,7 @@ check_kernel_headers_version = \Quoted 8 lines
toolchain/helpers.mk check_kernel_headers_version = \ · line 148
Quoted 6 lines
toolchain/helpers.mk +1
-2check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ - printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ - exit 1 ; \ + exit 0 ; \Why?
Quoted 6 lines
As stated in the commit log:
When [
BR2_TOOLCHAIN_GCC_AT_LEAST] is
empty, we don't do a version check at all incheck_gcc_version.Perhaps I should add to that "(previously we errored out)".
Well, we're still erroring out, but with a 0 exit code. So I must be missing something.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Quoted 21 lines · Thomas Petazzoni
Hello,
Quoted 18 lines · Arnout Vandecappelle
On 23-11-16 23:21, Thomas Petazzoni wrote:
[snip]Quoted 5 lines
Quoted 5 lines
toolchain/helpers.mk +0
-0@@ -145,8 +145,7 @@ check_kernel_headers_version = \Quoted 8 lines
toolchain/helpers.mk check_kernel_headers_version = \ · line 148
Quoted 6 lines
toolchain/helpers.mk +1
-2check_gcc_version = \ expected_version="$(strip $2)" ; \ if [ -z "$${expected_version}" ]; then \ - printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ - exit 1 ; \ + exit 0 ; \Why?
As stated in the commit log:
Quoted 7 lines
Quoted 4 lines
When [
BR2_TOOLCHAIN_GCC_AT_LEAST] is
empty, we don't do a version check at all incheck_gcc_version.Perhaps I should add to that "(previously we errored out)".
Well, we're still erroring out, but with a 0 exit code. So I must be missing something.
0 is not an error, right?
Too early in the morning?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
Hello,
Quoted 9 lines · Arnout Vandecappelle
Quoted 7 lines
Quoted 4 lines
When [
BR2_TOOLCHAIN_GCC_AT_LEAST] is
empty, we don't do a version check at all incheck_gcc_version.Perhaps I should add to that "(previously we errored out)".
Well, we're still erroring out, but with a 0 exit code. So I must be missing something.
0 is not an error, right?
Hum, right. I think what confused me is that "exit 0" doesn't abort the build. It exists the sub-shell started by make, with a zero exit code, so make continues the build. I was thinking it would abort the build completely, which is why I was confused.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com