From 336516ea0350f8d390e057acc3968801a8710158 Mon Sep 17 00:00:00 2001 From: zhangshaoning Date: Thu, 27 Feb 2025 15:50:52 +0800 Subject: [PATCH] Add sw_64 support (cherry picked from commit f4ad109c9fe3367a09e7cc7169a7f8d3baa59811) --- 100-poco-uos-add-sw_64-support.patch | 46 ++++++++++++++++++++++++++++ poco.spec | 8 +++-- 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 100-poco-uos-add-sw_64-support.patch diff --git a/100-poco-uos-add-sw_64-support.patch b/100-poco-uos-add-sw_64-support.patch new file mode 100644 index 0000000..cbcf965 --- /dev/null +++ b/100-poco-uos-add-sw_64-support.patch @@ -0,0 +1,46 @@ +From aa9fd90d003bab1d37ef5613929bc71276e0decb Mon Sep 17 00:00:00 2001 +From: root +Date: Fri, 13 Dec 2024 14:42:26 +0800 +Subject: [PATCH] add sw_64 support + +--- + Foundation/include/Poco/Platform.h | 4 ++++ + Foundation/src/utils.h | 2 +- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index 192d6c7..3dd37ef 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -137,11 +137,15 @@ + #define POCO_ARCH_RISCV64 0x10 + #define POCO_ARCH_RISCV32 0x11 + #define POCO_ARCH_LOONGARCH64 0x12 ++#define POCO_ARCH_SW_64 0x12 + + + #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA) + #define POCO_ARCH POCO_ARCH_ALPHA + #define POCO_ARCH_LITTLE_ENDIAN 1 ++#elif defined(__sw_64__) ++ #define POCO_ARCH POCO_ARCH_SW_64 ++ #define POCO_ARCH_LITTLE_ENDIAN 1 + #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(_M_IX86) || defined(EMSCRIPTEN) + #define POCO_ARCH POCO_ARCH_IA32 + #define POCO_ARCH_LITTLE_ENDIAN 1 +diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h +index c9b6c00..5f567db 100644 +--- a/Foundation/src/utils.h ++++ b/Foundation/src/utils.h +@@ -137,7 +137,7 @@ int main(int argc, char** argv) { + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(_POWER) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ +- defined(__SH4__) || defined(__alpha__) || \ ++ defined(__SH4__) || defined(__alpha__) || defined(__sw_64__) ||\ + defined(_MIPS_ARCH_MIPS32R2) || defined(__ARMEB__) ||\ + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + (defined(__riscv) && defined(__riscv_float_abi_double)) || defined(__e2k__) || \ +-- +2.33.0 + diff --git a/poco.spec b/poco.spec index cd2a7a7..9db1fb9 100644 --- a/poco.spec +++ b/poco.spec @@ -19,7 +19,7 @@ Name: poco Version: 1.12.4 -Release: 1 +Release: 2 Summary: C++ class libraries for network-centric applications License: BSL-1.0 @@ -31,6 +31,9 @@ Source: https://github.com/pocoproject/poco/archive/poco-%{version}-re Patch: 0001-Fix-XML-compilation-due-to-new-methods-being-guarded.patch # Disable the tests that will fail under Koji (mostly network) Patch: 0002-Disable-tests-that-fail-in-koji.patch +#add by uos +Patch100: 100-poco-uos-add-sw_64-support.patch +#end BuildRequires: make BuildRequires: cmake @@ -467,4 +470,5 @@ HTML format. %doc README NEWS LICENSE CONTRIBUTORS CHANGELOG doc/* %changelog -%autochangelog +* Thu Feb 27 2025 zhangshaoning - 1.12.4-2 +- Add sw_64 support -- Gitee