[weasel-commit] Source: libatomic_ops=1.2-2

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Wed, 13 Jan 2010 13:26:03 -0500

================================
libatomic_ops:source=1.2-2 (previous: 1.2-1)
cvc rdiff libatomic_ops -1 /weasel.rpath.org@wgl:3-devel/1.2-2
================================
1.2-2 Filip Brcic (brcha@xxxxxxx) Wed Jan 13 13:25:54 2010
    fixed recipe and metadata

libatomic_ops-1.2-ppc64-load_acquire.patch: new
--- /dev/null
+++ libatomic_ops-1.2-ppc64-load_acquire.patch
@@ -0,0 +46 @@
+--- src/atomic_ops/sysdeps/gcc/powerpc.h.orig  2006-03-28 22:49:14.000000000 
+0000
++++ src/atomic_ops/sysdeps/gcc/powerpc.h       2007-06-08 23:10:07.000000000 
+0000
+@@ -63,6 +63,8 @@
+ /* seems to be that a data dependent branch followed by an isync is   */
+ /* cheaper.  And the documentation is fairly explicit that this also  */
+ /* has acquire semantics.                                             */
++/* ppc64 uses ld not lwz */
++#if defined(__powerpc64__) || defined(__ppc64__) || defined(__64BIT__)
+ AO_INLINE AO_t
+ AO_load_acquire(volatile AO_t *addr)
+ {
+@@ -72,7 +74,7 @@
+   /* registers.  I always got "impossible constraint" when I  */
+   /* tried the "y" constraint.                                        */
+   __asm__ __volatile__ (
+-    "lwz %0,%1\n"
++    "ld %0,%1\n"
+     "cmpw cr7,%0,%0\n"
+     "bne- cr7,1f\n"
+     "1: isync\n"
+@@ -80,7 +82,25 @@
+     : "m"(*addr) : "memory", "cc");
+   return result;
+ }
++#else
++AO_INLINE AO_t
++AO_load_acquire(volatile AO_t *addr)
++{
++  AO_t result;
+ 
++  /* FIXME: We should get gcc to allocate one of the condition        */
++  /* registers.  I always got "impossible constraint" when I  */
++  /* tried the "y" constraint.                                        */
++  __asm__ __volatile__ (
++    "lwz %0,%1\n"
++    "cmpw cr7,%0,%0\n"
++    "bne- cr7,1f\n"
++    "1: isync\n"
++    : "=r" (result)
++    : "m"(*addr) : "memory", "cc");
++  return result;
++}
++#endif
+ #define AO_HAVE_load_acquire
+ 
+ /* We explicitly specify store_release, since it relies       */

libatomic_ops.recipe: changed
Index: libatomic_ops.recipe
====================================================================
contents(size sha1)
inode(mtime)
--- libatomic_ops.recipe /weasel.rpath.org@wgl:3-devel/1.2-1
+++ libatomic_ops.recipe /weasel.rpath.org@wgl:3-devel/1.2-2
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Filip Brcic <brcha@xxxxxxx>
+# Copyright (c) 2009-2010 Filip Brcic <brcha@xxxxxxx>
 # Distributed under the terms of the GNU General Public License v3
 #
 
@@ -9,34 +9,17 @@
 
     buildRequires = []
 
+    shortDesc  = 'Atomic operations library'
+    longDesc   = 'Implementation of atomic memory update operations'
+    url        = 'http://www.hpl.hp.com/research/linux/atomic_ops/'
+    licenses   = [ 'GPL-2', 'MIT', 'as-is' ]
+    categories = [ 'Development/Libraries' ]
+
     def unpack(r):
-       r.Description(shortDesc='Implementation for atomic memory update 
operations',
-                      longDesc='Implementation for atomic memory update 
operations')
-       r.PackageURL('http://www.hpl.hp.com/research/linux/atomic_ops/')
-       r.Licenses('GPL-2', 'MIT', 'as-is')
         
r.addArchive('http://www.hpl.hp.com/research/linux/atomic_ops/download/')
 
-        r.extraConfig = ''
-
-        if Arch.x86_64:
-            # First build 32bit version
-            macros32 = r.macros.copy()
-            macros32.cc = '"gcc -m32"'
-            macros32.cxx = '"g++ -m32"'
-            macros32.libdir = '%(prefix)s/lib'
-
-            r.Run('cp -a %(builddir)s %(builddir)s/../32bit')
-
-            r.Configure(r.extraConfig, dir='../32bit', overrideMacros=macros32,
-                        preConfigure='USE_ARCH=32')
-            r.Make(dir='../32bit', overrideMacros=macros32, 
preMake='USE_ARCH=32')
-            r.MakeInstall('pkgdatadir=%(thisdocdir)s',
-                          dir='../32bit', overrideMacros=macros32, 
preMake='USE_ARCH=32')
-
-           r.NormalizePkgConfig(exceptions='.*')
-
-    def configure(r):
-        r.Configure(r.extraConfig)
+        r.addPatch('libatomic_ops-1.2-ppc64-load_acquire.patch')
+        r.addPatch('libatomic_ops-1.2-ppc-asm.patch')
 
     def makeinstall(r):
         r.MakeInstall('pkgdatadir=%(thisdocdir)s')


libatomic_ops-1.2-ppc-asm.patch: new
--- /dev/null
+++ libatomic_ops-1.2-ppc-asm.patch
@@ -0,0 +11 @@
+--- ../libatomic-ops-1.2/src/atomic_ops/sysdeps/gcc/powerpc.h  2006-03-29 
09:49:14.000000000 +1100
++++ src/atomic_ops/sysdeps/gcc/powerpc.h       2007-08-27 10:51:00.000000000 
+1000
+@@ -72,7 +72,7 @@
+   /* registers.  I always got "impossible constraint" when I  */
+   /* tried the "y" constraint.                                        */
+   __asm__ __volatile__ (
+-    "lwz %0,%1\n"
++    "lwz%X1 %0,%1\n"
+     "cmpw cr7,%0,%0\n"
+     "bne- cr7,1f\n"
+     "1: isync\n"


Committed by: brcha

Other related posts: