Fix compilation on aarch64 and s390x.

See https://github.com/intel/tbb/issues/186.
This commit is contained in:
Jerry James 2019-10-13 16:08:23 -06:00
parent d846f5e692
commit bc177da166
2 changed files with 16 additions and 0 deletions

12
tbb-2019-fetchadd4.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h.orig tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h
--- tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h.orig 2019-10-09 08:58:36.000000000 -0600
+++ tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h 2019-10-13 10:02:40.917579950 -0600
@@ -331,7 +331,7 @@ ITT_INLINE long
__itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE;
ITT_INLINE long __itt_interlocked_increment(volatile long* ptr)
{
- return __TBB_machine_fetchadd4(ptr, 1) + 1L;
+ return __atomic_fetch_add(ptr, 1L, __ATOMIC_SEQ_CST) + 1L;
}
#endif /* ITT_SIMPLE_INIT */
#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */

View File

@ -31,6 +31,10 @@ Patch2: tbb-2019-test-thread-monitor.patch
# than 2 threads will be available to use it.
Patch3: tbb-2019-test-task-scheduler-init.patch
# Fix compilation on aarch64 and s390x. See
# https://github.com/intel/tbb/issues/186
Patch4: tbb-2019-fetchadd4.patch
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: python3-devel