aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-03-07 19:34:22 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-03-07 19:34:22 +0000
commite7dbb1bec3be35897acb18aa277807ed276384c5 (patch)
tree2b5ca037a3d87f7baa4cfd9991e3c405e1a0df13
parentd1d3431a3a9dd14501eedb701436bd5005b1db7d (diff)
downloadglibc-e7dbb1bec3be35897acb18aa277807ed276384c5.tar
glibc-e7dbb1bec3be35897acb18aa277807ed276384c5.tar.gz
glibc-e7dbb1bec3be35897acb18aa277807ed276384c5.tar.bz2
glibc-e7dbb1bec3be35897acb18aa277807ed276384c5.zip
Weaken two NPTL configure link tests to compile tests.
-rw-r--r--NEWS8
-rw-r--r--nptl/ChangeLog9
-rw-r--r--nptl/sysdeps/pthread/configure40
-rw-r--r--nptl/sysdeps/pthread/configure.in8
4 files changed, 32 insertions, 33 deletions
diff --git a/NEWS b/NEWS
index 180aec41c9..9e94458a8e 100644
--- a/NEWS
+++ b/NEWS
@@ -11,10 +11,10 @@ Version 2.16
174, 350, 411, 2541, 2547, 2548, 3335, 3976, 3992, 4026, 4108, 4596, 4822,
5077, 5461, 5805, 5993, 6884, 6907, 9739, 9902, 10110, 10135, 10140,
- 10210, 10716, 11174, 11322, 11365, 11494, 12047, 13058, 13525, 13526,
- 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552,
- 13553, 13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704, 13706,
- 13726, 13738, 13786, 13792
+ 10210, 10545, 10716, 11174, 11322, 11365, 11494, 12047, 13058, 13525,
+ 13526, 13527, 13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551,
+ 13552, 13553, 13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704,
+ 13706, 13726, 13738, 13786, 13792
* ISO C11 support:
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index eb2e38daf9..dd6f334a3d 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-07 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #10545]
+ * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
+ link test to a compile test.
+ (libc_cv_c_cleanup): Likewise. Declare puts rather than including
+ <stdio.h>.
+ * sysdeps/pthread/configure: Regenerated.
+
2012-03-07 Ulrich Drepper <drepper@gmail.com>
* Makefile (distribute): Remove variable.
diff --git a/nptl/sysdeps/pthread/configure b/nptl/sysdeps/pthread/configure
index 6b3c79b8f4..221ce9bbb1 100644
--- a/nptl/sysdeps/pthread/configure
+++ b/nptl/sysdeps/pthread/configure
@@ -81,21 +81,21 @@ $as_echo X/"$0" |
}
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
+ (eval "$ac_compile") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
@@ -106,10 +106,7 @@ $as_echo "$ac_try_echo"; } >&5
test $ac_status = 0; } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then :
+ } && test -s conftest.$ac_objext; then :
ac_retval=0
else
$as_echo "$as_me: failed program was:" >&5
@@ -117,15 +114,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
-} # ac_fn_c_try_link
+} # ac_fn_c_try_compile
# This file is generated from configure.in by Autoconf. DO NOT EDIT!
if test "x$libc_cv_gcc___thread" != xyes; then
@@ -165,13 +157,12 @@ _Unwind_GetCFA (context)
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
libc_cv_forced_unwind=yes
else
libc_cv_forced_unwind=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_forced_unwind" >&5
$as_echo "$libc_cv_forced_unwind" >&6; }
@@ -188,25 +179,24 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+extern void some_function (void);
void cl (void *a) { }
int
main ()
{
int a __attribute__ ((cleanup (cl)));
- puts ("test")
+ some_function ()
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
libc_cv_c_cleanup=yes
else
libc_cv_c_cleanup=no
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_c_cleanup" >&5
$as_echo "$libc_cv_c_cleanup" >&6; }
diff --git a/nptl/sysdeps/pthread/configure.in b/nptl/sysdeps/pthread/configure.in
index 17f18f0fbf..413af96799 100644
--- a/nptl/sysdeps/pthread/configure.in
+++ b/nptl/sysdeps/pthread/configure.in
@@ -23,7 +23,7 @@ dnl Iff <unwind.h> is available, make sure it is the right one and it
dnl contains struct _Unwind_Exception.
AC_CACHE_CHECK(dnl
for forced unwind support, libc_cv_forced_unwind, [dnl
-AC_TRY_LINK([#include <unwind.h>], [
+AC_TRY_COMPILE([#include <unwind.h>], [
struct _Unwind_Exception exc;
struct _Unwind_Context *context;
_Unwind_GetCFA (context)],
@@ -34,11 +34,11 @@ dnl Check for C cleanup handling.
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror -fexceptions"
AC_CACHE_CHECK([for C cleanup handling], libc_cv_c_cleanup, [dnl
- AC_TRY_LINK([
-#include <stdio.h>
+ AC_TRY_COMPILE([
+extern void some_function (void);
void cl (void *a) { }], [
int a __attribute__ ((cleanup (cl)));
- puts ("test")],
+ some_function ()],
libc_cv_c_cleanup=yes, libc_cv_c_cleanup=no)])
CFLAGS="$old_CFLAGS"
if test $libc_cv_c_cleanup = no; then