-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
While working on the Rust backend for m68k based on the M680x0-llvm project, I ran into the problem that the LLVM target m68k-unknown-linux-gnu as I used in [1] was not understood by M680x0-llvm.
Since m68k-*-*-* is the common and widely used triplet name for m68k on Linux and other operating systems, I suggest the following change to the triplet code so that the logic matches the one for SystemZ/s390x:
diff --git a/lib/Support/Triple.cpp b/lib/Support/Triple.cpp
index aea18102646..71017cb8daf 100644
--- a/lib/Support/Triple.cpp
+++ b/lib/Support/Triple.cpp
@@ -69,7 +69,7 @@ StringRef Triple::getArchTypeName(ArchType Kind) {
case shave: return "shave";
case wasm32: return "wasm32";
case wasm64: return "wasm64";
- case m680x0: return "m680x0";
+ case m680x0: return "m68k";
case renderscript32: return "renderscript32";
case renderscript64: return "renderscript64";
}
@@ -391,7 +391,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Cases("powerpc", "ppc", "ppc32", Triple::ppc)
.Cases("powerpc64", "ppu", "ppc64", Triple::ppc64)
.Cases("powerpc64le", "ppc64le", Triple::ppc64le)
- .Case("m680x0", Triple::m680x0)
+ .Cases("m680x0", "m68k", Triple::m680x0)
.Case("xscale", Triple::arm)
.Case("xscaleeb", Triple::armeb)
.Case("aarch64", Triple::aarch64)[1] https://github.com/glaubitz/rust/blob/m68k-linux/src/librustc_target/spec/m68k_unknown_linux_gnu.rs
dandee, DestyNova and eschaton
Metadata
Metadata
Assignees
Labels
No labels