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
|
PLATFORM := Linux
|
||||||
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
|
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
|
||||||
|
|
||||||
CFLAGS += -msse2
|
ifneq "$(CPU_ARCH)" "unknown"
|
||||||
CXXFLAGS += -msse2
|
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_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)
|
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"
|
ifeq "$(GCC_GTEQ_440)" "1"
|
||||||
CFLAGS += -maes
|
CFLAGS += -maes
|
||||||
CXXFLAGS += -maes
|
CXXFLAGS += -maes
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq "$(GCC_GTEQ_430)" "1"
|
|
||||||
ifeq "$(origin SSSE3)" "command line"
|
|
||||||
CFLAGS += -mssse3 -msse4.1
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq "$(origin SSE41)" "command line"
|
ifeq "$(GCC_GTEQ_430)" "1"
|
||||||
CXXFLAGS += -mssse3 -msse4.1
|
ifeq "$(origin SSSE3)" "command line"
|
||||||
|
CFLAGS += -mssse3 -msse4.1
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq "$(origin SSE41)" "command line"
|
||||||
|
CXXFLAGS += -mssse3 -msse4.1
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user