Merge pull request #8767 from daverodgman/sha-glibc-changelog
SHA-256 and 512 support for old libc
This commit is contained in:
commit
4c92845210
2 changed files with 12 additions and 0 deletions
4
ChangeLog.d/linux-aarch64-hwcap.txt
Normal file
4
ChangeLog.d/linux-aarch64-hwcap.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
Bugfix
|
||||
* On Linux on ARMv8, fix a build error with SHA-256 and SHA-512
|
||||
acceleration detection when the libc headers do not define the
|
||||
corresponding constant. Reported by valord577.
|
|
@ -102,6 +102,14 @@
|
|||
# if defined(__linux__)
|
||||
/* Our preferred method of detection is getauxval() */
|
||||
# include <sys/auxv.h>
|
||||
# if !defined(HWCAP_SHA512)
|
||||
/* The same header that declares getauxval() should provide the HWCAP_xxx
|
||||
* constants to analyze its return value. However, the libc may be too
|
||||
* old to have the constant that we need. So if it's missing, assume that
|
||||
* the value is the same one used by the Linux kernel ABI.
|
||||
*/
|
||||
# define HWCAP_SHA512 (1 << 21)
|
||||
# endif
|
||||
# endif
|
||||
/* Use SIGILL on Unix, and fall back to it on Linux */
|
||||
# include <signal.h>
|
||||
|
|
Loading…
Reference in a new issue