aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-05-30 16:37:01 +0200
committerDave Barach <openvpp@barachs.net>2019-05-31 11:41:42 +0000
commit1245f7b31d25eb562a43a33bab46058abbbff710 (patch)
tree7fa4a1cbd29ba782bb5568361311956b250365bb /src/plugins
parentd305bb5249b6b2677c90265507bff6467fd7cab6 (diff)
crypo_ia32: don't optimize debug builds
Type: fix Fixes: d5023a72 Change-Id: I17cf7887d1274cf3ca9301ec87b8c8f539359456 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/crypto_ia32/CMakeLists.txt2
-rw-r--r--src/plugins/crypto_ia32/aes_cbc.c4
2 files changed, 5 insertions, 1 deletions
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 $<TARGET_OBJECTS:${l}>)
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 <crypto_ia32/crypto_ia32.h>
#include <crypto_ia32/aesni.h>
+#if __GNUC__ > 4 && !__clang__ && CLIB_DEBUG == 0
+#pragma GCC optimize ("O3")
+#endif
+
typedef struct
{
__m128i encrypt_key[15];