diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-09-10 03:05:12 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-09-10 03:05:12 +0000 |
| commit | 2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 (patch) | |
| tree | a2af4fd609c7decacbf0ea11926ea338596fb179 /0001-add-default-machine-name-to-support-loongarch.patch | |
| parent | 0ae9f87336a3d78d8fbc0a1e5c75cba5f9cf8597 (diff) | |
automatic import of rpm
Diffstat (limited to '0001-add-default-machine-name-to-support-loongarch.patch')
| -rw-r--r-- | 0001-add-default-machine-name-to-support-loongarch.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/0001-add-default-machine-name-to-support-loongarch.patch b/0001-add-default-machine-name-to-support-loongarch.patch new file mode 100644 index 0000000..f127fe0 --- /dev/null +++ b/0001-add-default-machine-name-to-support-loongarch.patch @@ -0,0 +1,30 @@ +From f492b34a694a4bf40e075a030c01f360eaa5500e Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang <zhangwenlong@loongson.cn> +Date: Fri, 27 May 2022 09:41:38 +0800 +Subject: [PATCH] add default machine name to support loongarch + +--- + lib/rpmrc.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/lib/rpmrc.c b/lib/rpmrc.c +index 120777c..bd0dbca 100644 +--- a/lib/rpmrc.c ++++ b/lib/rpmrc.c +@@ -1242,6 +1242,13 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os) + } + # endif /* riscv */ + ++# if defined(__linux__) && defined(__loongarch__) ++ if (sizeof(long) == 4) ++ strcpy(un.machine, "loongarch32"); ++ else if (sizeof(long) == 8) ++ strcpy(un.machine, "loongarch64"); ++# endif /* loongarch */ ++ + # if defined(__GNUC__) && defined(__alpha__) + { + unsigned long amask, implver; +-- +2.27.0 + |
