diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-03-07 19:34:22 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-03-07 19:34:22 +0000 |
commit | e7dbb1bec3be35897acb18aa277807ed276384c5 (patch) | |
tree | 2b5ca037a3d87f7baa4cfd9991e3c405e1a0df13 /nptl/sysdeps/pthread | |
parent | d1d3431a3a9dd14501eedb701436bd5005b1db7d (diff) | |
download | glibc-e7dbb1bec3be35897acb18aa277807ed276384c5.tar.gz |
Weaken two NPTL configure link tests to compile tests.
Diffstat (limited to 'nptl/sysdeps/pthread')
-rw-r--r-- | nptl/sysdeps/pthread/configure | 40 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/configure.in | 8 |
2 files changed, 19 insertions, 29 deletions
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 |