[PATCH] gapk[master]: Add --enable-sanitize configure option

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Max gerrit-no-reply at lists.osmocom.org
Mon Feb 12 12:06:07 UTC 2018


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 <msuraev at sysmocom.de>



More information about the gerrit-log mailing list