diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2013-01-21 11:50:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-28 12:29:30 +0000 |
commit | a921ed0bc0a9fd59947858f56594af752ea03acf (patch) | |
tree | 4a5ce52b163b52065e314edfe4e92514c4717753 | |
parent | f876c134993798f5fef87b96c95dadbad38ab385 (diff) | |
download | poky-a921ed0bc0a9fd59947858f56594af752ea03acf.tar.gz |
libaio: add aarch64 support
Picking up a patch from gentoo and adding aarch64 defines
is enough to fix libaio and pass the harness testsuite
(From OE-Core rev: 7255c43b6e545a4c15c3cd57f6c240668a77786a)
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-extended/libaio/libaio/libaio-aarch64.patch | 28 | ||||
-rw-r--r-- | meta/recipes-extended/libaio/libaio/libaio-generic.patch | 65 | ||||
-rw-r--r-- | meta/recipes-extended/libaio/libaio_0.3.109.bb | 5 |
3 files changed, 97 insertions, 1 deletions
diff --git a/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch new file mode 100644 index 0000000000..e3d10585de --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio-aarch64.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | Upstream-Status: Submitted | ||
2 | |||
3 | Signed-off-by: Riku Voipio <riku.voipio@linaro.org> | ||
4 | |||
5 | --- | ||
6 | harness/cases/16.t | 2 ++ | ||
7 | src/libaio.h | 10 ++++++++++ | ||
8 | 2 files changed, 12 insertions(+) | ||
9 | |||
10 | --- a/src/libaio.h | ||
11 | +++ b/src/libaio.h | ||
12 | @@ -107,6 +107,16 @@ | ||
13 | # else | ||
14 | # error "neither mipseb nor mipsel?" | ||
15 | # endif | ||
16 | +#elif defined(__aarch64__) | ||
17 | +# if defined (__AARCH64EB__) /* big endian, 64 bits */ | ||
18 | +#define PADDED(x, y) unsigned y; x | ||
19 | +#define PADDEDptr(x,y) x | ||
20 | +#define PADDEDul(x, y) unsigned long x | ||
21 | +# elif defined(__AARCH64EL__) /* little endian, 64 bits */ | ||
22 | +#define PADDED(x, y) x, y | ||
23 | +#define PADDEDptr(x, y) x | ||
24 | +#define PADDEDul(x, y) unsigned long x | ||
25 | +# endif | ||
26 | #else | ||
27 | #error endian? | ||
28 | #endif | ||
diff --git a/meta/recipes-extended/libaio/libaio/libaio-generic.patch b/meta/recipes-extended/libaio/libaio/libaio-generic.patch new file mode 100644 index 0000000000..3fcf541626 --- /dev/null +++ b/meta/recipes-extended/libaio/libaio/libaio-generic.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 5e96c73d5dfbdea8d0be82b7f3fc8d6735e5dfa7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier@gentoo.org> | ||
3 | Date: Sun, 17 Jan 2010 17:07:48 -0500 | ||
4 | Subject: [PATCH] add a generic syscall() fallback | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mike Frysinger <vapier@gentoo.org> | ||
9 | Signed-off-by: Riku Voipio <riku.voipio@linaro.org> | ||
10 | --- | ||
11 | src/syscall-generic.h | 29 +++++++++++++++++++++++++++++ | ||
12 | src/syscall.h | 3 ++- | ||
13 | 2 files changed, 31 insertions(+), 1 deletions(-) | ||
14 | create mode 100644 src/syscall-generic.h | ||
15 | |||
16 | diff --git a/src/syscall-generic.h b/src/syscall-generic.h | ||
17 | new file mode 100644 | ||
18 | index 0000000..24d7c7c | ||
19 | --- /dev/null | ||
20 | +++ b/src/syscall-generic.h | ||
21 | @@ -0,0 +1,29 @@ | ||
22 | +#include <errno.h> | ||
23 | +#include <unistd.h> | ||
24 | +#include <sys/syscall.h> | ||
25 | + | ||
26 | +#define _body_io_syscall(sname, args...) \ | ||
27 | +{ \ | ||
28 | + int ret = syscall(__NR_##sname, ## args); \ | ||
29 | + return ret < 0 ? -errno : ret; \ | ||
30 | +} | ||
31 | + | ||
32 | +#define io_syscall1(type,fname,sname,type1,arg1) \ | ||
33 | +type fname(type1 arg1) \ | ||
34 | +_body_io_syscall(sname, (long)arg1) | ||
35 | + | ||
36 | +#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ | ||
37 | +type fname(type1 arg1,type2 arg2) \ | ||
38 | +_body_io_syscall(sname, (long)arg1, (long)arg2) | ||
39 | + | ||
40 | +#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ | ||
41 | +type fname(type1 arg1,type2 arg2,type3 arg3) \ | ||
42 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) | ||
43 | + | ||
44 | +#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ | ||
45 | +type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ | ||
46 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) | ||
47 | + | ||
48 | +#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ | ||
49 | +type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ | ||
50 | +_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) | ||
51 | diff --git a/src/syscall.h b/src/syscall.h | ||
52 | index 78becfe..d954af0 100644 | ||
53 | --- a/src/syscall.h | ||
54 | +++ b/src/syscall.h | ||
55 | @@ -25,5 +25,6 @@ | ||
56 | #elif defined(__arm__) | ||
57 | #include "syscall-arm.h" | ||
58 | #else | ||
59 | -#error "add syscall-arch.h" | ||
60 | +#warning "using generic syscall method" | ||
61 | +#include "syscall-generic.h" | ||
62 | #endif | ||
63 | -- | ||
64 | 1.7.3.1 | ||
65 | |||
diff --git a/meta/recipes-extended/libaio/libaio_0.3.109.bb b/meta/recipes-extended/libaio/libaio_0.3.109.bb index 0712d04e71..afe9adff65 100644 --- a/meta/recipes-extended/libaio/libaio_0.3.109.bb +++ b/meta/recipes-extended/libaio/libaio_0.3.109.bb | |||
@@ -11,7 +11,10 @@ SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \ | |||
11 | file://00_arches.patch \ | 11 | file://00_arches.patch \ |
12 | file://toolchain.patch \ | 12 | file://toolchain.patch \ |
13 | file://destdir.patch \ | 13 | file://destdir.patch \ |
14 | file://libaio_fix_for_x32.patch" | 14 | file://libaio_fix_for_x32.patch \ |
15 | file://libaio-generic.patch \ | ||
16 | file://libaio-aarch64.patch \ | ||
17 | " | ||
15 | 18 | ||
16 | SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756" | 19 | SRC_URI[md5sum] = "435a5b16ca6198eaf01155263d855756" |
17 | SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d" | 20 | SRC_URI[sha256sum] = "bf4a457253cbaab215aea75cb6e18dc8d95bbd507e9920661ff9bdd288c8778d" |