Add '--enable-sanitize' from other osmocom projects
Change-Id: Iac9ce76ce4ca5f5247bc42c16bb365d94cfde156
This commit is contained in:
parent
66a60a13b6
commit
134d0a386d
12
configure.ac
12
configure.ac
|
@ -24,6 +24,18 @@ case "$host" in
|
||||||
*) AC_MSG_ERROR([Linux only, dude!]);;
|
*) AC_MSG_ERROR([Linux only, dude!]);;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
|
regular_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_REENTRANT"
|
||||||
regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
|
regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
|
||||||
-Wmissing-prototypes -Wshadow -Wstrict-prototypes \
|
-Wmissing-prototypes -Wshadow -Wstrict-prototypes \
|
||||||
|
|
|
@ -5,7 +5,7 @@ set -ex
|
||||||
osmo-clean-workspace.sh
|
osmo-clean-workspace.sh
|
||||||
|
|
||||||
autoreconf --install --force
|
autoreconf --install --force
|
||||||
./configure CFLAGS="-Werror" CPPFLAGS="-Werror"
|
./configure --enable-sanitize CFLAGS="-Werror" CPPFLAGS="-Werror"
|
||||||
$MAKE $PARALLEL_MAKE
|
$MAKE $PARALLEL_MAKE
|
||||||
$MAKE distcheck
|
$MAKE distcheck
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue