summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-07 15:45:57 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-07 15:45:57 +0000
commit6cb27c3f1e20bbbe38093f3212baef2596cb7024 (patch)
tree4dff4f6cfe67d5d9f90f53148f1ad32589cee386
parentExplicitely link against -lm (as reported by Jeremy Olexa). Remove USE="debug... (diff)
downloadgentoo-2-6cb27c3f1e20bbbe38093f3212baef2596cb7024.tar.gz
gentoo-2-6cb27c3f1e20bbbe38093f3212baef2596cb7024.tar.bz2
gentoo-2-6cb27c3f1e20bbbe38093f3212baef2596cb7024.zip
Add fix for x32 ABIs.
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
-rw-r--r--dev-libs/libaio/ChangeLog6
-rw-r--r--dev-libs/libaio/files/libaio-0.3.109-x32.patch63
-rw-r--r--dev-libs/libaio/libaio-0.3.109-r2.ebuild3
3 files changed, 70 insertions, 2 deletions
diff --git a/dev-libs/libaio/ChangeLog b/dev-libs/libaio/ChangeLog
index 635255a28701..68ae6bbd256e 100644
--- a/dev-libs/libaio/ChangeLog
+++ b/dev-libs/libaio/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/libaio
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/ChangeLog,v 1.60 2011/10/03 16:55:29 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/ChangeLog,v 1.61 2011/12/07 15:45:57 vapier Exp $
+
+ 07 Dec 2011; Mike Frysinger <vapier@gentoo.org> libaio-0.3.109-r2.ebuild,
+ +files/libaio-0.3.109-x32.patch:
+ Add fix for x32 ABIs.
03 Oct 2011; Joseph Jezak <josejx@gentoo.org> libaio-0.3.109-r2.ebuild:
Marked ppc/ppc64 stable for bug #379991.
diff --git a/dev-libs/libaio/files/libaio-0.3.109-x32.patch b/dev-libs/libaio/files/libaio-0.3.109-x32.patch
new file mode 100644
index 000000000000..1d2c2a9050fa
--- /dev/null
+++ b/dev-libs/libaio/files/libaio-0.3.109-x32.patch
@@ -0,0 +1,63 @@
+http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=f5c071d93c9e6f57930bce56b1e4f009c160a826
+
+Upstream-Status: Pending
+
+Properly load arguments 5 an 6 for x86-64 syscall
+Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
+syscall so that it works with both x32 and x86-64.
+
+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
+
+--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
++++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800
+@@ -1,8 +1,18 @@
++#ifndef __NR_io_setup
+ #define __NR_io_setup 206
++#endif
++#ifndef __NR_io_destroy
+ #define __NR_io_destroy 207
++#endif
++#ifndef __NR_io_getevents
+ #define __NR_io_getevents 208
++#endif
++#ifndef __NR_io_submit
+ #define __NR_io_submit 209
++#endif
++#ifndef __NR_io_cancel
+ #define __NR_io_cancel 210
++#endif
+
+ #define __syscall_clobber "r11","rcx","memory"
+ #define __syscall "syscall"
+@@ -42,10 +52,11 @@ return __res; \
+ type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+ { \
+ long __res; \
+-__asm__ volatile ("movq %5,%%r10 ;" __syscall \
++register long __a4 asm ("r10") = (long) arg4; \
++__asm__ volatile (__syscall \
+ : "=a" (__res) \
+ : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
++ "d" ((long)(arg3)),"r" (__a4)); \
+ return __res; \
+ }
+
+@@ -54,10 +65,11 @@ return __res; \
+ type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
+ { \
+ long __res; \
+-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
++register long __a4 asm ("r10") = (long) arg4; \
++register long __a5 asm ("r8") = (long) arg5; \
++__asm__ volatile ( __syscall \
+ : "=a" (__res) \
+ : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
+- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
+- __syscall_clobber,"r8","r10" ); \
++ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
+ return __res; \
+ }
diff --git a/dev-libs/libaio/libaio-0.3.109-r2.ebuild b/dev-libs/libaio/libaio-0.3.109-r2.ebuild
index a30499a4f962..b210dceb3fdd 100644
--- a/dev-libs/libaio/libaio-0.3.109-r2.ebuild
+++ b/dev-libs/libaio/libaio-0.3.109-r2.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/libaio/libaio-0.3.109-r2.ebuild,v 1.8 2011/10/03 16:55:29 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libaio/libaio-0.3.109-r2.ebuild,v 1.9 2011/12/07 15:45:57 vapier Exp $
EAPI="3"
@@ -23,6 +23,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-0.3.106-build.patch
epatch "${FILESDIR}"/${PN}-0.3.107-ar-ranlib.patch
epatch "${FILESDIR}"/${PN}-0.3.109-install.patch
+ epatch "${FILESDIR}"/${PN}-0.3.109-x32.patch
sed -i \
-e "/^libdir=/s:lib$:$(get_libdir):" \
-e "/^prefix=/s:/usr:${EPREFIX}/usr:" \