Repositories
/
olsrd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: add address santizer, compile with SANITIZE_ADDRESS=1
[olsrd.git]
/
Makefile.inc
diff --git
a/Makefile.inc
b/Makefile.inc
index
dc1122c
..
9f29f74
100644
(file)
--- a/
Makefile.inc
+++ b/
Makefile.inc
@@
-20,6
+20,8
@@
MUDFLAP ?= 0
# shows full compiler/linker calls if activated
VERBOSE ?= 0
# shows full compiler/linker calls if activated
VERBOSE ?= 0
+SANITIZE_ADDRESS ?= 0
+
ifeq ($(VERBOSE),0)
MAKECMDPREFIX = @
else
ifeq ($(VERBOSE),0)
MAKECMDPREFIX = @
else
@@
-186,6
+188,13
@@
ifneq ($(MUDFLAP),0)
LIBS += -lmudflapth
endif
LIBS += -lmudflapth
endif
+ifeq ($(OS),linux)
+ ifneq ($(SANITIZE_ADDRESS),0)
+ CFLAGS += -fsanitize=address -fno-omit-frame-pointer
+ LDFLAGS += -fsanitize=address -static-libasan
+ endif
+endif
+
# extra options from the outside
CPPFLAGS += $(EXTRA_CPPFLAGS)
# extra options from the outside
CPPFLAGS += $(EXTRA_CPPFLAGS)