cmake: disable AES on ARM

On ARM, gcc fails with 'unknown argument' if passed '-maes'.
This commit is contained in:
redfish 2016-06-21 20:08:10 -04:00
parent 804b1bc197
commit c6501607f3
1 changed files with 3 additions and 1 deletions

View File

@ -339,10 +339,12 @@ else()
option(NO_AES "Explicitly disable AES support" ${NO_AES}) option(NO_AES "Explicitly disable AES support" ${NO_AES})
if (NOT NO_AES) if(NOT NO_AES AND NOT (ARM6 OR ARM7))
message(STATUS "AES support enabled") message(STATUS "AES support enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes")
elseif(ARM7 OR ARM6)
message(STATUS "AES support disabled (not available on ARM)")
else() else()
message(STATUS "AES support disabled") message(STATUS "AES support disabled")
endif() endif()