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 {...@@ -825,13 +825,13 @@ pub const Abi = enum {
825 // Soft float is usually a sane default for freestanding.825 // Soft float is usually a sane default for freestanding.
826 .arm,826 .arm,
827 .armeb,827 .armeb,
828 .thumb,
829 .thumbeb,
830 .csky,828 .csky,
831 .mips,829 .mips,
832 .mipsel,830 .mipsel,
833 .powerpc,831 .powerpc,
834 .powerpcle,832 .powerpcle,
833 .thumb,
834 .thumbeb,
835 => .eabi,835 => .eabi,
836 else => .none,836 else => .none,
837 },837 },
...@@ -846,20 +846,28 @@ pub const Abi = enum {...@@ -846,20 +846,28 @@ pub const Abi = enum {
846 .linux => switch (arch) {846 .linux => switch (arch) {
847 .arm,847 .arm,
848 .armeb,848 .armeb,
849 .thumb,
850 .thumbeb,
851 .powerpc,849 .powerpc,
852 .powerpcle,850 .powerpcle,
851 .thumb,
852 .thumbeb,
853 => .musleabihf,853 => .musleabihf,
854 // Soft float tends to be more common for CSKY and MIPS.
855 .csky,
856 => .gnueabi, // No musl support.
857 .mips,854 .mips,
858 .mipsel,855 .mipsel,
859 => .musleabi,856 => .musleabi,
860 .mips64,857 .mips64,
861 .mips64el,858 .mips64el,
862 => .muslabi64,859 => .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
863 else => .musl,871 else => .musl,
864 },872 },
865 .rtems => switch (arch) {873 .rtems => switch (arch) {