[MERGED] gapk[master]: Add --enable-sanitize configure option
Harald Welte has submitted this change and it was merged. Change subject: Add --enable-sanitize configure option .. Add --enable-sanitize configure option Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 --- M configure.ac 1 file changed, 9 insertions(+), 0 deletions(-) Approvals: tnt: Looks good to me, but someone else must approve Vadim Yanitskiy: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved; Verified 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: merged Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt
gapk[master]: Add --enable-sanitize configure option
Patch Set 1: Code-Review+2 Verified+1 -- To view, visit https://gerrit.osmocom.org/6382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No
gapk[master]: Add --enable-sanitize configure option
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/6382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No
gapk[master]: Add --enable-sanitize configure option
Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/6382 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibb26e5fc73843f3951dbc534653ee7d88e4c80e7 Gerrit-PatchSet: 1 Gerrit-Project: gapk Gerrit-Branch: master Gerrit-Owner: Max Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: fixeria Gerrit-Reviewer: tnt Gerrit-HasComments: No
[PATCH] gapk[master]: Add --enable-sanitize configure option
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