diff options
author | Mark W. Krentel <krentel@rice.edu> | 2019-11-29 13:18:56 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2019-11-29 13:18:56 -0600 |
commit | 92ca63990505ba700cde99b2c5cfe80b880cbd8e (patch) | |
tree | 924d671ca40364e8be903860f9494778a57f5604 /var | |
parent | 0f464b8d9f4937fa2f772a84d86e15591d704898 (diff) | |
download | spack-92ca63990505ba700cde99b2c5cfe80b880cbd8e.tar.gz spack-92ca63990505ba700cde99b2c5cfe80b880cbd8e.tar.bz2 spack-92ca63990505ba700cde99b2c5cfe80b880cbd8e.tar.xz spack-92ca63990505ba700cde99b2c5cfe80b880cbd8e.zip |
intel-tbb: fix and update patches for latest versions (#13932)
Commit 78724357 added versions 2019.5 to 2019.8 but failed to update
the patches for these versions.
1. gcc_generic-pedantic patch -- include this up through 2019.5. This
was fixed in the TBB source tree in 2019.6.
2. tbb_cmakeConfig patch -- this needs to be modified (different file)
for 2019.5 and later.
3. tbb_gcc_rtm_key patch -- replace this with filter_file. This is
simpler and eliminates the need to update the patch whenever the
surrounding context changes.
Diffstat (limited to 'var')
4 files changed, 33 insertions, 48 deletions
diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index b1a2421c37..55df90ed7d 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -17,6 +17,9 @@ class IntelTbb(Package): """ homepage = "http://www.threadingbuildingblocks.org/" + # Note: when adding new versions, please check and update the + # patches and filters below as needed. + # See url_for_version() below. version('2019.8', sha256='7b1fd8caea14be72ae4175896510bf99c809cd7031306a1917565e6de7382fba') version('2019.7', sha256='4204a93f4c0fd989fb6f79acae74feb02ee39725c93968773d9b6efeb75c7a6a') @@ -86,36 +89,18 @@ class IntelTbb(Package): # to patch `2019.1` without patching `2019`. When #8957 is fixed, this # can be simplified. - # Deactivate use of RTM with GCC when on an OS with an elderly assembler. - # one patch format for 2019.1 and after... - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.4 %gcc@4.8.0: os=rhel6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.4 %gcc@4.8.0: os=scientific6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.4 %gcc@4.8.0: os=centos6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.3 %gcc@4.8.0: os=rhel6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.3 %gcc@4.8.0: os=scientific6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.3 %gcc@4.8.0: os=centos6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.2 %gcc@4.8.0: os=rhel6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.2 %gcc@4.8.0: os=scientific6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.2 %gcc@4.8.0: os=centos6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.1 %gcc@4.8.0: os=rhel6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.1 %gcc@4.8.0: os=scientific6') - patch("tbb_gcc_rtm_key_2019U1.patch", level=0, when='@2019.1 %gcc@4.8.0: os=centos6') - # ...another patch file for 2019 and before - patch("tbb_gcc_rtm_key.patch", level=0, when='@:2019.0 %gcc@4.8.0: os=rhel6') - patch("tbb_gcc_rtm_key.patch", level=0, when='@:2019.0 %gcc@4.8.0: os=scientific6') - patch("tbb_gcc_rtm_key.patch", level=0, when='@:2019.0 %gcc@4.8.0: os=centos6') - - # patch for pedantic warnings (#10836) - # one patch file for 2019.1 and after... - patch("gcc_generic-pedantic-2019.patch", level=1, when='@2019.4') - patch("gcc_generic-pedantic-2019.patch", level=1, when='@2019.3') - patch("gcc_generic-pedantic-2019.patch", level=1, when='@2019.2') - patch("gcc_generic-pedantic-2019.patch", level=1, when='@2019.1') + # Patch for pedantic warnings (#10836). This was fixed in the TBB + # source tree in 2019.6. One patch file for 2019.1 and after... + patch("gcc_generic-pedantic-2019.patch", level=1, + when='@2019.1,2019.2,2019.3,2019.4,2019.5') # ...another patch file for 2019 and before patch("gcc_generic-pedantic-4.4.patch", level=1, when='@:2019.0') # Patch cmakeConfig.cmake.in to find the libraries where we install them. - patch("tbb_cmakeConfig.patch", level=0, when='@2017.0:') + # Can't use '@2019.5:' because 2019.5 <= 2019 <= 2019.99. wtf!? + patch("tbb_cmakeConfig-2019.5.patch", level=0, + when='@2019.5,2019.6,2019.7,2019.8') + patch("tbb_cmakeConfig.patch", level=0, when='@2017.0:2019.4') # Some very old systems don't support transactional memory. patch("disable-tm.patch", when='~tm') @@ -145,6 +130,14 @@ class IntelTbb(Package): of.write(l) def install(self, spec, prefix): + # Deactivate use of RTM with GCC when on an OS with a very old + # assembler. + if (spec.satisfies('%gcc@4.8.0: os=rhel6') + or spec.satisfies('%gcc@4.8.0: os=centos6') + or spec.satisfies('%gcc@4.8.0: os=scientific6')): + filter_file(r'RTM_KEY.*=.*rtm.*', 'RTM_KEY =', + join_path('build', 'linux.gcc.inc')) + # We need to follow TBB's compiler selection logic to get the proper # build + link flags but we still need to use spack's compiler wrappers # to accomplish this, we do two things: diff --git a/var/spack/repos/builtin/packages/intel-tbb/tbb_cmakeConfig-2019.5.patch b/var/spack/repos/builtin/packages/intel-tbb/tbb_cmakeConfig-2019.5.patch new file mode 100644 index 0000000000..f75fd6fa44 --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-tbb/tbb_cmakeConfig-2019.5.patch @@ -0,0 +1,14 @@ +This patch adapts the tbb_cmakeConfig.patch for 2019.5 and later. +The file changed. + +--- cmake/TBBMakeConfig.cmake.orig 2019-03-21 10:28:21.000000000 -0500 ++++ cmake/TBBMakeConfig.cmake 2019-11-27 22:52:45.270824744 -0600 +@@ -175,7 +175,7 @@ + + ${TBB_CHOOSE_COMPILER_SUBDIR} + +-get_filename_component(_tbb_lib_path \"\${_tbb_root}/${TBB_SHARED_LIB_DIR}/\${_tbb_arch_subdir}/\${_tbb_compiler_subdir}\" ABSOLUTE) ++get_filename_component(_tbb_lib_path \"\${_tbb_root}/${TBB_SHARED_LIB_DIR}\" ABSOLUTE) + ") + + set(TBB_RELEASE_LIB_PATH "\${_tbb_lib_path}") diff --git a/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key.patch b/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key.patch deleted file mode 100644 index 29f040d4a8..0000000000 --- a/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- build/linux.gcc.inc~ 2016-09-15 07:00:44.000000000 -0500 -+++ build/linux.gcc.inc 2018-06-07 17:32:53.181194974 -0500 -@@ -46,7 +46,7 @@ - - # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them - ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[8-9]|[5-9])")) -- RTM_KEY = -mrtm -+ RTM_KEY = # -mrtm - endif - - ifeq ($(cfg), release) diff --git a/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key_2019U1.patch b/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key_2019U1.patch deleted file mode 100644 index 5d4fe9aa89..0000000000 --- a/var/spack/repos/builtin/packages/intel-tbb/tbb_gcc_rtm_key_2019U1.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- build/linux.gcc.inc~ 2016-09-15 07:00:44.000000000 -0500 -+++ build/linux.gcc.inc 2018-06-07 17:32:53.181194974 -0500 -@@ -46,7 +46,7 @@ - - # gcc 4.8 and later support RTM intrinsics, but require command line switch to enable them - ifneq (,$(shell $(CONLY) -dumpversion | egrep "^(4\.[8-9]|[5-9])")) -- RTM_KEY = -mrtm -+ RTM_KEY = # -mrtm - endif - - ifeq ($(cfg), release) |