100 lines
2.5 KiB
Diff
100 lines
2.5 KiB
Diff
From 3100da59abd272fc3f301a30ebabedf86b0b4a00 Mon Sep 17 00:00:00 2001
|
|
From: Sun Haiyong <sunhaiyong@loongson.cn>
|
|
Date: Tue, 21 Dec 2021 20:40:27 +0800
|
|
Subject: [PATCH] Add loongarch architecture support.
|
|
|
|
---
|
|
installplatform | 12 ++++++++++++
|
|
rpmrc.in | 17 +++++++++++++++++
|
|
2 files changed, 29 insertions(+)
|
|
|
|
diff --git a/installplatform b/installplatform
|
|
index dd9effb..b8e6c33 100755
|
|
--- a/installplatform
|
|
+++ b/installplatform
|
|
@@ -168,6 +168,18 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
|
|
CANONARCH=mips64r6el
|
|
CANONCOLOR=3
|
|
;;
|
|
+ loongarch32)
|
|
+ ISANAME=loongarch
|
|
+ ISABITS=32
|
|
+ CANONARCH=loongarch32
|
|
+ CANONCOLOR=0
|
|
+ ;;
|
|
+ loongarch64)
|
|
+ ISANAME=loongarch
|
|
+ ISABITS=64
|
|
+ CANONARCH=loongarch64
|
|
+ CANONCOLOR=3
|
|
+ ;;
|
|
m68k)
|
|
ISANAME=m68k
|
|
ISABITS=32
|
|
diff --git a/rpmrc.in b/rpmrc.in
|
|
index f541b0e..9caa76c 100644
|
|
--- a/rpmrc.in
|
|
+++ b/rpmrc.in
|
|
@@ -67,6 +67,8 @@ optflags: mipsr6el -O2 -g
|
|
optflags: mips64r6 -O2 -g
|
|
optflags: mips64r6el -O2 -g
|
|
|
|
+optflags: loongarch64 -O2 -g
|
|
+
|
|
optflags: armv3l -O2 -g -march=armv3
|
|
optflags: armv4b -O2 -g -march=armv4
|
|
optflags: armv4l -O2 -g -march=armv4
|
|
@@ -139,6 +141,9 @@ archcolor: mipsr6el 1
|
|
archcolor: mips64r6 2
|
|
archcolor: mips64r6el 2
|
|
|
|
+archcolor: loongarch32 1
|
|
+archcolor: loongarch64 2
|
|
+
|
|
archcolor: m68k 1
|
|
|
|
archcolor: m68kmint 1
|
|
@@ -265,6 +270,9 @@ arch_canon: riscv64: riscv64 22
|
|
|
|
arch_canon: loongarch64: loongarch64 23
|
|
|
|
+arch_canon: loongarch32: loongarch32 25
|
|
+arch_canon: loongarch64: loongarch64 26
|
|
+
|
|
#############################################################
|
|
# Canonical OS names and numbers
|
|
|
|
@@ -368,6 +376,9 @@ buildarchtranslate: mipsr6el: mipsr6el
|
|
buildarchtranslate: mips64r6: mips64r6
|
|
buildarchtranslate: mips64r6el: mips64r6el
|
|
|
|
+buildarchtranslate: loongarch32: loongarch32
|
|
+buildarchtranslate: loongarch64: loongarch64
|
|
+
|
|
buildarchtranslate: m68k: m68k
|
|
|
|
buildarchtranslate: atarist: m68kmint
|
|
@@ -460,6 +471,9 @@ arch_compat: mipsr6el: noarch
|
|
arch_compat: mips64r6: mipsr6
|
|
arch_compat: mips64r6el: mipsr6el
|
|
|
|
+arch_compat: loongarch32: noarch
|
|
+arch_compat: loongarch64: loongarch32
|
|
+
|
|
arch_compat: hppa2.0: hppa1.2
|
|
arch_compat: hppa1.2: hppa1.1
|
|
arch_compat: hppa1.1: hppa1.0
|
|
@@ -602,6 +616,9 @@ buildarch_compat: mipsr6el: noarch
|
|
buildarch_compat: mips64r6: noarch
|
|
buildarch_compat: mips64r6el: noarch
|
|
|
|
+buildarch_compat: loongarch32: noarch
|
|
+buildarch_compat: loongarch64: noarch
|
|
+
|
|
buildarch_compat: armv4b: noarch
|
|
buildarch_compat: armv8l: armv7l
|
|
buildarch_compat: armv7l: armv6l
|
|
--
|
|
2.26.2
|
|
|