Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 755621 Details for
Bug 969680
libaio fails to build for aarch64
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
aarch64 support for libaio
libaio-aarch64.patch (text/plain), 5.20 KB, created by
Mark Salter
on 2013-06-01 19:33:27 UTC
(
hide
)
Description:
aarch64 support for libaio
Filename:
MIME Type:
Creator:
Mark Salter
Created:
2013-06-01 19:33:27 UTC
Size:
5.20 KB
patch
obsolete
>diff --git a/compat-libaio-0.3.109/src/libaio.h b/compat-libaio-0.3.109/src/libaio.h >index 18dbc2a..c03ff9c 100644 >--- a/compat-libaio-0.3.109/src/libaio.h >+++ b/compat-libaio-0.3.109/src/libaio.h >@@ -91,6 +91,16 @@ typedef enum io_iocb_cmd { > #define PADDED(x, y) unsigned y; x > #define PADDEDptr(x, y) unsigned y; x > #define PADDEDul(x, y) unsigned y; unsigned long x >+#elif defined(__aarch64__) >+# if defined (__AARCH64EB__) /* big endian, 64 bits */ >+#define PADDED(x, y) unsigned y; x >+#define PADDEDptr(x,y) x >+#define PADDEDul(x, y) unsigned long x >+# elif defined(__AARCH64EL__) /* little endian, 64 bits */ >+#define PADDED(x, y) x, y >+#define PADDEDptr(x, y) x >+#define PADDEDul(x, y) unsigned long x >+# endif > #else > #error endian? > #endif >diff --git a/compat-libaio-0.3.109/src/syscall-generic.h b/compat-libaio-0.3.109/src/syscall-generic.h >new file mode 100644 >index 0000000..6a9a41d >--- /dev/null >+++ b/compat-libaio-0.3.109/src/syscall-generic.h >@@ -0,0 +1,29 @@ >+#include <errno.h> >+#include <unistd.h> >+#include <sys/syscall.h> >+ >+#define _body_io_syscall(sname, args...) \ >+{ \ >+ int ret = syscall(__NR_##sname, ## args); \ >+ return ret < 0 ? -errno : ret; \ >+} >+ >+#define io_syscall1(type,fname,sname,type1,arg1) \ >+type fname(type1 arg1) \ >+_body_io_syscall(sname, (long)arg1) >+ >+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ >+type fname(type1 arg1,type2 arg2) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2) >+ >+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ >+type fname(type1 arg1,type2 arg2,type3 arg3) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) >+ >+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ >+type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) >+ >+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ >+type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) >diff --git a/compat-libaio-0.3.109/src/syscall.h b/compat-libaio-0.3.109/src/syscall.h >index 62879a5..d9ee036 100644 >--- a/compat-libaio-0.3.109/src/syscall.h >+++ b/compat-libaio-0.3.109/src/syscall.h >@@ -27,5 +27,6 @@ > #elif defined(__sparc__) > #include "syscall-sparc.h" > #else >-#error "add syscall-arch.h" >+#warning "using generic syscall method" >+#include "syscall-generic.h" > #endif >diff --git a/harness/cases/16.t b/harness/cases/16.t >index c3157cc..074756d 100644 >--- a/harness/cases/16.t >+++ b/harness/cases/16.t >@@ -18,6 +18,8 @@ > #define SYS_eventfd 318 > #elif defined(__alpha__) > #define SYS_eventfd 478 >+#elif defined(__aarch64__) >+#define SYS_eventfd 1044 > #else > #error define SYS_eventfd for your arch! > #endif >diff --git a/src/libaio.h b/src/libaio.h >index 18dbc2a..15e12a7 100644 >--- a/src/libaio.h >+++ b/src/libaio.h >@@ -1,6 +1,6 @@ > /* /usr/include/libaio.h > * >- * Copyright 2000,2001,2002 Red Hat, Inc. >+ * Copyright 2000,2001,2002,2013 Red Hat, Inc. > * > * Written by Benjamin LaHaise <bcrl@redhat.com> > * >@@ -91,6 +91,16 @@ typedef enum io_iocb_cmd { > #define PADDED(x, y) unsigned y; x > #define PADDEDptr(x, y) unsigned y; x > #define PADDEDul(x, y) unsigned y; unsigned long x >+#elif defined(__aarch64__) >+# if defined (__AARCH64EB__) /* big endian, 64 bits */ >+#define PADDED(x, y) unsigned y; x >+#define PADDEDptr(x,y) x >+#define PADDEDul(x, y) unsigned long x >+# elif defined(__AARCH64EL__) /* little endian, 64 bits */ >+#define PADDED(x, y) x, y >+#define PADDEDptr(x, y) x >+#define PADDEDul(x, y) unsigned long x >+# endif > #else > #error endian? > #endif >diff --git a/src/syscall-generic.h b/src/syscall-generic.h >new file mode 100644 >index 0000000..6a9a41d >--- /dev/null >+++ b/src/syscall-generic.h >@@ -0,0 +1,29 @@ >+#include <errno.h> >+#include <unistd.h> >+#include <sys/syscall.h> >+ >+#define _body_io_syscall(sname, args...) \ >+{ \ >+ int ret = syscall(__NR_##sname, ## args); \ >+ return ret < 0 ? -errno : ret; \ >+} >+ >+#define io_syscall1(type,fname,sname,type1,arg1) \ >+type fname(type1 arg1) \ >+_body_io_syscall(sname, (long)arg1) >+ >+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \ >+type fname(type1 arg1,type2 arg2) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2) >+ >+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \ >+type fname(type1 arg1,type2 arg2,type3 arg3) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3) >+ >+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ >+type fname (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4) >+ >+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4, type5,arg5) \ >+type fname (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ >+_body_io_syscall(sname, (long)arg1, (long)arg2, (long)arg3, (long)arg4, (long)arg5) >diff --git a/src/syscall.h b/src/syscall.h >index 62879a5..d9ee036 100644 >--- a/src/syscall.h >+++ b/src/syscall.h >@@ -27,5 +27,6 @@ > #elif defined(__sparc__) > #include "syscall-sparc.h" > #else >-#error "add syscall-arch.h" >+#warning "using generic syscall method" >+#include "syscall-generic.h" > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 969680
: 755621