Skip to content

Commit

Permalink
Zig update: x32 and n32 abi support
Browse files Browse the repository at this point in the history
  • Loading branch information
ehaas committed Nov 4, 2024
1 parent 6393e7a commit 6cf7a73
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/aro/target.zig
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,18 @@ pub fn ldEmulationOption(target: std.Target, arm_endianness: ?std.builtin.Endian
.loongarch64 => "elf64loongarch",
.mips => "elf32btsmip",
.mipsel => "elf32ltsmip",
.mips64 => if (target.abi == .gnuabin32) "elf32btsmipn32" else "elf64btsmip",
.mips64el => if (target.abi == .gnuabin32) "elf32ltsmipn32" else "elf64ltsmip",
.x86_64 => if (target.abi == .gnux32 or target.abi == .muslx32) "elf32_x86_64" else "elf_x86_64",
.mips64 => switch (target.abi) {
.gnuabin32, .muslabin32 => "elf32btsmipn32",
else => "elf64btsmip",
},
.mips64el => switch (target.abi) {
.gnuabin32, .muslabin32 => "elf32ltsmipn32",
else => "elf64ltsmip",
},
.x86_64 => switch (target.abi) {
.gnux32, .muslx32 => "elf32_x86_64",
else => "elf_x86_64",
},
.ve => "elf64ve",
.csky => "cskyelf_linux",
else => null,
Expand Down Expand Up @@ -696,13 +705,15 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
.gnuf32 => "gnuf32",
.gnusf => "gnusf",
.gnux32 => "gnux32",
.gnuilp32 => "gnuilp32",
.gnuilp32 => "gnu_ilp32",
.code16 => "code16",
.eabi => "eabi",
.eabihf => "eabihf",
.android => "android",
.androideabi => "androideabi",
.musl => "musl",
.muslabin32 => "muslabin32",
.muslabi64 => "muslabi64",
.musleabi => "musleabi",
.musleabihf => "musleabihf",
.muslx32 => "muslx32",
Expand Down

0 comments on commit 6cf7a73

Please sign in to comment.