Fix compilation on M1 Macs

This commit is contained in:
Doridian 2022-03-27 10:33:33 -07:00
commit 517ddf4bfc
2 changed files with 10 additions and 1 deletions

View file

@ -1,10 +1,18 @@
MYSRCPATHS = ../../common ../../common/mbedtls
MYSRCS = util_posix.c randoms.c
MYINCLUDES = -I../../include -I../../common -I../../common/mbedtls
MYCFLAGS = -march=native -Ofast
MYCFLAGS = -Ofast
MYDEFS =
MYLDLIBS = -lcrypto
# A better way would be to just try compiling with march and seeing if we succeed
cpu_arch = $(shell uname -m)
ifneq ($(findstring arm64, $(cpu_arch)), )
MYCFLAGS += -mcpu=native
else
MYCFLAGS += -march=native
endif
ifneq ($(SKIPPTHREAD),1)
MYLDLIBS += -lpthread
endif