From 96c90d18c2b0b036a90aa19337424c939391b1ac Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 24 Oct 2019 19:20:05 +0200 Subject: Linux/MacOSX: Better approach to avoid that jitterentropy code is optimized by the compiler --- src/Crypto/jitterentropy-base.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Crypto') diff --git a/src/Crypto/jitterentropy-base.c b/src/Crypto/jitterentropy-base.c index c05f0c37..50544acb 100644 --- a/src/Crypto/jitterentropy-base.c +++ b/src/Crypto/jitterentropy-base.c @@ -57,7 +57,11 @@ #pragma optimize( "", off ) #pragma warning(disable:4242 4244 4334) /* disable warnings on the original code */ #else -#pragma GCC optimize ("O0") +#if defined(__clang__) + #pragma clang optimize off +#elif defined (__GNUC__) + #pragma GCC optimize ("O0") +#endif #endif #include "jitterentropy.h" -- cgit v1.2.3