From 5bc410208d344ef1647875ece261f375ed986b75 Mon Sep 17 00:00:00 2001 From: wangxiaomeng Date: Thu, 28 Dec 2023 16:54:46 +0800 Subject: [PATCH] fix loongarch compile and test-16 errors --- 0007-fix-loongarch64-check-fail.patch | 29 +++++++++++++++++++++++++++ libaio.spec | 11 +++++----- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 0007-fix-loongarch64-check-fail.patch diff --git a/0007-fix-loongarch64-check-fail.patch b/0007-fix-loongarch64-check-fail.patch new file mode 100644 index 0000000..4538121 --- /dev/null +++ b/0007-fix-loongarch64-check-fail.patch @@ -0,0 +1,29 @@ +From 6097b44db6e05994b1f998b96d08eabc5c729b64 Mon Sep 17 00:00:00 2001 +From: wangxiaomeng +Date: Fri, 22 Dec 2023 17:29:46 +0800 +Subject: [PATCH] fix loongarch64 check fail + +--- + harness/cases/16.t | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/harness/cases/16.t b/harness/cases/16.t +index 5a546ff..7a595b5 100644 +--- a/harness/cases/16.t ++++ b/harness/cases/16.t +@@ -24,6 +24,12 @@ + #ifndef SYS_eventfd2 + #define SYS_eventfd2 19 + #endif /* __aarch64__ */ ++#elif defined(__loongarch64) ++/* loongarch64 does not implement eventfd, only eventfd2 */ ++#define USE_EVENTFD2 ++#ifndef SYS_eventfd2 ++#define SYS_eventfd2 19 ++#endif /* __loongarch64 */ + #else + #error define SYS_eventfd for your arch! + #endif +-- +2.33.0 + diff --git a/libaio.spec b/libaio.spec index 2a9f66c..adb6abf 100644 --- a/libaio.spec +++ b/libaio.spec @@ -1,7 +1,7 @@ Name: libaio Version: 0.3.112 -Release: 5 +Release: 6 Summary: Linux-native asynchronous I/O access library License: LGPLv2+ URL: https://pagure.io/libaio @@ -9,12 +9,11 @@ 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-fix-loongarch64-check-fail.patch BuildRequires: gcc @@ -37,12 +36,11 @@ Files for libaio development %setup -q -a 0 %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 .kylin-fix-loongarch64-check-error mv %{name}-%{version} setup-%{name}-%{version} @@ -74,6 +72,9 @@ make check %attr(0755,root,root) %{_libdir}/libaio.so %changelog +* Thu Dec 28 2023 wangxiaomeng - 0.3.112-6 +- fix loongarch compile and test-16 errors + * Fri Jun 24 2022 lihaoxiang - 0.3.112-5 - fix compile error -- Gitee