Skip to content

Commit 008fe37

Browse files
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 [email protected]+mpi cxxstd=11 %[email protected]` * Update var/spack/repos/builtin/packages/boost/package.py Co-Authored-By: Adam J. Stewart <[email protected]>
1 parent e974f48 commit 008fe37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

var/spack/repos/builtin/packages/boost/package.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,12 @@ def determine_b2_options(self, spec, options):
367367
cxxflags.append('-stdlib=libc++')
368368
options.extend(['toolset=clang',
369369
'linkflags="-stdlib=libc++"'])
370+
elif spec.satisfies('%xl') or spec.satisfies('%xl_r'):
371+
# see also: https://lists.boost.org/boost-users/2019/09/89953.php
372+
# the cxxstd setting via spack is not sufficient to drive the
373+
# change into boost compilation
374+
if spec.variants['cxxstd'].value == '11':
375+
cxxflags.append('-std=c++11')
370376

371377
if cxxflags:
372378
options.append('cxxflags="{0}"'.format(' '.join(cxxflags)))

0 commit comments

Comments
 (0)