mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
std.zig.system.NativeTargetInfo: improve glibc version detection
Previously, this code would fail to detect glibc version because it relied on libc.so.6 being a symlink which revealed the answer. On modern distros, this is no longer the case. This new strategy finds the path to libc.so.6 from /usr/bin/env, then inspects the .dynstr section of libc.so.6, looking for symbols that start with "GLIBC_2.". It then parses those as semantic versions and takes the maximum value as the system-native glibc version. closes #6469 see #11137 closes #12567
This commit is contained in:
parent
a833bdcd7e
commit
fa940bafa2
1 changed files with 192 additions and 36 deletions
Loading…
Add table
Add a link
Reference in a new issue