From 1245f7b31d25eb562a43a33bab46058abbbff710 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Thu, 30 May 2019 16:37:01 +0200 Subject: crypo_ia32: don't optimize debug builds Type: fix Fixes: d5023a72 Change-Id: I17cf7887d1274cf3ca9301ec87b8c8f539359456 Signed-off-by: Damjan Marion --- src/plugins/crypto_ia32/CMakeLists.txt | 2 +- src/plugins/crypto_ia32/aes_cbc.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/crypto_ia32/CMakeLists.txt b/src/plugins/crypto_ia32/CMakeLists.txt index b01c57b9f6f..850eb4dbe88 100644 --- a/src/plugins/crypto_ia32/CMakeLists.txt +++ b/src/plugins/crypto_ia32/CMakeLists.txt @@ -29,6 +29,6 @@ foreach(VARIANT ${VARIANTS}) set(l crypto_ia32_${v}) add_library(${l} OBJECT aes_cbc.c) set_target_properties(${l} PROPERTIES POSITION_INDEPENDENT_CODE ON) - target_compile_options(${l} PUBLIC ${f} -O3 -Wall -fno-common) + target_compile_options(${l} PUBLIC ${f} -Wall -fno-common) target_sources(crypto_ia32_plugin PRIVATE $) endforeach() diff --git a/src/plugins/crypto_ia32/aes_cbc.c b/src/plugins/crypto_ia32/aes_cbc.c index 2c08aa207ac..4ad01b52b29 100644 --- a/src/plugins/crypto_ia32/aes_cbc.c +++ b/src/plugins/crypto_ia32/aes_cbc.c @@ -22,6 +22,10 @@ #include #include +#if __GNUC__ > 4 && !__clang__ && CLIB_DEBUG == 0 +#pragma GCC optimize ("O3") +#endif + typedef struct { __m128i encrypt_key[15]; -- cgit 1.2.3-korg