Unverified Commit 3f962af8 by duguhaotian Committed by Christian Brauner

support tls in cross-compile

AC_RUN_IFELSE will fail in cross-compile, we can use AC_COMPILE_IFELSE replace. Signed-off-by: 's avatarduguhaotian <duguhaotian@gmail.com>
parent af41287e
...@@ -5,7 +5,7 @@ ...@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment