https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78532
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- On Tue, 29 Nov 2016, m.ostapenko at samsung dot com wrote: > /home/max/src/glibc/resolv/ns_print.c:99: undefined reference to > `__stack_chk_guard' You get this if glibc and GCC have mismatched stack checking configuration. To avoid that, use the --with-glibc-version=<major.minor> option when configuring a bootstrap GCC to be used to build glibc. Mainline glibc's build-many-glibcs.py knows how to configure GCC and glibc for building many different configurations. It uses --disable-libsanitizer, but if libsanitizer is meant to work for all glibc configurations you could try removing it (adding it back for the initial bootstrap GCC only) and seeing what libsanitizer problems it shows up.