[PATCH] osmo-iuh[master]: add --enable-sanitize config 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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Nov 17 02:38:17 UTC 2017


Review at  https://gerrit.osmocom.org/4888

add --enable-sanitize config option

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


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/88/4888/1

diff --git a/configure.ac b/configure.ac
index ff0501a..4c5f47f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,18 @@
 dnl checks for header files
 AC_HEADER_STDC
 
+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
+
 AC_OUTPUT(
 	libosmo-ranap.pc
 	src/Makefile

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9bb6cc982cd30b86f772207184398af6b899f66
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list