Strip parenthesized (pkgversion) data from GCC version string to avoid misinterpretation

This commit is contained in:
Martin Kroeker 2021-02-10 14:22:59 +01:00 committed by GitHub
parent 8189a98d85
commit ece3ce581e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -75,6 +75,7 @@ if ($compiler eq "") {
} elsif ($data =~ /GNU/ || $data =~ /GCC/ ) { } elsif ($data =~ /GNU/ || $data =~ /GCC/ ) {
$data =~ s/\(+.*?\)+//g;
$data =~ /(\d+)\.(\d+).(\d+)/; $data =~ /(\d+)\.(\d+).(\d+)/;
$major = $1; $major = $1;
$minor = $2; $minor = $2;