[lxc-devel] [lxc/master] support tls in cross-compile

duguhaotian on Github lxc-bot at linuxcontainers.org
Wed May 30 02:08:01 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 430 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180530/6cb7f1a4/attachment.bin>
-------------- next part --------------
From dcd2a5de4bbbc0a834eca83770385f9af29bd983 Mon Sep 17 00:00:00 2001
From: duguhaotian <lh548426 at 126.com>
Date: Wed, 30 May 2018 10:25:40 +0800
Subject: [PATCH] support tls in cross-compile

AC_RUN_IFELSE will fail in cross-compile,
we can use AC_COMPILE_IFELSE replace.

Signed-off-by: duguhaotian <lh548426 at 126.com>
---
 config/tls.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/tls.m4 b/config/tls.m4
index 5d1ac5918..cd032c9d7 100644
--- a/config/tls.m4
+++ b/config/tls.m4
@@ -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])


More information about the lxc-devel mailing list