Skip to content

Commit 72fd965

Browse files
authored
Fix target parsing for powerpc (#1490)
* Fix target parsing for powerpc Fix https://github.com/rust-lang/cc-rs/actions/runs/16040831581/job/45261866398#step:6:56 * Fix parser.rs * Fix fmt in parser.rs
1 parent 8f0143a commit 72fd965

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/target/parser.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,21 @@ impl<'a> TargetInfo<'a> {
402402
if vendor == "uwp" {
403403
abi = "uwp";
404404
}
405+
if ["powerpc64-unknown-linux-gnu", "powerpc64-wrs-vxworks"].contains(&target) {
406+
abi = "elfv1";
407+
}
408+
if [
409+
"powerpc64-unknown-freebsd",
410+
"powerpc64-unknown-linux-musl",
411+
"powerpc64-unknown-openbsd",
412+
"powerpc64le-unknown-freebsd",
413+
"powerpc64le-unknown-linux-gnu",
414+
"powerpc64le-unknown-linux-musl",
415+
]
416+
.contains(&target)
417+
{
418+
abi = "elfv2";
419+
}
405420

406421
Ok(Self {
407422
full_arch,

0 commit comments

Comments
 (0)