From ad3bfcaaa57b9adad753b61b7cdfe6fee38995b8 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Fri, 13 Nov 2020 14:56:18 +0300 Subject: [PATCH] use -maes key when building with AES-NI --- Makefile.linux | 2 +- build/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile.linux b/Makefile.linux index b544056f..6a7590c1 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -59,6 +59,6 @@ endif ifeq ($(USE_AESNI),yes) ifeq (, $(findstring arm, $(SYS))$(findstring aarch64, $(SYS))) # no arm and aarch64 in dumpmachine - NEEDED_CXXFLAGS += -D__AES__ + NEEDED_CXXFLAGS += -D__AES__ -maes endif endif diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index 842b88d4..6f9fbae6 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -191,6 +191,7 @@ endif() # Note: AES-NI and AVX is available on x86-based CPU's. # Here also ARM64 implementation, but currently we don't support it. if(WITH_AESNI AND (ARCHITECTURE MATCHES "x86_64" OR ARCHITECTURE MATCHES "i386")) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") add_definitions(-D__AES__) endif()