Get the gcc version from sources rather than filenames

This should be a much more reliable way to detect the correct
gcc version -- especially when pulling from git topic branches.

Change-Id: I3b255761a8baeb2767035679a0a8bbb7f798b2ff
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
Merge remote-tracking branch 'linaro/linaro-master'