mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Linux: don't use SSE/AES switched of gcc if the architecture is not x86 or x64 (for example ARM).
This commit is contained in:
30
src/Makefile
30
src/Makefile
@@ -163,23 +163,25 @@ ifeq "$(shell uname -s)" "Linux"
|
||||
PLATFORM := Linux
|
||||
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
|
||||
|
||||
CFLAGS += -msse2
|
||||
CXXFLAGS += -msse2
|
||||
ifneq "$(CPU_ARCH)" "unknown"
|
||||
CFLAGS += -msse2
|
||||
CXXFLAGS += -msse2
|
||||
|
||||
GCC_GTEQ_440 := $(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/'` \>= 40400)
|
||||
GCC_GTEQ_430 := $(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/'` \>= 40300)
|
||||
ifeq "$(GCC_GTEQ_440)" "1"
|
||||
CFLAGS += -maes
|
||||
CXXFLAGS += -maes
|
||||
endif
|
||||
|
||||
ifeq "$(GCC_GTEQ_430)" "1"
|
||||
ifeq "$(origin SSSE3)" "command line"
|
||||
CFLAGS += -mssse3 -msse4.1
|
||||
GCC_GTEQ_440 := $(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/'` \>= 40400)
|
||||
GCC_GTEQ_430 := $(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/'` \>= 40300)
|
||||
ifeq "$(GCC_GTEQ_440)" "1"
|
||||
CFLAGS += -maes
|
||||
CXXFLAGS += -maes
|
||||
endif
|
||||
|
||||
ifeq "$(origin SSE41)" "command line"
|
||||
CXXFLAGS += -mssse3 -msse4.1
|
||||
ifeq "$(GCC_GTEQ_430)" "1"
|
||||
ifeq "$(origin SSSE3)" "command line"
|
||||
CFLAGS += -mssse3 -msse4.1
|
||||
endif
|
||||
|
||||
ifeq "$(origin SSE41)" "command line"
|
||||
CXXFLAGS += -mssse3 -msse4.1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user