Do not pass -DNDEBUG to Python compilations in development mode
authorTom Tromey <tom@tromey.com>
Sun, 16 Sep 2018 18:38:12 +0000 (12:38 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 17 Sep 2018 19:51:38 +0000 (13:51 -0600)
commitae292b3afc0fce65c12014d2cc4621d7a0e661fd
tree700c8b4115795574d20a5f5cf5caef482dba11f3
parentda658607ed24bc5a4dcfcfb56b6e1440ccab33d2
Do not pass -DNDEBUG to Python compilations in development mode

The Python CFLAGS include -DNDEBUG.  This was apparently done
intentionally -- setting the flags is done manually because, according
to a comment, python-config passes too many things to the compiler
(which is true).

Per PR python/20445, this patch changes configure so that -DNDEBUG is
only used by release builds.  This probably doesn't have very much
effect in practice, but I did see that some Python headers use assert,
so perhaps it will give some safety.

Tested by rebuilding and re-running gdb.python/*.exp on x86-64 Fedora 28.

gdb/ChangeLog
2018-09-17  Tom Tromey  <tom@tromey.com>

PR python/20445:
* configure: Rebuild.
* configure.ac: Conditionally use -DNDEBUG for Python.
gdb/ChangeLog
gdb/configure
gdb/configure.ac