diff mbox series

[3/3] openssl: build with MIPS16 if assembly is disabled

Message ID 20201015223559.928435-4-rsalvaterra@gmail.com
State Not Applicable
Headers show
Series openssl: add more fine-grained optimisation settings | expand

Commit Message

Rui Salvaterra Oct. 15, 2020, 10:35 p.m. UTC
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@gmail.com>
---
 package/libs/openssl/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

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