Your message dated Wed, 08 May 2013 21:33:20 +0000
with message-id <[email protected]>
and subject line Bug#702409: fixed in libaio 0.3.109-4
has caused the Debian Bug report #702409,
regarding libaio: please support arm64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
702409: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702409
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: libaio
Version: 0.3.109-3
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: arm64

Dear Maintainer,

Attached is a patch which enables support for building libaio for the arm64
architecture. This mostly consists of a couple of backports from the upstream
development branch.

Since there is no arm64 hardware available yet this also includes support for
cross compiling in a multiarch environment, essentially by simply call the
triplet-qualified gcc.

Thanks,
Ian.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 74e74e6291abde1addab5547f59e226cff2c5861 Mon Sep 17 00:00:00 2001
From: Ian Campbell <[email protected]>
Date: Wed, 6 Mar 2013 03:30:10 +0000
Subject: [PATCH] Support for arm64

---
 debian/changelog                           |    8 ++
 debian/patches/00_arches_arm64.patch       |  157 ++++++++++++++++++++++++++++
 debian/patches/00_arches_arm64_tests.patch |   46 ++++++++
 debian/patches/series                      |    2 +
 debian/rules                               |    3 +-
 5 files changed, 215 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/00_arches_arm64.patch
 create mode 100644 debian/patches/00_arches_arm64_tests.patch

diff --git a/debian/changelog b/debian/changelog
index a2848db..1616279 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+libaio (0.3.109-4) UNRELEASED; urgency=low
+
+  * Add support for arm64 architecture, backporting two patches from upstream
+    development branch. Also use the triplet qualified compiler in order to
+    allow multiarch cross building (Closes: #xxxxxx)
+
+ -- Ian Campbell <[email protected]>  Wed, 06 Mar 2013 03:27:25 +0000
+
 libaio (0.3.109-3) unstable; urgency=low
 
   * Escape backslash in man pages. (Closes: #651833)
diff --git a/debian/patches/00_arches_arm64.patch b/debian/patches/00_arches_arm64.patch
new file mode 100644
index 0000000..19f817c
--- /dev/null
+++ b/debian/patches/00_arches_arm64.patch
@@ -0,0 +1,157 @@
+From d88423b54b84a483a36ee5c9c20397ce3102385b Mon Sep 17 00:00:00 2001
+From: Jeff Moyer <[email protected]>
+Date: Wed, 30 Jan 2013 14:55:23 -0500
+Subject: [PATCH 1/2] add arm64 (aarch64) support
+
+The libaio.h changes came from Riku Voipio <[email protected]>.
+The syscall-arm64.h file is an adapter version of the syscall-arm.h
+file.
+
+Signed-off-by: Jeff Moyer <[email protected]>
+---
+ src/libaio.h        |   10 +++++
+ src/syscall-arm64.h |  101 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/syscall.h       |    2 +
+ 3 files changed, 113 insertions(+)
+ create mode 100644 src/syscall-arm64.h
+
+Index: libaio/src/libaio.h
+===================================================================
+--- libaio.orig/src/libaio.h	2013-03-06 03:28:20.631977560 +0000
++++ libaio/src/libaio.h	2013-03-06 03:28:58.163976233 +0000
+@@ -124,6 +124,16 @@
+ #define PADDEDptr(x, y)	x; unsigned y
+ #define PADDEDul(x, y)	unsigned long x; unsigned y
+ #  endif
++#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
+Index: libaio/src/syscall-arm64.h
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ libaio/src/syscall-arm64.h	2013-03-06 03:28:20.631977560 +0000
+@@ -0,0 +1,101 @@
++/*
++ *  linux/include/asm-arm/unistd.h
++ *
++ *  Copyright (C) 2001-2005 Russell King
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Please forward _all_ changes to this file to [email protected],
++ * no matter what the change is.  Thanks!
++ */
++
++#define __NR_io_setup			0
++#define __NR_io_destroy			1
++#define __NR_io_submit			2
++#define __NR_io_cancel			3
++#define __NR_io_getevents		4
++
++#define __sys2(x) #x
++#define __sys1(x) __sys2(x)
++
++#define __SYS_REG(name) register long __sysreg __asm__("w8") = __NR_##name;
++#define __SYS_REG_LIST(regs...) "r" (__sysreg) , ##regs
++#define __syscall(name) "svc\t#0"
++
++#define io_syscall1(type,fname,sname,type1,arg1)			\
++type fname(type1 arg1) {						\
++  __SYS_REG(sname)							\
++  register long __x0 __asm__("x0") = (long)arg1;			\
++  register long __res_x0 __asm__("x0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_x0)						\
++	: __SYS_REG_LIST( "0" (__x0) )					\
++	: "memory" );							\
++  return (type) __res_x0;						\
++}
++
++#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2)		\
++type fname(type1 arg1,type2 arg2) {					\
++  __SYS_REG(sname)							\
++  register long __x0 __asm__("x0") = (long)arg1;			\
++  register long __x1 __asm__("x1") = (long)arg2;			\
++  register long __res_x0 __asm__("x0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_x0)						\
++	: __SYS_REG_LIST( "0" (__x0), "r" (__x1) )			\
++	: "memory" );							\
++  return (type) __res_x0;						\
++}
++
++#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3)	\
++type fname(type1 arg1,type2 arg2,type3 arg3) {				\
++  __SYS_REG(sname)							\
++  register long __x0 __asm__("x0") = (long)arg1;			\
++  register long __x1 __asm__("x1") = (long)arg2;			\
++  register long __x2 __asm__("x2") = (long)arg3;			\
++  register long __res_x0 __asm__("x0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_x0)						\
++	: __SYS_REG_LIST( "0" (__x0), "r" (__x1), "r" (__x2) )		\
++	: "memory" );							\
++  return (type) __res_x0;						\
++}
++
++#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4)\
++type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) {		\
++  __SYS_REG(sname)							\
++  register long __x0 __asm__("x0") = (long)arg1;			\
++  register long __x1 __asm__("x1") = (long)arg2;			\
++  register long __x2 __asm__("x2") = (long)arg3;			\
++  register long __x3 __asm__("x3") = (long)arg4;			\
++  register long __res_x0 __asm__("x0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_x0)						\
++	: __SYS_REG_LIST( "0" (__x0), "r" (__x1), "r" (__x2), "r" (__x3) ) \
++	: "memory" );							\
++  return (type) __res_x0;						\
++}
++
++#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) {\
++  __SYS_REG(sname)							\
++  register long __x0 __asm__("x0") = (long)arg1;			\
++  register long __x1 __asm__("x1") = (long)arg2;			\
++  register long __x2 __asm__("x2") = (long)arg3;			\
++  register long __x3 __asm__("x3") = (long)arg4;			\
++  register long __x4 __asm__("x4") = (long)arg5;			\
++  register long __res_x0 __asm__("x0");					\
++  __asm__ __volatile__ (						\
++  __syscall(sname)							\
++	: "=r" (__res_x0)						\
++	: __SYS_REG_LIST( "0" (__x0), "r" (__x1), "r" (__x2),		\
++			  "r" (__x3), "r" (__x4) )			\
++	: "memory" );							\
++  return (type) __res_x0;						\
++}
+Index: libaio/src/syscall.h
+===================================================================
+--- libaio.orig/src/syscall.h	2013-03-06 03:28:20.631977560 +0000
++++ libaio/src/syscall.h	2013-03-06 03:29:11.003975778 +0000
+@@ -36,6 +36,8 @@
+ #include "syscall-mips.h"
+ #elif defined(__sh__)
+ #include "syscall-sh.h"
++#elif defined(__aarch64__)
++#include "syscall-arm64.h"
+ #else
+ #error "add syscall-arch.h"
+ #endif
diff --git a/debian/patches/00_arches_arm64_tests.patch b/debian/patches/00_arches_arm64_tests.patch
new file mode 100644
index 0000000..679c8f3
--- /dev/null
+++ b/debian/patches/00_arches_arm64_tests.patch
@@ -0,0 +1,46 @@
+From b564776250eaff47728eb63c25bbefcfd1c0c240 Mon Sep 17 00:00:00 2001
+From: Jeff Moyer <[email protected]>
+Date: Thu, 31 Jan 2013 15:57:02 -0500
+Subject: [PATCH 2/2] fix test case 16 to work on arm64
+
+aarch64 does not implement "legacy" system calls such as eventfd.  It
+does, of course, support eventfd2, so use that instead.
+
+Reported-by: Riku Voipio <[email protected]>
+Signed-off-by: Jeff Moyer <[email protected]>
+---
+ harness/cases/16.t |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/harness/cases/16.t b/harness/cases/16.t
+index c3157cc..5a546ff 100644
+--- a/harness/cases/16.t
++++ b/harness/cases/16.t
+@@ -18,6 +18,12 @@
+ #define SYS_eventfd 318
+ #elif defined(__alpha__)
+ #define SYS_eventfd 478
++#elif defined(__aarch64__)
++/* arm64 does not implement eventfd, only eventfd2 */
++#define USE_EVENTFD2
++#ifndef SYS_eventfd2
++#define SYS_eventfd2 19
++#endif /* __aarch64__ */
+ #else
+ #error define SYS_eventfd for your arch!
+ #endif
+@@ -39,7 +45,11 @@ int test_main(void)
+ 	struct timespec	notime = { .tv_sec = 0, .tv_nsec = 0 };
+ 
+ 	buf = malloc(SIZE);				assert(buf);
++#ifndef USE_EVENTFD2
+ 	efd = syscall(SYS_eventfd, 0);
++#else
++	efd = syscall(SYS_eventfd2, 0, 0);
++#endif
+ 	if (efd < 0) {
+ 		if (errno == ENOSYS) {
+ 			printf("No eventfd support.  [SKIPPING]\n");
+-- 
+1.7.10.4
+
diff --git a/debian/patches/series b/debian/patches/series
index c9ed9f3..8cfaa38 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,8 @@
 00_arches.patch
 00_arches_sh.patch
 00_arches_sparc64.patch
+00_arches_arm64.patch
+00_arches_arm64_tests.patch
 01_link_libgcc.patch
 02_libdevdir.patch
 03_man_errors.patch
diff --git a/debian/rules b/debian/rules
index d842fce..1ac7be0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,7 @@
 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
+CC = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-gcc
 CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
 CFLAGS = $(shell dpkg-buildflags --get CFLAGS) -Wall
 LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
@@ -20,7 +21,7 @@ build-indep:
 build-arch:
 	dh_testdir
 	
-	$(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+	$(MAKE) CC="$(CC)" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 build: build-indep build-arch
 
-- 
1.7.10.4


--- End Message ---
--- Begin Message ---
Source: libaio
Source-Version: 0.3.109-4

We believe that the bug you reported is fixed in the latest version of
libaio, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Guillem Jover <[email protected]> (supplier of updated libaio package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Mon, 06 May 2013 18:56:19 +0200
Source: libaio
Binary: libaio1 libaio1-udeb libaio1-dbg libaio-dev
Architecture: source amd64
Version: 0.3.109-4
Distribution: unstable
Urgency: low
Maintainer: Guillem Jover <[email protected]>
Changed-By: Guillem Jover <[email protected]>
Description: 
 libaio-dev - Linux kernel AIO access library - development files
 libaio1    - Linux kernel AIO access library - shared library
 libaio1-dbg - Linux kernel AIO access library - debugging symbols
 libaio1-udeb - Linux kernel AIO access library - shared library (udeb)
Closes: 702183 702409
Changes: 
 libaio (0.3.109-4) unstable; urgency=low
 .
   * Now using Standards-Version 3.9.4 (no changes needed).
   * Remove package creation information from debian/copyright.
   * Update upstream git URL in debian/copyright.
   * Add support for x32 (from the Yocto project). (Closes: #702183)
     Thanks to Daniel Schepler <[email protected]>.
   * Add support for arm64 (stolen from upstream). (Closes: #702409)
     Thanks to Ian Campbell <[email protected]>.
   * Add cross-compilation support.
     Based on a patch by Ian Campbell <[email protected]>.
   * Update debian/watch file to a working URL.
Checksums-Sha1: 
 86c31e66a1810b1d36cf7566e5119b39c159a7af 1347 libaio_0.3.109-4.dsc
 55cd6f2a61ce82c358318889f2899a5ee9db9b57 29390 libaio_0.3.109-4.debian.tar.gz
 7843cc94560140690fc5afc5f2c209a923b6f11a 9162 libaio1_0.3.109-4_amd64.deb
 dcebc974ae36e4209ed287211759e74525f8c0f5 2164 libaio1-udeb_0.3.109-4_amd64.udeb
 728e9f796697e8bd819d7cfac46e6d32ab5a06c5 11808 libaio1-dbg_0.3.109-4_amd64.deb
 48413a6b493fe394fa90a834688517340e467dd3 18736 libaio-dev_0.3.109-4_amd64.deb
Checksums-Sha256: 
 a92e6056713fa34caaf47fa87d7304881f2bca4de9deeac1a6a1d7642570c0d4 1347 
libaio_0.3.109-4.dsc
 57fb6983dafb95d8a36c8502bba6b3ce3acf490a2af8d2de0646a27dcb9468ac 29390 
libaio_0.3.109-4.debian.tar.gz
 fbe184b584407571c497ba55e0e1107a063e3d55f9303d1211fd5ea614005351 9162 
libaio1_0.3.109-4_amd64.deb
 0bbbabd4228d430623ffcb9b150f96d96ccbbd405af906ea6349cc952d9bd428 2164 
libaio1-udeb_0.3.109-4_amd64.udeb
 2357ca1d9428e607029b0d603a5847bc75d2e45fcf135ffddbfe08cee56898fb 11808 
libaio1-dbg_0.3.109-4_amd64.deb
 067462dc24a6f415a494b9a1076e6833a5a1b4e873c27c40b29942ee1bb9e957 18736 
libaio-dev_0.3.109-4_amd64.deb
Files: 
 31ad8dc7d3b9ea89ebcf80aa8128dd4e 1347 libs optional libaio_0.3.109-4.dsc
 dfbb81c98035c4ade021f7b09298f4cc 29390 libs optional 
libaio_0.3.109-4.debian.tar.gz
 4f35f6a04893243345dc7b13eee3e0ac 9162 libs optional libaio1_0.3.109-4_amd64.deb
 0e0d8993fa1a93102f75281ac4dd31f3 2164 debian-installer optional 
libaio1-udeb_0.3.109-4_amd64.udeb
 09d5277c7afabade14064dc669c46f2b 11808 debug extra 
libaio1-dbg_0.3.109-4_amd64.deb
 f45df00e29d516556c91d2d54dad7e49 18736 libdevel optional 
libaio-dev_0.3.109-4_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlGKuH0ACgkQuW9ciZ2SjJtPOwCgzwSfaLk9p+vPYkMp8rhCaWR9
diYAnRxNpQkumBQAMyPqHKlTTKPm328J
=VKvB
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to