libaio: Backport generic arch detection patch
* Backport the patch which adds generic architecture detection * Remove the no longer required patch to fix padding for mips64 (From OE-Core rev: 699da7aff18c8b7630dd6da7323081a25ba7a9c2) Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
60ae5c2eb0
commit
abb6cdef94
|
@ -0,0 +1,65 @@
|
|||
From: Nathan Rossi <nathan.rossi@xilinx.com>
|
||||
Date: Tue, 27 Jan 2015 14:59:35 +1000
|
||||
Subject: [PATCH] Generic arch dectection for padding defines
|
||||
|
||||
When available use the GNU C defines for endian and bitwidth to
|
||||
determine the padding required. This reduces the need to define the
|
||||
padding selection for every architecture.
|
||||
|
||||
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
|
||||
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
|
||||
Upstream-Status: Backport
|
||||
---
|
||||
src/libaio.h | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/libaio.h b/src/libaio.h
|
||||
index 1223146..4a4e0f5 100644
|
||||
--- a/src/libaio.h
|
||||
+++ b/src/libaio.h
|
||||
@@ -52,14 +52,18 @@ typedef enum io_iocb_cmd {
|
||||
/* little endian, 32 bits */
|
||||
#if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
|
||||
defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
|
||||
- defined(__cris__)
|
||||
+ defined(__cris__) || \
|
||||
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
|
||||
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 4)
|
||||
#define PADDED(x, y) x; unsigned y
|
||||
#define PADDEDptr(x, y) x; unsigned y
|
||||
#define PADDEDul(x, y) unsigned long x; unsigned y
|
||||
|
||||
/* little endian, 64 bits */
|
||||
#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
- (defined(__aarch64__) && defined(__AARCH64EL__))
|
||||
+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
|
||||
+ __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ && __SIZEOF_LONG__ == 8)
|
||||
#define PADDED(x, y) x, y
|
||||
#define PADDEDptr(x, y) x
|
||||
#define PADDEDul(x, y) unsigned long x
|
||||
@@ -67,7 +71,9 @@ typedef enum io_iocb_cmd {
|
||||
/* big endian, 64 bits */
|
||||
#elif defined(__powerpc64__) || defined(__s390x__) || \
|
||||
(defined(__sparc__) && defined(__arch64__)) || \
|
||||
- (defined(__aarch64__) && defined(__AARCH64EB__))
|
||||
+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
|
||||
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
|
||||
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 8)
|
||||
#define PADDED(x, y) unsigned y; x
|
||||
#define PADDEDptr(x,y) x
|
||||
#define PADDEDul(x, y) unsigned long x
|
||||
@@ -76,7 +82,9 @@ typedef enum io_iocb_cmd {
|
||||
#elif defined(__PPC__) || defined(__s390__) || \
|
||||
(defined(__arm__) && defined(__ARMEB__)) || \
|
||||
defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
|
||||
- defined(__hppa__) || defined(__frv__) || defined(__avr32__)
|
||||
+ defined(__hppa__) || defined(__frv__) || defined(__avr32__) || \
|
||||
+ (defined(__GNUC__) && defined(__BYTE_ORDER__) && \
|
||||
+ __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __SIZEOF_LONG__ == 4)
|
||||
#define PADDED(x, y) unsigned y; x
|
||||
#define PADDEDptr(x, y) unsigned y; x
|
||||
#define PADDEDul(x, y) unsigned y; unsigned long x
|
||||
--
|
||||
2.1.1
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
From 62fd97fbc5c53835baa18f210fca593fc8b5c636 Mon Sep 17 00:00:00 2001
|
||||
From: Jianchuan Wang <jianchuan.wang@windriver.com>
|
||||
Date: Wed, 15 Oct 2014 07:04:02 +0800
|
||||
Subject: [PATCH] libaio: fix for mips64
|
||||
|
||||
Add mips64 support in the libaio.h
|
||||
- add macro PADDED/PADDEDptr/PADDEDul in the mips64 for structure iocb
|
||||
to be matched userland with kernel
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
|
||||
---
|
||||
src/libaio.h | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
Index: libaio-0.3.110/src/libaio.h
|
||||
===================================================================
|
||||
--- libaio-0.3.110.orig/src/libaio.h
|
||||
+++ libaio-0.3.110/src/libaio.h
|
||||
@@ -51,7 +51,7 @@ typedef enum io_iocb_cmd {
|
||||
|
||||
/* little endian, 32 bits */
|
||||
#if defined(__i386__) || (defined(__arm__) && !defined(__ARMEB__)) || \
|
||||
- defined(__sh__) || defined(__bfin__) || defined(__MIPSEL__) || \
|
||||
+ defined(__sh__) || defined(__bfin__) || (defined(__mips__) && defined(__MIPSEL__)) || \
|
||||
defined(__cris__)
|
||||
#define PADDED(x, y) x; unsigned y
|
||||
#define PADDEDptr(x, y) x; unsigned y
|
||||
@@ -59,7 +59,8 @@ typedef enum io_iocb_cmd {
|
||||
|
||||
/* little endian, 64 bits */
|
||||
#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
- (defined(__aarch64__) && defined(__AARCH64EL__))
|
||||
+ (defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
+ (defined(__mips64) && defined(__MIPSEL__))
|
||||
#define PADDED(x, y) x, y
|
||||
#define PADDEDptr(x, y) x
|
||||
#define PADDEDul(x, y) unsigned long x
|
||||
@@ -67,7 +68,8 @@ typedef enum io_iocb_cmd {
|
||||
/* big endian, 64 bits */
|
||||
#elif defined(__powerpc64__) || defined(__s390x__) || \
|
||||
(defined(__sparc__) && defined(__arch64__)) || \
|
||||
- (defined(__aarch64__) && defined(__AARCH64EB__))
|
||||
+ (defined(__aarch64__) && defined(__AARCH64EB__)) || \
|
||||
+ (defined(__mips64) && defined(__MIPSEL__))
|
||||
#define PADDED(x, y) unsigned y; x
|
||||
#define PADDEDptr(x,y) x
|
||||
#define PADDEDul(x, y) unsigned long x
|
||||
@@ -75,7 +77,7 @@ typedef enum io_iocb_cmd {
|
||||
/* big endian, 32 bits */
|
||||
#elif defined(__PPC__) || defined(__s390__) || \
|
||||
(defined(__arm__) && defined(__ARMEB__)) || \
|
||||
- defined(__sparc__) || defined(__MIPSEB__) || defined(__m68k__) || \
|
||||
+ defined(__sparc__) || (defined(__mips__) && defined(__MIPSEB__)) || defined(__m68k__) || \
|
||||
defined(__hppa__) || defined(__frv__) || defined(__avr32__)
|
||||
#define PADDED(x, y) unsigned y; x
|
||||
#define PADDEDptr(x, y) unsigned y; x
|
|
@ -6,11 +6,11 @@ LICENSE = "LGPLv2.1+"
|
|||
LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
|
||||
|
||||
SRC_URI = "${DEBIAN_MIRROR}/main/liba/libaio/libaio_${PV}.orig.tar.gz \
|
||||
file://generic-arch-dectection-for-padding-defines.patch \
|
||||
file://00_arches.patch \
|
||||
file://destdir.patch \
|
||||
file://libaio_fix_for_x32.patch \
|
||||
file://libaio_fix_for_mips_syscalls.patch \
|
||||
file://libaio_fix_for_mips64.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "2a35602e43778383e2f4907a4ca39ab8"
|
||||
|
|
Loading…
Reference in New Issue