| author | |
| committer | |
| log | 54ad5f31c6efd150406111620a14e56cf1bae1cd |
| tree | 73473a485a263137e6fdef81bbdfd9dadefcbf40 |
| parent | 68bcd7ddd44422b228852cd36158048becfbeea8 |
Solaris/illumos is multi-lib, so you can't rely on an arbitrary
executable to give you the correct dynamic linker. Besides, it's
always the same path.2 files changed, 5 insertions(+), 3 deletions(-)
lib/std/target.zig+2-2| ... | ... | @@ -526,7 +526,6 @@ pub const Target = struct { |
| 526 | 526 | .cloudabi, |
| 527 | 527 | .dragonfly, |
| 528 | 528 | .lv2, |
| 529 | .solaris, | |
| 530 | 529 | .zos, |
| 531 | 530 | .minix, |
| 532 | 531 | .rtems, |
| ... | ... | @@ -569,6 +568,7 @@ pub const Target = struct { |
| 569 | 568 | .driverkit, |
| 570 | 569 | .shadermodel, |
| 571 | 570 | .liteos, // TODO: audit this |
| 571 | .solaris, | |
| 572 | 572 | => return .none, |
| 573 | 573 | } |
| 574 | 574 | } |
| ... | ... | @@ -1575,7 +1575,7 @@ pub const Target = struct { |
| 1575 | 1575 | .netbsd => return copy(&result, "/libexec/ld.elf_so"), |
| 1576 | 1576 | .openbsd => return copy(&result, "/usr/libexec/ld.so"), |
| 1577 | 1577 | .dragonfly => return copy(&result, "/libexec/ld-elf.so.2"), |
| 1578 | .solaris => return copy(&result, "/lib/64/ld.so.1"), | |
| 1578 | .solaris => return copy(&result, "/usr/lib/amd64/ld.so.1"), | |
| 1579 | 1579 | .linux => switch (self.cpu.arch) { |
| 1580 | 1580 | .x86, |
| 1581 | 1581 | .sparc, |
lib/std/zig/system/NativeTargetInfo.zig+3-1| ... | ... | @@ -257,10 +257,12 @@ fn detectAbiAndDynamicLinker( |
| 257 | 257 | ) DetectError!NativeTargetInfo { |
| 258 | 258 | const native_target_has_ld = comptime builtin.target.hasDynamicLinker(); |
| 259 | 259 | const is_linux = builtin.target.os.tag == .linux; |
| 260 | const is_solaris = builtin.target.os.tag == .solaris; | |
| 260 | 261 | const have_all_info = cross_target.dynamic_linker.get() != null and |
| 261 | 262 | cross_target.abi != null and (!is_linux or cross_target.abi.?.isGnu()); |
| 262 | 263 | const os_is_non_native = cross_target.os_tag != null; |
| 263 | if (!native_target_has_ld or have_all_info or os_is_non_native) { | |
| 264 | // The Solaris/illumos environment is always the same. | |
| 265 | if (!native_target_has_ld or have_all_info or os_is_non_native or is_solaris) { | |
| 264 | 266 | return defaultAbiAndDynamicLinker(cpu, os, cross_target); |
| 265 | 267 | } |
| 266 | 268 | if (cross_target.abi) |abi| { |