[packages/tbb] extend x86 cpu pattern for enabling waitpkg

atler atler at pld-linux.org
Thu Dec 16 18:37:27 CET 2021


commit 71d914e57e07c0a829caf767d1c82aba8efe969f
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Dec 16 18:36:08 2021 +0100

    extend x86 cpu pattern for enabling waitpkg

 tbb-x86_32bit.patch | 11 +++++++++++
 tbb.spec            |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/tbb.spec b/tbb.spec
index 5d954f6..926e077 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -21,6 +21,7 @@ Source3:	http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20So
 Source4:	http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf
 # Source4-md5:	5bbdd1050c5dac5c1b782a6a98db0c46
 URL:		http://www.threadingbuildingblocks.org/
+Patch0:		%{name}-x86_32bit.patch
 BuildRequires:	cmake >= 3.1
 BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	pkgconfig
@@ -90,6 +91,7 @@ Building Blocks (TBB).
 
 %prep
 %setup -q -n oneTBB-%{version}
+%patch0 -p1
 
 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
 
diff --git a/tbb-x86_32bit.patch b/tbb-x86_32bit.patch
new file mode 100644
index 0000000..a2dc714
--- /dev/null
+++ b/tbb-x86_32bit.patch
@@ -0,0 +1,11 @@
+--- oneTBB-2021.4.0/cmake/compilers/GNU.cmake.orig	2021-10-04 11:50:18.000000000 +0200
++++ oneTBB-2021.4.0/cmake/compilers/GNU.cmake	2021-12-16 18:34:30.653386405 +0100
+@@ -36,7 +36,7 @@
+ 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 "((x|i6)86|AMD64)")
+     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()
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tbb.git/commitdiff/71d914e57e07c0a829caf767d1c82aba8efe969f



More information about the pld-cvs-commit mailing list