summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn-Mark Bell <jmb@netsurf-browser.org>2015-11-28 22:37:28 +0000
committerJohn-Mark Bell <jmb@netsurf-browser.org>2015-11-28 22:37:28 +0000
commit9b4182fac113cd3481b81b3446c25eb40c26a5bb (patch)
treea6de73573edde841eca27ed1147c135b54681fa0
parent3e4f15d537df461c67e5b7ea1eddb807e3d006fb (diff)
downloadtoolchains-9b4182fac113cd3481b81b3446c25eb40c26a5bb.tar.gz
toolchains-9b4182fac113cd3481b81b3446c25eb40c26a5bb.tar.bz2
OpenSSL: fully disable CPU feature detection.jmb/openssl-asm
It is unsafe to detect and use NEON or VFP instructions at runtime in a binary built using default compiler options. This is because the UnixLib runtime will only create and manage floating point contexts if -mfloat-abi is set to "softfp" at build time (which may occur automagically based on other compiler switches such as -mfpu). This is further complicated by the need to build a VFP-capable binary or else UnixLib will enable its FPA support code instead. Neither is desirable as FPA emulation will just be slower than soft float and VFP will restrict the binary to ARMv6 or later (and, even then, only certain CPUs) which would disappoint all the users still running RiscPCs, A9Homes, or Iyonixes. So disable this feature detection, until we can make UnixLib enable support code based on runtime, rather than (or, in addition to) compile-time, tests.
-rw-r--r--sdk/recipes/patches/openssl/arm-unknown-riscos/armv3.p13
1 files changed, 2 insertions, 11 deletions
diff --git a/sdk/recipes/patches/openssl/arm-unknown-riscos/armv3.p b/sdk/recipes/patches/openssl/arm-unknown-riscos/armv3.p
index d2deb9c..cf75c39 100644
--- a/sdk/recipes/patches/openssl/arm-unknown-riscos/armv3.p
+++ b/sdk/recipes/patches/openssl/arm-unknown-riscos/armv3.p
@@ -11,16 +11,7 @@
# endif
--- crypto/armcap.c 2015-07-09 12:21:24.000000000 +0000
+++ crypto/armcap.c 2015-11-13 15:12:20.385640267 +0000
-@@ -7,6 +7,8 @@
-
- #include "arm_arch.h"
-
-+extern unsigned int __get_cpu_arch (void);
-+
- unsigned int OPENSSL_armcap_P;
-
- static sigset_t all_masked;
-@@ -67,13 +69,15 @@
+@@ -67,13 +67,15 @@
sigprocmask(SIG_SETMASK, &ill_act.sa_mask, &oset);
sigaction(SIGILL, &ill_act, &ill_oact);
@@ -31,7 +22,7 @@
- if (sigsetjmp(ill_jmp, 1) == 0) {
- _armv7_tick();
- OPENSSL_armcap_P |= ARMV7_TICK;
-+ if (__get_cpu_arch() == 0) {
++ if (0) {
+ if (sigsetjmp(ill_jmp, 1) == 0) {
+ _armv7_neon_probe();
+ OPENSSL_armcap_P |= ARMV7_NEON;