configure.ac: better test for -faligned-new

XCode 9 provides only partial support for aligned new/delete when -faligned-new
is specified. Require successful linking to enable aligned new/delete.
This commit is contained in:
Stephan Zuercher 2017-12-05 09:31:38 -08:00 committed by Aliaksey Kandratsenka
parent 6a4b079997
commit 36ab068baa

View File

@ -397,7 +397,7 @@ AC_CACHE_CHECK([if C++ compiler supports -faligned-new],
[AC_LANG_PUSH(C++)
OLD_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -faligned-new"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[#include <new>]],
[[(::operator delete)((::operator new)(256, std::align_val_t(16)), std::align_val_t(16))]])],
perftools_cv_have_f_aligned_new=yes,