http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57316
--- Comment #7 from Daniel Richard G. <skunk at iskunk dot org> --- Created attachment 30723 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30723&action=edit Trivial configure-time check (In reply to Kostya Serebryany from comment #6) > > That would be non-trivial. We intercept the pthread_ functions so we can't > call them directly. We'll at least need to bypass our own interceptors. > And as I mentioned before, older kernels will likely not work anyway for > a few other reasons. Okay, so I guess there's no alternative but to disable libsanitizer for these systems. I see that libsanitizer support is inferred automatically by the libsanitizer/configure.tgt script, which is sourced from the top-level configure script. This script is not processed by Autoconf, so doing a test-compile in there would be somewhat awkward. However, on this old Debian system, the linux/futex.h header doesn't exist at all, so picking up on that would be enough for me. See attached patch for a first-draft proposal. (There probably needs to be some build/host/target-sysroot awareness of where to look for the header; I'm not familiar enough with building cross-compilers.)