diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-09-08 18:02:38 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-09-08 20:52:49 -0700 |
| commit | fa940bafa2720f49ee249eda1ee4cf26a247172a (patch) | |
| tree | ab82a24917a27755897fb863bb0773ff723d75ca /src/codegen | |
| parent | a833bdcd7e6fcfee6e9cc33a3f7de78b16a36941 (diff) | |
| download | zig-fa940bafa2720f49ee249eda1ee4cf26a247172a.tar.gz zig-fa940bafa2720f49ee249eda1ee4cf26a247172a.zip | |
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
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
