* Add option to disable the adding of -g to CFLAGS/CXXFLAGS when --enable-debug
is given. Generally not useful, unless you're on a platform without a debugger... This commit was SVN r9684.
Этот коммит содержится в:
родитель
a8b60fe680
Коммит
2ad29df0a1
@ -143,6 +143,9 @@ fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_ENABLE_DEBUG, $WANT_DEBUG,
|
||||
[Whether we want developer-level debugging code or not])
|
||||
|
||||
AC_ARG_ENABLE(debug-symbols,
|
||||
AC_HELP_STRING([--disable-debug-symbols],
|
||||
[Disable adding compiler flags to enable debugging symbols if --enable-debug is specified. For non-debugging builds, this flag has no effect.]))
|
||||
|
||||
#
|
||||
# Fortran 77
|
||||
|
@ -47,7 +47,7 @@ AC_DEFUN([OMPI_SETUP_CC],[
|
||||
fi
|
||||
|
||||
# Do we want debugging?
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
if test "$WANT_DEBUG" = "1" -a "$enable_debug_symbols" != "no" ; then
|
||||
if test "$ompi_c_vendor" = "gnu"; then
|
||||
CFLAGS="$CFLAGS -g3"
|
||||
else
|
||||
@ -161,10 +161,14 @@ AC_DEFUN([OMPI_SETUP_CC],[
|
||||
# be conservative and just use -O.
|
||||
#
|
||||
# Note: gcc-impersonating compilers accept -O3
|
||||
if test "$GCC" = yes; then
|
||||
OPTFLAGS="-O3"
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
OPTFLAGS=
|
||||
else
|
||||
OPTFLAGS="-O"
|
||||
if test "$GCC" = yes; then
|
||||
OPTFLAGS="-O3"
|
||||
else
|
||||
OPTFLAGS="-O"
|
||||
fi
|
||||
fi
|
||||
|
||||
OMPI_CHECK_OPTFLAGS("$OMPI_CFLAGS_BEFORE_PICKY")
|
||||
|
@ -42,7 +42,7 @@ AC_DEFUN([OMPI_SETUP_CXX],[
|
||||
fi
|
||||
|
||||
# Do we want debugging?
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
if test "$WANT_DEBUG" = "1" -a "$enable_debug_symbols" != "no" ; then
|
||||
CXXFLAGS="$CXXFLAGS -g"
|
||||
OMPI_UNIQ(CXXFLAGS)
|
||||
AC_MSG_WARN([-g has been added to CXXFLAGS (--enable-debug)])
|
||||
@ -148,11 +148,16 @@ AC_DEFUN([OMPI_SETUP_CXX],[
|
||||
esac
|
||||
|
||||
# Note: gcc-imperonating compilers accept -O3
|
||||
if test "$GXX" = yes; then
|
||||
OPTFLAGS="-O3"
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
OPTFLAGS=
|
||||
else
|
||||
OPTFLAGS="-O"
|
||||
if test "$GXX" = yes; then
|
||||
OPTFLAGS="-O3"
|
||||
else
|
||||
OPTFLAGS="-O"
|
||||
fi
|
||||
fi
|
||||
|
||||
# config/ompi_check_optflags.m4
|
||||
OMPI_CHECK_OPTFLAGS(["$CXXFLAGS"])
|
||||
AC_MSG_CHECKING([for C++ optimization flags])
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user