Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
45979ccf3f
!34 [sync] PR-32: fix rpath error
From: @openeuler-sync-bot 
Reviewed-by: @wizardWithSword, @xqm227 
Signed-off-by: @xqm227
2024-06-14 01:53:56 +00:00
lauyarn
91e298f744 fix rpath error
Signed-off-by: lauyarn <liuyang.nb@outlook.com>
(cherry picked from commit ac77417f534747105e97343f63f8399b805cef68)
2024-06-14 09:22:44 +08:00
openeuler-ci-bot
f0ff078e61
!27 【EBS】libkae build problem in openEuler:22.03:LTS:Next
From: @li-miaomiao_zhr 
Reviewed-by: @realzhongkeyi 
Signed-off-by: @realzhongkeyi
2023-04-24 09:13:45 +00:00
mmlidc
2304b4b9f6 solve libkae build problem in openEuler:22.03:LTS:Next 2023-04-17 17:55:53 +08:00
openeuler-ci-bot
efe118a159 !16 [sync] PR-15: 修复编译失败问题
From: @openeuler-sync-bot
Reviewed-by: @hao-fang
Signed-off-by: @hao-fang
2021-08-13 08:55:51 +00:00
caodongxia
d827ee1d2a Fix pthread_yield is deprecated
(cherry picked from commit 2cb0f61c399fcbf29cbaf957eb83a09fe364c9d9)
2021-08-13 10:54:56 +08:00
openeuler-ci-bot
d2fbe77bc3 !9 check glibc version to avoid redefine gettid()
Merge pull request !9 from ultra_planet/master
2020-07-28 16:24:01 +08:00
lingsheng
eceadb918a check glibc version to avoid redefine gettid() 2020-07-28 09:52:53 +08:00
openeuler-ci-bot
3f5e018ccc !7 specify aarch64 compilation
Merge pull request !7 from zhangtao2020/zt_1
2020-03-15 14:40:47 +08:00
zhangtao2020
da6b903935 specify aarch64 complition 2020-03-15 13:20:11 +08:00
4 changed files with 86 additions and 3 deletions

View File

@ -0,0 +1,38 @@
From 04f80ac2c822543f130c30942560e4a3300f8481 Mon Sep 17 00:00:00 2001
From: lingsheng <lingsheng@huawei.com>
Date: Tue, 28 Jul 2020 09:41:05 +0800
Subject: [PATCH] Don't redefine gettid if glibc provides it
glibc 2.30+ include a definition for gettid() so that users don't have
to manually define gettid() with syscall().
Old code don't check this, this will redefine gettid() on the latest
versions of glibc, causing build fail.
Signed-off-by: lingsheng <lingsheng@huawei.com>
---
KAE/utils/engine_utils.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/KAE/utils/engine_utils.h b/KAE/utils/engine_utils.h
index 160e449..12a587e 100644
--- a/KAE/utils/engine_utils.h
+++ b/KAE/utils/engine_utils.h
@@ -28,7 +28,15 @@
#include <sys/types.h>
#include <sys/syscall.h>
+#if __GLIBC_PREREQ(2, 30)
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <unistd.h>
+#else
#define gettid() syscall(SYS_gettid)
+#endif
+
#define PRINTPID \
US_DEBUG("pid=%d, ptid=%lu, tid=%d", getpid(), pthread_self(), gettid())
--
2.23.0

View File

@ -0,0 +1,25 @@
From f0c7130d9186dbb62367c0eb6c4d2ae6f78ef577 Mon Sep 17 00:00:00 2001
From: caodongxia <315816521@qq.com>
Date: Thu, 12 Aug 2021 11:49:36 +0800
Subject: [PATCH] pthread_yield is deprecated, use sched_yield instead
---
KAE/utils/engine_utils.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/KAE/utils/engine_utils.h b/KAE/utils/engine_utils.h
index 12a587e..f0b69b2 100644
--- a/KAE/utils/engine_utils.h
+++ b/KAE/utils/engine_utils.h
@@ -129,7 +129,7 @@ static inline void kae_memcpy(void *src, const void *dst, int len)
static inline void kae_pthread_yield()
{
- (void)pthread_yield(); //lint !e1055
+ (void)sched_yield(); //lint !e1055
}
int kae_create_thread(pthread_t *thread_id, const pthread_attr_t *attr,
--
2.27.0

View File

@ -3,7 +3,7 @@
Name: libkae
Summary: Huawei Kunpeng Accelerator Engine
Version: 1.2.10
Release: 2
Release: 7
License: Apache-2.0
Source: %{name}-%{version}.tar.gz
Vendor: Huawei Corporation
@ -13,14 +13,18 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
Prefix: /usr/local/lib/engines-1.1
Conflicts: %{name} < %{version}-%{release}
Provides: %{name} = %{version}-%{release}
BuildRequires: libwd >= %{version} openssl-devel sed
BuildRequires: libwd >= %{version} openssl-devel sed chrpath
Requires: openssl
ExclusiveArch: aarch64
Patch0001: 0001-Don-t-redefine-gettid-if-glibc-provides-it.patch
Patch0002: 0002-fix-pthread_yield.patch
%description
This package contains the Huawei Kunpeng Accelerator Engine
%prep
%setup -c -n %{name}-%{version}
%autosetup -c -n %{name}-%{version} -p1
%build
cd KAE
@ -30,6 +34,7 @@ make
%install
mkdir -p ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
chrpath -d KAE/libkae.so.%{version}
install -b -m755 KAE/libkae.so.%{version} ${RPM_BUILD_ROOT}/usr/local/lib/engines-1.1
%clean
@ -64,6 +69,21 @@ fi
/sbin/ldconfig
%changelog
* Wed Dec 13 2023 liuyang <liuyang645@huawei.com> 1.2.10-7
- fix rpath error
* Mon Apr 17 2023 li-miaomiao_zhr <mmlidc@isoftstone.com> 1.2.10-6
- solve libkae build problem in openEuler:22.03:LTS:Next
* Thu Aug 12 2021 caodongxia <caodongxia@huawei.com> 1.2.10-5
- Fix pthread_yield is deprecated
* Tue Jul 28 2020 lingsheng <lingsheng@huawei.com> 1.2.10-4
- Check glibc version to avoid redefine gettid()
* Sun Mar 15 2020 zhangtao <zhangtao221@huawei.com> 1.2.10-3
- Specify aarch64 compilation
* Tue Mar 03 2020 catastrowings <jianghuhao1994@163.com> 1.2.10-2
- openEuler init

Binary file not shown.