Enable x64 ASM Salsa20/12 on Linux.

This commit is contained in:
Adam Ierymenko 2017-04-18 08:57:32 -07:00
parent a1e94154be
commit 6551c20005

View File

@ -83,9 +83,11 @@ CC_MACH=$(shell $(CC) -dumpmachine | cut -d '-' -f 1)
ZT_ARCHITECTURE=0
ifeq ($(CC_MACH),x86_64)
ZT_ARCHITECTURE=2
ZT_USE_X64_ASM_SALSA2012=1
endif
ifeq ($(CC_MACH),amd64)
ZT_ARCHITECTURE=2
ZT_USE_X64_ASM_SALSA2012=1
endif
ifeq ($(CC_MACH),i386)
ZT_ARCHITECTURE=1
@ -130,6 +132,12 @@ ifeq ($(ZT_ARCHITECTURE),4)
override DEFS+=-DZT_NO_TYPE_PUNNING
endif
# Use X64 ASM Salsa20/12 on X86_64 target
ifeq ($(ZT_USE_X64_ASM_SALSA2012),1)
override DEFS+=-DZT_USE_X64_ASM_SALSA2012
override OBJS+=ext/x64-salsa2012-asm/salsa2012.o
endif
# Static builds, which are currently done for a number of Linux targets
ifeq ($(ZT_STATIC),1)
override LDFLAGS+=-static