[OE-core] [PATCH] libaio: Backport generic arch detection patch
Nathan Rossi
nathan.rossi at xilinx.com
Fri Feb 13 07:41:34 UTC 2015
* Backport the patch which adds generic architecture detection
* Remove the no longer required patch to fix padding for mips64
Signed-off-by: Nathan Rossi <nathan.rossi at xilinx.com>
---
It appears the libaio_fix_for_mip64.patch changes are only upstream as
far as the Debian patch overlays, and did not reach libaio upstream
(https://git.fedorahosted.org/cgit/libaio.git/). However with the
generic architecture detection patch, the mips64 patch is no longer
required.
I have tested this change on all qemu* machines in oe-core, as well as
qemumicroblaze from meta-xilinx.
---
...neric-arch-dectection-for-padding-defines.patch | 65 ++++++++++++++++++++++
.../libaio/libaio/libaio_fix_for_mips64.patch | 58 -------------------
meta/recipes-extended/libaio/libaio_0.3.110.bb | 2 +-
3 files changed, 66 insertions(+), 59 deletions(-)
create mode 100644 meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
delete mode 100644 meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
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
new file mode 100644
index 0000000..bba7e55
--- /dev/null
+++ b/meta/recipes-extended/libaio/libaio/generic-arch-dectection-for-padding-defines.patch
@@ -0,0 +1,65 @@
+From: Nathan Rossi <nathan.rossi at 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 at xilinx.com>
+Signed-off-by: Jeff Moyer <jmoyer at 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
+
diff --git a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch b/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
deleted file mode 100644
index 9d4bb46..0000000
--- a/meta/recipes-extended/libaio/libaio/libaio_fix_for_mips64.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 62fd97fbc5c53835baa18f210fca593fc8b5c636 Mon Sep 17 00:00:00 2001
-From: Jianchuan Wang <jianchuan.wang at 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 at 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
diff --git a/meta/recipes-extended/libaio/libaio_0.3.110.bb b/meta/recipes-extended/libaio/libaio_0.3.110.bb
index 9e36414..cbe29ce 100644
--- a/meta/recipes-extended/libaio/libaio_0.3.110.bb
+++ b/meta/recipes-extended/libaio/libaio_0.3.110.bb
@@ -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"
--
2.1.1
More information about the Openembedded-core
mailing list