Resolves an issue when building sha2 using arm crypto extensions with gcc on Darwin. (#1184)

This commit is contained in:
Jason Goertzen 2022-02-01 15:04:24 -06:00 committed by GitHub
parent fb8f0ffa18
commit 5b8e2bd4d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,9 @@ else()
elseif (OQS_USE_ARM_SHA2_INSTRUCTIONS) elseif (OQS_USE_ARM_SHA2_INSTRUCTIONS)
# Assume we are compiling native # Assume we are compiling native
set(SHA2_IMPL ${SHA2_IMPL} sha2/sha2_ni.c) set(SHA2_IMPL ${SHA2_IMPL} sha2/sha2_ni.c)
if ((CMAKE_SYSTEM_NAME MATCHES "Darwin") AND (${CMAKE_C_COMPILER_ID} STREQUAL "GNU"))
set_source_files_properties(sha2/sha2_ni.c PROPERTIES COMPILE_FLAGS -march=armv8-a+crypto)
endif()
endif() endif()
endif() endif()

View File

@ -1,5 +1,5 @@
/** /**
* \file sha2.h * \file sha2_local.h
* \brief Internal SHA2 functions that enable easy switching between native instructions * \brief Internal SHA2 functions that enable easy switching between native instructions
* and c implementations * and c implementations
* *