Add new Tier-3 targets: loongarch32-unknown-none*

MCP: https://github.com/rust-lang/compiler-team/issues/865
This commit is contained in:
WANG Rui
2025-01-09 20:35:49 +08:00
parent 27f8efbae2
commit 38d69c3f57
30 changed files with 149 additions and 33 deletions

View File

@@ -287,6 +287,7 @@ fn create_elf_raw_dylib_stub(sess: &Session, soname: &str, symbols: &[DllImport]
(Architecture::X86_64, None) => elf::EM_X86_64,
(Architecture::X86_64_X32, None) => elf::EM_X86_64,
(Architecture::Hexagon, None) => elf::EM_HEXAGON,
(Architecture::LoongArch32, None) => elf::EM_LOONGARCH,
(Architecture::LoongArch64, None) => elf::EM_LOONGARCH,
(Architecture::M68k, None) => elf::EM_68K,
(Architecture::Mips, None) => elf::EM_MIPS,

View File

@@ -348,7 +348,7 @@ pub(super) fn elf_e_flags(architecture: Architecture, sess: &Session) -> u32 {
e_flags
}
Architecture::LoongArch64 => {
Architecture::LoongArch32 | Architecture::LoongArch64 => {
// Source: https://github.com/loongson/la-abi-specs/blob/release/laelf.adoc#e_flags-identifies-abi-type-and-version
let mut e_flags: u32 = elf::EF_LARCH_OBJABI_V1;