loongarch64: add initial loongarch support

This commit adds architecture support for LoongArch.

The toolchain currently only supports the 64-bit target
loongarch64-unknown-linux-gnu.

It has been tested to build with GCC 12.1, GDB 12.1, Glibc 2.36, Linux
5.19 and Binutils 2.39 as of Aug 2022.

Signed-off-by: Jiajie Chen <c@jia.je>
This commit is contained in:
Jiajie Chen 2022-05-02 20:12:45 +08:00 committed by Chris Packham
parent 55d8c43333
commit e840986fa4
2 changed files with 24 additions and 0 deletions

19
config/arch/loongarch.in Normal file
View File

@ -0,0 +1,19 @@
# LoongArch specific config options
## no-package
## depends on EXPERIMENTAL
##
## select ARCH_SUPPORTS_64
## select ARCH_DEFAULT_64
## select ARCH_SUPPORTS_BOTH_MMU
## select ARCH_SUPPORTS_WITH_ABI
## select ARCH_SUPPORTS_WITH_ARCH
## select ARCH_SUPPORTS_WITH_TUNE
## select GCC_REQUIRE_12_or_later
## select BINUTILS_REQUIRE_2_39_or_later
## select LINUX_REQUIRE_5_19_or_later
## select GDB_REQUIRE_12_1_or_later if DEBUG_GDB
## select GLIBC_REQUIRE_2_36_or_later if LIBC_GLIBC
## help The LoongArch architecture, as defined by:
## help https://loongson.github.io/LoongArch-Documentation/README-EN.html

View File

@ -0,0 +1,5 @@
# Compute LoongArch-specific values
CT_DoArchTupleValues() {
CT_TARGET_ARCH="loongarch${CT_ARCH_BITNESS}"
}