Accepting request 209199 from home:k0da:ppc64le

- Fix build on ppc64le 
- added patches:
  * libatomic_ops-ppc64le.patch

OBS-URL: https://build.opensuse.org/request/show/209199
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libatomic_ops?expand=0&rev=7
This commit is contained in:
Jan Engelhardt 2013-12-02 23:56:24 +00:00 committed by Git OBS Bridge
parent a89d36224d
commit d0e1da472f
3 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,62 @@
Index: libatomic_ops-7.2/src/atomic_ops.h
===================================================================
--- libatomic_ops-7.2.orig/src/atomic_ops.h
+++ libatomic_ops-7.2/src/atomic_ops.h
@@ -241,7 +241,7 @@
# include "atomic_ops/sysdeps/gcc/m68k.h"
# endif /* __m68k__ */
# if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
- || defined(__powerpc64__) || defined(__ppc64__)
+ || defined(__powerpc64__) ||defined(__powerpc64le__) || defined(__ppc64__)
# include "atomic_ops/sysdeps/gcc/powerpc.h"
# endif /* __powerpc__ */
# if defined(__aarch64__)
Index: libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
===================================================================
--- libatomic_ops-7.2.orig/src/atomic_ops/sysdeps/gcc/powerpc.h
+++ libatomic_ops-7.2/src/atomic_ops/sysdeps/gcc/powerpc.h
@@ -71,7 +71,7 @@ AO_INLINE AO_t
AO_load_acquire(const volatile AO_t *addr)
{
AO_t result;
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#if defined(__powerpc64__) || defined(__powerpc64le__) || defined(__ppc64__) || defined(__64BIT__)
__asm__ __volatile__ (
"ld%U1%X1 %0,%1\n"
"cmpw %0,%0\n"
@@ -110,7 +110,7 @@ AO_store_release(volatile AO_t *addr, AO
/* only cost us a load immediate instruction. */
AO_INLINE AO_TS_VAL_t
AO_test_and_set(volatile AO_TS_t *addr) {
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
/* Completely untested. And we should be using smaller objects anyway. */
unsigned long oldval;
unsigned long temp = 1; /* locked value */
@@ -173,7 +173,7 @@ AO_INLINE int
AO_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val) {
AO_t oldval;
int result = 0;
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
/* FIXME: Completely untested. */
__asm__ __volatile__(
"1:ldarx %0,0,%2\n" /* load and reserve */
@@ -232,7 +232,7 @@ AO_INLINE AO_t
AO_fetch_and_add(volatile AO_t *addr, AO_t incr) {
AO_t oldval;
AO_t newval;
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#if defined(__powerpc64__) || defined(__powerpc64le__)|| defined(__ppc64__) || defined(__64BIT__)
/* FIXME: Completely untested. */
__asm__ __volatile__(
"1:ldarx %0,0,%2\n" /* load and reserve */
@@ -281,7 +281,7 @@ AO_fetch_and_add_full(volatile AO_t *add
}
#define AO_HAVE_fetch_and_add_full
-#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+#if defined(__powerpc64__) || defined(__powerpc64le__) || defined(__ppc64__) || defined(__64BIT__)
#else
# include "../ao_t_is_int.h"
#endif

View File

@ -1,4 +1,11 @@
-------------------------------------------------------------------
Mon Dec 2 21:00:35 UTC 2013 - dvaleev@suse.com
- Fix build on ppc64le
- added patches:
* libatomic_ops-ppc64le.patch
-------------------------------------------------------------------
Sun May 26 20:05:34 UTC 2013 - jengelh@inai.de
- Update to upstream release 7.2d

View File

@ -26,6 +26,7 @@ Url: http://www.hpl.hp.com/research/linux/atomic_ops/
Source: http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-%version.tar.gz
Patch1: libatomic_ops-aarch64.patch
Patch2: libatomic_ops-ppc64le.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -53,7 +54,7 @@ that involves minimum overhead across a variety of architectures.
%prep
%setup -qn %name-7.2
%patch -P 1 -p1
%patch -P 1 -P 2 -p1
%build
autoreconf -fi