[Buildroot] [PATCH] toolchain/external: use -dumpversion to check gcc version
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Thu Mar 9 20:27:54 UTC 2017
Hello,
On Thu, 9 Mar 2017 09:01:36 +0100, Krzysztof Konopko wrote:
> Currently, `--version` option is used and later matched with a regex to get
> the actual gcc version. There's a dedicated gcc option to do exactly that:
> `-dumpversion`.
>
> Also `--version` may return a string customised by a vendor that provides
> the toolchain, which makes the current regex approach error prone. In
> fact, this situation has been seen with a real customised toolchain.
>
> Signed-off-by: Krzysztof Konopko <kris at youview.com>
> Signed-off-by: Tomasz Szkutkowski <tomasz.szkutkowski at youview.com>
> ---
> toolchain/helpers.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to master, thanks. I was worried that -dumpversion might have
been a recent gcc option, but I found it in gcc 3.4 documentation, so
we're good.
Thanks a lot!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list