Add i686-unknown-redox target

Co-Authored-By: Jeremy Soller <jackpot51@gmail.com>
This commit is contained in:
bjorn3 2024-06-09 12:38:06 +00:00
parent 60a972db83
commit efa213afad
5 changed files with 33 additions and 0 deletions

View File

@ -1647,6 +1647,7 @@ supported_targets! {
("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc), ("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc),
("aarch64-unknown-redox", aarch64_unknown_redox), ("aarch64-unknown-redox", aarch64_unknown_redox),
("i686-unknown-redox", i686_unknown_redox),
("x86_64-unknown-redox", x86_64_unknown_redox), ("x86_64-unknown-redox", x86_64_unknown_redox),
("i386-apple-ios", i386_apple_ios), ("i386-apple-ios", i386_apple_ios),

View File

@ -0,0 +1,27 @@
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};
pub fn target() -> Target {
let mut base = base::redox::opts();
base.cpu = "pentiumpro".into();
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
base.stack_probes = StackProbeType::Call;
Target {
llvm_target: "i686-unknown-redox".into(),
metadata: crate::spec::TargetMetadata {
description: None,
tier: None,
host_tools: None,
std: None,
},
pointer_width: 32,
data_layout:
"e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i128:128-f64:32:64-f80:32-n8:16:32-S128"
.into(),
arch: "x86".into(),
options: base,
}
}

View File

@ -300,6 +300,7 @@ target | std | host | notes
[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI] [`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-return-ABI] [`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-return-ABI]
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI] [`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI]
`i686-unknown-redox` | ? | | i686 Redox OS
`i686-uwp-windows-gnu` | ✓ | | [^x86_32-floats-return-ABI] `i686-uwp-windows-gnu` | ✓ | | [^x86_32-floats-return-ABI]
`i686-uwp-windows-msvc` | ✓ | | [^x86_32-floats-return-ABI] `i686-uwp-windows-msvc` | ✓ | | [^x86_32-floats-return-ABI]
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support [^x86_32-floats-return-ABI] [`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support [^x86_32-floats-return-ABI]

View File

@ -103,6 +103,7 @@ static TARGETS: &[&str] = &[
"i686-unknown-freebsd", "i686-unknown-freebsd",
"i686-unknown-linux-gnu", "i686-unknown-linux-gnu",
"i686-unknown-linux-musl", "i686-unknown-linux-musl",
"i686-unknown-redox",
"i686-unknown-uefi", "i686-unknown-uefi",
"loongarch64-unknown-linux-gnu", "loongarch64-unknown-linux-gnu",
"loongarch64-unknown-none", "loongarch64-unknown-none",

View File

@ -228,6 +228,9 @@
//@ revisions: i686_unknown_openbsd //@ revisions: i686_unknown_openbsd
//@ [i686_unknown_openbsd] compile-flags: --target i686-unknown-openbsd //@ [i686_unknown_openbsd] compile-flags: --target i686-unknown-openbsd
//@ [i686_unknown_openbsd] needs-llvm-components: x86 //@ [i686_unknown_openbsd] needs-llvm-components: x86
//@ revisions: i686_unknown_redox
//@ [i686_unknown_redox] compile-flags: --target i686-unknown-redox
//@ [i686_unknown_redox] needs-llvm-components: x86
//@ revisions: i686_wrs_vxworks //@ revisions: i686_wrs_vxworks
//@ [i686_wrs_vxworks] compile-flags: --target i686-wrs-vxworks //@ [i686_wrs_vxworks] compile-flags: --target i686-wrs-vxworks
//@ [i686_wrs_vxworks] needs-llvm-components: x86 //@ [i686_wrs_vxworks] needs-llvm-components: x86