Disable -O2 when --enable-debug is used, it can/does do odd things.

Originally committed to SVN as r2729.
This commit is contained in:
Amar Takhar 2009-02-11 16:50:16 +00:00
parent a7da892c62
commit 5ce4e24f57

View file

@ -212,7 +212,6 @@ AC_ARG_ENABLE(compiler-flags, [ --disable-compiler-flags
if test "$enable_compiler_flags" != "no"; then
AC_C_FLAG([-Wall])
AC_C_FLAG([-O2])
AC_C_FLAG([-Wextra],[AC_C_FLAG([-W])])
AC_C_FLAG([-Wno-unused-parameter])
AC_C_FLAG([-std=gnu99])
@ -220,12 +219,16 @@ if test "$enable_compiler_flags" != "no"; then
AC_CXX_FLAG([-Wextra],[AC_CXX_FLAG([-W])])
AC_CXX_FLAG([-Wno-unused-parameter])
AC_CXX_FLAG([-Wno-long-long])
AC_CXX_FLAG([-O2])
AC_CXX_FLAG([-fpermissive])
AC_CXX_FLAG([-fno-strict-aliasing])
AC_CXX_FLAG([-std=c++98])
fi
if test "$enable_compiler_flags" != "no" || test "$enable_debug" != "yes"; then
AC_C_FLAG([-O2])
AC_CXX_FLAG([-O2])
fi
######################################
# Check Headers / Features / Libraries
######################################