mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-06 13:03:19 +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 =
|
MYDEFS =
|
||||||
MYLDLIBS = -lcrypto
|
MYLDLIBS = -lcrypto
|
||||||
|
|
||||||
# A better way would be to just try compiling with march and seeing if we succeed
|
SUPPORT_MARCH := $(shell $(CC) -xc /dev/null -c -o /dev/null -march=native > /dev/null 2>/dev/null && echo y)
|
||||||
cpu_arch = $(shell uname -m)
|
SUPPORT_MCPU := $(shell $(CC) -xc /dev/null -c -o /dev/null -mcpu=native > /dev/null 2>/dev/null && echo y)
|
||||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
|
||||||
MYCFLAGS += -mcpu=native
|
ifeq ($(DONT_BUILD_NATIVE),y)
|
||||||
# iOS 'fun'
|
# do nothing
|
||||||
else ifneq ($(findstring iP, $(cpu_arch)), )
|
else ifeq ($(SUPPORT_MARCH),y)
|
||||||
MYCFLAGS += -mcpu=native
|
|
||||||
else
|
|
||||||
MYCFLAGS += -march=native
|
MYCFLAGS += -march=native
|
||||||
|
else ifeq ($(SUPPORT_MCPU),y)
|
||||||
|
MYCFLAGS += -mcpu=native
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(SKIPPTHREAD),1)
|
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
|
MYLDFLAGS += -L$(MACPORTS_PREFIX)/lib/openssl-3 -L$(MACPORTS_PREFIX)/lib/openssl-1.1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
showinfo: $(info c flags: $(MYCFLAGS))
|
||||||
|
|
||||||
brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)
|
brute_key : $(OBJDIR)/brute_key.o $(MYOBJS)
|
||||||
|
|
||||||
mfd_aes_brute : $(OBJDIR)/mfd_aes_brute.o $(MYOBJS)
|
mfd_aes_brute : $(OBJDIR)/mfd_aes_brute.o $(MYOBJS)
|
||||||
|
|
Loading…
Reference in a new issue