BareMetal: Add support for RISC-V architecture in GCC toolchain

This commit adds support for the RISC-V atchitecture:

 * https://riscv.org/

using GCC toolchains.

Tested auto-detection on Windows using the GCC v7.7.1 toolchain
provided from the following URL:

 * https://gnutoolchains.com/risc-v/

Change-Id: Ice10469ebda8af9cf7bf32299bb38e548b30b315
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Denis Shienkov
2020-05-14 21:43:26 +03:00
parent 41b78dd962
commit b86375ad5d

View File

@@ -517,6 +517,12 @@ Abi Abi::abiFromTargetTriplet(const QString &triple)
flavor = GenericFlavor; flavor = GenericFlavor;
format = ElfFormat; format = ElfFormat;
width = 32; width = 32;
} else if (p.startsWith("riscv")) {
arch = RiscVArchitecture;
os = BareMetalOS;
flavor = GenericFlavor;
format = ElfFormat;
width = 32;
} else if (p.startsWith("mips")) { } else if (p.startsWith("mips")) {
arch = MipsArchitecture; arch = MipsArchitecture;
width = p.contains("64") ? 64 : 32; width = p.contains("64") ? 64 : 32;