Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 poco (1.9.0-5.lnd.1) unstable; urgency=medium
 .
   * Add loongarch support.
Author: Jianjun Han <hanjianjun@loongson.cn>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2021-01-22

--- poco-1.9.0.orig/Foundation/include/Poco/Platform.h
+++ poco-1.9.0/Foundation/include/Poco/Platform.h
@@ -135,6 +135,7 @@
 #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
 
 
 #if defined(__ALPHA) || defined(__alpha) || defined(__alpha__) || defined(_M_ALPHA)
@@ -153,6 +154,9 @@
 #elif defined(__x86_64__) || defined(_M_X64)
 	#define POCO_ARCH POCO_ARCH_AMD64
 	#define POCO_ARCH_LITTLE_ENDIAN 1
+#elif defined(__loongarch__) || defined(__loongarch64)
+	#define POCO_ARCH POCO_ARCH_LOONGARCH64
+	#define POCO_ARCH_LITTLE_ENDIAN 1
 #elif defined(__mips__) || defined(__mips) || defined(__MIPS__) || defined(_M_MRX000)
 	#define POCO_ARCH POCO_ARCH_MIPS
 	#if defined(POCO_OS_FAMILY_WINDOWS)
--- poco-1.9.0.orig/Foundation/src/utils.h
+++ poco-1.9.0/Foundation/src/utils.h
@@ -58,6 +58,7 @@
     defined(__avr32__) || \
     defined(__hppa__) || defined(__ia64__) || \
     defined(__mips__) || \
+    defined(__loongarch__) || defined(__loongarch64) || \
     defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
     defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
     defined(__SH4__) || defined(__alpha__) || \
