1 Star 0 Fork 49

李双全/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
10009-systemd-anolis-support-loongarch64.patch 1.79 KB
一键复制 编辑 原始数据 按行查看 历史
庞庆 提交于 2022-04-19 15:08 . Add optimized patches
From c8b7c2b34bd451cd9d5904fc215ad14893008a03 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 19 Apr 2022 14:25:05 +0800
Subject: [PATCH] support loongarch64 for systemd
---
src/basic/architecture.c | 3 +++
src/basic/architecture.h | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/src/basic/architecture.c b/src/basic/architecture.c
index 85837b5..96bbf97 100644
--- a/src/basic/architecture.c
+++ b/src/basic/architecture.c
@@ -118,6 +118,8 @@ int uname_architecture(void) {
#elif defined(__arc__)
{ "arc", ARCHITECTURE_ARC },
{ "arceb", ARCHITECTURE_ARC_BE },
+#elif defined(__loongarch64)
+ { "loongarch64", ARCHITECTURE_LOONGARCH64 },
#else
#error "Please register your architecture here!"
#endif
@@ -173,6 +175,7 @@ static const char *const architecture_table[_ARCHITECTURE_MAX] = {
[ARCHITECTURE_RISCV64] = "riscv64",
[ARCHITECTURE_ARC] = "arc",
[ARCHITECTURE_ARC_BE] = "arc-be",
+ [ARCHITECTURE_LOONGARCH64] = "loongarch64",
};
DEFINE_STRING_TABLE_LOOKUP(architecture, int);
diff --git a/src/basic/architecture.h b/src/basic/architecture.h
index 443e890..22e9108 100644
--- a/src/basic/architecture.h
+++ b/src/basic/architecture.h
@@ -44,6 +44,7 @@ enum {
ARCHITECTURE_RISCV64,
ARCHITECTURE_ARC,
ARCHITECTURE_ARC_BE,
+ ARCHITECTURE_LOONGARCH64,
_ARCHITECTURE_MAX,
_ARCHITECTURE_INVALID = -1
};
@@ -229,6 +230,9 @@ int uname_architecture(void);
# define native_architecture() ARCHITECTURE_ARC
# define LIB_ARCH_TUPLE "arc-linux"
# endif
+#elif defined(__loongarch64)
+# define native_architecture() ARCHITECTURE_LOONGARCH64
+# define LIB_ARCH_TUPLE "loongarch64-linux-gnu"
#else
# error "Please register your architecture here!"
#endif
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shqli/systemd.git
git@gitee.com:shqli/systemd.git
shqli
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385