authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-19 22:31:57+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-10-22 17:28:19+02:00
log362a44a122d51096d301a9aeba86c8c7dbf40ed6
treed3d2ad19e820d8608181777cff9ab78df9afc1da
parente8d060e5f5b7a51cec101c4f36edc48f28510d14
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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


1 files changed, 15 insertions(+), 7 deletions(-)

lib/std/Target.zig+15-7
......@@ -825,13 +825,13 @@ pub const Abi = enum {
825825 // Soft float is usually a sane default for freestanding.
826826 .arm,
827827 .armeb,
828 .thumb,
829 .thumbeb,
830828 .csky,
831829 .mips,
832830 .mipsel,
833831 .powerpc,
834832 .powerpcle,
833 .thumb,
834 .thumbeb,
835835 => .eabi,
836836 else => .none,
837837 },
......@@ -846,20 +846,28 @@ pub const Abi = enum {
846846 .linux => switch (arch) {
847847 .arm,
848848 .armeb,
849 .thumb,
850 .thumbeb,
851849 .powerpc,
852850 .powerpcle,
851 .thumb,
852 .thumbeb,
853853 => .musleabihf,
854 // Soft float tends to be more common for CSKY and MIPS.
855 .csky,
856 => .gnueabi, // No musl support.
857854 .mips,
858855 .mipsel,
859856 => .musleabi,
860857 .mips64,
861858 .mips64el,
862859 => .muslabi64,
860
861 // No musl support.
862 .arc,
863 => .gnu,
864 .csky,
865 => .gnueabi,
866
867 // No glibc or musl support.
868 .xtensa,
869 => .none,
870
863871 else => .musl,
864872 },
865873 .rtems => switch (arch) {