|
From: Bart V. A. <bva...@so...> - 2018-03-18 05:13:44
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=025344ae807746e74b69d342cdcbb7b23ad853c7 commit 025344ae807746e74b69d342cdcbb7b23ad853c7 Author: Bart Van Assche <bar...@wd...> Date: Sat Mar 17 15:01:35 2018 -0700 configure.ac: Detect support for -faligned-new Diff: --- configure.ac | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configure.ac b/configure.ac index 98d7ac6..3988d62 100644 --- a/configure.ac +++ b/configure.ac @@ -2057,6 +2057,27 @@ else AC_SUBST([FLAG_W_CAST_ALIGN], [-Wcast-align]) fi +# does this compiler support -faligned-new ? +AC_MSG_CHECKING([if g++ accepts -faligned-new]) + +safe_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-faligned-new -Werror" + +AC_LANG(C++) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + return 0; +]])], [ +FLAG_FALIGNED_NEW="-faligned-new" +AC_MSG_RESULT([yes]) +], [ +FLAG_FALIGNED_NEW="" +AC_MSG_RESULT([no]) +]) +CXXFLAGS=$safe_CXXFLAGS +AC_LANG(C) + +AC_SUBST(FLAG_FALIGNED_NEW) + # does this compiler support -fno-stack-protector ? AC_MSG_CHECKING([if gcc accepts -fno-stack-protector]) |