[MERGED] osmo-bts[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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Dec 21 17:57:29 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: Add --enable-sanitize configure option
......................................................................


Add --enable-sanitize configure option

Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1
---
M configure.ac
1 file changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/configure.ac b/configure.ac
index e3ea9ca..89443d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,15 @@
 
 dnl Checks for typedefs, structures and compiler characteristics
 
+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
+
 dnl checks for libraries
 PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore  >= 0.10.0)
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.10.0)

-- 
To view, visit https://gerrit.osmocom.org/5545
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e31e20ef2361c8f251f3ab04a0ac86e23d2e8a1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list