authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 14:59:18+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-12 14:59:18+02:00
logfaf8bbf5b184d2593d6b3a979c9d42921cd716c0
tree0f72593a26cb7a72c576b22e643ce880a0b43742
parent963d4466d506d2441e07084ff87b82c4637bba8e
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: add standard dynamic linker paths for managarm


1 files changed, 10 insertions(+), 4 deletions(-)

lib/std/Target.zig+10-4
...@@ -2450,6 +2450,7 @@ pub const DynamicLinker = struct {...@@ -2450,6 +2450,7 @@ pub const DynamicLinker = struct {
2450 pub fn kind(os: Os.Tag) Kind {2450 pub fn kind(os: Os.Tag) Kind {
2451 return switch (os) {2451 return switch (os) {
2452 .fuchsia,2452 .fuchsia,
2453 .managarm,
24532454
2454 .haiku,2455 .haiku,
2455 .illumos,2456 .illumos,
...@@ -2468,14 +2469,14 @@ pub const DynamicLinker = struct {...@@ -2468,14 +2469,14 @@ pub const DynamicLinker = struct {
2468 .visionos,2469 .visionos,
2469 .watchos,2470 .watchos,
2470 => .arch_os,2471 => .arch_os,
2472
2471 .hurd,2473 .hurd,
2472 .linux,2474 .linux,
2473 => .arch_os_abi,2475 => .arch_os_abi,
2476
2474 .freestanding,2477 .freestanding,
2475 .other,2478 .other,
24762479
2477 .managarm, // Needs to be double-checked.
2478
2479 .plan9,2480 .plan9,
2480 .rtems,2481 .rtems,
24812482
...@@ -2536,6 +2537,13 @@ pub const DynamicLinker = struct {...@@ -2536,6 +2537,13 @@ pub const DynamicLinker = struct {
2536 else => none,2537 else => none,
2537 },2538 },
25382539
2540 .managarm => switch (cpu.arch) {
2541 .aarch64 => init("/lib/aarch64-managarm-mlibc-ld.so"),
2542 .riscv64 => init("/lib/riscv64-managarm-mlibc-ld.so"),
2543 .x86_64 => init("/lib/x86_64-managarm-mlibc-ld.so"),
2544 else => none,
2545 },
2546
2539 .haiku => switch (cpu.arch) {2547 .haiku => switch (cpu.arch) {
2540 .arm,2548 .arm,
2541 .aarch64,2549 .aarch64,
...@@ -2939,8 +2947,6 @@ pub const DynamicLinker = struct {...@@ -2939,8 +2947,6 @@ pub const DynamicLinker = struct {
29392947
2940 // TODO go over each item in this list and either move it to the above list, or2948 // TODO go over each item in this list and either move it to the above list, or
2941 // implement the standard dynamic linker path code for it.2949 // implement the standard dynamic linker path code for it.
2942 .managarm,
2943
2944 .ps3,2950 .ps3,
2945 .ps4,2951 .ps4,
2946 .ps5,2952 .ps5,