diff options
-rw-r--r-- | dev-libs/libatomic_ops/ChangeLog | 7 | ||||
-rw-r--r-- | dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch | 46 | ||||
-rw-r--r-- | dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild | 12 |
3 files changed, 61 insertions, 4 deletions
diff --git a/dev-libs/libatomic_ops/ChangeLog b/dev-libs/libatomic_ops/ChangeLog index 80b57652b06d..53f9fad6b502 100644 --- a/dev-libs/libatomic_ops/ChangeLog +++ b/dev-libs/libatomic_ops/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for dev-libs/libatomic_ops # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.6 2007/06/02 20:08:08 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.7 2007/06/08 23:15:28 lu_zero Exp $ + + 08 Jun 2007; Luca Barbato <lu_zero@gentoo.org> + +files/libatomic_ops-1.2-ppc64-load_acquire.patch, + libatomic_ops-1.2.ebuild: + Marked ~ppc ~ppc64 02 Jun 2007; Raúl Porcel <armin76@gentoo.org> libatomic_ops-1.2.ebuild: Add ~alpha/~ia64 wrt #180117 diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch new file mode 100644 index 000000000000..3d09b3e9ae87 --- /dev/null +++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-ppc64-load_acquire.patch @@ -0,0 +1,46 @@ +--- src/atomic_ops/sysdeps/gcc/powerpc.h 2006-03-28 22:49:14.000000000 +0000 ++++ /tmp/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 can live with the load+lwsync */ ++#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 */ diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild index 2067eaa38f56..c8e1c15f7a68 100644 --- a/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild +++ b/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild @@ -1,6 +1,8 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild,v 1.5 2007/06/02 20:08:08 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/libatomic_ops-1.2.ebuild,v 1.6 2007/06/08 23:15:28 lu_zero Exp $ + +inherit eutils DESCRIPTION="Implementation for atomic memory update operations" HOMEPAGE="http://www.hpl.hp.com/research/linux/atomic_ops/" @@ -8,12 +10,16 @@ SRC_URI="http://www.hpl.hp.com/research/linux/atomic_ops/download/${P}.tar.gz" LICENSE="GPL-2 MIT as-is" SLOT="0" -KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~sparc ~x86 ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" IUSE="" DEPEND="" RDEPEND="" - +src_unpack(){ + unpack ${A} + cd ${S} + epatch "${FILESDIR}/${P}-ppc64-load_acquire.patch" +} src_install() { emake pkgdatadir="/usr/share/doc/${PF}" DESTDIR="${D}" install } |