Skip to content

Commit df0198d

Browse files
authored
Unrolled build for rust-lang#132150
Rollup merge of rust-lang#132150 - taiki-e:ppc64-freebsd-abi, r=pnkfelix Fix powerpc64 big-endian FreeBSD ABI Note that FreeBSD version bump may be reverted due to rust-lang#120869 (comment). We may want to wait to merge this until that discussion is complete. Fixes rust-lang#120869 (comment) > > PPC64 FreeBSD (ELFv1 and ELFv2, version 13.2) > > It seems odd that ELFv1 and 13.N coexist. > > https://www.freebsd.org/releases/13.0R/relnotes/ > > > powerpc64 switched to ELFv2 ABI at the same time it switched to LLVM. This brings us to a parity with modern Linux distributions. This also makes the binaries from previous FreeBSD versions incompatible with 13.0-RELEASE. Kernel still supports ELFv1, so jails and chroots using older FreeBSD versions are still compatible. [e4399d169acc](https://cgit.freebsd.org/src/commit/?id=e4399d169acc) > > Well, it is also odd that this target claims ELFv2 support since our ABI code does not use ELFv2 on this target. > > https://github.com/rust-lang/rust/blob/be01dabfefd2daa4574b974f571c7852085d60cb/compiler/rustc_target/src/callconv/powerpc64.rs#L102-L111 ````````@rustbot```````` label +O-PowerPC +O-freebsd
2 parents f5079d0 + 3a90c47 commit df0198d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

compiler/rustc_target/src/callconv/powerpc64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ where
9999
Ty: TyAbiInterface<'a, C> + Copy,
100100
C: HasDataLayout + HasTargetSpec,
101101
{
102-
let abi = if cx.target_spec().env == "musl" {
102+
let abi = if cx.target_spec().env == "musl" || cx.target_spec().os == "freebsd" {
103103
ELFv2
104104
} else if cx.target_spec().os == "aix" {
105105
AIX

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(crate) fn target() -> Target {
1111
Target {
1212
llvm_target: "powerpc64-unknown-freebsd".into(),
1313
metadata: crate::spec::TargetMetadata {
14-
description: Some("PPC64 FreeBSD (ELFv1 and ELFv2)".into()),
14+
description: Some("PPC64 FreeBSD (ELFv2)".into()),
1515
tier: Some(3),
1616
host_tools: Some(true),
1717
std: Some(true),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ target | std | host | notes
343343
[`powerpc-unknown-openbsd`](platform-support/powerpc-unknown-openbsd.md) | * | |
344344
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
345345
[`powerpc-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
346-
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv1 and ELFv2)
346+
`powerpc64-unknown-freebsd` | ✓ | ✓ | PPC64 FreeBSD (ELFv2)
347347
`powerpc64le-unknown-freebsd` | ✓ | ✓ | PPC64LE FreeBSD
348348
`powerpc-unknown-freebsd` | ? | | PowerPC FreeBSD
349349
`powerpc64-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3

0 commit comments

Comments
 (0)