summaryrefslogtreecommitdiff
path: root/libstdc++-v3/configure
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-22 21:31:24 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2011-10-22 21:31:24 +0000
commit7a0b241e4f1d941f602c885fc116d9a3f0ee6273 (patch)
tree621f9002ec44cd4395c9dd19659892c43049e647 /libstdc++-v3/configure
parenta2eb22f09bcadd9a021cda72aee6aefee477bc55 (diff)
downloadgcc-7a0b241e4f1d941f602c885fc116d9a3f0ee6273.tar.gz
PR libstdc++/50196
* acinclude.m4 (GLIBCXX_HAS_GTHREADS): Don't depend on _POSIX_TIMEOUTS. * configure: Regenerate. * include/std/mutex (timed_mutex, recursive_timed_mutex): Define conditionally on GTHREADS_HAS_MUTEX_TIMEDLOCK. * testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed): Define. * testsuite/lib/dg-options.exp (dg-require-gthreads-timed): Define. * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc: Use dg-require-gthreads-timed instead of dg-require-gthreads. * testsuite/30_threads/recursive_timed_mutex/native_handle/ typesizes.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc: Likewise. * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/assign_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise. * testsuite/30_threads/timed_mutex/cons/copy_neg.cc: Likewise. * testsuite/30_threads/timed_mutex/requirements/standard_layout.cc: Likewise. * testsuite/30_threads/timed_mutex/requirements/typedefs.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise. * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise. * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise. * testsuite/30_threads/unique_lock/cons/5.cc: Likewise. * testsuite/30_threads/unique_lock/cons/6.cc: Likewise. * testsuite/30_threads/unique_lock/locking/3.cc: Likewise. * testsuite/30_threads/unique_lock/locking/4.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180329 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/configure')
-rwxr-xr-xlibstdc++-v3/configure31
1 files changed, 12 insertions, 19 deletions
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 87579d9c7c7..5e9078d4a93 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -19823,8 +19823,14 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fno-exceptions -I${toplevel_srcdir}/gcc"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking check whether it can be safely assumed that mutex_timedlock is available" >&5
-$as_echo_n "checking check whether it can be safely assumed that mutex_timedlock is available... " >&6; }
+ target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
+ case $target_thread_file in
+ posix)
+ CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it can be safely assumed that mutex_timedlock is available" >&5
+$as_echo_n "checking whether it can be safely assumed that mutex_timedlock is available... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -19833,7 +19839,9 @@ int
main ()
{
- #if !defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS < 0
+ // In case of POSIX threads check _POSIX_TIMEOUTS.
+ #if (defined(_PTHREADS) \
+ && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
#error
#endif
@@ -19859,21 +19867,12 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $res_mutex_timedlock" >&5
$as_echo "$res_mutex_timedlock" >&6; }
- target_thread_file=`$CXX -v 2>&1 | sed -n 's/^Thread model: //p'`
- case $target_thread_file in
- posix)
- CXXFLAGS="$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS"
- esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gthreads library" >&5
$as_echo_n "checking for gthreads library... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
- #include "gthr.h"
- #include <unistd.h>
-
+#include "gthr.h"
int
main ()
{
@@ -19882,12 +19881,6 @@ main ()
#error
#endif
- // In case of POSIX threads check _POSIX_TIMEOUTS too.
- #if (defined(_PTHREADS) \
- && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
- #error
- #endif
-
;
return 0;
}