FIX: gcc version | gcc -dumpversion only exists on later gcc versions. This fix address this problem by using gcc -version instead. Thanks to @winguru

https://github.com/iceman1001/proxmark3/issues/123
This commit is contained in:
iceman1001 2017-08-23 07:37:49 +02:00
parent 6598e12752
commit 2c198f75f5

View file

@ -93,6 +93,7 @@ CMDSRCS = crapto1/crapto1.c \
loclass/cipherutils.c \
loclass/des.c \
loclass/ikeys.c \
loclass/hash1_brute.c \
loclass/elite_crack.c \
loclass/fileutils.c \
whereami.c \
@ -197,7 +198,9 @@ MULTIARCHOBJS = $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX.o) \
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_AVX2.o)
GCC_GTEQ_490 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40900)
#GCC_GTEQ_490 := $(shell expr `gcc -dumpversion | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 40900)
GCC_GTEQ_490 := $(shell expr `gcc --version | awk '/gcc/{print $NF;}' | sed -e 's/\.\([0-9][0-9]\)/\1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` >= 40900)
HARD_SWITCH_NOSIMD = -mno-mmx -mno-sse2 -mno-avx -mno-avx2
HARD_SWITCH_MMX = -mmmx -mno-sse2 -mno-avx -mno-avx2
HARD_SWITCH_SSE2 = -mmmx -msse2 -mno-avx -mno-avx2