Compare commits
10 Commits
d77d25cb01
...
92dcd9d99a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92dcd9d99a | ||
|
|
e0295c7738 | ||
|
|
a4819fb8ed | ||
|
|
fd6702ef6f | ||
|
|
ae55a04e7b | ||
|
|
8ead6f86eb | ||
|
|
75f0305eeb | ||
|
|
5dc18669c9 | ||
|
|
ffe117cbea | ||
|
|
641e9a0613 |
69
0006-libaio-Add-sw64-architecture.patch
Normal file
69
0006-libaio-Add-sw64-architecture.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 9f996eb3419e32f7408b14d49421ef9058ff17cf Mon Sep 17 00:00:00 2001
|
||||
From: wzx <wuzx1226@qq.com>
|
||||
Date: Mon, 7 Nov 2022 15:13:35 +0800
|
||||
Subject: [PATCH] Add sw64 architecture
|
||||
|
||||
Add sw64 architecture in file harness/cases/16.t src/libaio.h src/syscall-sw_64.h src/syscall.h to support sw64 architecture.
|
||||
|
||||
Signed-off-by: wzx <wuzx1226@qq.com>
|
||||
---
|
||||
harness/cases/16.t | 2 ++
|
||||
src/libaio.h | 2 +-
|
||||
src/syscall-sw_64.h | 5 +++++
|
||||
src/syscall.h | 2 ++
|
||||
4 files changed, 10 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/syscall-sw_64.h
|
||||
|
||||
diff --git a/harness/cases/16.t b/harness/cases/16.t
|
||||
index 4d24b04..9e8684a 100644
|
||||
--- a/harness/cases/16.t
|
||||
+++ b/harness/cases/16.t
|
||||
@@ -16,6 +16,8 @@
|
||||
#define SYS_eventfd 307
|
||||
#elif defined(__s390__)
|
||||
#define SYS_eventfd 318
|
||||
+#elif defined(__sw_64__)
|
||||
+#define SYS_eventfd 478
|
||||
#elif defined(__alpha__)
|
||||
#define SYS_eventfd 478
|
||||
#elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
|
||||
diff --git a/src/libaio.h b/src/libaio.h
|
||||
index 87f9e8a..d9e4fb8 100644
|
||||
--- a/src/libaio.h
|
||||
+++ b/src/libaio.h
|
||||
@@ -63,7 +63,7 @@ typedef enum io_iocb_cmd {
|
||||
#define PADDEDul(x, y) unsigned long x; unsigned y
|
||||
|
||||
/* little endian, 64 bits */
|
||||
-#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
+#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__sw_64__) || \
|
||||
(defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
defined(__loongarch64) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || \
|
||||
diff --git a/src/syscall-sw_64.h b/src/syscall-sw_64.h
|
||||
new file mode 100644
|
||||
index 0000000..0aa4d3d
|
||||
--- /dev/null
|
||||
+++ b/src/syscall-sw_64.h
|
||||
@@ -0,0 +1,5 @@
|
||||
+#define __NR_io_setup 398
|
||||
+#define __NR_io_destroy 399
|
||||
+#define __NR_io_getevents 400
|
||||
+#define __NR_io_submit 401
|
||||
+#define __NR_io_cancel 402
|
||||
diff --git a/src/syscall.h b/src/syscall.h
|
||||
index d2a117b..abc1762 100644
|
||||
--- a/src/syscall.h
|
||||
+++ b/src/syscall.h
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "syscall-ppc.h"
|
||||
#elif defined(__s390__)
|
||||
#include "syscall-s390.h"
|
||||
+#elif defined(__sw_64__)
|
||||
+#include "syscall-sw_64.h"
|
||||
#elif defined(__alpha__)
|
||||
#include "syscall-alpha.h"
|
||||
#elif defined(__arm__)
|
||||
--
|
||||
2.43.5
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
From 385c1b9eb28e1cc1f64ddedb4a64aa2effa13d5c Mon Sep 17 00:00:00 2001
|
||||
From: wangzhiqiang <wangzhiqiang95@huawei.com>
|
||||
Date: Thu, 3 Nov 2022 16:24:49 +0800
|
||||
Subject: [PATCH] skip testcase 23 since current kernel version not support
|
||||
|
||||
current kernel version of obs not support run testcase 23,
|
||||
so skip it to avoild build error.
|
||||
issue: https://gitee.com/src-openeuler/libaio/issue/I5XELL
|
||||
---
|
||||
harness/runtests.sh | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/harness/runtests.sh b/harness/runtests.sh
|
||||
index e9ceec8..a62bae7 100755
|
||||
--- a/harness/runtests.sh
|
||||
+++ b/harness/runtests.sh
|
||||
@@ -9,6 +9,9 @@ echo "Test run starting at" `date`
|
||||
while [ $# -ge 1 ] ; do
|
||||
this_test=$1
|
||||
shift
|
||||
+ if [ $this_test = "cases/23.p" ];then
|
||||
+ continue
|
||||
+ fi
|
||||
echo "Starting $this_test"
|
||||
$this_test 2>&1
|
||||
res=$?
|
||||
--
|
||||
2.33.0
|
||||
|
||||
56
0007-Fix-build-error-if-compiler-is-clang.patch
Normal file
56
0007-Fix-build-error-if-compiler-is-clang.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 8c4d190b7a5ff484d4393d1d445a4245bda74c92 Mon Sep 17 00:00:00 2001
|
||||
From: Chenxi Mao <chenxi.mao@suse.com>
|
||||
Date: Wed, 5 Apr 2023 19:39:22 +0800
|
||||
Subject: [PATCH 1/1] Fix build error if compiler is clang
|
||||
|
||||
There is a build error if compiler is clang:
|
||||
clang -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS --config /usr/lib/rpm/generic-hardened-clang.cfg -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -Wall -Werror -I../src -g -O2 -Wno-stringop-overflow -DTEST_NAME=\"cases/3.t\" -o cases/3.p main.c ../src/libaio.a -lpthread
|
||||
error: unknown warning option '-Wno-stringop-overflow'; did you mean '-Wno-shift-overflow'? [-Werror,-Wunknown-warning-option]
|
||||
|
||||
./cases/13.t:38:26: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
|
||||
struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
|
||||
^~~~~~~
|
||||
.tv_sec =
|
||||
./cases/13.t:38:38: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator]
|
||||
struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
|
||||
^~~~~~~~
|
||||
.tv_nsec =
|
||||
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
|
||||
---
|
||||
harness/Makefile | 2 ++
|
||||
harness/cases/13.t | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/harness/Makefile b/harness/Makefile
|
||||
index d7243a6..8d067eb 100644
|
||||
--- a/harness/Makefile
|
||||
+++ b/harness/Makefile
|
||||
@@ -10,10 +10,12 @@ HARNESS_SRCS:=main.c
|
||||
CFLAGS+=-Wall -Werror -I../src -g -O2
|
||||
#-lpthread -lrt
|
||||
|
||||
+ifeq ($(CC),gcc)
|
||||
# gcc-11 does not like the test case in 3.t that
|
||||
# passes an invalid pointer (-1) to the kernel, so
|
||||
# tell the compiler we do not need a warning here
|
||||
cases/3.p: CFLAGS+=-Wno-stringop-overflow
|
||||
+endif
|
||||
|
||||
# Change this on the build line to run tests against the installed libraries:
|
||||
# make LIBAIO=-laio partcheck
|
||||
diff --git a/harness/cases/13.t b/harness/cases/13.t
|
||||
index 5f18005..9e82380 100644
|
||||
--- a/harness/cases/13.t
|
||||
+++ b/harness/cases/13.t
|
||||
@@ -35,7 +35,7 @@ int test_main(void)
|
||||
status |= attempt_io_submit(io_ctx, IOS, iocb_list, IOS);
|
||||
|
||||
for (i=0; i<IOS; i++) {
|
||||
- struct timespec ts = { tv_sec: 30, tv_nsec: 0 };
|
||||
+ struct timespec ts = { .tv_sec = 30, .tv_nsec = 0 };
|
||||
struct io_event event;
|
||||
struct iocb *iocb;
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,138 +0,0 @@
|
||||
From 9f996eb3419e32f7408b14d49421ef9058ff17cf Mon Sep 17 00:00:00 2001
|
||||
From: wzx <wuzx1226@qq.com>
|
||||
Date: Mon, 7 Nov 2022 15:13:35 +0800
|
||||
Subject: [PATCH] Add sw64 architecture
|
||||
|
||||
Add sw64 architecture in file harness/cases/16.t setup-libaio-0.3.113/harness/cases/16.t setup-libaio-0.3.113/src/libaio.h setup-libaio-0.3.113/src/syscall-sw_64.h setup-libaio-0.3.113/src/syscall.h src/libaio.h src/libaio.h.arm64-ilp32 src/syscall-sw_64.h src/syscall.h to support sw64 architecture.
|
||||
|
||||
Signed-off-by: wzx <wuzx1226@qq.com>
|
||||
---
|
||||
harness/cases/16.t | 2 ++
|
||||
setup-libaio-0.3.113/harness/cases/16.t | 2 ++
|
||||
setup-libaio-0.3.113/src/libaio.h | 2 +-
|
||||
setup-libaio-0.3.113/src/syscall-sw_64.h | 5 +++++
|
||||
setup-libaio-0.3.113/src/syscall.h | 2 ++
|
||||
src/libaio.h | 2 +-
|
||||
src/libaio.h.arm64-ilp32 | 2 +-
|
||||
src/syscall-sw_64.h | 5 +++++
|
||||
src/syscall.h | 2 ++
|
||||
9 files changed, 21 insertions(+), 3 deletions(-)
|
||||
create mode 100644 setup-libaio-0.3.113/src/syscall-sw_64.h
|
||||
create mode 100644 src/syscall-sw_64.h
|
||||
|
||||
diff --git a/harness/cases/16.t b/harness/cases/16.t
|
||||
index 4d24b04..9e8684a 100644
|
||||
--- a/harness/cases/16.t
|
||||
+++ b/harness/cases/16.t
|
||||
@@ -16,6 +16,8 @@
|
||||
#define SYS_eventfd 307
|
||||
#elif defined(__s390__)
|
||||
#define SYS_eventfd 318
|
||||
+#elif defined(__sw_64__)
|
||||
+#define SYS_eventfd 478
|
||||
#elif defined(__alpha__)
|
||||
#define SYS_eventfd 478
|
||||
#elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
|
||||
diff --git a/setup-libaio-0.3.113/harness/cases/16.t b/setup-libaio-0.3.113/harness/cases/16.t
|
||||
index 4d24b04..9e8684a 100644
|
||||
--- a/setup-libaio-0.3.113/harness/cases/16.t
|
||||
+++ b/setup-libaio-0.3.113/harness/cases/16.t
|
||||
@@ -16,6 +16,8 @@
|
||||
#define SYS_eventfd 307
|
||||
#elif defined(__s390__)
|
||||
#define SYS_eventfd 318
|
||||
+#elif defined(__sw_64__)
|
||||
+#define SYS_eventfd 478
|
||||
#elif defined(__alpha__)
|
||||
#define SYS_eventfd 478
|
||||
#elif defined(__aarch64__) || defined(__loongarch__) || defined(__riscv)
|
||||
diff --git a/setup-libaio-0.3.113/src/libaio.h b/setup-libaio-0.3.113/src/libaio.h
|
||||
index 24b4b8a..24a1a28 100644
|
||||
--- a/setup-libaio-0.3.113/src/libaio.h
|
||||
+++ b/setup-libaio-0.3.113/src/libaio.h
|
||||
@@ -62,7 +62,7 @@ typedef enum io_iocb_cmd {
|
||||
#define PADDEDul(x, y) unsigned long x; unsigned y
|
||||
|
||||
/* little endian, 64 bits */
|
||||
-#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
+#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__sw_64__) || \
|
||||
(defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
defined(__loongarch64) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || \
|
||||
diff --git a/setup-libaio-0.3.113/src/syscall-sw_64.h b/setup-libaio-0.3.113/src/syscall-sw_64.h
|
||||
new file mode 100644
|
||||
index 0000000..0aa4d3d
|
||||
--- /dev/null
|
||||
+++ b/setup-libaio-0.3.113/src/syscall-sw_64.h
|
||||
@@ -0,0 +1,5 @@
|
||||
+#define __NR_io_setup 398
|
||||
+#define __NR_io_destroy 399
|
||||
+#define __NR_io_getevents 400
|
||||
+#define __NR_io_submit 401
|
||||
+#define __NR_io_cancel 402
|
||||
diff --git a/setup-libaio-0.3.113/src/syscall.h b/setup-libaio-0.3.113/src/syscall.h
|
||||
index d2a117b..abc1762 100644
|
||||
--- a/setup-libaio-0.3.113/src/syscall.h
|
||||
+++ b/setup-libaio-0.3.113/src/syscall.h
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "syscall-ppc.h"
|
||||
#elif defined(__s390__)
|
||||
#include "syscall-s390.h"
|
||||
+#elif defined(__sw_64__)
|
||||
+#include "syscall-sw_64.h"
|
||||
#elif defined(__alpha__)
|
||||
#include "syscall-alpha.h"
|
||||
#elif defined(__arm__)
|
||||
diff --git a/src/libaio.h b/src/libaio.h
|
||||
index 87f9e8a..d9e4fb8 100644
|
||||
--- a/src/libaio.h
|
||||
+++ b/src/libaio.h
|
||||
@@ -63,7 +63,7 @@ typedef enum io_iocb_cmd {
|
||||
#define PADDEDul(x, y) unsigned long x; unsigned y
|
||||
|
||||
/* little endian, 64 bits */
|
||||
-#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
+#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__sw_64__) || \
|
||||
(defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
defined(__loongarch64) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || \
|
||||
diff --git a/src/libaio.h.arm64-ilp32 b/src/libaio.h.arm64-ilp32
|
||||
index 24b4b8a..24a1a28 100644
|
||||
--- a/src/libaio.h.arm64-ilp32
|
||||
+++ b/src/libaio.h.arm64-ilp32
|
||||
@@ -62,7 +62,7 @@ typedef enum io_iocb_cmd {
|
||||
#define PADDEDul(x, y) unsigned long x; unsigned y
|
||||
|
||||
/* little endian, 64 bits */
|
||||
-#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || \
|
||||
+#elif defined(__ia64__) || defined(__x86_64__) || defined(__alpha__) || defined(__sw_64__) || \
|
||||
(defined(__aarch64__) && defined(__AARCH64EL__)) || \
|
||||
defined(__loongarch64) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || \
|
||||
diff --git a/src/syscall-sw_64.h b/src/syscall-sw_64.h
|
||||
new file mode 100644
|
||||
index 0000000..0aa4d3d
|
||||
--- /dev/null
|
||||
+++ b/src/syscall-sw_64.h
|
||||
@@ -0,0 +1,5 @@
|
||||
+#define __NR_io_setup 398
|
||||
+#define __NR_io_destroy 399
|
||||
+#define __NR_io_getevents 400
|
||||
+#define __NR_io_submit 401
|
||||
+#define __NR_io_cancel 402
|
||||
diff --git a/src/syscall.h b/src/syscall.h
|
||||
index d2a117b..abc1762 100644
|
||||
--- a/src/syscall.h
|
||||
+++ b/src/syscall.h
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "syscall-ppc.h"
|
||||
#elif defined(__s390__)
|
||||
#include "syscall-s390.h"
|
||||
+#elif defined(__sw_64__)
|
||||
+#include "syscall-sw_64.h"
|
||||
#elif defined(__alpha__)
|
||||
#include "syscall-alpha.h"
|
||||
#elif defined(__arm__)
|
||||
--
|
||||
2.33.0
|
||||
|
||||
69
0008-Move-semicolon-to-SYMVER-and-DEFSYMVER-call-sites.patch
Normal file
69
0008-Move-semicolon-to-SYMVER-and-DEFSYMVER-call-sites.patch
Normal file
@ -0,0 +1,69 @@
|
||||
From 3f16a6024bcf95f63c80340b5d518727af93d946 Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Wed, 3 Nov 2021 00:20:50 +0100
|
||||
Subject: [PATCH libaio 07/26] Move semicolon to SYMVER and DEFSYMVER call
|
||||
sites
|
||||
|
||||
These look like function macros, so let's unify their call sites to use
|
||||
function syntax with a final semicolon.
|
||||
|
||||
Origin: vendor
|
||||
Forwarded: https://marc.info/?l=linux-aio&m=164999309420541
|
||||
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
||||
---
|
||||
src/io_cancel.c | 2 +-
|
||||
src/io_getevents.c | 2 +-
|
||||
src/io_queue_wait.c | 2 +-
|
||||
src/syscall.h | 4 ++--
|
||||
4 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/io_cancel.c b/src/io_cancel.c
|
||||
index 2f0f5f4..441806d 100644
|
||||
--- a/src/io_cancel.c
|
||||
+++ b/src/io_cancel.c
|
||||
@@ -20,4 +20,4 @@
|
||||
#include "syscall.h"
|
||||
|
||||
io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event)
|
||||
-DEFSYMVER(io_cancel_0_4, io_cancel, 0.4)
|
||||
+DEFSYMVER(io_cancel_0_4, io_cancel, 0.4);
|
||||
diff --git a/src/io_getevents.c b/src/io_getevents.c
|
||||
index 90d6081..88d285a 100644
|
||||
--- a/src/io_getevents.c
|
||||
+++ b/src/io_getevents.c
|
||||
@@ -32,4 +32,4 @@ int io_getevents_0_4(io_context_t ctx, long min_nr, long nr, struct io_event * e
|
||||
return __io_getevents_0_4(ctx, min_nr, nr, events, timeout);
|
||||
}
|
||||
|
||||
-DEFSYMVER(io_getevents_0_4, io_getevents, 0.4)
|
||||
+DEFSYMVER(io_getevents_0_4, io_getevents, 0.4);
|
||||
diff --git a/src/io_queue_wait.c b/src/io_queue_wait.c
|
||||
index 538d2f3..6f69a51 100644
|
||||
--- a/src/io_queue_wait.c
|
||||
+++ b/src/io_queue_wait.c
|
||||
@@ -28,4 +28,4 @@ int io_queue_wait_0_4(io_context_t ctx, struct timespec *timeout)
|
||||
{
|
||||
return io_getevents(ctx, 0, 0, NULL, timeout);
|
||||
}
|
||||
-DEFSYMVER(io_queue_wait_0_4, io_queue_wait, 0.4)
|
||||
+DEFSYMVER(io_queue_wait_0_4, io_queue_wait, 0.4);
|
||||
diff --git a/src/syscall.h b/src/syscall.h
|
||||
index d2a117b..f7ce979 100644
|
||||
--- a/src/syscall.h
|
||||
+++ b/src/syscall.h
|
||||
@@ -6,10 +6,10 @@
|
||||
#define SYMSTR(str) _SYMSTR(str)
|
||||
|
||||
#define SYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
- __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym));
|
||||
+ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))
|
||||
|
||||
#define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
- __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym));
|
||||
+ __asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))
|
||||
|
||||
#if defined(__i386__)
|
||||
#include "syscall-i386.h"
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
From cd2e1fdcf6a3474ac874303989e05e8333c7d2a2 Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Tue, 2 Nov 2021 22:37:32 +0100
|
||||
Subject: [PATCH libaio 08/26] Use new symver function attribute to support LTO
|
||||
builds
|
||||
|
||||
The LTO support cannot work properly when there are versioned symbols
|
||||
via asm statements, as those are not seen by the compiler. Use the new
|
||||
function attributes if supported instead of the asm statements.
|
||||
|
||||
We need to move the SYMVER calls after the function definitions
|
||||
otherwise it will reference symbols not yet seen.
|
||||
|
||||
Origin: vendor
|
||||
Forwarded: https://marc.info/?l=linux-aio&m=164999309520544
|
||||
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
||||
---
|
||||
src/compat-0_1.c | 7 +++----
|
||||
src/syscall.h | 13 +++++++++++++
|
||||
2 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/compat-0_1.c b/src/compat-0_1.c
|
||||
index 722e107..ac40fcc 100644
|
||||
--- a/src/compat-0_1.c
|
||||
+++ b/src/compat-0_1.c
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
|
||||
/* ABI change. Provide partial compatibility on this one for now. */
|
||||
-SYMVER(compat0_1_io_cancel, io_cancel, 0.1);
|
||||
int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb)
|
||||
{
|
||||
struct io_event event;
|
||||
@@ -36,8 +35,8 @@ int compat0_1_io_cancel(io_context_t ctx, struct iocb *iocb)
|
||||
/* FIXME: the old ABI would return the event on the completion queue */
|
||||
return io_cancel(ctx, iocb, &event);
|
||||
}
|
||||
+SYMVER(compat0_1_io_cancel, io_cancel, 0.1);
|
||||
|
||||
-SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1);
|
||||
int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when)
|
||||
{
|
||||
struct timespec timeout;
|
||||
@@ -45,10 +44,10 @@ int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when)
|
||||
timeout = *when;
|
||||
return io_getevents(ctx, 0, 0, NULL, when ? &timeout : NULL);
|
||||
}
|
||||
+SYMVER(compat0_1_io_queue_wait, io_queue_wait, 0.1);
|
||||
|
||||
|
||||
/* ABI change. Provide backwards compatibility for this one. */
|
||||
-SYMVER(compat0_1_io_getevents, io_getevents, 0.1);
|
||||
int compat0_1_io_getevents(io_context_t ctx, long nr,
|
||||
struct io_event *events,
|
||||
const struct timespec *const_timeout)
|
||||
@@ -59,4 +58,4 @@ int compat0_1_io_getevents(io_context_t ctx, long nr,
|
||||
return io_getevents(ctx, 1, nr, events,
|
||||
const_timeout ? &timeout : NULL);
|
||||
}
|
||||
-
|
||||
+SYMVER(compat0_1_io_getevents, io_getevents, 0.1);
|
||||
diff --git a/src/syscall.h b/src/syscall.h
|
||||
index f7ce979..59e0bb3 100644
|
||||
--- a/src/syscall.h
|
||||
+++ b/src/syscall.h
|
||||
@@ -2,14 +2,27 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
+#ifndef __has_attribute
|
||||
+#define __has_attribute(x) 0
|
||||
+#endif
|
||||
+
|
||||
#define _SYMSTR(str) #str
|
||||
#define SYMSTR(str) _SYMSTR(str)
|
||||
|
||||
+#if __has_attribute(__symver__)
|
||||
+#define SYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
+ extern __typeof(compat_sym) compat_sym \
|
||||
+ __attribute__((__symver__(SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))))
|
||||
+#define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
+ extern __typeof(compat_sym) compat_sym \
|
||||
+ __attribute__((__symver__(SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))))
|
||||
+#else
|
||||
#define SYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
__asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@LIBAIO_" SYMSTR(ver_sym))
|
||||
|
||||
#define DEFSYMVER(compat_sym, orig_sym, ver_sym) \
|
||||
__asm__(".symver " SYMSTR(compat_sym) "," SYMSTR(orig_sym) "@@LIBAIO_" SYMSTR(ver_sym))
|
||||
+#endif
|
||||
|
||||
#if defined(__i386__)
|
||||
#include "syscall-i386.h"
|
||||
--
|
||||
2.43.0
|
||||
|
||||
48
libaio.spec
48
libaio.spec
@ -1,22 +1,21 @@
|
||||
|
||||
Name: libaio
|
||||
Version: 0.3.113
|
||||
Release: 5
|
||||
Release: 10
|
||||
Summary: Linux-native asynchronous I/O access library
|
||||
License: LGPLv2+
|
||||
License: LGPL-2.0-or-later
|
||||
URL: https://pagure.io/libaio
|
||||
Source: https://releases.pagure.org/libaio/libaio-%{version}.tar.gz
|
||||
|
||||
Patch0: 0000-libaio-install-to-destdir-slash-usr.patch
|
||||
Patch1: 0001-libaio-arm64-ilp32.patch
|
||||
%ifarch aarch64 aarch64_ilp32 x86_64
|
||||
Patch2: 0002-libaio-makefile-cflags.patch
|
||||
%endif
|
||||
Patch3: 0003-libaio-fix-for-x32.patch
|
||||
Patch4: 0004-libaio-makefile-add-D_FORTIFY_SOURCE-flag.patch
|
||||
Patch5: 0005-Fix-compile-error-that-exec-checking-need-super-priv.patch
|
||||
Patch6: 0006-skip-testcase-23-since-current-kernel-version-not-su.patch
|
||||
Patch7: 0007-libaio-Add-sw64-architecture.patch
|
||||
Patch6: 0006-libaio-Add-sw64-architecture.patch
|
||||
Patch7: 0007-Fix-build-error-if-compiler-is-clang.patch
|
||||
Patch8: 0008-Move-semicolon-to-SYMVER-and-DEFSYMVER-call-sites.patch
|
||||
Patch9: 0009-Use-new-symver-function-attribute-to-support-LTO-bui.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
|
||||
@ -36,19 +35,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Files for libaio development
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%patch0 -p1 -b .install-to-destdir-slash-usr
|
||||
%patch1 -p1 -b .arm64-ilp32
|
||||
%ifarch aarch64 aarch64_ilp32 x86_64
|
||||
%patch2 -p1 -b .makefile-cflags
|
||||
%endif
|
||||
%patch3 -p1 -b .fix-x32
|
||||
%patch4 -p1 -b .makefile-add-D_FORTIFY_SOURCE-flag
|
||||
%patch5 -p1 -b .fix-compile-error
|
||||
%patch6 -p1 -b .skip-testcase
|
||||
%ifarch sw_64
|
||||
%patch7 -p1
|
||||
%endif
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
make
|
||||
@ -59,11 +46,6 @@ make destdir=$RPM_BUILD_ROOT prefix=/ libdir=/%{_lib} usrlibdir=%{_libdir} \
|
||||
|
||||
rm -rf %{buildroot}%{_usr}/%{_lib}/libaio.a
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%files
|
||||
%license COPYING
|
||||
%attr(0755,root,root) %{_libdir}/libaio.so.*
|
||||
@ -73,6 +55,22 @@ make check
|
||||
%attr(0755,root,root) %{_libdir}/libaio.so
|
||||
|
||||
%changelog
|
||||
* Mon Dec 09 2024 Funda Wang <fundawang@yeah.net> - 0.3.113-10
|
||||
- add debian patches to fix lto build
|
||||
- disable check section as it hangs a long time
|
||||
|
||||
* Wed Apr 12 2023 Chenxi Mao <chenxi.mao@suse.com> - 0.3.113-9
|
||||
- Fix build error because of incorrect patch file name.
|
||||
|
||||
* Wed Apr 05 2023 Chenxi Mao <chenxi.mao@suse.com> - 0.3.113-8
|
||||
- Fix build error if compiler is clang.
|
||||
|
||||
* Fri Mar 17 2023 laokz <zhangkai@iscas.ac.cn> - 0.3.113-7
|
||||
- remove patch2 arch-protection macro
|
||||
|
||||
* Wed Jan 11 2023 lihaoxiang <lihaoxiang9@huawei.com> - 0.3.113-6
|
||||
- remove patch 'skip testcase 23'
|
||||
|
||||
* Thu Dec 8 2022 Chenxi Mao<chenxi.mao@suse.com> - 0.3.113-5
|
||||
- Remove useless shared library
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user