diff --git a/add-loongarch64-sw_64-support.patch b/add-loongarch64-sw_64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..eaaab1ba442299c4123e0a8944073a6076eb50d9 --- /dev/null +++ b/add-loongarch64-sw_64-support.patch @@ -0,0 +1,52 @@ +diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h +index 799db41..1905099 100644 +--- a/Foundation/include/Poco/Platform.h ++++ b/Foundation/include/Poco/Platform.h +@@ -135,11 +135,15 @@ + #define POCO_ARCH_AARCH64 0x0f + #define POCO_ARCH_ARM64 0x0f // same as POCO_ARCH_AARCH64 + #define POCO_ARCH_RISCV64 0x10 +- ++#define POCO_ARCH_LOONGARCH64 0x11 ++#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 ++ #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 +@@ -165,6 +169,9 @@ + #else + #error "MIPS but neither MIPSEL nor MIPSEB?" + #endif ++#elif defined(__loongarch__) ++ #define POCO_ARCH POCO_ARCH_LOONGARCH64 ++ #define POCO_ARCH_LITTLE_ENDIAN 1 + #elif defined(__hppa) || defined(__hppa__) + #define POCO_ARCH POCO_ARCH_HPPA + #define POCO_ARCH_BIG_ENDIAN 1 +diff --git a/Foundation/src/utils.h b/Foundation/src/utils.h +index c87cee1..675a532 100644 +--- a/Foundation/src/utils.h ++++ b/Foundation/src/utils.h +@@ -60,11 +60,12 @@ + defined(__mips__) || \ + defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ + defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ +- defined(__SH4__) || defined(__alpha__) || \ ++ defined(__SH4__) || defined(__alpha__) || defined(__sw_64__) || \ + defined(_MIPS_ARCH_MIPS32R2) || \ + defined(__riscv) || \ + defined(__AARCH64EL__) || \ +- defined(nios2) || defined(__nios2) || defined(__nios2__) ++ defined(nios2) || defined(__nios2) || defined(__nios2__) || \ ++ defined(__loongarch__) + #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 + #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) + #if defined(_WIN32) diff --git a/poco.spec b/poco.spec index cbc17d9827dc31c2a9195a7cf368cd22cfe4e0d4..98a42921c73ade98fa989b576924b37d25052f48 100644 --- a/poco.spec +++ b/poco.spec @@ -1,10 +1,13 @@ Name: poco Version: 1.10.1 -Release: 3 +Release: 4 Summary: This is ROS melodic ros_comm's 3rdparty poco License: BSL-1.0 URL: https://github.com/pocoproject/poco/releases/tag/poco-1.10.1-release Source0: https://github.com/pocoproject/poco/archive/poco-1.10.1-release.tar.gz + +Patch1000: add-loongarch64-sw_64-support.patch + BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: boost-devel @@ -14,7 +17,7 @@ BuildRequires: openssl-devel This is ROS melodic ros_comm's 3rdparty poco. %prep -%setup +%autosetup -p1 %install mkdir cmake-build/ @@ -35,6 +38,9 @@ find %{buildroot} -type f -name '*.so.*' -exec strip '{}' ';' /usr/local/* %changelog +* Tue Aug 15 2023 yangchenguang - 1.10.1-4 +- add loongarch64 sw_64 support + * Wed Jun 15 2022 loong_C - 1.10.1-3 - update poco.spec for License error and bad log