mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 15:45:34 +00:00
Remove dependency on asm/hwcap.h
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
f2ea08ae50
commit
66d5512571
@ -126,7 +126,13 @@
|
|||||||
# if defined(__linux__)
|
# if defined(__linux__)
|
||||||
/* Our preferred method of detection is getauxval() */
|
/* Our preferred method of detection is getauxval() */
|
||||||
# include <sys/auxv.h>
|
# include <sys/auxv.h>
|
||||||
# include <asm/hwcap.h>
|
/* These are not always defined via sys/auxv.h */
|
||||||
|
# if !defined(HWCAP_SHA2)
|
||||||
|
# define HWCAP_SHA2 (1 << 6)
|
||||||
|
# endif
|
||||||
|
# if !defined(HWCAP2_SHA2)
|
||||||
|
# define HWCAP2_SHA2 (1 << 3)
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
/* Use SIGILL on Unix, and fall back to it on Linux */
|
/* Use SIGILL on Unix, and fall back to it on Linux */
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
|
@ -4344,10 +4344,7 @@ support_build_sha_armce() {
|
|||||||
# clang >= 4 is required to build with SHA extensions
|
# clang >= 4 is required to build with SHA extensions
|
||||||
clang_ver="$(clang --version|grep version|sed -E 's#.*version ([0-9]+).*#\1#')"
|
clang_ver="$(clang --version|grep version|sed -E 's#.*version ([0-9]+).*#\1#')"
|
||||||
|
|
||||||
# we need asm/hwcap.h available for runtime detection
|
[[ "${clang_ver}" -ge 4 ]]
|
||||||
echo '#include <asm/hwcap.h>' | clang -E - >/dev/null 2>&1 && have_hwcap=1 || have_hwcap=0
|
|
||||||
|
|
||||||
[[ "${clang_ver}" -ge 4 && "${have_hwcap}" -eq 1 ]]
|
|
||||||
else
|
else
|
||||||
# clang not available
|
# clang not available
|
||||||
false
|
false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user