From 3f421c9965f027b8dd14376d84ef1746d103810d Mon Sep 17 00:00:00 2001 From: laokz Date: Wed, 18 Jun 2025 11:00:43 +0800 Subject: [PATCH] backport upstream patch to fix riscv64 build failure --- 0002-Add-riscv64-define-for-cds.patch | 25 +++++++++++++++++++++++++ firebird.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0002-Add-riscv64-define-for-cds.patch diff --git a/0002-Add-riscv64-define-for-cds.patch b/0002-Add-riscv64-define-for-cds.patch new file mode 100644 index 0000000..2d9aa59 --- /dev/null +++ b/0002-Add-riscv64-define-for-cds.patch @@ -0,0 +1,25 @@ +From 0e7947518aea1a48eeda4bc87f6fc4aa7e8140a1 Mon Sep 17 00:00:00 2001 +From: Xeonacid +Date: Sat, 11 Jan 2025 21:44:01 +0800 +Subject: [PATCH] Add riscv64 define for cds + +--- + extern/libcds/cds/compiler/gcc/compiler_macro.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/extern/libcds/cds/compiler/gcc/compiler_macro.h b/extern/libcds/cds/compiler/gcc/compiler_macro.h +index c36c6f9c054..a1a42e66a7a 100644 +--- a/extern/libcds/cds/compiler/gcc/compiler_macro.h ++++ b/extern/libcds/cds/compiler/gcc/compiler_macro.h +@@ -132,6 +132,11 @@ + # define CDS_PROCESSOR__NAME "LOONGARCH" + # define CDS_PROCESSOR__NICK "loongarch" + # define CDS_BUILD_BITS 64 ++#elif defined(__riscv) && __riscv_xlen == 64 ++# define CDS_PROCESSOR_ARCH CDS_PROCESSOR_RISCV64 ++# define CDS_PROCESSOR__NAME "RISC-V64" ++# define CDS_PROCESSOR__NICK "riscv64" ++# define CDS_BUILD_BITS 64 + #else + # if defined(CDS_USE_LIBCDS_ATOMIC) + # error "Libcds does not support atomic implementation for the processor architecture. Try to use C++11-compatible compiler and remove CDS_USE_LIBCDS_ATOMIC flag from compiler command line" diff --git a/firebird.spec b/firebird.spec index 6d41d25..af3c44c 100644 --- a/firebird.spec +++ b/firebird.spec @@ -8,7 +8,7 @@ Name: firebird Version: %{ver}.%{rev} -Release: 1 +Release: 2 Summary: SQL relational database management system License: Interbase-1.0 @@ -24,6 +24,7 @@ Patch0000: add-pkgconfig-files.patch Patch0001: no-copy-from-icu.patch Patch0002: cloop-honour-build-flags.patch Patch0003: 0001-add-loongarch64-support-for-Firebird.patch +Patch0004: 0002-Add-riscv64-define-for-cds.patch BuildRequires: autoconf BuildRequires: automake @@ -315,6 +316,9 @@ fi %{_bindir}/gsplit %changelog +* Wed Jun 18 2025 laokz - 5.0.2.1613-2 +- backport upstream patch to fix riscv64 build failure + * Tue May 27 2025 Funda Wang - 5.0.2.1613-1 - update to 5.0.2.1613 -- Gitee