summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/cce.py8
-rw-r--r--lib/spack/spack/operating_systems/cray_backend.py3
-rw-r--r--lib/spack/spack/operating_systems/cray_frontend.py3
-rw-r--r--lib/spack/spack/test/compilers/basics.py4
4 files changed, 16 insertions, 2 deletions
diff --git a/lib/spack/spack/compilers/cce.py b/lib/spack/spack/compilers/cce.py
index 9844eb299d..55718c292a 100644
--- a/lib/spack/spack/compilers/cce.py
+++ b/lib/spack/spack/compilers/cce.py
@@ -91,16 +91,24 @@ class Cce(Compiler):
@property
def cc_pic_flag(self):
+ if self.is_clang_based:
+ return "-fPIC"
return "-h PIC"
@property
def cxx_pic_flag(self):
+ if self.is_clang_based:
+ return "-fPIC"
return "-h PIC"
@property
def f77_pic_flag(self):
+ if self.is_clang_based:
+ return "-fPIC"
return "-h PIC"
@property
def fc_pic_flag(self):
+ if self.is_clang_based:
+ return "-fPIC"
return "-h PIC"
diff --git a/lib/spack/spack/operating_systems/cray_backend.py b/lib/spack/spack/operating_systems/cray_backend.py
index 262df6a7bd..eaf8360c2c 100644
--- a/lib/spack/spack/operating_systems/cray_backend.py
+++ b/lib/spack/spack/operating_systems/cray_backend.py
@@ -146,7 +146,8 @@ class CrayBackend(LinuxDistro):
compiler_cls.PrgEnv_compiler
)
matches = re.findall(version_regex, output)
- version = tuple(version for _, version in matches)
+ version = tuple(version for _, version in matches
+ if 'classic' not in version)
compiler_id = detect_version_args.id
value = detect_version_args._replace(
id=compiler_id._replace(version=version)
diff --git a/lib/spack/spack/operating_systems/cray_frontend.py b/lib/spack/spack/operating_systems/cray_frontend.py
index a11875ae75..d06920af43 100644
--- a/lib/spack/spack/operating_systems/cray_frontend.py
+++ b/lib/spack/spack/operating_systems/cray_frontend.py
@@ -83,7 +83,8 @@ class CrayFrontend(LinuxDistro):
compiler_cls.PrgEnv_compiler
)
matches = re.findall(version_regex, output)
- versions = tuple(version for _, version in matches)
+ versions = tuple(version for _, version in matches
+ if 'classic' not in version)
# Now inspect the modules and add to paths
msg = "[CRAY FE] Detected FE compiler [name={0}, versions={1}]"
diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py
index 0888a66c6c..acc7c7e5f0 100644
--- a/lib/spack/spack/test/compilers/basics.py
+++ b/lib/spack/spack/test/compilers/basics.py
@@ -385,6 +385,10 @@ def test_cce_flags():
supported_flag_test("cxx_pic_flag", "-h PIC", "cce@1.0")
supported_flag_test("f77_pic_flag", "-h PIC", "cce@1.0")
supported_flag_test("fc_pic_flag", "-h PIC", "cce@1.0")
+ supported_flag_test("cc_pic_flag", "-fPIC", "cce@9.1.0")
+ supported_flag_test("cxx_pic_flag", "-fPIC", "cce@9.1.0")
+ supported_flag_test("f77_pic_flag", "-fPIC", "cce@9.1.0")
+ supported_flag_test("fc_pic_flag", "-fPIC", "cce@9.1.0")
supported_flag_test("debug_flags", ['-g', '-G0', '-G1', '-G2', '-Gfast'],
'cce@1.0')