commit d2d325a86211e70c3a1f5387e4c0c7995438e07c (tree)
parent 93311d6bca579be7201ab204c1100e1487e2cf8a
Author: Alex Rønne Petersen <alex@alexrp.com>
Date: Sun, 21 Jul 2024 23:19:55 +0200
std.os.linux.AUDIT: Fix s390x; add loongarch64 and xtensa.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig
@@ -7353,7 +7353,7 @@ pub const AUDIT = struct {
ARMEB = toAudit(.armeb),
CSKY = toAudit(.csky),
HEXAGON = @intFromEnum(std.elf.EM.HEXAGON),
- X86 = toAudit(.x86),
+ LOONGARCH64 = toAudit(.loongarch64),
M68K = toAudit(.m68k),
MIPS = toAudit(.mips),
MIPSEL = toAudit(.mips) | LE,
@@ -7367,18 +7367,22 @@ pub const AUDIT = struct {
S390X = toAudit(.s390x),
SPARC = toAudit(.sparc),
SPARC64 = toAudit(.sparc64),
+ X86 = toAudit(.x86),
X86_64 = toAudit(.x86_64),
+ XTENSA = toAudit(.xtensa),
fn toAudit(arch: std.Target.Cpu.Arch) u32 {
var res: u32 = @intFromEnum(arch.toElfMachine());
if (arch.endian() == .little) res |= LE;
switch (arch) {
.aarch64,
+ .loongarch64,
.mips64,
.mips64el,
.powerpc64,
.powerpc64le,
.riscv64,
+ .s390x,
.sparc64,
.x86_64,
=> res |= @"64BIT",