Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bfe612b7
Commit
bfe612b7
authored
Sep 17, 2020
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-23663 - Add HAVE_INTEL_RDRAND flag for building WolfSSL, where appropiate
parent
de76bebc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
extra/wolfssl/CMakeLists.txt
extra/wolfssl/CMakeLists.txt
+14
-5
extra/wolfssl/user_settings.h.in
extra/wolfssl/user_settings.h.in
+1
-0
No files found.
extra/wolfssl/CMakeLists.txt
View file @
bfe612b7
...
...
@@ -19,6 +19,8 @@ ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
MY_CHECK_C_COMPILER_FLAG
(
-maes
)
MY_CHECK_C_COMPILER_FLAG
(
-msse4
)
MY_CHECK_C_COMPILER_FLAG
(
-mpclmul
)
MY_CHECK_C_COMPILER_FLAG
(
-mrdrnd
)
MY_CHECK_C_COMPILER_FLAG
(
-mrdseed
)
IF
(
have_C__maes AND have_C__msse4 AND have_C__mpclmul
)
SET
(
WOLFSSL_INTELASM ON
)
ENDIF
()
...
...
@@ -113,20 +115,27 @@ IF(WOLFSSL_INTELASM)
LIST
(
APPEND WOLFCRYPT_SOURCES
${
WOLFCRYPT_SRCDIR
}
/cpuid.c
)
IF
(
MSVC
)
LIST
(
APPEND WOLFCRYPT_SOURCES
${
WOLFCRYPT_SRCDIR
}
/aes_asm.asm
)
SET
(
WOLFSSL_X86_64_BUILD 1
)
SET
(
HAVE_INTEL_RDSEED 1
)
SET
(
HAVE_INTEL_RDRAND 1
)
IF
(
CMAKE_C_COMPILER_ID MATCHES Clang
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-maes"
)
ELSE
()
SET
(
HAVE_INTEL_RDSEED 1
)
SET
(
WOLFSSL_X86_64_BUILD 1
)
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-maes -msse4.2 -mpclmul -mrdrnd -mrdseed"
)
ENDIF
()
ELSEIF
(
CMAKE_SYSTEM_PROCESSOR MATCHES
"x86_64"
)
SET
(
HAVE_INTEL_RDSEED 1
)
SET
(
USE_INTEL_SPEEDUP 1
)
LIST
(
APPEND WOLFCRYPT_SOURCES
${
WOLFCRYPT_SRCDIR
}
/aes_asm.S
${
WOLFCRYPT_SRCDIR
}
/sha512_asm.S
${
WOLFCRYPT_SRCDIR
}
/sha256_asm.S
)
ADD_DEFINITIONS
(
-maes -msse4 -mpclmul
)
IF
(
have_C__mrdrnd
)
SET
(
HAVE_INTEL_RDRAND 1
)
ADD_DEFINITIONS
(
-mrdrnd
)
ENDIF
()
IF
(
have_C__mrdseed
)
SET
(
HAVE_INTEL_RDSEED 1
)
ADD_DEFINITIONS
(
-mrdseed
)
ENDIF
()
ENDIF
()
ENDIF
()
...
...
extra/wolfssl/user_settings.h.in
View file @
bfe612b7
...
...
@@ -32,6 +32,7 @@
#cmakedefine USE_FAST_MATH
#cmakedefine TFM_TIMING_RESISTANT
#cmakedefine HAVE_INTEL_RDSEED
#cmakedefine HAVE_INTEL_RDRAND
#cmakedefine USE_INTEL_SPEEDUP
#cmakedefine USE_FAST_MATH
#cmakedefine WOLFSSL_X86_64_BUILD
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment