mk: rework gcc version detection to permit versions newer than 4.x
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 23 Feb 2015 14:53:56 +0000 (16:53 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 24 Feb 2015 02:47:29 +0000 (03:47 +0100)
commit71f0ab1849b4fc3ca928deb566df12ca725ed150
tree9b5d9e6af5a0fa29b0c362a47fc8796c49cd17fc
parent9903387f32d28852062215b90aa3058ac365d64d
mk: rework gcc version detection to permit versions newer than 4.x

Separately comparing major and minor versions becomes seriously clumsy
when with major version changes, convert the entire version string into
a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use
that for comparisons, eliminate unnecessary negations while at it.
This makes the comparisons simpler, more obvious and makes gcc 5.0
naturally recognized at least as capable as newest 4.x.

This three-digit scheme would run into trouble if gcc ever went to
two-digit version segments, but that hasn't happened in the last 10+
years so it seems like a safe assumption.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
lib/librte_pmd_fm10k/Makefile
lib/librte_pmd_i40e/Makefile
lib/librte_pmd_ixgbe/Makefile
lib/librte_pmd_vmxnet3/Makefile
mk/toolchain/gcc/rte.toolchain-compat.mk