Gentoo Archives: gentoo-dev

From: WANG Xuerui <i.gentoo@×××××.name>
To: gentoo-dev@l.g.o
Cc: WANG Xuerui <git@×××××.name>
Subject: [gentoo-dev] [PATCH] toolchain-funcs.eclass: add detection for loongarch
Date: Mon, 30 Aug 2021 03:25:39
Message-Id: 20210830032525.2636781-1-i.gentoo@xen0n.name
1 From: WANG Xuerui <git@×××××.name>
2
3 The Linux port currently under review has arch/loongarch, and should
4 almost certainly remain that way till merge; meanwhile it's ARCH=loong
5 on the Gentoo side, per mailing list discussion[1] and eselect
6 adaptation[2]. This architecture is little-endian-only according to the
7 manual[3].
8
9 [1]: https://archives.gentoo.org/gentoo-dev/message/388a4b7428461660e89c8eae8c292f32
10 [2]: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=a49477f39d3f000cc2ca57f18aafbd66656aba05
11 [3]: https://github.com/loongson/LoongArch-Documentation/blob/2021.08.17/docs/LoongArch-Vol1-EN/basic-integer-instructions/programming-model-of-basic-integer-instructions/endian.adoc
12
13 Signed-off-by: WANG Xuerui <git@×××××.name>
14 ---
15 eclass/toolchain-funcs.eclass | 2 ++
16 1 file changed, 2 insertions(+)
17
18 diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
19 index 563d9deef40..77fb304940b 100644
20 --- a/eclass/toolchain-funcs.eclass
21 +++ b/eclass/toolchain-funcs.eclass
22 @@ -675,6 +675,7 @@ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
23 fi
24 ;;
25 ia64*) echo ia64;;
26 + loongarch*) ninj loongarch loong;;
27 m68*) echo m68k;;
28 metag*) echo metag;;
29 microblaze*) echo microblaze;;
30 @@ -752,6 +753,7 @@ tc-endian() {
31 hppa*) echo big;;
32 i?86*) echo little;;
33 ia64*) echo little;;
34 + loongarch*) echo little;;
35 m68*) echo big;;
36 mips*l*) echo little;;
37 mips*) echo big;;
38 --
39 2.33.0

Replies