diff --git a/tbb-2019-fetchadd4.patch b/tbb-2019-fetchadd4.patch new file mode 100644 index 0000000..b018ec1 --- /dev/null +++ b/tbb-2019-fetchadd4.patch @@ -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 */ diff --git a/tbb.spec b/tbb.spec index 6d08e04..17f2393 100644 --- a/tbb.spec +++ b/tbb.spec @@ -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