All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libaio: Backport generic arch detection patch
@ 2015-02-13  7:41 Nathan Rossi
  0 siblings, 0 replies; only message in thread
From: Nathan Rossi @ 2015-02-13  7:41 UTC (permalink / raw)
  To: openembedded-core; +Cc: Nathan Rossi

* 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@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@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
+
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@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
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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-13  7:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13  7:41 [PATCH] libaio: Backport generic arch detection patch Nathan Rossi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.