Skip to content

Commit

Permalink
Fix version detection for gcc@8
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkuhn committed Jun 19, 2018
1 parent cb11e1b commit 986c67b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/spack/spack/compilers/gcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def default_version(cls, cc):
return 'unknown'

version = super(Gcc, cls).default_version(cc)
if version in ['7']:
if version in ['7', '8']:
version = get_compiler_version(cc, '-dumpfullversion')
return version

Expand Down Expand Up @@ -161,7 +161,7 @@ def fc_version(cls, fc):
version = get_compiler_version(
fc, '-dumpversion',
r'(?:GNU Fortran \(GCC\) )?([\d.]+)')
if version in ['7']:
if version in ['7', '8']:
version = get_compiler_version(fc, '-dumpfullversion')
return version

Expand Down

0 comments on commit 986c67b

Please sign in to comment.