[PATCH 1/5] build-sys: use AC_LANG_SOURCE to suppress warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Messages bellow be supressed by using AC_LANG_SOURCE macro around
code test blocks.

m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level
configure.ac:335: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2660: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2677: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2728: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2747: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2030: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2051: AC_CACHE_CHECK is expanded from...
m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level

Reference to documentation;
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html#id1168723648533

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 m4/tls.m4 |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/m4/tls.m4 b/m4/tls.m4
index 7adb09a..d2243aa 100644
--- a/m4/tls.m4
+++ b/m4/tls.m4
@@ -20,14 +20,14 @@ AC_DEFUN([AX_CHECK_TLS], [
 
   AC_CACHE_CHECK([whether the target supports thread-local storage],
 		 ax_cv_have_tls, [
-    AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
+    AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
       [dnl If the test case passed with dynamic linking, try again with
        dnl static linking, but only if static linking is supported (not
        dnl on Solaris 10).  This fails with some older Red Hat releases.
       chktls_save_LDFLAGS="$LDFLAGS"
       LDFLAGS="-static $LDFLAGS"
-      AC_LINK_IFELSE([int main() { return 0; }],
-	AC_RUN_IFELSE([__thread int a; int b; int main() { return a = b; }],
+      AC_LINK_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
+	AC_RUN_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
 		      [ax_cv_have_tls=yes], [ax_cv_have_tls=no],[]),
 	[ax_cv_have_tls=yes])
       LDFLAGS="$chktls_save_LDFLAGS"
@@ -82,7 +82,7 @@ AC_DEFUN([AX_CHECK_TLS], [
       [ax_cv_have_tls=no],
       [dnl This is the cross-compiling case. Assume libc supports TLS if the
        dnl binutils and the compiler do.
-       AC_LINK_IFELSE([__thread int a; int b; int main() { return a = b; }],
+       AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int main() { return a = b; }])],
 	 [chktls_save_LDFLAGS="$LDFLAGS"
 	  dnl Shared library options may depend on the host; this check
 	  dnl is only known to be needed for GNU/Linux.
@@ -94,8 +94,8 @@ AC_DEFUN([AX_CHECK_TLS], [
 	  chktls_save_CFLAGS="$CFLAGS"
 	  CFLAGS="-fPIC $CFLAGS"
 	  dnl If -shared works, test if TLS works in a shared library.
-	  AC_LINK_IFELSE([int f() { return 0; }],
-	    [AC_LINK_IFELSE([__thread int a; int b; int f() { return a = b; }],
+	  AC_LINK_IFELSE([AC_LANG_SOURCE([int f() { return 0; }])],
+	    [AC_LINK_IFELSE([AC_LANG_SOURCE([__thread int a; int b; int f() { return a = b; }])],
 	      [ax_cv_have_tls=yes],
 	      [ax_cv_have_tls=no])],
 	    [ax_cv_have_tls=yes])
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux