toolchain/external: better check for gcc-5
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 9 Aug 2015 11:11:42 +0000 (13:11 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 9 Aug 2015 14:58:55 +0000 (16:58 +0200)
commit4a5f878946c37deb8c1785fb8363cd1d322f7436
treef975e449478f0555a1f45046d84b85e97b0dee68
parenta871ffd1821ba5e26862949a7a7a09b7de847f9a
toolchain/external: better check for gcc-5

gcc will always report a three-digit version sting, like 4.9.3 or 5.1.0.

For gcc before 5, we want to check the first two digits, while starting
with gcc 5, we are only concerned about the first digit.

So, change our matching code to test for the leading part of the version
string, up to the first dot after as-many version digit we're interested
in.

Note: we're adding the dot in the .mk code rather than in the Kconfig
symbol, because it seemed cleaner to do so.

Reported-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/helpers.mk