summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/xl.py6
-rw-r--r--lib/spack/spack/compilers/xl_r.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py
index 8fda5cb536..1e5ca52d33 100644
--- a/lib/spack/spack/compilers/xl.py
+++ b/lib/spack/spack/compilers/xl.py
@@ -112,6 +112,12 @@ class Xl(Compiler):
older version of AIX and linux on power.
"""
fver = get_compiler_version(fc, '-qversion', r'([0-9]?[0-9]\.[0-9])')
+ if fver >= 16:
+ """Starting with version 16.1, the XL C and Fortran compilers
+ have the same version. So no need to downgrade the Fortran
+ compiler version to match that of the C compiler version.
+ """
+ return str(fver)
cver = float(fver) - 2
if cver < 10:
cver = cver - 0.1
diff --git a/lib/spack/spack/compilers/xl_r.py b/lib/spack/spack/compilers/xl_r.py
index 1afaa45e63..717d631873 100644
--- a/lib/spack/spack/compilers/xl_r.py
+++ b/lib/spack/spack/compilers/xl_r.py
@@ -113,6 +113,12 @@ class XlR(Compiler):
older version of AIX and linux on power.
"""
fver = get_compiler_version(fc, '-qversion', r'([0-9]?[0-9]\.[0-9])')
+ if fver >= 16:
+ """Starting with version 16.1, the XL C and Fortran compilers
+ have the same version. So no need to downgrade the Fortran
+ compiler version to match that of the C compiler version.
+ """
+ return str(fver)
cver = float(fver) - 2
if cver < 10:
cver = cver - 0.1