mirror of
https://github.com/gperftools/gperftools
synced 2025-03-18 17:19:47 +00:00
pass -fsized-deallocation to gcc 5
Otherwise it gives warning for declaration of sized delete operator.
This commit is contained in:
parent
0a18fab3af
commit
88686972b9
@ -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.
|
||||
|
13
configure.ac
13
configure.ac
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user