From d9e76f50bdad103cf9c653b85a898703f4cb2420 Mon Sep 17 00:00:00 2001 From: Richard M. Shaw Date: Jul 01 2013 15:59:06 +0000 Subject: Update to lastest bugfix release. - Upstream patch makes native spinlocks faster than TBB. TBB no longer needed. --- diff --git a/OpenImageIO.spec b/OpenImageIO.spec index 3ebbdc1..47bd516 100644 --- a/OpenImageIO.spec +++ b/OpenImageIO.spec @@ -16,6 +16,7 @@ Patch0: oiio-ppc.patch Patch1: oiio-spinlocks.patch Patch2: oiio-arm.patch Patch3: oiio-s390.patch +Patch4: OpenImageIO-ppc.patch BuildRequires: cmake txt2man BuildRequires: qt4-devel @@ -81,12 +82,10 @@ Development files for package %{name} %prep %setup -q -n oiio-Release-%{version} -%ifarch ppc ppc64 -%patch0 -p1 -b .ppc -%endif %patch1 -p1 -b .spinlocks %patch2 -p1 -b .arm %patch3 -p1 -b .s390 +%patch4 -p1 -b .ppc # Install FindTBB.cmake install %{SOURCE101} src/cmake/modules/ @@ -167,6 +166,12 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1 - Update to lastest bugfix release. - Upstream patch makes native spinlocks faster than TBB. TBB no longer needed. +* Mon May 27 2013 Karsten Hopp 1.1.10-4 +- modify ppc patch for current release + +* Fri May 24 2013 Petr Machata - 1.1.10-3 +- Rebuild for TBB memory barrier bug + * Mon May 20 2013 Dan HorĂ¡k - 1.1.10-2 - fix build on s390(x) diff --git a/oiio-ppc.patch b/oiio-ppc.patch index 76d99fb..00ef9a0 100644 --- a/oiio-ppc.patch +++ b/oiio-ppc.patch @@ -1,20 +1,20 @@ -diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/include/thread.h ---- oiio-Release-1.1.3/src/include/thread.h.ppc 2013-01-10 02:13:37.000000000 +0100 -+++ oiio-Release-1.1.3/src/include/thread.h 2013-01-28 15:07:23.190624263 +0100 -@@ -98,7 +98,7 @@ +diff -up oiio-Release-1.1.10/src/include/thread.h.ppc oiio-Release-1.1.10/src/include/thread.h +--- oiio-Release-1.1.10/src/include/thread.h.ppc 2013-05-27 16:16:38.902025786 +0200 ++++ oiio-Release-1.1.10/src/include/thread.h 2013-05-27 17:00:19.856167856 +0200 +@@ -112,7 +112,7 @@ InterlockedExchangeAdd64 (volatile long #endif #if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401)) -#if !defined(__FreeBSD__) || defined(__x86_64__) -+#if !defined(__FreeBSD__) && !defined(__PPC__) || defined(__x86_64__) ++#if !defined(__FreeBSD__) && !defined(__powerpc__) || defined(__x86_64__) #define USE_GCC_ATOMICS #endif #endif -@@ -224,6 +224,11 @@ atomic_exchange_and_add (volatile int *a +@@ -235,6 +235,11 @@ atomic_exchange_and_add (volatile int *a #elif defined(_MSC_VER) // Windows return _InterlockedExchangeAdd ((volatile LONG *)at, x); -+#elif defined (__PPC__) ++#elif defined (__powerpc__) + long long r; + r = *at; + *at += x; @@ -22,11 +22,11 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl #else # error No atomics on this platform. #endif -@@ -249,6 +254,11 @@ atomic_exchange_and_add (volatile long l +@@ -257,6 +262,11 @@ atomic_exchange_and_add (volatile long l # else return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x); # endif -+#elif defined (__PPC__) ++#elif defined (__powerpc__) + long long r; + r = *at; + *at += x; @@ -34,17 +34,17 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl #else # error No atomics on this platform. #endif -@@ -274,6 +284,8 @@ atomic_compare_and_exchange (volatile in - return OSAtomicCompareAndSwap32Barrier (compareval, newval, at); +@@ -280,6 +290,8 @@ atomic_compare_and_exchange (volatile in + return a->compare_and_swap (newval, compareval) == newval; #elif defined(_MSC_VER) return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval); -+#elif defined(__PPC__) ++#elif defined(__powerpc__) + return ((*at == compareval) ? (*at = newval), 1 : 0); #else # error No atomics on this platform. #endif -@@ -293,6 +305,8 @@ atomic_compare_and_exchange (volatile lo - return OSAtomicCompareAndSwap64Barrier (compareval, newval, at); +@@ -297,6 +309,8 @@ atomic_compare_and_exchange (volatile lo + return a->compare_and_swap (newval, compareval) == newval; #elif defined(_MSC_VER) return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval); +#elif defined(__PPC__) @@ -52,12 +52,12 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl #else # error No atomics on this platform. #endif -@@ -324,7 +338,7 @@ pause (int delay) +@@ -326,7 +340,7 @@ pause (int delay) { - #if USE_TBB - __TBB_Pause(delay); --#elif defined(__GNUC__) -+#elif defined(__GNUC__) && !defined (__PPC__) + #if defined(__GNUC__) for (int i = 0; i < delay; ++i) { +-#if defined __arm__ || defined __s390__ ++#if defined __arm__ || defined __s390__ || defined __powerpc__ + __asm__ __volatile__("NOP;"); + #else __asm__ __volatile__("pause;"); - }