From 362a44a122d51096d301a9aeba86c8c7dbf40ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 19 Oct 2025 22:31:57 +0200 Subject: [PATCH] std.Target: better Abi.default() behavior for arc and xtensa --- lib/std/Target.zig | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 9638b1ddb0..7ad66e7590 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -825,13 +825,13 @@ pub const Abi = enum { // Soft float is usually a sane default for freestanding. .arm, .armeb, - .thumb, - .thumbeb, .csky, .mips, .mipsel, .powerpc, .powerpcle, + .thumb, + .thumbeb, => .eabi, else => .none, }, @@ -846,20 +846,28 @@ pub const Abi = enum { .linux => switch (arch) { .arm, .armeb, - .thumb, - .thumbeb, .powerpc, .powerpcle, + .thumb, + .thumbeb, => .musleabihf, - // Soft float tends to be more common for CSKY and MIPS. - .csky, - => .gnueabi, // No musl support. .mips, .mipsel, => .musleabi, .mips64, .mips64el, => .muslabi64, + + // No musl support. + .arc, + => .gnu, + .csky, + => .gnueabi, + + // No glibc or musl support. + .xtensa, + => .none, + else => .musl, }, .rtems => switch (arch) {