Do not pass -DNDEBUG to Python compilations in development mode
[deliverable/binutils-gdb.git] / gdb / configure.ac
index f658da84e325a7feb4b8d11b260f0f20028bb306..66fc6c633f3f96b056de9c9a9a802ce7ebc43b25 100644 (file)
@@ -965,7 +965,11 @@ if test "${have_libpython}" != no; then
   # would make the python-related objects be compiled differently from the
   # rest of GDB (e.g., -O2 and -fPIC).
   if test "${GCC}" = yes; then
-    tentative_python_cflags="-fno-strict-aliasing -DNDEBUG -fwrapv"
+    tentative_python_cflags="-fno-strict-aliasing -fwrapv"
+    # Python headers recommend -DNDEBUG, but it's unclear if that just
+    # refers to building Python itself.  In release mode, though, it
+    # doesn't hurt for the Python code in gdb to follow.
+    $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
   fi
 
   if test "x${tentative_python_cflags}" != x; then
This page took 0.024765 seconds and 4 git commands to generate.