| ... | ... | @@ -700,9 +700,7 @@ pub const Abi = enum { |
| 700 | 700 | |
| 701 | 701 | pub fn default(arch: Cpu.Arch, os: Os) Abi { |
| 702 | 702 | return if (arch.isWasm()) .musl else switch (os.tag) { |
| 703 | | .freestanding, |
| 704 | | .other, |
| 705 | | => switch (arch) { |
| 703 | .freestanding, .other => switch (arch) { |
| 706 | 704 | // Soft float is usually a sane default for freestanding. |
| 707 | 705 | .arm, |
| 708 | 706 | .armeb, |
| ... | ... | @@ -716,14 +714,32 @@ pub const Abi = enum { |
| 716 | 714 | => .eabi, |
| 717 | 715 | else => .none, |
| 718 | 716 | }, |
| 719 | | .aix, |
| 720 | | => if (arch == .powerpc) .eabihf else .none, |
| 721 | | .linux, |
| 722 | | .wasi, |
| 723 | | .emscripten, |
| 724 | | => .musl, |
| 725 | | .rtems, |
| 726 | | => switch (arch) { |
| 717 | .aix => if (arch == .powerpc) .eabihf else .none, |
| 718 | .haiku => switch (arch) { |
| 719 | .arm, |
| 720 | .thumb, |
| 721 | .powerpc, |
| 722 | => .eabihf, |
| 723 | else => .none, |
| 724 | }, |
| 725 | .hurd => .gnu, |
| 726 | .linux => switch (arch) { |
| 727 | .arm, |
| 728 | .armeb, |
| 729 | .thumb, |
| 730 | .thumbeb, |
| 731 | .powerpc, |
| 732 | .powerpcle, |
| 733 | => .musleabihf, |
| 734 | // Soft float tends to be more common for CSKY and MIPS. |
| 735 | .csky, |
| 736 | => .gnueabi, // No musl support. |
| 737 | .mips, |
| 738 | .mipsel, |
| 739 | => .musleabi, |
| 740 | else => .musl, |
| 741 | }, |
| 742 | .rtems => switch (arch) { |
| 727 | 743 | .arm, |
| 728 | 744 | .armeb, |
| 729 | 745 | .thumb, |
| ... | ... | @@ -735,37 +751,33 @@ pub const Abi = enum { |
| 735 | 751 | => .eabihf, |
| 736 | 752 | else => .none, |
| 737 | 753 | }, |
| 738 | | .hurd, |
| 739 | | .windows, |
| 740 | | => .gnu, |
| 741 | | .freebsd, |
| 742 | | => switch (arch) { |
| 754 | .freebsd => switch (arch) { |
| 743 | 755 | .arm, |
| 744 | 756 | .armeb, |
| 745 | 757 | .thumb, |
| 746 | 758 | .thumbeb, |
| 747 | 759 | .powerpc, |
| 748 | 760 | => .eabihf, |
| 761 | // Soft float tends to be more common for MIPS. |
| 749 | 762 | .mips, |
| 750 | 763 | .mipsel, |
| 751 | 764 | => .eabi, |
| 752 | 765 | else => .none, |
| 753 | 766 | }, |
| 754 | | .netbsd, |
| 755 | | => switch (arch) { |
| 767 | .netbsd => switch (arch) { |
| 756 | 768 | .arm, |
| 757 | 769 | .armeb, |
| 758 | 770 | .thumb, |
| 759 | 771 | .thumbeb, |
| 760 | 772 | .powerpc, |
| 761 | 773 | => .eabihf, |
| 774 | // Soft float tends to be more common for MIPS. |
| 762 | 775 | .mips, |
| 763 | 776 | .mipsel, |
| 764 | 777 | => .eabi, |
| 765 | 778 | else => .none, |
| 766 | 779 | }, |
| 767 | | .openbsd, |
| 768 | | => switch (arch) { |
| 780 | .openbsd => switch (arch) { |
| 769 | 781 | .arm, |
| 770 | 782 | .thumb, |
| 771 | 783 | => .eabi, |
| ... | ... | @@ -773,18 +785,16 @@ pub const Abi = enum { |
| 773 | 785 | => .eabihf, |
| 774 | 786 | else => .none, |
| 775 | 787 | }, |
| 776 | | .ios, |
| 777 | | => if (arch == .x86_64) .macabi else .none, |
| 778 | | .tvos, |
| 779 | | .visionos, |
| 780 | | => if (arch == .x86_64) .simulator else .none, |
| 781 | | .uefi, |
| 782 | | => .msvc, |
| 788 | .ios => if (arch == .x86_64) .macabi else .none, |
| 789 | .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none, |
| 790 | .windows => .gnu, |
| 791 | .uefi => .msvc, |
| 792 | .wasi, .emscripten => .musl, |
| 793 | |
| 783 | 794 | .contiki, |
| 784 | 795 | .elfiamcu, |
| 785 | 796 | .fuchsia, |
| 786 | 797 | .hermit, |
| 787 | | .haiku, |
| 788 | 798 | .plan9, |
| 789 | 799 | .serenity, |
| 790 | 800 | .zos, |
| ... | ... | @@ -792,7 +802,6 @@ pub const Abi = enum { |
| 792 | 802 | .bridgeos, |
| 793 | 803 | .driverkit, |
| 794 | 804 | .macos, |
| 795 | | .watchos, |
| 796 | 805 | .illumos, |
| 797 | 806 | .solaris, |
| 798 | 807 | .ps3, |