summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-06-08 18:39:31 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-06-08 19:22:13 +0200
commite9f272a49eb36d8aad77e772135f47509a2425bd (patch)
tree55df9dccfcf4a48e845dcef4d1e517536ffa5b45 /configure.ac
parentMerge pull request #2390 from pacovn/Coverity_1221459_Use_after_free (diff)
downloadfrr-e9f272a49eb36d8aad77e772135f47509a2425bd.tar.xz
frr-e9f272a49eb36d8aad77e772135f47509a2425bd.zip
*: disable all sanitizers for clippy build
* Move configure flag propagations out of user flags * Use AC_SUBST to transfer flag values to Automake * Set default AM_CFLAGS and AM_CPPFLAGS in common.am and change child Makefiles to modify these base variables * Add flag override to turn off all sanitizers when building clippy * Remove LSAN suppressions blacklist as it's no longer needed Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac18
1 files changed, 12 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 35997a87e..3ec29cc38 100755
--- a/configure.ac
+++ b/configure.ac
@@ -190,8 +190,10 @@ AC_ARG_ENABLE([address-sanitizer], AS_HELP_STRING([--enable-address-sanitizer],
[enabled AddressSanitizer support for detecting a wide variety of \
memory allocation and deallocation errors]), \
[AC_DEFINE(HAVE_ADDRESS_SANITIZER, 1, [enable AddressSanitizer])
- CFLAGS="$CFLAGS -fsanitize=address"
- CXXFLAGS="$CXXFLAGS -fsanitize=address"
+ ASAN_FLAGS="-fsanitize=address"
+ SAN_CLIPPY_FLAGS="-fno-sanitize=all"
+ AC_SUBST([ASAN_FLAGS])
+ AC_SUBST([SAN_CLIPPY_FLAGS])
LIBS="-ldl $LIBS"
AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Address Sanitizer Enabled])],
[AC_MSG_ERROR([Address Sanitizer not available])])
@@ -201,8 +203,10 @@ dnl ThreadSanitizer support
AC_ARG_ENABLE([thread-sanitizer], AS_HELP_STRING([--enable-thread-sanitizer], \
[enabled ThreadSanitizer support for detecting data races]), \
[AC_DEFINE(HAVE_THREAD_SANITIZER, 1, [enable ThreadSanitizer])
- CFLAGS="$CFLAGS -fsanitize=thread"
- CXXFLAGS="$CXXFLAGS -fsanitize=thread"
+ TSAN_FLAGS="-fsanitize=thread"
+ SAN_CLIPPY_FLAGS="-fno-sanitize=all"
+ AC_SUBST([TSAN_FLAGS])
+ AC_SUBST([SAN_CLIPPY_FLAGS])
LIBS="-ldl $LIBS"
AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Thread Sanitizer Enabled])],
[AC_MSG_ERROR([Thread Sanitizer not available])])
@@ -212,8 +216,10 @@ dnl MemorySanitizer support
AC_ARG_ENABLE([memory-sanitizer], AS_HELP_STRING([--enable-memory-sanitizer], \
[enabled MemorySanitizer support for detecting uninitialized memory reads]), \
[AC_DEFINE(HAVE_THREAD_SANITIZER, 1, [enable MemorySanitizer])
- CFLAGS="$CFLAGS -fsanitize=memory -fPIE -pie"
- CXXFLAGS="$CXXFLAGS -fsanitize=memory -fPIE -pie"
+ MSAN_FLAGS="-fsanitize=memory -fPIE -pie"
+ SAN_CLIPPY_FLAGS="-fno-sanitize=all"
+ AC_SUBST([MSAN_FLAGS])
+ AC_SUBST([SAN_CLIPPY_FLAGS])
LIBS="-ldl $LIBS"
AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Memory Sanitizer Enabled])],
[AC_MSG_ERROR([Memory Sanitizer not available])])