diff --git a/0001-add-sw_64-support.patch b/0001-add-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..a7254def0809cdca99ab8d874736fea4344ed3c0 --- /dev/null +++ b/0001-add-sw_64-support.patch @@ -0,0 +1,78 @@ +From 7564a21fa652896312c0efc7a79bc9f0321cb242 Mon Sep 17 00:00:00 2001 +From: pangqing +Date: Tue, 18 Mar 2025 12:24:43 +0800 +Subject: [PATCH] add sw_64 support + +--- + builds/make.new/config/config.guess | 3 +++ + builds/make.new/config/config.sub | 1 + + src/common/classes/DbImplementation.cpp | 1 + + src/common/common.h | 7 ++++++- + 4 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/builds/make.new/config/config.guess b/builds/make.new/config/config.guess +index 2852378..f861c2b 100755 +--- a/builds/make.new/config/config.guess ++++ b/builds/make.new/config/config.guess +@@ -968,6 +968,9 @@ EOF + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; ++ sw_64*:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; +diff --git a/builds/make.new/config/config.sub b/builds/make.new/config/config.sub +index 320e303..a143e8b 100755 +--- a/builds/make.new/config/config.sub ++++ b/builds/make.new/config/config.sub +@@ -297,6 +297,7 @@ case $basic_machine in + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ ++ | sw_64 \ + | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e \ +diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp +index 4f2def6..0aeaa25 100644 +--- a/src/common/classes/DbImplementation.cpp ++++ b/src/common/classes/DbImplementation.cpp +@@ -40,6 +40,7 @@ static const UCHAR CpuMipsel = 5; + static const UCHAR CpuMips = 6; + static const UCHAR CpuArm = 7; + static const UCHAR CpuLoongarch64 = 19; ++static const UCHAR CpuSw_64 = 20; + 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 1a0ef22..ea0f715 100644 +--- a/src/common/common.h ++++ b/src/common/common.h +@@ -148,6 +148,11 @@ + #define RISC_ALIGNMENT + #endif /* sparc */ + ++#if defined(sw_64) || defined(__sw_64) || defined(__sw_64__) ++#define Sw_64 ++#define FB_CPU CpuSw_64 ++#endif /* sw_64 */ ++ + #ifdef _LOONGARCH_ARCH + #define FB_CPU CpuLoongarch64 + #endif /* loongarch64 */ +@@ -922,7 +927,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(_LOONGARCH_ARCH) || defined(MIPSEL) || defined(DARWIN64) || defined(IA64) ++//#if defined(i386) || defined(I386) || defined(_M_IX86) || defined(AMD64) || defined(ARM) || defined(_LOONGARCH_ARCH) || defined(Sw_64) || defined(sw_64) || defined(__sw_64) || defined(__sw_64__) || 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.39.3 + diff --git a/firebird.spec b/firebird.spec index 6b0d46163b8f0ddeb918f22dc87a8d7598d10098..6358e5245a95ee4be64ea332a723fe4535d95020 100644 --- a/firebird.spec +++ b/firebird.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global upversion 4.0.0.2496 %global pkgversion Firebird-%{upversion}-0 @@ -31,6 +31,7 @@ Patch203: no-copy-from-icu.patch Patch205: cloop-honour-build-flags.patch Patch1000: 0001-add-loongarch-support.patch +Patch1001: 0001-add-sw_64-support.patch # from upstream @@ -201,6 +202,7 @@ in production systems, under a variety of names, since 1981. %patch203 -p1 %patch205 -p1 %patch1000 -p1 +%patch1001 -p1 %build export CFLAGS="%{optflags} -fno-strict-aliasing" @@ -372,6 +374,9 @@ fi %changelog +* Tue Mar 18 2025 pangqing - 4.0.0.2496-1.2 +- add sw_64 support + * Thu Jan 18 2024 yangxianzhao - 4.0.0.2496-1.1 - add loongarch support