Commit 629b5e87 authored by Andrew Turner's avatar Andrew Turner
Browse files

Add an arm64 sha512 feature check

This is only available in recent toolchains. Check for it so we can
use it in libmd.

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33166
parent 73d41cc7
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# - retpoline: supports the retpoline speculative execution vulnerability # - retpoline: supports the retpoline speculative execution vulnerability
# mitigation. # mitigation.
# - init-all: supports stack variable initialization. # - init-all: supports stack variable initialization.
# - aarch64-sha512: supports the AArch64 sha512 intrinsic functions.
# #
# When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES # When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES
# to differentiate Apple's version of Clang. Apple Clang uses a different # to differentiate Apple's version of Clang. Apple Clang uses a different
...@@ -255,6 +256,13 @@ ${X_}COMPILER_FEATURES+= compressed-debug ...@@ -255,6 +256,13 @@ ${X_}COMPILER_FEATURES+= compressed-debug
${X_}COMPILER_FEATURES+= fileprefixmap ${X_}COMPILER_FEATURES+= fileprefixmap
.endif .endif
.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 130000) || \
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 90000)
# AArch64 sha512 intrinsics are supported (and have been tested) in
# clang 13 and gcc 9.
${X_}COMPILER_FEATURES+= aarch64-sha512
.endif
.else .else
# Use CC's values # Use CC's values
X_COMPILER_TYPE= ${COMPILER_TYPE} X_COMPILER_TYPE= ${COMPILER_TYPE}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment