Cleanup, fix a valgrind error, stack use reduction.

This commit is contained in:
Adam Ierymenko 2017-04-27 00:59:36 -07:00
commit 9e80db0fd1
11 changed files with 4217 additions and 2120 deletions

View file

@ -8,7 +8,7 @@ ifeq ($(origin CXX),default)
endif
INCLUDES?=
DEFS?=-D_FORTIFY_SOURCE=2
DEFS?=
LDLIBS?=
DESTDIR?=
@ -55,14 +55,15 @@ endif
ifeq ($(ZT_DEBUG),1)
override DEFS+=-DZT_TRACE
override CFLAGS+=-Wall -g -O -pthread $(INCLUDES) $(DEFS)
override CXXFLAGS+=-Wall -g -O -std=c++11 -pthread $(INCLUDES) $(DEFS)
override CFLAGS+=-Wall -g -pthread $(INCLUDES) $(DEFS)
override CXXFLAGS+=-Wall -g -std=c++11 -pthread $(INCLUDES) $(DEFS)
override LDFLAGS+=
STRIP?=echo
# The following line enables optimization for the crypto code, since
# C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box!
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CFLAGS = -Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS)
else
override DEFS+=-D_FORTIFY_SOURCE=2
CFLAGS?=-O3 -fstack-protector
override CFLAGS+=-Wall -fPIE -pthread $(INCLUDES) -DNDEBUG $(DEFS)
CXXFLAGS?=-O3 -fstack-protector