*Ping*
2014-10-13 14:48 GMT+04:00 Varvara Rainchik <varvara.s.rainc...@gmail.com>: >> Now, I wonder on which OS and why does config/tls.m4 CHECK_GCC_TLS >> actually fail? Can you figure that out? >> > > On Android check passes with --disable-tls (standard while building > gcc for Android as TLS is not supported in bionic) and fails with > --enable-tls (i686-linux-android/libgomp/conftest.c:32: undefined > reference to `___tls_get_addr'). So, HAVE_TLS is not defined in both > cases. > >> If we get rid of HAVE_TLS code altogether, we might lose support of >> some very old OSes, e.g. some Linux distros with a recent gcc and binutils >> (so that emutls isn't used), but very old glibc (that doesn't support >> TLS or supports it incorrectly, think of pre-2002 glibc). So, if we get >> rid of !HAVE_TLS code in libgomp, it would be nice if config/tls.m4 detected >> it properly and we'd just fail at configure time. > > How can we check this in config/tls.m4? Can we just combine tests on > TLS and emutls? E.g. check whether HAVE_TLS and USE_EMUTLS are both > defined. > >> And if we don't, just make sure that on Android, Darwin and/or M$Win (or >> whatever other OS you had in mind which does support pthreads, but doesn't >> support native TLS) find out why HAVE_AS_TLS is not defined (guess >> config.log should explain that). > > HAVE_AS_TLS is also not defined for Android as it depends on --enable-tls.