* [Buildroot] [PATCH] toolchain/external: ensure gcc version is known
@ 2015-08-13 12:13 Yann E. MORIN
2015-08-18 11:05 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2015-08-13 12:13 UTC (permalink / raw)
To: buildroot
Currently, when a preconfigured prebuilt toolchain forgets to specify
its gcc version, the error message is a bit misleading, like:
Incorrect selection of gcc version: expected .x, got 4.9.2
Add a an explicit check for the gcc version being set, that reports a
better error message.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Note: we do not need the same check for kernel headers, because for
those, we really ensure a version is set, namely 2.6.x, whereas we do
not set a default 'REALLY_OLD' gcc version (and we can't really do so).
---
toolchain/helpers.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index 7c70d35..85a9407 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -193,6 +193,10 @@ 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 ; \
+ fi; \
real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;'` ; \
if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \
printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] toolchain/external: ensure gcc version is known
2015-08-13 12:13 [Buildroot] [PATCH] toolchain/external: ensure gcc version is known Yann E. MORIN
@ 2015-08-18 11:05 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-08-18 11:05 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Thu, 13 Aug 2015 14:13:23 +0200, Yann E. MORIN wrote:
> Currently, when a preconfigured prebuilt toolchain forgets to specify
> its gcc version, the error message is a bit misleading, like:
>
> Incorrect selection of gcc version: expected .x, got 4.9.2
>
> Add a an explicit check for the gcc version being set, that reports a
> better error message.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>
> ---
> Note: we do not need the same check for kernel headers, because for
> those, we really ensure a version is set, namely 2.6.x, whereas we do
> not set a default 'REALLY_OLD' gcc version (and we can't really do so).
> ---
> toolchain/helpers.mk | 4 ++++
> 1 file changed, 4 insertions(+)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-18 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 12:13 [Buildroot] [PATCH] toolchain/external: ensure gcc version is known Yann E. MORIN
2015-08-18 11:05 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox