Summary: Linux-native asynchronous I/O access library
Summary(pl.UTF-8): Biblioteka natywnego dla Linuksa asynchronicznego dostępu do wejścia/wyjścia
Name: libaio
-Version: 0.3.110
+Version: 0.3.111
Release: 1
License: LGPL v2+
Group: Libraries
-Source0: https://fedorahosted.org/releases/l/i/libaio/%{name}-%{version}.tar.gz
-# Source0-md5: 2a35602e43778383e2f4907a4ca39ab8
+Source0: http://releases.pagure.org/libaio/%{name}-%{version}.tar.gz
+# Source0-md5: abb8f46d64b9bd3d0c6097e3a36639be
Patch0: %{name}-DESTDIR.patch
Patch1: %{name}-Werror.patch
Patch2: x32.patch
+Patch3: %{name}-link.patch
+URL: https://pagure.io/libaio
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# SSP is incompatible with -nostdlib -nostartfiles
-%define filterout_c -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector.*
+#define filterout_c -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector.*
%description
The Linux-native asynchronous I/O facility ("async I/O", or "aio") has
%patch0 -p1
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
%{__make} \
CC="%{__cc}" \
- CFLAGS="%{rpmcppflags} %{rpmcflags} -fomit-frame-pointer -fPIC -Wall -I. -nostdlib -nostartfiles"
+ CFLAGS="%{rpmcppflags} %{rpmcflags} -fomit-frame-pointer -fPIC -Wall -I."
%{?with_tests:%{__make} CC="%{__cc}" partcheck}
-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
+--- libaio-0.3.111/src/syscall.h.orig 2018-03-06 23:24:47.000000000 +0100
++++ libaio-0.3.111/src/syscall.h 2018-04-15 21:30:45.529251204 +0200
+@@ -13,7 +13,7 @@
- #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; \
- }
+ #if defined(__i386__)
+ #include "syscall-i386.h"
+-#elif defined(__x86_64__)
++#elif defined(__x86_64__) && !defined(__ILP32__)
+ #include "syscall-x86_64.h"
+ #elif defined(__ia64__)
+ #include "syscall-ia64.h"