Merge pull request #22713 from mikdusan/openbsd

openbsd: fix stage3 link
This commit is contained in:
Alex Rønne Petersen 2025-02-03 17:34:55 +01:00 committed by GitHub
commit e61acd8eb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 21 deletions

View file

@ -791,24 +791,19 @@ fn addCmakeCfgOptionsToExe(
if (target.abi != .msvc) mod.link_libcpp = true;
},
.freebsd => {
if (static) {
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{lib_suffix}), null, need_cpp_includes);
try addCxxKnownPath(b, cfg, exe, b.fmt("libgcc_eh.{s}", .{lib_suffix}), null, need_cpp_includes);
} else {
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{lib_suffix}), null, need_cpp_includes);
}
if (static) try addCxxKnownPath(b, cfg, exe, b.fmt("libgcc_eh.{s}", .{lib_suffix}), null, need_cpp_includes);
},
.openbsd => {
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{lib_suffix}), null, need_cpp_includes);
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++abi.{s}", .{lib_suffix}), null, need_cpp_includes);
// - llvm requires libexecinfo which has conflicting symbols with libc++abi
// - only an issue with .a linking
// - workaround is to link c++abi dynamically
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++.{s}", .{target.dynamicLibSuffix()[1..]}), null, need_cpp_includes);
try addCxxKnownPath(b, cfg, exe, b.fmt("libc++abi.{s}", .{target.dynamicLibSuffix()[1..]}), null, need_cpp_includes);
},
.netbsd, .dragonfly => {
if (static) {
try addCxxKnownPath(b, cfg, exe, b.fmt("libstdc++.{s}", .{lib_suffix}), null, need_cpp_includes);
try addCxxKnownPath(b, cfg, exe, b.fmt("libgcc_eh.{s}", .{lib_suffix}), null, need_cpp_includes);
} else {
try addCxxKnownPath(b, cfg, exe, b.fmt("libstdc++.{s}", .{lib_suffix}), null, need_cpp_includes);
}
if (static) try addCxxKnownPath(b, cfg, exe, b.fmt("libgcc_eh.{s}", .{lib_suffix}), null, need_cpp_includes);
},
.solaris, .illumos => {
try addCxxKnownPath(b, cfg, exe, b.fmt("libstdc++.{s}", .{lib_suffix}), null, need_cpp_includes);

View file

@ -528,13 +528,13 @@ pub const Os = struct {
.freebsd => .{
.semver = .{
.min = .{ .major = 12, .minor = 0, .patch = 0 },
.max = .{ .major = 14, .minor = 1, .patch = 0 },
.max = .{ .major = 14, .minor = 2, .patch = 0 },
},
},
.netbsd => .{
.semver = .{
.min = .{ .major = 8, .minor = 0, .patch = 0 },
.max = .{ .major = 10, .minor = 0, .patch = 0 },
.max = .{ .major = 10, .minor = 1, .patch = 0 },
},
},
.openbsd => .{
@ -553,31 +553,31 @@ pub const Os = struct {
.macos => .{
.semver = .{
.min = .{ .major = 13, .minor = 0, .patch = 0 },
.max = .{ .major = 15, .minor = 2, .patch = 0 },
.max = .{ .major = 15, .minor = 3, .patch = 0 },
},
},
.ios => .{
.semver = .{
.min = .{ .major = 12, .minor = 0, .patch = 0 },
.max = .{ .major = 18, .minor = 1, .patch = 0 },
.max = .{ .major = 18, .minor = 3, .patch = 0 },
},
},
.tvos => .{
.semver = .{
.min = .{ .major = 13, .minor = 0, .patch = 0 },
.max = .{ .major = 18, .minor = 1, .patch = 0 },
.max = .{ .major = 18, .minor = 3, .patch = 0 },
},
},
.visionos => .{
.semver = .{
.min = .{ .major = 1, .minor = 0, .patch = 0 },
.max = .{ .major = 2, .minor = 1, .patch = 0 },
.max = .{ .major = 2, .minor = 3, .patch = 0 },
},
},
.watchos => .{
.semver = .{
.min = .{ .major = 6, .minor = 0, .patch = 0 },
.max = .{ .major = 11, .minor = 1, .patch = 0 },
.max = .{ .major = 11, .minor = 3, .patch = 0 },
},
},