summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-05-03 19:36:48 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-05-03 19:36:48 +0000
commita47f6ef80a034bb405861735e0c45875951b0632 (patch)
tree9fe6da538e1c13d7a5472875c8f0b25fc988ce94 /lib/libssl
parentd751037dbf6e046a944130a220f44f8ab03c8163 (diff)
Do not compile the neon probe code until __ARM_ARCH__ >= 7. Neon-specific code
will not get referenced if this condition is not met.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/src/crypto/armcap.c14
-rw-r--r--lib/libssl/src/crypto/armv4cpuid.S2
2 files changed, 14 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/armcap.c b/lib/libssl/src/crypto/armcap.c
index f40993c1d55..0476f5a4f5c 100644
--- a/lib/libssl/src/crypto/armcap.c
+++ b/lib/libssl/src/crypto/armcap.c
@@ -9,6 +9,7 @@
unsigned int OPENSSL_armcap_P;
+#if __ARM_ARCH__ >= 7
static sigset_t all_masked;
static sigjmp_buf ill_jmp;
@@ -20,6 +21,7 @@ static sigjmp_buf ill_jmp;
* ARM compilers support inline assembler...
*/
void _armv7_neon_probe(void);
+#endif
#if defined(__GNUC__) && __GNUC__>=2
void OPENSSL_cpuid_setup(void) __attribute__((constructor));
@@ -28,20 +30,29 @@ void OPENSSL_cpuid_setup(void) __attribute__((constructor));
void
OPENSSL_cpuid_setup(void)
{
+#ifndef __OpenBSD__
char *e;
+#endif
+#if __ARM_ARCH__ >= 7
struct sigaction ill_oact, ill_act;
sigset_t oset;
+#endif
static int trigger = 0;
if (trigger)
return;
trigger = 1;
+#ifndef __OpenBSD__
if ((e = getenv("OPENSSL_armcap"))) {
OPENSSL_armcap_P = strtoul(e, NULL, 0);
return;
}
+#endif
+ OPENSSL_armcap_P = 0;
+
+#if __ARM_ARCH__ >= 7
sigfillset(&all_masked);
sigdelset(&all_masked, SIGILL);
sigdelset(&all_masked, SIGTRAP);
@@ -49,8 +60,6 @@ OPENSSL_cpuid_setup(void)
sigdelset(&all_masked, SIGBUS);
sigdelset(&all_masked, SIGSEGV);
- OPENSSL_armcap_P = 0;
-
memset(&ill_act, 0, sizeof(ill_act));
ill_act.sa_handler = ill_handler;
ill_act.sa_mask = all_masked;
@@ -65,4 +74,5 @@ OPENSSL_cpuid_setup(void)
sigaction (SIGILL, &ill_oact, NULL);
sigprocmask(SIG_SETMASK, &oset, NULL);
+#endif
}
diff --git a/lib/libssl/src/crypto/armv4cpuid.S b/lib/libssl/src/crypto/armv4cpuid.S
index 2354b39a552..5ca979f3b3e 100644
--- a/lib/libssl/src/crypto/armv4cpuid.S
+++ b/lib/libssl/src/crypto/armv4cpuid.S
@@ -4,12 +4,14 @@
.code 32
.align 5
+#if __ARM_ARCH__>=7
.global _armv7_neon_probe
.type _armv7_neon_probe,%function
_armv7_neon_probe:
.word 0xf26ee1fe @ vorr q15,q15,q15
.word 0xe12fff1e @ bx lr
.size _armv7_neon_probe,.-_armv7_neon_probe
+#endif
.global OPENSSL_atomic_add
.type OPENSSL_atomic_add,%function