diff --git a/0001-add-loongarch-support.patch b/0001-add-loongarch-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..783ac9b4306ace9e8dd8de3d0f898c59fb163408 --- /dev/null +++ b/0001-add-loongarch-support.patch @@ -0,0 +1,49 @@ +From 548dff9c24a92c8da822b593e6302ff7044bc1d5 Mon Sep 17 00:00:00 2001 +From: yangxianzhao +Date: Thu, 18 Jan 2024 16:09:43 +0800 +Subject: [PATCH] add loongarch support + +--- + src/common/classes/DbImplementation.cpp | 1 + + src/common/common.h | 6 +++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp +index 95b1e33..4f2def6 100644 +--- a/src/common/classes/DbImplementation.cpp ++++ b/src/common/classes/DbImplementation.cpp +@@ -39,6 +39,7 @@ static const UCHAR CpuPowerPc64 = 4; + static const UCHAR CpuMipsel = 5; + static const UCHAR CpuMips = 6; + static const UCHAR CpuArm = 7; ++static const UCHAR CpuLoongarch64 = 19; + static const UCHAR CpuIa64 = 8; + static const UCHAR CpuS390 = 9; + static const UCHAR CpuS390x = 10; +diff --git a/src/common/common.h b/src/common/common.h +index 9fbe954..1a0ef22 100644 +--- a/src/common/common.h ++++ b/src/common/common.h +@@ -148,6 +148,10 @@ + #define RISC_ALIGNMENT + #endif /* sparc */ + ++#ifdef _LOONGARCH_ARCH ++#define FB_CPU CpuLoongarch64 ++#endif /* loongarch64 */ ++ + #ifdef MIPSEL + #define FB_CPU CpuMipsel + #endif /* mipsel */ +@@ -918,7 +922,7 @@ void GDS_breakpoint(int); + // ASF: Currently, all little-endian are FB_SWAP_DOUBLE and big-endian aren't. + // AP: Define it for your hardware correctly in case your CPU do not follow mentioned rule. + // The follwoing lines are kept for reference only. +-//#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64) ++//#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(_LOONGARCH_ARCH) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64) + //#define FB_SWAP_DOUBLE 1 + //#elif defined(sparc) || defined(PowerPC) || defined(PPC) || defined(__ppc__) || defined(HPUX) || defined(MIPS) || defined(__ppc64__) + //#define FB_SWAP_DOUBLE 0 +-- +2.31.1 + diff --git a/firebird.spec b/firebird.spec index 41557b1558f291aefe7a230a995cbc4fc4364ad2..6b0d46163b8f0ddeb918f22dc87a8d7598d10098 100644 --- a/firebird.spec +++ b/firebird.spec @@ -1,3 +1,4 @@ +%define anolis_release 1 %global upversion 4.0.0.2496 %global pkgversion Firebird-%{upversion}-0 @@ -10,7 +11,7 @@ Name: firebird Version: %{upversion} -Release: 1%{?dist} +Release: 1.%{anolis_release}%{?dist} Summary: SQL relational database management system License: Interbase @@ -29,6 +30,8 @@ Patch101: add-pkgconfig-files.patch Patch203: no-copy-from-icu.patch Patch205: cloop-honour-build-flags.patch +Patch1000: 0001-add-loongarch-support.patch + # from upstream # Firebird 4 have build issues (bz 1969393) @@ -197,6 +200,7 @@ in production systems, under a variety of names, since 1981. %patch101 -p1 %patch203 -p1 %patch205 -p1 +%patch1000 -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -368,6 +372,9 @@ fi %changelog +* Thu Jan 18 2024 yangxianzhao - 4.0.0.2496-1.1 +- add loongarch support + * Tue Jun 08 2021 Philippe Makowski - 4.0.0.2496-1 - Update to 4.0.0 (#1963311)