defs-dist.mk: Support USE_STACK_PROTECTOR and USE_STACK_CHECKER

Add support for make variables USE_STACK_PROTECTOR and USE_STACK_CHECKER

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2016-03-20 20:22:59 +00:00
commit ea02655437
3 changed files with 18 additions and 3 deletions

View file

@ -841,8 +841,19 @@ ifeq ($(USE_MCHECK),true)
endif
ifeq ($(USE_STACK_PROTECTOR),true)
BUILD_CFLAGS+= -fstack-protector-all
# BUILD_CFLAGS+= -fstack-protector
BUILD_CFLAGS += -fstack-protector-all
BUILD_CPPFLAGS += -fstack-protector-all
# BUILD_CFLAGS += -fstack-protector
endif
ifeq ($(USE_STACK_CHECKER),true)
ifeq "$(COMPILER_SUITE)" "clang"
BUILD_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
BUILD_CPPFLAGS += -fsanitize=address -fno-omit-frame-pointer
BUILD_LDFLAGS += -fsanitize=address
else
endif
endif
ifeq ($(USE_DBMALLOC),true)