summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libaio
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/libaio')
-rw-r--r--meta/recipes-extended/libaio/libaio/00_arches.patch194
-rw-r--r--meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch65
-rw-r--r--meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch61
-rw-r--r--meta/recipes-extended/libaio/libaio_0.3.111.bb (renamed from meta/recipes-extended/libaio/libaio_0.3.110.bb)11
4 files changed, 47 insertions, 284 deletions
diff --git a/meta/recipes-extended/libaio/libaio/00_arches.patch b/meta/recipes-extended/libaio/libaio/00_arches.patch
index 9d6447d98a..bec189f87c 100644
--- a/meta/recipes-extended/libaio/libaio/00_arches.patch
+++ b/meta/recipes-extended/libaio/libaio/00_arches.patch
@@ -1,11 +1,27 @@
1From ceba1e03e5b57cdae0b3b2d2c9afebc085c986d8 Mon Sep 17 00:00:00 2001
2From: Qing He <qing.he@intel.com>
3Date: Fri, 27 Aug 2010 10:15:31 +0800
4Subject: [PATCH] libaio: add new recipe
5
1Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
2 7
3from openembedded, added by Qing He <qing.he@intel.com> 8from openembedded, added by Qing He <qing.he@intel.com>
4 9
5Index: libaio-0.3.110/src/syscall-m68k.h 10---
6=================================================================== 11 src/syscall-m68k.h | 78 ++++++++++++++++++
12 src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++
13 src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++
14 src/syscall.h | 6 ++
15 4 files changed, 453 insertions(+)
16 create mode 100644 src/syscall-m68k.h
17 create mode 100644 src/syscall-mips.h
18 create mode 100644 src/syscall-parisc.h
19
20diff --git a/src/syscall-m68k.h b/src/syscall-m68k.h
21new file mode 100644
22index 0000000..f440412
7--- /dev/null 23--- /dev/null
8+++ libaio-0.3.110/src/syscall-m68k.h 24+++ b/src/syscall-m68k.h
9@@ -0,0 +1,78 @@ 25@@ -0,0 +1,78 @@
10+#define __NR_io_setup 241 26+#define __NR_io_setup 241
11+#define __NR_io_destroy 242 27+#define __NR_io_destroy 242
@@ -85,27 +101,11 @@ Index: libaio-0.3.110/src/syscall-m68k.h
85+return (type) __res; \ 101+return (type) __res; \
86+} 102+}
87+ 103+
88Index: libaio-0.3.110/src/syscall.h 104diff --git a/src/syscall-mips.h b/src/syscall-mips.h
89=================================================================== 105new file mode 100644
90--- libaio-0.3.110.orig/src/syscall.h 106index 0000000..4142499
91+++ libaio-0.3.110/src/syscall.h
92@@ -28,6 +28,12 @@
93 #include "syscall-sparc.h"
94 #elif defined(__aarch64__)
95 #include "syscall-arm64.h"
96+#elif defined(__m68k__)
97+#include "syscall-m68k.h"
98+#elif defined(__hppa__)
99+#include "syscall-parisc.h"
100+#elif defined(__mips__)
101+#include "syscall-mips.h"
102 #else
103 #warning "using generic syscall method"
104 #include "syscall-generic.h"
105Index: libaio-0.3.110/src/syscall-mips.h
106===================================================================
107--- /dev/null 107--- /dev/null
108+++ libaio-0.3.110/src/syscall-mips.h 108+++ b/src/syscall-mips.h
109@@ -0,0 +1,223 @@ 109@@ -0,0 +1,223 @@
110+/* 110+/*
111+ * This file is subject to the terms and conditions of the GNU General Public 111+ * This file is subject to the terms and conditions of the GNU General Public
@@ -330,10 +330,11 @@ Index: libaio-0.3.110/src/syscall-mips.h
330+ 330+
331+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ 331+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
332+ 332+
333Index: libaio-0.3.110/src/syscall-parisc.h 333diff --git a/src/syscall-parisc.h b/src/syscall-parisc.h
334=================================================================== 334new file mode 100644
335index 0000000..ff61746
335--- /dev/null 336--- /dev/null
336+++ libaio-0.3.110/src/syscall-parisc.h 337+++ b/src/syscall-parisc.h
337@@ -0,0 +1,146 @@ 338@@ -0,0 +1,146 @@
338+/* 339+/*
339+ * Linux system call numbers. 340+ * Linux system call numbers.
@@ -481,127 +482,20 @@ Index: libaio-0.3.110/src/syscall-parisc.h
481+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \ 482+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
482+} 483+}
483+ 484+
484Index: libaio-0.3.110/src/syscall-arm.h 485diff --git a/src/syscall.h b/src/syscall.h
485=================================================================== 486index 9b9e9c1..9ecd3b4 100644
486--- libaio-0.3.110.orig/src/syscall-arm.h 487--- a/src/syscall.h
487+++ libaio-0.3.110/src/syscall-arm.h 488+++ b/src/syscall.h
488@@ -114,3 +114,119 @@ type fname(type1 arg1, type2 arg2, type3 489@@ -29,6 +29,12 @@
489 return (type) __res_r0; \ 490 #include "syscall-sparc.h"
490 } 491 #elif defined(__aarch64__) || defined(__riscv)
491 492 #include "syscall-generic.h"
492+/* 493+#elif defined(__m68k__)
493+ * linux/include/asm-arm/unistd.h 494+#include "syscall-m68k.h"
494+ * 495+#elif defined(__hppa__)
495+ * Copyright (C) 2001-2005 Russell King 496+#include "syscall-parisc.h"
496+ * 497+#elif defined(__mips__)
497+ * This program is free software; you can redistribute it and/or modify 498+#include "syscall-mips.h"
498+ * it under the terms of the GNU General Public License version 2 as 499 #else
499+ * published by the Free Software Foundation. 500 #warning "using system call numbers from sys/syscall.h"
500+ * 501 #endif
501+ * Please forward _all_ changes to this file to rmk@arm.linux.org.uk,
502+ * no matter what the change is. Thanks!
503+ */
504+
505+#define __NR_OABI_SYSCALL_BASE 0x900000
506+
507+#if defined(__thumb__) || defined(__ARM_EABI__)
508+#define __NR_SYSCALL_BASE 0
509+#else
510+#define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE
511+#endif
512+
513+#define __NR_io_setup (__NR_SYSCALL_BASE+243)
514+#define __NR_io_destroy (__NR_SYSCALL_BASE+244)
515+#define __NR_io_getevents (__NR_SYSCALL_BASE+245)
516+#define __NR_io_submit (__NR_SYSCALL_BASE+246)
517+#define __NR_io_cancel (__NR_SYSCALL_BASE+247)
518+
519+#define __sys2(x) #x
520+#define __sys1(x) __sys2(x)
521+
522+#if defined(__thumb__) || defined(__ARM_EABI__)
523+#define __SYS_REG(name) register long __sysreg __asm__("r7") = __NR_##name;
524+#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
525+#define __syscall(name) "swi\t0"
526+#else
527+#define __SYS_REG(name)
528+#define __SYS_REG_LIST(regs...) regs
529+#define __syscall(name) "swi\t" __sys1(__NR_##name) ""
530+#endif
531+
532+#define io_syscall1(type,fname,sname,type1,arg1) \
533+type fname(type1 arg1) { \
534+ __SYS_REG(sname) \
535+ register long __r0 __asm__("r0") = (long)arg1; \
536+ register long __res_r0 __asm__("r0"); \
537+ __asm__ __volatile__ ( \
538+ __syscall(sname) \
539+ : "=r" (__res_r0) \
540+ : __SYS_REG_LIST( "0" (__r0) ) \
541+ : "memory" ); \
542+ return (type) __res_r0; \
543+}
544+
545+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
546+type fname(type1 arg1,type2 arg2) { \
547+ __SYS_REG(sname) \
548+ register long __r0 __asm__("r0") = (long)arg1; \
549+ register long __r1 __asm__("r1") = (long)arg2; \
550+ register long __res_r0 __asm__("r0"); \
551+ __asm__ __volatile__ ( \
552+ __syscall(sname) \
553+ : "=r" (__res_r0) \
554+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1) ) \
555+ : "memory" ); \
556+ return (type) __res_r0; \
557+}
558+
559+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
560+type fname(type1 arg1,type2 arg2,type3 arg3) { \
561+ __SYS_REG(sname) \
562+ register long __r0 __asm__("r0") = (long)arg1; \
563+ register long __r1 __asm__("r1") = (long)arg2; \
564+ register long __r2 __asm__("r2") = (long)arg3; \
565+ register long __res_r0 __asm__("r0"); \
566+ __asm__ __volatile__ ( \
567+ __syscall(sname) \
568+ : "=r" (__res_r0) \
569+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2) ) \
570+ : "memory" ); \
571+ return (type) __res_r0; \
572+}
573+
574+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
575+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
576+ __SYS_REG(sname) \
577+ register long __r0 __asm__("r0") = (long)arg1; \
578+ register long __r1 __asm__("r1") = (long)arg2; \
579+ register long __r2 __asm__("r2") = (long)arg3; \
580+ register long __r3 __asm__("r3") = (long)arg4; \
581+ register long __res_r0 __asm__("r0"); \
582+ __asm__ __volatile__ ( \
583+ __syscall(sname) \
584+ : "=r" (__res_r0) \
585+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), "r" (__r3) ) \
586+ : "memory" ); \
587+ return (type) __res_r0; \
588+}
589+
590+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
591+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) {\
592+ __SYS_REG(sname) \
593+ register long __r0 __asm__("r0") = (long)arg1; \
594+ register long __r1 __asm__("r1") = (long)arg2; \
595+ register long __r2 __asm__("r2") = (long)arg3; \
596+ register long __r3 __asm__("r3") = (long)arg4; \
597+ register long __r4 __asm__("r4") = (long)arg5; \
598+ register long __res_r0 __asm__("r0"); \
599+ __asm__ __volatile__ ( \
600+ __syscall(sname) \
601+ : "=r" (__res_r0) \
602+ : __SYS_REG_LIST( "0" (__r0), "r" (__r1), "r" (__r2), \
603+ "r" (__r3), "r" (__r4) ) \
604+ : "memory" ); \
605+ return (type) __res_r0; \
606+}
607+
diff --git a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
deleted file mode 100644
index bba7e554af..0000000000
--- a/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
+++ /dev/null
@@ -1,65 +0,0 @@
1From: Nathan Rossi <nathan.rossi@xilinx.com>
2Date: Tue, 27 Jan 2015 14:59:35 +1000
3Subject: [PATCH] Generic arch dectection for padding defines
4
5When available use the GNU C defines for endian and bitwidth to
6determine the padding required. This reduces the need to define the
7padding selection for every architecture.
8
9Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
10Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
11Upstream-Status: Backport
12---
13 src/libaio.h | 16 ++++++++++++----
14 1 file changed, 12 insertions(+), 4 deletions(-)
15
16diff --git a/src/libaio.h b/src/libaio.h
17index 1223146..4a4e0f5 100644
18--- a/src/libaio.h
19+++ b/src/libaio.h
20@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd {
21 /* little endian, 32 bits */
22 #if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
23 defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
24- defined(__cris__)
25+ defined(__cris__) || \
26+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
27+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
28 #define PADDED(x, y) x; unsigned y
29 #define PADDEDptr(x, y) x; unsigned y
30 #define PADDEDul(x, y) unsigned long x; unsigned y
31
32 /* little endian, 64 bits */
33 #elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
34- (defined(__aarch64__) && defined(__AARCH64EL__))
35+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
36+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
37+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8)
38 #define PADDED(x, y) x, y
39 #define PADDEDptr(x, y) x
40 #define PADDEDul(x, y) unsigned long x
41@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd {
42 /* big endian, 64 bits */
43 #elif defined(__powerpc64__) || defined(__s390x__) || \
44 (defined(__sparc__) && defined(__arch64__)) || \
45- (defined(__aarch64__) && defined(__AARCH64EB__))
46+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
47+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
48+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
49 #define PADDED(x, y) unsigned y; x
50 #define PADDEDptr(x,y) x
51 #define PADDEDul(x, y) unsigned long x
52@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd {
53 #elif defined(__PPC__) || defined(__s390__) || \
54 (defined(__arm__) && defined(__ARMEB__)) || \
55 defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
56- defined(__hppa__) || defined(__frv__) || defined(__avr32__)
57+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
58+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
59+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4)
60 #define PADDED(x, y) unsigned y; x
61 #define PADDEDptr(x, y) unsigned y; x
62 #define PADDEDul(x, y) unsigned y; unsigned long x
63--
642.1.1
65
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
deleted file mode 100644
index dc4ba505b9..0000000000
--- a/meta/recipes-extended/libaio/libaio/libaio_fix_for_x32.patch
+++ /dev/null
@@ -1,61 +0,0 @@
1Upstream-Status: Pending
2
3Properly load arguments 5 an 6 for x86-64 syscall
4Use asm ("r10") and asm ("r8") to load arguments 5 an 6 for x86-64
5syscall so that it works with both x32 and x86-64.
6
7Received this patch from H.J. Lu <hjl.tools@gmail.com>
8
9Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
102011/12/02
11
12--- libaio-0.3.109/src/syscall-x86_64.h.x32 2009-10-09 11:17:02.000000000 -0700
13+++ libaio-0.3.109/src/syscall-x86_64.h 2011-12-02 09:09:07.537603224 -0800
14@@ -1,8 +1,18 @@
15+#ifndef __NR_io_setup
16 #define __NR_io_setup 206
17+#endif
18+#ifndef __NR_io_destroy
19 #define __NR_io_destroy 207
20+#endif
21+#ifndef __NR_io_getevents
22 #define __NR_io_getevents 208
23+#endif
24+#ifndef __NR_io_submit
25 #define __NR_io_submit 209
26+#endif
27+#ifndef __NR_io_cancel
28 #define __NR_io_cancel 210
29+#endif
30
31 #define __syscall_clobber "r11","rcx","memory"
32 #define __syscall "syscall"
33@@ -42,10 +52,11 @@ return __res; \
34 type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
35 { \
36 long __res; \
37-__asm__ volatile ("movq %5,%%r10 ;" __syscall \
38+register long __a4 asm ("r10") = (long) arg4; \
39+__asm__ volatile (__syscall \
40 : "=a" (__res) \
41 : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
42- "d" ((long)(arg3)),"g" ((long)(arg4)) : __syscall_clobber,"r10" ); \
43+ "d" ((long)(arg3)),"r" (__a4)); \
44 return __res; \
45 }
46
47@@ -54,10 +65,11 @@ return __res; \
48 type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \
49 { \
50 long __res; \
51-__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; " __syscall \
52+register long __a4 asm ("r10") = (long) arg4; \
53+register long __a5 asm ("r8") = (long) arg5; \
54+__asm__ volatile ( __syscall \
55 : "=a" (__res) \
56 : "0" (__NR_##sname),"D" ((long)(arg1)),"S" ((long)(arg2)), \
57- "d" ((long)(arg3)),"g" ((long)(arg4)),"g" ((long)(arg5)) : \
58- __syscall_clobber,"r8","r10" ); \
59+ "d" ((long)(arg3)),"r" (__a4),"r" (__a5)); \
60 return __res; \
61 }
diff --git a/meta/recipes-extended/libaio/libaio_0.3.110.bb b/meta/recipes-extended/libaio/libaio_0.3.111.bb
index 75975d4ab7..5bd83078ac 100644
--- a/meta/recipes-extended/libaio/libaio_0.3.110.bb
+++ b/meta/recipes-extended/libaio/libaio_0.3.111.bb
@@ -5,19 +5,14 @@ HOMEPAGE = "http://lse.sourceforge.net/io/aio.html"
5LICENSE = "LGPLv2.1+" 5LICENSE = "LGPLv2.1+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" 6LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
7 7
8SRC_URI = "http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/liba/${BPN}/${BPN}_${PV}.orig.tar.gz \ 8SRC_URI = "git://pagure.io/libaio.git;protocol=https \
9 file://generic-arch-dectection-for-padding-defines.patch \
10 file://00_arches.patch \ 9 file://00_arches.patch \
11 file://destdir.patch \ 10 file://destdir.patch \
12 file://libaio_fix_for_x32.patch \
13 file://libaio_fix_for_mips_syscalls.patch \ 11 file://libaio_fix_for_mips_syscalls.patch \
14 file://system-linkage.patch \ 12 file://system-linkage.patch \
15 " 13 "
16 14SRCREV = "f66be22ab0a59a39858900ab72a8c6a6e8b0b7ec"
17SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8" 15S = "${WORKDIR}/git"
18SRC_URI[sha256sum] = "e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e"
19
20UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/liba/libaio/"
21 16
22EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}" 17EXTRA_OEMAKE =+ "prefix=${prefix} includedir=${includedir} libdir=${libdir}"
23 18