configure: support --enable-glibgxx-debug
Part of #184. * m4/devel.m4 (adl_ENABLE_GLIBCXX_DEBUG): New macro. * configure.ac: Use it. * README: Mention it. * spot/twa/acc.cc: Fix a small issue found with this option.
This commit is contained in:
parent
1a5de86c1e
commit
9f7bf5ab2d
4 changed files with 21 additions and 1 deletions
8
README
8
README
|
|
@ -87,6 +87,14 @@ flags specific to Spot:
|
||||||
--disable-assert
|
--disable-assert
|
||||||
--enable-optimizations
|
--enable-optimizations
|
||||||
|
|
||||||
|
--enable-glibgxx-debug
|
||||||
|
Enable the debugging version libstdc++
|
||||||
|
https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html
|
||||||
|
Note that the debugging version og libstdc++ is incompatible with
|
||||||
|
the regular version. So if Spot is compiled with this option, all
|
||||||
|
client code should be compiled with -D_GLIBCXX_DEBUG as well. This
|
||||||
|
options should normally only be useful to run Spot's test-suite.
|
||||||
|
|
||||||
Here are the meaning of the fine-tuning options, in case
|
Here are the meaning of the fine-tuning options, in case
|
||||||
--enable/disable-devel is not enough.
|
--enable/disable-devel is not enough.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,7 @@ fi
|
||||||
adl_ENABLE_DEBUG
|
adl_ENABLE_DEBUG
|
||||||
ad_GCC_OPTIM
|
ad_GCC_OPTIM
|
||||||
adl_NDEBUG
|
adl_NDEBUG
|
||||||
|
adl_ENABLE_GLIBCXX_DEBUG
|
||||||
|
|
||||||
spot_INTEL
|
spot_INTEL
|
||||||
if test x$enable_warnings = xyes; then
|
if test x$enable_warnings = xyes; then
|
||||||
|
|
|
||||||
10
m4/devel.m4
10
m4/devel.m4
|
|
@ -27,3 +27,13 @@ AC_DEFUN([adl_ENABLE_DEVEL],
|
||||||
enable_optimizations=${enable_optimizations--O}
|
enable_optimizations=${enable_optimizations--O}
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([adl_ENABLE_GLIBCXX_DEBUG],
|
||||||
|
[AC_ARG_ENABLE([glibcxx-debug],
|
||||||
|
[AC_HELP_STRING([--enable-glibcxx-debug],
|
||||||
|
[turn on use the libstdc++ debug mode (see README)])])
|
||||||
|
if test x$enable_glibcxx_debug = xyes; then
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_GLIBCXX_DEBUG"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
|
||||||
|
|
@ -574,7 +574,8 @@ namespace spot
|
||||||
{
|
{
|
||||||
// Pick a random code and put it at the end
|
// Pick a random code and put it at the end
|
||||||
int p1 = mrand(s--);
|
int p1 = mrand(s--);
|
||||||
std::swap(codes[p1], codes[s]);
|
if (p1 != s) // https://gcc.gnu.org/bugzilla//show_bug.cgi?id=59603
|
||||||
|
std::swap(codes[p1], codes[s]);
|
||||||
// and another one
|
// and another one
|
||||||
int p2 = mrand(s);
|
int p2 = mrand(s);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue