| ... | @@ -362,7 +362,8 @@ pub fn resolve(options: Options) ResolveError!Config { | ... | @@ -362,7 +362,8 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 362 | if (explicitly_exe_or_dyn_lib and link_libc and | 362 | if (explicitly_exe_or_dyn_lib and link_libc and |
| 363 | (target_util.osRequiresLibC(target) or | 363 | (target_util.osRequiresLibC(target) or |
| 364 | // For these libcs, Zig can only provide dynamic libc when cross-compiling. | 364 | // For these libcs, Zig can only provide dynamic libc when cross-compiling. |
| 365 | ((target.isGnuLibC() or target.isFreeBSDLibC()) and !options.resolved_target.is_native_abi))) | 365 | ((target.isGnuLibC() or target.isFreeBSDLibC() or target.isNetBSDLibC()) and |
| | 366 | !options.resolved_target.is_native_abi))) |
| 366 | { | 367 | { |
| 367 | if (options.link_mode == .static) return error.LibCRequiresDynamicLinking; | 368 | if (options.link_mode == .static) return error.LibCRequiresDynamicLinking; |
| 368 | break :b .dynamic; | 369 | break :b .dynamic; |
| ... | @@ -386,7 +387,7 @@ pub fn resolve(options: Options) ResolveError!Config { | ... | @@ -386,7 +387,7 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 386 | // When targeting systems where the kernel and libc are developed alongside each other, | 387 | // When targeting systems where the kernel and libc are developed alongside each other, |
| 387 | // dynamic linking is the better default; static libc may contain code that requires | 388 | // dynamic linking is the better default; static libc may contain code that requires |
| 388 | // the very latest kernel version. | 389 | // the very latest kernel version. |
| 389 | if (target.isFreeBSDLibC()) { | 390 | if (target.isFreeBSDLibC() or target.isNetBSDLibC()) { |
| 390 | break :b .dynamic; | 391 | break :b .dynamic; |
| 391 | } | 392 | } |
| 392 | } | 393 | } |