mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 12:33:44 +02:00
Enable x64 ASM Salsa20/12 on Linux.
This commit is contained in:
parent
a1e94154be
commit
6551c20005
1 changed files with 8 additions and 0 deletions
|
@ -83,9 +83,11 @@ CC_MACH=$(shell $(CC) -dumpmachine | cut -d '-' -f 1)
|
||||||
ZT_ARCHITECTURE=0
|
ZT_ARCHITECTURE=0
|
||||||
ifeq ($(CC_MACH),x86_64)
|
ifeq ($(CC_MACH),x86_64)
|
||||||
ZT_ARCHITECTURE=2
|
ZT_ARCHITECTURE=2
|
||||||
|
ZT_USE_X64_ASM_SALSA2012=1
|
||||||
endif
|
endif
|
||||||
ifeq ($(CC_MACH),amd64)
|
ifeq ($(CC_MACH),amd64)
|
||||||
ZT_ARCHITECTURE=2
|
ZT_ARCHITECTURE=2
|
||||||
|
ZT_USE_X64_ASM_SALSA2012=1
|
||||||
endif
|
endif
|
||||||
ifeq ($(CC_MACH),i386)
|
ifeq ($(CC_MACH),i386)
|
||||||
ZT_ARCHITECTURE=1
|
ZT_ARCHITECTURE=1
|
||||||
|
@ -130,6 +132,12 @@ ifeq ($(ZT_ARCHITECTURE),4)
|
||||||
override DEFS+=-DZT_NO_TYPE_PUNNING
|
override DEFS+=-DZT_NO_TYPE_PUNNING
|
||||||
endif
|
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
|
# Static builds, which are currently done for a number of Linux targets
|
||||||
ifeq ($(ZT_STATIC),1)
|
ifeq ($(ZT_STATIC),1)
|
||||||
override LDFLAGS+=-static
|
override LDFLAGS+=-static
|
||||||
|
|
Loading…
Add table
Reference in a new issue