Commit fcbb192b49

Alex Rønne Petersen <alex@alexrp.com>
2024-07-21 22:54:39
std.os.linux: Define (MIN)SIGSTKSZ for all supported Linux architectures.
1 parent b21de4d
Changed files (1)
lib
std
lib/std/os/linux.zig
@@ -4787,13 +4787,72 @@ pub fn CPU_COUNT(set: cpu_set_t) cpu_count_t {
 }
 
 pub const MINSIGSTKSZ = switch (native_arch) {
-    .x86, .x86_64, .arm, .mipsel => 2048,
-    .aarch64 => 5120,
+    .arc,
+    .arm,
+    .armeb,
+    .csky,
+    .hexagon,
+    .m68k,
+    .mips,
+    .mipsel,
+    .mips64,
+    .mips64el,
+    .powerpc,
+    .powerpcle,
+    .riscv32,
+    .riscv64,
+    .s390x,
+    .thumb,
+    .thumbeb,
+    .x86,
+    .x86_64,
+    .xtensa,
+    => 2048,
+    .loongarch64,
+    .sparc,
+    .sparcel,
+    .sparc64,
+    => 4096,
+    .aarch64,
+    .aarch64_be,
+    => 5120,
+    .powerpc64,
+    .powerpc64le,
+    => 8192,
     else => @compileError("MINSIGSTKSZ not defined for this architecture"),
 };
 pub const SIGSTKSZ = switch (native_arch) {
-    .x86, .x86_64, .arm, .mipsel => 8192,
-    .aarch64 => 16384,
+    .arc,
+    .arm,
+    .armeb,
+    .csky,
+    .hexagon,
+    .m68k,
+    .mips,
+    .mipsel,
+    .mips64,
+    .mips64el,
+    .powerpc,
+    .powerpcle,
+    .riscv32,
+    .riscv64,
+    .s390x,
+    .thumb,
+    .thumbeb,
+    .x86,
+    .x86_64,
+    .xtensa,
+    => 8192,
+    .aarch64,
+    .aarch64_be,
+    .loongarch64,
+    .sparc,
+    .sparcel,
+    .sparc64,
+    => 16384,
+    .powerpc64,
+    .powerpc64le,
+    => 32768,
     else => @compileError("SIGSTKSZ not defined for this architecture"),
 };