From 190d52390ea72da81ea01048a6b87cf6c2fe082e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 17 Oct 2026 03:32:57 +0200 Subject: [PATCH] std.Target: define standard dynamic linker path for ps4 and ps5 contributes to https://codeberg.org/ziglang/zig/issues/31341 --- lib/std/Target.zig | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index dca39298fb1e21c6debfba7257e08bf5311fd7cc..39e435356acf872cd82b88bbed629773aef43a30 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -2485,6 +2485,9 @@ pub const DynamicLinker = struct { .tvos, .visionos, .watchos, + + .ps4, + .ps5, => .arch_os, .hurd, @@ -2508,6 +2511,11 @@ pub const DynamicLinker = struct { .@"switch", .gba, + .psx, + .ps3, + .psp, + .vita, + .emscripten, .wasi, @@ -2520,13 +2528,6 @@ pub const DynamicLinker = struct { .opengl, .vulkan, - .psx, - .ps3, - .ps4, - .ps5, - .psp, - .vita, - .tios, .ashetos, => .none, @@ -2926,8 +2927,10 @@ pub const DynamicLinker = struct { else => none, }, - // Operating systems in this list have been verified as not having a standard - // dynamic linker path. + .ps4, + .ps5, + => if (cpu.arch == .x86_64) init("/libexec/ld-elf.so.1") else none, + .freestanding, .other, @@ -2965,12 +2968,6 @@ pub const DynamicLinker = struct { .tios, .ashetos, => none, - - // TODO go over each item in this list and either move it to the above list, or - // implement the standard dynamic linker path code for it. - .ps4, - .ps5, - => none, } catch unreachable; } }; -- 2.54.0