From 83f2113b27633dad853692fe78f61a08d9f45fe15e7a75fe9b4c7086ce94762d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 24 Sep 2022 16:09:52 +0000 Subject: [PATCH] Accepting request 1005775 from home:dirkmueller:Factory - update to 2021.6.0: * Improved support and use of the latest C++ standards for parallel_sort that allows using this algorithm with user-defined and standard library-defined objects with modern semantics. * The following features are now fully functional: task_arena extensions, collaborative_call_once, adaptive mutexes, heterogeneous overloads for concurrent_hash_map, and task_scheduler_handle. * Added support for Windows* Server 2022 and Python 3.10. * Memory allocator crash on a system with an incomplete /proc/meminfo * Incorrect blocking of task stealing * Hang due to incorrect decrement of a limiter_node * Memory corruption in some rare cases when passing big messages in a flow graph * Possible deadlock in a throwable flow graph node with a lightweight policy. The lightweight policy is now ignored for functors that can throw exceptions * Crash when obtaining a range from empty ordered and unordered containers * Deadlock in a concurrent_vector resize() that could happen when the new size is less than the previous size - drop tbb-pr609-32bit-mwaitpkg.patch (upstream) - add 5cb212d44732947396abdd39eae1229c7cd51644.patch, 917.patch: build on riscv64, hppa, s390x OBS-URL: https://build.opensuse.org/request/show/1005775 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=77 --- ...12d44732947396abdd39eae1229c7cd51644.patch | 43 ++++++++++ 917.patch | 78 +++++++++++++++++++ tbb-2021.5.0.tar.gz | 3 - tbb-2021.6.0.tar.gz | 3 + tbb-pr609-32bit-mwaitpkg.patch | 51 ------------ tbb.changes | 25 ++++++ tbb.spec | 9 ++- 7 files changed, 154 insertions(+), 58 deletions(-) create mode 100644 5cb212d44732947396abdd39eae1229c7cd51644.patch create mode 100644 917.patch delete mode 100644 tbb-2021.5.0.tar.gz create mode 100644 tbb-2021.6.0.tar.gz delete mode 100644 tbb-pr609-32bit-mwaitpkg.patch diff --git a/5cb212d44732947396abdd39eae1229c7cd51644.patch b/5cb212d44732947396abdd39eae1229c7cd51644.patch new file mode 100644 index 0000000..0791b30 --- /dev/null +++ b/5cb212d44732947396abdd39eae1229c7cd51644.patch @@ -0,0 +1,43 @@ +From 5cb212d44732947396abdd39eae1229c7cd51644 Mon Sep 17 00:00:00 2001 +From: Kirigami +Date: Sun, 14 Aug 2022 16:21:51 +0800 +Subject: [PATCH] add loongarch support (#850) + +* add loongarch support + +* update the copyright year of ittnotify_config.h +--- + src/tbb/tools_api/ittnotify_config.h | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h +index f904a8e9d..5e7c0cdf5 100644 +--- a/src/tbb/tools_api/ittnotify_config.h ++++ b/src/tbb/tools_api/ittnotify_config.h +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2005-2021 Intel Corporation ++ Copyright (c) 2005-2022 Intel Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. +@@ -163,6 +163,10 @@ + # define ITT_ARCH_ARM64 6 + #endif /* ITT_ARCH_ARM64 */ + ++#ifndef ITT_ARCH_LOONGARCH64 ++# define ITT_ARCH_LOONGARCH64 7 ++#endif /* ITT_ARCH_LOONGARCH64 */ ++ + #ifndef ITT_ARCH + # if defined _M_IX86 || defined __i386__ + # define ITT_ARCH ITT_ARCH_IA32 +@@ -176,6 +180,8 @@ + # define ITT_ARCH ITT_ARCH_ARM64 + # elif defined __powerpc64__ + # define ITT_ARCH ITT_ARCH_PPC64 ++# elif defined __loongarch__ ++# define ITT_ARCH ITT_ARCH_LOONGARCH64 + # endif + #endif + diff --git a/917.patch b/917.patch new file mode 100644 index 0000000..fa2197d --- /dev/null +++ b/917.patch @@ -0,0 +1,78 @@ +From d9049c052c99162e26f86cf2a4982d026bf7dc57 Mon Sep 17 00:00:00 2001 +From: Mo Zhou +Date: Fri, 20 May 2022 09:02:53 -0400 +Subject: [PATCH 1/2] Fix build failure for s390x and hppa architectures. + +Signed-off-by: Mo Zhou +--- + src/tbb/tools_api/ittnotify_config.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h +index 5e7c0cdf5..411de0852 100644 +--- a/src/tbb/tools_api/ittnotify_config.h ++++ b/src/tbb/tools_api/ittnotify_config.h +@@ -167,6 +167,14 @@ + # define ITT_ARCH_LOONGARCH64 7 + #endif /* ITT_ARCH_LOONGARCH64 */ + ++#ifndef ITT_ARCH_S390X ++# define ITT_ARCH_S390X 8 ++#endif /* ITT_ARCH_S390X */ ++ ++#ifndef ITT_ARCH_HPPA ++# define ITT_ARCH_HPPA 9 ++#endif /* ITT_ARCH_HPPA */ ++ + #ifndef ITT_ARCH + # if defined _M_IX86 || defined __i386__ + # define ITT_ARCH ITT_ARCH_IA32 +@@ -182,6 +190,10 @@ + # define ITT_ARCH ITT_ARCH_PPC64 + # elif defined __loongarch__ + # define ITT_ARCH ITT_ARCH_LOONGARCH64 ++# elif defined __s390__ || defined __s390x__ ++# define ITT_ARCH ITT_ARCH_S390X ++# elif defined __hppa__ ++# define ITT_ARCH ITT_ARCH_HPPA + # endif + #endif + + +From b0e9f8636e49c337836392d811fda403dc7102a0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dirk=20M=C3=BCller?= +Date: Sat, 24 Sep 2022 14:27:24 +0200 +Subject: [PATCH 2/2] Add riscv64 architecture detection +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Dirk Müller +--- + src/tbb/tools_api/ittnotify_config.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h +index 411de0852..11422fd57 100644 +--- a/src/tbb/tools_api/ittnotify_config.h ++++ b/src/tbb/tools_api/ittnotify_config.h +@@ -175,6 +175,10 @@ + # define ITT_ARCH_HPPA 9 + #endif /* ITT_ARCH_HPPA */ + ++#ifndef ITT_ARCH_RISCV64 ++# define ITT_ARCH_RISCV64 10 ++#endif /* ITT_ARCH_RISCV64 */ ++ + #ifndef ITT_ARCH + # if defined _M_IX86 || defined __i386__ + # define ITT_ARCH ITT_ARCH_IA32 +@@ -194,6 +198,8 @@ + # define ITT_ARCH ITT_ARCH_S390X + # elif defined __hppa__ + # define ITT_ARCH ITT_ARCH_HPPA ++# elif defined __riscv && __riscv_xlen == 64 ++# define ITT_ARCH ITT_ARCH_RISCV64 + # endif + #endif + diff --git a/tbb-2021.5.0.tar.gz b/tbb-2021.5.0.tar.gz deleted file mode 100644 index 7e0f595..0000000 --- a/tbb-2021.5.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e5b57537c741400cf6134b428fc1689a649d7d38d9bb9c1b6d64f092ea28178a -size 2463218 diff --git a/tbb-2021.6.0.tar.gz b/tbb-2021.6.0.tar.gz new file mode 100644 index 0000000..847e243 --- /dev/null +++ b/tbb-2021.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4897dd106d573e9dacda8509ca5af1a0e008755bf9c383ef6777ac490223031f +size 2566074 diff --git a/tbb-pr609-32bit-mwaitpkg.patch b/tbb-pr609-32bit-mwaitpkg.patch deleted file mode 100644 index 9798b21..0000000 --- a/tbb-pr609-32bit-mwaitpkg.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 542a27fa1cfafaf76772e793549d9f4d288d03a9 Mon Sep 17 00:00:00 2001 -From: Ilya Isaev -Date: Fri, 8 Oct 2021 10:18:16 +0300 -Subject: [PATCH] Detect 32 bit x86 systems while adding -mwaitpkg option - -Signed-off-by: Ilya Isaev ---- - cmake/compilers/Clang.cmake | 2 +- - cmake/compilers/GNU.cmake | 2 +- - cmake/compilers/MSVC.cmake | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake -index bb7401e34..d551d3be2 100644 ---- a/cmake/compilers/Clang.cmake -+++ b/cmake/compilers/Clang.cmake -@@ -44,7 +44,7 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag) - endif() - - # Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors --if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") -+if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") - set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$>:-mwaitpkg>) - endif() - -diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake -index 86958e3a8..fee1c3bc2 100644 ---- a/cmake/compilers/GNU.cmake -+++ b/cmake/compilers/GNU.cmake -@@ -36,7 +36,7 @@ if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER) - endif() - - # Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors --if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") -+if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") - set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$>,$>>:-mwaitpkg>) - endif() - -diff --git a/cmake/compilers/MSVC.cmake b/cmake/compilers/MSVC.cmake -index acf0952cf..2d2c29a6f 100644 ---- a/cmake/compilers/MSVC.cmake -+++ b/cmake/compilers/MSVC.cmake -@@ -72,7 +72,7 @@ if (TBB_WINDOWS_DRIVER) - endif() - - if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|IntelLLVM)") -- if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)") -+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)") - set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg) - endif() - set(TBB_OPENMP_NO_LINK_FLAG TRUE) diff --git a/tbb.changes b/tbb.changes index 2462cb7..c0278c0 100644 --- a/tbb.changes +++ b/tbb.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Sat Sep 24 12:16:41 UTC 2022 - Dirk Müller + +- update to 2021.6.0: + * Improved support and use of the latest C++ standards for parallel_sort that + allows using this algorithm with user-defined and standard library-defined + objects with modern semantics. + * The following features are now fully functional: task_arena extensions, + collaborative_call_once, adaptive mutexes, heterogeneous overloads for + concurrent_hash_map, and task_scheduler_handle. + * Added support for Windows* Server 2022 and Python 3.10. + * Memory allocator crash on a system with an incomplete /proc/meminfo + * Incorrect blocking of task stealing + * Hang due to incorrect decrement of a limiter_node + * Memory corruption in some rare cases when passing big messages in a flow graph + * Possible deadlock in a throwable flow graph node with a lightweight policy. + The lightweight policy is now ignored for functors that can throw + exceptions + * Crash when obtaining a range from empty ordered and unordered containers + * Deadlock in a concurrent_vector resize() that could happen when the new + size is less than the previous size +- drop tbb-pr609-32bit-mwaitpkg.patch (upstream) +- add 5cb212d44732947396abdd39eae1229c7cd51644.patch, 917.patch: + build on riscv64, hppa, s390x + ------------------------------------------------------------------- Fri Aug 5 19:04:35 UTC 2022 - Martin Liška diff --git a/tbb.spec b/tbb.spec index e80704b..b8fe409 100644 --- a/tbb.spec +++ b/tbb.spec @@ -40,7 +40,7 @@ %bcond_with python3 %endif Name: tbb -Version: 2021.5.0 +Version: 2021.6.0 Release: 0 Summary: Threading Building Blocks (TBB) License: Apache-2.0 @@ -48,8 +48,8 @@ Group: Development/Libraries/C and C++ URL: https://www.threadingbuildingblocks.org/ Source0: https://github.com/oneapi-src/oneTBB/archive/v%{version}.tar.gz#/tbb-%{version}.tar.gz Source99: tbb-rpmlintrc -# PATCH-FIX-UPSTREAM tbb-pr609-32bit-mwaitpkg.patch -Patch1: https://github.com/oneapi-src/oneTBB/pull/609.patch#/tbb-pr609-32bit-mwaitpkg.patch +Patch0: https://github.com/oneapi-src/oneTBB/commit/5cb212d44732947396abdd39eae1229c7cd51644.patch +Patch1: https://github.com/oneapi-src/oneTBB/pull/917.patch # PATCH-FIX-OPENSUSE cmake-remove-include-path.patch -- openCV include error Patch2: cmake-remove-include-path.patch Patch3: retry-pthread_create.patch @@ -282,7 +282,8 @@ popd %files %{python_files %{name}} %{python_sitearch}/tbb -%{python_sitearch}/TBB.py* +%{python_sitearch}/TBB.py +%{python_sitearch}/TBB-*py3* %{python_sitearch}/TBB-%{version}*-info %pycache_only %{python_sitearch}/__pycache__/TBB* %endif