std.Target: better Abi.default() behavior for arc and xtensa

This commit is contained in:
Alex Rønne Petersen 2025-10-19 22:31:57 +02:00
parent e8d060e5f5
commit 362a44a122
No known key found for this signature in database

View file

@ -825,13 +825,13 @@ pub const Abi = enum {
// Soft float is usually a sane default for freestanding. // Soft float is usually a sane default for freestanding.
.arm, .arm,
.armeb, .armeb,
.thumb,
.thumbeb,
.csky, .csky,
.mips, .mips,
.mipsel, .mipsel,
.powerpc, .powerpc,
.powerpcle, .powerpcle,
.thumb,
.thumbeb,
=> .eabi, => .eabi,
else => .none, else => .none,
}, },
@ -846,20 +846,28 @@ pub const Abi = enum {
.linux => switch (arch) { .linux => switch (arch) {
.arm, .arm,
.armeb, .armeb,
.thumb,
.thumbeb,
.powerpc, .powerpc,
.powerpcle, .powerpcle,
.thumb,
.thumbeb,
=> .musleabihf, => .musleabihf,
// Soft float tends to be more common for CSKY and MIPS.
.csky,
=> .gnueabi, // No musl support.
.mips, .mips,
.mipsel, .mipsel,
=> .musleabi, => .musleabi,
.mips64, .mips64,
.mips64el, .mips64el,
=> .muslabi64, => .muslabi64,
// No musl support.
.arc,
=> .gnu,
.csky,
=> .gnueabi,
// No glibc or musl support.
.xtensa,
=> .none,
else => .musl, else => .musl,
}, },
.rtems => switch (arch) { .rtems => switch (arch) {