]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
support tls in cross-compile
authorduguhaotian <lh548426@126.com>
Wed, 30 May 2018 02:25:40 +0000 (10:25 +0800)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 10 Dec 2018 08:03:34 +0000 (09:03 +0100)
AC_RUN_IFELSE will fail in cross-compile,
we can use AC_COMPILE_IFELSE replace.

Signed-off-by: duguhaotian <duguhaotian@gmail.com>
config/tls.m4

index 5d1ac5918dea11fd4f5d0f7e28be36d6133a7e7f..cd032c9d703f37b10d092ef346167eeda1f7010e 100644 (file)
@@ -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])