crypto: add '-maes' compile switch 91/21191/2
authorBenoît Ganne <bganne@cisco.com>
Fri, 9 Aug 2019 12:07:23 +0000 (14:07 +0200)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 9 Aug 2019 16:17:43 +0000 (16:17 +0000)
AES intrinsics use builtins available only with the -maes and GCC 9 just
started to enforce it.

Type: fix

Change-Id: Ia6825ea3eae7191a4bfee47f9fa93fad16ccf76c
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/plugins/crypto_ia32/CMakeLists.txt
src/plugins/crypto_ipsecmb/CMakeLists.txt

index d619076..cab1c35 100644 (file)
@@ -29,6 +29,6 @@ foreach(VARIANT ${VARIANTS})
   set(l crypto_ia32_${v})
   add_library(${l} OBJECT aes_cbc.c aes_gcm.c)
   set_target_properties(${l} PROPERTIES POSITION_INDEPENDENT_CODE ON)
-  target_compile_options(${l} PUBLIC ${f} -Wall -fno-common)
+  target_compile_options(${l} PUBLIC ${f} -Wall -fno-common -maes)
   target_sources(crypto_ia32_plugin PRIVATE $<TARGET_OBJECTS:${l}>)
 endforeach()
index 86e33a2..59bfe24 100644 (file)
@@ -33,7 +33,7 @@ if(IPSECMB_INCLUDE_DIR AND IPSECMB_LIB)
                ${IPSECMB_LINK_FLAGS}
                )
 
-       target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont")
+       target_compile_options(crypto_ipsecmb_plugin PRIVATE "-march=silvermont" "-maes")
        message(STATUS "Intel IPSecMB found: ${IPSECMB_INCLUDE_DIR}")
 else()
        message(STATUS "Intel IPSecMB not found")