VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-18 23:10:37 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-18 23:11:51 (GMT)
commita63ae585961cb7c0bdd454c213f04818824dd205 (patch)
treede5fcf4619ae731920d024c962348e9e9370098d /src/Makefile
parent7ad75a81cadc1629dbc1a60e7247e8d1c5ea83a4 (diff)
downloadVeraCrypt-a63ae585961cb7c0bdd454c213f04818824dd205.zip
VeraCrypt-a63ae585961cb7c0bdd454c213f04818824dd205.tar.gz
Linux: don't use SSE/AES switched of gcc if the architecture is not x86 or x64 (for example ARM).
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/Makefile b/src/Makefile
index 0f7ac32..0477d5a 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -163,23 +163,25 @@ ifeq "$(shell uname -s)" "Linux"
PLATFORM := Linux
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
- 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
+ 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 "$(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