From 22c27e92a8889ef9f6ea2099db2d71c1befeab68 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Feb 2021 11:24:52 +0100 Subject: [PATCH] Add configure option to enable UndefinedBehaviorSanitizer --- configure.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.in b/configure.in index 7d5c89a3..6b7f944b 100644 --- a/configure.in +++ b/configure.in @@ -168,6 +168,12 @@ if test "x$with_asan" = "xyes"; then LDFLAGS="$LDFLAGS -fsanitize=address" fi +AC_ARG_WITH(usan, [ --with-usan Enable UndefinedBehaviorSanitizer. Requires compiler support.]) +if test "x$with_usan" = "xyes"; then + CFLAGS="$CFLAGS -fsanitize=undefined" + LDFLAGS="$LDFLAGS -fsanitize=undefined" +fi + dnl ================================================================= dnl Check for user and group validity dnl ================================================================= -- 2.39.2