Merge pull request #2362 from duguhaotian/work

support tls in cross-compile
This commit is contained in:
Christian Brauner 2018-06-04 13:39:24 +02:00 committed by GitHub
commit fe96566a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
AC_DEFUN([LXC_CHECK_TLS], AC_DEFUN([LXC_CHECK_TLS],
[ [
AC_MSG_CHECKING(for TLS) AC_MSG_CHECKING(for TLS)
AC_RUN_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main() { return 0; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ static __thread int val; int main() { return 0; } ]])],[have_tls=yes],[have_tls=no],[have_tls=no ])
AC_MSG_RESULT($have_tls) AC_MSG_RESULT($have_tls)
if test "$have_tls" = "yes"; then if test "$have_tls" = "yes"; then
AC_DEFINE([HAVE_TLS],[1],[Define if the compiler supports __thread]) AC_DEFINE([HAVE_TLS],[1],[Define if the compiler supports __thread])