From 78fa836bf0fa8505438f664f436351aea57759e3 Mon Sep 17 00:00:00 2001 From: yueyuankun Date: Wed, 12 Feb 2025 15:39:11 +0800 Subject: [PATCH] Fix compilation errors in loongarch architecture; Replace setup with autosetup (cherry picked from commit 87c48c395331a249339c2e27c8abcc42f4d87a48) --- ...compilation-for-LoongArch-architectu.patch | 25 +++++++++++++++++++ userspace-rcu.spec | 16 +++++++----- 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 userspace-rcu-0.14.0-fix-conditional-compilation-for-LoongArch-architectu.patch diff --git a/userspace-rcu-0.14.0-fix-conditional-compilation-for-LoongArch-architectu.patch b/userspace-rcu-0.14.0-fix-conditional-compilation-for-LoongArch-architectu.patch new file mode 100644 index 0000000..e67107a --- /dev/null +++ b/userspace-rcu-0.14.0-fix-conditional-compilation-for-LoongArch-architectu.patch @@ -0,0 +1,25 @@ +From b1cbded1b30a77137984f2b6d13a513eaf58ab8a Mon Sep 17 00:00:00 2001 +From: yueyuankun +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 + +-#elif defined(__loongarch__) || (_loongarch64) ++#elif (defined(__loongarch__) || defined(_loongarch64)) + + #define URCU_ARCH_LOONGARCH 1 + #include +-- +2.33.0 + diff --git a/userspace-rcu.spec b/userspace-rcu.spec index 026c7ea..426dedc 100644 --- a/userspace-rcu.spec +++ b/userspace-rcu.spec @@ -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 - 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 - 0.14.0-2 - include all patches in the source package -- Gitee