summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2021-03-23 21:19:03 +0100
committerGitHub <noreply@github.com>2021-03-23 14:19:03 -0600
commita1aec1450b1840733ff41a8ce86cbbf3b3cb0c06 (patch)
tree666ad775d1d7c9ffc7d84534462f1eb629c82bc8 /lib
parent45e076dd20ea7d7066f5d8c48e0e93c9242bf093 (diff)
downloadspack-a1aec1450b1840733ff41a8ce86cbbf3b3cb0c06.tar.gz
spack-a1aec1450b1840733ff41a8ce86cbbf3b3cb0c06.tar.bz2
spack-a1aec1450b1840733ff41a8ce86cbbf3b3cb0c06.tar.xz
spack-a1aec1450b1840733ff41a8ce86cbbf3b3cb0c06.zip
Add stdcxx_libs for PGI and Cray compilers (#22491)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/cce.py6
-rw-r--r--lib/spack/spack/compilers/pgi.py4
-rw-r--r--lib/spack/spack/test/compilers/basics.py2
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/cce.py b/lib/spack/spack/compilers/cce.py
index 9c90690808..64bf62543d 100644
--- a/lib/spack/spack/compilers/cce.py
+++ b/lib/spack/spack/compilers/cce.py
@@ -112,3 +112,9 @@ class Cce(Compiler):
if self.is_clang_based:
return "-fPIC"
return "-h PIC"
+
+ @property
+ def stdcxx_libs(self):
+ # Cray compiler wrappers link to the standard C++ library
+ # without additional flags.
+ return ()
diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py
index c1cd8e3a7f..3de7b708c7 100644
--- a/lib/spack/spack/compilers/pgi.py
+++ b/lib/spack/spack/compilers/pgi.py
@@ -88,3 +88,7 @@ class Pgi(Compiler):
'the C11 standard',
'c11_flag',
'< 15.3')
+
+ @property
+ def stdcxx_libs(self):
+ return ('-pgc++libs',)
diff --git a/lib/spack/spack/test/compilers/basics.py b/lib/spack/spack/test/compilers/basics.py
index 553d89ecac..39bb65254d 100644
--- a/lib/spack/spack/test/compilers/basics.py
+++ b/lib/spack/spack/test/compilers/basics.py
@@ -389,6 +389,7 @@ def test_cce_flags():
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("stdcxx_libs", (), "cce@1.0")
supported_flag_test("debug_flags", ['-g', '-G0', '-G1', '-G2', '-Gfast'],
'cce@1.0')
@@ -612,6 +613,7 @@ def test_pgi_flags():
supported_flag_test("cxx_pic_flag", "-fpic", "pgi@1.0")
supported_flag_test("f77_pic_flag", "-fpic", "pgi@1.0")
supported_flag_test("fc_pic_flag", "-fpic", "pgi@1.0")
+ supported_flag_test("stdcxx_libs", ("-pgc++libs",), "pgi@1.0")
supported_flag_test("debug_flags", ['-g', '-gopt'], 'pgi@1.0')
supported_flag_test("opt_flags", ['-O', '-O0', '-O1', '-O2', '-O3', '-O4'],
'pgi@1.0')