about summary refs log tree commit diff
path: root/compiler/rustc_target
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-29 03:53:36 +0000
committerbors <bors@rust-lang.org>2023-10-29 03:53:36 +0000
commitbbcc1691a4646a6d2ebb2189bdff5b878407fbe6 (patch)
tree9a0dc348cd120782722318c86fa5f1f15b3750dc /compiler/rustc_target
parent2106b63b7b50470fd264975d70349a70528ce156 (diff)
parent505bc85c30f628860c4917fb194fad60122f2920 (diff)
downloadrust-bbcc1691a4646a6d2ebb2189bdff5b878407fbe6.tar.gz
rust-bbcc1691a4646a6d2ebb2189bdff5b878407fbe6.zip
Auto merge of #117336 - workingjubilee:rollup-6negquv, r=workingjubilee
Rollup of 4 pull requests

Successful merges:

 - #117170 (Add support for i586-unknown-netbsd as target.)
 - #117259 (Declare rustc_target's dependency on object/macho)
 - #117322 (change default output mode of `BootstrapCommand`)
 - #117325 (Small ty::print cleanups)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_target')
-rw-r--r--compiler/rustc_target/Cargo.toml2
-rw-r--r--compiler/rustc_target/src/spec/i586_unknown_netbsd.rs18
-rw-r--r--compiler/rustc_target/src/spec/mod.rs1
3 files changed, 20 insertions, 1 deletions
diff --git a/compiler/rustc_target/Cargo.toml b/compiler/rustc_target/Cargo.toml
index a91eb41b18a..779d03cd094 100644
--- a/compiler/rustc_target/Cargo.toml
+++ b/compiler/rustc_target/Cargo.toml
@@ -19,4 +19,4 @@ rustc_index = { path = "../rustc_index" }
 [dependencies.object]
 version = "0.32.0"
 default-features = false
-features = ["elf"]
+features = ["elf", "macho"]
diff --git a/compiler/rustc_target/src/spec/i586_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i586_unknown_netbsd.rs
new file mode 100644
index 00000000000..0d8bdc3f89f
--- /dev/null
+++ b/compiler/rustc_target/src/spec/i586_unknown_netbsd.rs
@@ -0,0 +1,18 @@
+use crate::spec::{StackProbeType, Target, TargetOptions};
+
+pub fn target() -> Target {
+    let mut base = super::netbsd_base::opts();
+    base.cpu = "pentium".into();
+    base.max_atomic_width = Some(64);
+    base.stack_probes = StackProbeType::Call;
+
+    Target {
+        llvm_target: "i586-unknown-netbsdelf".into(),
+        pointer_width: 32,
+        data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
+            f64:32:64-f80:32-n8:16:32-S128"
+            .into(),
+        arch: "x86".into(),
+        options: TargetOptions { mcount: "__mcount".into(), ..base },
+    }
+}
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 31f538d8b61..ccf29761552 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1564,6 +1564,7 @@ supported_targets! {
     ("aarch64_be-unknown-netbsd", aarch64_be_unknown_netbsd),
     ("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
     ("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
+    ("i586-unknown-netbsd", i586_unknown_netbsd),
     ("i686-unknown-netbsd", i686_unknown_netbsd),
     ("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
     ("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd),