Skip to content

Commit

Permalink
support tls in cross-compile
Browse files Browse the repository at this point in the history
AC_RUN_IFELSE will fail in cross-compile,
we can use AC_COMPILE_IFELSE replace.

Signed-off-by: duguhaotian <duguhaotian@gmail.com>
  • Loading branch information
duguhaotian authored and Christian Brauner committed Jun 15, 2018
1 parent f1f2d70 commit 23ca39e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/tls.m4
Expand Up @@ -5,7 +5,7 @@
AC_DEFUN([LXC_CHECK_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)
if test "$have_tls" = "yes"; then
AC_DEFINE([HAVE_TLS],[1],[Define if the compiler supports __thread])
Expand Down

0 comments on commit 23ca39e

Please sign in to comment.