mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
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:
parent
bc7da6906e
commit
ea02655437
3 changed files with 18 additions and 3 deletions
|
|
@ -274,6 +274,8 @@ COMPILE_DEBUG_CODE ?= true
|
|||
#COMPILE_DEBUG_LOG ?= true
|
||||
USE_COMPILER_DEBUG_OPTS ?= true
|
||||
#USE_COMPILER_OPTIMIZATION_OPTS ?= true
|
||||
USE_STACK_PROTECTOR ?= true
|
||||
#USE_STACK_CHECKER ?= true
|
||||
|
||||
#USE_FUSE ?= true
|
||||
#USE_SNDFILE ?= true
|
||||
|
|
|
|||
|
|
@ -273,7 +273,9 @@ LOG_THREAD_NAMES ?= true
|
|||
#COMPILE_DEBUG_CODE ?= true
|
||||
#COMPILE_DEBUG_LOG ?= true
|
||||
USE_COMPILER_DEBUG_OPTS ?= true
|
||||
#USE_COMPILER_OPTIMIZATION_OPTS ?= true
|
||||
USE_COMPILER_OPTIMIZATION_OPTS ?= true
|
||||
USE_STACK_PROTECTOR ?= true
|
||||
#USE_STACK_CHECKER ?= true
|
||||
|
||||
#USE_FUSE ?= true
|
||||
#USE_SNDFILE ?= true
|
||||
|
|
|
|||
11
make/defs.mk
11
make/defs.mk
|
|
@ -842,9 +842,20 @@ endif
|
|||
|
||||
ifeq ($(USE_STACK_PROTECTOR),true)
|
||||
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)
|
||||
CONTRIB_LIBS += dbmalloc
|
||||
BUILD_CFLAGS+= -DDBMALLOC -DEXITFUN=_exit -I$(TOPDIR)/contrib/dbmalloc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue