Skip to content

Commit 62ebce0

Browse files
bjorn3jackpot51
andcommitted
Add i686-unknown-redox target
Co-Authored-By: Jeremy Soller <[email protected]>
1 parent de12eb9 commit 62ebce0

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,7 @@ supported_targets! {
16471647
("x86_64-unknown-l4re-uclibc", x86_64_unknown_l4re_uclibc),
16481648

16491649
("aarch64-unknown-redox", aarch64_unknown_redox),
1650+
("i686-unknown-redox", i686_unknown_redox),
16501651
("x86_64-unknown-redox", x86_64_unknown_redox),
16511652

16521653
("i386-apple-ios", i386_apple_ios),
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target};
2+
3+
pub fn target() -> Target {
4+
let mut base = base::redox::opts();
5+
base.cpu = "pentiumpro".into();
6+
base.plt_by_default = false;
7+
base.max_atomic_width = Some(64);
8+
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
9+
// don't use probe-stack=inline-asm until rust#83139 and rust#84667 are resolved
10+
base.stack_probes = StackProbeType::Call;
11+
12+
Target {
13+
llvm_target: "i686-unknown-redox".into(),
14+
metadata: crate::spec::TargetMetadata {
15+
description: None,
16+
tier: None,
17+
host_tools: None,
18+
std: None,
19+
},
20+
pointer_width: 32,
21+
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"
22+
.into(),
23+
arch: "x86".into(),
24+
options: base,
25+
}
26+
}

src/bootstrap/src/core/sanity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub struct Finder {
4040
#[cfg(not(feature = "bootstrap-self-test"))]
4141
const STAGE0_MISSING_TARGETS: &[&str] = &[
4242
// just a dummy comment so the list doesn't get onelined
43+
"i686-unknown-redox",
4344
];
4445

4546
/// Minimum version threshold for libstdc++ required when using prebuilt LLVM

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ target | std | host | notes
300300
[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]
301301
[`i686-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | NetBSD/i386 with SSE2 [^x86_32-floats-return-ABI]
302302
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI]
303+
`i686-unknown-redox` | ? | | i686 Redox OS
303304
`i686-uwp-windows-gnu` | ? | | [^x86_32-floats-return-ABI]
304305
`i686-uwp-windows-msvc` | ? | | [^x86_32-floats-return-ABI]
305306
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support [^x86_32-floats-return-ABI]

src/tools/build-manifest/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ static TARGETS: &[&str] = &[
102102
"i686-unknown-freebsd",
103103
"i686-unknown-linux-gnu",
104104
"i686-unknown-linux-musl",
105+
"i686-unknown-redox",
105106
"i686-unknown-uefi",
106107
"loongarch64-unknown-linux-gnu",
107108
"loongarch64-unknown-none",

0 commit comments

Comments
 (0)