diff options
| author | Pat Tullmann <pat.github@tullmann.org> | 2023-10-29 14:38:48 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-04 17:12:07 -0700 |
| commit | c22d1c00a8825f60e7b01b97c6f73cbc21ca8257 (patch) | |
| tree | fb4d555cdb776c4d4aca0e649e299ce6689b8d8a /test | |
| parent | 71e809852c34a5a75f86829a188028ec12bbd4ec (diff) | |
| download | zig-c22d1c00a8825f60e7b01b97c6f73cbc21ca8257.tar.gz zig-c22d1c00a8825f60e7b01b97c6f73cbc21ca8257.zip | |
src/target: Restrict usable glibc versions
At a minimum required glibc is v2.17, as earlier versions do not define
some symbols (e.g., getauxval()) used by the Zig standard library.
Additionally, glibc only supports some architectures at more recent
versions (e.g., riscv64 support came in glibc v2.27). So add a
`glibc_min` field to `available_libcs` for architectures with stronger
version requirements.
Extend the existing `canBuildLibC` function to check the target against
the Zig minimum, and the architecture/os minimum.
Also filter the list shown by `zig targets`, too:
$ zig targets | jq -c '.glibc'
["2.17.0","2.18.0","2.19.0","2.20.0","2.21.0","2.22.0","2.23.0","2.24.0","2.25.0","2.26.0","2.27.0","2.28.0","2.29.0","2.30.0","2.31.0","2.32.0","2.33.0","2.34.0","2.35.0","2.36.0","2.37.0","2.38.0"]
Fixes #17034
Fixes #17769
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
