commit:     7bd38b79de36573ba1f19e9754fb78072993c387
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  9 13:22:30 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 24 16:29:56 2022 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=7bd38b79

crossdev: Add support for LoongArch (ARCH=loong)

Closes: https://bugs.gentoo.org/840431
Closes: https://github.com/gentoo/crossdev/pull/2
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 README   |  1 +
 crossdev | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/README b/README
index 5c72e7b..d4198b2 100644
--- a/README
+++ b/README
@@ -60,6 +60,7 @@ executables or kernels if applies):
  i686-pc-gnu
  i686-w64-mingw32
  ia64-unknown-linux-gnu
+ loongarch64-unknown-linux-gnu
  m68k-unknown-linux-gnu
  mips-unknown-linux-gnu
  mips64-unknown-linux-gnu

diff --git a/crossdev b/crossdev
index d8e25fb..7ec9a9d 100755
--- a/crossdev
+++ b/crossdev
@@ -136,6 +136,7 @@ parse_target() {
                   - hppa (parisc)
                   - ia64
                   - i386 / i486 / i586 / i686 (x86)
+                  - loongarch64
                   - m68k
                   - mips / mipsel / mips64 / mips64el
                   - or1k
@@ -208,7 +209,7 @@ parse_target() {
                                CTARGET="${CTARGET}-unknown-linux-gnueabihf";;
                        arm*)
                                CTARGET="${CTARGET}-unknown-linux-gnueabi";;
-                       
aarch64*|alpha*|cris*|hppa*|ia64*|m68*|mips*|powerpc*|riscv*|sparc*|sh*|tile*)
+                       
aarch64*|alpha*|cris*|hppa*|ia64*|loongarch*|m68*|mips*|powerpc*|riscv*|sparc*|sh*|tile*)
                                CTARGET="${CTARGET}-unknown-linux-gnu";;
                        bfin*|h8300*|msp430*|nds32*|nios2*|spu*|xc16x*)
                                CTARGET="${CTARGET}-elf";;
@@ -223,6 +224,7 @@ parse_target() {
                hppa*)      TARCH=hppa;;
                ia64*)      TARCH=ia64;;
                i?86*)      TARCH=x86;;
+               loongarch*) TARCH=loong;;
                m68*)       TARCH=m68k;;
                mips*)      TARCH=mips;;
                powerpc64*) TARCH=ppc64;;
@@ -264,6 +266,13 @@ parse_target() {
                        WITH_DEF_HEADERS="yes"
                        ;;
 
+               loongarch*)
+                       # have to bring in the experimental LoongArch patchset 
before
+                       # everything is upstream
+                       KUSE+=" experimental-loong"
+                       LUSE+=" experimental-loong"
+                       ;;
+
                # added in bug #609602
                mmix*)
                      KPKG="[none]"

Reply via email to