modify ppc patch for current release
This commit is contained in:
parent
83b655746f
commit
71bc860169
@ -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;");
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: OpenImageIO
|
||||
Version: 1.1.10
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Library for reading and writing images
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -12,10 +12,10 @@ Source0: https://download.github.com/oiio-Release-%{version}.tar.gz
|
||||
#Source1: oiio-images.tar.gz
|
||||
Source101: FindTBB.cmake
|
||||
|
||||
Patch0: OpenImageIO-ppc.patch
|
||||
Patch1: 589.patch
|
||||
Patch2: oiio-arm.patch
|
||||
Patch3: oiio-s390.patch
|
||||
Patch4: OpenImageIO-ppc.patch
|
||||
|
||||
BuildRequires: cmake txt2man
|
||||
BuildRequires: qt4-devel
|
||||
@ -81,12 +81,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/
|
||||
@ -163,6 +161,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon May 27 2013 Karsten Hopp <karsten@redhat.com> 1.1.10-4
|
||||
- modify ppc patch for current release
|
||||
|
||||
* Fri May 24 2013 Petr Machata <pmachata@redhat.com> - 1.1.10-3
|
||||
- Rebuild for TBB memory barrier bug
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user