From: Michael Jerris Date: Thu, 5 Mar 2015 20:54:19 +0000 (-0600) Subject: FS-7350: add --enable-address-sanitizer configure flag to enable clang address sanitizer X-Git-Tag: v1.4.18~1^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f83e429d36a6ef0c97df307f3e2a02b951a090fb;p=thirdparty%2Ffreeswitch.git FS-7350: add --enable-address-sanitizer configure flag to enable clang address sanitizer --- diff --git a/configure.ac b/configure.ac index e41e62d4ed..f9c958455a 100644 --- a/configure.ac +++ b/configure.ac @@ -405,6 +405,21 @@ elif test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then fi fi +# Enable clang address sanitizer bit build +AC_ARG_ENABLE(address_sanitizer, + [AC_HELP_STRING([--enable-address-sanitizer],[build with address sanitizer])], + [enable_address_sanitizer="$enable_address_sanitizer"], + [enable_address_sanitizer="no"]) + +if test "${enable_address_sanitizer}" = "yes"; then + if test "x${ax_cv_c_compiler_vendor}" = "xclang" ; then + APR_ADDTO(CFLAGS, -fsanitize=address -fno-omit-frame-pointer) + APR_ADDTO(CXXFLAGS, -fsanitize=address -fno-omit-frame-pointer) + APR_ADDTO(LDFLAGS, -fsanitize=address) + fi +fi + + # # gcc visibility cflag checks #