authorgravatar for ryan@zinascii.comRyan Zezeski <ryan@zinascii.com> 2023-09-26 16:02:04-06:00
committergravatar for ryan@zinascii.comRyan Zezeski <ryan@zinascii.com> 2023-09-30 11:38:56-06:00
loga0ed2c69b06a55d86b9ca98314f31bd70058e3f8
tree669c64db4e0765091b6ec5ee75ae0832b872e47b
parentb447441a916f8d64f560994504de3552707b32be

solaris: hard-code native libc paths

On illumos (and Solaris) there is, by design, only one libc.

1 files changed, 6 insertions(+), 1 deletions(-)

src/libc_installation.zig+6-1
......@@ -213,11 +213,16 @@ pub const LibCInstallation = struct {
213213 try self.findNativeIncludeDirPosix(args);
214214 try self.findNativeCrtBeginDirHaiku(args);
215215 self.crt_dir = try args.allocator.dupeZ(u8, "/system/develop/lib");
216 } else if (builtin.target.os.tag == .solaris) {
217 // There is only one libc in illumos, and its headers and
218 // libraries are always in the same spot.
219 self.include_dir = try args.allocator.dupeZ(u8, "/usr/include");
220 self.sys_include_dir = try args.allocator.dupeZ(u8, "/usr/include");
221 self.crt_dir = try args.allocator.dupeZ(u8, "/usr/lib/64");
216222 } else if (std.process.can_spawn) {
217223 try self.findNativeIncludeDirPosix(args);
218224 switch (builtin.target.os.tag) {
219225 .freebsd, .netbsd, .openbsd, .dragonfly => self.crt_dir = try args.allocator.dupeZ(u8, "/usr/lib"),
220 .solaris => self.crt_dir = try args.allocator.dupeZ(u8, "/usr/lib/64"),
221226 .linux => try self.findNativeCrtDirPosix(args),
222227 else => {},
223228 }