Skip to content

Commit b305521

Browse files
committed
Add freebsd support information
1 parent 97ac52f commit b305521

File tree

7 files changed

+42
-15
lines changed

7 files changed

+42
-15
lines changed

compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub fn target() -> Target {
1313
description: Some("PPC64LE FreeBSD".into()),
1414
tier: Some(3),
1515
host_tools: Some(false),
16-
std: Some(false),
16+
std: Some(true),
1717
},
1818
pointer_width: 64,
1919
data_layout: "e-m:e-Fn32-i64:64-n32:64".into(),

compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn target() -> Target {
1717
description: Some("PowerPC FreeBSD".into()),
1818
tier: Some(3),
1919
host_tools: Some(false),
20-
std: Some(false),
20+
std: Some(true),
2121
},
2222
pointer_width: 32,
2323
data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(),

compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub fn target() -> Target {
77
description: Some("RISC-V FreeBSD".into()),
88
tier: Some(3),
99
host_tools: Some(false),
10-
std: Some(false),
10+
std: Some(true),
1111
},
1212
pointer_width: 64,
1313
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),

library/std/src/sys/sync/condvar/futex.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ impl Condvar {
3131
}
3232

3333
pub unsafe fn wait(&self, mutex: &Mutex) {
34-
self.wait_optional_timeout(mutex, None);
34+
unsafe { self.wait_optional_timeout(mutex, None) };
3535
}
3636

3737
pub unsafe fn wait_timeout(&self, mutex: &Mutex, timeout: Duration) -> bool {
38-
self.wait_optional_timeout(mutex, Some(timeout))
38+
unsafe { self.wait_optional_timeout(mutex, Some(timeout)) }
3939
}
4040

4141
unsafe fn wait_optional_timeout(&self, mutex: &Mutex, timeout: Option<Duration>) -> bool {
4242
// Examine the notification counter _before_ we unlock the mutex.
4343
let futex_value = self.futex.load(Relaxed);
4444

4545
// Unlock the mutex before going to sleep.
46-
mutex.unlock();
46+
unsafe { mutex.unlock() };
4747

4848
// Wait, but only if there hasn't been any
4949
// notification since we unlocked the mutex.

src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
- [x86_64-unknown-none](platform-support/x86_64-unknown-none.md)
8686
- [xtensa-\*-none-elf](platform-support/xtensa.md)
8787
- [*-nuttx-\*](platform-support/nuttx.md)
88+
- [\*-freebsd](platform-support/freebsd.md)
8889
- [Targets](targets/index.md)
8990
- [Built-in Targets](targets/built-in.md)
9091
- [Custom Targets](targets/custom.md)

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

+9-9
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ target | notes
9999
`powerpc64le-unknown-linux-gnu` | PPC64LE Linux (kernel 3.10, glibc 2.17)
100100
`riscv64gc-unknown-linux-gnu` | RISC-V Linux (kernel 4.20, glibc 2.29)
101101
`s390x-unknown-linux-gnu` | S390x Linux (kernel 3.2, glibc 2.17)
102-
`x86_64-unknown-freebsd` | 64-bit FreeBSD
102+
[`x86_64-unknown-freebsd`](platform-support/freebsd.md) | 64-bit FreeBSD
103103
`x86_64-unknown-illumos` | illumos
104104
`x86_64-unknown-linux-musl` | 64-bit Linux with musl 1.2.3
105105
[`x86_64-unknown-netbsd`](platform-support/netbsd.md) | NetBSD/amd64
@@ -165,7 +165,7 @@ target | std | notes
165165
`i586-unknown-linux-musl` | ✓ | 32-bit Linux w/o SSE, musl 1.2.3 [^x86_32-floats-x87]
166166
[`i686-linux-android`](platform-support/android.md) | ✓ | 32-bit x86 Android [^x86_32-floats-return-ABI]
167167
[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | 32-bit x86 MinGW (Windows 10+), LLVM ABI [^x86_32-floats-return-ABI]
168-
`i686-unknown-freebsd` | ✓ | 32-bit FreeBSD [^x86_32-floats-return-ABI]
168+
[`i686-unknown-freebsd`](platform-support/freebsd.md) | ✓ | 32-bit FreeBSD [^x86_32-floats-return-ABI]
169169
`i686-unknown-linux-musl` | ✓ | 32-bit Linux with musl 1.2.3 [^x86_32-floats-return-ABI]
170170
[`i686-unknown-uefi`](platform-support/unknown-uefi.md) | ? | 32-bit UEFI
171171
[`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | LoongArch64 Bare-metal (LP64D ABI)
@@ -255,7 +255,7 @@ target | std | host | notes
255255
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
256256
[`aarch64-unknown-teeos`](platform-support/aarch64-unknown-teeos.md) | ? | | ARM64 TEEOS |
257257
[`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS |
258-
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
258+
[`aarch64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | ARM64 FreeBSD
259259
[`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit
260260
`aarch64-unknown-illumos` | ✓ | ✓ | ARM64 illumos
261261
`aarch64-unknown-linux-gnu_ilp32` | ✓ | ✓ | ARM64 Linux (ILP32 ABI)
@@ -273,13 +273,13 @@ target | std | host | notes
273273
`armv4t-unknown-linux-gnueabi` | ? | | Armv4T Linux
274274
[`armv5te-none-eabi`](platform-support/armv5te-none-eabi.md) | * | | Bare Armv5TE
275275
`armv5te-unknown-linux-uclibceabi` | ? | | Armv5TE Linux with uClibc
276-
`armv6-unknown-freebsd` | ✓ | ✓ | Armv6 FreeBSD
276+
[`armv6-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | Armv6 FreeBSD
277277
[`armv6-unknown-netbsd-eabihf`](platform-support/netbsd.md) | ✓ | ✓ | Armv6 NetBSD w/hard-float
278278
[`armv6k-nintendo-3ds`](platform-support/armv6k-nintendo-3ds.md) | ? | | Armv6k Nintendo 3DS, Horizon (Requires devkitARM toolchain)
279279
[`armv7-sony-vita-newlibeabihf`](platform-support/armv7-sony-vita-newlibeabihf.md) | ✓ | | Armv7-A Cortex-A9 Sony PlayStation Vita (requires VITASDK toolchain)
280280
[`armv7-unknown-linux-uclibceabi`](platform-support/armv7-unknown-linux-uclibceabi.md) | ✓ | ✓ | Armv7-A Linux with uClibc, softfloat
281281
[`armv7-unknown-linux-uclibceabihf`](platform-support/armv7-unknown-linux-uclibceabihf.md) | ✓ | ? | Armv7-A Linux with uClibc, hardfloat
282-
`armv7-unknown-freebsd` | ✓ | ✓ | Armv7-A FreeBSD
282+
[`armv7-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | Armv7-A FreeBSD
283283
[`armv7-unknown-netbsd-eabihf`](platform-support/netbsd.md) | ✓ | ✓ | Armv7-A NetBSD w/hard-float
284284
[`armv7-wrs-vxworks-eabihf`](platform-support/vxworks.md) | ? | | Armv7-A for VxWorks
285285
[`armv7a-kmc-solid_asp3-eabi`](platform-support/kmc-solid.md) | ✓ | | ARM SOLID with TOPPERS/ASP3
@@ -335,9 +335,9 @@ target | std | host | notes
335335
[`powerpc-unknown-openbsd`](platform-support/powerpc-unknown-openbsd.md) | * | |
336336
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ? | |
337337
[`powerpc-wrs-vxworks`](platform-support/vxworks.md) | ? | |
338-
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
339-
`powerpc64le-unknown-freebsd` | | | PPC64LE FreeBSD
340-
`powerpc-unknown-freebsd` | | | PowerPC FreeBSD
338+
[`powerpc64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
339+
[`powerpc64le-unknown-freebsd`](platform-support/freebsd.md) | | | PPC64LE FreeBSD
340+
[`powerpc-unknown-freebsd`](platform-support/freebsd.md) | | | PowerPC FreeBSD
341341
`powerpc64-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3
342342
`powerpc64-wrs-vxworks` | ? | |
343343
`powerpc64le-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3, Little Endian
@@ -352,7 +352,7 @@ target | std | host | notes
352352
[`riscv32imac-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
353353
[`riscv32imafc-esp-espidf`](platform-support/esp-idf.md) | ✓ | | RISC-V ESP-IDF
354354
[`riscv64gc-unknown-hermit`](platform-support/hermit.md) | ✓ | | RISC-V Hermit
355-
`riscv64gc-unknown-freebsd` | | | RISC-V FreeBSD
355+
[`riscv64gc-unknown-freebsd`](platform-support/freebsd.md) | | | RISC-V FreeBSD
356356
`riscv64gc-unknown-fuchsia` | | | RISC-V Fuchsia
357357
`riscv64gc-unknown-linux-musl` | | | RISC-V Linux (kernel 4.20, musl 1.2.3)
358358
[`riscv64gc-unknown-netbsd`](platform-support/netbsd.md) | ✓ | ✓ | RISC-V NetBSD
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `*-freebsd`
2+
3+
Support for the FreeBSD operation system.
4+
5+
**Tier: 2 with host tools**
6+
7+
- `x86_64-unknown-freebsd`
8+
9+
**Tier: 2**
10+
11+
- `i686-unknown-freebsd`
12+
13+
**Tier: 3**
14+
15+
- `aarch64-unknown-freebsd`
16+
- `armv6-unknown-freebsd`
17+
- `armv7-unknown-freebsd`
18+
- `powerpc64-unknown-freebsd`
19+
- `powerpc64le-unknown-freebsd`
20+
- `riscv64gc-unknown-freebsd`
21+
22+
## Target maintainers
23+
24+
- Alan Somers ([`@asomers`](https://github.com/asomers))
25+
26+
Fallback to [email protected]

0 commit comments

Comments
 (0)