Skip to content

Commit 75eb963

Browse files
authored
Rollup merge of #92098 - semarie:openbsd-platform, r=pietroalbini
add OpenBSD platform-support page It mentions x86_64, i686, aarch64 and sparc64 which are actively maintained and used on OpenBSD (binaries provided by standard package distribution on OpenBSD). I volontary kept `powerpc-unknown-openbsd` unmentioned as it was added by `@Yn0ga` in #82733, and I am unaware if it is functional or not (I doubt as I added libc support only few days ago, and std `c_char` signess was wrong). `@Yn0ga` maybe you comment on your `powerpc-unknown-openbsd` usage ?
2 parents 1dd0ac1 + 9c1b4d0 commit 75eb963

File tree

3 files changed

+61
-4
lines changed

3 files changed

+61
-4
lines changed

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- [aarch64-apple-ios-sim](platform-support/aarch64-apple-ios-sim.md)
1818
- [armv7-unknown-linux-uclibceabihf](platform-support/armv7-unknown-linux-uclibceabihf.md)
1919
- [\*-kmc-solid_\*](platform-support/kmc-solid.md)
20+
- [*-unknown-openbsd](platform-support/openbsd.md)
2021
- [x86_64-unknown-none](platform-support/x86_64-unknown-none.md)
2122
- [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
2223
- [Target Tier Policy](target-tier-policy.md)

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ target | std | host | notes
208208
`aarch64-unknown-uefi` | * | | ARM64 UEFI
209209
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
210210
`aarch64-unknown-netbsd` | ✓ | ✓ |
211-
`aarch64-unknown-openbsd` | ✓ | ✓ | ARM64 OpenBSD
211+
[`aarch64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | ARM64 OpenBSD
212212
`aarch64-unknown-redox` | ? | | ARM64 Redox OS
213213
`aarch64-uwp-windows-msvc` | ? | |
214214
`aarch64-wrs-vxworks` | ? | |
@@ -237,7 +237,7 @@ target | std | host | notes
237237
`i686-pc-windows-msvc` | ✓ | | 32-bit Windows XP support
238238
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku
239239
`i686-unknown-netbsd` | ✓ | ✓ | NetBSD/i386 with SSE2
240-
`i686-unknown-openbsd` | ✓ | ✓ | 32-bit OpenBSD
240+
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD
241241
`i686-unknown-uefi` | * | | 32-bit UEFI
242242
`i686-uwp-windows-gnu` | ? | |
243243
`i686-uwp-windows-msvc` | ? | |
@@ -272,7 +272,7 @@ target | std | host | notes
272272
`s390x-unknown-linux-musl` | | | S390x Linux (kernel 2.6.32, MUSL)
273273
`sparc-unknown-linux-gnu` | ✓ | | 32-bit SPARC Linux
274274
`sparc64-unknown-netbsd` | ✓ | ✓ | NetBSD/sparc64
275-
`sparc64-unknown-openbsd` | ? | |
275+
[`sparc64-unknown-openbsd`](platform-support/openbsd.md) | | ✓ | OpenBSD/sparc64
276276
`thumbv4t-none-eabi` | * | | ARMv4T T32
277277
`thumbv7a-pc-windows-msvc` | ? | |
278278
`thumbv7a-uwp-windows-msvc` | ✓ | |
@@ -289,7 +289,7 @@ target | std | host | notes
289289
[`x86_64-unknown-none`](platform-support/x86_64-unknown-none.md) | * | | Freestanding/bare-metal x86_64, softfloat
290290
`x86_64-unknown-none-hermitkernel` | ? | | HermitCore kernel
291291
`x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules
292-
`x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD
292+
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
293293
`x86_64-unknown-uefi` | * | | 64-bit UEFI
294294
`x86_64-uwp-windows-gnu` | ✓ | |
295295
`x86_64-uwp-windows-msvc` | ✓ | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# \*-unknown-openbsd
2+
3+
**Tier: 3**
4+
5+
[OpenBSD] multi-platform 4.4BSD-based UNIX-like operating system.
6+
7+
[OpenBSD]: https://www.openbsd.org/
8+
9+
The target names follow this format: `$ARCH-unknown-openbsd`, where `$ARCH` specifies the target processor architecture. The following targets are currently defined:
10+
11+
| Target name | C++ library | OpenBSD Platform |
12+
|--------------------------------|-------------|------------------|
13+
| `aarch64-unknown-openbsd` | libc++ | [64-bit ARM systems](https://www.openbsd.org/arm64.html) |
14+
| `i686-unknown-openbsd` | libc++ | [Standard PC and clones based on the Intel i386 architecture and compatible processors](https://www.openbsd.org/i386.html) |
15+
| `sparc64-unknown-openbsd` | estdc++ | [Sun UltraSPARC and Fujitsu SPARC64 systems](https://www.openbsd.org/sparc64.html) |
16+
| `x86_64-unknown-openbsd` | libc++ | [AMD64-based systems](https://www.openbsd.org/amd64.html) |
17+
18+
Note that all OS versions are *major* even if using X.Y notation (`6.8` and `6.9` are different major versions) and could be binary incompatibles (with breaking changes).
19+
20+
21+
## Designated Developers
22+
23+
- [@semarie](https://github.com/semarie), `semarie@openbsd.org`
24+
- [lang/rust](https://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/lang/rust/Makefile?rev=HEAD&content-type=text/x-cvsweb-markup) maintainer (see MAINTAINER variable)
25+
26+
Fallback to ports@openbsd.org, OpenBSD third parties public mailing-list (with openbsd developers readers)
27+
28+
29+
## Requirements
30+
31+
These targets are natively compiled and could be cross-compiled.
32+
C compiler toolchain is required for the purpose of building Rust and functional binaries.
33+
34+
## Building
35+
36+
The target can be built by enabling it for a `rustc` build.
37+
38+
```toml
39+
[build]
40+
target = ["$ARCH-unknown-openbsd"]
41+
42+
[target.$ARCH-unknown-openbsd]
43+
cc = "$ARCH-openbsd-cc"
44+
```
45+
46+
## Cross-compilation
47+
48+
These targets can be cross-compiled, but LLVM might not build out-of-box.
49+
50+
## Testing
51+
52+
The Rust testsuite could be run natively.
53+
54+
## Building Rust programs
55+
56+
Rust does not yet ship pre-compiled artifacts for these targets.

0 commit comments

Comments
 (0)