mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
compiler: Define __NetBSD_Version__ when targeting NetBSD libc.
This commit is contained in:
parent
c36d483ba0
commit
e20fb7071c
@ -5921,6 +5921,14 @@ pub fn addCCArgs(
|
||||
// symbols would be inconsistent with header declarations.
|
||||
min_ver.major * 100_000,
|
||||
}));
|
||||
} else if (target.isNetBSDLibC()) {
|
||||
const min_ver = target.os.version_range.semver.min;
|
||||
try argv.append(try std.fmt.allocPrint(arena, "-D__NetBSD_Version__={d}", .{
|
||||
// We don't currently respect the patch component. This wouldn't be particularly helpful because
|
||||
// our abilists file only tracks major and minor NetBSD releases, so the link-time stub symbols
|
||||
// would be inconsistent with header declarations.
|
||||
(min_ver.major * 100_000_000) + (min_ver.minor * 1_000_000),
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user