From 5bcb626c847a10e2e631118b637c9db25593cdea Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Thu, 8 Aug 2024 22:21:49 +0000 Subject: [PATCH] Add preprocessor bits for the EDK2 target. Change-Id: I93abd9fffa70f8c4254dd23f2532afc4b752df96 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/70069 Commit-Queue: David Benjamin Commit-Queue: Adam Langley Reviewed-by: David Benjamin Auto-Submit: Adam Langley --- crypto/internal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crypto/internal.h b/crypto/internal.h index 6d5736d5d..89d1e80e9 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -217,7 +217,9 @@ typedef __uint128_t uint128_t; // __uint128_t division depends on intrinsics in the compiler runtime. Those // intrinsics are missing in clang-cl (https://crbug.com/787617) and nanolibc. // These may be bugs in the toolchain definition, but just disable it for now. -#if !defined(_MSC_VER) && !defined(OPENSSL_NANOLIBC) +// EDK2's toolchain is missing __udivti3 (b/339380897) so cannot support +// 128-bit division currently. +#if !defined(_MSC_VER) && !defined(OPENSSL_NANOLIBC) && !defined(__EDK2_BORINGSSL__) #define BORINGSSL_CAN_DIVIDE_UINT128 #endif #endif