Accepting request 31767 from devel:libraries:c_c++

Copy from devel:libraries:c_c++/libaio based on submit request 31767 from user coolo

OBS-URL: https://build.opensuse.org/request/show/31767
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libaio?expand=0&rev=11
This commit is contained in:
OBS User autobuild 2010-02-11 19:16:56 +00:00 committed by Git OBS Bridge
parent 65d8d92689
commit b393d9f01b
10 changed files with 2969 additions and 55 deletions

View File

@ -1,8 +1,16 @@
# patch from debian
# http://www.mail-archive.com/debian-hppa@lists.debian.org/msg05882.html
---
harness/main.c | 8 +
src/libaio.h | 34 +++++++
src/syscall-arm.h | 116 ++++++++++++++++++++++++++
src/syscall-m68k.h | 78 +++++++++++++++++
src/syscall-mips.h | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++
src/syscall-parisc.h | 146 +++++++++++++++++++++++++++++++++
src/syscall-sparc.h | 130 +++++++++++++++++++++++++++++
src/syscall.h | 10 ++
8 files changed, 744 insertions(+), 1 deletion(-)
--- libaio-0.3.106.orig/src/syscall-m68k.h
+++ libaio-0.3.106/src/syscall-m68k.h
--- /dev/null
+++ b/src/syscall-m68k.h
@@ -0,0 +1,78 @@
+#define __NR_io_setup 241
+#define __NR_io_destroy 242
@ -82,8 +90,8 @@
+return (type) __res; \
+}
+
--- libaio-0.3.106.orig/src/syscall-sparc.h
+++ libaio-0.3.106/src/syscall-sparc.h
--- /dev/null
+++ b/src/syscall-sparc.h
@@ -0,0 +1,130 @@
+/* $Id: unistd.h,v 1.74 2002/02/08 03:57:18 davem Exp $ */
+
@ -215,8 +223,8 @@
+return -1; \
+}
+
--- libaio-0.3.106.orig/src/syscall.h
+++ libaio-0.3.106/src/syscall.h
--- a/src/syscall.h
+++ b/src/syscall.h
@@ -22,6 +22,16 @@
#include "syscall-s390.h"
#elif defined(__alpha__)
@ -234,8 +242,8 @@
#else
#error "add syscall-arch.h"
#endif
--- libaio-0.3.106.orig/src/syscall-mips.h
+++ libaio-0.3.106/src/syscall-mips.h
--- /dev/null
+++ b/src/syscall-mips.h
@@ -0,0 +1,223 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
@ -460,9 +468,9 @@
+
+#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */
+
--- libaio-0.3.106.orig/src/libaio.h
+++ libaio-0.3.106/src/libaio.h
@@ -72,6 +72,40 @@
--- a/src/libaio.h
+++ b/src/libaio.h
@@ -73,6 +73,40 @@ 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
@ -503,8 +511,8 @@
#else
#error endian?
#endif
--- libaio-0.3.106.orig/src/syscall-parisc.h
+++ libaio-0.3.106/src/syscall-parisc.h
--- /dev/null
+++ b/src/syscall-parisc.h
@@ -0,0 +1,146 @@
+/*
+ * Linux system call numbers.
@ -652,8 +660,8 @@
+ return K_INLINE_SYSCALL(sname, 5, arg1, arg2, arg3, arg4, arg5); \
+}
+
--- libaio-0.3.106.orig/src/syscall-arm.h
+++ libaio-0.3.106/src/syscall-arm.h
--- /dev/null
+++ b/src/syscall-arm.h
@@ -0,0 +1,116 @@
+/*
+ * linux/include/asm-arm/unistd.h
@ -754,7 +762,7 @@
+}
+
+#define io_syscall5(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
+type ffname(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 __r0 __asm__("r0") = (long)arg1; \
+ register long __r1 __asm__("r1") = (long)arg2; \
@ -771,3 +779,21 @@
+ return (type) __res_r0; \
+}
+
--- a/harness/main.c
+++ b/harness/main.c
@@ -11,8 +11,14 @@
#include <libaio.h>
-#if defined(__i386__)
+#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
#define KERNEL_RW_POINTER ((void *)0xc0010000)
+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
+#define KERNEL_RW_POINTER ((void *)0x00010000)
+#elif defined(__hppa__)
+#define KERNEL_RW_POINTER ((void *)0x10100000)
+#elif defined(__sparc__) && !defined(__arch64__)
+#define KERNEL_RW_POINTER ((void *)0xf0010000)
#else
//#warning Not really sure where kernel memory is. Guessing.
#define KERNEL_RW_POINTER ((void *)0xffffffffc0010000)

142
00_arches_sh.patch Normal file
View File

@ -0,0 +1,142 @@
From: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Subject: Add SH supprt
The test-suite logs can be found at:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535288>
diff --git a/harness/main.c b/harness/main.c
index f472da7..01fbb87 100644
--- a/harness/main.c
+++ b/harness/main.c
@@ -13,7 +13,7 @@
#if defined(__i386__) || defined(__powerpc__) || defined(__mips__)
#define KERNEL_RW_POINTER ((void *)0xc0010000)
-#elif defined(__arm__) || defined(__m68k__) || defined(__s390__)
+#elif defined(__arm__) || defined(__m68k__) || defined(__s390__) || defined(__sh__)
#define KERNEL_RW_POINTER ((void *)0x00010000)
#elif defined(__hppa__)
#define KERNEL_RW_POINTER ((void *)0x10100000)
diff --git a/src/libaio.h b/src/libaio.h
index 68e22ac..d306084 100644
--- a/src/libaio.h
+++ b/src/libaio.h
@@ -107,6 +107,16 @@ typedef enum io_iocb_cmd {
# else
# error "neither mipseb nor mipsel?"
# endif
+#elif defined(__sh__) /* sh3/sh4*/
+# if defined (__BIG_ENDIAN__) /* big endian, 32 bits */
+#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(__LITTLE_ENDIAN__) /* little endian, 32 bits */
+#define PADDED(x, y) x; unsigned y
+#define PADDEDptr(x, y) x; unsigned y
+#define PADDEDul(x, y) unsigned long x; unsigned y
+# endif
#else
#error endian?
#endif
diff --git a/src/syscall-sh.h b/src/syscall-sh.h
new file mode 100644
index 0000000..9945ec6
--- /dev/null
+++ b/src/syscall-sh.h
@@ -0,0 +1,78 @@
+/* Copy from ./arch/sh/include/asm/unistd_32.h */
+#define __NR_io_setup 245
+#define __NR_io_destroy 246
+#define __NR_io_getevents 247
+#define __NR_io_submit 248
+#define __NR_io_cancel 249
+
+#define io_syscall1(type,fname,sname,type1,arg1) \
+type fname(type1 arg1) \
+{ \
+register long __sc0 __asm__ ("r3") = __NR_##sname; \
+register long __sc4 __asm__ ("r4") = (long) arg1; \
+__asm__ __volatile__ ("trapa #0x11" \
+ : "=z" (__sc0) \
+ : "0" (__sc0), "r" (__sc4) \
+ : "memory"); \
+ return (type) __sc0;\
+}
+
+#define io_syscall2(type,fname,sname,type1,arg1,type2,arg2) \
+type fname(type1 arg1,type2 arg2) \
+{ \
+register long __sc0 __asm__ ("r3") = __NR_##sname; \
+register long __sc4 __asm__ ("r4") = (long) arg1; \
+register long __sc5 __asm__ ("r5") = (long) arg2; \
+ __asm__ __volatile__ ("trapa #0x12" \
+ : "=z" (__sc0) \
+ : "0" (__sc0), "r" (__sc4), "r" (__sc5) \
+ : "memory"); \
+ return (type) __sc0;\
+}
+
+#define io_syscall3(type,fname,sname,type1,arg1,type2,arg2,type3,arg3) \
+type fname(type1 arg1,type2 arg2,type3 arg3) \
+{ \
+register long __sc0 __asm__ ("r3") = __NR_##sname; \
+register long __sc4 __asm__ ("r4") = (long) arg1; \
+register long __sc5 __asm__ ("r5") = (long) arg2; \
+register long __sc6 __asm__ ("r6") = (long) arg3; \
+ __asm__ __volatile__ ("trapa #0x13" \
+ : "=z" (__sc0) \
+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6) \
+ : "memory"); \
+ return (type) __sc0;\
+}
+
+#define io_syscall4(type,fname,sname,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
+type fname(type1 arg1, type2 arg2, type3 arg3, type4 arg4) \
+{ \
+register long __sc0 __asm__ ("r3") = __NR_##sname; \
+register long __sc4 __asm__ ("r4") = (long) arg1; \
+register long __sc5 __asm__ ("r5") = (long) arg2; \
+register long __sc6 __asm__ ("r6") = (long) arg3; \
+register long __sc7 __asm__ ("r7") = (long) arg4; \
+__asm__ __volatile__ ("trapa #0x14" \
+ : "=z" (__sc0) \
+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), \
+ "r" (__sc7) \
+ : "memory" ); \
+ return (type) __sc0;\
+}
+
+#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) \
+{ \
+register long __sc3 __asm__ ("r3") = __NR_##sname; \
+register long __sc4 __asm__ ("r4") = (long) arg1; \
+register long __sc5 __asm__ ("r5") = (long) arg2; \
+register long __sc6 __asm__ ("r6") = (long) arg3; \
+register long __sc7 __asm__ ("r7") = (long) arg4; \
+register long __sc0 __asm__ ("r0") = (long) arg5; \
+__asm__ __volatile__ ("trapa #0x15" \
+ : "=z" (__sc0) \
+ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \
+ "r" (__sc3) \
+ : "memory" ); \
+ return (type) __sc0;\
+}
diff --git a/src/syscall.h b/src/syscall.h
index b957bbe..ea0435e 100644
--- a/src/syscall.h
+++ b/src/syscall.h
@@ -32,6 +32,8 @@
#include "syscall-parisc.h"
#elif defined(__mips__)
#include "syscall-mips.h"
+#elif defined(__sh__)
+#include "syscall-sh.h"
#else
#error "add syscall-arch.h"
#endif
--
1.6.3.1

17
01_link_libgcc.patch Normal file
View File

@ -0,0 +1,17 @@
---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libaio-0.3.107/src/Makefile
===================================================================
--- libaio-0.3.107.orig/src/Makefile
+++ libaio-0.3.107/src/Makefile
@@ -6,7 +6,7 @@ ARCH := $(shell uname -m | sed -e s/i.86
CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC $(OPTFLAGS)
SO_CFLAGS=-shared $(CFLAGS)
L_CFLAGS=$(CFLAGS)
-LINK_FLAGS=
+LINK_FLAGS := -lgcc
soname=libaio.so.1
minor=0

65
02_libdevdir.patch Normal file
View File

@ -0,0 +1,65 @@
---
Makefile | 9 ++++++++-
src/Makefile | 12 +++++++-----
2 files changed, 15 insertions(+), 6 deletions(-)
Index: libaio-0.3.107/Makefile
===================================================================
--- libaio-0.3.107.orig/Makefile
+++ libaio-0.3.107/Makefile
@@ -5,9 +5,11 @@ RELEASE=$(shell awk '/Release:/ { print
CVSTAG = $(NAME)_$(subst .,-,$(VERSION))_$(subst .,-,$(RELEASE))
RPMBUILD=$(shell `which rpmbuild >&/dev/null` && echo "rpmbuild" || echo "rpm")
+DESTDIR=
prefix=/usr
includedir=$(prefix)/include
libdir=$(prefix)/lib
+libdevdir=$(prefix)/lib
default: all
@@ -15,7 +17,12 @@ all:
@$(MAKE) -C src
install:
- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir)
+ @$(MAKE) -C src install \
+ DESTDIR=$(DESTDIR) \
+ prefix=$(prefix) \
+ includedir=$(includedir) \
+ libdir=$(libdir) \
+ libdevdir=$(libdevdir)
check:
@$(MAKE) -C harness check
Index: libaio-0.3.107/src/Makefile
===================================================================
--- libaio-0.3.107.orig/src/Makefile
+++ libaio-0.3.107/src/Makefile
@@ -1,6 +1,8 @@
+DESTDIR=
prefix=/usr
includedir=$(prefix)/include
libdir=$(prefix)/lib
+libdevdir=$(prefix)/lib
ARCH := $(shell uname -m | sed -e s/i.86/i386/)
CFLAGS := -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC $(OPTFLAGS)
@@ -51,11 +53,11 @@ $(libname): $(libaio_sobjs) libaio.map
$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
install: $(all_targets)
- install -D -m 644 libaio.h $(includedir)/libaio.h
- install -D -m 644 libaio.a $(libdir)/libaio.a
- install -D -m 755 $(libname) $(libdir)/$(libname)
- ln -sf $(libname) $(libdir)/$(soname)
- ln -sf $(libname) $(libdir)/libaio.so
+ install -D -m 644 libaio.h $(DESTDIR)$(includedir)/libaio.h
+ install -D -m 644 libaio.a $(DESTDIR)$(libdevdir)/libaio.a
+ install -D -m 755 $(libname) $(DESTDIR)$(libdir)/$(libname)
+ ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdir)/$(soname)
+ ln -sf $(libdir)/$(libname) $(DESTDIR)$(libdevdir)/libaio.so
$(libaio_objs): libaio.h

2671
03_man_errors.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +0,0 @@
--- src/raw_syscall.c
+++ src/raw_syscall.c
@@ -4,6 +4,7 @@
/* based on code from glibc by Jes Sorensen */
__asm__(".text\n"
".globl __ia64_aio_raw_syscall\n"
+ ".proc __ia64_aio_raw_syscall\n"
"__ia64_aio_raw_syscall:\n"
"alloc r2=ar.pfs,1,0,8,0\n"
"mov r15=r32\n"
--- src/syscall-ia64.h
+++ src/syscall-ia64.h
@@ -7,6 +7,7 @@
#define __ia64_raw_syscall(fname, sname) \
__asm__ (".text\n" \
".globl " SYMSTR(fname) "\n" \
+ ".proc " SYMSTR(fname) "\n" \
SYMSTR(fname) ":\n" \
" mov r15=" SYMSTR( __NR_ ## sname ) "\n" \
" break 0x100000\n" \

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30ac9cf0992bfff0975107c72c49e71827dd916e8c1b9e1edf79b1f58b7bb810
size 41049

3
libaio-0.3.107.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56307e2b0dbf88a0a4e704aa121e14caded05ed90950096b6c4460d09d8f8c3c
size 42850

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sat Jan 23 14:32:58 CET 2010 - jengelh@medozas.de
- update to libaio 0.3.107
- add more patches from Debian to fix compile errors on SPARC
- package baselibs.conf
-------------------------------------------------------------------
Sun Aug 2 10:17:33 UTC 2009 - jansimon.moeller@opensuse.org

View File

@ -1,7 +1,7 @@
#
# spec file for package libaio (Version 0.3.104)
# spec file for package libaio (Version 0.3.107)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -19,7 +19,7 @@
Name: libaio
License: LGPL v2.1 or later
License: LGPLv2.1+
Group: System/Libraries
AutoReqProv: on
# bug437293
@ -27,13 +27,17 @@ AutoReqProv: on
Obsoletes: libaio-64bit
%endif
#
Version: 0.3.104
Release: 142
Version: 0.3.107
Release: 1
Summary: Linux-Native Asynchronous I/O Access Library
Source: libaio-%{version}.tar.bz2
Patch1: libaio-%{version}.diff
Source2: baselibs.conf
Patch2: libaio-optflags.diff
Patch3: 00_arches.patch
Patch4: 00_arches_sh.patch
Patch5: 01_link_libgcc.patch
Patch6: 02_libdevdir.patch
Patch7: 03_man_errors.patch
Patch500: ARM_io_getevents.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -48,7 +52,7 @@ require the Linux-native async I/O API.
%package devel
License: LGPL v2.1 or later
License: LGPLv2.1+
Summary: Development Files for Linux-native Asynchronous I/O Access
Group: Development/Libraries/C and C++
Requires: libaio = %{version} glibc-devel
@ -67,22 +71,24 @@ with, for the Linux-native asynchronous I/O facility ("async I/O", or
%prep
%setup -q
%patch1
%patch2 -p1
%patch -p1 -P 3 -P 4 -P 5 -P 6 -P 7
%ifarch %arm
%patch3 -p1
%patch500 -p1
%endif
%build
%{__make} %{?jobs:-j%jobs} OPTFLAGS="$RPM_OPT_FLAGS"
%{__make} %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS"
%install
make install prefix=%{buildroot}/usr libdir=%{buildroot}/%{_lib}
mkdir -p %{buildroot}%{_libdir}
%{__ln_s} -v /%{_lib}/$(readlink %{buildroot}/%{_lib}/%{name}.so) %{buildroot}%{_libdir}/%{name}.so
%{__rm} -v %{buildroot}/%{_lib}/%{name}.so
%{__rm} -v %{buildroot}/%{_lib}/%{name}.a
%ifarch x86_64 ppc64 sparc64
mv "%buildroot/usr/lib" "%buildroot/usr/lib64"
%endif
rm -f "%buildroot/%_libdir"/*.a
# Strip dumb /usr/src/... off
t=$(readlink -f "%buildroot/%_lib/libaio.so.1")
ln -fs "${t##*/}" "%buildroot/%_lib/libaio.so.1"
%post -p /sbin/ldconfig