Ping Re: Improve TLS link test for cross-compiling
Joseph S. Myers
joseph@codesourcery.com
Fri Jul 17 15:27:00 GMT 2009
On Fri, 17 Jul 2009, H.J. Lu wrote:
> [hjl@gnu-6 libstdc++-v3]$ autoconf-2.59
> configure.ac:178: warning: GCC_NO_EXECUTABLES invoked multiple times
> /export/redhat/rpms/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:2213:
> AC_LINK_IFELSE is expanded from...
> /export/redhat/rpms/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:2271:
> AC_RUN_IFELSE is expanded from...
> /export/redhat/rpms/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:1792:
> AC_CACHE_VAL is expanded from...
> /export/redhat/rpms/BUILD/autoconf-2.59/tests/../lib/autoconf/general.m4:1805:
> AC_CACHE_CHECK is expanded from...
> ../config/tls.m4:2: GCC_CHECK_TLS is expanded from...
> configure.ac:178: the top level
> configure.ac:247: warning: GCC_NO_EXECUTABLES invoked multiple times
> crossconfig.m4:5: GLIBCXX_CROSSCONFIG is expanded from...
> configure.ac:247: the top level
> [hjl@gnu-6 libstdc++-v3]$
>
> in libstdc++-v3. Did you see it?
This appears to be describing a condition (GCC_NO_EXECUTABLES called under
various possible conditions, via GCC_CHECK_TLS being called under those
conditions) that is neither new after my patch, nor in any way a problem,
so I'm not sure of the point of this warning or why my patch should have
caused it. I have however applied this followup patch to fix a quoting
issue in my patch that perturbs things sufficiently to avoid this warning,
although I do not believe the pre-existing code in this macro is correctly
quoted either (I'd expect the static linking call of AC_RUN_IFELSE to need
to be quoted as an argument to AC_LINK_IFELSE).
Index: libstdc++-v3/configure
===================================================================
--- libstdc++-v3/configure (revision 149747)
+++ libstdc++-v3/configure (working copy)
@@ -40770,8 +40770,8 @@
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after ." >&5
-echo "$as_me: error: Link tests are not allowed after ." >&2;}
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
@@ -94505,8 +94505,8 @@
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after ." >&5
-echo "$as_me: error: Link tests are not allowed after ." >&2;}
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
@@ -112207,8 +112207,8 @@
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after ." >&5
-echo "$as_me: error: Link tests are not allowed after ." >&2;}
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
Index: libstdc++-v3/ChangeLog
===================================================================
--- libstdc++-v3/ChangeLog (revision 149747)
+++ libstdc++-v3/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2009-07-17 Joseph Myers <joseph@codesourcery.com>
+
+ PR other/40784
+ * configure: Regenerate.
+
2009-07-16 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/util/testsuite_common_types.h (standard_layout): Activate.
Index: config/ChangeLog
===================================================================
--- config/ChangeLog (revision 149747)
+++ config/ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2009-07-17 Joseph Myers <joseph@codesourcery.com>
+
+ PR other/40784
+ * tls.m4 (GCC_CHECK_TLS): Add extra quoting around argument to
+ AC_LINK_IFELSE.
+
2009-07-16 Joseph Myers <joseph@codesourcery.com>
* tls.m4 (GCC_CHECK_TLS): Also test TLS in a shared library when
Index: config/tls.m4
===================================================================
--- config/tls.m4 (revision 149747)
+++ config/tls.m4 (working copy)
@@ -79,9 +79,9 @@
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([__thread int a; int b; int f() { return a = b; }],
[gcc_cv_have_tls=yes],
- [gcc_cv_have_tls=no]),
+ [gcc_cv_have_tls=no])],
[gcc_cv_have_tls=yes])
CFLAGS="$chktls_save_CFLAGS"
LDFLAGS="$chktls_save_LDFLAGS"], [gcc_cv_have_tls=no])
Index: libjava/ChangeLog
===================================================================
--- libjava/ChangeLog (revision 149747)
+++ libjava/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2009-07-17 Joseph Myers <joseph@codesourcery.com>
+
+ PR other/40784
+ * configure: Regenerate.
+
2009-07-16 Joseph Myers <joseph@codesourcery.com>
* configure: Regenerate.
Index: libjava/configure
===================================================================
--- libjava/configure (revision 149747)
+++ libjava/configure (working copy)
@@ -27702,8 +27702,8 @@
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after ." >&5
-echo "$as_me: error: Link tests are not allowed after ." >&2;}
+ { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
+echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
{ (exit 1); exit 1; }; }
fi
cat >conftest.$ac_ext <<_ACEOF
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list