From 997aee1ab405b9be2fcd1c53759aafd550f17113 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 15:36:28 +0000 Subject: [PATCH] import UBI tbb-2021.11.0-7.el10 --- .gitignore | 2 +- .tbb.metadata | 1 - SOURCES/tbb-4.0-mfence.patch | 14 - SOURCES/tbb-4.3-dont-snip-Wall.patch | 14 - SOURCES/tbb-4.4-cxxflags.patch | 37 -- SOURCES/tbb.pc | 5 - SPECS/tbb.spec | 556 ----------------- sources | 1 + tbb-2021-Werror.patch | 30 + tbb-2021-strict-aliasing.patch | 12 + tbb.spec | 575 ++++++++++++++++++ SOURCES/tbbmalloc.pc => tbbmalloc.pc | 0 .../tbbmalloc_proxy.pc => tbbmalloc_proxy.pc | 0 13 files changed, 619 insertions(+), 628 deletions(-) delete mode 100644 .tbb.metadata delete mode 100644 SOURCES/tbb-4.0-mfence.patch delete mode 100644 SOURCES/tbb-4.3-dont-snip-Wall.patch delete mode 100644 SOURCES/tbb-4.4-cxxflags.patch delete mode 100644 SOURCES/tbb.pc delete mode 100644 SPECS/tbb.spec create mode 100644 sources create mode 100644 tbb-2021-Werror.patch create mode 100644 tbb-2021-strict-aliasing.patch create mode 100644 tbb.spec rename SOURCES/tbbmalloc.pc => tbbmalloc.pc (100%) rename SOURCES/tbbmalloc_proxy.pc => tbbmalloc_proxy.pc (100%) diff --git a/.gitignore b/.gitignore index dce8fd8..e423eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/2018_U2.tar.gz +tbb-2021.11.0.tar.gz diff --git a/.tbb.metadata b/.tbb.metadata deleted file mode 100644 index e689ea3..0000000 --- a/.tbb.metadata +++ /dev/null @@ -1 +0,0 @@ -1d3e011649dbe9259156b6cb0fe15f375abd8f9c SOURCES/2018_U2.tar.gz diff --git a/SOURCES/tbb-4.0-mfence.patch b/SOURCES/tbb-4.0-mfence.patch deleted file mode 100644 index eae98ee..0000000 --- a/SOURCES/tbb-4.0-mfence.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up tbb44_20151115oss/include/tbb/machine/linux_ia32.h\~ tbb44_20151115oss/include/tbb/machine/linux_ia32.h ---- tbb44_20151115oss/include/tbb/machine/linux_ia32.h~ 2015-11-25 03:49:14.000000000 -0700 -+++ tbb44_20151115oss/include/tbb/machine/linux_ia32.h 2016-01-14 20:29:45.251333321 -0700 -@@ -34,7 +34,7 @@ - #define __TBB_control_consistency_helper() __TBB_compiler_fence() - #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() - #define __TBB_release_consistency_helper() __TBB_compiler_fence() --#define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") -+#define __TBB_full_memory_fence() __sync_synchronize() - - #if __TBB_ICC_ASM_VOLATILE_BROKEN - #define __TBB_VOLATILE - -Diff finished. Thu Jan 14 20:30:12 2016 diff --git a/SOURCES/tbb-4.3-dont-snip-Wall.patch b/SOURCES/tbb-4.3-dont-snip-Wall.patch deleted file mode 100644 index cf691ce..0000000 --- a/SOURCES/tbb-4.3-dont-snip-Wall.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up tbb44_20151115oss/build/Makefile.tbbmalloc\~ tbb44_20151115oss/build/Makefile.tbbmalloc ---- tbb44_20151115oss/build/Makefile.tbbmalloc~ 2016-01-14 20:20:49.514774850 -0700 -+++ tbb44_20151115oss/build/Makefile.tbbmalloc 2016-01-14 20:36:32.126342096 -0700 -@@ -51,7 +51,7 @@ ORIG_LINK_MALLOC.LIB:=$(LINK_MALLOC.LIB) - MALLOC_CPLUS.OBJ = backend.$(OBJ) large_objects.$(OBJ) backref.$(OBJ) tbbmalloc.$(OBJ) - MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) itt_notify_malloc.$(OBJ) frontend.$(OBJ) - PROXY.OBJ := proxy.$(OBJ) tbb_function_replacement.$(OBJ) --M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(CXXFLAGS) $(DEFINE_KEY)__TBBMALLOC_BUILD=1 -+M_CPLUS_FLAGS := $(CXXFLAGS) -fno-strict-aliasing $(DEFINE_KEY)__TBBMALLOC_BUILD=1 - M_INCLUDES := $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT) - - # Suppress superfluous warnings for TBBMalloc compilation - -Diff finished. Thu Jan 14 20:37:02 2016 diff --git a/SOURCES/tbb-4.4-cxxflags.patch b/SOURCES/tbb-4.4-cxxflags.patch deleted file mode 100644 index 4aa6606..0000000 --- a/SOURCES/tbb-4.4-cxxflags.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -up tbb-2018_U2/build/linux.gcc.inc\~ tbb-2018_U2/build/linux.gcc.inc ---- tbb-2018_U2/build/linux.gcc.inc~ 2017-12-06 10:29:49.000000000 -0700 -+++ tbb-2018_U2/build/linux.gcc.inc 2018-01-22 20:47:07.148422967 -0700 -@@ -68,10 +68,10 @@ ifneq (,$(shell gcc -dumpversion | egrep - endif - - ifeq ($(cfg), release) -- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD -+ CPLUS_FLAGS = $(CXXFLAGS) $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD - endif - ifeq ($(cfg), debug) -- CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD -+ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD - endif - - TBB_ASM.OBJ= -diff -up tbb-2018_U2/build/Makefile.tbbmalloc\~ tbb-2018_U2/build/Makefile.tbbmalloc ---- tbb-2018_U2/build/Makefile.tbbmalloc~ 2017-12-06 10:29:49.000000000 -0700 -+++ tbb-2018_U2/build/Makefile.tbbmalloc 2018-01-22 20:47:30.104350662 -0700 -@@ -51,7 +51,7 @@ ORIG_LINK_MALLOC.LIB:=$(LINK_MALLOC.LIB) - MALLOC_CPLUS.OBJ = backend.$(OBJ) large_objects.$(OBJ) backref.$(OBJ) tbbmalloc.$(OBJ) - MALLOC.OBJ := $(MALLOC_CPLUS.OBJ) $(MALLOC_ASM.OBJ) itt_notify_malloc.$(OBJ) frontend.$(OBJ) - PROXY.OBJ := proxy.$(OBJ) tbb_function_replacement.$(OBJ) --M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(DEFINE_KEY)__TBBMALLOC_BUILD=1 -+M_CPLUS_FLAGS := $(subst $(WARNING_KEY),,$(M_CPLUS_FLAGS)) $(CXXFLAGS) $(DEFINE_KEY)__TBBMALLOC_BUILD=1 - M_INCLUDES := $(INCLUDES) $(INCLUDE_KEY)$(MALLOC_ROOT) $(INCLUDE_KEY)$(MALLOC_SOURCE_ROOT) - - # Suppress superfluous warnings for TBBMalloc compilation -@@ -86,7 +86,7 @@ $(MALLOC.DLL) $(MALLOCPROXY.DLL): CPLUS_ - $(MALLOC.DLL) $(MALLOCPROXY.DLL): M_CPLUS_FLAGS += $(SDL_FLAGS) - $(MALLOC.DLL): BUILDING_LIBRARY = $(MALLOC.DLL) - $(MALLOC.DLL): $(MALLOC.OBJ) $(MALLOC.RES) $(MALLOC_NO_VERSION.DLL) -- $(subst $(CPLUS),$(CONLY),$(LIB_LINK_CMD)) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS) -+ $(LIB_LINK_CMD) $(LIB_OUTPUT_KEY)$(MALLOC.DLL) $(MALLOC.OBJ) $(MALLOC.RES) $(LIB_LINK_LIBS) $(MALLOC_LINK_FLAGS) - - ifneq (,$(MALLOCPROXY.DEF)) - tbbmallocproxy.def: $(MALLOCPROXY.DEF) diff --git a/SOURCES/tbb.pc b/SOURCES/tbb.pc deleted file mode 100644 index 1f4bd26..0000000 --- a/SOURCES/tbb.pc +++ /dev/null @@ -1,5 +0,0 @@ -Name: Threading Building Blocks -Description: The Threading Building Blocks library abstracts low-level threading details -URL: http://www.threadingbuildingblocks.org/ -Version: _FEDORA_VERSION -Libs: -ltbb diff --git a/SPECS/tbb.spec b/SPECS/tbb.spec deleted file mode 100644 index 6fb9ef5..0000000 --- a/SPECS/tbb.spec +++ /dev/null @@ -1,556 +0,0 @@ -%global upver 2018 -%global uprel 2 - -Name: tbb -Summary: The Threading Building Blocks library abstracts low-level threading details -Version: %{upver}%{?uprel:.%{uprel}} -Release: 10%{?dist}.1 -License: ASL 2.0 -Group: Development/Tools -URL: http://threadingbuildingblocks.org/ - -Source0: https://github.com/01org/tbb/archive/%{upver}%{?uprel:_U%{uprel}}.tar.gz -# These three are downstream sources. -Source6: tbb.pc -Source7: tbbmalloc.pc -Source8: tbbmalloc_proxy.pc - -# Propagate CXXFLAGS variable into flags used when compiling C++. -# This is so that RPM_OPT_FLAGS are respected. -Patch1: tbb-4.4-cxxflags.patch - -# For 32-bit x86 only, don't assume that the mfence instruction is available. -# It was added with SSE2. This patch causes a lock xchg instruction to be -# emitted for non-SSE2 builds, and the mfence instruction to be emitted for -# SSE2-enabled builds. -Patch2: tbb-4.0-mfence.patch - -# Don't snip -Wall from C++ flags. Add -fno-strict-aliasing, as that -# uncovers some static-aliasing warnings. -# Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347 -Patch3: tbb-4.3-dont-snip-Wall.patch - -# python3 is not available on RHEL <=7 -%if 0%{?rhel} && 0%{?rhel} <= 7 -# disable python3 by default -%bcond_with python3 -%else -%bcond_without python3 -%endif - -# python2 is not available on RHEL > 7 and not needed on Fedora > 28 -%if 0%{?rhel} > 7 || 0%{?fedora} > 28 -# disable python2 by default -%bcond_with python2 -%else -%bcond_without python2 -%endif - -BuildRequires: gcc-c++ -BuildRequires: swig - -%if %{with python2} -BuildRequires: python2-devel -%endif - -%if %{with python3} -BuildRequires: python3-devel -%endif - -%description -Threading Building Blocks (TBB) is a C++ runtime library that -abstracts the low-level threading details necessary for optimal -multi-core performance. It uses common C++ templates and coding style -to eliminate tedious threading implementation work. - -TBB requires fewer lines of code to achieve parallelism than other -threading models. The applications you write are portable across -platforms. Since the library is also inherently scalable, no code -maintenance is required as more processor cores become available. - - -%package devel -Summary: The Threading Building Blocks C++ headers and shared development libraries -Group: Development/Libraries -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description devel -Header files and shared object symlinks for the Threading Building -Blocks (TBB) C++ libraries. - - -%package doc -Summary: The Threading Building Blocks documentation -Group: Documentation - -%description doc -HTML documentation for the user of the Threading Building Block (TBB) -C++ library. - -%if %{with python2} -%package -n python2-%{name} -Summary: Python 2 TBB module -%{?python_provide:%python_provide python2-%{name}} -Requires: tbb = %{version}-%{release} - -%description -n python2-%{name} -Python 2 TBB module. -%endif - -%if %{with python3} -%package -n python3-%{name} -Summary: Python 3 TBB module -%{?python_provide:%python_provide python3-%{name}} -Requires: tbb = %{version}-%{release} - -%description -n python3-%{name} -Python 3 TBB module. -%endif - -%prep -%setup -q -n %{name}-%{upver}_U%{uprel} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 - -# For repeatable builds, don't query the hostname or architecture -sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \ - build/version_info_linux.sh - -# Do not assume the RTM instructions are available -sed -i 's/-mrtm//' build/linux.gcc.inc - -%if %{with python2} -# Invoke the right python binary directly -sed -i 's,env python,python2,' python/TBB.py python/tbb/__*.py -%endif - -%if %{with python3} -# Invoke the right python binary directly -sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py -%endif - -# Remove shebang from files that don't need it -sed -i '/^#!/d' python/tbb/{pool,test}.py - -# Fix libdir on 64-bit systems -if [ "%{_libdir}" != "%{_prefix}/lib" ]; then - sed -i.orig 's/"lib"/"%{_lib}"/' cmake/TBBMakeConfig.cmake - touch -r cmake/TBBMakeConfig.cmake.orig cmake/TBBMakeConfig.cmake - rm cmake/TBBMakeConfig.cmake.orig -fi - -# Prepare to build the python module for both python 2 and python 3 -%if %{with python2} -cp -a python python2 -%endif - -%if %{with python3} -cp -a python python3 -sed -i 's,python,python3,g' python3/Makefile python3/rml/Makefile -sed -i 's,python2,python3,' python3/TBB.py python3/tbb/__*.py - -# Invoke Python with the %%{__python3} executable instead of hardcoded python3 -sed -i 's,PY_SETUP=python3,PY_SETUP=%{__python3},g' python3/Makefile -sed -i 's,python3 -m tbb test,%{__python3} -m tbb test,g' python3/Makefile -%endif - -# Remove jQuery -rm doc/html/jquery.js -find doc/html -name '*.html' | xargs sed -i '/