boost: fix v1.78 build with oneapi (#30463)

This commit is contained in:
eugeneswalker 2022-05-03 22:29:37 -07:00 committed by GitHub
parent f5eb9fb501
commit 96f9a1d88b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,11 @@
--- a/tools/build/src/tools/intel-linux.jam 2021-12-01 22:47:38.000000000 -0800
+++ b/tools/build/src/tools/intel-linux.jam 2022-05-03 13:40:41.569430070 -0700
@@ -276,7 +276,7 @@
#
actions compile.c++.pch
{
- rm -f "$(<)" && LD_LIBRARY_PATH="$(RUN_PATH)" "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -pch-create "$(<)" "$(>)"
+ rm -f "$(<)" && LD_LIBRARY_PATH="$(RUN_PATH)" "$(CONFIG_COMMAND)" -x c++-header $(OPTIONS) $(USER_OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -Xclang -emit-pch -o "$(<)" "$(>)"
}
actions compile.fortran

View File

@ -344,6 +344,9 @@ def libs(self):
# See https://github.com/spack/spack/issues/28273
patch("pthread-stack-min-fix.patch", when="@1.69.0:1.72.0")
# https://www.intel.com/content/www/us/en/developer/articles/technical/building-boost-with-oneapi.html
patch("1.78-intel-linux-jam.patch", when="@1.78 %oneapi")
def patch(self):
# Disable SSSE3 and AVX2 when using the NVIDIA compiler
if self.spec.satisfies('%nvhpc'):
@ -357,6 +360,10 @@ def patch(self):
filter_file('-fast', '-O1', 'tools/build/src/tools/pgi.jam')
filter_file('-fast', '-O1', 'tools/build/src/engine/build.sh')
# Fixes https://github.com/spack/spack/issues/29352
if self.spec.satisfies('@1.78 %intel') or self.spec.satisfies('@1.78 %oneapi'):
filter_file('-static', '', 'tools/build/src/engine/build.sh')
def url_for_version(self, version):
if version >= Version('1.63.0'):
url = "https://boostorg.jfrog.io/artifactory/main/release/{0}/source/boost_{1}.tar.bz2"