One issue, that is indeed true (and causes missing compiler flags) is the use of "-dumpversion" instead of "--version" for the compiler version detection regex. The result of dumpversion is 4.7 (so only major and minor), while --version shows more, e.g. 4.7.2 (including revision). Thats why the RegEx fails and therefore some compiler flags are missing.
So either we use --version, or make the RegEx just check for major.minor (which should be enough IMHO), or call both - the --version thing as a fallback.
Preferred solution?