| ... | @@ -631,14 +631,6 @@ pub fn isDynamicAMDGCNFeature(target: *const std.Target, feature: std.Target.Cpu | ... | @@ -631,14 +631,6 @@ pub fn isDynamicAMDGCNFeature(target: *const std.Target, feature: std.Target.Cpu |
| 631 | } | 631 | } |
| 632 | | 632 | |
| 633 | pub fn llvmMachineAbi(target: *const std.Target) ?[:0]const u8 { | 633 | pub fn llvmMachineAbi(target: *const std.Target) ?[:0]const u8 { |
| 634 | // LLD does not support ELFv1. Rather than having LLVM produce ELFv1 code and then linking it | | |
| 635 | // into a broken ELFv2 binary, just force LLVM to use ELFv2 as well. This will break when glibc | | |
| 636 | // is linked as glibc only supports ELFv2 for little endian, but there's nothing we can do about | | |
| 637 | // that. With this hack, `powerpc64-linux-none` will at least work. | | |
| 638 | // | | |
| 639 | // Once our self-hosted linker can handle both ABIs, this hack should go away. | | |
| 640 | if (target.cpu.arch == .powerpc64) return "elfv2"; | | |
| 641 | | | |
| 642 | return switch (target.cpu.arch) { | 634 | return switch (target.cpu.arch) { |
| 643 | .arm, .armeb, .thumb, .thumbeb => "aapcs", | 635 | .arm, .armeb, .thumb, .thumbeb => "aapcs", |
| 644 | .loongarch64 => switch (target.abi) { | 636 | .loongarch64 => switch (target.abi) { |
| ... | @@ -656,15 +648,7 @@ pub fn llvmMachineAbi(target: *const std.Target) ?[:0]const u8 { | ... | @@ -656,15 +648,7 @@ pub fn llvmMachineAbi(target: *const std.Target) ?[:0]const u8 { |
| 656 | .gnuabin32, .muslabin32 => "n32", | 648 | .gnuabin32, .muslabin32 => "n32", |
| 657 | else => "n64", | 649 | else => "n64", |
| 658 | }, | 650 | }, |
| 659 | .powerpc64 => switch (target.os.tag) { | 651 | .powerpc64, .powerpc64le => "elfv2", // We do not support ELFv1. |
| 660 | .freebsd => if (target.os.version_range.semver.isAtLeast(.{ .major = 13, .minor = 0, .patch = 0 }) orelse false) | | |
| 661 | "elfv2" | | |
| 662 | else | | |
| 663 | "elfv1", | | |
| 664 | .openbsd => "elfv2", | | |
| 665 | else => if (target.abi.isMusl()) "elfv2" else "elfv1", | | |
| 666 | }, | | |
| 667 | .powerpc64le => "elfv2", | | |
| 668 | .riscv64, .riscv64be => if (target.cpu.has(.riscv, .e)) | 652 | .riscv64, .riscv64be => if (target.cpu.has(.riscv, .e)) |
| 669 | "lp64e" | 653 | "lp64e" |
| 670 | else if (target.cpu.has(.riscv, .d)) | 654 | else if (target.cpu.has(.riscv, .d)) |