!54 [sync] PR-50: Fix compilation errors in loongarch architecture;

From: @openeuler-sync-bot 
Reviewed-by: @liqingqing_1229 
Signed-off-by: @liqingqing_1229
This commit is contained in:
openeuler-ci-bot 2025-02-17 12:23:07 +00:00 committed by Gitee
commit 2243aa05cb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 35 additions and 6 deletions

View File

@ -0,0 +1,25 @@
From b1cbded1b30a77137984f2b6d13a513eaf58ab8a Mon Sep 17 00:00:00 2001
From: yueyuankun <yueyuankun@kylinos.cn>
Date: Wed, 12 Feb 2025 15:49:08 +0800
Subject: [PATCH] Fix conditional compilation for LoongArch architectures
---
include/urcu/arch.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/urcu/arch.h b/include/urcu/arch.h
index 71d7342..a96b8a6 100644
--- a/include/urcu/arch.h
+++ b/include/urcu/arch.h
@@ -173,7 +173,7 @@
#define URCU_ARCH_RISCV 1
#include <urcu/arch/riscv.h>
-#elif defined(__loongarch__) || (_loongarch64)
+#elif (defined(__loongarch__) || defined(_loongarch64))
#define URCU_ARCH_LOONGARCH 1
#include <urcu/arch/loongarch.h>
--
2.33.0

View File

@ -1,12 +1,13 @@
Name: userspace-rcu
Version: 0.14.0
Release: 2
Release: 3
Summary: Userspace read-copy-update library
License: LGPLv2+
URL: http://liburcu.org
Source0: http://lttng.org/files/urcu/%{name}-%{version}.tar.bz2
Patch0001: userspace-rcu-0.13.0-sw.patch
Patch0002: add-loongarch.patch
Patch0003: userspace-rcu-0.14.0-fix-conditional-compilation-for-LoongArch-architectu.patch
BuildRequires: pkgconfig gcc gcc-c++ autoconf automake make libtool
%description
@ -24,11 +25,7 @@ Requires: %{name} = %{version}-%{release}
Development files for %{name}
%prep
%setup -n %{name}-%{version}
%patch -P0001 -p1
%ifarch loonarch64
%patch -P0002 -p1
%endif
%autosetup -n %{name}-%{version} -p1
%build
autoreconf -vif
@ -70,6 +67,13 @@ make check
%changelog
* Wed Feb 12 2025 yueyuankun <yueyuankun@kylinos.cn> - 0.14.0-3
- Type: compile
- ID: NA
- SUG: NA
- DESC: Fix compilation errors in loongarch architecture
Replace setup with autosetup
* Thu Dec 19 2024 wangxiao <wangxiao184@h-partners.com> - 0.14.0-2
- include all patches in the source package