summaryrefslogtreecommitdiffstats
path: root/debian/patches/workarounds/0006-loongarch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/workarounds/0006-loongarch.patch')
-rw-r--r--debian/patches/workarounds/0006-loongarch.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches/workarounds/0006-loongarch.patch b/debian/patches/workarounds/0006-loongarch.patch
new file mode 100644
index 0000000..e028ae4
--- /dev/null
+++ b/debian/patches/workarounds/0006-loongarch.patch
@@ -0,0 +1,40 @@
+From 1c2c5150eb17f432a5d9ad81a97d999662a4e669 Mon Sep 17 00:00:00 2001
+From: Dandan Zhang <zhangdandan@loongson.cn>
+Date: Tue, 24 Oct 2023 07:59:42 +0000
+Subject: [PATCH] Add LoongArch support to system info
+
+---
+ xbmc/utils/SystemInfo.cpp | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp
+index d1e53c41bb95e..92ef021efb158 100644
+--- a/xbmc/utils/SystemInfo.cpp
++++ b/xbmc/utils/SystemInfo.cpp
+@@ -952,7 +952,7 @@ int CSysInfo::GetKernelBitness(void)
+ std::string machine(un.machine);
+ if (machine == "x86_64" || machine == "amd64" || machine == "arm64" || machine == "aarch64" ||
+ machine == "ppc64" || machine == "ppc64el" || machine == "ppc64le" || machine == "ia64" ||
+- machine == "mips64" || machine == "s390x" || machine == "riscv64" ||
++ machine == "loongarch64" || machine == "mips64" || machine == "s390x" || machine == "riscv64" ||
+ machine == "sparc64" || machine == "alpha")
+ kernelBitness = 64;
+ else
+@@ -1080,6 +1080,8 @@ const std::string& CSysInfo::GetKernelCpuFamily(void)
+ std::string machine(un.machine);
+ if (machine.compare(0, 3, "arm", 3) == 0 || machine.compare(0, 7, "aarch64", 7) == 0)
+ kernelCpuFamily = "ARM";
++ else if (machine.compare(0, 9, "loongarch", 9) == 0 || machine.compare(0, 7, "loong64", 7) == 0)
++ kernelCpuFamily = "LoongArch";
+ else if (machine.compare(0, 4, "mips", 4) == 0)
+ kernelCpuFamily = "MIPS";
+ else if (machine.compare(0, 4, "i686", 4) == 0 || machine == "i386" || machine == "amd64" || machine.compare(0, 3, "x86", 3) == 0)
+@@ -1466,6 +1468,8 @@ std::string CSysInfo::GetBuildTargetCpuFamily(void)
+ return "ARM (Thumb)";
+ #elif defined(__arm__) || defined(_M_ARM) || defined (__aarch64__)
+ return "ARM";
++#elif defined(__loongarch__)
++ return "LoongArch";
+ #elif defined(__mips__) || defined(mips) || defined(__mips)
+ return "MIPS";
+ #elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64) || \