| ... | @@ -64,6 +64,14 @@ pub fn build(b: &Builder) !void { | ... | @@ -64,6 +64,14 @@ pub fn build(b: &Builder) !void { |
| 64 | if (exe.target.getOs() == builtin.Os.linux) { | 64 | if (exe.target.getOs() == builtin.Os.linux) { |
| 65 | const libstdcxx_path_padded = try b.exec([][]const u8{cxx_compiler, "-print-file-name=libstdc++.a"}); | 65 | const libstdcxx_path_padded = try b.exec([][]const u8{cxx_compiler, "-print-file-name=libstdc++.a"}); |
| 66 | const libstdcxx_path = ??mem.split(libstdcxx_path_padded, "\r\n").next(); | 66 | const libstdcxx_path = ??mem.split(libstdcxx_path_padded, "\r\n").next(); |
| | 67 | if (mem.eql(u8, libstdcxx_path, "libstdc++.a")) { |
| | 68 | warn( |
| | 69 | \\Unable to determine path to libstdc++.a |
| | 70 | \\On Fedora, install libstdc++-static and try again. |
| | 71 | \\ |
| | 72 | ); |
| | 73 | return error.RequiredLibraryNotFound; |
| | 74 | } |
| 67 | exe.addObjectFile(libstdcxx_path); | 75 | exe.addObjectFile(libstdcxx_path); |
| 68 | | 76 | |
| 69 | exe.linkSystemLibrary("pthread"); | 77 | exe.linkSystemLibrary("pthread"); |