diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-16 13:07:41 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-16 14:03:06 +0100 |
commit | 9e7c4702a1f4e49113d10bc736f50e8a06bdb8ba (patch) | |
tree | 78b67bc2f13327039aba1127fa4506e848891817 /package/libs/mbedtls | |
parent | 83a97c53face95b8c7239da25a1c7f776bcfc521 (diff) | |
download | upstream-9e7c4702a1f4e49113d10bc736f50e8a06bdb8ba.tar.gz upstream-9e7c4702a1f4e49113d10bc736f50e8a06bdb8ba.tar.bz2 upstream-9e7c4702a1f4e49113d10bc736f50e8a06bdb8ba.zip |
mbedtls: fix compilation on ARM < 6
mbedtls uses some instructions introduced in ARMv6 which are not
available in older architectures.
Fixes: 3f7dd06fd85 ("mbedtls: Update to 2.14.1")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/libs/mbedtls')
-rw-r--r-- | package/libs/mbedtls/patches/300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/package/libs/mbedtls/patches/300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch b/package/libs/mbedtls/patches/300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch new file mode 100644 index 0000000000..b6c60f0019 --- /dev/null +++ b/package/libs/mbedtls/patches/300-bn_mul.h-Use-optimized-MULADDC-code-only-on-ARM-6.patch @@ -0,0 +1,27 @@ +From 7aff5a70f3580426865b6c86437a3e47546d13f7 Mon Sep 17 00:00:00 2001 +From: Hauke Mehrtens <hauke@hauke-m.de> +Date: Sun, 16 Dec 2018 13:02:49 +0100 +Subject: [PATCH] bn_mul.h: Use optimized MULADDC code only on ARM >= 6 + +The optimized code uses umaal which was only introduced with ARMv6 and +is not available on older versions. +This broke compilation with arm926ej-s CPU for me. + +Fixes: 16b1bd89326 ("bn_mul.h: add ARM DSP optimized MULADDC code") +Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> +--- + include/mbedtls/bn_mul.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/include/mbedtls/bn_mul.h ++++ b/include/mbedtls/bn_mul.h +@@ -638,7 +638,8 @@ + "r6", "r7", "r8", "r9", "cc" \ + ); + +-#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1) ++#elif defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1) && \ ++ __TARGET_ARCH_ARM >= 6 + + #define MULADDC_INIT \ + asm( |