[PATCH 3/3] openssl: build with MIPS16 if assembly is disabled
Rui Salvaterra
rsalvaterra at gmail.com
Thu Oct 15 18:35:59 EDT 2020
If we don't even want hand-optimised assembly routines, we're definitely
optimising for size. Compiling with MIPS16 instructions breaks the build when
OPENSSL_WITH_ASM assembly is enabled, but they can be used otherwise.
Library sizes (in bytes):
Os, 74kc, OPENSSL_OPTIMIZE_SPEED, OPENSSL_WITH_ASM
1716068 libcrypto.so.1.1
398788 libssl.so.1.1
Os, 74kc, OPENSSL_OPTIMIZE_SPEED, mips16
1560268 libcrypto.so.1.1
329228 libssl.so.1.1
Os, 74kc, mips16
1343144 libcrypto.so.1.1
308684 libssl.so.1.1
Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
package/libs/openssl/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index f3311567a7..5163bf72c3 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -12,7 +12,11 @@ PKG_BASE:=1.1.1
PKG_BUGFIX:=h
PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
PKG_RELEASE:=1
+
+ifdef CONFIG_OPENSSL_WITH_ASM
PKG_USE_MIPS16:=0
+endif
+
ENGINES_DIR=engines-1.1
PKG_BUILD_PARALLEL:=1
--
2.28.0
More information about the openwrt-devel
mailing list