mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 10:46:26 +00:00
In later versions of gcc, gcc -dumpversion only shows the major version. You have to use gcc -dumpfullversion instead. This was first seen from a Trick user who is running on Ubuntu 18.04.
This commit is contained in:
parent
ab2cfe1a34
commit
cef656e80b
@ -49,21 +49,21 @@ sub gte (@) {
|
||||
# remove possible ccache from TRICK_CC
|
||||
$temp =~ s/.*?ccache\s+// ;
|
||||
if ( -e $temp ) {
|
||||
$ret = `$temp -dumpversion` ;
|
||||
$ret = `$temp -dumpfullversion -dumpversion` ;
|
||||
}
|
||||
else {
|
||||
printf STDERR "[33mCannot find TRICK_CC = $temp, using /usr/bin/gcc\n" ;
|
||||
$ret = `/usr/bin/gcc -dumpversion` ;
|
||||
$ret = `/usr/bin/gcc -dumpfullversion -dumpversion` ;
|
||||
}
|
||||
} else {
|
||||
# remove possible ccache from TRICK_CC
|
||||
my ($temp) = $ENV{TRICK_CC} ;
|
||||
$temp =~ s/.*?ccache\s+// ;
|
||||
$ret = `$temp -dumpversion` ;
|
||||
$ret = `$temp --dumpfullversion dumpversion` ;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$ret = `gcc -dumpversion` ;
|
||||
$ret = `gcc -dumpfullversion -dumpversion` ;
|
||||
}
|
||||
($gcc_version) = $ret =~ /(\d+(?:\.\d+)?)/ ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user