From: Damjan Marion Date: Thu, 30 May 2019 14:37:01 +0000 (+0200) Subject: crypo_ia32: don't optimize debug builds X-Git-Tag: v20.01-rc0~505 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F19902%2F2;p=vpp.git crypo_ia32: don't optimize debug builds Type: fix Fixes: d5023a72 Change-Id: I17cf7887d1274cf3ca9301ec87b8c8f539359456 Signed-off-by: Damjan Marion --- 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];