pass -fsized-deallocation to gcc 5

Otherwise it gives warning for declaration of sized delete operator.
This commit is contained in:
Aliaksey Kandratsenka 2015-10-04 11:15:37 -07:00 committed by Aliaksey Kandratsenka
parent 0a18fab3af
commit 88686972b9
2 changed files with 16 additions and 0 deletions

View File

@ -48,6 +48,9 @@ endif GCC
if HAVE_W_NO_UNUSED_RESULT
AM_CXXFLAGS += -Wno-unused-result
endif HAVE_W_NO_UNUSED_RESULT
if HAVE_SIZED_DEALLOCATION
AM_CXXFLAGS += -fsized-deallocation
endif HAVE_SIZED_DEALLOCATION
# The -no-undefined flag allows libtool to generate shared libraries for
# Cygwin and MinGW. LIBSTDCXX_LA_LINKER_FLAG is used to fix a Solaris bug.

View File

@ -323,6 +323,19 @@ AC_CACHE_CHECK([if the compiler supports -Wno-unused-result],
AM_CONDITIONAL(HAVE_W_NO_UNUSED_RESULT,
test "$perftools_cv_w_no_unused_result" = yes)
AC_CACHE_CHECK([if C++ compiler supports -fsized-deallocation],
perftools_cv_sized_deallocation_result,
[AC_LANG_PUSH(C++)
OLD_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -fsized-deallocation"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)],
perftools_cv_sized_deallocation_result=yes,
perftools_cv_sized_deallocation_result=no)
CXXFLAGS="$OLD_CXXFLAGS"
AC_LANG_POP(C++)])
AM_CONDITIONAL(HAVE_SIZED_DEALLOCATION,
test "$perftools_cv_sized_deallocation_result" = yes)
# Defines PRIuS
AC_COMPILER_CHARACTERISTICS