Don't enable intrinsics on x86 without ABI support.
At some point after GCC 7.3, but before 8.2, GCC enabled the SSE ABI by
default. However, if it isn't enabled, the vector intrinsics in HRSS
cannot be used. (See https://github.com/grpc/grpc/issues/17540.)
Note that the intrinsics used are SSE2, but that should be ok because
they are guarded by a run-time check. The compile-time check for __SSE__
just ensures that GCC will build the code at all. (SDE does not simulate
anything that doesn't have SSE2, however.)
Reviewed-by: David Benjamin <email@example.com>
Commit-Queue: David Benjamin <firstname.lastname@example.org>
diff --git a/crypto/hrss/hrss.c b/crypto/hrss/hrss.c
index d9ed0d9..ff68e9b 100644
@@ -62,7 +62,7 @@
// NEON and SSE2 for implementing some vector operations.
// TODO: MSVC can likely also be made to work with vector operations.
-#if (defined(OPENSSL_X86) || defined(OPENSSL_X86_64)) && \
+#if ((defined(__SSE__) && defined(OPENSSL_X86)) || defined(OPENSSL_X86_64)) && \
(defined(__clang__) || !defined(_MSC_VER))