Fix cmake file installation (bz 1930389).
- Allow use of RTM instructions when available. - At upstream's suggestion, do not force ITT_NOTIFY support. - Drop -fetchadd64 patch, only needed for forced ITT_NOTIFY support.
This commit is contained in:
		
							parent
							
								
									177a3e4a33
								
							
						
					
					
						commit
						000c049388
					
				| @ -1,12 +0,0 @@ | |||||||
| diff -up tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h.orig tbb-2019_U9/src/tbb/tools_api/ittnotify_config.h
 |  | ||||||
| --- tbb-2020.1/src/tbb/tools_api/ittnotify_config.h.orig	2020-01-21 04:26:46.000000000 -0700
 |  | ||||||
| +++ tbb-2020.1/src/tbb/tools_api/ittnotify_config.h	2020-01-22 20:59:51.911673011 -0700
 |  | ||||||
| @@ -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 */ |  | ||||||
|   |  | ||||||
							
								
								
									
										29
									
								
								tbb.spec
									
									
									
									
									
								
							
							
						
						
									
										29
									
								
								tbb.spec
									
									
									
									
									
								
							| @ -1,7 +1,7 @@ | |||||||
| Name:    tbb | Name:    tbb | ||||||
| Summary: The Threading Building Blocks library abstracts low-level threading details | Summary: The Threading Building Blocks library abstracts low-level threading details | ||||||
| Version: 2020.3 | Version: 2020.3 | ||||||
| Release: 3%{?dist} | Release: 4%{?dist} | ||||||
| License: ASL 2.0 | License: ASL 2.0 | ||||||
| URL:     http://threadingbuildingblocks.org/ | URL:     http://threadingbuildingblocks.org/ | ||||||
| 
 | 
 | ||||||
| @ -27,10 +27,7 @@ Patch2: tbb-2019-test-thread-monitor.patch | |||||||
| # than 2 threads will be available to use it. | # than 2 threads will be available to use it. | ||||||
| Patch3: tbb-2019-test-task-scheduler-init.patch | Patch3: tbb-2019-test-task-scheduler-init.patch | ||||||
| 
 | 
 | ||||||
| # Fix compilation on aarch64 and s390x.  See | BuildRequires: cmake | ||||||
| # https://github.com/intel/tbb/issues/186 |  | ||||||
| Patch4: tbb-2019-fetchadd4.patch |  | ||||||
| 
 |  | ||||||
| BuildRequires: doxygen | BuildRequires: doxygen | ||||||
| BuildRequires: gcc-c++ | BuildRequires: gcc-c++ | ||||||
| BuildRequires: make | BuildRequires: make | ||||||
| @ -81,11 +78,8 @@ Python 3 TBB module. | |||||||
| sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \ | sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \ | ||||||
|     build/version_info_linux.sh |     build/version_info_linux.sh | ||||||
| 
 | 
 | ||||||
| # Do not assume the RTM instructions are available. |  | ||||||
| # Insert --as-needed before the libraries to be linked. | # Insert --as-needed before the libraries to be linked. | ||||||
| sed -e 's/-mrtm//' \ | sed -i "s/-fPIC/& -Wl,--as-needed/" build/linux.gcc.inc | ||||||
|     -e "s/-fPIC/& -Wl,--as-needed/" \ |  | ||||||
|     -i build/linux.gcc.inc |  | ||||||
| 
 | 
 | ||||||
| # Invoke the right python binary directly | # Invoke the right python binary directly | ||||||
| sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py | sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py | ||||||
| @ -105,7 +99,7 @@ fi | |||||||
| 
 | 
 | ||||||
| %make_build tbb_build_prefix=obj stdver=c++14 \ | %make_build tbb_build_prefix=obj stdver=c++14 \ | ||||||
|     compiler=${compiler} \ |     compiler=${compiler} \ | ||||||
|     CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |     CXXFLAGS="%{optflags} -DUSE_PTHREAD" \ | ||||||
|     LDFLAGS="$RPM_LD_FLAGS -lpthread" |     LDFLAGS="$RPM_LD_FLAGS -lpthread" | ||||||
| for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do | for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do | ||||||
|     base=$(basename ${file}) |     base=$(basename ${file}) | ||||||
| @ -118,7 +112,7 @@ done | |||||||
| pushd python | pushd python | ||||||
| %make_build -C rml stdver=c++14 \ | %make_build -C rml stdver=c++14 \ | ||||||
|     compiler=${compiler} \ |     compiler=${compiler} \ | ||||||
|     CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |     CPLUS_FLAGS="%{optflags} -DUSE_PTHREAD" \ | ||||||
|     LDFLAGS="$RPM_LD_FLAGS -lpthread" |     LDFLAGS="$RPM_LD_FLAGS -lpthread" | ||||||
| cp -p rml/libirml.so* . | cp -p rml/libirml.so* . | ||||||
| %py3_build | %py3_build | ||||||
| @ -175,8 +169,9 @@ popd | |||||||
| 
 | 
 | ||||||
| # Install the cmake files | # Install the cmake files | ||||||
| mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake | mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake | ||||||
| cp -a cmake $RPM_BUILD_ROOT%{_libdir}/cmake/%{name} | cmake -DTBB_ROOT=$RPM_BUILD_ROOT%{_prefix} -DTBB_OS=Linux \ | ||||||
| rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst |   -P cmake/tbb_config_generator.cmake | ||||||
|  | mv $RPM_BUILD_ROOT%{_prefix}/cmake $RPM_BUILD_ROOT%{_libdir}/cmake/TBB | ||||||
| 
 | 
 | ||||||
| %files | %files | ||||||
| %doc doc/Release_Notes.txt README.md | %doc doc/Release_Notes.txt README.md | ||||||
| @ -191,7 +186,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst | |||||||
| %{_includedir}/rml/ | %{_includedir}/rml/ | ||||||
| %{_includedir}/tbb/ | %{_includedir}/tbb/ | ||||||
| %{_libdir}/*.so | %{_libdir}/*.so | ||||||
| %{_libdir}/cmake/tbb/ | %{_libdir}/cmake/TBB/ | ||||||
| %{_libdir}/pkgconfig/*.pc | %{_libdir}/pkgconfig/*.pc | ||||||
| 
 | 
 | ||||||
| %files doc | %files doc | ||||||
| @ -205,6 +200,12 @@ rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst | |||||||
| %{python3_sitearch}/__pycache__/TBB* | %{python3_sitearch}/__pycache__/TBB* | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Thu Feb 18 2021 Jerry James <loganjerry@gmail.com> - 2020.3-4 | ||||||
|  | - Fix cmake file installation (bz 1930389) | ||||||
|  | - Allow use of RTM instructions when available | ||||||
|  | - At upstream's suggestion, do not force ITT_NOTIFY support | ||||||
|  | - Drop -fetchadd64 patch, only needed for forced ITT_NOTIFY support | ||||||
|  | 
 | ||||||
| * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.3-3 | * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2020.3-3 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user