enable libstdc++ debug mode with --enable-dbgutil diff --git a/configure.in b/configure.in index 0560d60..496e746 100755 --- a/configure.in +++ b/configure.in @@ -2293,6 +2293,22 @@ if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then PRODUCT="" PROFULLSWITCH="" AC_MSG_RESULT([yes]) + # cppunit and graphite expose STL in public headers + if test "$with_system_cppunit" = "yes"; then + AC_MSG_ERROR([--with-system-cppunit conflicts with DBG_UTIL build]) + else + with_system_cppunit=no + fi + if test "$with_system_graphite" = "yes"; then + AC_MSG_ERROR([--with-system-graphite conflicts with DBG_UTIL build]) + else + with_system_graphite=no + fi + if test "$with_system_mysql_cppconn" = "yes"; then + AC_MSG_ERROR([--with-system-mysql-cppconn conflicts with DBG_UTIL build]) + else + with_system_mysql_cppconn=no + fi if test $_os = WINNT -a \( "$enable_mozilla" = yes -o "$enable_build_mozilla" = yes \); then # We can't build against the Mozilla stuff if using _DEBUG, will get linking errors # See connectivity/drivers/mozab diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk index 7fba665..9269096 100644 --- a/cppunit/makefile.mk +++ b/cppunit/makefile.mk @@ -119,6 +119,15 @@ MY_LIBS = -lm CONFIGURE_ACTION = ./configure +.IF "$(COM)" == "GCC" +.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" || "$(OS)" == "OPENBSD" || "$(OS)" == "NETBSD" || "$(OS)" == "DRAGONFLY" || "$(OS)" == "ANDROID" +.IF "$(PRODUCT)"!="full" +# enable debug STL +EXTRA_CDEFS += -D_GLIBCXX_DEBUG +.ENDIF # !PRODUCT +.ENDIF # OS +.ENDIF # GCC + .IF "$(debug)"!="" DEBUGFLAG=-g .ENDIF diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 362b378..851cc75 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -107,6 +107,13 @@ endif endif +# enable debug STL +ifeq ($(gb_PRODUCT),$(false)) +gb_COMPILERDEFS += \ + -D_GLIBCXX_DEBUG \ + +endif + gb_CCVER := $(shell $(gb_CC) -dumpversion | $(gb_AWK) -F. -- '{ print $$1*10000+$$2*100+$$3 }') gb_StrictAliasingUnsafe := $(shell expr $(gb_CCVER) \< 40600) diff --git a/solenv/inc/unxfbsd.mk b/solenv/inc/unxfbsd.mk index f751384..4470160 100644 --- a/solenv/inc/unxfbsd.mk +++ b/solenv/inc/unxfbsd.mk @@ -91,6 +91,11 @@ PICSWITCH:=-fpic CFLAGSCXX += -fvisibility-inlines-hidden .ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" +.IF "$(PRODUCT)"!="full" +# enable debug STL +CFLAGSCXX += -D_GLIBCXX_DEBUG +.ENDIF # !PRODUCT + # Compiler flags for compiling static object in multi threaded environment with graphical user interface CFLAGSOBJGUIMT= # Compiler flags for compiling static object in multi threaded environment with character user interface diff --git a/solenv/inc/unxgcc.mk b/solenv/inc/unxgcc.mk index 752de80..f34f12b 100644 --- a/solenv/inc/unxgcc.mk +++ b/solenv/inc/unxgcc.mk @@ -91,6 +91,11 @@ CFLAGSCXX+=-fvisibility-inlines-hidden CFLAGSCXX+=-std=c++0x -Wno-deprecated-declarations .ENDIF # "$(HAVE_CXX0X)" == "TRUE" +.IF "$(PRODUCT)"!="full" +# enable debug STL +CFLAGSCXX += -D_GLIBCXX_DEBUG +.ENDIF # !PRODUCT + CFLAGS_CREATE_PCH=-x c++-header -I$(INCPCH) -DPRECOMPILED_HEADERS CFLAGS_USE_PCH=-I$(SLO)$/pch -DPRECOMPILED_HEADERS -Winvalid-pch CFLAGS_USE_EXCEPTIONS_PCH=-I$(SLO)$/pch_ex -DPRECOMPILED_HEADERS -Winvalid-pch