diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-10 13:35:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-10 13:35:10 +0100 |
commit | d52a2c5b3c62c3d73891fbb5b86b6e02d68b2c18 (patch) | |
tree | 35da6385b30a78883a957feb012502076ae87060 /configure.ac | |
parent | 5fa9ce570dc59a3fc9eb47f28b3fed739f20ab23 (diff) |
Fix detection of HAVE_CXX14_SIZED_DEALLOCATION under Clang -fsanitize=address
Change-Id: Ib6219a90f36ad391d49a29e7fd12adae604ec8d1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index b97442fc5259..3e1c51a3b18b 100644 --- a/configure.ac +++ b/configure.ac @@ -6339,6 +6339,23 @@ if test "$CROSS_COMPILING" = TRUE; then cxx14_sized_deallocation=no AC_MSG_RESULT([$cxx14_sized_deallocation (assumed; cross compiling)]) else + dnl At least Clang -fsanitize=address causes "multiple definition of + dnl `operator delete(void*, unsigned long)'" also defined in + dnl projects/compiler-rt/lib/asan/asan_new_delete.cc: + save_CXX=$CXX + if test "$COM_IS_CLANG" = TRUE; then + my_CXX= + for i in $CXX; do + case $i in + -fsanitize=address) + ;; + *) + my_CXX="$my_CXX $i" + ;; + esac + done + CXX=$my_CXX + fi save_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" AC_LANG_PUSH([C++]) @@ -6353,6 +6370,7 @@ else return 1; ]])], [cxx14_sized_deallocation=yes], [cxx14_sized_deallocation=no]) AC_LANG_POP([C++]) + CXX=$save_CXX CXXFLAGS=$save_CXXFLAGS AC_MSG_RESULT([$cxx14_sized_deallocation]) fi |