update PPC patch, use power64 macro
This commit is contained in:
parent
cdf8b4c6ed
commit
7709c72122
@ -1,7 +1,7 @@
|
|||||||
diff -Naur OpenImageIO-oiio-2939154.orig/src/include/thread.h OpenImageIO-oiio-2939154/src/include/thread.h
|
diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/include/thread.h
|
||||||
--- OpenImageIO-oiio-2939154.orig/src/include/thread.h 2012-06-04 12:30:16.000000000 -0500
|
--- oiio-Release-1.1.3/src/include/thread.h.ppc 2013-01-10 02:13:37.000000000 +0100
|
||||||
+++ OpenImageIO-oiio-2939154/src/include/thread.h 2012-06-13 15:14:36.648990016 -0500
|
+++ oiio-Release-1.1.3/src/include/thread.h 2013-01-28 14:30:48.667934337 +0100
|
||||||
@@ -103,7 +103,7 @@
|
@@ -98,7 +98,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
||||||
@ -10,19 +10,19 @@ diff -Naur OpenImageIO-oiio-2939154.orig/src/include/thread.h OpenImageIO-oiio-2
|
|||||||
#define USE_GCC_ATOMICS
|
#define USE_GCC_ATOMICS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -272,6 +272,11 @@
|
@@ -224,6 +224,11 @@ atomic_exchange_and_add (volatile int *a
|
||||||
#elif defined(_WIN32)
|
#elif defined(_MSC_VER)
|
||||||
// Windows
|
// Windows
|
||||||
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
|
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
|
||||||
+#elif defined (__PPC__)
|
+#elif defined (__PPC__)
|
||||||
+ long long r;
|
+ long long r;
|
||||||
+ r = *at;
|
+ r = *at;
|
||||||
+ *at += x;
|
+ *at += x;
|
||||||
+ return r;
|
+ return r;
|
||||||
#else
|
#else
|
||||||
# error No atomics on this platform.
|
# error No atomics on this platform.
|
||||||
#endif
|
#endif
|
||||||
@@ -297,6 +302,11 @@
|
@@ -249,6 +254,11 @@ atomic_exchange_and_add (volatile long l
|
||||||
# else
|
# else
|
||||||
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
|
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
|
||||||
# endif
|
# endif
|
||||||
@ -34,18 +34,18 @@ diff -Naur OpenImageIO-oiio-2939154.orig/src/include/thread.h OpenImageIO-oiio-2
|
|||||||
#else
|
#else
|
||||||
# error No atomics on this platform.
|
# error No atomics on this platform.
|
||||||
#endif
|
#endif
|
||||||
@@ -322,6 +332,8 @@
|
@@ -274,6 +284,8 @@ atomic_compare_and_exchange (volatile in
|
||||||
return OSAtomicCompareAndSwap32Barrier (compareval, newval, at);
|
return OSAtomicCompareAndSwap32Barrier (compareval, newval, at);
|
||||||
#elif defined(_WIN32)
|
#elif defined(_MSC_VER)
|
||||||
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
|
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
|
||||||
+#elif defined(__PPC__)
|
+#elif defined(__PPC__)
|
||||||
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
|
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
|
||||||
#else
|
#else
|
||||||
# error No atomics on this platform.
|
# error No atomics on this platform.
|
||||||
#endif
|
#endif
|
||||||
@@ -341,6 +353,8 @@
|
@@ -293,6 +305,8 @@ atomic_compare_and_exchange (volatile lo
|
||||||
return OSAtomicCompareAndSwap64Barrier (compareval, newval, at);
|
return OSAtomicCompareAndSwap64Barrier (compareval, newval, at);
|
||||||
#elif defined(_WIN32)
|
#elif defined(_MSC_VER)
|
||||||
return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
|
return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
|
||||||
+#elif defined(__PPC__)
|
+#elif defined(__PPC__)
|
||||||
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
|
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: OpenImageIO
|
Name: OpenImageIO
|
||||||
Version: 1.1.3
|
Version: 1.1.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Library for reading and writing images
|
Summary: Library for reading and writing images
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -88,7 +88,7 @@ Development files for package %{name}
|
|||||||
#setup -q -n %{name}-oiio-%{githash2}
|
#setup -q -n %{name}-oiio-%{githash2}
|
||||||
%setup -q -n oiio-Release-%{version}
|
%setup -q -n oiio-Release-%{version}
|
||||||
%patch0 -p1 -b .exttbb
|
%patch0 -p1 -b .exttbb
|
||||||
%ifarch ppc ppc64
|
%ifarch ppc %{power64}
|
||||||
%patch2 -p1 -b .ppc
|
%patch2 -p1 -b .ppc
|
||||||
%endif
|
%endif
|
||||||
%patch3 -p1 -b .sha1
|
%patch3 -p1 -b .sha1
|
||||||
@ -125,7 +125,7 @@ rm -rf build/linux && mkdir -p build/linux && pushd build/linux
|
|||||||
%else
|
%else
|
||||||
-DUSE_TBB:BOOL=FALSE \
|
-DUSE_TBB:BOOL=FALSE \
|
||||||
%endif
|
%endif
|
||||||
%ifarch ppc ppc64
|
%ifarch ppc %{power64}
|
||||||
-DNOTHREADS:BOOL=TRUE \
|
-DNOTHREADS:BOOL=TRUE \
|
||||||
%endif
|
%endif
|
||||||
../../src
|
../../src
|
||||||
@ -172,6 +172,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 28 2013 Karsten Hopp <karsten@redhat.com> 1.1.3-3
|
||||||
|
- update PPC patch, use power64 macro
|
||||||
|
|
||||||
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.1.3-2
|
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 1.1.3-2
|
||||||
- rebuild due to "jpeg8-ABI" feature drop
|
- rebuild due to "jpeg8-ABI" feature drop
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user