mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Rollup merge of #128345 - sthibaul:hurd-amd64, r=Urgau
added support for GNU/Hurd on x86_64
This commit is contained in:
commit
2cce01ee62
@ -1645,6 +1645,7 @@ supported_targets! {
|
||||
("x86_64-unknown-haiku", x86_64_unknown_haiku),
|
||||
|
||||
("i686-unknown-hurd-gnu", i686_unknown_hurd_gnu),
|
||||
("x86_64-unknown-hurd-gnu", x86_64_unknown_hurd_gnu),
|
||||
|
||||
("aarch64-apple-darwin", aarch64_apple_darwin),
|
||||
("arm64e-apple-darwin", arm64e_apple_darwin),
|
||||
|
@ -0,0 +1,26 @@
|
||||
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::hurd_gnu::opts();
|
||||
base.cpu = "x86-64".into();
|
||||
base.plt_by_default = false;
|
||||
base.max_atomic_width = Some(64);
|
||||
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
|
||||
base.stack_probes = StackProbeType::Inline;
|
||||
base.supports_xray = true;
|
||||
|
||||
Target {
|
||||
llvm_target: "x86_64-unknown-hurd-gnu".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
description: Some("64-bit GNU/Hurd".into()),
|
||||
tier: Some(3),
|
||||
host_tools: Some(true),
|
||||
std: Some(true),
|
||||
},
|
||||
pointer_width: 64,
|
||||
data_layout:
|
||||
"e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
|
||||
arch: "x86_64".into(),
|
||||
options: base,
|
||||
}
|
||||
}
|
@ -382,6 +382,7 @@ target | std | host | notes
|
||||
[`x86_64-unikraft-linux-musl`](platform-support/unikraft-linux-musl.md) | ✓ | | 64-bit Unikraft with musl 1.2.3
|
||||
`x86_64-unknown-dragonfly` | ✓ | ✓ | 64-bit DragonFlyBSD
|
||||
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
|
||||
[`x86_64-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 64-bit GNU/Hurd
|
||||
[`x86_64-unknown-hermit`](platform-support/hermit.md) | ✓ | | x86_64 Hermit
|
||||
`x86_64-unknown-l4re-uclibc` | ? | |
|
||||
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
|
||||
|
@ -1,4 +1,4 @@
|
||||
# `i686-unknown-hurd-gnu`
|
||||
# `i686-unknown-hurd-gnu` and `x86_64-unknown-hurd-gnu`
|
||||
|
||||
**Tier: 3**
|
||||
|
||||
@ -16,7 +16,8 @@ The GNU/Hurd target supports `std` and uses the standard ELF file format.
|
||||
|
||||
## Building the target
|
||||
|
||||
This target can be built by adding `i686-unknown-hurd-gnu` as target in the rustc list.
|
||||
This target can be built by adding `i686-unknown-hurd-gnu` and
|
||||
`x86_64-unknown-hurd-gnu` as targets in the rustc list.
|
||||
|
||||
## Building Rust programs
|
||||
|
||||
@ -32,4 +33,4 @@ Tests can be run in the same way as a regular binary.
|
||||
## Cross-compilation toolchains and C code
|
||||
|
||||
The target supports C code, the GNU toolchain calls the target
|
||||
`i686-unknown-gnu`.
|
||||
`i686-unknown-gnu` and `x86_64-unknown-gnu`.
|
||||
|
@ -552,6 +552,9 @@
|
||||
//@ revisions: x86_64_unknown_haiku
|
||||
//@ [x86_64_unknown_haiku] compile-flags: --target x86_64-unknown-haiku
|
||||
//@ [x86_64_unknown_haiku] needs-llvm-components: x86
|
||||
//@ revisions: x86_64_unknown_hurd_gnu
|
||||
//@ [x86_64_unknown_hurd_gnu] compile-flags: --target x86_64-unknown-hurd-gnu
|
||||
//@ [x86_64_unknown_hurd_gnu] needs-llvm-components: x86
|
||||
//@ revisions: x86_64_unknown_hermit
|
||||
//@ [x86_64_unknown_hermit] compile-flags: --target x86_64-unknown-hermit
|
||||
//@ [x86_64_unknown_hermit] needs-llvm-components: x86
|
||||
|
Loading…
Reference in New Issue
Block a user