From dba72839e1603b1be0d2425e1fd82c3b9410971d Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 22 May 2013 17:01:44 +0200 Subject: [PATCH] Fix mfence patch - Since the __TBB_full_memory_fence macro was function-call-like, it stole () intended for function invocation. GCC now warns about this. --- tbb-4.0-mfence.patch | 2 +- tbb.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tbb-4.0-mfence.patch b/tbb-4.0-mfence.patch index 09a89fc..a463bc9 100644 --- a/tbb-4.0-mfence.patch +++ b/tbb-4.0-mfence.patch @@ -6,7 +6,7 @@ diff -up tbb40_20110809oss/include/tbb/machine/linux_ia32.h\~ tbb40_20110809oss/ #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() __TBB_full_memory_fence_imp ++#define __TBB_full_memory_fence() __TBB_full_memory_fence_imp() +inline void __TBB_full_memory_fence_imp() { + int tmp; + __asm__ __volatile__("xchg %0,%0" diff --git a/tbb.spec b/tbb.spec index ae86dd1..1b30a33 100644 --- a/tbb.spec +++ b/tbb.spec @@ -10,7 +10,7 @@ Summary: The Threading Building Blocks library abstracts low-level threading details Name: tbb Version: %{dotver} -Release: 1.%{releasedate}%{?dist} +Release: 2.%{releasedate}%{?dist} License: GPLv2 with exceptions Group: Development/Tools URL: http://threadingbuildingblocks.org/ @@ -119,6 +119,10 @@ rm -rf ${RPM_BUILD_ROOT} %doc doc/html %changelog +* Wed May 22 2013 Petr Machata - 4.1-1.20130314 +- Fix mfence patch. Since the __TBB_full_memory_fence macro was + function-call-like, it stole () intended for function invocation. + * Wed May 22 2013 Petr Machata - 4.1-1.20130314 - Rebase to 4.1 update 3