mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-05 20:43:12 +08:00
feat(mfd_aes_brute): detect march and mcpu
fix build on riscv64
This commit is contained in:
parent
079689628b
commit
79540b1d33
1 changed files with 10 additions and 8 deletions
|
@ -5,15 +5,15 @@ 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
|
||||
# iOS 'fun'
|
||||
else ifneq ($(findstring iP, $(cpu_arch)), )
|
||||
MYCFLAGS += -mcpu=native
|
||||
else
|
||||
SUPPORT_MARCH := $(shell $(CC) -xc /dev/null -c -o /dev/null -march=native > /dev/null 2>/dev/null && echo y)
|
||||
SUPPORT_MCPU := $(shell $(CC) -xc /dev/null -c -o /dev/null -mcpu=native > /dev/null 2>/dev/null && echo y)
|
||||
|
||||
ifeq ($(DONT_BUILD_NATIVE),y)
|
||||
# do nothing
|
||||
else ifeq ($(SUPPORT_MARCH),y)
|
||||
MYCFLAGS += -march=native
|
||||
else ifeq ($(SUPPORT_MCPU),y)
|
||||
MYCFLAGS += -mcpu=native
|
||||
endif
|
||||
|
||||
ifneq ($(SKIPPTHREAD),1)
|
||||
|
@ -43,6 +43,8 @@ ifeq ($(USE_MACPORTS),1)
|
|||
MYLDFLAGS += -L$(MACPORTS_PREFIX)/lib/openssl-3 -L$(MACPORTS_PREFIX)/lib/openssl-1.1
|
||||
endif
|
||||
|
||||
showinfo: $(info c flags: $(MYCFLAGS))
|
||||
|
||||
brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)
|
||||
|
||||
mfd_aes_brute : $(OBJDIR)/mfd_aes_brute.o $(MYOBJS)
|
||||
|
|
Loading…
Reference in a new issue