Skip to content

Commit

Permalink
Resolves an issue when building sha2 using arm crypto extensions with…
Browse files Browse the repository at this point in the history
… gcc on Darwin. (#1184)
  • Loading branch information
Martyrshot authored Feb 1, 2022
1 parent fb8f0ff commit 5b8e2bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ else()
elseif (OQS_USE_ARM_SHA2_INSTRUCTIONS)
# Assume we are compiling native
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()

Expand Down
2 changes: 1 addition & 1 deletion src/common/sha2/sha2_local.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* \file sha2.h
* \file sha2_local.h
* \brief Internal SHA2 functions that enable easy switching between native instructions
* and c implementations
*
Expand Down

0 comments on commit 5b8e2bd

Please sign in to comment.