VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-07 23:45:34 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-08-08 00:11:22 +0200
commit3fb2eedab8ef586cd2686efba0b668a5070fd0af (patch)
treebee18aa880bb5ffa718ead20086984b600ffb966 /src/Makefile
parentfe31cf5b83383cbc02f5bc31411367c0128f2df6 (diff)
downloadVeraCrypt-3fb2eedab8ef586cd2686efba0b668a5070fd0af.tar.gz
VeraCrypt-3fb2eedab8ef586cd2686efba0b668a5070fd0af.zip
Linux: Enable gcc AES-NI built-in functions and adapt Hyper-V AES detection code to gcc.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 70fb26da..4f0a6559 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -160,6 +160,12 @@ ifeq "$(shell uname -s)" "Linux"
PLATFORM := Linux
C_CXX_FLAGS += -DTC_UNIX -DTC_LINUX
+
+ 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)
+ ifeq "$(GCC_GTEQ_440)" "1"
+ CFLAGS += -maes
+ CXXFLAGS += -maes
+ endif
ifeq "$(TC_BUILD_CONFIG)" "Release"
C_CXX_FLAGS += -fdata-sections -ffunction-sections