diff --git a/2018_U5.tar.gz b/2018_U5.tar.gz deleted file mode 100644 index 44f5c5d279220fa7a13fe3c5f489e3793b8172f5..0000000000000000000000000000000000000000 Binary files a/2018_U5.tar.gz and /dev/null differ diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 1a596b528c5c6a80dea75be9afcf1530bf139c60..0000000000000000000000000000000000000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# tbb - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 12bd57ebd649d5ee6775ca7f45376bebb5c55556..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# tbb - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch b/bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch new file mode 100644 index 0000000000000000000000000000000000000000..02f1f23faad3c173b6f4d0a6f2ab2fe370919682 --- /dev/null +++ b/bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch @@ -0,0 +1,35 @@ +From e9a3bdcebf1d469b36b874d01c4116e7e23821cd Mon Sep 17 00:00:00 2001 +From: lvying6 +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 +--- + 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 + diff --git a/oneTBB-2020.2.tar.gz b/oneTBB-2020.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..0bd4cf5d071d76d1dd1caef48b0670d64e7f0d6b Binary files /dev/null and b/oneTBB-2020.2.tar.gz differ diff --git a/tbb-2018U5-dont-snip-Wall.patch b/tbb-2018U5-dont-snip-Wall.patch deleted file mode 100644 index 199cd56b0ea2f2089feed81c082f3ae11196365a..0000000000000000000000000000000000000000 --- a/tbb-2018U5-dont-snip-Wall.patch +++ /dev/null @@ -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 diff --git a/tbb-4.0-mfence.patch b/tbb-4.0-mfence.patch deleted file mode 100644 index eae98ee916449b8edfcddc2d0594839152d40a10..0000000000000000000000000000000000000000 --- a/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/tbb-4.4-cxxflags.patch b/tbb-4.4-cxxflags.patch deleted file mode 100644 index 4aa6606a481c4efa1c90361c9affae4742c6cfec..0000000000000000000000000000000000000000 --- a/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/tbb.spec b/tbb.spec index 5bffdf69ef5d6e647c2ac1cc0cbe1472f9ea9d93..6854cc8512c2dc89ad351cd9d72928fe86ea3c54 100644 --- a/tbb.spec +++ b/tbb.spec @@ -1,19 +1,17 @@ Name: tbb -Version: 2018.5 -Release: 4 +Version: 2020.2 +Release: 1 Summary: Threading Building Blocks lets you easily write parallel C++ programs License: ASL 2.0 URL: http://threadingbuildingblocks.org/ -Source0: https://github.com/01org/tbb/archive/2018_U5.tar.gz +Source0: https://github.com/01org/tbb/archive/oneTBB-2020.2.tar.gz Source6: tbb.pc Source7: tbbmalloc.pc Source8: tbbmalloc_proxy.pc -Patch1: tbb-4.4-cxxflags.patch -Patch2: tbb-4.0-mfence.patch -Patch3: tbb-2018U5-dont-snip-Wall.patch +Patch9000: bugfix-tbb-fix-__TBB_machine_fetchadd4-was-not-declared-on-.patch -BuildRequires: gcc-c++ swig python2-devel python3-devel +BuildRequires: gcc-c++ doxygen swig python3-devel %description Threading Building Blocks (TBB) lets you easily write parallel C++ programs that @@ -38,14 +36,6 @@ Obsoletes: tbb-doc < %{version}-%{release} %description help 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 Summary: TBB module of Python 3 %{?python_provide:%python_provide python3-tbb} @@ -54,38 +44,18 @@ Summary: TBB module of Python 3 TBB module of Python 3 %prep -%autosetup -n tbb-2018_U5 -p1 +%autosetup -n oneTBB-%{version} -p1 sed -i 's/"`hostname -s`" ("`uname -m`"/openEulerbuild (%{_arch}/' \ build/version_info_linux.sh 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 -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 -%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 \ - CXXFLAGS="$RPM_OPT_FLAGS" \ - LDFLAGS="-Wl,--as-needed $RPM_LD_FLAGS" - + CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ + LDFLAGS="$RPM_LD_FLAGS -lpthread" %define pcsource {%{SOURCE6} %{SOURCE7} %{SOURCE8}} for pcfile in %{pcsource}; do base=$(basename ${pcfile}) @@ -97,19 +67,13 @@ done pushd python %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* . -%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" + LDFLAGS="$RPM_LD_FLAGS -lpthread" cp -p rml/libirml.so* . %py3_build popd +make doxygen + %check 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}/%{_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 for file in libtbb{,malloc{,_proxy}}; do 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 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 chmod a+x %{buildroot}%{python3_sitearch}/TBB.py chmod a+x %{buildroot}%{python3_sitearch}/tbb/__*.py cp -p libirml.so.1 %{buildroot}%{_libdir} +ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so popd mkdir -p %{buildroot}%{_libdir}/cmake @@ -175,9 +123,6 @@ rm %{buildroot}%{_libdir}/cmake/tbb/README.rst %license LICENSE %{_libdir}/libirml.so.1 %{_libdir}/*.so.2 -%ifarch %{ix86} -%{_libdir}/sse2/*.so.2 -%endif %files devel %defattr(-,root,root) @@ -189,19 +134,17 @@ rm %{buildroot}%{_libdir}/cmake/tbb/README.rst %files help %defattr(-,root,root) -%doc doc/Release_Notes.txt doc/html README README.md cmake/README.rst CHANGES - -%files -n python2-tbb -%doc python/index.html -%{python2_sitearch}/TBB* -%{python2_sitearch}/tbb/ +%doc doc/Release_Notes.txt html README README.md cmake/README.rst CHANGES %files -n python3-tbb -%doc python3/index.html +%doc python/index.html %{python3_sitearch}/TBB* %{python3_sitearch}/tbb/ %{python3_sitearch}/__pycache__/TBB* %changelog +* Sun Apr 26 2020 lvying - 2020.2-1 +* upgrade to version 2020.2 + * Fri Feb 14 2020 lingsheng - 2018.5-4 - Package init