From 4cc86b52d215b1d56368403ab0faccd92f701336 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 14 Sep 2019 17:42:16 +0200 Subject: [PATCH] add --enable-sanitizer --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 1b58b1f8e..a40dfb6a1 100644 --- a/configure.ac +++ b/configure.ac @@ -447,6 +447,12 @@ AC_ARG_ENABLE(linker-hardening, [AS_IF([test x$enableval = xyes],[LDFLAGS="$LDFLAGS -z relro -z now"])]) +AC_ARG_ENABLE(sanitizer, + AS_HELP_STRING(--enable-sanitizer, enable Address Sanitizer and Undefined Behavior Sanitizer), +[AS_IF([test x$enableval = xyes],[ + LDFLAGS="$CFLAGS -fsanitize=address,undefined -fno-omit-frame-pointer" + ])]) + # logging extra_logging=0 AC_ARG_ENABLE([logging],