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
This commit is contained in:
Dirk Mueller 2022-09-24 16:09:52 +00:00 committed by Git OBS Bridge
parent a250fa90c0
commit 83f2113b27
7 changed files with 154 additions and 58 deletions

View File

@ -0,0 +1,43 @@
From 5cb212d44732947396abdd39eae1229c7cd51644 Mon Sep 17 00:00:00 2001
From: Kirigami <prcups@v-signal.xyz>
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

78
917.patch Normal file
View File

@ -0,0 +1,78 @@
From d9049c052c99162e26f86cf2a4982d026bf7dc57 Mon Sep 17 00:00:00 2001
From: Mo Zhou <cdluminate@gmail.com>
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 <cdluminate@gmail.com>
---
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?= <dirk@dmllr.de>
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 <dirk@dmllr.de>
---
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e5b57537c741400cf6134b428fc1689a649d7d38d9bb9c1b6d64f092ea28178a
size 2463218

3
tbb-2021.6.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4897dd106d573e9dacda8509ca5af1a0e008755bf9c383ef6777ac490223031f
size 2566074

View File

@ -1,51 +0,0 @@
From 542a27fa1cfafaf76772e793549d9f4d288d03a9 Mon Sep 17 00:00:00 2001
From: Ilya Isaev <ilya.isaev@intel.com>
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 <ilya.isaev@intel.com>
---
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 $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-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 $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-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)

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Sat Sep 24 12:16:41 UTC 2022 - Dirk Müller <dmueller@suse.com>
- 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 <mliska@suse.cz>

View File

@ -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