determine full compiler version for gcc-7
Fixes #5778. Spack uses 'gcc -dumpversion' to determine the full version of gcc. 'gcc -dumpversion' no longer gives the full version on gcc 7.2.0. 'gcc -dumpfullversion' is required instead. This PR detects when 'gcc -dumpversion' gives a truncated version of '7' and in that case retrieves the full version with 'gcc -dumpfullversion'
This commit is contained in:
parent
a7925bb927
commit
76305038ef
@ -97,7 +97,10 @@ def default_version(cls, cc):
|
|||||||
if spack.compilers.clang.Clang.default_version(cc) != 'unknown':
|
if spack.compilers.clang.Clang.default_version(cc) != 'unknown':
|
||||||
return 'unknown'
|
return 'unknown'
|
||||||
|
|
||||||
return super(Gcc, cls).default_version(cc)
|
version = super(Gcc, cls).default_version(cc)
|
||||||
|
if version in ['7']:
|
||||||
|
version = get_compiler_version(cc, '-dumpfullversion')
|
||||||
|
return version
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fc_version(cls, fc):
|
def fc_version(cls, fc):
|
||||||
|
Loading…
Reference in New Issue
Block a user