Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 :)
- Loading branch information