From 4904a951cee1cccc424058db201fa73258bda26a Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 10 May 2017 01:28:25 -0400 Subject: [PATCH] Fix bad code generation with GCC, -Os and rdseed --- rdrand.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdrand.cpp b/rdrand.cpp index ab2c5093..f9dab893 100644 --- a/rdrand.cpp +++ b/rdrand.cpp @@ -69,12 +69,12 @@ # define GCC_RDSEED_ASM_AVAILABLE 1 # endif # elif defined(CRYPTOPP_GCC_VERSION) -# if defined(__RDRND__) && (CRYPTOPP_GCC_VERSION >= 40600) +# if defined(__RDRND__) && (CRYPTOPP_GCC_VERSION >= 40600) && !defined(__OPTIMIZE_SIZE__) # define ALL_RDRAND_INTRIN_AVAILABLE 1 # else # define GCC_RDRAND_ASM_AVAILABLE 1 # endif -# if defined(__RDSEED__) && (CRYPTOPP_GCC_VERSION >= 40600) +# if defined(__RDSEED__) && (CRYPTOPP_GCC_VERSION >= 40600) && !defined(__OPTIMIZE_SIZE__) # define ALL_RDSEED_INTRIN_AVAILABLE 1 # else # define GCC_RDSEED_ASM_AVAILABLE 1