From a23ee64c2c292f30fa64b258042e256bca0f35a9 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sun, 19 Sep 2021 12:05:58 -0700 Subject: [PATCH] Rename x86_64-unknown-none-elf to x86_64-unknown-none Most Rust freestanding/bare-metal targets use just `-unknown-none` here, including aarch64-unknown-none, mipsel-unknown-none, and the BPF targets. The *only* target using `-unknown-none-elf` is RISC-V. The underlying toolchain doesn't care; LLVM accepts both `x86_64-unknown-none` and `x86_64-unknown-none-elf`. In addition, there's a long history of embedded x86 targets with varying definitions for the `elf` suffix; on some of those embedded targets, `elf` implied the inclusion of a C library based on newlib or similar. Using `x86_64-unknown-none` avoids any potential ambiguity there. (Work on this target sponsored by Profian.) --- compiler/rustc_target/src/spec/mod.rs | 2 +- .../spec/{x86_64_unknown_none_elf.rs => x86_64_unknown_none.rs} | 0 src/doc/rustc/src/platform-support.md | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename compiler/rustc_target/src/spec/{x86_64_unknown_none_elf.rs => x86_64_unknown_none.rs} (100%) diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 4b357b3cca1b..5bc6d1918dd7 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -955,7 +955,7 @@ supported_targets! { ("armv7-unknown-linux-uclibceabihf", armv7_unknown_linux_uclibceabihf), - ("x86_64-unknown-none-elf", x86_64_unknown_none_elf), + ("x86_64-unknown-none", x86_64_unknown_none), } /// Warnings encountered when parsing the target `json`. diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_none_elf.rs b/compiler/rustc_target/src/spec/x86_64_unknown_none.rs similarity index 100% rename from compiler/rustc_target/src/spec/x86_64_unknown_none_elf.rs rename to compiler/rustc_target/src/spec/x86_64_unknown_none.rs diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 62084d2a9dbd..0f2072bd5215 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -285,7 +285,7 @@ target | std | host | notes `x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku `x86_64-unknown-hermit` | ? | | `x86_64-unknown-l4re-uclibc` | ? | | -`x86_64-unknown-none-elf` | * | | Bare x86_64, softfloat +`x86_64-unknown-none` | * | | Freestanding/bare-metal x86_64, softfloat `x86_64-unknown-none-hermitkernel` | ? | | HermitCore kernel `x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules `x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD