authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-21 23:19:55+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-23 21:14:19+02:00
logd2d325a86211e70c3a1f5387e4c0c7995438e07c
tree4fca1a2d2c63686a984a8e014b61e53e6113b315
parent93311d6bca579be7201ab204c1100e1487e2cf8a
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux.AUDIT: Fix s390x; add loongarch64 and xtensa.


1 files changed, 5 insertions(+), 1 deletions(-)

lib/std/os/linux.zig+5-1
......@@ -7353,7 +7353,7 @@ pub const AUDIT = struct {
73537353 ARMEB = toAudit(.armeb),
73547354 CSKY = toAudit(.csky),
73557355 HEXAGON = @intFromEnum(std.elf.EM.HEXAGON),
7356 X86 = toAudit(.x86),
7356 LOONGARCH64 = toAudit(.loongarch64),
73577357 M68K = toAudit(.m68k),
73587358 MIPS = toAudit(.mips),
73597359 MIPSEL = toAudit(.mips) | LE,
......@@ -7367,18 +7367,22 @@ pub const AUDIT = struct {
73677367 S390X = toAudit(.s390x),
73687368 SPARC = toAudit(.sparc),
73697369 SPARC64 = toAudit(.sparc64),
7370 X86 = toAudit(.x86),
73707371 X86_64 = toAudit(.x86_64),
7372 XTENSA = toAudit(.xtensa),
73717373
73727374 fn toAudit(arch: std.Target.Cpu.Arch) u32 {
73737375 var res: u32 = @intFromEnum(arch.toElfMachine());
73747376 if (arch.endian() == .little) res |= LE;
73757377 switch (arch) {
73767378 .aarch64,
7379 .loongarch64,
73777380 .mips64,
73787381 .mips64el,
73797382 .powerpc64,
73807383 .powerpc64le,
73817384 .riscv64,
7385 .s390x,
73827386 .sparc64,
73837387 .x86_64,
73847388 => res |= @"64BIT",