From 94e52d13db49405b1858090041fdf9af49096d43 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 15 Mar 2018 16:13:11 +0100 Subject: [PATCH] Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index ff7f1b39c8..e4142f5762 100644 --- a/configure.ac +++ b/configure.ac @@ -263,6 +263,7 @@ if test "x$enable_debug" = xyes; then AX_CHECK_PREPROC_FLAG([-DDEBUG],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"]],,[[$CXXFLAG_WERROR]]) AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"]],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-ftrapv],[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"],,[[$CXXFLAG_WERROR]]) fi if test x$use_sanitizers != x; then