- Replace mfence instruction with xchg to make it run on ia32-class
machines without SSE2. - Resolves: #600654
This commit is contained in:
parent
a33e0baa33
commit
43fea0cf58
20
tbb-2.2-mfence.patch
Normal file
20
tbb-2.2-mfence.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
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
|
9
tbb.spec
9
tbb.spec
@ -11,7 +11,7 @@
|
|||||||
Summary: The Threading Building Blocks library abstracts low-level threading details
|
Summary: The Threading Building Blocks library abstracts low-level threading details
|
||||||
Name: tbb
|
Name: tbb
|
||||||
Version: %{major}.%{minor}
|
Version: %{major}.%{minor}
|
||||||
Release: 1.%{releasedate}%{?dist}
|
Release: 2.%{releasedate}%{?dist}
|
||||||
License: GPLv2 with exceptions
|
License: GPLv2 with exceptions
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://threadingbuildingblocks.org/
|
URL: http://threadingbuildingblocks.org/
|
||||||
@ -26,6 +26,7 @@ Source2: %{source_2}
|
|||||||
Source3: %{source_3}
|
Source3: %{source_3}
|
||||||
Source4: %{source_4}
|
Source4: %{source_4}
|
||||||
Patch1: tbb-2.2-20090809-cxxflags.patch
|
Patch1: tbb-2.2-20090809-cxxflags.patch
|
||||||
|
Patch2: tbb-2.2-mfence.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
BuildRequires: libstdc++-devel
|
BuildRequires: libstdc++-devel
|
||||||
# We need "arch" and "hostname" binaries:
|
# We need "arch" and "hostname" binaries:
|
||||||
@ -66,6 +67,7 @@ C++ library.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{sourcebasename}
|
%setup -q -n %{sourcebasename}
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
|
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
|
||||||
@ -115,6 +117,11 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%doc %{source_4}
|
%doc %{source_4}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 10 2010 Petr Machata <pmachata@redhat.com> - 2.2-2.20090809
|
||||||
|
- Replace mfence instruction with xchg to make it run on ia32-class
|
||||||
|
machines without SSE2.
|
||||||
|
- Resolves: #600654
|
||||||
|
|
||||||
* Tue Nov 3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809
|
* Tue Nov 3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809
|
||||||
- New upstream 2.2
|
- New upstream 2.2
|
||||||
- Resolves: #521571
|
- Resolves: #521571
|
||||||
|
Loading…
Reference in New Issue
Block a user