Update Boost package to support building the latest with the NV compilers (#24541)
Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
This commit is contained in:
parent
a6ce000e09
commit
a4a393d097
27
var/spack/repos/builtin/packages/boost/nvhpc-1.76.patch
Normal file
27
var/spack/repos/builtin/packages/boost/nvhpc-1.76.patch
Normal file
@ -0,0 +1,27 @@
|
||||
--- a/tools/build/src/engine/build.sh
|
||||
+++ b/tools/build/src/engine/build.sh
|
||||
@@ -232,7 +232,7 @@
|
||||
# AIX VA C++ (vacpp)
|
||||
if test_toolset vacpp && test_uname AIX && test_compiler xlC_r ; then B2_TOOLSET=vacpp ; return ${TRUE} ; fi
|
||||
# PGI (pgi)
|
||||
- if test_toolset pgi && test_compiler pgc++ -std=c++11 ; then B2_TOOLSET=pgi ; return ${TRUE} ; fi
|
||||
+ if test_toolset pgi && test_compiler nvc++ -std=c++11 ; then B2_TOOLSET=pgi ; return ${TRUE} ; fi
|
||||
# Pathscale C++ (pathscale)
|
||||
if test_toolset pathscale && test_compiler pathCC ; then B2_TOOLSET=pathscale ; return ${TRUE} ; fi
|
||||
# Como (como)
|
||||
--- a/tools/build/src/tools/pgi.jam 2020-08-25 08:45:01.015487600 -0700
|
||||
+++ b/tools/build/src/tools/pgi.jam 2020-08-25 08:45:16.462554871 -0700
|
||||
@@ -26,11 +26,11 @@
|
||||
{
|
||||
local condition = [ common.check-init-parameters pgi : version $(version) ] ;
|
||||
|
||||
- local l_command = [ common.get-invocation-command pgi : pgc++ : $(command) ] ;
|
||||
+ local l_command = [ common.get-invocation-command pgi : nvc++ : $(command) ] ;
|
||||
|
||||
common.handle-options pgi : $(condition) : $(l_command) : $(options) ;
|
||||
|
||||
- command_c = $(command_c[1--2]) $(l_command[-1]:B=pgcc) ;
|
||||
+ command_c = $(command_c[1--2]) $(l_command[-1]:B=nvc) ;
|
||||
|
||||
toolset.flags pgi CONFIG_C_COMMAND $(condition) : $(command_c) ;
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/libs/atomic/src/find_address_sse2.cpp
|
||||
+++ b/libs/atomic/src/find_address_sse2.cpp
|
||||
@@ -51,7 +51,7 @@
|
||||
// a hypervisor blocks SSE4.1 detection), and there pand may have a better throughput. For example,
|
||||
// Sandy Bridge can execute 3 pand instructions per cycle, but only one andps. For this reason
|
||||
// we prefer to generate pand and not andps.
|
||||
-#if defined(__GNUC__)
|
||||
+#if defined(__GNUC__) && !defined(__NVCOMPILER)
|
||||
__asm__("pand %1, %0\n\t" : "+x" (mm1) : "x" (mm2));
|
||||
#else
|
||||
mm1 = _mm_and_si128(mm1, mm2);
|
@ -217,7 +217,11 @@ def libs(self):
|
||||
patch('boost_1.63.0_pgi_17.4_workaround.patch', when='@1.63.0%pgi@17.4')
|
||||
|
||||
# Patch to override the PGI toolset when using the NVIDIA compilers
|
||||
patch('nvhpc.patch', when='%nvhpc')
|
||||
patch('nvhpc-1.74.patch', when='@1.74.0:1.75.9999%nvhpc')
|
||||
patch('nvhpc-1.76.patch', when='@1.76.0:1.76.9999%nvhpc')
|
||||
|
||||
# Patch to workaround compiler bug
|
||||
patch('nvhpc-find_address.patch', when='@1.75.0:1.76.999%nvhpc')
|
||||
|
||||
# Fix for version comparison on newer Clang on darwin
|
||||
# See: https://github.com/boostorg/build/issues/440
|
||||
|
Loading…
Reference in New Issue
Block a user