Rebase to 3.0-r6

This commit is contained in:
Petr Machata 2011-07-26 16:41:37 +02:00
parent bb37126569
commit 0f662bdfb8
7 changed files with 85 additions and 64 deletions

4
.gitignore vendored
View File

@ -2,3 +2,7 @@ tbb22_20090809oss_src.tgz
Tutorial.pdf
Reference.pdf
Getting_Started.pdf
/tbb30_20110419oss_src.tgz
/Design_Patterns.pdf
/CHANGES.txt
tbb*/

10
sources
View File

@ -1,4 +1,6 @@
c621053887c7ee86932da43e2deb3bff tbb22_20090809oss_src.tgz
8fee2897156b387de17a84ef0df75603 Tutorial.pdf
2c0f0bb046ae96ba57ef620fce42af56 Reference.pdf
5ca846dbddf77557b6a0702f31365a31 Getting_Started.pdf
c7d1712d9e3ff76d9037aff5fcd67a17 tbb30_20110419oss_src.tgz
3378f28664adc82d20bccbe35ea4fbfb Design_Patterns.pdf
2d56ac8475941c81f004359ab75e4120 Getting_Started.pdf
bb609bdd5dcb4b0a8bc0709e3bef622e Reference.pdf
30239687f75afd96ae1ad62e380633b9 Tutorial.pdf
62d5169d83f256b502c6a7d0729a68e9 CHANGES.txt

View File

@ -1,15 +0,0 @@
--- tbb22_20090809oss_src/build/linux.gcc.inc 2007-09-28 22:13:21.000000000 +0200
+++ tbb22_20090809oss_src.pm/build/linux.gcc.inc 2007-12-19 16:56:13.000000000 +0100
@@ -45,10 +45,10 @@ LIBS = -lpthread -lrt -ldl
C_FLAGS = $(CPLUS_FLAGS)
ifeq ($(cfg), release)
- CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD
+ CPLUS_FLAGS = $(CXXFLAGS) -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD
endif
ifeq ($(cfg), debug)
- CPLUS_FLAGS = -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
+ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
endif
ASM=

View File

@ -1,20 +0,0 @@
diff -up /home/petr/fedora/tbb/devel/tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h\~ /home/petr/fedora/tbb/devel/tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h
--- tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h~ 2009-08-12 09:05:03.000000000 +0200
+++ tbb22_20090809oss-pm/include/tbb/machine/linux_ia32.h 2010-06-10 17:11:17.000000000 +0200
@@ -39,7 +39,13 @@
#define __TBB_release_consistency_helper() __asm__ __volatile__("": : :"memory")
-inline void __TBB_rel_acq_fence() { __asm__ __volatile__("mfence": : :"memory"); }
+inline void __TBB_rel_acq_fence() {
+ int tmp;
+ __asm__ __volatile__("xchg %0,%0"
+ : "=r"(tmp)
+ : "r"(tmp)
+ : "memory");
+}
#define __MACHINE_DECL_ATOMICS(S,T,X) \
static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \
Diff finished. Thu Jun 10 17:13:43 2010

18
tbb-3.0-cxxflags.patch Normal file
View File

@ -0,0 +1,18 @@
diff -up tbb30_20110419oss/build/linux.gcc.inc\~ tbb30_20110419oss/build/linux.gcc.inc
--- tbb30_20110419oss/build/linux.gcc.inc~ 2011-04-19 13:48:58.000000000 +0200
+++ tbb30_20110419oss/build/linux.gcc.inc 2011-07-26 14:02:48.482006056 +0200
@@ -51,10 +51,10 @@ C_FLAGS = $(CPLUS_FLAGS)
ITT_NOTIFY = -DDO_ITT_NOTIFY
ifeq ($(cfg), release)
- CPLUS_FLAGS = $(ITT_NOTIFY) -O2 -DUSE_PTHREAD
+ CPLUS_FLAGS = $(CXXFLAGS) $(ITT_NOTIFY) -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
ifneq (0,$(cpp0x))
Diff finished. Tue Jul 26 14:02:54 2011

20
tbb-3.0-mfence.patch Normal file
View File

@ -0,0 +1,20 @@
diff -up tbb30_20110419oss/include/tbb/machine/linux_ia32.h\~ tbb30_20110419oss/include/tbb/machine/linux_ia32.h
--- tbb30_20110419oss/include/tbb/machine/linux_ia32.h~ 2011-04-19 13:48:59.000000000 +0200
+++ tbb30_20110419oss/include/tbb/machine/linux_ia32.h 2011-07-26 16:09:19.986615628 +0200
@@ -40,7 +40,13 @@
#define __TBB_control_consistency_helper()
#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")
+inline void __TBB_full_memory_fence() {
+ int tmp;
+ __asm__ __volatile__("xchg %0,%0"
+ : "=r"(tmp)
+ : "r"(tmp)
+ : "memory");
+}
#if __TBB_ICC_ASM_VOLATILE_BROKEN
#define __TBB_VOLATILE
Diff finished. Tue Jul 26 16:09:26 2011

View File

@ -1,32 +1,36 @@
%define releasedate 20090809
%define major 2
%define minor 2
%define releasedate 20110419
%define major 3
%define minor 0
%define dotver %{major}.%{minor}
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
%define sourcefilename %{sourcebasename}_src.tgz
%define source_2 Getting_Started.pdf
%define source_3 Reference.pdf
%define source_4 Tutorial.pdf
Summary: The Threading Building Blocks library abstracts low-level threading details
Name: tbb
Version: %{major}.%{minor}
Release: 3.%{releasedate}%{?dist}
Version: %{dotver}
Release: 1.%{releasedate}%{?dist}
License: GPLv2 with exceptions
Group: Development/Tools
URL: http://threadingbuildingblocks.org/
Source: http://threadingbuildingblocks.org/uploads/77/142/2.2/%{sourcefilename}
# RPM can't handle spaces in specs, so don't include full URL. Each
# of the following sources was downloaded from:
# http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/
# Unfortunately, because they regularly replace the "Latest"
# documentation with what's actually Latest at that point, these
# sources may no longer be available at that link.
Source2: %{source_2}
Source3: %{source_3}
Source4: %{source_4}
Patch1: tbb-2.2-20090809-cxxflags.patch
Patch2: tbb-2.2-mfence.patch
Source0: http://threadingbuildingblocks.org/uploads/76/169/3.0%%20update%%206/tbb30_20110419oss_src.tgz
# Upstream regularly replaces the "Latest" documentation with what's
# actually Latest at that point. These sources may no longer match
# what's uploaded anymore.
%define docurl http://threadingbuildingblocks.org/uploads/81/91/Latest%%20Open%%20Source%%20Documentation/
%define source_1 CHANGES.txt
%define source_2 Getting_Started.pdf
%define source_3 Reference.pdf
%define source_4 Tutorial.pdf
%define source_5 Design_Patterns.pdf
Source1: %{docurl}/%{source_1}
Source2: %{docurl}/%{source_2}
Source3: %{docurl}/%{source_3}
Source4: %{docurl}/%{source_4}
Source5: %{docurl}/%{source_5}
Patch1: tbb-3.0-cxxflags.patch
Patch2: tbb-3.0-mfence.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libstdc++-devel
# We need "arch" and "hostname" binaries:
@ -48,7 +52,7 @@ 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: tbb = %{version}-%{release}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Header files and shared object symlinks for the Threading Building
@ -72,7 +76,7 @@ C++ library.
%build
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
cp -p "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" .
cp -p "%{SOURCE1}" "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" "%{SOURCE5}" .
%install
rm -rf $RPM_BUILD_ROOT
@ -101,12 +105,12 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
%doc COPYING
%doc doc/Release_Notes.txt
%doc COPYING doc/Release_Notes.txt
%{_libdir}/*.so.2
%files devel
%defattr(-,root,root,-)
%doc %{source_1}
%{_includedir}/tbb
%{_libdir}/*.so
@ -115,8 +119,16 @@ rm -rf ${RPM_BUILD_ROOT}
%doc %{source_2}
%doc %{source_3}
%doc %{source_4}
%doc %{source_5}
%changelog
* Tue Jul 26 2011 Petr Machata <pmachata@redhat.com> - 3.0-1.20110419
- Rebase to 3.0-r6
- Port both patches
- Package Design_Patterns.pdf
- Thanks to Richard Shaw for initial rebase patch
- Resolves: #723043
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-3.20090809
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild