From: Michael Wallner Date: Tue, 14 Jan 2020 14:19:33 +0000 (+0100) Subject: m4: skip -fsanitize=object-size on clang X-Git-Tag: pre_cmake~41 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=22da6f6d6410053ac1f4682453b52463e6c9a05f;p=awesomized%2Flibmemcached m4: skip -fsanitize=object-size on clang --- diff --git a/m4/ax_harden_compiler_flags.m4 b/m4/ax_harden_compiler_flags.m4 index 9302b12d..8ceeca67 100644 --- a/m4/ax_harden_compiler_flags.m4 +++ b/m4/ax_harden_compiler_flags.m4 @@ -73,14 +73,17 @@ AC_DEFUN([_SET_SANITIZE_FLAGS], _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=float-divide-by-zero]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=integer-divide-by-zero]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=null]) - _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=return]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=shift]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=signed-integer-overflow]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unreachable]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=unsigned-integer-overflow]) _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vla-bound]) - _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr])]) + _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=vptr]) + AS_IF([test "$ax_cv_c_compiler_vendor" != "clang"],[ + _APPEND_COMPILE_FLAGS_ERROR([-fsanitize=object-size]) + ]) + ]) ]) ]) ])