mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
Make NEON build detection a bit more robust
This commit is contained in:
parent
8ccda0ea91
commit
4f345be6e8
2 changed files with 31 additions and 1 deletions
|
@ -13,6 +13,9 @@ endif
|
|||
ifneq ($(findstring amd64, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=x86
|
||||
endif
|
||||
ifneq ($(findstring arm, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=arm
|
||||
endif
|
||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=arm64
|
||||
endif
|
||||
|
@ -24,13 +27,14 @@ ifneq ($(IS_SIMD_ARCH), )
|
|||
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
||||
endif
|
||||
ifeq ($(MULTIARCHSRCS), )
|
||||
MYCFLAGS += -DNOSIMD_BUILD
|
||||
MYSRCS += hardnested_bf_core.c hardnested_bitarray_core.c
|
||||
endif
|
||||
|
||||
LIB_A = libhardnested.a
|
||||
|
||||
MYOBJS = $(MYSRCS:%.c=$(OBJDIR)/%.o)
|
||||
ifeq ($(IS_SIMD_ARCH), arm64)
|
||||
ifneq ($(findstring arm, $(IS_SIMD_ARCH)), )
|
||||
MYOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
|
||||
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NEON.o)
|
||||
else
|
||||
|
@ -54,6 +58,11 @@ ifeq ($(IS_SIMD_ARCH), arm64)
|
|||
SUPPORTS_AVX512=False
|
||||
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
||||
endif
|
||||
ifeq ($(IS_SIMD_ARCH), arm)
|
||||
SUPPORTS_AVX512=False
|
||||
HARD_SWITCH_NEON = -mfpu=neon
|
||||
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
||||
endif
|
||||
ifeq "$(SUPPORTS_AVX512)" "True"
|
||||
HARD_SWITCH_NOSIMD += -mno-avx512f
|
||||
HARD_SWITCH_MMX += -mno-avx512f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue