8 Star 0 Fork 18

src-anolis-os/qt5-qtbase

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-qt5-qtbase-anolis-add-loongarch.patch 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
liuzhilin 提交于 2021-11-23 21:26 . Fix:add support loongarch64
diff --git a/src/3rdparty/double-conversion/include/double-conversion/utils.h b/src/3rdparty/double-conversion/include/double-conversion/utils.h
index 7622fe61..ce6e409f 100644
--- a/src/3rdparty/double-conversion/include/double-conversion/utils.h
+++ b/src/3rdparty/double-conversion/include/double-conversion/utils.h
@@ -94,7 +94,8 @@ int main(int argc, char** argv) {
defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \
defined(__riscv) || \
defined(__or1k__) || defined(__arc__) || \
- defined(__EMSCRIPTEN__)
+ defined(__EMSCRIPTEN__) || \
+ defined(__loongarch__) || defined(__loongarch64__)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(__mc68000__) || \
defined(__pnacl__) || defined(__native_client__)
diff --git a/src/corelib/global/archdetect.cpp b/src/corelib/global/archdetect.cpp
index 66a5e074..e122d16f 100644
--- a/src/corelib/global/archdetect.cpp
+++ b/src/corelib/global/archdetect.cpp
@@ -59,6 +59,10 @@
# define ARCH_PROCESSOR "x86_64"
#elif defined(Q_PROCESSOR_IA64)
# define ARCH_PROCESSOR "ia64"
+#elif defined(Q_PROCESSOR_LOONGARCH_64)
+# define ARCH_PROCESSOR "loongarch64"
+#elif defined(Q_PROCESSOR_LOONGARCH)
+# define ARCH_PROCESSOR "loongarch"
#elif defined(Q_PROCESSOR_MIPS_64)
# define ARCH_PROCESSOR "mips64"
#elif defined(Q_PROCESSOR_MIPS)
diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h
index 77b3ba36..58c54b40 100644
--- a/src/corelib/global/qprocessordetection.h
+++ b/src/corelib/global/qprocessordetection.h
@@ -223,6 +223,14 @@
# define Q_PROCESSOR_WORDSIZE 8
// Q_BYTE_ORDER not defined, use endianness auto-detection
+/*
+*/
+#elif defined(_loongarch) || defined(__loongarch__)
+# define Q_PROCESSOR_LOONGARCH
+# if defined(__loongarch64)
+# define Q_PROCESSOR_LOONGARCH_64
+# define Q_PROCESSOR_WORDSIZE 8
+# endif
/*
MIPS family, known revisions: I, II, III, IV, 32, 64
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/qt5-qtbase.git
git@gitee.com:src-anolis-os/qt5-qtbase.git
src-anolis-os
qt5-qtbase
qt5-qtbase
a8

搜索帮助