Add -D_GLIBCXX_ASSERTIONS to DEBUG_FLAGS
Enable assertions in the extra debug library built when --enable-libstdcxx-debug is used. Replace some Debug Mode assertions in src/c++11/futex.cc with __glibcxx_assert, because the library will never be built with Debug Mode. * configure: Regenerate. * configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS. * src/c++11/futex.cc: Use __glibcxx_assert instead of _GLIBCXX_DEBUG_ASSERT. From-SVN: r263235
This commit is contained in:
parent
c191b1abe9
commit
9fbd2e55a1
|
@ -1,3 +1,10 @@
|
||||||
|
2018-08-01 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* configure: Regenerate.
|
||||||
|
* configure.ac: Add -D_GLIBCXX_ASSERTIONS to default DEBUG_FLAGS.
|
||||||
|
* src/c++11/futex.cc: Use __glibcxx_assert instead of
|
||||||
|
_GLIBCXX_DEBUG_ASSERT.
|
||||||
|
|
||||||
2018-08-01 Mike Crowe <mac@mcrowe.com>
|
2018-08-01 Mike Crowe <mac@mcrowe.com>
|
||||||
|
|
||||||
* include/std/condition_variable (wait_for): Use steady_clock.
|
* include/std/condition_variable (wait_for): Use steady_clock.
|
||||||
|
|
|
@ -1571,7 +1571,7 @@ Optional Features:
|
||||||
--enable-concept-checks use Boost-derived template checks [default=no]
|
--enable-concept-checks use Boost-derived template checks [default=no]
|
||||||
--enable-libstdcxx-debug-flags=FLAGS
|
--enable-libstdcxx-debug-flags=FLAGS
|
||||||
pass compiler FLAGS when building debug library
|
pass compiler FLAGS when building debug library
|
||||||
[default="-gdwarf-4 -g3 -O0"]
|
[default="-gdwarf-4 -g3 -O0 -D_GLIBCXX_ASSERTIONS"]
|
||||||
--enable-libstdcxx-debug
|
--enable-libstdcxx-debug
|
||||||
build extra debug library [default=no]
|
build extra debug library [default=no]
|
||||||
--enable-cxx-flags=FLAGS
|
--enable-cxx-flags=FLAGS
|
||||||
|
@ -17932,7 +17932,7 @@ if test "${enable_libstdcxx_debug_flags+set}" = set; then :
|
||||||
*) as_fn_error "--enable-libstdcxx-debug-flags needs compiler flags as arguments" "$LINENO" 5 ;;
|
*) as_fn_error "--enable-libstdcxx-debug-flags needs compiler flags as arguments" "$LINENO" 5 ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
enable_libstdcxx_debug_flags="-gdwarf-4 -g3 -O0"
|
enable_libstdcxx_debug_flags="-gdwarf-4 -g3 -O0 -D_GLIBCXX_ASSERTIONS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ GLIBCXX_ENABLE_LONG_LONG([yes])
|
||||||
GLIBCXX_ENABLE_WCHAR_T([yes])
|
GLIBCXX_ENABLE_WCHAR_T([yes])
|
||||||
GLIBCXX_ENABLE_C99([yes])
|
GLIBCXX_ENABLE_C99([yes])
|
||||||
GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
|
GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
|
||||||
GLIBCXX_ENABLE_DEBUG_FLAGS(["-gdwarf-4 -g3 -O0"])
|
GLIBCXX_ENABLE_DEBUG_FLAGS(["-gdwarf-4 -g3 -O0 -D_GLIBCXX_ASSERTIONS"])
|
||||||
GLIBCXX_ENABLE_DEBUG([no])
|
GLIBCXX_ENABLE_DEBUG([no])
|
||||||
GLIBCXX_ENABLE_PARALLEL([yes])
|
GLIBCXX_ENABLE_PARALLEL([yes])
|
||||||
GLIBCXX_ENABLE_CXX_FLAGS
|
GLIBCXX_ENABLE_CXX_FLAGS
|
||||||
|
|
|
@ -53,7 +53,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
// here on errors is abort.
|
// here on errors is abort.
|
||||||
int ret __attribute__((unused));
|
int ret __attribute__((unused));
|
||||||
ret = syscall (SYS_futex, __addr, futex_wait_op, __val, nullptr);
|
ret = syscall (SYS_futex, __addr, futex_wait_op, __val, nullptr);
|
||||||
_GLIBCXX_DEBUG_ASSERT(ret == 0 || errno == EINTR || errno == EAGAIN);
|
__glibcxx_assert(ret == 0 || errno == EINTR || errno == EAGAIN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -75,7 +75,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||||
|
|
||||||
if (syscall (SYS_futex, __addr, futex_wait_op, __val, &rt) == -1)
|
if (syscall (SYS_futex, __addr, futex_wait_op, __val, &rt) == -1)
|
||||||
{
|
{
|
||||||
_GLIBCXX_DEBUG_ASSERT(errno == EINTR || errno == EAGAIN
|
__glibcxx_assert(errno == EINTR || errno == EAGAIN
|
||||||
|| errno == ETIMEDOUT);
|
|| errno == ETIMEDOUT);
|
||||||
if (errno == ETIMEDOUT)
|
if (errno == ETIMEDOUT)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue