From bc0f943c6bfb3cf1dad50154953722d325d6b998 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 20 May 2017 17:59:21 -0400 Subject: [PATCH] Add defines for GCC_INLINE and GCC_INLINE_ATTRIB (Issues 427 and 428) --- cpu.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cpu.h b/cpu.h index 8d1db36e..d833f95c 100644 --- a/cpu.h +++ b/cpu.h @@ -32,6 +32,18 @@ # endif #endif // ARM32 and ARM64 Headers +// Used when supplying ASM due to missing intrinsics +#if defined(__clang__) +# define GCC_INLINE inline +# define GCC_INLINE_ATTRIB __attribute__((__gnu_inline__, __always_inline__)) +#elif (CRYPTOPP_GCC_VERSION >= 30300) || defined(__INTEL_COMPILER) +# define GCC_INLINE __inline +# define GCC_INLINE_ATTRIB __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +#else +# define GCC_INLINE inline +# define GCC_INLINE_ATTRIB +# endif + // X86/X64/X32 Headers #if CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64