summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-02 00:51:15 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-02 00:51:15 +0300
commit0b2a9a6937a223ecc6356836da51ed41afc2d00b (patch)
tree121fbe7e92a078d0f1afb5e6c6f185f7787cba62 /src
parent8335b9a7459e1b3a0c4424b9f2a991ed7624f99d (diff)
downloadevol-hercules-0b2a9a6937a223ecc6356836da51ed41afc2d00b.tar.gz
evol-hercules-0b2a9a6937a223ecc6356836da51ed41afc2d00b.tar.bz2
evol-hercules-0b2a9a6937a223ecc6356836da51ed41afc2d00b.tar.xz
evol-hercules-0b2a9a6937a223ecc6356836da51ed41afc2d00b.zip
Enable sanity flags only if they supported.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 25afa53..c2a6cf6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,28 +116,14 @@ SHARED_CFLAGS = ${CFLAGS} -pipe -ffast-math -fvisibility=hidden -std=c99 -Wall -
-DPCRE_SUPPORT -I../../.. -I../../../../3rdparty -DPACKETVER=20150000
SHARED_LDFLAGS = -avoid-version -Wl,--no-undefined
-if ENABLE_SANITIZE
-#skip -fsanitize=alignment
-SHARED_CFLAGS += -fsanitize=address \
--fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
--fsanitize=vla-bound -fsanitize=null -fsanitize=return \
--fsanitize=signed-integer-overflow -fsanitize=bounds \
--fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \
--fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool \
--fsanitize=enum -fsanitize=vptr
-SHARED_LDFLAGS += -lasan -lubsan -fsanitize=address \
--fsanitize=shift -fsanitize=integer-divide-by-zero -fsanitize=unreachable \
--fsanitize=vla-bound -fsanitize=null -fsanitize=return \
--fsanitize=signed-integer-overflow -fsanitize=bounds \
--fsanitize=object-size -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow \
--fsanitize=nonnull-attribute -fsanitize=returns-nonnull-attribute -fsanitize=bool \
--fsanitize=enum -fsanitize=vptr
-endif
-
if ENABLE_STATIC_BUILD
SHARED_CFLAGS += "-static-libgcc"
endif
+if ENABLE_SANITIZE
+SHARED_LDFLAGS += -lasan -lubsan
+endif
+
if ENABLE_GPROF
SHARED_CFLAGS += "-pg"
endif