| ... | ... | @@ -88,6 +88,7 @@ pub const NativePaths = struct { |
| 88 | 88 | |
| 89 | 89 | if (!is_windows) { |
| 90 | 90 | const triple = try Target.current.linuxTriple(allocator); |
| 91 | const qual = Target.current.cpu.arch.ptrBitWidth(); |
| 91 | 92 | |
| 92 | 93 | // TODO: $ ld --verbose | grep SEARCH_DIR |
| 93 | 94 | // the output contains some paths that end with lib64, maybe include them too? |
| ... | ... | @@ -95,17 +96,17 @@ pub const NativePaths = struct { |
| 95 | 96 | // TODO: some of these are suspect and should only be added on some systems. audit needed. |
| 96 | 97 | |
| 97 | 98 | try self.addIncludeDir("/usr/local/include"); |
| 99 | try self.addLibDirFmt("/usr/local/lib{}", .{qual}); |
| 98 | 100 | try self.addLibDir("/usr/local/lib"); |
| 99 | | try self.addLibDir("/usr/local/lib64"); |
| 100 | 101 | |
| 101 | 102 | try self.addIncludeDirFmt("/usr/include/{}", .{triple}); |
| 102 | 103 | try self.addLibDirFmt("/usr/lib/{}", .{triple}); |
| 103 | 104 | |
| 104 | 105 | try self.addIncludeDir("/usr/include"); |
| 106 | try self.addLibDirFmt("/lib{}", .{qual}); |
| 105 | 107 | try self.addLibDir("/lib"); |
| 106 | | try self.addLibDir("/lib64"); |
| 108 | try self.addLibDirFmt("/usr/lib{}", .{qual}); |
| 107 | 109 | try self.addLibDir("/usr/lib"); |
| 108 | | try self.addLibDir("/usr/lib64"); |
| 109 | 110 | |
| 110 | 111 | // example: on a 64-bit debian-based linux distro, with zlib installed from apt: |
| 111 | 112 | // zlib.h is in /usr/include (added above) |