update to 2020.3

This commit is contained in:
sxt1001 2020-07-24 14:17:47 +08:00
parent f8bf76e196
commit a6728ecd15
7 changed files with 53 additions and 164 deletions

Binary file not shown.

View File

@ -0,0 +1,35 @@
From e9a3bdcebf1d469b36b874d01c4116e7e23821cd Mon Sep 17 00:00:00 2001
From: lvying6 <lvying6@huawei.com>
Date: Sun, 26 Apr 2020 17:17:34 +0800
Subject: [PATCH] tbb: fix __TBB_machine_fetchadd4 was not declared on ARM64
../../src/tbb/tools_api/ittnotify_config.h:338:12: error: '__TBB_machine_fetchadd4' was not declared in this scope
return __TBB_machine_fetchadd4(ptr, 1) + 1L;
^~~~~~~~~~~~~~~~~~~~~~~
../../src/tbb/tools_api/ittnotify_config.h:338:12: note:
suggested alternative: '__atomic_fetch_add_4'
return __TBB_machine_fetchadd4(ptr, 1) + 1L;
^~~~~~~~~~~~~~~~~~~~~~~
__atomic_fetch_add_4
Signed-off-by: lvying6 <lvying6@huawei.com>
---
src/tbb/tools_api/ittnotify_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tbb/tools_api/ittnotify_config.h b/src/tbb/tools_api/ittnotify_config.h
index bdb4ec2..041ceb3 100644
--- a/src/tbb/tools_api/ittnotify_config.h
+++ b/src/tbb/tools_api/ittnotify_config.h
@@ -335,7 +335,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 */
--
1.8.3.1

View File

@ -1,38 +0,0 @@
diff -up tbb-2018_U5/build/common_rules.inc\~ tbb-2018_U5/build/common_rules.inc
--- tbb-2018_U5/build/common_rules.inc~ 2018-06-19 10:04:20.000000000 -0600
+++ tbb-2018_U5/build/common_rules.inc 2018-07-03 11:18:03.540252098 -0600
@@ -136,7 +136,7 @@ LINK_FILES+=$(TEST_LIBS)
# Customizations
$(KNOWN_WARNINGS): %.$(OBJ): %.cpp
- $(CPLUS) $(COMPILE_ONLY) $(subst $(WARNING_KEY),,$(CPLUS_FLAGS)) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $<
+ $(CPLUS) $(COMPILE_ONLY) $(CPLUS_FLAGS) $(CXX_ONLY_FLAGS) $(CXX_WARN_SUPPRESS) $(INCLUDES) $<
tbb_misc.$(OBJ): version_string.ver
tbb_misc.$(OBJ): INCLUDES+=$(INCLUDE_KEY).
diff -up tbb-2018_U5/build/Makefile.tbbmalloc\~ tbb-2018_U5/build/Makefile.tbbmalloc
--- tbb-2018_U5/build/Makefile.tbbmalloc~ 2018-07-03 11:16:37.945377902 -0600
+++ tbb-2018_U5/build/Makefile.tbbmalloc 2018-07-03 11:16:58.872102659 -0600
@@ -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 -dup tbb-2018_U5/build/Makefile.test\~ tbb-2018_U5/build/Makefile.test
--- tbb-2018_U5/build/Makefile.test~ 2018-06-19 10:04:20.000000000 -0600
+++ tbb-2018_U5/build/Makefile.test 2018-07-03 11:18:53.651592978 -0600
@@ -272,7 +272,7 @@ test_tbb_plain: $(TEST_PREREQUISITE) $(T
# For deprecated files, we don't mind warnings etc., thus compilation rules are most relaxed
-CPLUS_FLAGS_DEPRECATED = $(DEFINE_KEY)__TBB_TEST_DEPRECATED=1 $(subst $(WARNING_KEY),,$(CPLUS_FLAGS)) $(WARNING_SUPPRESS) $(INCLUDE_KEY)$(tbb_root)/src/test
+CPLUS_FLAGS_DEPRECATED = $(DEFINE_KEY)__TBB_TEST_DEPRECATED=1 $(CPLUS_FLAGS) $(WARNING_SUPPRESS) $(INCLUDE_KEY)$(tbb_root)/src/test
TEST_TBB_OLD.OBJ = test_concurrent_vector_v2.$(OBJ) test_concurrent_queue_v2.$(OBJ) test_mutex_v2.$(OBJ) test_task_scheduler_observer_v3.$(OBJ)
$(TEST_TBB_OLD.OBJ): CPLUS_FLAGS := $(CPLUS_FLAGS_DEPRECATED)
Diff finished. Tue Jul 3 11:19:32 2018

BIN
tbb-2020.3.tar.gz Normal file

Binary file not shown.

View File

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

View File

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

View File

@ -1,19 +1,17 @@
Name: tbb Name: tbb
Version: 2018.5 Version: 2020.3
Release: 4 Release: 1
Summary: Threading Building Blocks lets you easily write parallel C++ programs Summary: Threading Building Blocks lets you easily write parallel C++ programs
License: ASL 2.0 License: ASL 2.0
URL: http://threadingbuildingblocks.org/ URL: http://threadingbuildingblocks.org/
Source0: https://github.com/01org/tbb/archive/2018_U5.tar.gz Source0: https://github.com/intel/tbb/archive/v%{version}/%{name}-%{version}.tar.gz
Source6: tbb.pc Source6: tbb.pc
Source7: tbbmalloc.pc Source7: tbbmalloc.pc
Source8: tbbmalloc_proxy.pc Source8: tbbmalloc_proxy.pc
Patch1: tbb-4.4-cxxflags.patch Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch
Patch2: tbb-4.0-mfence.patch
Patch3: tbb-2018U5-dont-snip-Wall.patch
BuildRequires: gcc-c++ swig python2-devel python3-devel BuildRequires: gcc-c++ doxygen swig python3-devel
%description %description
Threading Building Blocks (TBB) lets you easily write parallel C++ programs that Threading Building Blocks (TBB) lets you easily write parallel C++ programs that
@ -38,14 +36,6 @@ Obsoletes: tbb-doc < %{version}-%{release}
%description help %description help
Man pages and other related documents for tbb. Man pages and other related documents for tbb.
%package -n python2-tbb
Summary: TBB module of Python 2
%{?python_provide:%python_provide python2-tbb}
%description -n python2-tbb
TBB module of Python 2
%package -n python3-tbb %package -n python3-tbb
Summary: TBB module of Python 3 Summary: TBB module of Python 3
%{?python_provide:%python_provide python3-tbb} %{?python_provide:%python_provide python3-tbb}
@ -54,38 +44,18 @@ Summary: TBB module of Python 3
TBB module of Python 3 TBB module of Python 3
%prep %prep
%autosetup -n tbb-2018_U5 -p1 %autosetup -n oneTBB-%{version} -p1
sed -i 's/"`hostname -s`" ("`uname -m`"/openEulerbuild (%{_arch}/' \ sed -i 's/"`hostname -s`" ("`uname -m`"/openEulerbuild (%{_arch}/' \
build/version_info_linux.sh build/version_info_linux.sh
sed -i 's/-mrtm//' build/linux.gcc.inc sed -i 's/-mrtm//' build/linux.gcc.inc
sed -i 's,env python,python2,' python/TBB.py python/tbb/__*.py sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
sed -i '/^#!/d' python/tbb/{pool,test}.py sed -i '/^#!/d' python/tbb/{pool,test}.py
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
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
%build %build
%ifarch %{ix86}
cp -a build build.orig
make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \
CXXFLAGS="$RPM_OPT_FLAGS -march=pentium4 -msse2" \
LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS"
mv build build.sse2
mv build.orig build
%endif
%make_build tbb_build_prefix=obj stdver=c++14 \ %make_build tbb_build_prefix=obj stdver=c++14 \
CXXFLAGS="$RPM_OPT_FLAGS" \ CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS" LDFLAGS="$RPM_LD_FLAGS -lpthread"
%define pcsource {%{SOURCE6} %{SOURCE7} %{SOURCE8}} %define pcsource {%{SOURCE6} %{SOURCE7} %{SOURCE8}}
for pcfile in %{pcsource}; do for pcfile in %{pcsource}; do
base=$(basename ${pcfile}) base=$(basename ${pcfile})
@ -97,19 +67,13 @@ done
pushd python pushd python
%make_build -C rml stdver=c++14 \ %make_build -C rml stdver=c++14 \
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
PIC_KEY="-fPIC -Wl,--as-needed" LDFLAGS="$RPM_LD_FLAGS" LDFLAGS="$RPM_LD_FLAGS -lpthread"
cp -p rml/libirml.so* .
%py2_build
popd
pushd python3
%make_build -C rml stdver=c++14 \
CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
PIC_KEY="-fPIC -Wl,--as-needed" LDFLAGS="$RPM_LD_FLAGS"
cp -p rml/libirml.so* . cp -p rml/libirml.so* .
%py3_build %py3_build
popd popd
make doxygen
%check %check
make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS" make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
@ -117,15 +81,6 @@ make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="$RPM_OPT_FLAGS"
mkdir -p %{buildroot}/%{_libdir} mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}/%{_includedir} mkdir -p %{buildroot}/%{_includedir}
%ifarch %{ix86}
mkdir -p %{buildroot}/%{_libdir}/sse2
pushd build.sse2/obj_release
for file in libtbb{,malloc{,_proxy}}; do
install -p -D -m 755 ${file}.so.2 %{buildroot}/%{_libdir}/sse2
done
popd
%endif
pushd build/obj_release pushd build/obj_release
for file in libtbb{,malloc{,_proxy}}; do for file in libtbb{,malloc{,_proxy}}; do
install -p -D -m 755 ${file}.so.2 %{buildroot}/%{_libdir} install -p -D -m 755 ${file}.so.2 %{buildroot}/%{_libdir}
@ -150,18 +105,11 @@ cp -p src/rml/include/*.h %{buildroot}%{_includedir}/rml
. build/obj_release/tbbvars.sh . build/obj_release/tbbvars.sh
pushd python pushd python
%py2_install
chmod a+x %{buildroot}%{python2_sitearch}/TBB.py
chmod a+x %{buildroot}%{python2_sitearch}/tbb/__*.py
cp -p libirml.so.1 %{buildroot}%{_libdir}
ln -s libirml.so.1 %{buildroot}%{_libdir}/libirml.so
popd
pushd python3
%py3_install %py3_install
chmod a+x %{buildroot}%{python3_sitearch}/TBB.py chmod a+x %{buildroot}%{python3_sitearch}/TBB.py
chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py
cp -p libirml.so.1 %{buildroot}%{_libdir} cp -p libirml.so.1 %{buildroot}%{_libdir}
ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
popd popd
mkdir -p %{buildroot}%{_libdir}/cmake mkdir -p %{buildroot}%{_libdir}/cmake
@ -175,9 +123,6 @@ rm %{buildroot}%{_libdir}/cmake/tbb/README.rst
%license LICENSE %license LICENSE
%{_libdir}/libirml.so.1 %{_libdir}/libirml.so.1
%{_libdir}/*.so.2 %{_libdir}/*.so.2
%ifarch %{ix86}
%{_libdir}/sse2/*.so.2
%endif
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
@ -189,19 +134,17 @@ rm %{buildroot}%{_libdir}/cmake/tbb/README.rst
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%doc doc/Release_Notes.txt doc/html README README.md cmake/README.rst CHANGES %doc doc/Release_Notes.txt html README README.md cmake/README.rst CHANGES
%files -n python2-tbb
%doc python/index.html
%{python2_sitearch}/TBB*
%{python2_sitearch}/tbb/
%files -n python3-tbb %files -n python3-tbb
%doc python3/index.html %doc python/index.html
%{python3_sitearch}/TBB* %{python3_sitearch}/TBB*
%{python3_sitearch}/tbb/ %{python3_sitearch}/tbb/
%{python3_sitearch}/__pycache__/TBB* %{python3_sitearch}/__pycache__/TBB*
%changelog %changelog
* Fri Jul 24 2020 shixuantong <shixuantong@huawei.com> - 2020.3-1
- update to 2020.3-1
* Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 2018.5-4 * Fri Feb 14 2020 lingsheng <lingsheng@huawei.com> - 2018.5-4
- Package init - Package init