summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-09 18:36:32 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-09 18:36:32 +0000
commit3facde66083c1b9e89967c2f11b4d82ba4bb6626 (patch)
tree9a727f9295090c395114d25989ecddd087246384 /dev-libs/libatomic_ops
parentfix QA warning about relative paths (diff)
downloadgentoo-2-3facde66083c1b9e89967c2f11b4d82ba4bb6626.tar.gz
gentoo-2-3facde66083c1b9e89967c2f11b4d82ba4bb6626.tar.bz2
gentoo-2-3facde66083c1b9e89967c2f11b4d82ba4bb6626.zip
Add fix for x32 ABIs.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'dev-libs/libatomic_ops')
-rw-r--r--dev-libs/libatomic_ops/ChangeLog6
-rw-r--r--dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch43
-rw-r--r--dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild6
3 files changed, 50 insertions, 5 deletions
diff --git a/dev-libs/libatomic_ops/ChangeLog b/dev-libs/libatomic_ops/ChangeLog
index 90c6a6c62cc6..47bc0adde4ad 100644
--- a/dev-libs/libatomic_ops/ChangeLog
+++ b/dev-libs/libatomic_ops/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/libatomic_ops
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.25 2011/09/26 17:30:29 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/ChangeLog,v 1.26 2011/12/09 18:36:31 vapier Exp $
+
+ 09 Dec 2011; Mike Frysinger <vapier@gentoo.org> libatomic_ops-1.2-r1.ebuild,
+ +files/libatomic_ops-1.2-x32.patch:
+ Add fix for x32 ABIs.
26 Sep 2011; Fabian Groffen <grobian@gentoo.org> libatomic_ops-1.2-r1.ebuild:
Marked ~x86-freebsd
diff --git a/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch
new file mode 100644
index 000000000000..2edc6958f360
--- /dev/null
+++ b/dev-libs/libatomic_ops/files/libatomic_ops-1.2-x32.patch
@@ -0,0 +1,43 @@
+http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=e3a384578f677c05d812d99c2c92aa13670bd06a
+
+Upstream-Status: Pending
+
+Remove the `q' suffix on x86-64 atomic instructions.
+
+We don't need the `q' suffix on x86_64 atomic instructions for AO_t,
+which is defined as "unsigned long". "unsigned long" is 32bit for x32
+and 64bit for x86-64. The register operand in x86-64 atomic instructions
+is sufficient to properly determine the register size.
+
+Received this patch from H.J. Lu <hjl.tools@gmail.com>
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 2011/12/02
+
+--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h.x32 2005-09-28 17:16:38.000000000 -0700
++++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/x86_64.h 2011-12-02 09:29:54.265251875 -0800
+@@ -60,7 +60,7 @@ AO_fetch_and_add_full (volatile AO_t *p,
+ {
+ AO_t result;
+
+- __asm__ __volatile__ ("lock; xaddq %0, %1" :
++ __asm__ __volatile__ ("lock; xadd %0, %1" :
+ "=r" (result), "=m" (*p) : "0" (incr), "m" (*p)
+ : "memory");
+ return result;
+@@ -111,7 +111,7 @@ AO_int_fetch_and_add_full (volatile unsi
+ AO_INLINE void
+ AO_or_full (volatile AO_t *p, AO_t incr)
+ {
+- __asm__ __volatile__ ("lock; orq %1, %0" :
++ __asm__ __volatile__ ("lock; or %1, %0" :
+ "=m" (*p) : "r" (incr), "m" (*p) : "memory");
+ }
+
+@@ -136,7 +136,7 @@ AO_compare_and_swap_full(volatile AO_t *
+ AO_t old, AO_t new_val)
+ {
+ char result;
+- __asm__ __volatile__("lock; cmpxchgq %3, %0; setz %1"
++ __asm__ __volatile__("lock; cmpxchg %3, %0; setz %1"
+ : "=m"(*addr), "=q"(result)
+ : "m"(*addr), "r" (new_val), "a"(old) : "memory");
+ return (int) result;
diff --git a/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild
index 00f2da99972b..0b3792d1c2f3 100644
--- a/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild
+++ b/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 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-r1.ebuild,v 1.18 2011/09/26 17:30:29 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libatomic_ops/libatomic_ops-1.2-r1.ebuild,v 1.19 2011/12/09 18:36:31 vapier Exp $
inherit eutils autotools
@@ -13,9 +13,6 @@ SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE=""
-DEPEND=""
-RDEPEND=""
-
src_unpack(){
unpack ${A}
cd "${S}"
@@ -23,6 +20,7 @@ src_unpack(){
epatch "${FILESDIR}"/${P}-ppc-asm.patch
epatch "${FILESDIR}"/${P}-sh4.patch
epatch "${FILESDIR}"/${P}-fix-makefile-am-generic.patch
+ epatch "${FILESDIR}"/${P}-x32.patch
eautoreconf
}