From c28ada9bd130bdb182d2321c40a51dab5bcc15ae Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Thu, 25 May 2023 03:19:31 +0000
Subject: [PATCH] Modify PROD_FLAGS and DEV_FLAGS parameters for loongarch64

---
 builds/posix/prefix.linux_loongarch64   | 4 ++--
 src/common/classes/DbImplementation.cpp | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/builds/posix/prefix.linux_loongarch64 b/builds/posix/prefix.linux_loongarch64
index 70532a6..d3362d7 100644
--- a/builds/posix/prefix.linux_loongarch64
+++ b/builds/posix/prefix.linux_loongarch64
@@ -1,7 +1,7 @@
 WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable -Wno-invalid-offsetof -Wno-narrowing -Wno-unused-local-typedefs
 
-PROD_FLAGS=-O3 -DLINUX -DRISCV64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
-DEV_FLAGS=-ggdb -DLINUX -DRISCV64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 $(WARN_FLAGS)
+PROD_FLAGS=-O3 -DLINUX -DLOONGARCH64 -pipe -p -MMD -fPIC -fsigned-char -fmessage-length=0
+DEV_FLAGS=-ggdb -DLINUX -DLOONGARCH64 -pipe -p -MMD -fPIC -Wall -fsigned-char -fmessage-length=0 $(WARN_FLAGS)
 
 CXXFLAGS := $(CXXFLAGS) -std=c++11
 
diff --git a/src/common/classes/DbImplementation.cpp b/src/common/classes/DbImplementation.cpp
index 23e48a1..0315ea9 100644
--- a/src/common/classes/DbImplementation.cpp
+++ b/src/common/classes/DbImplementation.cpp
@@ -50,6 +50,7 @@ static const UCHAR CpuArm64 = 15;
 static const UCHAR CpuPowerPc64el = 16;
 static const UCHAR CpuM68k = 17;
 static const UCHAR CpuRiscV64 = 18;
+static const UCHAR CpuLoongArch64 = 19;
 
 static const UCHAR OsWindows = 0;
 static const UCHAR OsLinux = 1;
-- 
2.33.0

