diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-14 00:46:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@2a01:4f8:191:444b:0:0:2:12> | 2018-02-14 00:46:04 +0000 |
commit | 1bb3ef6d9012600daa20d34e629ab2a06e21aeb5 (patch) | |
tree | de1a032de3295916d05e91df54ee15c5eb9ffd25 | |
parent | 35c45f2dc57b7327195622299fc9708bd953dc2e (diff) | |
parent | 725e0038ee7400efa2d99b203b6d43f8ee6fe92e (diff) |
Merge "Add --enable-sanitize configure option"
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8eef951..8b6a489 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,15 @@ AC_SUBST(LTLDFLAGS_OSMOGAPK) # 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) |