summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorkraptor <david.anes@suse.com>2022-07-18 21:24:39 +0200
committerGitHub <noreply@github.com>2022-07-18 21:24:39 +0200
commitefcb89fa702da5bd5d2cf000ace759df90152895 (patch)
tree04cea5eda625d510fac1ce67d87fbb957f58e3c8 /lib
parentd934ba93262f466673728ea570159c96dcdf831c (diff)
downloadNim-efcb89fa702da5bd5d2cf000ace759df90152895.tar.gz
Correctly detect major version of GCC (#20059)
We were doing a very poor job detecting the major version of GCC by
parsing the output of --version.

This patches uses -dumpversion to make this parsing straightforward and
it also fixes a bunch of compiling issues on different platforms with
custom output for --version switches. For example, openSUSE first line
of the output includes the revision number and the parsing that was
being done did mix that number with the major version and breaks
building the nim compiler (as it doesn't find the 3 dots for an X.Y.Z semver
format, hence returning "false").

In this patch, we simply use -dumpversion (which has been at least from
1993, so we are safe :)
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions