Zig 0.15.0-dev provides all FreeBSD 14 system headers, libc headers and stub libraries for libc. Zig now allows cross-compiling, targeting all FreeBSD 14.x supported platforms.
→ Support dynamically-linked FreeBSD libc when cross-compiling #23835 ←
You must specify freebsd.14.0
or newer, because the default target is freebsd.13
and the included libc is for version 14 or newer.
e.g.
zig build-exe test.zig -target aarch64-freebsd.14.0