!15 解决 gcc 10 导致 libwd 编译失败问题

From: @jiangpengjuj
Reviewed-by: @hao-fang
Signed-off-by: @hao-fang
This commit is contained in:
openeuler-ci-bot 2021-08-09 03:29:22 +00:00 committed by Gitee
commit 50ebe1a275
2 changed files with 27 additions and 2 deletions

21
bugfix-of-gcc-10.patch Normal file
View File

@ -0,0 +1,21 @@
diff -Nur a/uadk/v1/wd.h b/uadk/v1/wd.h
--- a/uadk/v1/wd.h 2021-07-01 21:56:26.000000000 +0800
+++ b/uadk/v1/wd.h 2021-08-07 14:08:16.547113400 +0800
@@ -140,7 +140,7 @@
#ifndef WD_ERR
#ifndef WITH_LOG_FILE
-wd_log log_out;
+extern wd_log log_out;
#define __WD_FILENAME__ (strrchr(__FILE__, '/') ? \
((char *)((uintptr_t)strrchr(__FILE__, '/') + 1)) : __FILE__)
@@ -150,7 +150,7 @@
__WD_FILENAME__, __LINE__, __func__, ##args) : \
fprintf(stderr, format, ##args))
#else
-FILE *flog_fd;
+extern FILE *flog_fd;
#define WD_ERR(format, args...) \
if (!flog_fd) \
flog_fd = fopen(WITH_LOG_FILE, "a+"); \

View File

@ -1,7 +1,7 @@
Name: libwd
Summary: User Space Accelerator Development Kit
Version: 2.3.11
Release: 2
Release: 3
License: Apache-2.0
Source: %{name}-%{version}.tar.gz
Vendor: Huawei Corporation
@ -14,6 +14,7 @@ BuildRequires: numactl-devel
BuildRequires: automake, autoconf, libtool
BuildRequires: gcc, make
ExclusiveArch: aarch64
Patch0001: bugfix-of-gcc-10.patch
%description
This package contains the User Space Accelerator Library
@ -22,7 +23,7 @@ and decryption, asymmetric encryption and decryption.
%prep
%global debug_package %{nil}
%setup -c -n %{name}-%{version}
%autosetup -c -n %{name}-%{version} -p1
%build
cd uadk
@ -154,6 +155,9 @@ fi
/sbin/ldconfig
%changelog
* Fri Aug 06 2021 Pengju Jiang <jiangpengju2@huawei.com>2.3.11-3
- bugfix-of-gcc-10.patch
* Wed Jul 21 2021 caodongxia <caodongxia@huawei.com> 2.3.11-2
- change uacce.h path.