summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost
diff options
context:
space:
mode:
authorTyler Reddy <tyler.je.reddy@gmail.com>2019-11-27 22:08:54 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-27 23:08:54 -0600
commit008fe37941d2f2071f038c4bc6465d8f80267b57 (patch)
treef7400e80d26fd87cf77276b018dc641ccb825603 /var/spack/repos/builtin/packages/boost
parente974f48be0a1fe1f622d6f5300c60b74d409fa20 (diff)
downloadspack-008fe37941d2f2071f038c4bc6465d8f80267b57.tar.gz
spack-008fe37941d2f2071f038c4bc6465d8f80267b57.tar.bz2
spack-008fe37941d2f2071f038c4bc6465d8f80267b57.tar.xz
spack-008fe37941d2f2071f038c4bc6465d8f80267b57.zip
BLD: enforce C++11 std for boost + xl_r (#13829)
* BLD: enforce C++11 std for boost + xl_r * the spack `cxxstd` variant is not sufficient to enforce `-std=c++11` usage in boost compile lines when `xl_r` compiler spec is in use; while it would be nice if this were fixed in a boost config file somewhere, for now this patch allows boost to build on POWER9 with an %xl_r compiler spec if the user specifies i.e.,: `spack install boost@1.70.0+mpi cxxstd=11 %xl_r@16.1.1.5` * Update var/spack/repos/builtin/packages/boost/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
Diffstat (limited to 'var/spack/repos/builtin/packages/boost')
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 094a96954c..3b677783a0 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -367,6 +367,12 @@ class Boost(Package):
cxxflags.append('-stdlib=libc++')
options.extend(['toolset=clang',
'linkflags="-stdlib=libc++"'])
+ elif spec.satisfies('%xl') or spec.satisfies('%xl_r'):
+ # see also: https://lists.boost.org/boost-users/2019/09/89953.php
+ # the cxxstd setting via spack is not sufficient to drive the
+ # change into boost compilation
+ if spec.variants['cxxstd'].value == '11':
+ cxxflags.append('-std=c++11')
if cxxflags:
options.append('cxxflags="{0}"'.format(' '.join(cxxflags)))