Commit 9f7bf5ab authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

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.
parent 1a5de86c
......@@ -87,6 +87,14 @@ flags specific to Spot:
--disable-assert
--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
--enable/disable-devel is not enough.
......
......@@ -145,6 +145,7 @@ fi
adl_ENABLE_DEBUG
ad_GCC_OPTIM
adl_NDEBUG
adl_ENABLE_GLIBCXX_DEBUG
spot_INTEL
if test x$enable_warnings = xyes; then
......
......@@ -27,3 +27,13 @@ AC_DEFUN([adl_ENABLE_DEVEL],
enable_optimizations=${enable_optimizations--O}
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
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
int p2 = mrand(s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment