summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/gcc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py
index 489e87e544..06d89f78be 100644
--- a/lib/spack/spack/compilers/gcc.py
+++ b/lib/spack/spack/compilers/gcc.py
@@ -132,7 +132,7 @@ class Gcc(Compiler):
return 'unknown'
version = super(Gcc, cls).default_version(cc)
- if version in ['7']:
+ if ver(version) >= ver('7'):
version = get_compiler_version(cc, '-dumpfullversion')
return version
@@ -161,7 +161,7 @@ class Gcc(Compiler):
version = get_compiler_version(
fc, '-dumpversion',
r'(?:GNU Fortran \(GCC\) )?([\d.]+)')
- if version in ['7']:
+ if ver(version) >= ver('7'):
version = get_compiler_version(fc, '-dumpfullversion')
return version