From 131227be57e09b47be352bc9ca9af0407f757250 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 21 Dec 2019 15:25:59 -0500 Subject: [PATCH] Add --enable-ubsan to build with UndefinedBehaviorSanitizer --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 0239ca6..03f24cf 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,18 @@ AS_IF([test "x$enable_asan" = "xyes"], [ ]) +AC_ARG_ENABLE([ubsan], + AS_HELP_STRING([--enable-ubsan], + [build with UndefinedBehaviorSanitizer]) +) + +AS_IF([test "x$enable_ubsan" = "xyes"], [ + dnl enabling ubsan + CPPFLAGS="$CPPFLAGS -fsanitize=undefined" + LDFLAGS="$LDFLAGS -fsanitize=undefined" +]) + + dnl ###################### dnl checking for pthread dnl ######################