authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-21 20:48:50-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-21 20:48:50-05:00
logdca19b67573dc46260b318e9253370fbc628834d
tree4b2d58f8818d22aac2c41ae21639860ef9141ed8
parent6305ce828b0685ceb646fae87a963f034d3bcdf0
signaturelock-open Commit is signed but in an unrecognized format.

fix regression in detecting native glibc version

closes #4519

2 files changed, 8 insertions(+), 6 deletions(-)

src/main.cpp+8
......@@ -992,6 +992,14 @@ static int main0(int argc, char **argv) {
992992 }
993993 } else {
994994 target_init_default_glibc_version(&target);
995#if defined(ZIG_OS_LINUX)
996 if (target.is_native) {
997 // TODO self-host glibc version detection, and then this logic can go away
998 if ((err = glibc_detect_native_version(target.glibc_version))) {
999 // Fall back to the default version.
1000 }
1001 }
1002#endif
9951003 }
9961004 } else if (target_glibc != nullptr) {
9971005 fprintf(stderr, "'%s' is not a glibc-compatible target", target_string);
src/target.cpp-6
......@@ -467,12 +467,6 @@ void get_native_target(ZigTarget *target) {
467467 if (target_is_glibc(target)) {
468468 target->glibc_version = heap::c_allocator.create<ZigGLibCVersion>();
469469 target_init_default_glibc_version(target);
470#ifdef ZIG_OS_LINUX
471 Error err;
472 if ((err = glibc_detect_native_version(target->glibc_version))) {
473 // Fall back to the default version.
474 }
475#endif
476470 }
477471}
478472