mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Fix arch detection for auto setting of clang flags
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -22,8 +22,17 @@
|
|||||||
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
|
* http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__aarch64__) && !defined(__ARM_FEATURE_CRYPTO) && \
|
#if defined(__clang__) && (__clang_major__ >= 4)
|
||||||
defined(__clang__) && __clang_major__ >= 4
|
|
||||||
|
/* Ideally, we would simply use MBEDTLS_ARCH_IS_ARMV8 in the following #if,
|
||||||
|
* but that is defined by build_info.h, and we need this block to happen first. */
|
||||||
|
#if defined(__ARM_ARCH)
|
||||||
|
#if __ARM_ARCH >= 8
|
||||||
|
#define MBEDTLS_SHA256_ARCH_IS_ARMV8
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SHA256_ARCH_IS_ARMV8) && !defined(__ARM_FEATURE_CRYPTO)
|
||||||
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
/* TODO: Re-consider above after https://reviews.llvm.org/D131064 merged.
|
||||||
*
|
*
|
||||||
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
* The intrinsic declaration are guarded by predefined ACLE macros in clang:
|
||||||
@ -44,6 +53,8 @@
|
|||||||
#define MBEDTLS_ENABLE_ARM_CRYPTO_EXTENSIONS_COMPILER_FLAG
|
#define MBEDTLS_ENABLE_ARM_CRYPTO_EXTENSIONS_COMPILER_FLAG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* defined(__clang__) && (__clang_major__ >= 4) */
|
||||||
|
|
||||||
/* Ensure that SIG_SETMASK is defined when -std=c99 is used. */
|
/* Ensure that SIG_SETMASK is defined when -std=c99 is used. */
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user