Review at https://gerrit.osmocom.org/6382
Add --enable-sanitize configure option Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/gapk refs/changes/82/6382/1 diff --git a/configure.ac b/configure.ac index 180e380..018c479 100644 --- a/configure.ac +++ b/configure.ac @@ -61,6 +61,15 @@ # Checks for programs. AC_PROG_CC +AC_ARG_ENABLE(sanitize, + [AS_HELP_STRING([--enable-sanitize], [Compile with address sanitizer enabled], )], + [sanitize=$enableval], [sanitize="no"]) +if test x"$sanitize" = x"yes" +then + CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined" + CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined" +fi + # Checks for libraries. # libosmocore (codec module) PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.2) -- To view, visit https://gerrit.osmocom.org/6382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max <msur...@sysmocom.de>