All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH/next] toolchain-external: support gcc < 4.3
Date: Wed, 23 Nov 2016 12:14:04 +0100	[thread overview]
Message-ID: <20161123111404.20661-1-arnout@mind.be> (raw)

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.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
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(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 3991bc1..72e7292 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -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 \
diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in
index 5324599..7a3c504 100644
--- a/toolchain/toolchain-external/Config.in
+++ b/toolchain/toolchain-external/Config.in
@@ -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
-- 
2.10.2

             reply	other threads:[~2016-11-23 11:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 11:14 Arnout Vandecappelle [this message]
2016-11-23 12:22 ` [Buildroot] [PATCH/next] toolchain-external: support gcc < 4.3 Thomas Petazzoni
2016-11-23 12:27   ` Arnout Vandecappelle
2016-11-23 22:19     ` Thomas Petazzoni
2016-11-23 23:36       ` Arnout Vandecappelle
2016-11-23 22:21 ` Thomas Petazzoni
2016-11-23 23:38   ` Arnout Vandecappelle
2016-11-24  8:01     ` Thomas Petazzoni
2016-11-24  8:39       ` Arnout Vandecappelle
2016-11-24  8:48         ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123111404.20661-1-arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.